
var menu=function(){
	var t=15,z=50,s=6,a;
	function dd(n){this.n=n; this.h=[]; this.c=[]}
	dd.prototype.init=function(p,c){
		a=c; var w=document.getElementById(p), s=w.getElementsByTagName('ul'), l=s.length, i=0;
		for(i;i<l;i++){
			var h=s[i].parentNode; this.h[i]=h; this.c[i]=s[i];
			h.onmouseover=new Function(this.n+'.st('+i+',true)');
			h.onmouseout=new Function(this.n+'.st('+i+')');
		}
	}
	dd.prototype.st=function(x,f){
		var c=this.c[x], h=this.h[x], p=h.getElementsByTagName('a')[0];
		clearInterval(c.t); c.style.overflow='hidden';
		if(f){
			p.className+=' '+a;
			if(!c.mh){c.style.display='block'; c.style.height=''; c.mh=c.offsetHeight; c.style.height=0}
			if(c.mh==c.offsetHeight){c.style.overflow='visible'}
			else{c.style.zIndex=z; z++; c.t=setInterval(function(){sl(c,1)},t)}
		}else{p.className=p.className.replace(a,''); c.t=setInterval(function(){sl(c,-1)},t)}
	}
	function sl(c,f){
		var h=c.offsetHeight;
		if((h<=0&&f!=1)||(h>=c.mh&&f==1)){
			if(f==1){c.style.filter=''; c.style.opacity=1; c.style.overflow='visible'}
			clearInterval(c.t); return
		}
		var d=(f==1)?Math.ceil((c.mh-h)/s):Math.ceil(h/s), o=h/c.mh;
		c.style.opacity=o; c.style.filter='alpha(opacity='+(o*100)+')';
		c.style.height=h+(d*f)+'px'
	}
	return{dd:dd}
}();

var denu=function(){
	var t=15,z=50,s=6,a;
	function dd(n){this.n=n; this.h=[]; this.c=[]}
	dd.prototype.init=function(p,c){
		a=c; var w=document.getElementById(p), s=w.getElementsByTagName('ul'), l=s.length, i=0;
		for(i;i<l;i++){
			var h=s[i].parentNode; this.h[i]=h; this.c[i]=s[i];
			h.onmouseover=new Function(this.n+'.st('+i+',true)');
			h.onmouseout=new Function(this.n+'.st('+i+')');
		}
	}
	dd.prototype.st=function(x,f){
		var c=this.c[x], h=this.h[x], p=h.getElementsByTagName('a')[0];
		clearInterval(c.t); c.style.overflow='hidden';
		if(f){
			p.className+=' '+a;
			if(!c.mh){c.style.display='block'; c.style.height=''; c.mh=c.offsetHeight; c.style.height=0}
			if(c.mh==c.offsetHeight){c.style.overflow='visible'}
			else{c.style.zIndex=z; z++; c.t=setInterval(function(){sl(c,1)},t)}
		}else{p.className=p.className.replace(a,''); c.t=setInterval(function(){sl(c,-1)},t)}
	}
	function sl(c,f){
		var h=c.offsetHeight;
		if((h<=0&&f!=1)||(h>=c.mh&&f==1)){
			if(f==1){c.style.filter=''; c.style.opacity=1; c.style.overflow='visible'}
			clearInterval(c.t); return
		}
		var d=(f==1)?Math.ceil((c.mh-h)/s):Math.ceil(h/s), o=h/c.mh;
		c.style.opacity=o; c.style.filter='alpha(opacity='+(o*100)+')';
		c.style.height=h+(d*f)+'px'
	}
	return{dd:dd}
}();

<!--
// Submit formularja
// Če dodaš paramater arjusure kot besedilo, te bo vprašal, če si šur
function submiter(formname,rusure) {
      if(rusure!="") {
      // If 2nd paramaeter given, ask for confirmation before submit
            var answ = confirm(rusure);
            if(answ) document.forms[formname].submit();
      }  else  {
      // if 2nd parameter is empty, just submit form
            document.forms[formname].submit();
      }
}



function jump(obj){ 
if(obj.selectedIndex != 0){ 
window.location=obj.options[obj.selectedIndex].value;
}else{
alert('Please Select!!!');
}
} 


function ParameterJump(parName,selObj,restore){ 
// /*
//##############################################################
//   Parametric URL Click'n'Jump by Labsy 4 Domino ver.1.1
//##############################################################
//
//  * Prvi parameter  "parName" 
//    pove IME url parametra, ki ga je treba spremenit
//  * Drugi parameter "selObj" 
 //   privlece sabo objekt, od koder je bila funkcija klicana
 // * Tretji parameter "restore" 
 //   pa po potrebi resetira podano vrednost
//
//### totile komentar se NE prikaze v HTML kodi ################ 
//-------------------------------------------------------------- */?>
	var params = "?";
	gotit = 0;
	var prevPairs = "";
	var searchString = document.location.search;
	searchString = searchString.substring(1);
	var nvPairs = searchString.split("&"); 	
// /* --------------------------------------------------------	
//	Dobim url string in ga razbijem na GET parametre 
//	---------------------------------------------------------- */?>
	for (i = 0; i < nvPairs.length; i++)	{
		var nvPair = nvPairs[i].split("=");
		if(params.indexOf(nvPair[0])==-1) {
			if (i > 0 && params != "?") params += "&";
// /* --------------------------------------------------------	
//	ce je to parameter, ki ga obdelujemo, mu na novo dolocim vrednost 
//	---------------------------------------------------------- */?>
			if (nvPair[0]==parName) { 	
			 	params += parName+"="+selObj.options[selObj.selectedIndex].value;
				gotit = 1;
// /* --------------------------------------------------------	
//	 ...ce ne, ga pa pustim, kot je 
//	---------------------------------------------------------- */?>
		 	} else params += nvPair[0]+"="+nvPair[1]; 	
		}
	}
// /* --------------------------------------------------------
//	Ce nasega parametra ni bilo od prej, ga pac dodam 
//	---------------------------------------------------------- */?>
	if (gotit != 1) {	
		if (params != "?") params += "&";
		params += parName+"="+selObj.options[selObj.selectedIndex].value;
	}
// /* -------------------------------------------------------- 
//	Tlele se poigram z locilom med URL stringom in parametri 
//	---------------------------------------------------------- */ ?>
	var urlFull = window.location.href;
	if (urlFull.indexOf ("?")>-1) 	{ 
		var temp = urlFull.split("?");
		var url = temp[0];
	} 
	else url = urlFull;
// /* --------------------------------------------------------
//	Na koncu pa naredim redirect celega okna na novo lokacijo 
//	---------------------------------------------------------- */?>
	eval("window.location='"+url+params+"'");
	if (restore) selObj.selectedIndex=0;
}
//-->
<!--
// Tole je za skrivanje in prikazovanje vrstice v tabeli
function toggleRow(tableId, tag){
			  if (document.getElementById(tableId).style.display == 'none') 
			  { 
				document.getElementById(tableId).style.display = ''; 
			
			  } else { 
				document.getElementById(tableId).style.display = 'none'; 
			
			  } 
}
// Tole je za prikazovanje oz. skrivanje več layerjev naenkrat
// Skrije/prikaže vse ID-je, ki imajo ID+number
// Poleg tega pa še pobolda sam link in spremeni ime linka
function toggleJezik(id,number,tag,ime) {        
	for (i=1;i!=number;i++) {          
		body=document.getElementById(id+i);          
		if (body) {          
			if (body.style.display == 'none') { 
				tag.innerHTML = "<b>"+ime+"</b>";
				
				try {              
					body.style.display='block'; 
					
				
				} catch(e) {              
					body.style.display = 'block';    
					

				}    
			} else {            
				tag.innerHTML = ime;
				body.style.display = 'none';          
			}          
		}        
	}      
}//-->
<!--
  if(window.attachEvent)
    window.attachEvent("onload",setListeners);

  function setListeners(){
    inputList = document.getElementsByTagName("INPUT");
    for(i=0;i<inputList.length;i++){
      inputList[i].attachEvent("onpropertychange",restoreStyles);
      inputList[i].style.backgroundColor = "";
    }
    selectList = document.getElementsByTagName("SELECT");
    for(i=0;i<selectList.length;i++){
      selectList[i].attachEvent("onpropertychange",restoreStyles);
      selectList[i].style.backgroundColor = "";
    }
  }

  function restoreStyles(){
    if(event.srcElement.style.backgroundColor != "")
      event.srcElement.style.backgroundColor = "";
  }//-->
  

// jumpmenu
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}


//popup okno za slike

var newwindow = '';

function popitup(url) {
	if (!newwindow.closed && newwindow.location) {
		newwindow.location.href = url;
	}
	else {
		newwindow=window.open(url,"tarca","width=600,height=600,menubar=0,scrollbars=no,resizable=0,status=0,titlebar=0,toolbar=0,left=0,top=0");
		if (!newwindow.opener) newwindow.opener = self;
	}
	if (window.focus) {newwindow.focus()}
}

//<!-- Potrditev logoff
function confirmLogoff() {
	var odgovor = confirm("Se res želiš odjaviti?");
	if(!odgovor) return false;
}

// Potrditev česarkoli
function confirmAnything(besedil) {
	var odgovor = confirm(besedil);
	if(!odgovor) return false;
}

// Submit formularja
// Če dodaš paramater arjusure kot besedilo, te bo vprašal, če si šur
function submiter(formname,rusure) {
      if(rusure!="") {
      // If 2nd paramaeter given, ask for confirmation before submit
            var answ = confirm(rusure);
            if(answ) document.forms[formname].submit();
      }  else  {
      // if 2nd parameter is empty, just submit form
            document.forms[formname].submit();
      }
}

// Kopiranje na clipboard
function copy_clip(mytext)
{
 if (window.clipboardData) 
   {
   window.clipboardData.setData("Text", mytext);
   }
   else if (window.netscape) 
   { 
   netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
   var clip = Components.classes['@mozilla.org/widget/clipboard;1']
                 .createInstance(Components.interfaces.nsIClipboard);
   if (!clip) return;
   var trans = Components.classes['@mozilla.org/widget/transferable;1']
                  .createInstance(Components.interfaces.nsITransferable);
   if (!trans) return;
   trans.addDataFlavor('text/unicode');
   var str = new Object();
   var len = new Object();
   var str = Components.classes["@mozilla.org/supports-string;1"]
                .createInstance(Components.interfaces.nsISupportsString);
   var copytext=mytext;
   str.data=copytext;
   trans.setTransferData("text/unicode",str,copytext.length*2);
   var clipid=Components.interfaces.nsIClipboard;
   if (!clip) return false;
   clip.setData(trans,null,clipid.kGlobalClipboard);
   }
   return false;
}

// tole je za prikaz dropdown menija v adminu in dominu
// window.onload=show;
function show(id) {
var d = document.getElementById(id);
	for (var i = 1; i<=10; i++) {
		if (document.getElementById('smenu'+i)) {document.getElementById('smenu'+i).style.display='none';}
	}
if (d) {d.style.display='block';}
}



function show_row(a){ 
    // Make sure the element exists before calling it's properties 
    if (document.getElementById(a) != null) 
      // Toggle visibility between none and inline 
      if (document.getElementById(a).style.display == 'none') 
      { 
        document.getElementById(a).style.display = 'inline-block'; 
      } else { 
        document.getElementById(a).style.display = 'none'; 
      } 
} 

// tuki je za namig popup
var horizontal_offset="9px" //horizontal offset of hint box from anchor link
var vertical_offset="0" //horizontal offset of hint box from anchor link. No need to change.
var ie=document.all
var ns6=document.getElementById&&!document.all

function getposOffset(what, offsettype){
	var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
	var parentEl=what.offsetParent;
	while (parentEl!=null){
		totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
		parentEl=parentEl.offsetParent;
	}
	return totaloffset;
}

function iecompattest(){
	return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
	var edgeoffset=(whichedge=="rightedge")? parseInt(horizontal_offset)*-1 : parseInt(vertical_offset)*-1
	if (whichedge=="rightedge"){
		var windowedge=ie && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-30 : window.pageXOffset+window.innerWidth-40
		dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
		if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
		edgeoffset=dropmenuobj.contentmeasure+obj.offsetWidth+parseInt(horizontal_offset)
	}
	else {
		var windowedge=ie && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
		dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
		if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure)
		edgeoffset=dropmenuobj.contentmeasure-obj.offsetHeight
	}
	return edgeoffset
}

function showhint(menucontents, obj, e, tipwidth){
	if ((ie||ns6) && document.getElementById("hintbox")){
		dropmenuobj=document.getElementById("hintbox")
		dropmenuobj.innerHTML=menucontents
		dropmenuobj.style.left=dropmenuobj.style.top=-500
		if (tipwidth!=""){
			dropmenuobj.widthobj=dropmenuobj.style
			dropmenuobj.widthobj.width=tipwidth
		}
		dropmenuobj.x=getposOffset(obj, "left")
		dropmenuobj.y=getposOffset(obj, "top")
		dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+obj.offsetWidth+"px"
		dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+"px"
		dropmenuobj.style.visibility="visible"
		obj.onmouseout=hidetip
	}
}

function hidetip(e){
	dropmenuobj.style.visibility="hidden"
	dropmenuobj.style.left="-500px"
}

function createhintbox(){
	var divblock=document.createElement("div")
	divblock.setAttribute("id", "hintbox")
	document.body.appendChild(divblock)
}

if (window.addEventListener)
	window.addEventListener("load", createhintbox, false)
else if (window.attachEvent)
	window.attachEvent("onload", createhintbox)
else if (document.getElementById)
	window.onload=createhintbox

//prikaže koliko črk še lahko v polje vpišemo
var ns6=document.getElementById&&!document.all

function restrictinput(maxlength,e,placeholder){
	if (window.event&&event.srcElement.value.length>=maxlength)
		return false
	else if (e.target&&e.target==eval(placeholder)&&e.target.value.length>=maxlength){
		var pressedkey=/[a-zA-Z0-9\.\,\/]/ //detect alphanumeric keys
	if (pressedkey.test(String.fromCharCode(e.which)))
		e.stopPropagation()
	}
}

function countlimit(maxlength,e,placeholder){
	var theform=eval(placeholder)
	var lengthleft=maxlength-theform.value.length
	var placeholderobj=document.all? document.all[placeholder] : document.getElementById(placeholder)
	if (window.event||e.target&&e.target==eval(placeholder)){
	if (lengthleft<0)
	theform.value=theform.value.substring(0,maxlength)
	placeholderobj.innerHTML=lengthleft
	}
}


function displaylimit(thename, theid, thelimit){
	var theform=theid!=""? document.getElementById(theid) : thename
	var limit_text='<span id="'+theform.toString()+'">'+thelimit+'</span> znakov'
	if (document.all||ns6)
	document.write(limit_text)
	if (document.all){
	eval(theform).onkeypress=function(){ return restrictinput(thelimit,event,theform)}
	eval(theform).onkeyup=function(){ countlimit(thelimit,event,theform)}
	}
	else if (ns6){
	document.body.addEventListener('keypress', function(event) { restrictinput(thelimit,event,theform) }, true); 
	document.body.addEventListener('keyup', function(event) { countlimit(thelimit,event,theform) }, true); 
	}
}


//-->
