// JS SHOW HIDE
var c; 
var k=0; 
var j=0; 
var ary=[]; 
var divs=document.getElementsByTagName('div'); 
var lnks=document.getElementsByTagName('a'); 
var splt; 
/************************************************** 
function init is provided for those who have javascript disabled 
and would, otherwise, not be able to view any of the divs at all. 
They would also I presume not need the links that control the divs 
so that will not show up. 
***************************************************/ 
function init() { 
	for(c=0;c<divs.length;c++) { 
		if(divs[c].className=='show') { 
			divs[c].className='hide'; 
			divs[c].id='d'+k++; 
		} 
	} 
	for(c=0;c<lnks.length;c++) { 
		if(lnks[c].className=='hide') { 
			ary[c]=true; 
			lnks[c].className='hs'; 
			lnks[c].id='a'+j++; 
			lnks[c].onclick=function() { 
				splt=this.id.split('a')[1]; 
				if(ary[splt]==true) { 
					this.firstChild.nodeValue='hide nav'; 
					ary[splt]=false; 
					showdiv(splt); 
					return false; 
				} 
				else { 
					this.firstChild.nodeValue='site nav'; 
					ary[splt]=true; 
					document.getElementById('d'+splt).className='hide'; 
					return false; 
				} 
			} 
		} 
	} 
} 
function showdiv(num) { 
	for(c=0;c<j;c++){ 
		document.getElementById('a'+c).firstChild.nodeValue='site nav'+(c+1); 
		document.getElementById('a'+num).firstChild.nodeValue='hide nav'; 
		ary[c]=true; 
		ary[num]=false; 
	} 
	for(c=0;c<divs.length;c++) { 
		if(divs[c].className=='show') { 
			divs[c].className='hide'; 
		} 
	} 
	document.getElementById('d'+num).className='show'; 
} 
if(window.addEventListener){ 
	window.addEventListener('load',init,false); 
} 
else { 
	if(window.attachEvent){ 
		window.attachEvent('onload',init); 
	} 
}

function setVis(pass) { 
var divs = document.getElementsByTagName('Div'); 
	for(i=0;i<divs.length;i++){ 
		d=divs[i].id.charAt(0)+divs[i].id.charAt(1);
		if(d=='SM'){
			if(divs[i].id.match(pass)){//if they are 'see' divs 
				if (document.getElementById){ // DOM3 = IE5, NS6 
					divs[i].style.display="inline";// show/hide 
				}
			} else { 
				if (document.getElementById){
					divs[i].style.display="none"; 
				}
			}
		} 
	} 
}
