var swImg; swImg=new Array;

// j[
ImgPreload('ID1', '/pic/top01.gif', '/pic/top02.gif');
ImgPreload('ID2', '/pic/news01.gif', '/pic/news02.gif');
ImgPreload('ID3', '/pic/caption01.gif', '/pic/caption02.gif');
ImgPreload('ID4', '/pic/activity01.gif', '/pic/activity02.gif');
ImgPreload('ID5', '/pic/member01.gif', '/pic/member02.gif');
ImgPreload('ID6', '/pic/application01.gif', '/pic/application02.gif');
ImgPreload('ID7', '/pic/seminar01.gif', '/pic/seminar02.gif');

function ImgPreload(){
  var appVer=parseInt(navigator.appVersion);
  var isNC=false,isN6=false,isIE=false;
  if (document.all && appVer >= 4) isIE=true; else
    if (document.getElementById && appVer > 4) isN6=true; else
      if (document.layers && appVer >= 4) isNC=true;
  if (isNC||isN6||isIE)
  {
    if (document.images)
    {
      var imgName = ImgPreload.arguments[0];
      var cnt;
      swImg[imgName] = new Array;
      for (cnt = 1; cnt < ImgPreload.arguments.length; cnt++)
      {
        swImg[imgName][ImgPreload.arguments[cnt]] = new Image();
        swImg[imgName][ImgPreload.arguments[cnt]].src = ImgPreload.arguments[cnt];
      }
    }
  }
}

function ImgFind(doc, imgName){
  for (var i=0; i < doc.layers.length; i++)
  {
    var img = doc.layers[i].document.images[imgName];
    if (!img) img = ImgFind(doc.layers[i], imgName);
    if (img) return img;
  }
  return null;
}

function ImgSwap(imgName, imgSrc){
  var appVer=parseInt(navigator.appVersion);
  var isNC=false,isN6=false,isIE=false;
  if (document.all && appVer >= 4) isIE=true; else
    if (document.getElementById && appVer > 4) isN6=true; else
      if (document.layers && appVer >= 4) isNC=true;
  if (isNC||isN6||isIE)
  {
    if (document.images)
    {
      var img = document.images[imgName];
      if (!img) img = ImgFind(document, imgName);
      if (img) img.src = imgSrc;
    }
  }
}
