function changeclass(idname){
document.getElementById(idname).className = "lboxon";
}
function changeclass1(idname){
document.getElementById(idname).className = "lbox";
}

function urlPath(url,mode){
	if(mode=="_blank") {
		window.open(url,'');
	}
	else {
		location.href=url;
	}
}

function changeclass2(idname){
document.getElementById(idname).className = "iaglboxon";
}
function changeclass12(idname){
document.getElementById(idname).className = "iaglbox";
}



/* Function to show date on top part of the site */
function showDate(){
var dt=new Date();
var myDate=dt.toString().substr(0,10);
if (document.layers){
document.layers.liveDate.document.write(myDate.toString())
document.layers.liveDate.document.close()
}
else if (document.all)
liveDate.innerHTML=myDate.toString()
else if (document.getElementById)
document.getElementById("liveDate").innerHTML=myDate.toString()
   
}

/* Function to show time on top part of the site*/
function show5(){
 if (!document.layers&&!document.all&&!document.getElementById)
 return
 var Digital=new Date()
 var hours=Digital.getHours()
 var minutes=Digital.getMinutes()
// var seconds=Digital.getSeconds()
 var dn="AM" 
 if (hours>12){
 dn="PM"
 hours=hours-12
 }
 if (hours==0)
 hours=12
 if (minutes<=9)
 minutes="0"+minutes
// if (seconds<=9)
// seconds="0"+seconds
//change font size here to your desire
myclock="<font size='1px' face='Arial' >"+hours+":"+minutes+""+dn+"</font>"
if (document.layers){
document.layers.liveclock.document.write(myclock)
document.layers.liveclock.document.close()
}
else if (document.all)
liveclock.innerHTML=myclock
else if (document.getElementById)
document.getElementById("liveclock").innerHTML=myclock
setTimeout("show5()",15000)
 }
 
 
 
/*Function for top menu roll overs*/
 
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

/*FUnction to clear left part text box field*/
function clearfield(){
	var obj;
	obj=eval("document."+clearfield.arguments[0]);
	obj.value="";
	obj.focus;
	}
	
/*Function to open login window*/	
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

/*For the bookmark in the same page, need this code because have used the folder structure and has used the global files which all inside the folder include or global*/
function SelfLink(){
var top=document.location;
var bmark="";
if(SelfLink.arguments[0]!=undefined) {
	bmark=SelfLink.arguments[0];
	if(top.toString().indexOf("#")!=-1){
		var tempTop=top.toString();
	   top=tempTop.substr(0,tempTop.indexOf("#"));  
	}
}
else{
	bmark='';
	if(top.toString().indexOf("#")!=-1){
		var tempTop1=top.toString();
	   top=tempTop1.substr(0,tempTop1.indexOf("#"));  
	}
}
if(top.toString().indexOf("#")==-1)
	document.location.href=top+"#"+bmark;
else
	document.location.href=top+bmark;
}

function SelfLinkName(){
var top=document.location;
var bmark="";
if(SelfLinkName.arguments[0]!=undefined) {
	bmark=SelfLinkName.arguments[0];
	if(top.toString().indexOf("#")!=-1){
		var tempTop=top.toString();
	   top=tempTop.substr(0,tempTop.indexOf("#"));  
	}
}
else{
	bmark='';
	if(top.toString().indexOf("#")!=-1){
		var tempTop1=top.toString();
	   top=tempTop1.substr(0,tempTop1.indexOf("#")); 
	}
}
if(top.toString().indexOf("#")==-1)
	document.location.href=top+"#Link1"+bmark;
else
	document.location.href=top+bmark;
}

function OpenNewWindow(url)
	{
	  window.open(url,"newwindow");
	  self.close();
	}
	
/*Validate form*/
function ValidateForm(form)
{
 
if (form.economic_update.value == "")
  { alert("Please include your E-MAIL ADDRESS"); form.economic_update.focus(); return false; }

  if (form.economic_update.value.indexOf('@', 0) == -1 ||
      form.economic_update.value.indexOf('.', 0) == -1)
  { alert("That is not a valid email address."); form.economic_update.focus(); return false; }

  window.open('../global/action_left_economic_update.php?economic_update='+form.economic_update.value,'economic_update','toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,copyhistory=yes,width=200,height=150');
  form.economic_update.value="";
  return false;
}

function ValidateForm1(form){
	if(form.ea1.value=="")
	{ alert("Please include your E-MAIL ADDRESS"); form.ea1.focus(); return false; }
	
	if (form.ea1.value.indexOf('@', 0) == -1 ||
	form.ea1.value.indexOf('.', 0) == -1)
	{ alert("That is not a valid email address."); form.ea1.focus(); return false; }
	
	form.ea.value = form.ea1.value;
	form.ea1.value = "";
	return true;
}