function checkForm(id,div) {
        var error = false;
	var msgError="";	
        $$('form#'+id+' .required').each(function(node){
            if (node.value == "") {
                error = true;
		msgError+="<li>El campo "+node.id+" es obligatorio</li>";
                node.style.background = "#F00";
            }
        });
        $$('form#'+id+' .email').each(function(node){
            if ((node.value.indexOf(".") > 2) && (node.value.indexOf("@") > 0)) {
		msgError+="<li>El campo "+node.id+" no tiene el formato correcto</li>";	
                error = true;
                node.style.background = "#F00";
            }
        });
        $$('form#'+id+' .numeric').each(function(node){
            var strChars = "0123456789.-";
            for (i = 0; i < node.value.length; i++) {
                strChar = node.value.charAt(i);
                if (strChars.indexOf(strChar) == -1) {
		    msgError+="<li>El campo "+node.id+" debe ser numérico</li>	>";
                    error = true;
                    node.style.background = "#F00";
                }
            }
        });
        if (error == true && div!=null) {
            document.getElementById(div).innerHTML=msgError;
        }
	return !error;
    }
   
