for(i=0;i<window.document.getElementsByTagName("a").length;i++) {
	if(document.URL.match(window.document.getElementsByTagName("a")[i].getAttribute("href")))
		window.document.getElementsByTagName("a")[i].className = "selected";
}

for(i=0;i<window.document.getElementsByTagName("tr").length;i++) {
	t=window.document.getElementsByTagName("tr")[i];
	t.onmouseover=function(){this.className = "hover";};
	t.onmouseout=function(){this.className = "";};
}

for(i=0;i<window.document.getElementById("pageleft").getElementsByTagName("a").length;i++) {
	var a=window.document.getElementById("pageleft").getElementsByTagName("a")[i];
	var o=window.document.getElementById("obr");
	var s=/(\w+)\.([^\.]+)$/;
	var r=a.getAttribute("href").match(s);
	if(r!=null) {
		a.className=r[1];
		a.onmouseover=function(){o.style.background="url(\"img/icons/"+this.className+".gif\")"};
		a.onmouseout=function(){o.style.background=""};
	}
	var img=new Array();
	img[i]=new Image();
	img[i].src="img/icons/"+a.className+".gif";
}