var start_url = "http://www.id-lab.it/";

function verifica_info_it()
{

var url_match = /https?:\/\/([-\w\.]+)+(:\d+)?(\/([\w/_\.]*(\?\S+)?)?)?/;
var email_match = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*\.(\w{2}|(com|net|org|edu|int|it|eu|co.uk|biz|aero|name|coop|info|pro|museum))$/

var emailID=document.frm_informazioni.email

if(document.frm_informazioni.nome.value == "" )
	alert ("Il campo nome è obbligatorio");
  else if(document.frm_informazioni.cognome.value == "" )
	alert ("Il campo cognome è obbligatorio");
  else if(emailID.value == "")
	alert ("Inserite il vostro indirizzo e-mail");
  else if (!email_match.test(emailID.value))
	alert ("Inserite un indirizzo email valido");
  else if(document.frm_informazioni.info_richieste.value == "" )
	alert ("Il campo informazioni richieste è obbligatorio");
	
  else if(document.frm_informazioni.captcha_ver.value != document.frm_informazioni.captcha_code.value )
	alert ("Il codice di verifica non coincide");
	
  else if(document.frm_informazioni.accettazione_trattamento_dati[1].checked)
	alert ("Per proseguire è necessario accettare il trattamento dei dati");
  else
  document.frm_informazioni.submit();
}


function captchaSWF(capcode,divID)
{
	var shtml = "<object classid=\"clsid:d27CDB6E-AE6D-11cf-96B8-444553540000\"";
	shtml += " codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,79,0\"";
	shtml += "  width=\"155\" height=\"24\" id=\"simple_movie\" align=\"\">";
	shtml += " <param name=\"movie\" value=\""+start_url+"/images/captcha.swf?code="+capcode+"\">";
	shtml += " <param name=\"quality\" value=\"high\">";
	shtml += " <param name=\"bgcolor\" value=\"#EEEEEE\">";
	shtml += " <param name=\"wmode\" value=\"window\">";
	shtml += " <embed src=\""+start_url+"/images/captcha.swf?code="+capcode+"\" ";
	shtml += " quality=\"high\" bgcolor=\"#EEEEEE\" width=\"155\" height=\"24\" ";
	shtml += " name=\"simple_movie\" align=\"\" wmode=\"window\" ";
	shtml += "  type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"></embed>";
	shtml += "     </object>"
	
	document.getElementById(divID).innerHTML = shtml;
}



