var leftMenuStr="";
var headerStr="";

// this function initializes each item in the menu
//
// 1)elementname, 
// 2)Label
// 3)url
// 4)image name
//
function onIt(where){
	eval("document."+where+".src='"+ imgPath+where+"_on.gif'");
}

function offIt(where){
	eval("document."+where+".src='"+ imgPath+where+"_off.gif'");
}


//write the section item in the menu
function wSect_sub(obj){
   var tempSpace 
   if(ns4) tempSpace=""; else tempSpace="";
   
   var tempStr="<A ONMOUSEOVER=\"onIt('nav_" + obj.name + "')\" ONMOUSEOUT=\"offIt('nav_"+ obj.name + "')\" " +
               "HREF='"+ obj.url +"'><IMG NAME='nav_"+ obj.name +"' SRC='"+ obj.imageSrc_sub +"' " +
               "border=0 alt='"+ obj.label +"'></A><BR>"+ tempSpace;
   return tempStr
}



//write the page item in the menu
function wPage(obj){
   var tempStr="<A CLASS='nav' HREF='"+ obj.url +"'>"+ obj.label+"</A>" + subMenuBetw
   return tempStr
}

 
   
function createLeftMenu(){
leftMenuStr +="<DIV ID='menu'>"
leftMenuStr +="<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH=141 HEIGHT=100% VALIGN=TOP><TR><TD VALIGN=TOP ALIGN=RIGHT>"
leftMenuStr +=wSect_sub(home)
leftMenuStr +=wSect_sub(news)
leftMenuStr +=wSect_sub(aboutUs)
leftMenuStr +=wSect_sub(anaServ)
leftMenuStr +=wSect_sub(ccms)
leftMenuStr +=wSect_sub(chemicalMgr)
leftMenuStr +=wSect_sub(products)
/*if(secLoc==8) {
   leftMenuStr +=""+ subMenuLeft +"<SPAN CLASS='navtext'>"
   leftMenuStr +=wPage(products_1)
   leftMenuStr +=wPage(products_2)   
   leftMenuStr +="</SPAN>"
} */
leftMenuStr +=wSect_sub(envPolicy)
leftMenuStr +=wSect_sub(quaPolicy)
leftMenuStr +=wSect_sub(contactUs)
  

leftMenuStr +="<BR>"  
leftMenuStr +="<form action='" + rootPath + "search.asp' method='get'>"
leftMenuStr +="<table border=0 cellspacing=0 cellpadding=0 align=left><tr>"
leftMenuStr +="<td><img src='"+imgPath+"nav_search_off.gif' border=0></td>"
leftMenuStr +="<td><input name='search' size='8'>&nbsp;<input type='image' src='"+ imgPath +"go.gif' alt='Go' border='0'></td>"
leftMenuStr +="</tr></table>"
leftMenuStr +="</form>"
          
leftMenuStr +="</TD></TR></TABLE>"
leftMenuStr +="</DIV>"
}



function createHeader(){
headerStr +="<table border=0 cellpadding=0 cellspacing=0 width=100%>";
headerStr +="<tr>";
headerStr +="<td WIDTH='361'><IMG SRC='"+ imgPath +"top_graphics1.gif' WIDTH='361' HEIGHT='106' ALT='' BORDER='0'></td>";
headerStr +="<td WIDTH='399' align=right><IMG SRC='"+ imgPath +"top_graphics2.jpg' WIDTH='399' HEIGHT='106' ALT='' BORDER='0'></td>";
headerStr +="<td width=2222 background='"+ imgPath +"tile_img.gif'><img src='"+ imgPath +"space.gif' border=0 height=1 width=1></td>"; 
headerStr +="</tr>";
headerStr +="</table>";
}

createLeftMenu();
createHeader()


