     
   function Validacija_Newsletter() 
 {
    var pass = true;
    var forma = document.forms.newsletter;
    
    if (forma.email.value == '' || forma.kod.value == '' || forma.operacija.value == '') 
    {
      pass = false; 
      alert('Niste ispunili obavezna polja!'); 
      forma.email.focus();     
    }
               
    if (pass == true) 
    forma.submit(); 
    
  }  
  
  function newWindow(newContent)
  {
winContent = window.open(newContent, 'korpa', 'right=0,top=20,width=520,height=500,toolbar=0,scrollbars=yes,resizable=0')

winContent.focus()
  }
  
  
 function Validacija_Pretraga() 
 {
    var forma = document.forms.pretraga;
    
    if (forma.polje.value == '') 
    {
      pass = false; 
      alert('Unesite termin za pretragu!'); 
      forma.polje.focus();     
      return false;
    }
               
     return true;    
  }  
  
  
  function ValidacijaForme() {
    var pass=true;
    for (i=0;i<document.forms.registracija.length;i++) {
      var tempobj=document.forms.registracija.elements[i];
      if ((tempobj.type=='text') && (tempobj.value=='')) {
        pass=false;
        break;
      }
    }
    if (!pass) {
      alert("Niste uneli sva obavezna polja!");
      document.forms.registracija.elements[i].focus();
    } else { document.forms.registracija.submit(); }
  } 
  
  
    
  function ValidacijaFormeKontakt() 
 {
    var pass = true;
    var forma = document.forms.kontakt;
    
    if (forma.ime.value == '' || forma.prezime.value == '' || forma.email.value == '' || forma.mesto.value == '' || forma.pismo.value == '' || forma.kod.value == '' )  
    {
      pass = false; 
      alert('Niste uneli potrebna polja!'); 
      forma.kontakt.focus();     
    }
               
    if (pass == true) 
    forma.submit(); 
    
  } 

    
  function ValidacijaFormePrijatelj() 
 {
    var pass = true;
    var forma = document.forms.prijatelj;
    
    if (forma.ime.value == '' || forma.prezime.value == '' || forma.email.value == '' || forma.prijatelj1.value == '' || forma.kod.value == '' )  
    {
      pass = false; 
      alert('Niste ispunili potrebna polja!'); 
      forma.ime.focus();
      return false;     
    }
    return true; 
    
  } 
  
   function IsNumeric(strString)
   {
   var strValidChars = "0123456789";
   var strChar;
   var blnResult = true;

   if (strString.length == 0) return false;


   //  test strString consists of valid characters listed above
   for (i = 0; i < strString.length && blnResult == true; i++)
      {
      strChar = strString.charAt(i);
      if (strValidChars.indexOf(strChar) == -1)
         {
         blnResult = false;
         }
      }
   return blnResult;
   
   
   }
   

      function prikazi_veliku_sliku(imageName,imageWidth,imageHeight,alt,posLeft,posTop) {  // v4.01
	newWindow = window.open("","newWindow","width="+imageWidth+",height="+imageHeight+",scrollbars=no,left="+posLeft+",top="+posTop);
	newWindow.document.open();
	newWindow.document.write('<html><title>'+alt+'</title><body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" onBlur="self.close()">'); 
	newWindow.document.write('<img src=\"'+imageName+'\" width='+imageWidth+' height='+imageHeight+' alt=\"'+alt+'\" title=\"'+alt+'\" />');  newWindow.document.write('</body></html>');
	newWindow.document.close();
	newWindow.focus();
}



 
