function service_menu()
{
	var obj=document.getElementById("service_menu");
	if(obj==null)
	{
		return;
	}
	else
	{
		var leftpos=0,toppos=0;
		var aTag = obj;
		do {
			aTag = aTag.offsetParent;
			leftpos	+= aTag.offsetLeft;
			toppos += aTag.offsetTop;
		} while(aTag.tagName!="BODY");
		document.write("<div id=\"Layer1\" style=\"Z-INDEX:0; LEFT: "+leftpos+"px; WIDTH: 375px; POSITION: absolute; TOP: "+toppos+"px; HEIGHT: 245px; visibility: visible;\">");
		document.write("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width=\"375\" height=\"245\">");
		document.write("<param name=\"movie\" value=\"images/menu_services.swf\">");
		document.write("<PARAM NAME=\"FlashVars\" VALUE=\"\">");
		document.write("<PARAM NAME=\"WMode\" VALUE=\"Transparent\">");
		document.write("<PARAM NAME=\"Play\" VALUE=\"0\">");
		document.write("<PARAM NAME=\"Loop\" VALUE=\"-1\">");
		document.write("<PARAM NAME=\"Quality\" VALUE=\"High\">");
		document.write("<PARAM NAME=\"SAlign\" VALUE=\"\">");
		document.write("<PARAM NAME=\"Menu\" VALUE=\"-1\">");
		document.write("<PARAM NAME=\"Base\" VALUE=\"\">");
		document.write("<PARAM NAME=\"AllowScriptAccess\" VALUE=\"sameDomain\">");
		document.write("<PARAM NAME=\"Scale\" VALUE=\"ShowAll\">");
		document.write("<PARAM NAME=\"DeviceFont\" VALUE=\"0\">");
		document.write("<PARAM NAME=\"EmbedMovie\" VALUE=\"0\">");
		document.write("<PARAM NAME=\"BGColor\" VALUE=\"\">");
		document.write("<PARAM NAME=\"SWRemote\" VALUE=\"\">");
		document.write("<PARAM NAME=\"MovieData\" VALUE=\"\">");
		document.write("<PARAM NAME=\"SeamlessTabbing\" VALUE=\"1\">");
		document.write("<PARAM NAME=\"Profile\" VALUE=\"0\">");
		document.write("<PARAM NAME=\"ProfileAddress\" VALUE=\"\">");
		document.write("<PARAM NAME=\"ProfilePort\" VALUE=\"0\">");
		document.write("<PARAM NAME=\"AllowNetworking\" VALUE=\"all\">");
		document.write("<embed src=\"images/menu_services.swf\" width=\"375\" height=\"245\" quality=\"high\" wmode=\"transparent\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\"	pluginspage=\"http://www.macromedia.com/go/getflashplayer\" /></embed> </object>");
	}
}
function service_locate()
{
	var obj=document.getElementById("service_menu");
	if(obj==null)
	{
		return;
	}
	else
	{
		var leftpos=0,toppos=0;
		var aTag = obj;
		do {
			aTag = aTag.offsetParent;
			leftpos	+= aTag.offsetLeft;
			toppos += aTag.offsetTop;
		} while(aTag.tagName!="BODY");
		var layerobj=document.getElementById("Layer1");
		layerobj.style.left=leftpos+"px";
		layerobj.style.top=toppos+"px";		
	}
}
function swapmenuin()
{
	var obj=document.getElementById("lhsmenu");
	if(obj==null)
	{
		return;
	}
	obj.className="flashmenu";
}
function swapmenuout()
{
	var obj=document.getElementById("lhsmenu");
	if(obj==null)
	{
		return;
	}
	obj.className="lhsmenu";
}
function validateform()
{

	var obj=document.getElementById("txtsearch");
	var ErMsg= "Please enter the keyword(s) to search";
	if(obj.value=="") {
	
	alert(ErMsg);
		
	return false;
	
	}
	
	
	//if((obj.value).length==0){
	
	
	//alert(ErMsg);
		
	//return false;
	//}
	return true;
}
function submitform()
{
	if(validateform())
	{
		var obj=document.getElementById("searchform");
		if(obj==null) return false;
		else obj.submit();
	}
}


function showmenu(elmnt)
{
document.getElementById(elmnt).style.visibility="visible"
}
function hidemenu(elmnt)
{
document.getElementById(elmnt).style.visibility="hidden"
}


/** added by Sharmila for print page**/
function printWindow(){
	
   bV = parseInt(navigator.appVersion)
   if (bV >= 4) window.print()
}
/** added by Sharmila for print page**/



/** added by Sharmila for email page**/
var good;
function checkEmailAddress(field) {
var goodEmail = field.value.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.org)|(\.info)|(\.sex)|(\.biz)|(\.aero)|(\.coop)|(\.museum)|(\.name)|(\.pro)|(\..{2,2}))$)\b/gi);
	if (goodEmail) {
		good = true;
	}
	else {
		alert('Please enter a valid address.');
		field.focus();
		field.select();
		good = false;
   }
}
//u = window.location;
function mailThisUrl() {
	
var initialsubj="Hello Friend, Found an interesting page for you";
var initialmsg="Hi:\n You may want to check out this page: "+window.location;
//alert(document.eMailer.email.value);
good = false
checkEmailAddress(document.searchform1.email);
	if (good) {
	//window.location = "mailto:"+document.eMailer.email.value+"?subject="+initialsubj+"&body="+document.title+" "+u;
	window.location = "mailto:"+document.searchform1.email.value+"?subject="+initialsubj+"&body="+initialmsg
   }
}
/** added by Sharmila for email page**/
