<!--
var nep_forma = "";

function IEhover(){
	if(document.getElementsByTagName) {
	  (function() {
		var className = 'ieHover',
			pattern   = new RegExp('(^|\\s+)' + className + '(\\s+|$)'),
			rows      = document.getElementsByTagName('tr');	
		for(var i = 0, n = rows.length; i < n; ++i) {
		  rows[i].onmouseover = function() {
			this.className += ' ' + className;
		  };
		  rows[i].onmouseout = function() {
			this.className = this.className.replace(pattern, ' ');
		  };
		}
		rows = null;
	  })();
	}
}

// provjera forme kod prijave na nep oglase
function checkFrm(form) {
	if (form.email.value == '') {
		alert ("Polje 'E-mail' je potrebno izpolniti!");
		form.email.focus();
		return false;
	}
	if (!(isEmail1.test(form.email.value) && isEmail2.test(form.email.value))) {
		alert ('Vpisan e-naslov ni prave oblike - prosimo ponovno ga preverite!');
		form.email.focus();
		return false;
	}
	
}
isEmail1    = /^\w+([\.\-]\w+)*\@\w+([\.\-]\w+)*\.\w+$/;
isEmail2    = /^.*@[^_]*$/;


// show/hide za nep oglase formu
function nepForma(){
	id = "formNepNovice";
	idLink = "formNepLink";
	if(document.getElementById && nep_forma!='full'){
		if(document.getElementById(id)){
			if(document.getElementById(id).style.display=="none"){
				document.getElementById(id).style.display="";
//				change_regija2
//				change_regija2(document.getElementById(id).drzava.value);
				if(document.getElementById(idLink)){
					document.getElementById(idLink).style.display="none";
				}
			}else{
				document.getElementById(id).style.display="none";
				if(document.getElementById(idLink)){
					document.getElementById(idLink).style.display="block";
				}
			}
		}
	}
}

		function change_regija2(drzava_id) {
			a= document.formNepNovice.regija;
			a.selectedIndex=0;
			var i= 0;
			if (drzave[drzava_id]){
				for(var x in drzave[drzava_id]) {
					a.options[i]=new Option(drzave[drzava_id][x], x);
					i++;
				}
				a.length=i;
				a.disabled= false;
			}else{
				a.length=0;
				a.disabled= true;
			}
		}
	   
window.onload = function() {
	nepForma();
	IEhover();
	if(document.getElementById){
		if(document.getElementById('formNepNovice')){
			change_regija2(document.getElementById('formNepNovice').drzava.value);
		}
	}
	
	
}
//addEvent(window, 'load', nepForma);
//addEvent(window, 'load', IEhover);

-->