function tlacitko(td, url, action, pic, name) {
	if (td==2) {
		text = '<td class="menuimg" width="1px"> </td>';
	}
	else {
		text="";
		if (td==1) text += '<td class="menuimg" width="27px">';
		if (url==1) text += '<a href="' + action;
		else text += '<a href="#" onClick="' + action + '; return false;';
		text += '"><img src="menu/obr/'+pic+'.gif" alt="'+name+'" width="25" height="24" border="0" onMouseOver="this.src =\'menu/obr/'+pic+'on.gif\'" onMouseOut="this.src = \'menu/obr/'+pic+'.gif\'" onMouseDown="this.src = \'menu/obr/'+pic+'in.gif\'"></a>';
		if (td==1) text += '</td>';
	}
	document.write(text);
}

function fMenu(id, name, width) {
	if (id.length==1) {
		a="<td ";
		b='style="width: 25%; text-align: center;" ';
		c="";
		d="";
		e="<br>";
		f=" text-align: left;";
		g="";
	}
	else {
		a="<tr ";
		b="";
		c="<td>";
		d="sub";
		e='</td><td id="smenu' + id + '" class="sipka">';
		f=" top: 5px; left: 7px;";
		if (width>110) g='style="width: ' + width + 'px;" ';
		else g='style="width: 110px;" ';
	}
	document.write(a + 'id="menu' + id + '" ' + b + 'OnMouseOver="zobraz(this);" onMouseOut="skry(this);">' + c + '<a id="amenu' + id + '" href="" class="' + d + 'menu" OnClick="return false;">' + name + '</a>' + e + '<div style="position: relative;' + f + '"><div id="submenu' + id + '" style="position: absolute; visibility: hidden;"><table ' + g + 'class="submenu" bgcolor="#cddbeb" cellpadding="0" cellspacing="0">');
}

function fMenuEnd(id) {
	text = "</table></div></div>";
	if (id.length==1) {
		text += "</td>";
	}
	else {
		text += '<img id="imenu' + id + '" src="menu/sipka.gif"> </td></tr>';
	}
	document.write(text);
}

function skry(tamto) {
	document.getElementById("sub"+tamto.id).style.visibility = "hidden";
	if (tamto.id=="menu1" || tamto.id=="menu2" || tamto.id=="menu3" || tamto.id=="menu4" || tamto.id=="menu5") {
		document.getElementById("a"+tamto.id).style.color = "#ffffff";
	}
	else {
		document.getElementById("a"+tamto.id).style.color = "#336699";
		document.getElementById("a"+tamto.id).style.backgroundColor = "#cddbeb";
		document.getElementById("i"+tamto.id).src = "menu/sipka.gif";
		document.getElementById("s"+tamto.id).style.backgroundColor = "#cddbeb";
	}
	return true;
}

function zobraz(tamto) {
	document.getElementById("sub"+tamto.id).style.visibility = "visible";
	if (tamto.id=="menu1" || tamto.id=="menu2" || tamto.id=="menu3" || tamto.id=="menu4" || tamto.id=="menu5") {
		document.getElementById("a"+tamto.id).style.color = "#fcce55";
	}
	else {
		document.getElementById("a"+tamto.id).style.color = "#fcce55";
		document.getElementById("a"+tamto.id).style.backgroundColor = "#336699";
		document.getElementById("i"+tamto.id).src = "menu/sipka_on.gif";
		document.getElementById("s"+tamto.id).style.backgroundColor = "#336699";
	}
	return true;
}

function celaobr() {
	adresa=location.href;
	window.open(adresa,"plnaobrazovka","fullscreen");
}

function fulliko() {
	if (window.name=="plnaobrazovka") {
		document.getElementById("smevofull").style.visibility = "visible";
	}
}

function ICQ2Go(client_type){
	var leftpos = (screen.availWidth - 200)-40;
	if (client_type=="java") window.open("http://www.icq.com/icq2go/web.html","ICQ2Go_java","top=40,left="+leftpos+",width=156,height=446,toolbar=0,resizable=0");
	else window.open("http://www.icq.com/icq2go/flicq.html","ICQ2Go_flash","top=40,left="+leftpos+",width=176,height=441,toolbar=0,resizable=0");
}

