var dayarray=new Array("Nedelja","Ponedeljek","Torek","Sreda","Četrtek","Petek","Sobota")
var montharray=new Array("januar","februar","marec","april","maj","junij","julij","avgust","sept.","oktober","november","december")

	function getthedate(){
		var mydate=new Date()
		var year=mydate.getYear()
		if (year < 1000)
		year+=1900
		var day=mydate.getDay()
		var month=mydate.getMonth()
		var daym=mydate.getDate()
		//if (daym<10)
		//daym="0"+daym
		var hours=mydate.getHours()
		var minutes=mydate.getMinutes()
		var seconds=mydate.getSeconds()
		
		{
		 d = new Date();
		 Time24H = new Date();
		 Time24H.setTime(d.getTime() + (d.getTimezoneOffset()*60000) + 3600000);
		 InternetTime = Math.round((Time24H.getHours()*60+Time24H.getMinutes()) / 1.44);
		 if (InternetTime < 10) InternetTime = '00'+InternetTime;
		 else if (InternetTime < 100) InternetTime = '0'+InternetTime;
		}
		if (hours==0)			hours=12
		if (minutes<=9)			minutes="0"+minutes
		if (seconds<=9)			seconds="0"+seconds
		//change font size here
		var cdate=dayarray[day]+", "+daym+". "+montharray[month]+" "+year+"  -  "+hours+":"+minutes+":"+seconds
		if (document.all)
			document.all.clock.innerHTML=cdate
		else if (document.getElementById)
				document.getElementById("clock").innerHTML=cdate
			else
				document.write(cdate)
		}

	if (!document.all&&!document.getElementById)
	getthedate()

	function goforit(){
		if (document.all||document.getElementById)
		setInterval("getthedate()",1000)
	}


   function swapClass(obj, cls) {
     obj.className = cls;
   }
   
   function isci(a) {
	if (a.length > 2)
	{
		if (document.all)
			location.href= "iskalnik.aspx?id=0&amp;lid=1060&amp;q=" + a;
		else
			location.href= "iskalnik.aspx?id=0&lid=1060&q=" + a;
	}
	else window.alert("Iskalni niz mora vsebovati vsaj 3 znake!");
   }

   function handlePress(a, e) {
		var key = 0;
		if (document.all)
			key = window.event.keyCode;
		else
			key = e.which;
		
		if (key == 13)
		{
			if (a.value.length > 2)
			{
				if (document.all)
					window.event.returnValue = false;
				else
					window.event.returnValue = false;
					
				location.href="iskalnik.aspx?id=0&lid=1060&q=" + a.value;
			}
	  		else 
				{		
					window.alert("Iskalni niz mora vsebovati vsaj 3 znake!");
				
				}
		}
		
		return true;
	}
	
	function FlashInstalled()
    {
    	result = false;
    
    	if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"])
    	{
    		result = navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin;
    	}
    	else if (document.all && (navigator.appVersion.indexOf("Mac")==-1))
    	{
    		// IE Windows only -- check for ActiveX control, have to hide code in eval from Netscape (doesn't like try)
    		eval ('try {var xObj = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");if (xObj)	result = true; xObj = null;	} catch (e)	{}');
    	}
    	return result;
    }
  	    
    function newWin(imgSrc)
	{ 
		winWidth = 200; 
		winHeight= 200; 	
		var openWin = window.open(imgSrc,"winNameHere","width="+winWidth+",height="+winHeight+",scrollbars=0,status=0"); 
		openWin.focus(); 
	} 

	function mapa(url)
	{ 
		winWidth = 600; 
		winHeight= 650; 	
		var openWin = window.open(url,"winMapa","width="+winWidth+",height="+winHeight+",scrollbars=0,status=0"); 
		openWin.focus(); 
	}
