// JavaScript Document
function test_field(fields)
	{
	var fields=fields;
	var fn= fields.split(",");
	for(i=0;i<fn.length;i++)
	{
	var a= fn[i];
	var tag_name=document.getElementById(a).tagName;
	if(tag_name == 'select')
	{
	var cf=document.getElementById(a).selectedIndex;	
	}
	else
	{
	var cf=document.getElementById(a).value;
	}
	if(cf=="" || cf==-1)
	{
	alert("Please fill the Blank/Colored Field");
	document.getElementById(a).focus();
	//document.getElementById(a).style.backgroundColor='#FFFFCC';
	document.getElementById(a).style.borderColor='#FF0000';
	return false;
	}
	else
	{document.form1.action="server_page.php";}
	}
	}
	//-----------------
	function conf()
{
var rv= confirm("Are You Sure want to Delete");
if(rv==1)
{
return true;
}
else
{
return false;
}
}
//Toggle Function
function toggleLayer(whichLayer)
{
if (document.getElementById)
{
// this is the way the standards work
var style2 = document.getElementById(whichLayer).style;
style2.display = style2.display? "":"block" ;

}
else if (document.all)
{
// this is the way old msie versions work
var style2 = document.all[whichLayer].style;
style2.display = style2.display? "":"block";
}
else if (document.layers)
{
// this is the way nn4 works
var style2 = document.layers[whichLayer].style;
style2.display = style2.display? "":"block";
}
}
