function NewWindow(oggetto,w,h,scroll){
	var win2 = window.open(oggetto,"NewWindow","toolbar=no,directories=no,menubar=0,scrollbars="+scroll+",width="+w+",height="+h+",top=50,left=50")
}

function emailValidation(frm,Lang){
var esito = true;
with (frm.txtMail){
 	if (value.length > 0){
		apos=value.indexOf("@"); 
		dotpos=value.lastIndexOf(".");
		lastpos=value.length-1;
		spacepos=value.indexOf(" ");
		if (apos<1 || dotpos-apos<2 || lastpos-dotpos>4 || lastpos-dotpos<2 || spacepos>-1) {		
			esito = false;
		}
	}
}

if (esito==false)
{

			if (Lang=="it")
			{
				alert("e-mail non valida");
			}
			if (Lang=="en")
			{
				alert("e-mail not valid");
			}
			if (Lang=="de")
			{
				alert("e-mail Adresse nicht Korrekt");
			}
			if (Lang=="fr")
			{
				alert("e-mail non valables");
			}
			if (Lang=="es")
			{
				alert("e-mail no válida");
			}
}

return esito
}


function printit(){  
if (NS) {
    window.print() ;  
} else {
    var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
document.body.insertAdjacentHTML('beforeEnd', WebBrowser);
    WebBrowser1.ExecWB(6, 2);
WebBrowser1.outerHTML = "";  
}
}


function checkSpam(frm){
	check_form = true;
   EmailAddr = frm.txtMail.value;
   Filtro = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-]{2,})+\.)+([a-zA-Z0-9]{2,})+$/;
   if (!Filtro.test(EmailAddr)) { check_form=false }
   Utente = frm.txtNominativo.value;	
	Filtro = /^([a-zA-Z0-9_\.\-\s\'\à?\è\à?\ù\ò\ì])+$/;	
   if (!Filtro.test(Utente)) { check_form=false }
   Messaggio = frm.txtMessaggio.value;	
	Filtro = /^([a-zA-Z0-9_\.\-\s\'\"\?\!\+\*\à?\è\à?\ù\ò\ì\;\:\,\/])+$/;
   if (!Filtro.test(Messaggio)) { check_form=false }    	
	return check_form;
}
