<!--
/*-----------------------------------------------------------------------------*\
|																				|
|	file:		main.js 														|
|	purpose:	pesamacka.com javascripts										|
|	copyright: 	(c) 2008 Oto Spál												|
|																				|
\*-----------------------------------------------------------------------------*/

// submit button rollovers
function hoverButton(btn, flag)
{
	if(flag)
	{
		document.getElementById(btn).style.backgroundColor = "#c8ab72";
		document.getElementById(btn).style.color = "#ffffff";
	}
	else
	{
		document.getElementById(btn).style.backgroundColor = "#ffffff";
		document.getElementById(btn).style.color = "#808080";
	}
}

// news tools
function addLinkWWW()
{
	if(document.forms[0].linkah.value == "")
	{
		alert("Zadajte www adresu vkladaného odkazu");
		return;
	}
	if(document.forms[0].linkat.value == "")
	{
		alert("Zadajte zobrazovaný text vkladaného odkazu");
		return;
	}
	var linka = "<a href=\"" + 
				document.forms[0].linkah.value + 
				"\" target=\"_blank\">" +
				document.forms[0].linkat.value + 
				"</a>";
	document.forms[0].texts.value += linka;
}

function addLinkMail()
{
	if(document.forms[0].mailh.value == "")
	{
		alert("Zadajte mailovú adresu");
		return;
	}
	var linka = "<a href=\"mailto:" + document.forms[0].mailh.value + "\">" + document.forms[0].mailh.value + "</a>";
	document.forms[0].texts.value += linka;
}

function addLineBreak()
{
	document.forms[0].texts.value += "<br />";
}

// link popup
function popupLink()
{
	window.open("../../banner.html", "win", "status = 1, height = 230, width = 494, resizable = 0");
}
function popupLinkReply(lnk)
{
	window.open(lnk, "win", "status = 1, height = 200, width = 300, resizable = 0");
}

-->
