function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      oldonload();
      func();
    }
  }
}

function init(){
	
	// Set the style for images within the COPY div based on their alignment
	var copy = document.getElementById('copy');
	var images = document.getElementsByTagName('IMG');
	for(var i=0;i<images.length;i++){
		var align = images[i].getAttribute('align');
		if((align == 'left')||(align == 'right')){
			//images[i].setAttribute('align', '');
			images[i].className = align;
		}
	}
	
	// Add a self focus to the global search
	var search = document.getElementById('s');
	if(search){
		search.onfocus = function(){
			this.select();	
		}
	}
}

addLoadEvent(init);

startTopList = function() {
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("nav");
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
				}
				node.onmouseout=function() {
					this.className=this.className.replace("over", "");
				}
			}
		}
	}
}

addLoadEvent(startTopList);