function popWindow(theURL, name, width, height) {
newWindow = window.open(theURL,name,'toolbar=no,menubar=no,resizable=yes,scrollbars=yes,status=no,location=no,width='+width+',height='+height);
newWindow.focus();}

function openPicture(imageName,imageWidth,imageHeight,alt,posLeft,posTop) {
	newWindow = window.open("","newWindow","width="+imageWidth+",height="+imageHeight+",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()" onClick="self.close()">'); 
	newWindow.document.write('<img src='+imageName+' width='+imageWidth+' height='+imageHeight+' alt="'+alt+'" >'); 
	newWindow.document.write('</body></html>');
	newWindow.document.close();
}


function testform(formular)  
{
	if (formular.jmeno.value=="" )     
{
	alert("Vetkni tam své jméno!");    
formular.jmeno.focus();    
return false;   }   

else if (formular.predmet.value=="")   
{alert("Napiš o čem píšeš!");    
formular.predmet.focus();   
return false;  
 }   
 else if (formular.zprava.value=="") 
   {alert("Moc ses nerozepsal, zkus to znovu.");   
   formular.zprava.focus();    
   return false;   
   }  
  else if (formular.email.value!="") 
   {
   	if (window.RegExp)   
    {re = new RegExp("^[^@]+@[^.]+\..+$");    
    if (!re.test(formular.email.value))    
    {
    	alert("Zadaná e-adresa není správná!");  
       formular.email.focus();  
        formular.email.select();    
         return false;    
         } 
        }   
        }
          else
             return true;
               }
            
