function changeCol(ID, col, curStyle){
  if(document.getElementById){
    if(document.getElementById(ID)){
      document.getElementById(ID).style.backgroundColor = col;
      document.getElementById(ID).style.cursor = curStyle;
    }
    else{
      window.setTimeout("changeCol("+ID+", "+col+", "+curStyle+")", 100);
    }
  }
}

function layerControl(layer, action){
  if(action == "hidden"){
    timer = window.setTimeout("setVisibility('"+layer+"', '"+action+"')", hideDelay);
  }
  else{
    window.clearTimeout(timer);
    setVisibility(layer, action);
  }
}

function setVisibility(layer, action){
  if(activeLayer && activeLayer != layer){
    setVisibility(activeLayer, "hidden");
  }
  activeLayer = layer;

  if(document.all){
    if(document.all[layer]){
      document.all[layer].style.visibility = action;
    }
  }
  else
  if(document.layers){
    if(document.layers[layer]){
      document.layers[layer].visibility = action;
    }
  }
  else
  if(document.getElementById){
    if(document.getElementById(layer)){
      document.getElementById(layer).style.visibility = action;
    }
  }
}

function zoomTo(layer, action){
  if(document.all){
    if(start > end && layer && document.all[layer]){
      document.all[layer].style.zoom = start;
      start -= step;
      zoomTimer = setTimeout("zoomTo('"+layer+"', '"+action+"')", zoomSpeed)
    }
    else{
      clearTimeout(zoomTimer);
      start = 1;
      document.all[layer].style.zoom = start;
      setVisibility(layer, action);
    }
  }
  else{
    setVisibility(layer, action);
  }
}

function winOpen(url,t,w,h,addProps){
  var screenwidth = screen.width;
  var screenheight = screen.height;
  var postop = screenheight/2 - h/2;
  var posleft = screenwidth/2 - w/2;
  var properties = "width=" + w + ",height=" + h + ",top=" + postop + ",left=" + posleft;
  properties += "," + addProps;
  var popWin = window.open(url,t,properties);
  popWin.focus();
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

//winOpen("../christmas.php","christmas",570,430,"");
