
    function dv2eeFormChecker(form1,paramarray) {
        // Tenemos que obtener la versión del browser utilizada.
        switch(navigator.family) {
        case 'nn4':
			
            break;
        case 'ie4': 
        case 'gecko':
            // Versión de Netscape 6.
		for(var i=0; i<paramarray.length; i++) {
			var elm = form1.getAttribute(paramarray[i]);
		
			if (elm.type=="text"){
				
				if (elm.value.length==0){
					window.alert("Se debe especificar el campo: "+elm.name);
					return false;
				}
			}
			if (elm.type=="textarea"){
				
				if (elm.value.length==0){
					window.alert("Se debe especificar el campo: "+elm.name);
					return false;
				}
			}
			if (elm.type=="password"){
				
				if (elm.value.length==0){
					window.alert("Se debe especificar el campo: "+elm.name);
					return false;
				}
			}
			if (elm.type=="checkbox"){
				// Es un checkbox de un elemento
				if (!elm.checked){
					window.alert("Se debe especificar el campo: "+elm.name);
					return false;
				}
			}
			if (elm.type=="hidden"){
				
				if (elm.value.length==0){
					window.alert("Se debe especificar el campo: "+elm.name);
					return false;
				}
			}
			if (elm.type=="radio"){
				if (!elm.checked){
					window.alert("Se debe especificar el campo: "+elm.name);
					return false;
				}
			}
			if (elm.type=="file"){
				
				if (elm.value.length==0){
					window.alert("Se debe especificar el campo: "+elm.name);
					return false;
				}
			}
			if (elm.type=="select-multiple"){
				if (elm.selectedIndex==-1){
						window.alert("Se debe especificar el campo: "+elm.name);
						return false;
				}
				var count=0;
				for(var j=0; j<elm.length; j++) {
					if (elm.options[j].selected){
						if (elm.options[j].value!=null && elm.options[j].value!=""){
							count++
						}
					}
				}
				if (count==0){
					window.alert("Se debe especificar el campo: "+elm.name);
					return false;
				}				
			}
			
			if (elm.type=="select-one"){
				if (elm.selectedIndex==-1){
					window.alert("Se debe especificar el campo : "+elm.name);
						return false;
				}
				for(var j=0; j<elm.length; j++) {
					if (elm.options[j].selected){
						if (elm.options[j].value==null || elm.options[j].value==""){
							window.alert("Se debe especificar el campo: "+elm.name);
							return false;
						}
					}
				}
			}
        	// Tenemos que obtener la versión del browser utilizada.
        	if(navigator.family=='ie4' && navigator.version>'5.4') {
			if (elm.type==undefined){
				// Suponemos que es un array de elementos
				var isCheckbox =0;
				var isRadio=0;
				var radioChecked=0;
				var checkboxChecked=0;
				for (var k=0; k<elm.length;k++){
					if (elm[k].type=="text"){
						
						if (elm[k].value.length==0){
							window.alert("Se debe especificar el campo: "+paramarray[i]);
							return false;
						}
					}
					if (elm[k].type=="textarea"){
						
						if (elm[k].value.length==0){
							window.alert("Se debe especificar el campo: "+paramarray[i]);
							return false;
						}
					}
					if (elm[k].type=="password"){
						
						if (elm[k].value.length==0){
							window.alert("Se debe especificar el campo: "+paramarray[i]);
							return false;
						}
					}
					if (elm[k].type=="checkbox"){
						isCheckbox++;
						// Es un checkbox de un elemento
						if (elm[k].checked){
							checkboxChecked++;
						}
					}
					if (elm[k].type=="hidden"){
						
						if (elm[k].value.length==0){
							window.alert("Se debe especificar el campo: "+paramarray[i]);
							return false;
						}
					}
					if (elm[k].type=="file"){
						
						if (elm[k].value.length==0){
							window.alert("Se debe especificar el campo: "+paramarray[i]);
							return false;
						}
					}
					if (elm[k].type=="select-multiple"){
						if (elm[k].selectedIndex==-1){
							window.alert("Se debe especificar el campo: "+paramarray[i]);
							return false;
						}
						var count=0;
						for(var j=0; j<elm[k].length; j++) {
							if (elm[k].options[j].selected){
								if (elm[k].options[j].value!=null && elm[k].options[j].value!=""){
									count++
								}
							}
						}
						if (count==0){
							window.alert("Se debe especificar el campo: "+paramarray[i]);
							return false;
						}
					}
					if (elm[k].type=="select-one"){
						if (elm[k].selectedIndex==-1){
							window.alert("Se debe especificar el campo: "+paramarray[i]);
							return false;
						}
						for(var j=0; j<elm[k].options.length; j++) {
							if (elm[k].options[j].selected){
								if (elm[k].options[j].value==null || elm[k].options[j].value==""){
									window.alert("Se debe especificar el campo: "+paramarray[i]);
									return false;
								}
							}
						}
					}
					if (elm[k].type=="radio"){
						isRadio++;
						// Es un checkbox de un elemento
						if (elm[k].checked){
							radioChecked++;
						}
					}
					
				}
				if (isRadio!=0 && radioChecked==0){
					window.alert("Se debe especificar el campo: "+paramarray[i]);
					return false;
				}
				if (isCheckbox!=0 && checkboxChecked==0){
							window.alert("Se debe especificar el campo: "+paramarray[i]);
					return false;
				}

			}
			}
		}
		return true;
        }
    }

