function find_object(id) {
    if (document.getElementById) { 
        if (!(document.getElementById(id))) { 
            return false; 
        } 
        return document.getElementById(id); } else return false; 
}

function show_plan(image,sprat_id) {
    var el = find_object("plan_sprata");
    if (el){
    
    }
    if (image!='no_pic'){
        el.innerHTML="<a href='images/sprat/"+image+".pdf' class='lightwindow'><img src='images/sprat/"+image+".png' alt='' /></a>";
    }
    else {
        alert('nema slike');
        el.innerHTML="<img src='images/sprat/no_pic.png' alt='' />";
    }
    //el.innerHTML="<a href='pdf.php?image="+image+" class='lightwindow'><img src='images/sprat/"+image+".png' alt='' /></a>";
}

function SetLang(cookieName,cookieValue,nDays) {
 //alert(cookieValue);
 var today = new Date();
 var expire = new Date();
 if (nDays==null || nDays==0) nDays=1;
 expire.setTime(today.getTime() + 3600000*24*nDays);
 document.cookie = cookieName+"="+escape(cookieValue)
                 + ";expires="+expire.toGMTString();
   
window.location.reload();
}
