/* ------------------------------------------------------------------------------------------------ */
/* All intellectual property rights relating to this code are owned by EURO RSCG DSW Partners, LLC. */
/* ------------------------------------------------------------------------------------------------ */
/* ver 09.22.00 */

// central washington top nav
//******* Rollover Functions ********//

function imageGroup() 
{
	var a,j,args=arguments; 
	this.total=this.cached=this.rollovers=0; 
	this.names=new Array(0); 
	this.urls=new Array(0); 
	this.count=new Array(0); 
	this.doubles=0; 
	this.widths=new Array(0); 
	this.heights=new Array(0); 
	this.i=new Object(); 
	this.index=cacheArray.length; 
	cacheArray[this.index]=this; 
	this.add=d_addImages; 
	a=new Array(0); 
	for(j=0; j<args.length; j++)
	{
		a[j]=args[j]; 
	}
	
	
	this.add(1,a);
}

function d_addImages(n,a2)
{
	var k,a,i,args=(n==1)?a2:arguments; 
	
	for(i=0; i<args.length; i++)
	{
		a=args[i].split('|'); 
		k=i+this.total; 
		this.names[k]=a[0]; 
		this.urls[k]=a[1]; 
		if((a[1].charAt(0)!='/')&&(a[1].indexOf('http:')==-1))
			this.urls[k]='/images/nav/'+a[1];
		this.widths[k]=a[2]; 
		this.heights[k]=a[3]; 
	} 
	
	this.total+=args.length; 
}

function d_loadImages() 
{
	if(document.images)
	{
		var j,c=cacheArray; 
		
		for(j=0; j<c.length; j++)
		{
			d_loadGroup(c[j]);
		} 
	}
}

function d_loadGroup(obj,pre) 
{
	if(!obj.loaded)
	{
		obj.loaded=1; 
		var k; 
		for(k=0; k<obj.total; k++)
		{
			d_loadImg(obj,k); 
		} 
		
		if(isNS) d_cacheGroup(obj,pre);
	}
}

function d_cacheGroup(obj,pre) 
{
	var k,stuff=''; 
	
	for(k=0; k<obj.total; k++)
	{
		stuff+='<IMG SRC="'+ obj.urls[k] +'" BORDER="0"' + ((obj.widths[k])?' WIDTH="'+obj.widths[k]+'"':'') + ((obj.heights[k])?' HEIGHT="'+obj.heights[k]+'"':'') + ' ONLOAD="d_countImg('+obj.index+','+k+');"><BR>'; 
	} 
	if(pre)
	{
		//alert(pre);
		document.newLayer('cacher'+obj.index,stuff,10,0); 
	}
	else
	{
		var cacher=new Layer(0),c=cacher.document; 
		c.write(stuff); 
		c.close(); 
	} 
}

function d_loadImg(obj,n) 
{
	var img=obj.i[obj.names[n]]=new Image(); 
	if(!isNS)
	{
		img.group=obj.index; 
		img.num=n; 
		img.onload=d_countImg;
	}
	img.src=obj.urls[n]; 
}

function d_countImg(n,k) 
{
	if(n==null)
	{
		n=this.group; 
		k=this.num;
	}

	var obj=cacheArray[n]; 
	if(obj.count[k]!=1)
	{
		obj.count[k]=1; 
		obj.cached++; 
		if(obj.cached==obj.total)
		{
			obj.rollovers=1; 
			if(obj.onload)
				eval(obj.onload);
		}
	}
	else
		obj.doubles++; 
}

function d_swapImg(obj,who,n) 
{
	var img=document[who+'_bttn'];
	if((obj.rollovers)&&(img))
	{
		img.src = obj.i[who+((n)?'_on':'_off')].src;
	}
}

function d_navBullet(lev,who,n) 
{
	
	var t=(isIE)?window:layers['menuLayer'+lev],img=t.document.images[who]; 
	
	if(img)
		img.src=boxPics.i['navbullet_'+((n==1)?'on':'off')].src;
}

//******* End Rollover Functions ********//


document.js = true; 
var navReady=0; 
var cnavReady=0;

var isNS=(document.layers)?1:0; 
var isIE=(document.all)?1:0;

var cacheArray=new Array(0);

if(document.images)
navPics = new imageGroup('aboutus_on|/images/home/cwh_aboutus_base.gif','aboutus_off|/images/home/cwh_aboutus_base.gif','plat_on|nav_plat_on.gif','plat_off|nav_plat_off.gif','soft_on|nav_soft_on.gif','soft_off|nav_soft_off.gif','tech_on|nav_tech_on.gif','tech_off|nav_tech_off.gif');

if(isNS||isIE)
{

	xmargin = (isIE)? 10:8; var ymargin = (isIE)? 15:8;
	d_hidden = (isIE)? 'hidden':'hide'; d_visible = (isIE)? 'visible':'show';

	currentNav=new Array(0);

	d_mouseY=0; nsFix=0;

	d_navTimer=setTimeout("null",10);
	d_moveNavTimer = setInterval('null',1); 
	clearInterval(d_moveNavTimer);
	d_popupTimer = setTimeout("null",10);

	d_navtabletop = '<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0"><TR><TD WIDTH="1" ROWSPAN="3" BGCOLOR="#FF9900">'+spacer()+'</TD><TD BGCOLOR="#FF9900">'+spacer()+'</TD><TD WIDTH="7" ROWSPAN="2" COLSPAN="3">'+IMG('/images/nav/navtopright1.gif',7,7)+'</TD></TR><TR><TD BGCOLOR="#CCCC99">'+spacer(1,6)+'</TD></TR><TR><TD BGCOLOR="#CCCC99">';
	d_navtablebot = '</TD><TD WIDTH="5" BGCOLOR="#CCCC99">'+spacer(5,1)+'</TD><TD WIDTH="1" BGCOLOR="#CCCC99">'+spacer()+'</TD><TD WIDTH="1" BGCOLOR="#FF9900">'+spacer()+'</TD></TR><TR><TD WIDTH="1" ROWSPAN="3">'+IMG('/images/nav/navbotleft2.gif',1,8)+'</TD><TD BGCOLOR="#CCCC99">'+spacer(1,5)+'</TD><TD WIDTH="7" ROWSPAN="3" COLSPAN="3">'+IMG('/images/nav/navbotright1.gif',7,8)+'</TD></TR><TR><TD BGCOLOR="#CCCC99">'+spacer()+'</TD></TR><TR><TD BGCOLOR="#FF9900">'+spacer(1,1)+'</TD></TR></TABLE>';
     //############### changed here
	d_navClass=d_navClass2= 'CLASS="'+((navigator.userAgent.indexOf('Mac')==-1)?'nav':'mac'); d_navClass+='1'+((isIE)?'ie"':'ns"'); d_navClass2+='2'+((isIE)?'ie"':'ns"');

	boxPics = new imageGroup('navbullet_off|/images/nav/spacer.gif','navbullet_on|/images/nav/navbullet1.gif','navarrow|/images/nav/navarrow.gif','navarrowblue|/images/nav/navarrowblue.gif','tr|/images/nav/navtopright1.gif', 'bl|nav/navbotleft2.gif', 'br|/images/nav/navbotright1.gif','stl|/images/nav/nav_s_topleft.gif', 'str|/images/nav/nav_s_topright.gif', 'su|/images/nav/nav_s_up.gif', 'sbl|/images/nav/nav_s_botleft.gif', 'sbr|/images/nav/nav_s_botright.gif', 'sd|/images/nav/nav_s_dn.gif');

	cascadeNav = new Object(); 
	
	menuList = new Object(); 
	
	layers = new Object();
	
	var TempArgs;

}

//******* Basic DHTML Functions ********//

function d_getLayer(spec,base)
{
	if(isIE) return document.all[spec];var j=0,temp=null; if(!base)	base=document;if(base.layers[spec])	return base.layers[spec];for(j=0; j<base.layers.length; j++)
	{
		temp=d_getLayer(spec,base.layers[j].document); if(temp)	return temp;
	} return null;
}
function equalizeLayers()
{
	var k,l; for(k=0; k<arguments.length; k++)
	{
		l=d_getLayer(arguments[k]); if(l)	d_equalize(l);
	}
}

function d_equalize(layer) 
{
	layer.getTop = new Function("return(this.style[(isIE)?'pixelTop':'top'])");
	layer.getLeft = new Function("return(this.style[(isIE)?'pixelLeft':'left'])");
	layer.setClip = new Function ("l","t","r","b","if (isIE) { this.style.clip='rect('+((t)?t:0)+' '+((r)?r:this.scrollWidth)+' '+((b)?b:this.scrollHeight)+' '+((l)?l:0)+')'; } if (isNS) { if(l!=null)this.clip.left=l; if(t!=null)this.clip.top=t; if(r!=null)this.clip.right=r; if(b!=null)this.clip.bottom=b;}");
	layer.rewrite = new Function ("html","if (isIE) this.innerHTML=html; if (isNS) {this.document.write(html); this.document.close();}");
	layer.vis = new Function("n","this.style.visibility=(n)?d_visible:d_hidden;");
	layers[layer.id]=layer; if(isNS)layer.style=layer;
}

function layerTag(id,content,z,vis,l,t,w,h,extra) 
{
	if(!h)
		h=0;
	if(w==0)
		w=1;
	if(!t)
		t=0;
	if(!l)
		l=0;
	if(!vis)
		vis=d_hidden;
	if(vis==1)
		vis=d_visible;
	if(!z)
		z=10;
	if(!extra)
		extra='';
		
	if(isIE)
	{
		var stuff = '<DIV ID="'+id+'" STYLE="position:absolute; overflow:none; left:'+l+'px; top:'+t+'px;'+((w)?(' width:'+w+'px;'):'')+' height:'+h+'px; visibility:'+vis+'; z-index:'+z+'" '+extra+'>';
	}
	if(isNS)
	{
		var stuff = '<LAYER NAME="'+id+'" left="'+l+'" top="'+t+'"'+((w)?(' width="'+w+'"'):'')+' height="'+h+'" visibility="'+vis+'" z-index="'+z+'" '+extra+'>';
	}
	
	return(stuff+content+((isIE)?'</DIV>':'</LAYER>')); 
}

function newLayer(id,content,z,vis,l,t,w,h,extra) 
{
	var layer;
	if(isIE)
	{
		document.body.insertAdjacentHTML('BeforeEnd',layerTag(id,content,z,vis,l,t,w,h,extra)); 
		layer=document.all[id];
	}
	if(isNS)
	{
		alert("test");
		if(w==null)
			w=30;
		layer=new Layer(w); 
		layer.document.write(content); 
		layer.document.close(); 
		layer.left=(l)?l:0; 
		layer.top=(t)?t:0; 
		layer.height=(h!=null)?h:1; 
		layer.zIndex=(z)?z:10; 
		layer.width=layer.document.width; 
		layer.visibility=(vis)?vis:d_visible; 
	}

	d_equalize(layer); 
	
	return(layer);   
}

function d_writeLayer(id,content,z,vis,l,t,w,h,extra)
{
	this.writeln(layerTag(id,content,z,vis,l,t,w,h,extra)); 
	equalizeLayers(id);
}

if(isNS||isIE)
{
	document.newLayer=d_writeLayer;
}

//******* End Basic DHTML Functions ********//




// body onload fix
var dhtmlnav=0; 
var dhtmlBrowser=0; 

if(document.images)
	dhtmlBrowser=1;

function d_loadChecker() 
{
	if(dhtmlnav)
	{
		d_initNav(); 
	}
	else
	{
		setTimeout('d_loadChecker()',50); 
	} 
} 

d_loadChecker();

function d_init() 
{
	navReady=1; 
	showCArrows(); 
	if(document.prev)
		setTimeout("startPrev()",50);
}

function d_initNav() 
{
	document.loaded=1; 
	eval(onLoadStr); 
	d_posCheck(); 
	d_loadImages(); 
}

function whenPageLoaded(code) 
{
	onLoadStr+=code+'; '; 
} 
var onLoadStr='';


function d_posCheck() 
{
	if(isNS||isIE)
	{
		var img=document.images.margincheck; 
		if(img)
		{
			ymargin=img[(isIE)?'offsetTop':'y']-87;
		}
		var img=document.images.cnavCheck; 
		if(img)
		{
			cascadeNav.cpos=img[(isIE)?'offsetTop':'y']-ymargin;
		}
	}
}

function d_navEnter(who) 
{
	if((who==null)||(who==currentNav[0]))
	{
		clearTimeout(d_navTimer); 
		if(isNS)
		{
			if(nsFix==1)
				nsFix=2;
			else
				nsFix=1;
		}
	}
}

function d_navExit(who) 
{
	if(!navReady)
		return;

	clearTimeout(d_popupTimer); 
	
	if((who!=null)&&(who!=currentNav[0]))
		return;

	if(isNS)
	{
		if(nsFix==2)
		{
			nsFix=0; 
			return;
		}

		nsFix=0;
	}

	clearTimeout(d_navTimer); 
	d_navTimer=setTimeout("d_endNav();",20); 
}

function d_navOver(who) 
{
	if(isNS||isIE)
	{
		d_startNav(who,arguments); 
	}
	else
	{
		d_swapImg(navPics,who,1); 
	} 
}

function d_navOut(who) 
{
	
	if(isNS||isIE)
	{
		d_navExit(who); 
	}
	else
	{
		d_swapImg(navPics,who,0); 
	} 
}

function d_findMouse(e) 
{
	if(isNS)
	{
		d_mouseY=e.pageY;
	}

	if(isIE)
	{
		d_mouseY=event.clientY+document.body.scrollTop; 
	}
}

function d_startNav(who,args) 
{
	if(!navReady)
		return;

	d_navEnter(who); 
	if(who==currentNav[0])
		return;
	TempArgs=args; 
	d_popupTimer=setTimeout("d_beginNav('"+who+"',1)",20); 
}

function d_beginNav(who,n) 
{
	d_navEnter(); 
	d_endNav(); 
	currentNav[0]=who; 
	cascadeNav.args=(n)?TempArgs:new Object(); 
	d_popupNav(who,1); 
}

function d_endNav() 
{
	var c=currentNav[0]; 
	if(c==null)
		return;

	if(menuList[c])
	{
		d_swapImg(navPics,c,0); 
		d_swapCArrow(c,0); 
		d_hideLev(0); 
		d_setConnect('off'); 
	}
	else
	{
		d_other(c); 
	} 
	
	currentNav[0]=null; 
}

function d_popupNav(who,lev,delay,link)
{
	if(!menuList[who])
	{
		d_other(who,1); return;
	}
	if(delay!=null)
	{
		d_popupTimer=setTimeout("d_popupNav('"+who+"',"+lev+")",delay); 
		return;
	}var l=layers['menuLayer'+lev]; 
	
	if(!l)
		return;

	if(who==currentNav[l.lev]) 
		return;
		
	d_hideLev(l.lev-1); 
	currentNav[l.lev]=who; 
	writeNavLayer(who,l.lev,l.id); 
	d_setNavY(l, who); 
	
	l.vis(1); 
	
	if(l.lev>1)
	{
		d_toggleArrow(l.lev,1);
	}
	else
	{
		d_swapImg(navPics,currentNav[0],1); 
		d_swapCArrow(currentNav[0],1); 
		d_setConnect(cascadeNav.args[1]);
	}
}

function d_other(who,n)
{
	var l=layers[who]; if(!l)	return;if(l.ready==0)	return;l.vis(n); if(n)
	{
		layers.on=l; 
		l.onmouseover=new Function("d_navEnter()"); 
		l.onmouseout=new Function("if (!document.alert) d_navExit()");
	}
	else
	{
		layers.on=null; 
		document.alert=0; 
		if(document.navdisabled) navdisable(1);
	}
}
function d_hideLev(num,delay)
{
	if(num>3)	
		return;
	
	if(delay)
	{
		d_popupTimer=setTimeout("d_hideLev("+num+")",50); 
		return;
	}
	
	var l,k=0; 
	
	for(k=3; k>=(num+1); k--)
	{
		if(currentNav[k]!=null)
		{
			l=layers['menuLayer'+k]; 
			l.vis(0); 
			if(k>1) 
				d_toggleArrow(k,0);
			
			if(l.clipped != null)
			{
				l.setClip(null,0,null,2000); 
				layers[l.id+'up'].vis(0); 
				layers[l.id+'dn'].vis(0); 
				l.clipped=null;
			}
			currentNav[k]=null;
		}
	}
}
function d_setConnect(y)
{
	if((y==null)||(!navPics.rollovers))	
		return;
	var nc=layers.navconnect; 
	
	if(y=='off')
	{
		nc.vis(0); return;
	}
	nc.style.top=(ymargin+70+y); 
	nc.vis(1);
}

function d_toggleArrow(lev,show)
{
	var who=currentNav[lev],b=(isIE)? window:layers['menuLayer'+(lev-1)]; 
	var newimg=(show)?boxPics.i.navarrowblue:boxPics.i.navarrow; 
	var img=b.document.images[who+'_ar']; 
	
	if(img)
	{
		img.src=newimg.src;
	}
	if(isIE)
	{
		var lnk=document.all[who+'_link']; 
		
		if(!lnk)	
			return;
			
		if(!lnk.cls)	
			lnk.cls=lnk.className;
			
		lnk.className=lnk.cls+((show)? 'on':'');
	}
}
function d_setNavY(l, who)
{
	if(isIE)
	{
		var db=document.body,st=db.scrollTop,wh=db.clientHeight,lh=l.scrollHeight,pb=db.scrollHeight-((l.lev==1)?58:37);
	}
	if(isNS)
	{
		var st=window.pageYOffset,wh=window.innerHeight,lh=l.document.height,pb=document.height-((l.lev==1)?60:39);
	}
	
	//wb is equal to the amount scrolled + the size of the client screen
	var wb=wh+st; 
	if(wb>pb)
		wb=pb;
	
	var y=d_mouseY-Math.round(lh/2); 
	var a2=cascadeNav.args[2]; 
	if((l.lev==1)&&(a2)&&(y<a2+ymargin)) 
		y=a2+ymargin;
	
	if(l.lev>1)
	{
		var prevTop=layers['menuLayer'+(l.lev-1)].getTop(); 
		if(y<(prevTop))	
			y=prevTop;
	}
	
	if((y+lh)>wb)
		y=wb-lh;
	if(y<(ymargin+67))
		y=ymargin+82;
	
	if(y<st)
		y=st;

//NOTE:  This needs to be corrected so that the top is under the top
//       nav bar if it is a level one menu or on the same height as
//       it's parent menu	href link
//	l.style.top = y;

		var currentEle,top,left,height,width;
		
		if(isIE)
		{
			currentEle =document.all[who+'_link'];
			top=0; left=0; height=currentEle.offsetHeight; width=currentEle.offsetWidth;
			    
			while(currentEle && currentEle.tagName.toLowerCase() != 'body'){
				top += currentEle.offsetTop;
				left += currentEle.offsetLeft;
				currentEle = currentEle.offsetParent;
			}
		}
		else
		{
			var d, l1;
			// for netscape height=20
			width=0,height=16;
			
			if(l.lev>1)
			{
				d = eval("document.menuLayer"+(l.lev-1)+".document");									
				l1 = eval("document.menuLayer"+(l.lev-1));
			}
			
			currentEle = (l.lev==1)?document.anchors[who+'_link']:d.images[who+'_ar'];
			top =  (l.lev>1)?(currentEle.y+l1.pageY):(currentEle.y);
			left = (l.lev>1)?(currentEle.x+l1.pageX-30):(currentEle.x);
						
		}
		
		
		l.style.left = (l.lev==1) ? left:left+width+20;					
		l.style.top = (l.lev==1)? y-height+20:top; 
//		y = l.style.top;

// change the top position above
	
	//(top position + scrollheight) > (amount y scrolled + clientHeight) 
	//if the whole thing can't fit on the screen then the menu is being 
	//shifted down
	if((y+lh)>wb)
	{
		l.clipped=1; 
		layers[l.id+'up'].style.top=l.style.top 
		layers[l.id+'up'].style.left = l.style.left;
		layers[l.id+'dn'].style.top=wb-14;
		layers[l.id+'dn'].style.left = l.style.left; 
		d_moveNav(l.id,0);
	}
}

function d_moveNav(id,s)
{
	var who = layers[id]; 
	if(who==null)
	{
		clearInterval(d_moveNavTimer); return;
	}
	var lh = (isIE)? who.scrollHeight:who.document.height; 
	var up = layers[who.id+'up'];  
	var dn = layers[who.id+'dn']; 
	var y = who.getTop()+s; 
	var uptop = up.getTop(); 
	var dnbot = dn.getTop()+14; 
	if(y>uptop)	
		y=uptop;
	if((y+lh)<dnbot) 
		y=dnbot-lh;
	up.vis((y<uptop)); 
	dn.vis(((y+lh)>dnbot)); 
	who.style.top=y; 
	who.setClip(null,((y<uptop)?(uptop-y+8):0),null,(((y+lh)>dnbot)?(dnbot-y-10):2000)); 
	if(((s<0)&&((y+lh)==dnbot))||((s>0)&&(y==uptop))) 
		clearInterval(d_moveNavTimer);
}
function d_scrollNav(id,s)
{
	clearInterval(d_moveNavTimer); 
	if(id==0) 
		return;
	d_moveNavTimer=setInterval("d_moveNav('"+id+"',"+s+")",50);
}

function IMG(url,w,h,b,ex)
{
	return('<IMG SRC="'+url+'" WIDTH="'+((w)?w:1)+'" HEIGHT="'+((h)?h:1)+'"'+((b!=null)?' BORDER="'+b+'"':'')+((ex)?' '+ex:'')+'>');
}
function spacer(w,h,b,ex)
{
	return(IMG('/images/nav/spacer.gif',w,h,b,ex));
}

function newNavMenu(who) 
{
	menuList[who]=new Array(); 
	var j; 
	
	/* add to menuList object an array of the submenu items */
	for(j=1; j<arguments.length; j++)
	{
		menuList[who][j-1]=arguments[j]; 
	} 
}

/*###########################################################################*/
function createNavLayer(lev,who) 
{
	if((lev==1)&&(who.substring(0,5)=='cnav_'))
	{
		who=who.substring(5); 
		chanArrows[chanArrows.length]=who; 
	}

	menuList[who]=new Array(); 
	var j; 
	for(j=2; j<arguments.length; j++)
	{
		menuList[who][j-2]=arguments[j]; 
	} 
}

if(isNS||isIE)
	newNavMenu('blank',"blank|/|blank");

function genNavLayer(lev,width,name)
{
	var w=(width)?width:123; 
	var id=(name)?name:('menuLayer'+lev);
	var build=d_navtabletop +'<SPAN ID="'+id+'Area">'+writeNavLayer('blank',lev,id)+'</SPAN>'+d_navtablebot;
	document.newLayer(id,build,(60+2*lev),d_hidden,(xmargin-6+lev*180),0,w,0,'ONMOUSEOVER="d_navEnter();" ONMOUSEOUT="d_navExit();"');
	var l=d_getLayer(id); 
	l.lev=lev; 
	if(isIE)	
		equalizeLayers(id+'Area');
	
	genNavScroller(id,lev,'up',w); 
	
	genNavScroller(id,lev,'dn',w);
	
}
//scroller table -- changing 
function genNavScroller(id,lev,which,w)
{
	if(which=='up')
	{
		var topbot='top',s=8,cs=3,h=12;
	}
	else
	{
		var s=-8,topbot='bot',cs=4,h=14;
	}
	//alert(w);
	var build='<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="'+w+'"><TR>'
	+'<TD WIDTH="6" ROWSPAN="'+cs+'">'+IMG('/images/nav/nav_s_'+topbot+'left.gif',6,h)+'</TD>' 
	+'<TD WIDTH="'+(w-13)+'" BGCOLOR="#FF9900">'+spacer(w-13,1)+'</TD>'
	+'<TD WIDTH="7" ROWSPAN="'+cs+'">'+IMG('/images/nav/nav_s_'+topbot+'right.gif',7,h)+'</TD></TR>'
	+'<TR><TD BGCOLOR="#E9E2C3" ALIGN="center">'+IMG('/images/nav/nav_s_'+which+'.gif',14,10)+'</TD></TR>'
	+'<TR><TD BGCOLOR="#FF9900">'+spacer()+'</TD></TR>'
	+((which=='dn')?'<TR><TD BGCOLOR="#000000">'+spacer(1,2)+'</TD></TR>':'')
	+'</TABLE>';
	document.newLayer(id+which,build,(60+2*lev+1),d_hidden,(xmargin-6+lev*180),0,0,0,'ONMOUSEOVER="d_scrollNav(\''+id+'\','+s+'); d_navEnter();" ONMOUSEOUT="d_scrollNav(0); d_navExit();"');
}
// changing the width of the layers 
function writeNavLayer(who,lev,id)
{
	var stuff='',menu = menuList[who]; if(menu==null)	return null;
	var j,a,url,submenu,txt;
	var stuff='<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0" WIDTH="115">' + '<TR><TD WIDTH="15">'+spacer(15,5)+'</TD><TD WIDTH="90">'+spacer(90,5)+'</TD><TD WIDTH="10">'+spacer(10,5)+'</TD></TR>';
	for(j=0; j<menu.length; j++)
	{
		a=menu[j].split('|'); 
		url=a[1]; 
		if(url=='*')
			url=null;
		
		submenu=a[2]; 
		if(lev==3)	
			submenu=null;
		
		stuff+='<TR><TD ALIGN="right" VALIGN="top">'+spacer(11,10,null,'NAME="'+who+'_b'+j+'"')+'</TD><TD>';
		
		if(url||submenu)
		{
//		stuff+= '<A '+((url)?d_navClass:d_navClass2)+' HREF="' + ((url)? url:'javascript: // no link') + '" ONMOUSEOVER="d_navBullet('+lev+",'"+who+'_b'+j+"',1); "+((submenu)?('d_popupNav('+"'"+submenu+"'"+','+(lev+1)+',200,'+"'"+submenu+"_link');" NAME="'+submenu+'_link"'):('d_hideLev('+lev+',1);"')) + ' ONMOUSEOUT="'+ "d_navBullet("+lev+",'"+who+"_b"+j+'\',0); clearTimeout(d_popupTimer);">'+a[0]+'</A>';
			stuff+= '<A '+((url)?d_navClass:d_navClass2)+' HREF="' + ((url)? url:'javascript: // no link') + '" ONMOUSEOVER="d_navBullet('+lev+",'"+who+'_b'+j+"',1); "+((submenu)?('d_popupNav('+"'"+submenu+"'"+','+(lev+1)+',200);" NAME="'+submenu+'_link"'):('d_hideLev('+lev+',1);"')) + ' ONMOUSEOUT="'+ "d_navBullet("+lev+",'"+who+"_b"+j+'\',0); clearTimeout(d_popupTimer);"><font size="-1" face="arial">'+a[0]+'</font></A>'; 
		//stuff+= '<A '+ ' HREF="' + ((url)? url:'javascript: // no link') + '" ONMOUSEOVER="d_navBullet('+lev+",'"+who+'_b'+j+"',1); "+((submenu)?('d_popupNav('+"'"+submenu+"'"+','+(lev+1)+',200);" NAME="'+submenu+'_link"'):('d_hideLev('+lev+',1);"')) + ' ONMOUSEOUT="'+ "d_navBullet("+lev+",'"+who+"_b"+j+'\',0); clearTimeout(d_popupTimer);"><font size="-1" face="arial">'+a[0]+'</font></A>';
		}
		else
		{
			stuff+='<SPAN CLASS="nav3">'+a[0]+'</SPAN>';
		}
		stuff+= '</TD><TD>'+ ((submenu)? IMG('/images/nav/navarrow.gif',9,9,0,'NAME="'+submenu+'_ar"'):'') +'</TD></TR>'+'<TR><TD>'+spacer(1,8)+'</TD></TR>';
	}
	stuff+='</TABLE>'; 
	
	if(who=='blank')	
		return stuff;
	
	if(isNS) 
		stuff=d_navtabletop+stuff+d_navtablebot;
	
	var l=layers[id+((isIE)?'Area':'')]; 
	l.rewrite(stuff); 
	return null;
}

function writeLayers()
{
	if(!(isNS||isIE))	return;
	if(isIE)
	{
		xmargin=eval(document.body.leftMargin); 
		ymargin=eval(document.body.topMargin);
	}
	if(isNS)
	{
		var mc=document.images.margincheck; 
		
		if(mc)
		{
			xmargin=mc.x-1; 
			ymargin=mc.y-87;
		}
	}
	document.newLayer('navconnect',IMG('/images/nav/spffffcc.gif',3,17),70,0,(xmargin+172),0,0,0);
	genNavLayer(1); 
	genNavLayer(2); 
	genNavLayer(3);
}

//******* Second Level DHTML Functions ********//


function showCArrows()
{
	if((isNS||isIE)&&(document.cnavCheck))
	{
		var j,a=chanArrows; 
		
		if(a.length>0)
		{
			for(j=0; j<a.length; j++)	
				d_swapCArrow(a[j],0); 
			cnavReady=1;
		}
		else 
			setTimeout("showCArrows()",200);
	}
}

function addCArrows()
{
	if(isNS||isIE)
	{
		var j,a=arguments; 
		for(j=0; j<a.length; j++) 
			chanArrows[chanArrows.length]=a[j];
	}
}

function d_swapCArrow(who,n)
{
	var img=document.images['ca_'+ who]; 
	if(img) 
		img.src=boxPics.i[(n)?'navarrowblue':'navarrow'].src;
}

function d_cnavOver(who)
{
	if(cnavReady)
	{
		arguments[2]=cascadeNav.cpos; 
		d_startNav(who,arguments);
	}
}
function d_cnavOut(who)
{
	if(cnavReady)	
		d_navExit(who);
}

if(isNS||isIE)
{
	chanArrows= new Array(0);
}

//******* End Second Level DHTML Functions ********//


if(isNS||isIE)
{
	document.onmousemove = d_findMouse;
	d_loadGroup(boxPics,1);
	if((document.cookie)&&(document.cookie.indexOf('dev_ro=1')!=-1))
	{
		navPics.add('blue|/images/nav/sp0033ff.gif','yellow|/images/nav/spffffcc.gif'); 
		d_loadGroup(navPics,1);
	}
	navPics.onload="document.cookie='dev_ro=1; path=/'";
}

if(isNS) 
	document.newLayer('cacher_spacers',spacer(15,5)+ spacer(145,5)+ spacer(17,5)+ spacer(11,10)+ spacer(1,8)+ spacer()+ spacer(1,6)+ spacer(5,1)+ spacer(1,5)+ spacer(1,2));
if(isNS) 
	document.captureEvents(Event.MOUSEMOVE | Event.MOUSEUP);
// ends this file 