function layerGet(id) {
  if (document.all) return document.all[id];
  else if(document.layers) return document.layers[id];
  else return document.getElementById(id);
}
function layerShow(id,on) {
  var NNtype,IEtype,WC3type; 
  if(on){ 
    NNtype="show";
    IEtype="visible";
    WC3type="visible"; 
  }
  else{
    NNtype="hidden";
    IEtype="hidden";
    WC3type="hidden"; 
  }
  if (document.getElementById)eval("document.getElementById(id).style.visibility = \"" + WC3type + "\"");
  else {
    if (document.layers) document.layers[id].visibility = NNtype;
    else if (document.all) eval("document.all." + id + ".style.visibility = \"" + IEtype + "\"");
  }
}
function layerWrite(id, message) {
  if (document.all) document.all[id].innerHTML=message;
  else if(document.layers){
    document.layers[id].document.open();
    document.layers[id].document.write(message);
    document.layers[id].document.close();
  }
  else document.getElementById(id).innerHTML=message;
}
function layerMoveTo(id, xpos, ypos) {
  var L=layerGet(id);
  if(L.style) L=L.style;
  L.left=xpos;
  L.top=ypos;
}
function layerCopyPosition(id, id2) {
  var L=layerGet(id2);
  if(L.style) L=L.style;
  layerMoveTo(id,L.left,L.top);
}
function layerSizeTo(id, width, height) {
  var L=layerGet(id);
  if(L.style) L=L.style;
  L.width=width;
  L.height=height;
}
function layerGetWidth(id) {
  var L=layerGet(id);
  if(L.style) L=L.style;
  return L.width;
}
function layerGetHeight(id) {
  var L=layerGet(id);
  if(L.style) L=L.style;
  return L.height;
}
function layerSetWidth(id, width) {
  var L=layerGet(id);
  if(L.style) L=L.style;
  L.width=width;
}
function layerSetHeight(id, height) {
  var L=layerGet(id);
  if(L.style) L=L.style;
  L.height=height;
}
function layerSetZIndex(id, Z) {
  var L=layerGet(id);
  if(L.style) L=L.style;
  L.zIndex=Z;
}
function layerVisible(id) {
  var L=layerGet(id);
  if(L.style) L=L.style;
  return(L.visibility!="hidden");
}
function layerLoadURL(id,url) {
  var L=layerGet(id);
  if(L.document) L.document.location=url;
  else L.src=url;
}