var menuTimer;

var imgPath = '../../images/navigation/';

var ximgPath = '../../images/pictures/';

var img;

var bild;



function doNothing() {}

function switchImage(imgName, imgSrc) 
{
  if (document.images)
  {
    if (imgSrc != "none")
    {
      document.images[imgName].src = imgSrc;
    }
  }
}

function LayerVisibility(strId,bShow) {

  if (navigator.appName == "Netscape" && document.layers != null)

    document.layers[strId].visibility = (bShow!=0)?"show":"hide";

  else

    document.getElementById(strId).style.visibility = (bShow!=0)?"visible":"hidden";

}



function dropIt(no) {

  var max = 3;



  for( var i = 0; i<= max; i++ ) {

    LayerVisibility("drop"+i,(i==no)?1:0);

    if (i==no) {

       img = "button-" + i + "-1";

       bild = img + "-1.gif";     

       swapImage(img,bild)  

	} else {

       img = "button-" + i + "-1";

       bild = img + "-0.gif";

       swapImage(img,bild)  

    }

  }    

}

function e_dropIt(no) {

  var max = 3;

 

  for( var i = 0; i<= max; i++ ) {

    LayerVisibility("drop"+i,(i==no)?1:0);

    if (i==no) {

       img = "e_button-" + i + "-1";

       bild = img + "-1.gif";     

       swapImage(img,bild)  

	} else {

       img = "e_button-" + i + "-1";

       bild = img + "-0.gif";

       swapImage(img,bild)  

    }

  }    

}



function startTimeout() {

  var t = 7000;

  menuTimer = window.setTimeout("dropIt(-1);",t);

}

function e_startTimeout() {

  var t = 7000;

  menuTimer = window.setTimeout("e_dropIt(-1);",t);

}



function swapImage(img,pic) {



  var ns = false;

  if ((document.layers) && (navigator.appVersion.substring(0,1) < "5")) { ns = true; }

  if ((document.images) && ((!ns) || (img.length == 10) || (img.length == 12))) {

    document[img].src = imgPath+pic;

  }

  

}



function mainChange(img,pic,mode) {

  if (document.images) {

    document[img].src = ximgPath+pic;

  }

  

  dht = "text" + img;

  LayerVisibility(dht,mode);

  

}



function stopTimeout() {

  window.clearTimeout(menuTimer);

}





function poppdf(num) {

  var xfile; 

  

  xfile = "../pdf/" + num + ".PDF";

  psd = window.open(xfile,'','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=yes,width=690,height=450,left=100,top=100')

}



function popimage(num,numx) {

  var widthx;

  var xfile;

  

  xfile = "../../base/showpopup.php?image=" + num;

  window.open(xfile,'','width=400,height=300,resizable=yes,left=100,top=100')

}

function e_popimage(num,numx) {

  var widthx;

  var xfile;

  

  xfile = "../../base/e_showpopup.php?image=" + num;

  window.open(xfile,'','width=400,height=300,resizable=yes,left=100,top=100')

}




function newspopimage(num,numx) {

  var widthx;

  var xfile;

  

  xfile = "../../base/showpopupnews.php?image=" + num;

  window.open(xfile,'','width=400,height=300,resizable=yes,left=100,top=100')

}





function newspoppdf(num) {

  var xfile; 

  

  xfile = "../../upload/pdf/" + num + ".PDF";

  psd = window.open(xfile,'','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=yes,width=690,height=450,left=100,top=100')

}

function popup1(page) {
   if (add != null)
     if (!add.closed)
       add.close();
	   
  var xfile;

  xfile = page + '.html';

 add= window.open(xfile,"Tool","width=500,height=610,location=0,scrollbars=1,resizable=0,menubar=0,personalbar=0,status=0,top=20,left=20");
  add.focus();
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  add = window.open(theURL,winName,features);
  add.focus();
}


