


function setActiveMenu() {
	
	if(navigator.appName == "Netscape" && parseFloat(navigator.appVersion) < 5)
		return ;
	
	tags = getTags(document, "TR");
	ile = 0;
	for (var i=0; i<tags.length; i++) {
		
		if (tags[i].className == "kalk" ) {
			tags[i].onmouseover = tagover;
			tags[i].onmouseout = tagout;
			
			tds = getTags(tags[i], "TD");
			
			for(var j=0; j<tds.length; j++)
			{
				tds[j].onclick = tagclick;
			}	
			ile++;
		}
	}
	
	tags = getTags(document, "TD");
	
	
	for(var i=0; i<tags.length; i++)
	{
		
		if(tags[i].className == "radio"){
			tags[i].onmouseover = tagover;
			tags[i].onmouseout = tagout;
			tags[i].onclick = tagradioclick;
		}	
	}
	
	
	function getTags(obj, tag)
	{
		return obj.getElementsByTagName(tag);
	}
	
	function tagover() {
		if (this.className == "kalk") {
			this.className = "kalk_over";
		}
		else if(this.className == "radio")
		{
			this.className = "radio_over";
		}
		
	}
	function tagout() {
		if (this.className == "kalk_over")
			this.className = "kalk";
		else if(this.className == "radio_over")
			this.className = "radio";
			
	}
	function tagclick() {
		tg = getTags(this, "A");
		
		if(tg.length)
		{
			//tg[0].click();
			document.location.href = tg[0];
		}
		
	}
	
	function tagradioclick()
	{	
		tg = getTags(this, "INPUT");
		if(tg.length)
		{
			
			input = tg[0];
			input.cela = tg;
			
			if(input.type=="radio")
				input.click();	
			
			
		}
		
	}
}





// --- main init

function initMain() {
	setActiveMenu();
	if(document.errorMsg)
	{
		alert(document.errorMsg);
	}

}


