/********************************/
/*	 oblikovanje.com	 */
/*	 Igor Samotorčan	*/
/* vse pravice pridržane	*/
/********************************/


function natisni_stran()
{
	if(!document.getElementById("vsebina")) return;

	var con = document.getElementById("vsebina").innerHTML;
	var nat = window.open ("", "natisni","menubar=1,resizable=1,scrollbars=1,width=625,height=480");

	nat.document.write('<html><head><title>' + document.title + '</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2" /><link href="./css/tiskanje.css" rel="stylesheet" type="text/css" /></head>');
	nat.document.write('<body style="padding: 9px;" onload="window.print();">');
	nat.document.write(document.getElementById('vsebina').innerHTML);
	nat.document.write('</body></html>');
	nat.document.close();

}


function priljubljene()
{
	if (window.external)
	{
		window.external.AddFavorite(location.href, document.title);
	}
	else
	{
		alert('Pritisnite Ctrl+D');
	}
}


function povecaj(slika,sir,vis)
{
	//if(xpop.closed == false) xpop.close();

	xpop=window.open('/foto.php?' + slika,'fotke','width=' + sir + ',height=' + vis);
	xpop.focus();
}


function popup(url,name,data)
{
	www=window.open(url,name,data);
	www.focus();
}


function popup_slika(slika)
{

	var nat = window.open ("", "natisni","menubar=0,status=1,resizable=1,scrollbars=0,width=100,height=100");

	nat.document.write('<html><head><title>' + document.title + '</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2" /></head>');
	nat.document.write('<body style="padding: 0px; margin: 0px" onload="window.resizeTo(document.images[0].width+10, document.images[0].height+40)">');
	nat.document.write('<img src="' + slika + '" onclick="window.close();">');
	nat.document.write('</body></html>');
	nat.document.close();

}

function iskalnik_preveri(obrazec, tmp_string)
{
	if(obrazec.keywords.value == '' || obrazec.keywords.value == tmp_string)
	{
		obrazec.keywords.value = tmp_string;
		return false;
	}
}


function pocisti_polje(polje, tmp_string)
{
	if(polje.value == tmp_string)
	{
		polje.value = '';
	}
	else if(polje.value == '')
	{
		polje.value = tmp_string;
	}
}


function layer_sprememba(celice, indeks)
{
	for(i=0; i < celice.length; i++)
	{
		document.getElementById(celice[i]).style.display = (i == indeks ? 'block' : 'none');
	}
}


