function vai_a(selezionato){
	numsel = selezionato.selectedIndex;
	this.location = "index.php?id_pubblicazione="+selezionato.options[numsel].value;
}
function validEmail(email){
	invalidChars = "/:,;";
	if (email == ""){ return false;}
	for (i=1; i<invalidChars.length; i++){
		badChar = invalidChars.charAt(i);
		if (email.indexOf(badChar,0) != -1){ return false;}
		}
	atPos = email.indexOf("@",1)
	if (atPos == -1) return false;
	if (email.indexOf("@",atPos+1) != -1) return false;
	periodPos = email.indexOf(".",atPos)
	if (periodPos == -1) return false;
	if (periodPos+3 >  email.length) return false;
	return true;
}
function apriprot(file) {
	var flash = false;
	var mimetype = 'application/x-shockwave-flash';
	if (navigator.mimeTypes) {
	   if (navigator.mimeTypes[mimetype] != null) {
		  if (navigator.mimeTypes[mimetype].enabledPlugin != null) {
			 flash = true;
		  }
	   }
	}
	if (!flash && navigator.appVersion.indexOf('MSIE') !=-1) {
		var swf = new ActiveXObject('ShockwaveFlash.ShockwaveFlash');
		if (swf) {
			flash = true;
		}
	}
	if (flash && navigator.userAgent.indexOf("Mac")==-1) {
		file = 'protagonisti.htm';
	} else {
		file = 'protagonisti_html.php';
	}
	paliwin = window.open(file, 'paliwindow', 'width=300,height=200,toolbar=0,location=0,directories=0,scrollbars=0,status=0,menubar=0,resizable=0');
	if (navigator.userAgent.indexOf("Mac")==-1) paliwin.moveTo( (screen.availwidth - 300)/2, (screen.availheight - 200)/2-50 );
	paliwin.focus();
}
