// Top menu Created 17/09/2002 by KAK : EBO Company  :

function showlayer (id) {
  var id,obj;
  obj = document.getElementById(id);
  obj=obj.style;
  obj.visibility="visible";
  
}
function hidelayer (id) {
  var id,obj;
  obj = document.getElementById(id);
  obj=obj.style;
  obj.visibility="hidden";
}
function hl_on_menu (id) {
   var id,obj;
  obj = document.getElementById(id);
  obj=obj.style;
  obj.backgroundColor = "#FF0000";
  obj.color = "#FFFFFF";
  obj.cursor = "hand";
}

function hl_off_menu (id) {
   var id,obj;
   obj = document.getElementById(id);
   obj=obj.style;
   obj.backgroundColor = "#FFFFFF";
   obj.color = "#000000";
}
function gotourl(url) {document.location = url;}

 function new_win_def_prot(mypage, myname, w, h, scroll,fullscreen) { //Show center screen,focus page in use
				var winl = (screen.width - w) / 2;
				var wint = (screen.height - h) / 2;
				winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',fullscreen='+fullscreen+',resizable,toolbar=no,location=no,status=yes,menubar=no'
				win = window.open(mypage, myname, winprops)
				if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
function chkEmail (str) 
	{
	    var num_as = str.lastIndexOf("@");
		var num_poin = str.lastIndexOf(".");
	    if (num_as == -1 || num_poin ==-1) 
		{
		     return false; 
	    }else
		{
		    return true;
		}
   }
function isBlank(val) {
if (val=="") {
		return true;		
	}
	return false;
}

 function isNum (charCode) 
   {
       if (charCode >= 48 && charCode <= 57 )
	       return true;
      else
	     return false;
   }
   function isAtoZ (charCode) 
   {
       if (charCode >= 65 && charCode <= 90 )
	       return true;
      else
	     return false;
   }
   function isaToz (charCode)
   {
      if (charCode >= 97 && charCode <= 122 )
	       return true;
      else
	     return false;
   }
   
 function chkFormatNaA (str) {//0-9,a-z,A-Z
  strlen = str.length;
  for (i=0;i<strlen;i++)
  {
      var charCode = str.charCodeAt(i);
	  if (!isNum(charCode) && !isAtoZ(charCode) && !isaToz(charCode)) {
		  return false;
	  }
   }
   return true;
}

function chkLen (str,numLen)
{
        var  strLen = str.length;
      	if (strLen < numLen) {
		    return false;
		}
     return true;
}

function new_win_def_point(mypage, myname, l, t, w, h, scroll,fullscreen) { //Show center screen,focus page in use
				winprops = 'height='+h+',width='+w+',top='+t+',left='+l+',scrollbars='+scroll+',fullscreen='+fullscreen+',resizable,toolbar=no,location=no,status=yes,menubar=no'
				win = window.open(mypage, myname, winprops)
				if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
function new_win_def_point1(mypage, myname, l, t, w, h, scroll,fullscreen) { //Show center screen,focus page in use
				winprops = 'height='+h+',width='+w+',top='+t+',left='+l+',scrollbars='+scroll+',fullscreen='+fullscreen+',resizable,toolbar=yes,addressbar=yes,location=yes,status=yes,menubar=yes'
				win = window.open(mypage, myname, winprops)
				if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

function new_win_def_point2(mypage, myname, w, h, scroll,fullscreen) { //Show center screen,focus page in use
                var winl = (screen.width - w) / 2;
				var wint = (screen.height - h) / 8;
				winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',fullscreen='+fullscreen+',resizable,toolbar=yes,addressbar=yes,location=yes,status=yes,menubar=yes'
				win = window.open(mypage, myname, winprops)
}

function hl_on_menu (id) {
   var id,obj;
  obj = document.getElementById(id);
  obj=obj.style;
  obj.backgroundColor = "#FFEEDD";
  obj.color = "#FF9933";
  obj.cursor = "hand";
}

function hl_off_menu (id) {
   var id,obj;
   obj = document.getElementById(id);
   obj=obj.style;
   obj.backgroundColor = "#FFDCB9";
   obj.color = "#000000";
}
function auto_close () {
	 setTimeout("closeWin()",3000);
 }
 function closeWin() {
                self.close();
}
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_findObj(n, d) { //v4.0
  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 && document.getElementById) x=document.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];}
}
