function hide(me) {
css=document.getElementById(me).style;
if(css.display=="none") css.display="";
else css.display="none";
return false;
}
function hideold(me)
{
var d=document.getElementById(me).style.display;
if(d=="none") d="inline";
else d="none";
document.getElementById(me).style.display=d;
}

function verify_delete() {
	var conf = window.confirm("Da li zelite obrisati zapis?");
	if(!conf) {
	    return false;
	}
	else {
	    return true;
	}
}
function check_tema()
{
	var conf =  document.form4.tema.value;
	var nad =  document.form4.nadimak.value;

	if(nad=="" || nad=="Guest"){
		window.alert("Daj stavi neki drugi Nadimak!");
		document.form4.nadimak.value = "";
		document.form4.nadimak.focus();
	    return false;
	}
	else {
	if(conf=="") {
		window.alert("Morate unjeti neki naslov za Temu");
		document.form4.tema.focus();
	    return false;
	}
	else {
	    return true;
	}
	}
}
function chat_k(k) {
	if(document.getElementById('chat_tmp').value.length<2)
	{
		document.getElementById('chat_tekst').value="";
		return false;
	}
	if(document.getElementById('chat_nick').value==0)
	{
		document.getElementById('chat_nick_text').innerHTML="Nick: " + document.getElementById('chat_tmp').value;
		document.getElementById('chat_nick').value=document.getElementById('chat_tmp').value;
	}
	document.getElementById('chat_tekst').value=document.getElementById('chat_tmp').value;
	document.getElementById('chat_tmp').value='';
	return true;
}

function VoteWindow() {
url="poll/poll.php";
options="toolbar=no,scrollbars=no,directories=no,status=no,menubar=no,";
options+="resizable=yes,width=480,height=400";
window.open(url,"pollwindow", options);
}

function openRadio() {
url="radio.php";
options="toolbar=no,scrollbars=no,directories=no,status=no,menubar=no,";
options+="resizable=yes,width=330,height=400";
window.open(url,"pollwindow", options);
}


function retd(req) {
    if (req.readyState == 4) {
        if (req.status == 200) {

         }
    }
}
function sl_br(id)
{
    var req = setupAJAX();
    req.onreadystatechange = function(){
        retd(req);
    }
    var url = "inc/sl_br.php?i="+id;
    req.open("GET", url, true);
    req.send(null);
}

function openpopup(popurl,w,h){
  w=w+20;
  h=h+30;
  sx=(screen.width-w)/2;
  sy=(screen.height-h)/2;
  opt="width=" + w + ",height=" + h + ",ScreenX=" + sx + ",ScreenY=" + sy + ",left=" + sx + ",top=" + sy + "toolbar=1,location=0,directories=0,status=0,scrollbars=0,menubar=0,resizable=1";
  nw=window.open(popurl,"wwww",opt);
}

function dekrim_VoteWindow()
{
	url="dekrim_poll.php";
	options="toolbar=no,scrollbars=no,directories=no,status=no,menubar=no,";
	options+="resizable=yes,width=480,height=400";
	window.open(url,"d_pollwindow", options);
}

function dekrim_def()
{
	window.alert("Dekriminalizacija:\n ukidanje zabrane, u�initi ne�to legalnim, zakonitim...");
}
