// JavaScript Document
var offcolor = "#FFFFFF";
var oncolor = "#FFFFDF";
function slideD(id)
{
	var id = "#" + id
	$(id).slideDown("slow");
}
function slideU(id)
{
	var id = "#" + id
	$(id).slideUp("slow");
}
function fadein(id)
{
	var id = "#" + id
	$(id).fadeIn("fast");
}
function fadeout(id)
{
	var id = "#" + id
	$(id).fadeOut("slow");
}
function fadeoutfast(id)
{
	var id = "#" + id
	$(id).fadeOut("fast");
}

function simpleshow(id)
{
	document.getElementById(id).style.display = "block"
}
function simplehide(id)
{
	document.getElementById(id).style.display = "none"
}
function changesrc(id,src)
{
	document.getElementById(id).src = src;
}
function chnagecolor(id,colorcode)
{
	document.getElementById(id).style.backgroundColor = colorcode;
}
function changeclass(id,class1)
{
	document.getElementById(id).className = class1;
}
function lmenus(currid)
{
	var total = 12;
	var prefix = "lpmenu_";
	var prefixcol1 = "col1_";
	var prefixcol2 = "col2_";	
	for(i=1;i<=Number(total);i++)
	{
		var id = prefix + i;
		var col1 = prefixcol1 + i;
		var col2 = prefixcol2 + i;
		if(Number(currid) == i)
		{
			//new fadein(id);
			document.getElementById(id).style.display = "block"
			document.getElementById(col1).style.backgroundColor = "#F2F2F2"
			document.getElementById(col2).style.backgroundColor = "#F2F2F2"			
		}
		else
		{
			//new fadeoutfast(id);
			document.getElementById(id).style.display = "none"
			document.getElementById(col1).style.backgroundColor = "#ffffff"
			document.getElementById(col2).style.backgroundColor = "#ffffff"	
		}
	}
}
function lmenusingle(currid)
{
	var id = "lpmenu_" + currid;
	var col1 = "col1_" + currid;
	var col2 = "col2_" + currid;
	document.getElementById(id).style.display = "block";
	document.getElementById(col1).style.backgroundColor = "#F2F2F2"
	document.getElementById(col2).style.backgroundColor = "#F2F2F2"	
}
function resetlmenus()
{
	var total = 12;
	var prefix = "lpmenu_";
	var prefixcol1 = "col1_";
	var prefixcol2 = "col2_";	
	for(i=1;i<=Number(total);i++)
	{
		var id = prefix + i;
		var col1 = prefixcol1 + i;
		var col2 = prefixcol2 + i;
		document.getElementById(id).style.display = "none";
		document.getElementById(col1).style.backgroundColor = "#ffffff"
		document.getElementById(col2).style.backgroundColor = "#ffffff"	
	}
}
function setfocus(id)
{
	document.getElementById(id).focus()
}
function highlighfrmarea(id)
{
	document.getElementById(id).style.backgroundColor = oncolor
}
function dehighlighfrmarea(id)
{
	document.getElementById(id).style.backgroundColor = offcolor
}
function icicigsmprodslide(currid)
{
	var total = 4;
	var pretab = "icicigsslidetab";
	var precont = "icicigsslidecont";
	var prearr = "icicigsslidearr";
	for(i=1;i<=total;i++)
	{
		var tabid = pretab + i;
		var contid = precont + i;
		var arrid = prearr + i;
		if(Number(currid) == i)
		{
			document.getElementById(tabid).className = "frag_head_4";
			new slideD(contid);
			new fadein(arrid);
		}
		else
		{
			document.getElementById(tabid).className = "frag_head_5";
			new slideU(contid);
			new simplehide(arrid);
		}
	}
}
var posx;var posy;
function getMouse(e){
posx=0;posy=0;
var ev=(!e)?window.event:e;
if (ev.pageX){
X=ev.pageX;
Y=ev.pageY;
}
else if(ev.clientX){
X=ev.clientX;
Y=ev.clientY;
}
else{return false}
	if(X+10>1024-550)
	{
		document.getElementById('xpos').value = (X-310)+"px"
	}
	else
	{
		document.getElementById('xpos').value = (X+10)+"px"
	}
	if(Y-20<100)
	{
		document.getElementById('ypos').value = (Y+20)+"px"
	}
	else
	{
		document.getElementById('ypos').value = (Y-20)+"px"
	}
}
function setmove()
{
	document.onmousemove=getMouse
}
function setdivXY(id)
{
	document.getElementById(id).style.left = document.getElementById('xpos').value;
	document.getElementById(id).style.top = document.getElementById('ypos').value;
}
