// utility function for loading multiple functions onload

      function preparePage(toindex) {
	if ( !document.getElementById ) return false;
	if ( !document.getElementById(toindex) ) return false;
	var divcont = document.getElementById(toindex);
	var divcollection = divcont.getElementsByTagName("div");
	for (var i = 0;i<divcollection.length;i++) {
	
    	divcollection[i].onclick = function () {
				if (!document.getElementById(this.id)) return;
				var thediv = document.getElementById(this.id);
				var thelink = thediv.getElementsByTagName("a");
				var location = thelink[thelink.length-1].getAttribute("href");	
				document.location = location;				
				}
				
		divcollection[i].onmouseover = function() {
				if (!document.getElementById(this.id)) return;
				
				var thediv = document.getElementById(this.id);
				thediv.style.cursor ? thevar = "hand" : thevar = "pointer";
				thediv.style.cursor = thevar;
				var thelink = thediv.getElementsByTagName("a");
				thelink[thelink.length-1].className = 'linkover';
				}
		divcollection[i].onmouseout = function() {
				if (!document.getElementById(this.id)) return;
				var thediv = document.getElementById(this.id);
				var thelink = thediv.getElementsByTagName("a");
				thelink[thelink.length-1].className = 'linkoff';
				}				
    	}
}