function hover(obj, state)
{
  if (state)
    obj.src = eval(obj.name + 'x.src')
  else
    obj.src = eval(obj.name + '.src')
}

function noviProzor(ime,x,y) {
  eval("window.open('slika.asp?s=" + ime + "','_blank','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width="+ x +",height="+ y +"')")
 }

function newWindow(url,width,height)
{
 eval("window.open('slika.asp?s=" + url + "','_blank','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=" + width + ",height=" + height + "')");
}

function formCheck(){
	fali = "";
	
	if (document.obrazac.ime.value == "") fali = fali + "\n- Ime";
	if (document.obrazac.adresa.value == "") fali = fali + "\n- Adresu";
	if (document.obrazac.mjesto.value == "") fali = fali + "\n- Mjesto";
	if (document.obrazac.email.value == "") fali = fali + "\n- Email";
	if (document.obrazac.poruka.value == "") fali = fali + "\n- Poruku";
	if (fali != "")
	   alert("Niste upisali sve potrebne podatke!" + "\n\n" + "Molimo upišite:" + fali)
	else
	 document.obrazac.submit();
}

if (document.all) type="IE"; 
if (document.layers) type="NN";
if (!document.all && document.getElementById) type="MO";

function ChangeObjBgImg(sPage, id, state){
  if (state) {
    if (type=="IE") document.all[id].background="../include/images/"+ sPage +"_x.gif";
    if (type=="NN") document.layer['id'].bg="../include/images/"+ sPage +"_x.gif";
    if (type=="MO") document.getElementById(id).style.background="url(../include/images/"+ sPage +"_x.gif)";
  } else {
    if (type=="IE") document.all[id].background="../include/images/"+ sPage +".gif";
    if (type=="NN") document.layer['id'].bg="../include/images/"+ sPage +".gif";
    if (type=="MO") document.getElementById(id).style.background="url(../include/images/"+ sPage +".gif)";
  }
} 

function getEl(sId) {
  return (document.all? document.all(sId): (document.getElementById? document.getElementById(sId): null));
}
