var secesvar timerID = nullvar timerRunning = falsevar delay = 1000var m=3; // variable that shows maximum nomber in layers' names function InitializeTimer(){    // Set the length of the timer, in seconds    seces = 10    StopTheClock()    StartTheTimer()}function StopTheClock(){    if(timerRunning)        clearTimeout(timerID)    timerRunning = false}function StartTheTimer(){    if (seces==0)    {        StopTheClock()        showmenu();		MM_swapImgRestore();    }    else    {        //self.status = seces        seces = seces - 1        timerRunning = true        timerID = self.setTimeout("StartTheTimer()", delay)    }} function DOMGetElement(xx) {  // This function returns document's elemtnt acording it's name  // Using Document Object Model if (document.getElementById) return document.getElementById(xx);  return nul;}function showmenu(name) {// This is the main function that hide all the layers but the only one, // which name was delivered to the function as a parametrvar ii;  // cicle variablevar qq;  // here we store the name of a layer that we must showvar nen; // here we store the names of all layers (in a cicle)NeMenu =  new Array(m+1); // an array to store the objects -  all the layers that should be hiddennename = new Array(m+1);  // an array to store the names of all the layers  that should be hidden// cicle to store the names of all the layers that should be hidden an arrayfor (ii=0; ii<=m; ii++) {  nen="mainmenu-sub" + ii;  nename[ii]=nen;   if (name) { // this    if (nen==name) qq=ii; // flag on - if it's a name of a layer that should be shown   }}if(!name) MM_swapImgRestore();// than we should show one layer and hide all the others (in a cicle)// we do it for all the main types of brousers   if (document.getElementById) {   // Type 1: IE5,6; NN6; Mozilla  // if our brouser supports DOM and we can get an object according to it's name    if (name) { // if there was a parametr//		 var MenuCellStyle = DOMGetElement('menuCell' + qq).style;//		 MenuCellStyle.borderLeftStyle = 'solid';//		 MenuCellStyle.borderRightStyle = 'solid';//		 MenuCellStyle.borderBottomStyle = 'none';//		 MenuCellStyle.background = 'FFB310';     var Menu = DOMGetElement(name); // get an object      Menu.style.visibility='visible'; // and show it, changing the style	 InitializeTimer();    }    for (ii=0; ii<=m; ii++) { // for all the layers     if (ii!=qq) { // but one that should be shown      NeMenu[ii] = DOMGetElement(nename[ii]); // get an object that we do NOT show      NeMenu[ii].style.visibility='hidden';  // and hide it, changing the style//		 var MenuCellStyle = DOMGetElement('menuCell' + ii).style;//		 MenuCellStyle.borderLeftStyle = 'none';//		 MenuCellStyle.borderRightStyle = 'none';//		 MenuCellStyle.borderBottomStyle = 'solid';//		 MenuCellStyle.background = 'B5892B';						     }    }    return true; // exit function  } // that's all for the first type of brousers if(document.all) {   // Type 2: For document.all stands IE4-6 and Opera5, but IE5,6 were gone as the 1-st type    if (name) document.all[name].style.visibility= 'visible'; //if there was a parametr, show that layer using style	InitializeTimer();  for (ii=0; ii<=m; ii++) {    // hide all the layers but one that should be shown  - using style   if (ii!=qq) document.all[nename[ii]].style.visibility= 'hidden';   }    return true; // exit function } // that's all for the second type of brousers if (document.layers) {    //Type 2: NN4   InitializeTimer();   if (name) document.layers[name].visibility='show'; // if there was a parametr, show that layer using layer    for (ii=0; ii<=m; ii++) {    // hide all the layers but one that should be shown  - using layer     if (ii!=qq) document.layers[nename[ii]].visibility='hide';    }    return true; // exit function  } // that's all for the second type of brousers (NN4)}//Start Center Pop-up windowfunction CenterPopup(myUrl, name) {	var h=220; var w=360;	var leftpos = (screen.width - w) / 2;	var toppos = (screen.height - h) / 2;	winconfig = 'height='+h+',width='+w+',left='+leftpos+',top='+toppos+',scrollbars=no,resizable=no';	win = window.open(myUrl, name, winconfig);	if (parseInt(navigator.appVersion) >= 4)		win.window.focus();}