MenuJsExist='YES';
thisDiv='@';
var hh=document.getElementsByTagName('head');
if (hh) {
   var pLink=document.createTextNode('<LINK REL="SHORTCUT ICON" HREF="/favicon.ico">');
   hh[0].appendChild(pLink);
}
var script = document.createElement('script'); 
script.type = 'text/javascript'; 
var cP ='';
var string  = self.location.href.split( "/" );
for ( var i =3; i < ( string.length-1 ); i++ )  cP=cP+'../'; 
if (!(window.m)) {
    m=new Array();  m[0] = new Array();    m[0][0]= ['home', 'Home', 'index.html','Home Page'];
    nArray=1;    cP = '';
}

winW = getMenuW();

if (!(window.menuOffset)) {  menuOffset=10; }
menuWordCnt =0;
delay_hide=1000;
cBgColor="#8db924";
var divMenuTop =148;
//0;
//if (window.LogoH) {
   //document.write('<div id="divMenu" style="position:absolute; top:'+(LogoH-13)+'; left:0; z-index:84;">');
//} else {
   //document.write('<div id="divMenu" style="position:absolute; top:'+divMenuTop+'; left:0; z-index:84;">');
   document.write('<div id="divMenu" class="noPrint" style="position:absolute; top:'+divMenuTop+'; left:0; z-index:84;width:100%;">');
//}
SayMenu();
document.write('</Div>');
cNav="ie";  
var f=document.getElementById('divMenu');
var e=document.getElementById('msgMarquee');
if (e) { eMenuTop= parseInt(f.style.top);   e.style.top= eMenuTop + f.offsetHeight; }

function getMenuTop() {
   var e = document.getElementById("divMenu");   
  // if (e) { return parseInt(e.offsetTop); } else { return divMenuTop; }
  if (e) { return parseInt(e.style.Top); } else { return divMenuTop; }
}
function getMenuW() {
   if (parseInt(navigator.appVersion)>3) {
     if (navigator.appName=="Netscape") {  return window.innerWidth-20; cNav="netscaps";}
     if (navigator.appName.indexOf("Microsoft")!=-1) { return document.body.offsetWidth-25; cNav="ie"; }
   } else return 600;
}
function SayMenu() {
   for ( var i =0; i < ( m.length ); i++ ) {  menuWordCnt = menuWordCnt +m[i][0][1].length; }
   //alert(m[0][0][1]);
   nWidth1 = Math.floor( (winW/2 -menuOffset) / (m.length)) ;
   nChr = Math.floor( (winW -menuOffset)/ (menuWordCnt +m.length) );
   
   

document.write("<TABLE border=0 width='100%' ><tr>");
document.write('<table width="100%" border="0" cellpadding="0" cellspacing="0" align="center">');
document.write('<tr height="1"><td height=1 width=5%></td> <td height=1 width=43%></td> <td height=1 width=5%></td> <td height=1 width=42%></td>  <td height=1 width=5%></td></tr>');
document.write('<tr>');
document.write('<td>&nbsp;</td>');
document.write('<td colspan="3"><table width="800" border="0" align="center" cellpadding="0" cellspacing="0">');
document.write('<tr>');
document.write('<td bgColor="'+cBgColor +'">');

document.write("<TABLE border=0 width='50%'><tr>");
document.write('<TABLE border=0 width="50%" cellpadding='+1 );
document.write('<TR bgColor="'+cBgColor +'">');
   var submenu=new Array();
   var totalWidth=0;
   for (i=0; i<m.length; i++) {
      cOnClick='';
      cTitle='';
      nWidth = nChr *m[i][0][1].length; 
      totalWidth = totalWidth +nWidth;
     // document.write('<Td class="menufont" nowrap="nowrap" align="center" width="'+nWidth +'"');
      
	  
	  document.write('<Td class="menufont" nowrap="nowrap" align="left"');
	  
      if (m[i][0][3]!='') { document.write('id="'+m[i][0][0]+'TD" TITLE=' +"'"+m[i][0][3]+"' ");   }
      if (m[i].length>1) {
          document.write(' onMouseover="showit(\'' +m[i][0][0] +'Div\'); bgColor=\'#CCFF66\';" onMouseout="hideit(); bgColor=\'\';" ');
      } else {    
          document.write(' onMouseover="bgColor=\'efa021\'"  onMouseout="bgColor=\'\';" ');
      }   
      if  (m[i][0][2]!='') {
         document.write(' onclick="hideit(); javascript:self.location=' +"'" +cP+m[i][0][2] +"'" +'"; ');
      } 
      //document.write(' style="cursor: pointer; font-family: Arial; font-size: 8pt"');
	  document.write(' style="cursor: pointer;"');
      document.write('">');
//      if ( location.href.indexOf(m[i][0][2]) == -1 ) {
          document.write('<span class="menufont">'+m[i][0][1] +'</font></span>');
//      } else {
//          document.write('<font size="1" face="Arial" color="gray">'+m[i][0][1] +'</font>');
//      }      
      document.write('</Td>');




      //Set SubMenu contents. 
      if (m[i].length>1) {
         nSubMenuWidth =150;
         nSubMenuWordWidth = 10;
         
         for (j=1; j<m[i].length; j++) { if (m[i][j][1].length >nSubMenuWordWidth) nSubMenuWordWidth =m[i][j][1].length; }
         nSubMenuWidth = 8* nSubMenuWordWidth;
         document.write('<div class="menu" id="'+m[i][0][0] +'Div" width="'+nSubMenuWidth +' " ');
         document.write(' onMouseout="hideit(); bgColor=\'\';" onMouseover="onSubMenu(\'' +m[i][0][0] +'Div\',\''+m[i][0][0]+'\'); bgColor=\'\';" ');
         document.write(' style="position:absolute; top:25; left:'+((winW/m.length)*i)+'; display:none;" >');
         //document.write(' style="position:absolute; top:25; left:'+((winW/m.length)*i)+'; display:none;" >');
         document.write('<OL class="menuLI"  style="list-style-type: none; background-Color:#003466; cursor:pointer; ');
         document.write(   ' margin: 0; padding: 3px 6px;  line-height: 1.5em; width:'+nSubMenuWidth+'; " >');
         for (j=1; j<m[i].length; j++) {
            if (m[i][j].length>1) {
               document.write(' <LI id="'+m[i][j][0] +'" TITLE="'+m[i][j][3]+'" width="'+nSubMenuWidth +' " ');
               document.write(' onMouseOver="this.style.background=\'#003399\'"  onMouseOut="this.style.background=\'#003466\'" ');
               if (m[i][j][2]!='') {
                 document.write(' onclick=\'self.location="' +cP+m[i][j][2] +'"\' ');
/*                   if (m[i][j][2].indexOf('login')!=-1) {
                    document.write(' onclick=\'self.location="http://'+self.location.hostname+'/'+m[i][j][2] +'"\' ');
				   } else {
                     document.write(' onclick=\'self.location="'+self.location.protocol+'//'+self.location.hostname+'/'+m[i][j][2] +'"\' '); 
				   }
*/
}
               document.write( '>' +m[i][j][1]+'</LI>');
            }
         }
         document.write('</OL>');
         document.write('</DIV>');
      }   //end of SubMenu 
                  
   } 
   
   document.write('</TR>');
   document.write('</TABLE></td></tr></table>');



document.write('</td>');
document.write('</tr>');
document.write('</table></td>');
document.write('<td>&nbsp;</td>');
document.write('</tr>');
document.write('</table>');
   
   
   
   
}
function resizeMenu() {
    winW = getMenuW();
    for (i=0; i<m.length; i++) {
       tdDIV = document.getElementById(m[i][0][0] +'TD');    
       if( tdDIV ) { tdDIV.innerHTML=m[i][0][1] }
       if (m[i].length>1) {
             cDiv = m[i][0][0] +'Div';    
             if( document.getElementById ) { 
                if( document.getElementById(cDiv) ) { 
                  document.getElementById(cDiv).style.left=((winW/m.length)*i); 
                }
             }
             if( document.all ) {    document.all[cDiv].style.left=((winW/m.length)*i); }
             if( document.layers ) { document.layers[cDiv].style.left=((winW/m.length)*i); }
             if( document[cDiv] ) {  document[cDiv].style.left=((winW/m.length)*i); }
       }
    }
}
function hideit(){
  delayhide=setTimeout("clearDiv()",delay_hide);   
}
function showit(which,cSel){
   if (thisDiv != which ) {
      thisDiv = which;
      clearDiv();
   } else {
      clearTimeout(delayhide);
   //   delayhide=setTimeout("clearDiv()",delay_hide);   
   }
   e = getRef( cSel);
   if (e) e.selectedIndex =0;
   e = getRef( which);
// alert(getRef('aboutus').options.length);
   if (e) e.style.display='block';
}
function onSubMenu() {
   clearTimeout(delayhide);
   //delayhide=setTimeout("clearDiv()",delay_hide);   
}
function clearDiv() {
   var x = document.getElementsByTagName('DIV');
   for (var i=0;i<x.length;i++) { 
      //alert(x[i].id +' - - '+x[i].className);
      if (x[i].className == 'menu') {
          x[i].style.display = 'none'; 
      }
   } 
}
