	function stoperror(){
	        return true
	}

	window.onerror=stoperror;

	function ognValidateEmail(derEmail) {

	    str = derEmail.toLowerCase( );

	    if (str.indexOf("@") > 1) {
	        var addr = str.substring(0, str.indexOf("@"));
	        var domain = str.substring(str.indexOf("@") + 1, str.length);
	        // at least one top level domain required
	        if (domain.indexOf(".") == -1) {
	            //alert("Verify the domain portion of the email address.");
	            return false;
	        }
	        // parse address portion first, character by character
	        for (var i = 0; i < addr.length; i++) {
	            oneChar = addr.charAt(i).charCodeAt(0);
	            // dot or hyphen not allowed in first position; dot in last
	            if ((i == 0 && (oneChar == 45 || oneChar == 46))  ||
	                (i == addr.length - 1 && oneChar == 46)) {
	                //alert("Verify the user name portion of the email address.");
	                return false;
	            }
	            // acceptable characters (- . _ 0-9 a-z)
	            if (oneChar == 45 || oneChar == 46 || oneChar == 95 ||
	                (oneChar > 47 && oneChar < 58) || (oneChar > 96 && oneChar < 123)) {
	                continue;
	            } else {
	                //alert("Verify the user name portion of the email address.");
	                return false;
	            }
	        }
	        for (i = 0; i < domain.length; i++) {
	            oneChar = domain.charAt(i).charCodeAt(0);
	            if ((i == 0 && (oneChar == 45 || oneChar == 46)) ||
	                ((i == domain.length - 1  || i == domain.length - 2) && oneChar == 46)) {
	                //alert("Verify the domain portion of the email address.");
	                return false;
	            }
	            if (oneChar == 45 || oneChar == 46 || oneChar == 95 ||
	                (oneChar > 47 && oneChar < 58) || (oneChar > 96 && oneChar < 123)) {
	                continue;
	            } else {
	                //alert("Verify the domain portion of the email address.");
	                return false;
	            }
	        }
	        return true;
	    }
	    //alert("The email address may not be formatted correctly. Please verify.");
	    return false;
	}

	/***
	*	Validació del formulari (camps obligatoris):
	*
	*		Afegir blocs de l'estil:
	*
	*		if(oForm.pNom.value==''){
	*			alert('Cal que indiqueu el vostre nom i cognoms');
	*			oForm.pNom.focus();
	*			return(false);
	*		}
	*
	*		i substituïr "pNom" per l'id/name del textbox/textarea corresponent
	*		així com el missatge que apareix a l'alert (Recordeu d'escapar la cometa simple amb \')
	*/

	function validarForm(oForm){


		if(oForm.pNom.value==''){
			alert('Es necesario que indique su nombre y apellidos');
			oForm.pNom.focus();
			return(false);
		}

		if(oForm.pCP.value==''){
			alert('Es necesario que indique su código postal');
			oForm.pCP.focus();
			return(false);
		}

		if(oForm.pTfn.value==''){
			alert('Es necesario que indique su número de teléfono');
			oForm.pTfn.focus();
			return(false);
		}

		if(oForm.pEmail.value==''){
			alert('Es necesario que indique su dirección de correo electrónico');
			oForm.pEmail.focus();
			return(false);
		}

		if(!ognValidateEmail(oForm.pEmail.value)){
			alert('La dirección de correo electrónico indicada no es una dirección válida');
			oForm.pEmail.focus();
			return(false);
		}

		return(true);
	}
