					function checkForm(){
					firstName=document.formChecked.firstName.value
					lastName=document.formChecked.lastName.value
					email=document.formChecked.email.value
					
					if(firstName == "" || firstName == "nome*" || firstName == null || !isNaN(firstName) || firstName.charAt(0) == ' ') {
						alert('The firstname field is required');
						return false;
					}
					else if(lastName == "" || lastName == "cognome*" || lastName == null || !isNaN(lastName) || lastName.charAt(0) == ' '){
						alert('The lastname field is required');
						return false;
					}
					else if(!indirizzoEmailValido(email)){
						alert('The email address field is required');
						return false;
					}
					else if(document.formChecked.privacy.checked==false){
						alert('Please check the terms of service box to proceed');
						return false;
					}
					else{
						return true;
					} 
				}
				function indirizzoEmailValido(indirizzo) {
				  if (window.RegExp) {
					var nonvalido = "(@.*@)|(\\.\\.)|(@\\.)|(\\.@)|(^\\.)";
					var valido = "^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,4}|[0-9]{1,3})(\\]?)$";
					var regnv = new RegExp(nonvalido);
					var regv = new RegExp(valido);
					if (!regnv.test(indirizzo) && regv.test(indirizzo))
					  return true;
					return false;
					}
				  else {
					if(indirizzo.indexOf("@") >= 0)
					  return true;
					return false;
					}
				  };
				  function asd(){
				  	var uno = document.getElementById('hide')
					if(uno.style.display=='none'){
						uno.style.display='block'
					} else{
						uno.style.display='none'
					}
				  }
				  


/* image manager */
		//<![CDATA[
		
			function basename (path) { return path.replace( /.*\//, "" ); }
	
			var winimg=null;
			function ps_imagemanager_popup(imgurl,title,w,h) {
				lpos=(screen.width)?(screen.width-w)/2:100;
				tpos=(screen.height)?(screen.height-h)/2:100;
				settings='width='+w+',height='+h+',top='+tpos+',left='+lpos+',scrollbars=no,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=yes';
				winimg=window.open('about:blank','imagemanagerpopup',settings);
	
				var doc = '';
				doc += '<html><head>';
				doc += '<title>' + title + ' - ' + basename(imgurl) + '(' + w + 'x' + h +')</title>';
				doc += '<style type="text/css"><!-- body { margin:0px; padding:0px; } --></style>';
				doc += '</head>';
				doc += '<body onload="self.focus();">';
				doc += '<img style="cursor:pointer;" src="' + imgurl + '" title="' + title + '" onclick="self.close();"/>';
				doc += '</body></html>';
				
				winimg.document.writeln(doc);
				winimg.document.close();
			}	
			
		//]]>
/* image manager */



