function formHandler(form)
	{
		var URL = document.form.site.options[document.form.site.selectedIndex].value;
		window.location.href = URL;
	}

function controlla_config()
	{
	return true;
	}

function controlla_addcomment(authAlert, emailAlert, textAlert)
	{
	if (window.document.addcomment.autore.value=='')
		{
			alert(authAlert);
			window.document.addcomment.autore.focus();
			return false;
		}
	else
		{	
  			 var rx=new RegExp("^[\\w\.=-]+@[\\w\\.-]+\\.[a-z]{2,4}$"); //RegExp per il controllo mail ;)
			 if ((window.document.addcomment.email.value=='') || (!rx.test(window.document.addcomment.email.value)))
				{
					alert(emailAlert);
					window.document.addcomment.email.focus();
					return false;
				}
			else
				{
					if (window.document.addcomment.testo.value=='')
						{
							alert(textAlert);
							return false;
						}
					else 
						return true;
				}
		}
	}

function controlla_addblog(dataAlert, menuAlert, menuAlert, textAlert)
	{
	obj=window.document.addblog.data.value.replace(/[^\d]/g,"0");;

	gg=obj.substr(0,2)
	mm=obj.substr(3,2);
	aa=obj.substr(6,4);

	strdata=gg+"/"+mm+"/"+aa;

	data = new Date(aa,mm-1,gg);
	daa=data.getFullYear().toString();
	dmm=(data.getMonth()+1).toString();
	dmm=dmm.length==1?"0"+dmm:dmm
	dgg=data.getDate().toString();
	dgg=dgg.length==1?"0"+dgg:dgg;
	dddata=dgg+"/"+dmm+"/"+daa;
	
	if (dddata!=strdata)
		{
		alert(dataAlert);
		return false;
		}
	else
		{
		if (window.document.addblog.vocemenu.value=='')
			{
				alert(menuAlert);
				window.document.addblog.vocemenu.focus();
				return false;
			}
		else
			{
			if (window.document.addblog.titolo.value=='')
				{
					alert(menuAlert);
					window.document.addblog.titolo.focus();
					return false;
				}
			else
				{
				if (window.document.addblog.testo.value=='')
					{
						alert(textAlert);
						return false;
					}
				else
					return true; 
				}
			}
		}
	}

