<!--
function getHTTPObject() {
  var xmlhttp;
  /*@cc_on
  @if (@_jscript_version >= 5)
    try {
      xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
      try {
        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (E) {
        xmlhttp = false;
      }
    }
  @else
  xmlhttp = false;
  @end @*/
  if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
    try {
      xmlhttp = new XMLHttpRequest();
      xmlhttp.overrideMimeType("text/xml");
    } catch (e) {
      xmlhttp = false;
    }
  }
  return xmlhttp;
}
function openWin(page){
OpenWin=this.open(page, "desc1","width=700,height=400,left=0,top=0,toolbar=no,menubar=no,location=no,scrollbars=no,resizable=no");
}
function popUp(URL,w,h) {
if(!w) var w = 650;
if(!h) var h = 450;
leftp = (screen.width) ? (screen.width-w)/2 : 0;
topp = (screen.height) ? (screen.height-h)/2 : 0;
OpenWin=this.open(URL, "desc1","width="+w+",height="+h+",left="+leftp+",top="+topp+",toolbar=no,menubar=no,location=no,scrollbars=no,resizable=yes");
}
function cl(idx) {img = new Image(); img.src = "/cc.php?l="+idx+(new Date()).getTime();}
function brojac(idx) {img = new Image(); img.src = "/brojac.php?l="+idx+","+(new Date()).getTime();}
function odgovor(kid,id,strana) {
var el = document.getElementById("k"+kid);
if (!el.hasChildNodes()) {
myform=document.createElement("form");
myform.setAttribute("id","f"+kid);
myform.setAttribute("method", "post");
myform.setAttribute("action", "/"+strana+".php?id="+id);
mybreak=document.createElement("p");
myform.appendChild(mybreak);
mytextarea = document.createElement("textarea");
mytextarea.setAttribute("name", "odgovor");
mytextarea.setAttribute("cols", "30");
mytextarea.setAttribute("rows", "3");
myform.appendChild(mytextarea);
myaction = document.createElement("input");
myaction.setAttribute("type", "hidden");
myaction.setAttribute("name", "ka");
myaction.setAttribute("value", "1");
myform.appendChild(myaction);
mykid = document.createElement("input");
mykid.setAttribute("type", "hidden");
mykid.setAttribute("name", "kid");
mykid.setAttribute("value", kid);
myform.appendChild(mykid);
mybreak=document.createElement("p");
myform.appendChild(mybreak);
mybutton=document.createElement("button");
mybutton.onclick=myOnClick;
mybutton.style.height=22;
mybutton.style.width=100;
theText=document.createTextNode("Pošalji odgovor");
mybutton.appendChild(theText);
myform.appendChild(mybutton);
el.appendChild(myform);
el.setAttribute("width", "20");
} else {
myform=document.getElementById("f"+kid);
el.removeChild(myform);
}
}
function myOnClick(e) {
myform.submit();
}
function shPrijava(obj) {
var el = document.getElementById(obj);
if ( el.style.display != "none" ) {
el.style.display = "none";
}
else {
el.style.display = "block";
}
}
//-->