var divLayerStr="";
var divOrLayer="";
var visible="";
var hidden="";
var ns4="";
var ie4="";
var menuTop=114;
var menuLeft=380;
var menuWidth=100;
var menuHeight=100;
var menuBgclr="#C2DAE6";
var menuZIndex=9999;
var semiColon=";";
var endTags="";
var leftEdge="";
 
function init(){
ns4 = (document.layers) ? true : false;
ie4 = (document.all) ? true : false;

ns4=false;
ie4=true;

if (ns4){
    divOrLayer = "layer";
    visible = "show";
    hidden = "hide";
    } 
    else if (ie4){
             divOrLayer = "div";
             visible = 'visible';
             hidden = 'hidden';              
             }

}

function divLayers(mOption, nsID, nsClass, mTop, mLeft, mWidth, mHeight, mBgcolor, mZindex){
this.mOption = mOption;
this.nsID = nsID;
this.nsClass = nsClass;
this.mTop = mTop;
this.mLeft = mLeft;
this.mWidth = mWidth;
this.mHeight = mHeight;
this.mBgcolor = mBgcolor;
this.mZindex = mZindex;
this.writeNsLayer = writeNsLayer;
}

function writeNsLayer(){
ns4 = (document.layers) ? true : false;
ie4 = (document.all) ? true : false;

var nsLayer="";
leftEdge=this.mOption.xpos;
   
nsLayer = "<td" + " " + "bgcolor=\"" + this.mBgcolor  + "\" " + "nowrap " + "onMouseOver=\"";
nsLayer += "openTog(\'" + this.nsID + "\')\"" + "; " + "return false" + "; ";
nsLayer += "onMouseOut=\"closeTog(\'" + this.nsID + "\')\"" + ";\">";

if (ns4){
    nsLayer += "<a href=\"#\" " + "class=\"sublinks\" ";
    nsLayer += "onMouseOver=\"javascript:nsID=\'" + this.nsID + "\'; "; 
    nsLayer += "openTog()\"" + "; " + "return false" + "; ";
    nsLayer += "onMouseOut=\"javascript:nsID=\'" + this.nsID + "\'; "; 
    nsLayer += "closeTog()\"" + "; " + "return false" + ";>";
    nsLayer += this.mOption + "</a>";
    }
     else{
          nsLayer += "<a href=\"#\" " + "class=\"sublinks\">";
          nsLayer += this.mOption + "</a>";
          }

if (ns4){
    nsLayer += "<layer" + " " + "ID=\"" + this.nsID + "\" " + "border=\"" + this.mBorder + "\" " + "borderStyle=\"" + this.mBorderStyle + "\" " + "borderColor=\"" + this.mBorderColor + "\" "; 
    nsLayer += "top=\"" + this.mTop + "\" " + "left=\"" + this.mLeft + "\" ";
    nsLayer += "width=\"" + this.mWidth + "\" " + "height=\"" + this.mHeight + "\" ";
    nsLayer += "bgcolor=\"" + this.mBgcolor + "\" " + "z-index=\"" + this.mZindex + "\" ";
    nsLayer += "visibility=\"hide\" ";
    nsLayer += "onMouseOver=\"visibility=\'show\'\"" + " " + "onMouseOut=\"visibility=\'hide\';\">";
    }
    else {
          nsLayer += "<div" + " " + "ID=\"" + this.nsID + "\" " + "class=\"" + this.nsClass + "\" "; 
          nsLayer += "style=\" top:" + this.mTop + "; " + "left:" + this.mLeft + "; ";
          nsLayer += "width:" + this.mWidth + "; " + "height:" + this.mHeight + "; ";
          nsLayer += "background-color:" + this.mBgcolor + "; " + "z-index:" + this.mZindex + "; ";
          nsLayer += "visibility:hidden;\" ";
          nsLayer += "onMouseOut=\"visibility=\'hidden\';\">";
          }
document.write(nsLayer);
}


function openTog(menu){
 if (ns4){
     dropMenu = document.layers[nsID];
     dropMenu.bgColor = "#c28888";
     } 
     else if (ie4){
              dropMenu = document.getElementById(menu).style;
              dropMenu.borderStyle = "solid";
              dropMenu.borderWidth = "1px";
              dropMenu.borderColor = "#ffffff";
              dropMenu.padding = "5pt";
              }

dropMenu.visibility = visible;
              
}

function closeTog(menu){
 if (ns4){
     dropMenu = document.layers[nsID];
     
     } 
     else if (ie4){
              dropMenu = document.getElementById(menu).style;
              
              }


    dropMenu.visibility = hidden;

}

function writeEndTags(){

ns4 = (document.layers) ? true : false;
ie4 = (document.all) ? true : false;

      if (ns4){
          endTags="</layer></td>";
          }
          else{
               endTags="</div></td>";              
               }
}

