

<!-- 	/* controllo form registrazione */	

function Controlla() {
	var errors='';
	var frm = document.forms['Vs_register'];
	
	if (frm.Nome.value == "")
		errors += '- Nome is required.\n';

	if (frm.Cognome.value == "")
		errors += '- Cognome is required.\n';
		
	if (frm.Azienda.value == "")
		errors += '- Azienda is required.\n';
		
	if (frm.Funzione.value == "")
		errors += '- Funzione is required.\n';
		
	if (frm.Telefono.value == "")
		errors += '- Telefono is required.\n';
		
	if (frm.email.value == "")
		errors += '- Email is required.\n';				
						
	if (!frm.tipoAzienda[0].checked	&& !frm.tipoAzienda[1].checked)
		errors += '- Domanda or Offerta is required.\n';	
		
	if (!frm.privacy.checked)
		errors += '- Privacy is required.\n';		

	if (errors) {
		alert('The following error(s) occurred:\n'+errors);
	} else {
		frm.SubmitBtn.disabled=true;
		frm.submit();
		return true;
	}	
}
//-->


<!-- metodo links
function intercetta() {
    for (var i=0; i<document.links.length; i++)
        if (document.links[i].className=="blank" | document.links[i].className=="generale_blank") {
            document.links[i].target="_blank";
        }
}
window.onload = intercetta;
//-->

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
	
	
<!-- GOOGLE MAPS

    //<![CDATA[
    function load() {

      if (GBrowserIsCompatible()) {		  		

        var map = new GMap2(document.getElementById("map_canvas"));
        map.addControl(new GSmallMapControl());
		map.addControl(new GMapTypeControl());
		
		var geocoder = new GClientGeocoder();		
		
		
		icona = new GIcon();
		icona.image = "/image/comuni/marker2.png";
		icona.iconSize = new GSize(50, 33);
		icona.iconAnchor = new GPoint(12, 34);
		icona.infoWindowAnchor = new GPoint(21, 1);

		
		geocoder.getLatLng("Via Piranesi 14 – Milano",
		  function(point) {
			if (!point) {
				alert("Via Piranesi 14 – Milano  not found");
			} else {
				map.setCenter(point, 15);
				
				var mymarker = new GMarker(point, icona)
				
				var openInfoPopUp = function(arg){ return function(evt){mymarker.openInfoWindowHtml(arg);} ;} ;
                GEvent.addListener(mymarker, "click", openInfoPopUp("Palazzo del Ghiaccio <br> Via Piranesi 14")); 				
				
				map.addOverlay(mymarker);
			}
		  });
		  
		  
		  
		icona2 = new GIcon();
		icona2.image = "/image/comuni/markerP.png";
		icona2.iconSize = new GSize(29, 33);
		icona2.iconAnchor = new GPoint(12, 34);
		icona2.infoWindowAnchor = new GPoint(21, 1);

		
		
		geocoder.getLatLng("45.4622,9.226",
		  function(point) {
			if (!point) {
				alert("Parching not found");
			} else {
				
				var mymarker = new GMarker(point, icona2)
				
				var openInfoPopUp = function(arg){ return function(evt){mymarker.openInfoWindowHtml(arg);} ;} ;
                GEvent.addListener(mymarker, "click", openInfoPopUp("Parking <br> Via Terenzio 6, angolo Viale Corsica 21")); 

				map.addOverlay(mymarker);
			}
		  });		  
      }
    }
 
// AGGIUNTA P2P
   function addLoadEvent(func) {
       var oldonload = window.onload;
       if (typeof window.onload != 'function') {
            //se all'OnLoad non è già associata una funzione allora esegui la funzione che ti passo adesso
            window.onload = func;
       } else {
            //se all'OnLoad è già associata una funzione allora ...
			window.onload = function() {
			if (oldonload) {
			// ... prima esegui la funzione che era già associata e poi ...
						 oldonload();
			}
			// ... esegui la funzione che ti passo adesso
			func();
		 }
       }
    }
// FINE AGGIUNTA P2P 
//]]>	

//-->























