var leftMenuStr="";
var topMenuStr="";
var homeMenuStr="";
var footerStr=""



// 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="<BR>"; else tempSpace="";
   
   var tempStr="<A ONMOUSEOVER=\"onIt('sub_" + obj.name + "')\" ONMOUSEOUT=\"offIt('sub_"+ obj.name + "')\" " +
               "HREF='"+ obj.url +"'><IMG NAME='sub_"+ obj.name +"' SRC='"+ obj.imageSrc_sub +"' " +
               "border=0 alt='"+ obj.label +"'></A><BR>"+ tempSpace;
   return tempStr
}

function wSect_home(obj){
   var tempStr="<A ONMOUSEOVER=\"onIt('home_" + obj.name + "')\" ONMOUSEOUT=\"offIt('home_"+ obj.name + "')\" " +
               "HREF='"+ obj.url +"'><IMG NAME='home_"+ obj.name +"' SRC='"+ obj.imageSrc_home +"' " +
               "border=0 alt='"+ obj.label +"'></A><BR>";
   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 createHomeMenu(){
homeMenuStr +=wSect_home(news)
homeMenuStr +=wSect_home(about)
homeMenuStr +=wSect_home(products)
homeMenuStr +=wSect_home(maritime)
homeMenuStr +=wSect_home(industry)
homeMenuStr +=wSect_home(facts)
homeMenuStr +=wSect_home(resource)
homeMenuStr +=wSect_home(partners)
homeMenuStr +=wSect_home(spanish)
<!--homeMenuStr +=wSect_home(military)relocated link to Industry Profiles -Chhanda 04/16/2009-->
//homeMenuStr +="<img src='"+ imgPath+"empty.gif' width='196' height='71' border='0'><BR>"
//homeMenuStr +=wSect_home(base)
//homeMenuStr +=wSect_home(reporting)
//homeMenuStr +=wSect_home(ehs)
//homeMenuStr +=wSect_home(health)
//homeMenuStr +=wSect_home(msds)
//homeMenuStr +=wSect_home(data)
}

function createLeftMenu(){
leftMenuStr +="<DIV ID='menu'>"
leftMenuStr +="<A HREF='" + rootPath+"index.shtml'><img src='"+ imgPath +"/sub_left_title.jpg' width=141 height=55 border=0 alt='Quantum Home'></A><BR>"
//leftMenuStr +="<TR><TD WIDTH=141 HEIGHT=100% ALIGN=RIGHT VALIGN=TOP background='"+ imgPath+"/sub_left_bg.jpg'>"
leftMenuStr +="<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH=141 HEIGHT=100% VALIGN=TOP background='"+ imgPath+"/sub_left_bg.jpg'><TR><TD VALIGN=TOP ALIGN=RIGHT>"
leftMenuStr +=wSect_sub(home)
leftMenuStr +=wSect_sub(news)
if(secLoc==6) {
   leftMenuStr +=""+ subMenuLeft +"<SPAN CLASS='navtext'>"
   leftMenuStr +=wPage(news_1)
   leftMenuStr +=wPage(news_2)
   leftMenuStr +=wPage(news_3)
   leftMenuStr +="</SPAN><BR>"
}
leftMenuStr +=wSect_sub(about)
if(secLoc==7) {
   leftMenuStr +=""+ subMenuLeft +"<SPAN CLASS='navtext'>"
   leftMenuStr +=wPage(about_1)
   leftMenuStr +=wPage(about_2)
   leftMenuStr +=wPage(about_3)
   leftMenuStr +=wPage(about_4)
   leftMenuStr +=wPage(about_5)
   leftMenuStr +="</SPAN><BR>"
}
leftMenuStr +=wSect_sub(products)
if(secLoc==9) {
   leftMenuStr +=""+ subMenuLeft +"<SPAN CLASS='navtext'>"
   //leftMenuStr +=wPage(products_1)
   //leftMenuStr +=wPage(products_2)
   //leftMenuStr +=wPage(products_3)
   //leftMenuStr +=wPage(products_4)
   //leftMenuStr +=wPage(products_5)
   //leftMenuStr +=wPage(products_6)
   leftMenuStr +=wPage(products_7)
   leftMenuStr +=wPage(products_8)
   leftMenuStr +=wPage(products_9)
   leftMenuStr +=wPage(products_10)
   leftMenuStr +=wPage(products_11)
   leftMenuStr +="</SPAN><BR>"
}     
leftMenuStr +=wSect_sub(facts)
if(secLoc==10) {
   leftMenuStr +=""+ subMenuLeft +"<SPAN CLASS='navtext'>"
   leftMenuStr +=wPage(facts_1)
   leftMenuStr +=wPage(facts_2)
   leftMenuStr +=wPage(facts_3)
   leftMenuStr +="</SPAN><BR>"
}
leftMenuStr +=wSect_sub(resource)
if(secLoc==8) {
   leftMenuStr +=""+ subMenuLeft +"<SPAN CLASS='navtext'>"
   leftMenuStr +=wPage(resource_1)
   leftMenuStr +="</SPAN><BR>"
}
leftMenuStr +=wSect_sub(faq)
<!--leftMenuStr +=wSect_sub(user)-->

if (subscribe==true){
   leftMenuStr +="<BR><BR><BR><CENTER><A HREF='javascript:openSubscribe()'><!--<IMG SRC='"+ imgPath+"subscribe.gif' BORDER=0 ALT='Subscribe'>--></A></CENTER>"
 }

leftMenuStr +="</TD></TR></TABLE>"
//leftMenuStr +="</TD></TR>"
leftMenuStr +="</DIV>"
}


function createTopMenu(){
   //topMenuStr +="<TD ALIGN=right HEIGHT=28 background='" + imgPath +"sub_top_bg.jpg' WIDTH=2222>"
   topMenuStr +="<TD ALIGN=right HEIGHT=28 bgcolor=#cc0000 WIDTH=2222>"
   topMenuStr +="<a name='top'></a><img src='"
   topMenuStr +=imgPath+"empty.gif' width=200 height=28 border=0><A href='"
   topMenuStr +=rootPath+"contact/contact.shtml' onMouseOver=\"onIt('sub_top_contact')\" onMouseOut=\"offIt('sub_top_contact')\"><img src='"
   topMenuStr +=imgPath+"sub_top_contact_off.gif' width=90 height=28 border=0 alt='Contact Us' name='sub_top_contact'></A><A href='"
   topMenuStr +=rootPath+"sitemap/sitemap.shtml' onMouseOver=\"onIt('sub_top_sitemap')\" onMouseOut=\"offIt('sub_top_sitemap')\"><img src='"
   topMenuStr +=imgPath+"sub_top_sitemap_off.gif' width='74' height='28' border='0'  alt='Site Map'  name='sub_top_sitemap'></A><img src='"
   topMenuStr +=imgPath+"sub_top_search.gif' width=58 height=28 border=0 alt='Search'>"  
   topMenuStr +="</TD>"
   topMenuStr +="<FORM NAME='fmSearch' ACTION='"+rootPath +"search/search.cgi' METHOD=get>"
   topMenuStr +="<TD BGCOLOR='#cc0000' HEIGHT=28 ALIGN=right WIDTH=50><INPUT " 
   topMenuStr +="NAME='query' VALUE='' CLASS='input' SIZE='10' MAXLENGTH='30'></TD></FORM>"
   topMenuStr +="<TD WIDTH='24' HEIGHT=28 BGCOLOR='#cc0000' A0LIGN=right><A HREF='"
   topMenuStr +="javascript:document.fmSearch.submit()' "
   topMenuStr +="onMouseOver=\"onIt('sub_top_go')\" onMouseOut=\"offIt('sub_top_go')\"><img src='"
   topMenuStr +=imgPath+"sub_top_go_off.gif' width=24 height=28 border=0 alt='Go' name='sub_top_go'></A><BR></TD>" 
   topMenuStr +="</FORM>"      
}

function createFooter(){
   footerStr +="<BR><BR><BR CLEAR=ALL><TABLE CELLSPACING=0 CELLPADDING=4 BORDER=0><TR><TD WIDTH=16 ROWSPAN=5>&nbsp;</TD><TD>"
   footerStr +="<A HREF='"+ rootPath +"index.shtml' CLASS='footerNav'>Home</A>&nbsp;&nbsp;|&nbsp;&nbsp;"
   footerStr +="<A HREF='"+ rootPath +"news/index.html' CLASS='footerNav'>News & Events</A>&nbsp;&nbsp;|&nbsp;&nbsp;"
   footerStr +="<A HREF='"+ rootPath +"about/index.shtml' CLASS='footerNav'>About Us</A>&nbsp;&nbsp;|&nbsp;&nbsp;"
   footerStr +="<A HREF='"+ rootPath +"resource/index.shtml' CLASS='footerNav'>EH&S Resource Center</A>&nbsp;&nbsp;|&nbsp;&nbsp;"
   footerStr +="<A HREF='"+ rootPath +"products/index.shtml' CLASS='footerNav'>FacTS™ </A>&nbsp;|<br>"
   footerStr +="<A HREF='"+ rootPath +"whyFacTS/index.shtml' CLASS='footerNav'>Why FacTS™ ?</A>&nbsp;&nbsp;|&nbsp;&nbsp;"
   footerStr +="<A HREF='"+ rootPath +"maritime/index.html' CLASS='footerNav'>Maritime Compliance</A>&nbsp;&nbsp;|&nbsp;&nbsp;"
   footerStr +="<A HREF='"+ rootPath +"sitemap/sitemap.shtml' CLASS='footerNav'>Site Map</A>&nbsp;&nbsp;|&nbsp;&nbsp;"
   footerStr +="<A HREF='"+ rootPath +"faq/faq.shtml' CLASS='footerNav'>FAQs</A>&nbsp;&nbsp;|&nbsp;&nbsp;"
   footerStr +="<A HREF='"+ rootPath +"privacy/privacy.shtml' CLASS='footerNav'>Privacy/Legal</A>&nbsp;&nbsp;|&nbsp;&nbsp;"
   footerStr +="<A HREF='"+ rootPath +"contact/contact.shtml' CLASS='footerNav'>Contact Us</A>&nbsp;&nbsp;|&nbsp;&nbsp;"

   footerStr +="</TD></TR>"
   footerStr +="<TR><TD><FONT CLASS='copyright'>"
   footerStr +="Copyright &copy; 2010 Quantum Compliance Systems, Inc.<BR>"
   footerStr +="FacTS<SPAN CLASS='trademark'>TM</SPAN> is a trademark of Quantum Compliance Systems, Inc.</FONT></TD></TR></TABLE><BR><BR>"
}

function openSubscribe(){var subscribeWin=window.open(rootPath+"contact/subscribe.html", "subscribeWin","width=360,height=380")}

createLeftMenu();
createTopMenu();
createHomeMenu();
createFooter();

