// JavaScript Document
function loadall()
{
//	mikecurl(627,627,'mains1','nwnw','F2F2F2','F2F2F2','y');
//	mikecurl(102,90,'mains3','anwnw','E5E5E5','E5E5E5','n');
}

function fadeja()
{
	var x = document.getElementById('seethru');
	var y = x.filters.alpha.opacity;
	y--;
	x.filters.alpha.opacity=y;
	if(y>65)
	{
		setTimeout("fadeja()",10)
	}
}

function mikecurl(wwidth,wcwidth,wplace,wcollect,lncol,lncol2,bot)
{
  var wheight = 1; 
  var cwidth = 4; 
  var incdic = 1; 
  var itm;
  for(q=1;q<1000;q++)
  {
	if(!(navigator.userAgent.indexOf('Opera')==-1)){q=1000;}
    var qq = q;
	var divy=document.createElement("div");
	var pipy=document.createElement("p");
	divy.id = (wcollect+q);
	document.getElementById(wplace).appendChild(divy);
	itm = eval("document.getElementById('"+wcollect+q+"')");
	if(navigator.appName=='Microsoft Internet Explorer'){divy.appendChild(pipy);}
	if(incdic==1){wwidth = wwidth+cwidth;} else {wheight=1; wwidth = wwidth-cwidth; if(bot=='n'){qq=1000}}
	if(wwidth>(wcwidth*1-1)&&wwidth<(wcwidth*1+10)){cwidth=4;} else if(wwidth>(wcwidth*1+9)&&wwidth<(wcwidth*1+20)){cwidth=3;} else if(wwidth>119&&wwidth<(wcwidth*1+30)){cwidth=2;} else if(wwidth>(wcwidth*1+29)&&wwidth<(wcwidth*1+40)){cwidth=1;} else if(wwidth>(wcwidth*1+40)){incdic=2; wheight=(document.getElementById(wcollect).offsetHeight)-2; itm.appendChild(document.getElementById(wcollect)); }	
	if(wwidth<wcwidth){qq=1000;wwidth=wcwidth;}
	if(q==1||qq==1000){itm.style.backgroundColor='#'+lncol2;} else{itm.style.backgroundColor='#'+lncol;}
	itm.style.width=wwidth+'px'; itm.style.height=wheight+'px';	itm.style.top=q+'px';
	if(!(navigator.appName=='Microsoft Internet Explorer'))
	{
		itm.style.marginLeft=((document.getElementById(wplace).offsetWidth-wwidth)/2)-5+'px';
		if(wwidth>(wcwidth*1+40)){wheight=1; }
	}
	q=qq;
  }
}

function ckdetys()
{
	var checkers = 0;
	if(!(medown.mename.value.length>2)||!(medown.meemail.value.length>4)||!(medown.meemail.value.indexOf('.') > 2)||!(medown.meemail.value.indexOf('@') > 0))
	{
		checkers++;
	}
	if(checkers==0)
	{
		popUpDown = open(URLStr='http://www.factorycontrolsystems.co.uk/???' , 'popUpDown', 'toolbar=no,location=no,directories=no,scrollbar=yes,status=no,menub ar=no,resizable=yes,copyhistory=yes,width='+1000+',height='+470+',left='+10+', top='+50+',screenX='+left+',screenY='+top+'');
		medown.submit();
	}
	else
	{
		alert("please fill in your name and a valid email");		   
	}
}
		  
function gopage(pageno)
{
	if(pageno=='shop'){document.location='http://www.xmlparser.net/fcsshop.php';}
	else if(pageno=='maini'){document.location='../index.htm';}
	else if(pageno=='map'){document.location='http://www.factorycontrolsystems.co.uk/html/fcssite.html';}
}
function loginnow()
{
	document.location='http://www.factorycontrolsystems.co.uk/html/lock/login.html';
}

//function newwin(win)
//{
//  popUpWin = open(URLStr='http://www.w3.org/Style/CSS/Buttons' , 'newwinW3C', '');
//}

function logfrm()
{
	var frm = document.getElementById('loginform');
	if(document.getElementById('reg').disabled==true)
	{
	frm.action='http://www.xmlparser.net/fcslogin.php';
	}
	else
	{
	frm.action='http://www.xmlparser.net/processing.php';
	}	
	document.getElementById('reg').name='reg';
	document.getElementById('uss').name='uss';
	document.getElementById('pas').name='pas';
	frm.submit();
}