//  This is called from the myWindowOnLoad function
//  which in turn is called from the window.onload in
//  /menu.js

function offroot_sidebar(){
	var imgs=document.getElementsByTagName('IMG');
	var str=new String();
	var modPos;
	for(var i=0; i<imgs.length; ++i){
		modPos=imgs[i].src.indexOf("modules");
		if(modPos > -1) {
			imgs[i].src="http://www.eng.buffalo.edu/" + imgs[i].src.substr(modPos);
		}
	}

	var nPar=document.getElementById('footer');
	for(var h=0;h<nPar.childNodes.length;++h){
		if(nPar.childNodes[h].className=='left'){
			n=nPar.childNodes[h];
		}
	}
	var iChild;
	if(document.all){iChild=0;}else{iChild=1;}
	document.getElementById('search_box').childNodes[iChild].action='http://www.eng.buffalo.edu/search_redirect.php';
	for(var i=0;i<n.childNodes.length;++i){
		var nCi=n.childNodes[i];
		if(nCi.tagName=="A"){
			var nCiih=nCi.innerHTML.toLowerCase();
			if(nCiih=="contact"){
					nCi.href='http://www.eng.buffalo.edu/contact.php';
			}else if(nCiih=="internal resources"){
				nCi.href='http://www.eng.buffalo.edu/internal.php';
			}
		}
	}
};
