

function validatefaq()
{
	if (document.frmFaq.search.value == "")
	{
		alert("Enter text for search");
		document.frmFaq.search.focus();
		return false;
	}
	frmFaq.action="faqdetails.aspx?flag=2&search="+document.frmFaq.search.value;
	return true;
}
function TrimTxtBoxes()
{
	var formInputs = document.getElementsByTagName('input');
	for(var i = 0; i < formInputs.length; i++)
	{
		var TheInput = formInputs[i];
		if(TheInput.type == 'text')
		{
			TheInput.value = TheInput.value.replace(/^\s+|\s+$/g,"");
		}
	}
}
function ValidateContactUs()
{
 	var ErrMsg="";
	var emailPat = /^[A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)*[@][A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)+$/
	var matchArray = Form1.Contactus2_txtEmail.value.match(emailPat);
	var ErrorDisp = "You are missing following entries.\n";
	ErrorDisp += "----------------------------------------\n";
	
	if(document.Form1.Contactus2_txtFname.value=="" )
	{
		alert("First name required\n");
		document.Form1.Contactus2_txtFname.focus();
		return false;
	}
	
	if(document.Form1.Contactus2_txtFname.value.charAt(0)==' ')
	{    alert("First name required"); 
		 document.Form1.Contactus2_txtFname.focus();
		 return false;
	 }
	
	if(document.Form1.Contactus2_txtEmail.value==""||document.Form1.Contactus2_txtEmail.value=="Enter your email.")
	{
	    alert("Email required");		
		document.Form1.Contactus2_txtEmail.focus();
		return false;
	}
	else if (matchArray == null)
	{
		alert("Invalid Email format");
		document.Form1.Contactus2_txtEmail.focus();
		return false;
	}
	
	 if(document.Form1.Contactus2_txtComments.value==""||document.Form1.Contactus2_txtComments.value=="Enter your comments here")
	{
	    alert("Comments required");
		document.Form1.Contactus2_txtComments.focus();
		return false;		
	}
	
	if(document.Form1.Contactus2_txtComments.value.charAt(0)==' ')
	{  
	    alert("No spaces allowed.");
	    document.Form1.Contactus2_txtComments.focus();
		return false;
    }
	if(document.Form1.Contactus2_txtComments.value.length > 250)
	 {
			alert("Please enter only 250 characters");
			document.Form1.Contactus2_txtComments.focus();
			return false; 
	 }
	 
	/*
	if(document.Form1.Contactus2_CodeNumberTextBox.value=="")
	{
		alert("Verification code required");
		document.Form1.Contactus2_CodeNumberTextBox.focus();
		return false;
	}
	*/
	
	
	
	
	
	
	
	/*if(document.Form1.Contactus2_ddlCountry.selectedIndex==".::Please Select::.")
	{
		ErrMsg += "Country required\n";
	}*/
	
	if (ErrMsg=="")
	{
		return true;
	}
	else
	{	
		alert(ErrorDisp+ErrMsg);
		return false;
	}
}

function ValidateFaqDetails()
{
	var emailPat = /^[A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)*[@][A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)+$/
	var matchArray = Form1.TextBox2.value.match(emailPat);
	if(document.Form1.TextBox2.value=="")
	{
		alert("Email required");
		document.Form1.TextBox2.focus();
		return false;
	}
	else if (matchArray == null)
	{
		alert("Invalid Email format");
		document.Form1.TextBox2.focus();
		return false;
	}
	if(document.Form1.txtArea.value=="")
	{
		alert("Question required");
		document.Form1.txtArea.focus();
		return false;
	}
	return true;
}

function ValidateProfile()
{
	
 	var emailPat = /^[A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)*[@][A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)+$/
	var matchArray = Form2.Profile1_txtEmail.value.match(emailPat);
	if(document.Form2.Profile1_txtFName.value=="")
	{  
		alert("First name required");
		document.Form2.Profile1_txtFName.focus();
		return false;
	}
	if(document.Form2.Profile1_txtFName.value.charAt(0)==' ')
	{   alert("No spaces allowed.\n");
		document.Form2.Profile1_txtFName.focus();
		return false;
	}
	if(document.Form2.Profile1_txtUserName.value=="")
	{
		alert("User name required");
		document.Form2.Profile1_txtUserName.focus();
		return false;
	}
	if(document.Form2.Profile1_txtUserName.value.charAt(0)==' ')
	{   alert("No spaces allowed.\n");
		document.Form2.Profile1_txtUserName.focus();
		return false; 
    }
	if(document.Form2.Profile1_txtPassword.value=="")
	{
		alert("Password required");
		document.Form2.Profile1_txtPassword.focus();
		return false;
	}
	if(document.Form2.Profile1_txtPassword.value.charAt(0)==' ')
	{    alert("No spaces allowed.\n"); 
		document.Form2.Profile1_txtPassword.focus();
		return false;
	 }
	if(document.Form2.Profile1_txtEmail.value=="")
	{
		alert("Email required");
		document.Form2.Profile1_txtEmail.focus();
		return false;
	}
	else if (matchArray == null)
	{
		alert("Invalid Email format");
		document.Form2.Profile1_txtEmail.focus();
		return false;
	}
	
	if(document.Form2.Profile1_ddlCountry.value==".::Please Select::.")
	{
		alert("Country required");
		return false;
	}
	
	if(document.Form2.Profile1_txtAns.value=="")
	{
		alert("Answer required");
		document.Form2.Profile1_txtAns.focus();
		return false;
	}
	if(document.Form2.Profile1_txtAns.value.charAt(0)==' ')
	{    alert("No spaces allowed.\n");
	document.Form2.Profile1_txtAns.focus(); 
	return false;
	 }
	return true;
	}
	
function loopy() {
		loc = window.location.href
		sPos =loc.lastIndexOf("/")+1;
		if (sPos != -1) loc = loc.substring(0,sPos); // loose existing search
		window.location = loc+'logout.aspx';
	}

function popup(url)
{
	width = 450;
	height = 345;
	xx = window.screen.width;
	yy = window.screen.height;
	xx = (xx/2) - (width/2);
	yy = (yy/2) - (height);
	style = 'left = ' +  xx + ',top = ' + yy + ',width='+ width +',height=' + height + ',directories=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=no';
	newwindow=window.open(url,'name',style);
	if (window.focus) {newwindow.focus()}
}

function HeaderEmailValidation()
{
	var emailPat = /^[A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)*[@][A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)+$/
	var matchArray =document.newsletter.m_txtNewsLetter.value.match(emailPat);
	if(document.newsletter.m_txtNewsLetter.value==" ")
	{
		alert("Enter Email address.");
		document.newsletter.m_txtNewsLetter.focus();
		return false;
	}
	else if (matchArray == null)
	{
		alert("Invalid Email format.");
		document.newsletter.m_txtNewsLetter.value="";
		document.newsletter.m_txtNewsLetter.focus();
		return false;
	}
}


function HeaderLoginValidation()
{
	if(document.login.m_txtUserName.value==" ")
	{
		alert("Enter your username.");
		document.login.m_txtUserName.focus();
		return false;
	}
	
	if(document.login.m_txtPassword.value=="")
	{
		alert("Enter your password.");
		document.login.m_txtPassword.focus();
		return false;
	}
	return true;
}

function HeaderSearchValidation()
{
	if(document.Search.m_txtSearch.value==" ")
	{
		alert("Enter search text.");
		document.Search.m_txtSearch.focus();
		return false;
	}
}
//preloading images for default page
//var spath = window.location.toString();
//var dynFolder = "dynamicdata/";
//if(spath.indexOf("dynamicdata") =! -1)
//{
//	dynFolder = "";
//}
var clientlogo = new Image();
clientlogo.src = "dynamicdata/images/clientlogo.gif";

//var SearchGo = new Image();
//SearchGo.src = "dynamicdata/images/SearchGo.jpg";

//var newsGo = new Image();
//newsGo.src = "dynamicdata/images/newsGo.jpg";

//var stdBullet = new Image();
//stdBullet.src = "dynamicdata/images/stdBullet.jpg";

var WhatImg = new Image();
WhatImg.src = "dynamicdata/images/WhatImg.jpg";

//var dottedline = new Image();
//dottedline.src = "dynamicdata/images/dottedline.jpg";

var searchBG = new Image();
searchBG.src = "dynamicdata/images/searchBG.gif";

var BodyBG = new Image();
BodyBG.src = "dynamicdata/images/BodyBG.jpg";

//preloading images for default page
licenseNumber=1000;licenseURL="Unlicensed";_mD=2;_d=document;_dB=_d.body;_n=navigator;_L=location;_nv=$tL(_n.appVersion);_nu=$tL(_n.userAgent);_ps=parseInt(_n.productSub);_f=false;_t=true;_n=null;_W=window;$$=" ";$="";_wp=_W.createPopup;ie=(_d.all)?_t:_f;ie4=(!_d.getElementById&&ie)?_t:_f;ie5=(!ie4&&ie&&!_wp)?_t:_f;ie55=(!ie4&&ie&&_wp)?_t:_f;ns6=(_nu.indexOf("gecko")!=-1)?_t:_f;konq=(_nu.indexOf("konqueror")!=-1)?_t:_f;sfri=(_nu.indexOf("safari")!=-1)?_t:_f;if(konq||sfri){_ps=0;ns6=0}ns4=(_d.layers)?_t:_f;ns61=(_ps>=20010726)?_t:_f;ns7=(_ps>=20020823)?_t:_f;op=(_W.opera)?_t:_f;if(op||konq)ie=0;op5=(_nu.indexOf("opera 5")!=-1)?_t:_f;op6=(_nu.indexOf("opera 6")!=-1||_nu.indexOf("opera/6")!=-1)?_t:_f;op7=(_nu.indexOf("opera 7")!=-1||_nu.indexOf("opera/7")!=-1)?_t:_f;mac=(_nv.indexOf("mac")!=-1)?_t:_f;if(ns6||ns4||op||sfri)mac=_f;ns60=_f;if(ns6&&!ns61)ns60=_t;if(op7)op=_f;IEDtD=0;if(!op&&(_d.all&&_d.compatMode=="CSS1Compat")||(mac&&_d.doctype&&_d.doctype.name.indexOf(".dtd")!=-1))IEDtD=1;_cKA=0;_jv="javascript:void(0)";if(op)ie55=_f;_st=0;_en=0;ab$="absolute";_m=new Array();_mi=new Array();_sm=new Array();_tsm=new Array();_cip=new Array();$S3="2E636F6D2F";$S4="646D2E706870";_mn=-1;_el=0;_bl=0;_MT=setTimeout($,0);_oMT=setTimeout($,0);_cMT=setTimeout($,0);_mst=setTimeout($,0);_Mtip=setTimeout($,0);$u="undefined ";_zi=999;_c=1;_oldel=-1;_bH=500;_oldbH=0;_bW=0;_oldbW=0;_ofMT=0;_startM=1;_sT=0;_sL=0;_mcnt=0;$mD=0;_itemRef=-1;$R=0;lcl=0;_d.dne=0;inDragMode=0;_Lhr=_L.href;$O="menu";$5="hidden";$6="visible";if(op5){$5=$tU($5);$6=$tU($6)}function M_hideLayer(){}function _oTree(){}function mmMouseMove(){}function _cL(){}function _ocURL(){}function mmClick(){}function mmVisFunction(){}function remove(_ar,_dta){var _tar=new Array();for(_a=0;_a<_ar.length;_a++){if(_ar[_a]!=_dta){_tar[_tar.length]=_ar[_a]}}return _tar}function copyOf(_w){for(_cO in _w){this[_cO]=_w[_cO]}}function $tL($v){if($v)return $v.toLowerCase()}function $tU($v){if($v)return $v.toUpperCase()}function drawMenus(){_startM=1;_oldbH=0;_oldbW=0;for(_y=_mcnt;_y<_m.length;_y++){o$(_y,1)}}_$S={menu:0,text:1,url:2,showmenu:3,status:4,onbgcolor:5,oncolor:6,offbgcolor:7,offcolor:8,offborder:9,separatorcolor:10,padding:11,fontsize:12,fontstyle:13,fontweight:14,fontfamily:15,high3dcolor:16,low3dcolor:17,pagecolor:18,pagebgcolor:19,headercolor:20,headerbgcolor:21,subimagepadding:22,subimageposition:23,subimage:24,onborder:25,ondecoration:26,separatorsize:27,itemheight:28,image:29,imageposition:30,imagealign:31,overimage:32,decoration:33,type:34,target:35,align:36,imageheight:37,imagewidth:38,openonclick:39,closeonclick:40,keepalive:41,onfunction:42,offfunction:43,onbold:44,onitalic:45,bgimage:46,overbgimage:47,onsubimage:48,separatorheight:49,separatorwidth:50,separatorpadding:51,separatoralign:52,onclass:53,offclass:54,itemwidth:55,pageimage:56,targetfeatures:57,visitedcolor:58,pointer:59,imagepadding:60,valign:61,clickfunction:62,bordercolor:63,borderstyle:64,borderwidth:65,overfilter:66,outfilter:67,margin:68,pagebgimage:69,swap3d:70,separatorimage:71,pageclass:72,menubgimage:73,headerborder:74,pageborder:75,title:76,pagematch:77,rawcss:78,fileimage:79,clickcolor:80,clickbgcolor:81,clickimage:82,clicksubimage:83,imageurl:84};function mm_style(){for($i in _$S)this[$i]=_n;this.built=0}_$M={items:0,name:1,top:2,left:3,itemwidth:4,screenposition:5,style:6,alwaysvisible:7,align:8,orientation:9,keepalive:10,openstyle:11,margin:12,overflow:13,position:14,overfilter:15,outfilter:16,menuwidth:17,itemheight:18,followscroll:19,menualign:20,mm_callItem:21,mm_obj_ref:22,mm_built:23,menuheight:24};function menuname(name){for($i in _$M)this[$i]=_n;this.name=$tL(name);_c=1;_mn++;this.menunumber=_mn}function _incItem(_it){_mi[_bl]=new Array();for($i in _x[6])if(_x[6][$i])_mi[_bl][_$S[$i]]=_x[6][$i];_mi[_bl][0]=_mn;_it=_it.split(";");for(_a=0;_a<_it.length;_a++){_sp=_it[_a].indexOf("`");if(_sp!=-1){_tI=_it[_a];if(_sp==_it[_a].lastIndexOf("`")){for(_b=_a;_b<_it.length;_b++){if(_it[_b+1]){_tI+=";"+_it[_b+1];_a++;if(_it[_b+1].indexOf("`")!=-1)_b=_it.length}}}_it[_a]=_tI.replace(/`/g,$)}_sp=_it[_a].indexOf("=");if(_sp==-1){if(_it[_a])_si=_si+";"+_it[_a]}else{_si=_it[_a].slice(_sp+1);_w=_it[_a].slice(0,_sp);if(_w=="showmenu")_si=$tL(_si)}if(_it[_a]){_mi[_bl][_$S[_w]]=_si}}_m[_mn][0][_c-2]=_bl;_c++;_bl++}_c=0;function ami(txt){_t=this;if(_c==1){_c++;_m[_mn]=new Array();_x=_m[_mn];for($i in _t)_x[_$M[$i]]=_t[$i];_x[21]=-1;_x[0]=new Array();if(!_x[12])_x[12]=0;_MS=_m[_mn][6];_MN=_m[_mn];if(_MN[15]==_n)_MN[15]=_MS.overfilter;if(_MN[16]==_n)_MN[16]=_MS.outfilter;_MS[65]=(_MS.borderwidth)?parseInt(_MS.borderwidth):0;_MS[64]=_MS.borderstyle;_MS[63]=_MS.bordercolor;if(!_MS.built){lcl++;_vC=_MS.visitedcolor;if(_vC){_oC=_MS.offcolor;if(!_oC)_oC="#000000";if(!_vC)_vC="#ff0000";_Lcl="<style>.linkclass"+lcl+":link{color:"+_oC+"}.linkclass"+lcl+":visited{color:"+_vC+"}</style>";_d.write(_Lcl);_MS.linkclass="linkclass"+lcl}_MS.built=1}}_incItem(txt)}menuname.prototype.aI=ami;
