// JavaScript Document
function enable_applybtn(btnid,txtfldid)
{
	if (document.getElementById(txtfldid).value == "")
	{
		document.getElementById(btnid).src = "images/apply_dis.jpg"
		document.getElementById("apply_on").className = "hide_tab"
		document.getElementById("apply_off").className = "show_tab"
	}
	else
	{
		document.getElementById(btnid).src = "images/apply.jpg"
		document.getElementById("apply_off").className = "hide_tab"
		document.getElementById("apply_on").className = "show_tab"
	}
}
// 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 showans(currid)
{
	var prequs = "qus";
	var preans = "ans";
	for(i=1;i<=15;i++)
	{
		var qusid = prequs + i;		
		var ansid = preans + i;
		if(Number(currid) == i)
		{
			document.getElementById(qusid).className = "txt_red link";
			document.getElementById(ansid).style.display = "block";
		}
		else
		{
			document.getElementById(ansid).style.display = "none";
			document.getElementById(qusid).className = "txt_black link"
		}
	}
}
function showusb(currid)
{
	var prequs = "usbtitle";
	var preans = "usblist";
	for(i=1;i<=7;i++)
	{
		var qusid = prequs + i;		
		var ansid = preans + i;
		if(Number(currid) == i)
		{
			document.getElementById(qusid).className = "txt_red link txt_11";
			document.getElementById(ansid).style.display = "block";
		}
		else
		{
			document.getElementById(ansid).style.display = "none";
			document.getElementById(qusid).className = "txt_blue link txt_11"
		}
	}
}
