//Funzioni relative al form ADSL
function checkdati_adsl() {
	if (document.form_adsl.num_tel.value=="") {
		alert("Inserire il Numero di Telefono!")
		return(false)
	}
	return true;
}

function popup_adsl() { 
	/* var h	= 490; */
	var h	= 620;
	var w	= 800;
	/* var w	= 650; */
	var sx  = (screen.width-w)/2 - 6;
	var top = (screen.height-h)/2 - 20;
	
	var num_tel		= document.form_adsl.num_tel.value; 
	var tipo_analisi= document.form_adsl.tipo_analisi.value; 
	var fase		= document.form_adsl.fase.value; 
	document.form_adsl.target = "popup_adsl";
	document.form_adsl.action = "http://adsl2.csi.telecomitalia.it/index.jsp";
/*	document.form_adsl.action = "http://adsl2.csi.telecomitalia.it/cgi-bin/adsl_isp/adsl_isp.pl?fase="+fase+"&num_tel="+num_tel+"&tipo_analisi="+tipo_analisi; */
	
	window.open("","popup_adsl", " menubar=0,locationbar=no,resizable=no,height="+h+",width="+w+",left="+sx+",top="+top); 
}

//Funzioni relative al form WHOIS
function checkdati_whois() {
	if (document.form_whois.dominio.value=="") {
		alert("Inserire il dominio!")
		return(false)
	} else {
		domain = document.form_whois.dominio.value;
		Filtro = /^([a-zA-Z0-9\-]{2,})+$/;
		if (Filtro.test(domain))
			return true;
		else {
			alert("Attenzione, inserire SOLO il dominio e selezionare l'estensione!");
			document.form_whois.dominio.focus();
			return false;
		}
	}
	return true;
}
function popup_whois() { 
	var h	= 450;
	var w	= 500;
	var sx  = (screen.width-w)/2 - 6;
	var top = (screen.height-h)/2 - 20;
	
	var dominio	= document.form_whois.dominio.value; 
	var tld		= document.form_whois.tld.value;
	document.form_whois.target = "popup_whois";
	document.form_whois.action = "http://www.uniweb.it/script/whois/whois.php?dominio="+dominio+"&tld="+tld;
	
	window.open("","popup_whois", " menubar=0,locationbar=no,resizable=yes,scrollbars=yes,height="+h+",width="+w+",left="+sx+",top="+top);
	//fin.moveTo(sx,top); 
} 

function popup_stats_web() { 
	var h	= 450;
	var w	= 500;
	var sx  = (screen.width-w)/2 - 6;
	var top = (screen.height-h)/2 - 20;
	
	window.open("/script/stats_web.php","popup_stats_web", " menubar=0,locationbar=no,resizable=yes,scrollbars=yes,height="+h+",width="+w+",left="+sx+",top="+top);
} 




//Funzioni relative al form WEBMAIL
function checkdati_webmail() {
	if (document.form_webmail.login_username.value=="") {
		alert("Inserire lo Username!")
		return(false)
	}
	if (document.form_webmail.secretkey.value=="") {
		alert("Inserire la password!")
		return(false)
	}
	return true;
}
function popup_webmail() { 
	var h	= 450;
	var w	= 700;
	var sx  = (screen.width-w)/2 - 6;
	var top = (screen.height-h)/2 - 20;
	
	window.open("","popup_adsl", "menubar=1,locationbar=1,resizable=1,location=1,scrollbars=1,status=1,toolbar=1,height="+h+",width="+w+",left="+sx+",top="+top); 
}
