
	var Win1 = null;


   function swapClass(obj, cls) {
     obj.className = cls;
   }

function isci(a)
{
if (document.all)
	location.href= "podrocje.aspx?id=6&q=" + a;
else
	location.href= "podrocje.aspx?id=6&q=" + a;
}

function handlePress(e)
{
	code = 0;
	if(window.event)
	{	//IE
		code = e.keyCode;
		if(code == 13) e.keyCode = 0;
	}
	else if(e.which)
	{	//Firefox
			code = e.which;
	}

	if(code == 13)
	{
		location.href = "podrocje.aspx?id=6&q=" + document.myForm.q.value;
		if (e.preventDefault) e.preventDefault();
	}
}


	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 POPUP (aUrl, aName, aX, aY)
	{
    	if (Win1==null || Win1.closed)
			Win1=window.open (aUrl, aName, 'toolbar=no,width='+aX+',height='+aY+',directories=no,status=no,scrollbars=no,resize=no,menubar=no,location=no,copyhistory=no');
}

function isciPoGaleriji() {
		if (document.all)
			location.href= "podrocje.aspx?id=86&qs=" + myForm.qs.value;
		else
			location.href= "podrocje.aspx?id=86&qs=" + myForm.qs.value;
   }

function Esvetovalka()
{
		winWidth = 345;
		winHeight= 605;
		var openWin = window.open("http://sraka.uni-mb.si/esvetovalkamariborui/default.aspx","oknoSaraDruga","width="+winWidth+",height="+winHeight+",scrollbars=0,status=0");
		openWin.focus();
}


function isciAdv(myForm) {
	var machtype = "";

	for (var i = 0; i < myForm.matchtype.length; i++){
      if (myForm.matchtype[i].checked) {
         machtype = machtype + myForm.matchtype[i].value;
         break;
      }
	}

	var indeks = 0;
	indeks = myForm.podrocjeIskanja.selectedIndex;
	var podrocje = myForm.podrocjeIskanja.options[indeks].value;

	indeks = myForm.zadetkovNaStran.selectedIndex;
	var stZadetkovNaStran = myForm.zadetkovNaStran.options[indeks].value;

	location.href= "http://sraka.uni-mb.si/maribor/podrocje.aspx?id=6&q=" + myForm.iskalniNiz.value  + "&nacinIskanja=" + machtype + "&metaVirId=" + podrocje + "&datumOd=" + myForm.datumOd.value + "&datumDo=" + myForm.datumDo.value + "&stZadetkovnaStran=" + stZadetkovNaStran ;
}
/*  		STATISTIKA 			*/
function statWin(id)
{
	winWidth = 400;
	winHeight= 400;
	var openWin = window.open("stat.aspx?pid=" + id,"Stats","width="+winWidth+",height="+winHeight+",scrollbars=0,status=0");
	openWin.focus();
}

