<!-- 
function initArray() {
    for (i=0; i<initArray.arguments.length; i++)
    this[i] = initArray.arguments[i];
}

var Mjeseci=new initArray("januar","februar","mart","april","maj","juni","juli","avgust","septembar","oktobar","novembar","decembar");
var Dani= new initArray("Nedelja","Ponedeljak","Utorak","Srijeda","Četvrtak","Petak","Subota","Nedelja");
var MjeseciCir=new initArray("&#1112;&#1072;&#1085;&#1091;&#1072;&#1088;","&#1092;&#1077;&#1073;&#1088;&#1091;&#1072;&#1088;","&#1084;&#1072;&#1088;&#1090;","&#1072;&#1087;&#1088;&#1080;&#1083;","&#1084;&#1072;&#1112;","&#1112;&#1091;&#1085;&#1080;","&#1112;&#1091;&#1083;&#1080;","&#1072;&#1074;&#1075;&#1091;&#1089;&#1090;","&#1089;&#1077;&#1087;&#1090;&#1077;&#1084;&#1073;&#1072;&#1088;","&#1086;&#1082;&#1090;&#1086;&#1073;&#1072;&#1088;","&#1085;&#1086;&#1074;&#1077;&#1084;&#1073;&#1072;&#1088;","&#1076;&#1077;&#1094;&#1077;&#1084;&#1073;&#1072;&#1088;");
var DaniCir= new initArray("&#1053;&#1077;&#1076;&#1112;&#1077;&#1113;&#1072;","&#1055;&#1086;&#1085;&#1077;&#1076;&#1112;&#1077;&#1113;&#1072;&#1082;","&#1059;&#1090;&#1086;&#1088;&#1072;&#1082;","&#1057;&#1088;&#1080;&#1112;&#1077;&#1076;&#1072;","&#1063;&#1077;&#1090;&#1074;&#1088;&#1090;&#1072;&#1082;","&#1055;&#1077;&#1090;&#1072;&#1082;","&#1057;&#1091;&#1073;&#1086;&#1090;&#1072;");

hrs=danas.getHours();
min=danas.getMinutes();
sec=danas.getSeconds();
clckh=""+((hrs>24)?hrs-24:hrs); 
clckm=((min<10)?"0":"")+min;
clcks=((sec<10)?"0":"")+sec;
var stnr="";
var ns="0123456789";
var a="";

function gb_picture(Image,imgWidth,imgHeight) {
    var border = 18;
    var img = Image;
    var features;
    var w;
    var h;
    winWidth = (imgWidth<100) ? 100 : imgWidth+border;
    winHeight = (imgHeight<100) ? 100 : imgHeight+border;
    if (imgWidth+border > screen.width) {
        winWidth = screen.width-10;
        w = (screen.width - winWidth)/2;
        features = "scrollbars=yes";      
    } else {
        w = (screen.width - (imgWidth+border))/2;
    }
    if (imgHeight+border > screen.height) {
        winHeight = screen.height-60;
        h = 0;
        features = "scrollbars=yes";      
    } else {
        h = (screen.height - (imgHeight+border))/2 - 20;
    }
    winName = (img.indexOf("t_") == -1) ? img.substr(4,(img.length-8)) : img.substr(6,(img.length-10));
    features = features+',toolbar=no,width='+winWidth+',height='+winHeight+',top='+h+',left='+w;
    theURL = '$GB_PG[base_url]/picture.php?img='+Image;
    popup = window.open(theURL,winName,features);
    popup.focus();
}

function news_picture(Image,imgWidth,imgHeight) {
    var border = 18;
    var img = Image;
    var features;
    var w;
    var h;
    winWidth = (imgWidth<100) ? 100 : imgWidth+border;
    winHeight = (imgHeight<100) ? 100 : imgHeight+border;
    if (imgWidth+border > screen.width) {
        winWidth = screen.width-10;
        w = (screen.width - winWidth)/2;
        features = "scrollbars=yes";      
    } else {
        w = (screen.width - (imgWidth+border))/2;
    }
    if (imgHeight+border > screen.height) {
        winHeight = screen.height-60;
        h = 0;
        features = "scrollbars=yes";      
    } else {
        h = (screen.height - (imgHeight+border))/2 - 20;
    }
    winName = (img.indexOf("t_") == -1) ? img.substr(4,(img.length-8)) : img.substr(6,(img.length-10));
    features = features+',toolbar=no,width='+winWidth+',height='+winHeight+',top='+h+',left='+w;
    theURL = './picture.php?img='+Image;
    popup = window.open(theURL,winName,features);
    popup.focus();
}

function getEmail(email) {
        var stringPos = false;
        var stringEmail = "";
        if (email.length>0) {
            for (var i=0; i<email.length; i++) {    
                stringPos = (i % 2) ? false : true;
                if (stringPos == true) {
                    stringEmail = stringEmail + "%" + email.charAt(i); 
                } else {
                    stringEmail = stringEmail + email.charAt(i); 
                }
            }
            stringEmail = unescape(stringEmail);
            window.location.href = stringEmail;
        }
}

function getFullYear(d) {
     yr = d.getYear();
     if (yr < 1000)
     yr+=1900;
     return yr;
}

function writeLayer(layerID,txt)
{
  if(document.getElementById)
  {
    document.getElementById(layerID).innerHTML=txt;
  }
  else if(document.all)
  {
    document.all[layerID].innerHTML=txt;
  }
  else if(document.layers)
  {
    document.layers[layerID].document.open();
    document.layers[layerID].document.write(txt);
    document.layers[layerID].document.close();
  }
}

function changeKat(th){
  th.form.kat_changed.value = '1';
  th.form.submit()
}

function changeJmp(th){
  th.form.kat_changed.value = '0';
  th.form.submit();
}

function changeProp(th){
  th.form.selprom.value = 'prop';
  th.form.submit();
}

function changeGod(th){
  th.form.selprom.value = 'god';
  th.form.submit();
}

function changeBroj(th){
  th.form.selprom.value = 'broj';
  th.form.submit();
}

function searchForm(th){
  th.selprom.value = 'search';
  return true;
}

function popUp(theURL, name) {
    popup=window.open(theURL, name);
    popup.moveTo(0,0);
    popup.resizeTo(screen.width,screen.height);
    popup.focus();
}

function popUpMap(theURL, name) {
    if (name == "") { name = 'Town map'; }
    popup=window.open(theURL, name, 'width=718,height=568,toolbar=no,scrollbars=no');
    popup.focus();
}

function popUpWin(theURL, name, rs) {
    if (rs == undefined) { rs = "no"; }
    if (name == undefined) { name = 'Municipality map'; }
    if (rs == "yes") { 
        popup=window.open(theURL, name, 'width=800,height=600,resizable=yes,menubar=yes,toolbar=yes,scrollbars=yes'); 
    }
    else { 
        popup=window.open(theURL, name, 'width=800,height=600,resizable=no,toolbar=no,scrollbars=yes'); 
    }
    popup.focus();
}

var VijestiStart=true;
var VijestiNum=0;
function scrollRow(){
    if(VijestiStart && VijestiNum!=0){
        var a;
        var b;
        var c;
        a=document.getElementById('VijestiItm'+0);
        c=a.innerHTML;
        for(var i=0;i<=VijestiNum;i++){
            if(document.getElementById('VijestiItm'+(i+1))){
                document.getElementById('VijestiItm'+i).innerHTML=document.getElementById('VijestiItm'+(i+1)).innerHTML;
            }else{
                document.getElementById('VijestiItm'+i).innerHTML=c;
            }
        }
    }
    VijestiID=setTimeout('scrollRow()',2000);
}

function scrollPixel(elementId, innerId, speeds){

    var elementDiv = document.getElementById(elementId);
    elementDiv.style.overflow = 'hidden';

    var innerDiv = document.getElementById(innerId);
    innerDiv.style.padding = elementDiv.offsetHeight + 'px' + ' 0';

    var innerDivHeight = innerDiv.offsetHeight;
    var speed = (speeds != null)? speeds : 1;
    var currpos = 0;
    
    this.startScroll = function(){
        this.slide(speed);   
    }
   
    this.stopScroll = function(){
        if (elementDiv.slideint) {
            window.clearInterval(elementDiv.slideint);
            elementDiv.slideint=null;
        }
    }

    this.slide = function(step){
        if (elementDiv.slideint) {
            window.clearInterval(elementDiv.slideint);
            elementDiv.slideint=null;
        }           
        elementDiv.slideint=window.setInterval(
            function(){   
               currpos += step;                                           
               if (currpos >= innerDivHeight - (elementDiv.offsetHeight)) { currpos=0; }                       
               elementDiv.scrollTop = currpos;  
            }            
            ,40
        );
     }       
 }
 
 //window.onerror=function(m,u,l)
 //{
 //   window.status = "Java Script Error: "+m;
 //   return true;
 //}

 var browser;            // User agent information
   
 var isOpera;            // browser "Opera"
 var isMSIE;             // browser "Internet Explorer"
 var isOldMSIE;          // browser and older version of Internet Explorer (version 6.0 or lower)    
 var isFirefox;          // browser "Firefox"
 var isSafari;           // browser "Safari"
 var navigatorVersion;   // Browser version
 var isOldMSIE;

 browser = navigator.userAgent;    
 isOpera = (this.browser.toLowerCase().indexOf('opera')>=0)?true:false;
 isFirefox = (this.browser.toLowerCase().indexOf('firefox')>=0)?true:false;
 isMSIE = (this.browser.toLowerCase().indexOf('msie')>=0)?true:false;
 isOldMSIE = (this.browser.toLowerCase().match(/msie\s[0-6]/gi))?true:false;
 isSafari = (this.browser.toLowerCase().indexOf('safari')>=0)?true:false;
 navigatorVersion = navigator.appVersion.replace(/.*?MSIE\s(\d\.\d).*/g,'$1')/1;
 isOldMSIE = (this.isMSIE&&this.navigatorVersion<7)?true:false;
 
 function getBrowserWidth() {
    if(self.innerWidth)return self.innerWidth;
    return document.documentElement.offsetWidth;        
 }

 function getBrowserHeight() {
    if(self.innerHeight)return self.innerHeight;
    return document.documentElement.offsetHeight;
 }
 
 function toggle_show(itemID){ 
    if ((document.getElementById(itemID).style.display == 'none')) 
    { 
        document.getElementById(itemID).style.display = 'inline'; 
    } else { 
        document.getElementById(itemID).style.display = 'none'; 
    } 
 } 
function setCookie(name, value, expdays) {  
  var now = new Date();
  var exp = new Date(now.getTime() + (1000*60*60*24*expdays));
  document.cookie = name + "=" + escape(value) + ";" +
                    "expires=" + exp.toGMTString() + ";" +
                    "path=/";            
}
function delCookie(name) {   
  var now = new Date();
  var exp = new Date(now.getTime() - 1);
  document.cookie = name + "=;" +
                    "expires=" + exp.toGMTString() + ";" + 
                    "path=/";
}
function getCookie(name) {
  var cname = name + "=";
  var dc = document.cookie;
  if (dc.length > 0) {
    var start = dc.indexOf(cname);
    if (start != -1) {
      start += cname.length;
      var stop = dc.indexOf(";", start);
      if (stop == -1) stop = dc.length;
      return unescape(dc.substring(start,stop));
    }
  }
  return null;
}
function InitVelFont(){
    var velFont = getCookie('velfont');
    faktor = parseFloat(velFont);
    if (faktor > 0.0 || faktor < 0.0){
        var cont = document.getElementById("content"); 
        cont.style.fontSize = faktor + "em";
    }
}
function setVelFont(faktor) {
    var cont = document.getElementById("content"); 
    var fs = cont.style.fontSize; 
    if (fs== "") fs= "1.0em";
    faktor = parseFloat(fs) + faktor;
    if (faktor > 0.5 && faktor < 1.8) {
        cont.style.fontSize = faktor + "em";
        setCookie("velfont", faktor, 14);
    }
}
function NorVelFont() {
    var cont = document.getElementById("content");
    cont.style.fontSize = "1.0em"; 
    delCookie("velfont");
}
-->


