function createLayer(id, nestref, left, top, width, height, content, bgColor, visibility, zIndex) {
 if (post== '') {
  if (nestref) {
   var lyr= eval('document.'+ nestref+ '.document.'+ id+ '= new Layer(width, document.'+ nestref+ ')');
  }
  else {
   var lyr= document.layers[id]= new Layer(width);
   eval("document."+id+"= lyr");
  }
  lyr.name= id;
  lyr.left= left;
  lyr.top= top;
  if (height!=null) lyr.clip.height= height;
  if (bgColor!=null) lyr.bgColor= bgColor;
  lyr.visibility= (visibility=='hidden')?'hide':'show';
  if (zIndex!= null) lyr.zIndex= zIndex;
  if (content) {
   lyr.document.open();
   lyr.document.write(content);
   lyr.document.close();
  }
 }
 else {
  var str= '\n<div id='+id+' style="position:absolute; left:'+left+'; top:'+top+'; width:'+width;
  if (height!=null) {
   str += '; height:'+height;
   str += '; clip:rect(0,'+width+','+height+',0)';
  }
  if (bgColor!=null) str += '; background-color:'+bgColor;
  if (zIndex!=null) str += '; z-index:'+zIndex;
  if (visibility) str += '; visibility:'+visibility;
  str += ';">'+((content)?content:'')+'</div>';
  if (nestref) {
   index= nestref.lastIndexOf(".");
   var nestlyr= (index != -1)? nestref.substr(index+1) : nestref;
   document.all[nestlyr].insertAdjacentHTML("BeforeEnd",str);
  }
  else {
   document.body.insertAdjacentHTML("BeforeEnd",str);
  }
 }
}
