
function swapClass(obj, cls) {obj.className = cls;}

function isci(a) {
	if (document.all)
		location.href= "podrocje.aspx?id=91&q=" + a;
	else
		location.href= "podrocje.aspx?id=91&q=" + a;
}

function handlePressold(a, e) {
	var key = 0;
	if (document.all)
		key = window.event.keyCode;
	else
		key = e.which;

	if (key == 13) {
		if (document.all)
			window.event.returnValue = false;
		else
			window.event.returnValue = false;
			location.href="podrocje.aspx?id=91&q=" + a.value;
	}

	return true;
}

function handlePress(a, e) {
	var key = 0;

	if (!e) {var e = window.event;}

	if (e.keyCode) {key = e.keyCode;}
	else if (e.which) {key = e.which;}
	
	//document.getElementById("test").value = key;

	if (key == 13) {
		if (document.all) {
			location.href="podrocje.aspx?id=91&q=" + a.value;
			e.returnValue = false;
			}
		else {
	//document.forms[0].test.value = a.value;
	//alert("podrocje.aspx?id=91&q=" + a.value);
			document.location.href="podrocje.aspx?id=91&q=" + a.value;
			//document.location.href="test1.htm"
			e.stopPropagation();
			e.preventDefault();	
			e.returnValue = false;
			//return false;
			//e.returnValue = false;
		}
	}

	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();
}
