// window.onerror = null;
var DOM = (document.getElementById)?true:false;
var NS4 = (navigator.appName == "Netscape" && parseInt(navigator.appVersion) >= 4 && !DOM);
var IE4 = (navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion) >= 4);
var layerType = NS4?'layer':'div';
var menuOn = 0;
var layerOn = null, mainRef;
var mainIndex, subIndex;
var windowWidth, allCatWidth, railWidth, mLeft, mTop, mWidth, mHeight, dl, dw, isSubcat=false, currentSub, w, l, currentTop, imgReady=false, pressed=false;
var menuTimer, animateTimer = null;
var layerText, styleText, leftText, topText, widthText, heightText, imageText, appVer=navigator.appVersion; 
var rtimer;


if(navigator.appName == "Netscape")
{
  layerText="document.layers";
  styleText="";
  leftText='.left';
  topText='.top';
  widthText='.clip.width';
  heightText='.clip.height';
  imageText='.images';
  windowWidth = window.innerWidth - 16;

  if(navigator.userAgent.indexOf("Firefox") != -1)
      heightAdj=heightAdj+12;
}
else
{
  layerText="document.all";
  styleText=".style";
  leftText='.pixelLeft';
  topText='.pixelTop';
  widthText='.width';
  heightText='.height';
  imageText='.images';
  windowWidth = document.body.clientWidth;
  if(parseFloat(appVer.substr(appVer.indexOf("MSIE ")+5, 5))>=5)
    windowWidth = windowWidth-16;
}


function dropMenu(rowNumber, layerNumber)
{
  var j;
  
  if(mHeight<18)
    {
      if(DOM)
	document.getElementById('ddd'+rowNumber).style.height=(mHeight+=3);
      else
	eval(layerText+'["ddd'+rowNumber+'"]'+styleText+heightText+'='+(mHeight+=3));
      animateTimer=setTimeout('dropMenu('+rowNumber+','+layerNumber+')', 50);
    }
  else if(mLeft>0 && mWidth<railWidth)
    {
      mLeft = Math.max(0, Math.round(mLeft+dl));
      mWidth = Math.min(railWidth, Math.round(mWidth+dw));
      
      if(DOM)
	{
	  document.getElementById('ddd'+rowNumber).style.left=mLeft;
	  document.getElementById('ddd'+rowNumber).style.width=mWidth;
	}
      else
	{
	  eval(layerText+'["ddd'+rowNumber+'"]'+styleText+leftText+'='+mLeft);
	  eval(layerText+'["ddd'+rowNumber+'"]'+styleText+widthText+'='+mWidth);
	}
      
      animateTimer=setTimeout('dropMenu('+rowNumber+','+layerNumber+')', 50);
    }
  else 
    {
      if(rowNumber!=0)
	{
	  if(DOM)
	    document.getElementById('sub'+layerNumber+rowNumber).style.visibility='visible';
	  else if(IE4)
	    eval(layerText+'["'+'sub'+layerNumber+rowNumber+'"]'+styleText+'.visibility="visible"');
	  else if(NS4)
	    for(j=eval('sub'+layerNumber+'.rowStart['+rowNumber+']'); j<eval('sub'+layerNumber+'.rowStart['+(rowNumber+1)+']'); j++)
	      eval(layerText+'["'+'sub'+layerNumber+j+'"]'+styleText+'.visibility="visible"');
	}

      rowNumber++;
      
      if(eval('sub'+layerNumber+'.rows')>=rowNumber)
	{
	  mWidth = w;
	  mHeight = 3;
	  mLeft = l-5;
	  
	  if(DOM)
	    {
	      document.getElementById('ddd'+rowNumber).style.left=mLeft;
	      document.getElementById('ddd'+rowNumber).style.width=mWidth;
	      document.getElementById('ddd'+rowNumber).style.height=mHeight;
	      document.getElementById('ddd'+rowNumber).style.visibility='visible';
	    }
	  else
	    {
	      eval(layerText+'["ddd'+rowNumber+'"]'+styleText+leftText+'='+mLeft);
	      eval(layerText+'["ddd'+rowNumber+'"]'+styleText+widthText+'='+mWidth);
	      eval(layerText+'["ddd'+rowNumber+'"]'+styleText+heightText+'='+mHeight);
	      eval(layerText+'["ddd'+rowNumber+'"]'+styleText+'.visibility="visible"');
	    }
	  
	  animateTimer=setTimeout('dropMenu('+rowNumber+','+layerNumber+')', 0);
	}
    }
}

function displayMenu(layerNumber, src)
{
  var i;

  if(menuTimer!=null)
    { 
      clearTimeout(menuTimer);
      
      if(layerOn!=layerNumber)
	hideMenu(layerOn);
    }
 
  if(animateTimer!=null && layerOn!=layerNumber)
    clearTimeout(animateTimer);
  
  if(!pressed)
    {
      mainIndex=layerNumber;
      subIndex=-1;
    }  

  if(imgReady)
    {
      if(DOM || IE4)
	{
	  if(layerNumber=='0')
	    document["HH"].src=al2.src;
	  else
	    eval('document["RR'+(parseInt(layerNumber)-1)+'"].src="'+al2.src+'"');
 
	  eval('document["LL'+layerNumber+'"].src="'+al1.src+'"');
	  eval('document["RR'+layerNumber+'"].src="'+ar1.src+'"');
	  
	  if(parseInt(layerNumber)==(main.length-1))
	    document["TT"].src=ar2.src;
	  else
	    eval('document["LL'+(parseInt(layerNumber)+1)+'"].src="'+ar2.src+'"');
	}
      else
	{
	  if(layerNumber=='0')	  
	    eval(layerText+'["'+'main'+layerNumber+'"]'+'.document'+imageText+'["HH"].src="'+al2.src+'"');
	  else
	    eval(layerText+'["'+'main'+(parseInt(layerNumber)-1)+'"]'+'.document'+imageText+'["RR"].src="'+al2.src+'"');
	  
	  eval(layerText+'["'+'main'+layerNumber+'"]'+'.document'+imageText+'["LL"].src="'+al1.src+'"');
	  eval(layerText+'["'+'main'+layerNumber+'"]'+'.document'+imageText+'["RR"].src="'+ar1.src+'"');
	  
	  if(parseInt(layerNumber)==(main.length-1))
	    eval(layerText+'["'+'main'+layerNumber+'"]'+'.document'+imageText+'["TT"].src="'+ar2.src+'"');
	  else
	    eval(layerText+'["'+'main'+(parseInt(layerNumber)+1)+'"]'+'.document'+imageText+'["LL"].src="'+ar2.src+'"');
	}
    }
  
  if(DOM)
    document.getElementById('main'+layerNumber).style.backgroundColor=color[0];
  else if(NS4)
    eval(layerText+'["'+'main'+layerNumber+'"]'+'.document.bgColor="'+color[0]+'"');
  else if(IE4)
    eval(layerText+'["'+'main'+layerNumber+'"]'+'.style.backgroundColor="'+color[0]+'"');
  
  if(eval('main['+layerNumber+'].sub==1') && main[parseInt(layerNumber)].status!='on')
    {
      w = main[parseInt(layerNumber)].width;
      l = main[parseInt(layerNumber)].location;
      dl = -l/5;
      dw = (railWidth-w)/5;
      mHeight = 100;
      mLeft = -100;
      
      dropMenu(0, layerNumber);
    }
  
  layerOn = layerNumber;
  main[parseInt(layerNumber)].status = 'on';
}

function hideMenu(layerNumber)
{
  var i;

  if(animateTimer!=null)
    clearTimeout(animateTimer);

  if(menuOn == 0)
    {
      if(imgReady)
	{
	  if(IE4 || DOM)
	    {
	      if(layerNumber=='0')
		document["HH"].src=ir.src;
	      else
		eval('document["RR'+(parseInt(layerNumber)-1)+'"].src="'+ir.src+'"');
	      
	      eval('document["LL'+layerNumber+'"].src="'+il.src+'"');
	      eval('document["RR'+layerNumber+'"].src="'+ir.src+'"');
	      
	      if(parseInt(layerNumber)==(main.length-1))
		document["TT"].src=il.src;
	      else
		eval('document["LL'+(parseInt(layerNumber)+1)+'"].src="'+il.src+'"');
	    }
	  else
	    {
	      if(layerNumber=='0')	  
		eval(layerText+'["'+'main'+layerNumber+'"]'+'.document'+imageText+'["HH"].src="'+ir.src+'"');
	      else
		eval(layerText+'["'+'main'+(parseInt(layerNumber)-1)+'"]'+'.document'+imageText+'["RR"].src="'+ir.src+'"');
	      
	      eval(layerText+'["'+'main'+layerNumber+'"]'+'.document'+imageText+'["LL"].src="'+il.src+'"');
	      eval(layerText+'["'+'main'+layerNumber+'"]'+'.document'+imageText+'["RR"].src="'+ir.src+'"');
	      
	      if(parseInt(layerNumber)==(main.length-1))
		eval(layerText+'["'+'main'+layerNumber+'"]'+'.document'+imageText+'["TT"].src="'+il.src+'"');
	      else
		eval(layerText+'["'+'main'+(parseInt(layerNumber)+1)+'"]'+'.document'+imageText+'["LL"].src="'+il.src+'"');
	    }
	}

      if(DOM)
	document.getElementById('main'+layerNumber).style.backgroundColor=color[1];
      else if(NS4)
	eval(layerText+'["'+'main'+layerNumber+'"]'+'.document.bgColor="'+color[1]+'"');
      else if(IE4)
	eval(layerText+'["'+'main'+layerNumber+'"]'+'.style.backgroundColor="'+color[1]+'"'); 
      	 	
      if(eval('main['+layerNumber+'].sub==1'))
	{
	  if(DOM)
	    for(i=1; i<=eval('sub'+layerNumber+'.rows'); i++)
	      document.getElementById('sub'+layerNumber+i).style.visibility='hidden';
	  else if(NS4)
	    for(i=0; i<eval('sub'+layerNumber+'.length'); i++)
	      eval(layerText+'["'+'sub'+layerNumber+i+'"]'+styleText+'.visibility="hidden"');
	  else if(IE4)
	    for(i=1; i<=eval('sub'+layerNumber+'.rows'); i++)
	      eval(layerText+'["'+'sub'+layerNumber+i+'"]'+styleText+'.visibility="hidden"');
	  
	  for(i=1; i<=eval('sub'+layerNumber+'.rows'); i++)
	    if(DOM)
	      document.getElementById('ddd'+i).style.visibility='hidden';
	    else
	      eval(layerText+'["ddd'+i+'"]'+styleText+'.visibility="hidden"');

	  main[parseInt(layerNumber)].status = 'off';
	}
    }
}

function setMenuTimer()
{
  menuTimer = setTimeout("menuTimerOut()", 1000);
}

function menuTimerOut()
{    
  if (menuOn == 0)
    hideMenu(layerOn);
}
  
function subMenuIn(main, sub, src)
{
  if(menuTimer!=null)
    clearTimeout(menuTimer);

  menuOn = 1;
  
  if(main!=null && src!=null)
    {
      if(NS4)
	eval(layerText+'["'+'sub'+main+sub+'"]'+'.document.bgColor="blue"');
      else 
	src.bgColor='blue';
    }
  
  if(main!=null && !pressed)
    {
      mainIndex=main;
      subIndex=sub;
    }
}

function subMenuOut(main, sub, src) 
{
  menuOn = 0;	
  
  if(main!=null && src!=null)
    {
      if(NS4)
	eval(layerText+'["'+'sub'+main+sub+'"]'+'.document.bgColor="'+color[0]+'"');
      else
	src.bgColor=''+color[0]+'';
    }

  menuTimer = setTimeout("hideMenu(layerOn)", 1000);
}



function getImg() 
{  
  if(document.images) 
    { 
      ar1 = new Image();
      ar1.src = idomain+'/c10/'+color[0].substr(1, 6)+'ar1.gif';
      ar2 = new Image();
      ar2.src = idomain+'/c10/'+color[0].substr(1, 6)+'ar2.gif';
      al1 = new Image();
      al1.src = idomain+'/c10/'+color[0].substr(1, 6)+'al1.gif';
      al2 = new Image();
      al2.src = idomain+'/c10/'+color[0].substr(1, 6)+'al2.gif';

      ir = new Image();
      ir.src = idomain+'/c10/'+color[0].substr(1, 6)+'ir.gif';
      il = new Image();
      il.src = idomain+'/c10/'+color[0].substr(1, 6)+'il.gif';

      imgReady = true;
    }
}


function handleResize()
{
  clearTimeout(rtimer);
  rtimer=setTimeout('window.location=window.location;',500);
}



function getAllCatWidth(fo, obj)
{
  var result = 0.0;
  var c, code;
  var r, i, j;

  for(i=0; i<obj.length; i++)
    {
      r=0.0;
      for(j=0; j<obj[i].title.length; j++)
	{
	  c=obj[i].title.charAt(j);
	  code=obj[i].title.charCodeAt(j);
	  
	  if(fo==10)
	    {  
	      if(c=='f' || c=='i' || c=='j' || c=='l' || c=='t' || c=='I')
		r+=.5;
	      else if(c=='r')
		r+=.62;
	      else if(c=='s')
		r+=.75;
	      else if(c=='c' || c=='k' || c=='v' || c=='y' || c=='z' || c=='J' || c=='Z' || (code>=48 && code<=57))
		r+=.88;
	      else if(c=='A' || c=='B' || c=='C' || c=='D' || c=='H' || c=='K' || c=='N' || c=='P' || c=='R' || c=='S' || c=='U' || c=='V' || c=='X')
		r+=1.125;
	      else if(c=='G' || c=='O' || c=='Q')
		r+=1.25;
	      else if(c=='w' || c=='M')
		r+=1.37;
	      else if(c=='m')
		r+=1.5;
	      else
		r+=1;
	    }
	  else
	    {
	      if(c=='i' || c=='j' || c=='l' || c=='I')
		r+=.43;
	      else if(c=='f' || c=='t')
		r+=.57;
	      else if(c=='r')
		r+=.72;
	      else if(c=='w' || c=='y' || c=='F')
		r+=.86;
	      else if(c=='A' || c=='B' || c=='C' || c=='D' || c=='G' || c=='H' || c=='K' || c=='N' || c=='P' || c=='R' || c=='S' || c=='U' || c=='V' || c=='X')
		r+=1.15;
	      else if(c=='O' || c=='Q')
		r+=1.3;
	      else if(c=='w' || c=='M')
		r+=1.45;
	      else if(c=='m')
		r+=1.58;
	      else
		r+=1;
	    }

	  if(c=='&' && obj[i].title.charAt(j+1)=='q' && obj[i].title.charAt(j+2)=='u' &&  obj[i].title.charAt(j+3)=='o' &&  obj[i].title.charAt(j+4)=='t' &&  obj[i].title.charAt(j+5)==';')
	    j=j+5;
	}
      
      if(fo==10)
	r=r*8.03;
      else
	r=r*6.9;
     
      obj[i].width=Math.round(r)+13+10;
      result=result+Math.round(r)+13+10;

      if(isSubcat)
	{	  
	  if((obj.rowWidth[obj.rows]+obj[i].width)<railWidth)
	    obj.rowWidth[obj.rows]+=obj[i].width;
	  else
	    {
	      obj.rows++;
	      obj.rowStart[obj.rows]=i;
	      obj.rowWidth[obj.rows]+=obj[i].width;
	    }
	}      
    } 

  return result;
}


function getCatLocation()
{
  var i, cur;

  var cur = Math.round((railWidth-allCatWidth)/2);
  
  for(i=0; i<main.length; i++)
    {
      main[i].location=cur;
      cur=cur+main[i].width;
    }
}


function getSubcatLocation(sub, mainCenter)
{
  var i;
  
  for(i=1; i<=sub.rows; i++)
    {
      sub.location[i]=Math.max(2, mainCenter - (sub.rowWidth[i]/2));
      sub.location[i]=Math.min(sub.location[i], railWidth - sub.rowWidth[i]);
    }
}


function isIE4() { return( navigator.appName.indexOf("Microsoft") != -1 && (navigator.appVersion.charAt(0)=='4') ); }
function openMail(host) { var mailwindow = window.open("http://" + host +"/.sc/ms/em", "EmailFriend", "width=500,height=400,resizable,scrollbars,status"); if(!isIE4()) mailwindow.focus(); }

allCatWidth = getAllCatWidth(10, main);

railWidth = Math.max(610, allCatWidth+16);
railWidth = Math.max(railWidth, windowWidth);

getCatLocation();

for(i=0; i<main.length; i++)
{
  isSubcat=true;
  if(main[i].sub==1)
    {
      currentSub=eval('sub'+i);
      currentSub.rows=1;
      currentSub.rowStart=new Array();
      currentSub.rowStart[1]=0;
      currentSub.rowStart[2]=currentSub.length;
      currentSub.rowStart[3]=currentSub.length;
      currentSub.rowStart[4]=currentSub.length;
      currentSub.rowStart[5]=currentSub.length;
      currentSub.rowWidth=new Array();
      currentSub.rowWidth[1]=0;
      currentSub.rowWidth[2]=0;
      currentSub.rowWidth[3]=0;
      currentSub.rowWidth[4]=0;
      currentSub.location=new Array();
      getAllCatWidth(9, currentSub);
      getSubcatLocation(currentSub, main[i].location+(main[i].width/2));
    }
  isSubcat=false;
}

if(ot=='f')
{
  myTop[4].url=myTop[3].url+'/co3';
  myTop[4].title="My Account";
}

if(IE4)	
  sl=16;	
else if(DOM)
  sl=9;
else 	
  sl=11;	

if(priceMode=='2' || priceMode=='3')
  itemString='<td align=center width=20%><font class=bb8><b>Call '+phone+' to order</b></font></td>';
else
  itemString='<td align=right width=10%><a href='+myTop[2].url+'><img src='+idomain+'/ac/cart.gif width=23 height=20 border=0 align=absmiddle></a></td><td><a href='+myTop[2].url+' class=GB9>Items: '+items+'</a></td>';

document.writeln('<table cellpadding=0 cellspacing=0 border=0 width='+railWidth+'><tr><td width=160 bgcolor='+(color[0]=='#046087'?'#99c740':color[0])+' align=center><table cellpadding=0 cellspacing=0 border=0><tr><td height=39 class=login8><form method=get action='+sch+'>Product Search:<br><input class=searchbox type=text name=search size='+sl+' maxlength=50><input type=image src='+idomain+'/c10/'+color[0].substr(1, 6)+'go.gif width=33 height=24 value=go name=go border=0 align=absmiddle></td></form></tr></table></td><td width='+(railWidth-160)+' align=center valign=bottom><table cellpadding=0 cellspacing=0 border=0 width=100%% valign=bottom><tr><td bgcolor='+color[0]+' height=1 colspan=10><img src='+idomain+'/ac/b.gif width=1 height=1></td></tr>');

if(topHTML=="")
  document.writeln('<tr><td align=center width=16%><a class=GB9 href='+myTop[0].url+'>'+myTop[0].title+'</a></td><td align=center width=1%><img src='+idomain+'/c10/sep.gif width=1 height=12 name=mySep></td><td align=center width=16%><a class=GB9 href='+myTop[1].url+'>'+myTop[1].title+'</a></td><td align=center width=1%><img src='+idomain+'/c10/sep.gif width=1 height=12></td>'+itemString+'<td align=center width=1%><img src='+idomain+'/c10/sep.gif width=1 height=12></td><td align=center width=16%><a class=GB9 href='+myTop[3].url+'>'+myTop[3].title+'</a></td><td align=center width=1%><img src='+idomain+'/c10/sep.gif width=1 height=12></td><td align=center width=24%><a class=GB9 href='+myTop[4].url+'>'+myTop[4].title+'</a></td></tr>');
else
  document.writeln('<tr><td width=100% colspan=10>'+topHTML+'</td></tr>');

document.writeln('</table></td></tr><tr><td colspan=2 bgcolor='+color[0]+' height=1><img src='+idomain+'/ac/b.gif width=1 height=1></td></tr><tr><td colspan=2 height=18 bgcolor='+color[1]+'><img src='+idomain+'/ac/b.gif width=1 height=1></td></tr><tr><td colspan=2 height=1 bgcolor='+color[0]+'><img src='+idomain+'/ac/b.gif width=1 height=1></td></tr><tr><td colspan=2 height=18 bgcolor=white><img src='+idomain+'/ac/b.gif width=1 height=1></td></tr><tr><td colspan=2 height=1 bgcolor='+color[0]+'><img src='+idomain+'/ac/b.gif width=1 height=1></td></tr></table>');

for(i=0; i<main.length; i++)
{
  main[i].status = 'off';

  if(NS4)
    document.writeln('<layer id=main'+i+' Z-INDEX=5 width='+main[i].width+' top='+(108+logoHeight+heightAdj)+' left='+main[i].location+' onmouseover="displayMenu('+"'"+i+"'"+', this);" onmouseout=setMenuTimer();><table cellspacing=0 cellpadding=0 border=0 width='+main[i].width+' height=18>');
  else
    document.writeln('<div id=main'+i+' style="position: absolute; Z-INDEX : 5; width='+main[i].width+'; top: '+(108+logoHeight+heightAdj)+'; left: '+main[i].location+';"><table onmouseover="displayMenu('+"'"+i+"'"+', this);" onmouseout=setMenuTimer(); onclick=getDestination(null); cellspacing=0 cellpadding=0 border=0 width='+main[i].width+' height=18>'); 

  document.writeln('<tr><td>'+(i==0?'<img src='+idomain+'/c10/'+color[0].substr(1, 6)+'ir.gif width=5 height=18 border=0 name=HH>':'')+'<img src='+idomain+'/c10/'+color[0].substr(1, 6)+'il.gif width=5 height=18 border=0 name=LL'+((IE4 || DOM)?i:'')+'></td><td align=center nowrap><a class='+(color[0]=='#046087'?'head10W':'head10')+' href="'+menuBase+main[i].url+'">'+main[i].title+'</a></td><td align=right><img src='+idomain+'/c10/'+color[0].substr(1, 6)+'ir.gif width=5 height=18 border=0 name=RR'+((IE4||DOM)?i:'')+'>'+(i==(main.length-1)?'<img src='+idomain+'/c10/'+color[0].substr(1, 6)+'il.gif width=5 height=18 border=0 name=TT>':'')+'</td></tr></table></'+layerType+'>');
 
  if(IE4)
    eval(layerText+'["'+'main'+i+'"]'+styleText+'.cursor="hand"');
}

currentTop = 126+logoHeight+heightAdj;
for(i=1; i<=4; i++)
{  
  if(NS4)
    document.writeln('<layer id=ddd'+i+' Z-INDEX=3 top='+currentTop+' left=1 width=1 height=1 bgcolor='+color[0]+' visibility=hidden onmouseover="subMenuIn(null, null, null);" onmouseout="subMenuOut(null, null, null);"><img src='+idomain+'/ac/b.gif width=1 height=1></'+layerType+'>');
  else
    document.writeln('<div id=ddd'+i+' style="position: absolute; Z-INDEX: 3; background-color: '+color[0]+'; top: '+currentTop+'; left: 1; width: '+(railWidth-5)+'; height: 18; visibility: hidden;"><table cellspacing=0 cellpadding=0 border=0 width=100% height=100% onmouseover="subMenuIn(null, null, null);" onmouseout="subMenuOut(null, null, null);"><tr><td><img src='+idomain+'/ac/b.gif width=1 height=1></td></tr></table></'+layerType+'>');
  
  currentTop=currentTop+18;
}


for(i=0; i<main.length; i++)
{
  if(main[i].sub==1)
    {
      currentTop=126+logoHeight+heightAdj;

      currentSub=eval('sub'+i);
      
      for(r=1; r<=currentSub.rows; r++)
	{
	  currentLeft=currentSub.location[r];
	  
	  if(NS4)
	    {
	      for(j=currentSub.rowStart[r]; j<currentSub.rowStart[r+1]; j++)
		{	      
		  document.writeln('<layer id=sub'+i+j+' Z-INDEX=5 bgcolor='+color[0]+' width='+currentSub[j].width+' TOP='+currentTop+' LEFT='+currentLeft+' VISIBILITY=hidden onmouseover="subMenuIn('+"'"+i+"', '"+j+"', this)"+'" onmouseout="subMenuOut('+"'"+i+"'"+", '"+j+"', this)"+'"><table cellspacing=0 cellpadding=0 border=0 width='+currentSub[j].width+' height=17><tr><td height=17 align=center><a class=WB9NY href="'+menuBase+eval('sub'+i+'['+j+'].url')+'">&#149; '+eval('sub'+i+'['+j+'].title')+'</a></td></tr></table></'+layerType+'>');
		  currentLeft=currentLeft+currentSub[j].width;
		}
	    }
	  else
	    {
	      document.writeln('<div id=sub'+i+r+' style="position: absolute; Z-INDEX: 5; width='+currentSub.rowWidth[r]+'; TOP: '+currentTop+'; LEFT: '+currentLeft+'; VISIBILITY: hidden;"><table cellspacing=0 cellpadding=0 border=0 width='+currentSub.rowWidth[r]+' height=17><tr>');
	      
	      for(j=currentSub.rowStart[r]; j<currentSub.rowStart[r+1]; j++)	
		document.writeln('<td align=center bgcolor='+color[0]+' width='+currentSub[j].width+' onmouseover="subMenuIn('+"'"+i+"', '"+j+"', this)"+'" onmouseout="subMenuOut('+"'"+i+"'"+", '"+j+"', this)"+'" onclick=getDestination(null)><a class=WB9NY href="'+menuBase+eval('sub'+i+'['+j+'].url')+'">&#149; '+eval('sub'+i+'['+j+'].title')+'</a></td>');
	      
	      document.writeln('</tr></table></div>');
	      if(IE4) eval(layerText+'["'+'sub'+i+r+'"]'+styleText+'.cursor="hand"');
	    }
	  currentTop=currentTop+18;
	}
    }
}


if(NS4)
{
  for(i=0; i<eval(layerText+'.length'); i++)
    {
      eval(layerText+'['+i+'].captureEvents(Event.MOUSEUP)');
      eval(layerText+'['+i+'].onmouseup=getDestination');
    }
}

function getDestination(e)
{
  setTimeout("G2()", 180);
  pressed=true;
}

function G2()
{
  if(subIndex==-1)
    window.location=menuBase+main[parseInt(mainIndex)].url;
  else
    window.location=menuBase+eval('sub'+mainIndex+'['+subIndex+'].url');
}


document.writeln('<table cellpadding=0 cellspacing=0 border=0 width='+railWidth+'><tr><td width='+Math.round(railWidth*.2)+' bgcolor='+color[1]+'><img src='+idomain+'/ac/b.gif width='+Math.round(railWidth*.2)+' height=1></td><td width=1 bgcolor='+color[0]+'><img src='+idomain+'/ac/b.gif width=1 height=1></td><td width=3><img src='+idomain+'/ac/b.gif width=3 height=1></td><td width='+Math.round(railWidth*.8-4)+'><img src='+idomain+'/ac/b.gif width='+Math.round(railWidth*.8-4)+' height=1></td></tr>');
































