var loadDone = "yes";
var elementsLoaded = "no";

function loadImg() {
  if (document.images) {
    menu1off	= new Image();	menu1off.src	= "images/menu/off/split72-home_2x2_1x2.gif";
    menu1on	= new Image();	menu1on.src	= "images/menu/on/split72-home_2x2_1x2.gif";
    menu2off	= new Image();	menu2off.src	= "images/menu/off/split72-home_2x2_1x4.gif";
    menu2on	= new Image();	menu2on.src	= "images/menu/on/split72-home_2x2_1x4.gif";
    menu3off	= new Image();	menu3off.src	= "images/menu/off/split72-home_2x2_1x6.gif";
    menu3on	= new Image();	menu3on.src	= "images/menu/on/split72-home_2x2_1x6.gif";
    menu4off	= new Image();	menu4off.src	= "images/menu/off/split72-home_2x2_1x8.gif";
    menu4on	= new Image();	menu4on.src	= "images/menu/on/split72-home_2x2_1x8.gif";
    menu5off	= new Image();	menu5off.src	= "images/menu/off/split72-home_2x2_1x10.gif";
    menu5on	= new Image();	menu5on.src	= "images/menu/on/split72-home_2x2_1x10.gif";

    prodmenu1off= new Image();	prodmenu1off.src= "images/menu/off/strip_till_toolbars.jpg";
    prodmenu1on	= new Image();	prodmenu1on.src	= "images/menu/on/strip_till_toolbars.jpg";
    prodmenu2off= new Image();	prodmenu2off.src= "images/menu/off/side_dress_applicators.jpg";
    prodmenu2on	= new Image();	prodmenu2on.src	= "images/menu/on/side_dress_applicators.jpg";
    prodmenu3off= new Image();	prodmenu3off.src= "images/menu/off/deep_placement_applicators.jpg";
    prodmenu3on	= new Image();	prodmenu3on.src	= "images/menu/on/deep_placement_applicators.jpg";
    prodmenu4off= new Image();	prodmenu4off.src= "images/menu/off/nh3_applicators.jpg";
    prodmenu4on	= new Image();	prodmenu4on.src	= "images/menu/on/nh3_applicators.jpg";
    prodmenu5off= new Image();	prodmenu5off.src= "images/menu/off/accessories.jpg";
    prodmenu5on	= new Image();	prodmenu5on.src	= "images/menu/on/accessories.jpg";

    loadDone = "yes";
  }
}

loadImg();

function show(currElem) {
  stdBrowser = (document.getElementById) ? true : false
  popUpWin = (stdBrowser) ? document.getElementById(currElem).style : eval("document." + currElem);
  popUpWin.visibility = "visible";
}

function hide(currElem) {
  stdBrowser = (document.getElementById) ? true : false
  popUpWin = (stdBrowser) ? document.getElementById(currElem).style : eval("document." + currElem);
  popUpWin.visibility = "hidden";
}

function showSpecial(currElem,obj,lp,tp) {
  stdBrowser = (document.getElementById) ? true : false
  var newX = findPosX(obj);
  var newY = findPosY(obj);
  popUpWin = (stdBrowser) ? document.getElementById(currElem).style : eval("document." + currElem);
  popUpWin.top =  (newY - tp);
  popUpWin.left = (newX + lp);
  popUpWin.visibility = "visible";
}

function findPosX(obj) {
  var curleft = 0;
  if (document.getElementById || document.all) {
    while (obj.offsetParent) {
      curleft += obj.offsetLeft
      obj = obj.offsetParent;
    }
  }
  else if (document.layers)
    curleft += obj.x;
    return curleft;
}

function findPosY(obj){
  var curtop = 0;
  var printstring = '';
  if (document.getElementById || document.all) {
    while (obj.offsetParent) {
      curtop += obj.offsetTop
      obj = obj.offsetParent;
    }
  }
  else if (document.layers)
    curtop += obj.y;
    return curtop;
}

function cImg() {
  if (loadDone == "yes") {
    if (document.images) {
      for (var i=0; i<cImg.arguments.length; i+=2) {
        document[cImg.arguments[i]].src = eval(cImg.arguments[i+1] + ".src");
      }
    }
  }
}