function TestForm(form)
	   {
		if ( !TestWhois(form) )
		return false;
		return true;
	   }

	function TestWhois(form)
	   {
		str = document.domainForm.dom.value;

		if ( str.indexOf('www.', 0) != -1)
		   {
			alert("\nNon inserire il www.\n\n");
			form.dom.value = "";
			document.domainForm.dom.focus();
			return false;
		   }

		if ( str.indexOf('.', 0) != -1)
		   {
			alert("\nNon inserire l'estensione del dominio.\n\n");
			form.dom.value = "";
			document.domainForm.dom.focus();
			return false;
		   }

		if ( str == "" )
		   {
			alert("\nCampo del dominio vuoto.\n\n");
			document.domainForm.dom.focus();
			return false;
		   }

		for ( var i = 0; i < str.length; i++ )
		   {
			var ch = str.substring(i, i + 1);

			if (((ch < "a" || "z" < ch) && (ch < "A" || "Z" < ch) && (ch < "0" || "9" < ch)) && ch != '-')
			   {
				alert("Il nome di dominio contiente caratteri non validi! Usare solo lettere, numeri o il segno '-'");
				form.dom.value = "";
				document.domainForm.dom.focus();
				return false;
			   }
		   }

		return true;
	   }