var win = null; 
function NewWindow(mypage,myname,w,h,scroll){ 
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0; 
TopPosition = (screen.height) ? (screen.height-h)/2 : 0; 
settings = 
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable=no' 
win = window.open(mypage,myname,settings) 
} 

defaultStatus = 'CineTeatro Palladium'

function fullWin(url) {
	var H=screen.availHeight-60;
	var W=screen.availWidth-10;
	window.open(url+'','','left=0,top=0,width='+W+',height='+H+',resizable=1,scrollbars=1,status=1');
}

function controlla() {
	var f = document.frmMailingList;

           if (f.email.value ==""){
           alert("Inserisca l\'\indirizzo di E-Mail")
           f.email.focus();
           return false;
              }
	  if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(f.email.value) == false ){
	  alert("Inserisca un indirizzo di E-Mail valido")
	  return false;
	}
	openMessaging();
}
function openMessaging() {
		nomefinestra = 'MessagingWindow';
		larghezza = screen.availWidth;
		//  alert('larghezza='+larghezza);
		altezza = screen.availHeight;
		//  alert('altezza='+altezza);
		sinistra = 0;
		if (larghezza >= 800) {
		delta = (larghezza - 800)/2;
		//	alert(delta);
		sinistra = delta + 120;
		}
		opzioni = 'scrollbars=no,resizable=no,status=no,location=no,toolbar=no,width=600,height=220,left='+sinistra+',top=50'
		nw=window.open('',nomefinestra,opzioni);
		nw.focus();
		}

