
updateCode=function(thisroot){
	for(var i=0;i<thisroot.childNodes.length;i++){
		node=thisroot.childNodes[i];
		switch(node.nodeName){
			case "IMG":
				if(node.align!=null){if(node.align.toLowerCase()=="left"||node.align.toLowerCase()=="right"){node.className+=' '+node.align.toLowerCase();}}
				node.galleryimg="no";
				break;
		}
		if(node.hasChildNodes()){
			updateCode(node);
		}
	}
}

updateForms=function(thisroot){
	for(var i=0;i<thisroot.childNodes.length;i++){
		node=thisroot.childNodes[i];
		if(node.nodeName=="INPUT"&&typeof node.type!="undefined"){
			node.className+=' '+node.type.toLowerCase();
			if(node.type.toLowerCase()=="submit"){
				node.onmouseover=function(){this.className+=" over";}
				node.onmouseout=function(){this.className=this.className.replace(" over","");}
			}
		}
		if(node.hasChildNodes()){
			updateForms(node);
		}
	}
}

updateNav=function(thisroot){
	if(typeof thisroot.nodeType==null){return true;}
	if(thisroot.nodeType==3){return true;}
	for(var i=0;i<thisroot.childNodes.length;i++){
		node=thisroot.childNodes[i];
		if(node.nodeName=="LI"){
			node.onmouseover=function(){this.className+=" over";}
			node.onmouseout=function(){this.className=this.className.replace(" over","");}
		}
		if(node.hasChildNodes()){
			updateNav(node);
		}
	}
}

modifyDocument=function(){
	if(document.all&&document.getElementById){
		thisroot=document.getElementById("nav");
		if(thisroot!=null){updateNav(thisroot);}
		thisroot=document.getElementById("center");
		if(thisroot!=null){updateCode(thisroot);}
		if(typeof document.forms!="undefined"){
			for(var i=0;i<document.forms.length;i++){
				thisroot=document.forms[i];
				if(typeof thisroot!="undefined"){
					updateForms(thisroot);
				}
			}
		}
	}
}

if(window.onload){
	var currentFunction=window.onload;
	window.onload=function(){currentFunction;modifyDocument;};
}else{
	window.onload=modifyDocument;
}
