<!--
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function box(id) {

    var id;
    document.getElementById(id).style.display='block';
document.getElementById('black_overlay').style.display='block';
    document.getElementById('fade').style.display='block';
}
function box_close(id) {
    var id;
    document.getElementById(id).style.display='none';
    document.getElementById('fade').
style.display='none'
}
function getFile(a, id, s) {
		
    if (window.XMLHttpRequest) { // code for Mozilla, Safari, etc 
        xmlhttp=new XMLHttpRequest();
    } else if (window.ActiveXObject) { //IE 
        xmlhttp=new ActiveXObject('Microsoft.XMLHTTP');
    }

    // if we have created the xmlhttp object we can send the request
    if (typeof(xmlhttp)=='object') {
	
        xmlhttp.onreadystatechange=open_ajax;
		xmlhttp.open('GET', "core_gallery/class.php?album="+a+"&id="+id+"&stran="+s, true);
        xmlhttp.send(null);	
    // otherwise display an error message
    } else {
        alert('Brskalnik ne podpira te kode. Ne morete odpreti tega programa.');
    }
}
function loadResults() {
    // put the results on the page
    document.getElementById("ajax").innerHTML = xmlhttp.responseText;

}
function open_ajax() {
		var e = document.getElementById("ajax");
        e.innerHTML = '<div style="float:right"><a href = "#close" onclick="box_close(\'ajax\')"><img src="close.png" border="0" /></a></div><div style="padding-top: 200px; width: 650px;" align="center"><img src="template/ajax.gif" alt=""></div>';
		if (xmlhttp.readyState==4) { 
        if (xmlhttp.status==200) {
            // we use a delay only for this example
            setTimeout(loadResults,200);
				}
    		}
}
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
function PopupPic(uri) { 
				window.open("core_gallery/foto.php?"+uri, "", "resizable=1,HEIGHT=200,WIDTH=200");
}
var xmlhttp

function vote(vote,str)
{

xmlhttps=GetXmlHttpObject();
if (xmlhttps==null)
  {
  alert ("Your browser does not support XMLHTTP!");
  return;
  }
var url="inc/ankete.php";
url=url+"?vote="+vote;
url=url+"&referer="+str;
url=url+"&sid="+Math.random();
xmlhttps.onreadystatechange=stateChanged;
xmlhttps.open("GET",url,true);
xmlhttps.send(null);
}

function stateChanged()
{
if (xmlhttps.readyState==4)
  {
  document.getElementById("vote").innerHTML=xmlhttps.responseText;
  }
}

function GetXmlHttpObject()
{
if (window.XMLHttpRequest)
  {
  // code for IE7+, Firefox, Chrome, Opera, Safari
  return new XMLHttpRequest();
  }
if (window.ActiveXObject)
  {
  // code for IE6, IE5
  return new ActiveXObject("Microsoft.XMLHTTP");
  }
return null;
}

vote(0,0);

//-->