  
  var as_NN      = (document.layers ? true : false);
  var as_hideName = (as_NN ? 'hide' : 'hidden');
  var as_showName = (as_NN ? 'show' : 'visible');

  function AS_hideLayer(name) {
           AS_refLayer(name).visibility = as_hideName;
  }

  function AS_showLayer(name) {
           AS_refLayer(name).visibility = as_showName;
  }

  function AS_refLayer(name) {
           if (as_NN) { return document.layers[name]; }
           else { return eval('document.all.'+name+'.style'); }
  }
  
  function AS_genLayer_start(sName, sLeft, sTop, sWdh, sHgt, sVis, zIdx) {
           
           if (as_NN) {
               document.writeln('<LAYER NAME="'+sName+'" LEFT='+sLeft+' TOP='+sTop+' WIDTH='+sWdh+' HEIGHT='+sHgt+' VISIBILITY="'+sVis+'" z-Index='+zIdx+'>');
           } else {
               document.writeln('<DIV ID="' + sName + '" STYLE="position:absolute;left:'+sLeft+';top:'+sTop+';width:'+sWdh+';height:'+sHgt+';visibility:'+sVis+';z-Index:'+zIdx+'">'); 
           }
  }
  
  function AS_genLayer_end(sName) {
          if (as_NN) document.writeln('</LAYER>');
                else document.writeln('</DIV>');
  }
  
  function AS_genBlockLayer_start(sName, sWdh, sHgt) {
           
           if (as_NN) {
               document.writeln('<LAYER NAME="'+sName+'" WIDTH='+sWdh+' HEIGHT='+sHgt+'>');
           } else {
               document.writeln('<DIV ID="' + sName + '" STYLE="display:block;width:'+sWdh+';height:'+sHgt+';overflow:auto;border:1px solid #CCCCCC;scrollbar-dark-shadowcolor:#333333;scrollbar-light-shadow-color:#999999;scrollbar-base-color:#999999;scrollbar-arrow-color:#cccccc;scrollbar-face-color:#999999;scrollbar-shadow-color:#999999;scrollbar-3d-light-color:#999999;">'); 
           }
  }
