//Function to open pop up window
function openWin(theURL,winName,features) {
  	window.open(theURL,winName,features);
}


//menu constructor
function menu(allitems,thisitem,startstate){ 
  callname= "gl"+thisitem;
  divname="subglobal"+thisitem;  
  this.numberofmenuitems = 8;
  this.caller = document.getElementById(callname);
  this.thediv = document.getElementById(divname);
  this.thediv.style.visibility = startstate;
}


//menu methods
function ehandler(event,theobj){
  for (var i=1; i<= theobj.numberofmenuitems; i++){
    var shutdiv =eval( "menuitem"+i+".thediv");
    shutdiv.style.visibility="hidden";
  }
  theobj.thediv.style.visibility="visible";
}


function closesubnav(event){
  if ((event.clientY <48)||(event.clientY > 127)){
    for (var i=1; i<= numofitems; i++){
      var shutdiv =eval('menuitem'+i+'.thediv');
      shutdiv.style.visibility='hidden';
    }
  }
}


function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}


// Shows the current date
function ShowMyDate() {
 var now = new Date();
 var yr = now.getYear();
 if(yr < 1900) {yr += 1900}; // corrections if Y2K display problem
 var mName = now.getMonth() + 1;
 var dName = now.getDay() + 1;
 var dayNr = ((now.getDate()<10) ? "0" : "")+ now.getDate();

if(mName==1) Month="ßíâàðü";
if(mName==2) Month="Ôåâðàëü";
if(mName==3) Month="Ìàðò";
if(mName==4) Month="Àïðåëü";
if(mName==5) Month="Ìàé";
if(mName==6) Month="Èþíü";
if(mName==7) Month="Èþëü";
if(mName==8) Month="Àâãóñò";
if(mName==9) Month="Ñåíòÿáðü";
if(mName==10) Month="Îêòÿáðü";
if(mName==11) Month="Íîÿáðü";
if(mName==12) Month="Äåêàáðü";

// String to display current date.
   var todaysDate =(" "
      + Month
       + " "
       + dayNr
       + ", "
       + yr
       + "<BR>");

document.open();
document.write(todaysDate);

}
