/********************************/
/*	 Za GBL izdelal 	*/
/*	 Igor Samotorčan	*/
/* vse pravice pridržane	*/
/********************************/

function natisni_stran(){
	if(!document.getElementById("vsebina")) return;

	var con = document.getElementById("vsebina").innerHTML;

	nat = window.open ("", "natisni","menubar=1,resizable=1,scrollbars=1,width=625,height=480");

	nat.document.write('<html><head><title>Natisni - ' + 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><body style="padding: 9px;">');
	nat.document.write(document.getElementById("vsebina").innerHTML);
	nat.document.write("<p>Spletni naslov: " + location.href + "</p></body></html>");  

}

function priljubljene(){


	if (navigator.appName == "Microsoft Internet Explorer") {

		var url= location.href; 
		var title= document.title; 

		window.external.AddFavorite(url,title);

	} else {
		alert('Pritisnite Ctrl+D');
	}

}

function povecaj(slika,sir,vis){

	//if(xpop.closed == false) xpop.close();

	 xpop=window.open('/foto.php?img=' + slika,'fotke','width=' + sir + ',height=' + vis);
	 xpop.focus();
}

function popup(url,name,data)
	{
	 www=window.open(url,name,data);
	 www.focus();
	}


var tmp_string = '...iskalni niz';

function user_najdi(obrazec){

  if(obrazec.keywords.value == '' || obrazec.keywords.value == tmp_string)
  {
	obrazec.keywords.value = tmp_string;
	return false;
  }

}

function pocisti_polje(polje){
  if(polje.value == tmp_string){
	polje.value = '';
  }
}




	function oceni(zapis, faktor)
	{
		document.getElementById("blorum"+zapis).style.width = (faktor * 11) + "px";
	}

	function pocisti(zapis)
	{
		document.getElementById("blorum"+zapis).style.width = "0px";
	}



	function glasuj(blorum, ocena)
	{
		url = "/ajax/glasuj_blorum.php?blorum=" + blorum + "&ocena=" + ocena;

		xmlhttp.open("GET", url, true);
		xmlhttp.onreadystatechange = function()
		{
			if (xmlhttp.readyState == 4)
			{
				if(document.getElementById("ocena_info"))
				{
					document.getElementById("ocena_info").innerHTML = xmlhttp.responseText;
				}
				else
				{
					alert(xmlhttp.responseText);
				}
			}
		}

		xmlhttp.setRequestHeader('Accept','message/x-formresult');
		xmlhttp.send(null);
		return false;
	}


function potrditev_brisanja(msg)
{

		 if (confirm(msg ? msg: "®elite odstraniti zapis?")) return true;  else return false;
}


function potrditev(msg)
{

		 if (spremenjeno && confirm(msg ? msg: "®elite odstraniti zapis?")) return true;  else return false;
}


function 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();" style="cursor: pointer;">');
	nat.document.write('</body></html>');
	nat.document.close();

}


