/*
image array for main menu
*/

function getObj(name)
{
  if (document.getElementById)
  {
  	this.obj = document.getElementById(name);
	this.style = document.getElementById(name).style;
  }
  else if (document.all)
  {
	this.obj = document.all[name];
	this.style = document.all[name].style;
  }
  else if (document.layers)
  {
   	this.obj = document.layers[name];
   	this.style = document.layers[name];
  }
  return this;
}

function initNav()
{
	imgSuffix="png";
	imgFolder="img/menu/";
	for (var key in arrMenuImg)
	{
		eval("document."+arrMenuImg[key]+ "UP" + " = new Image();");
		eval("document."+arrMenuImg[key]+ "UP" + ".src = '"+imgFolder+arrMenuImg[key]+"_1."+imgSuffix+"';");
		eval("document."+arrMenuImg[key]+ "DWN" + " = new Image();");
		eval("document."+arrMenuImg[key]+ "DWN" + ".src = '"+imgFolder+arrMenuImg[key]+"_2."+imgSuffix+"';");
	}
}

function swapImg(img,akt)
{
	theObj = getObj(img);
	akt=="on"? theImg = document[""+img+"DWN"].src : theImg = document[""+img+"UP"].src;
	theObj.obj.src = theImg;
}