// JavaScript Document
window.onload=show;
function show(id) {
var d = document.getElementById(id);
var d2 = document.getElementById(id+'_btn');
	for (var i = 1; i<=10; i++) {
		if (document.getElementById('smenu'+i)) {
			document.getElementById('smenu'+i).style.display='none';
			document.getElementById('smenu'+i).style.position='relative';
			document.getElementById('smenu'+i).style.top = '0px';
			//document.getElementById('smenu'+i).style.left = (((i-1)*120)+8)+'px';
		}
		if(document.getElementById('smenu'+i+'_btn')){
			document.getElementById('smenu'+i+'_btn').style.backgroundPosition='0px 0px';
		}
		//
	}
	if (d) {
		d.style.display='block';
	}
	if (d2) {
		d2.style.backgroundPosition='0px -27px';
	}
}
function getPassedInfo()
{
	var URLString=window.location.href
 
	wholePathLength=URLString.length;
 
	strippedPathLength=URLString.substring(0,URLString.lastIndexOf("=")).length+1;
 
	sel= URLString.substring(strippedPathLength,wholePathLength);
 	return sel;
 	//show();
	//document.getElementById("passedInfo").value=info
}
function getValue(id, url, name){
	txt = '';
	sel = getPassedInfo();
	if (id == sel){
		/*if(id == 1){
			txt='<dt><a href="../'+url+'?id='+id+'" id="smenu'+id+'_btn" style="background-image:url(../../images/btn_'+id+'.gif)"><u>'+name+'</u></a></dt>';	
		}else{*/
			txt='<dt onmouseover="javascript:show(\'smenu'+id+'\');" onmouseout="javascript:show(\'\');"><a href="'+url+'" id="smenu'+id+'_btn" style="background-image:url(/images/btn_'+id+'.gif); text-decoration:underline;">'+name+'</a></dt>';
		/*}*/
	}/*else if(id == 1){
		txt='<dt><a href="../'+url+'?id='+id+'" id="smenu'+id+'_btn" style="background-image:url(../../images/btn_'+id+'.gif)">'+name+'</a></dt>';	
	}*/else{
		txt='<dt onmouseover="javascript:show(\'smenu'+id+'\');" onmouseout="javascript:show(\'\');"><a href="'+url+'" id="smenu'+id+'_btn" style="background-image:url(/images/btn_'+id+'.gif)">'+name+'</a></dt>';
	}
	return txt;
}
function getSideNav(){
	sel = getPassedInfo();
	txt='';
	if (sel!==undefined){
		txt = '<!--#include file="../js/sidenav_'+sel+'.txt" -->';
	}else{
		txt='';
	}
	alert(txt);
	return txt;
}
function rotateImage(){
var images = new Array(3)
images[0] = '../../images/home_left.jpg';
images[1] = '../../images/home2_left.jpg';
images[2] = '../../images/home3_left.jpg';
var rand = Math.floor(Math.random() * images.length);
var image = images[rand];
return (image);
}
			
			
