function memberOver(obj,imageName)
{
  for(i=0; i<obj.childNodes.length; i++) {
    node = obj.childNodes[i];
    if(node.nodeName == "A"){
      for(i=0; i<node.childNodes.length; i++) {
        nodeChild = node.childNodes[i];
        if(nodeChild.nodeName == "IMG"){
          nodeChild.src = "gfx/" + imageName;
        }
      }
    }
  }
  obj.className += "Over";
}



function memberOut(obj,imageName)
{
  for(i=0; i<obj.childNodes.length; i++) {
    node = obj.childNodes[i];
    if(node.nodeName == "A"){
      for(i=0; i<node.childNodes.length; i++) {
        nodeChild = node.childNodes[i];
        if(nodeChild.nodeName == "IMG"){
          nodeChild.src = "gfx/" + imageName;
        }
      }
    }
  }
  obj.className = obj.className.replace("Over", "");
}



function preload()
{
  var container = document.getElementById("container");
  var preload = document.getElementById("preload");
  var images=new Array();
  var proc = 0;

  container.style.visibility = "hidden";
  preload.style.visibility = "visible";



  images.push("gfx/banner.gif");
  images.push("gfx/bighead1.gif");
  images.push("gfx/bighead2.gif");
  images.push("gfx/sweden.gif");

  images.push("gfx/player_t1.gif");
  images.push("gfx/player_t2.gif");
  images.push("gfx/player_t3.gif");
  images.push("gfx/player_t4.gif");
  images.push("gfx/player_ct1.gif");
  images.push("gfx/player_ct2.gif");
  images.push("gfx/player_ct3.gif");
  images.push("gfx/player_ct4.gif");

  images.push("gfx/weapons/ak47.gif");
  images.push("gfx/weapons/aug.gif");
  images.push("gfx/weapons/awp.gif");
  images.push("gfx/weapons/deagle.gif");
  images.push("gfx/weapons/elite.gif");
  images.push("gfx/weapons/famas.gif");
  images.push("gfx/weapons/fiveseven.gif");
  images.push("gfx/weapons/g3sg1.gif");
  images.push("gfx/weapons/gali.gif");
  images.push("gfx/weapons/glock.gif");
  images.push("gfx/weapons/he.gif");
  images.push("gfx/weapons/knife.gif");
  images.push("gfx/weapons/m3.gif");
  images.push("gfx/weapons/m4a1.gif");
  images.push("gfx/weapons/m4a1s.gif");
  images.push("gfx/weapons/mac10.gif");
  images.push("gfx/weapons/mp5.gif");
  images.push("gfx/weapons/p228.gif");
  images.push("gfx/weapons/p90.gif");
  images.push("gfx/weapons/para.gif");
  images.push("gfx/weapons/scout.gif");
  images.push("gfx/weapons/sg550.gif");
  images.push("gfx/weapons/sg552.gif");
  images.push("gfx/weapons/tmp.gif");
  images.push("gfx/weapons/ump.gif");
  images.push("gfx/weapons/usp.gif");
  images.push("gfx/weapons/usps.gif");
  images.push("gfx/weapons/xm10.gif");

  var i=0;
  for(i=0; i<=images.length; i++){
    img = new Image();
    img.src= images[i];
  }

  container.style.visibility = "visible";
  preload.style.visibility = "hidden";
}

