/* Browser check */
IS_DOM = (document.getElementById) ? true : false;

// preload level 1 menu buttons
var btnLevel1 = new Array();
btnLevel1 = ["","home","company","products","quality","newsroom","contactus"];
for (i=0;i<btnLevel1.length;i++) { 
	eval("menu"+i+"on = new Image();"); eval("menu"+i+"off = new Image();");
	eval("menu"+(i)+"on.src = \"" + sFolderLevel + "images/l1_"+btnLevel1[i]+"_r.gif\";");
	eval("menu"+(i)+"off.src = \"" + sFolderLevel + "images/l1_"+btnLevel1[i]+"_0.gif\";");
}

function imgOn(imgName) {
  if (IS_DOM) {
    document.getElementById(imgName).src = eval(imgName + "on.src");
  }
}
 
function imgOff(imgName) {
  if (IS_DOM) {
    document.getElementById(imgName).src = eval(imgName + "off.src");
  }
}

//Open new window
function OpenWindow(sPath, iHeight, iWidth ) {
	var winName = "newWind" + Math.round(Math.random() * 9999999);
	window.open(sPath, winName, 'height=' + iHeight + ',width=' + iWidth + ',scrollbars,resizable,top=20,left=20')
}

//Open new window in specified target
function OpenTargetWindow(sPath, sTarget, iHeight, iWidth ) {
	var winName = sTarget;
	var newWin = window.open(sPath, winName, 'height=' + iHeight + ',width=' + iWidth + ',scrollbars,resizable,top=20,left=20');
	newWin.focus();
}
