
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>3 || 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");
			}
}
return esito
}

function PopUpPhoto(id,lang){
	var win2 = window.open('photo.asp?id=' + id + '&ver='+ lang,"PopUpPhoto","toolbar=no,directories=no,menubar=0,scrollbars=0,width="+490+",height="+480+",top=50,left=50");
	win2.focus();
}

function NewWindow(oggetto,w,h,scroll){
	var win2 = window.open(oggetto,"NewWindow","status=0,resizable=0,toolbar=no,directories=no,menubar=0,scrollbars="+scroll+",width="+w+",height="+h+",top=50,left=50")
}

