
    function dv2eeFormChecker(form1,paramarray,paramarrayvalues) {
        // Tenemos que obtener la versión del browser utilizada.

        switch(navigator.family) {
        case 'nn4':
            break;
        case 'ie4': 
        case 'gecko':
		default:
            // Versión de Netscape 6.
            for(var i=0; i<paramarray.length; i++) {
            
                var elm = form1.elements[paramarray[i]];
                if (elm.type=="text"){
                    if (elm.value.length==0){
                        window.alert(paramarrayvalues[i]);
                        return false;
                    }
                }
                if (elm.type=="textarea"){
                    if (elm.value.length==0){
                        window.alert(paramarrayvalues[i]);
                        return false;
                    }   
                }
                if (elm.type=="password"){
                    if (elm.value.length==0){
                        window.alert(paramarrayvalues[i]);
                        return false;
                    }   
                }
                if (elm.type=="checkbox"){
                    // Es un checkbox de un elemento.
                    if (!elm.checked){
                        window.alert(paramarrayvalues[i]);
                        return false;
                    }
                }
                if (elm.type=="hidden"){
                    if (elm.value.length==0){
                        window.alert(paramarrayvalues[i]);
                        return false;
                    }
                }
                if (elm.type=="radio"){
                    if (!elm.checked){
                        window.alert(paramarrayvalues[i]);
                        return false;
                    }
                }
                if (elm.type=="file"){
                    if (elm.value.length==0){
                        window.alert(paramarrayvalues[i]);
                        return false;
                    }
                }
                if (elm.type=="select-multiple"){
                    if (elm.selectedIndex==-1){
                            window.alert(paramarrayvalues[i]);
                            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(paramarrayvalues[i]);
                        return false;
                    }                
                }
            
                if (elm.type=="select-one"){
                    if (elm.selectedIndex==-1){
                        window.alert(paramarrayvalues[i]);
                        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(paramarrayvalues[i]);
                                return false;
                            }
                        }
                    }
                }
            
                // Tenemos que obtener la versión del browser utilizada.
                if(elm.length!=undefined) {
                    // Suponemos que es un array de elementos
                    var isCheckbox =0;
                    var isRadio=0;
                    var isOther=0;
                    var radioChecked=0;
                    var checkboxChecked=0;
                    var nValues=0;
                    for (var k=0; k<elm.length;k++){
                        if (elm[k].type=="text"){
                            isOther++;
                            if (elm[k].value.length>0){
                                nValues++;
                            }
                        }
                        if (elm[k].type=="textarea"){
                            isOther++;
                            if (elm[k].value.length>0){
                                nValues++;
                            }
                        }
                        if (elm[k].type=="password"){
                            isOther++;
                            if (elm[k].value.length>0){
                                nValues++;
                            }
                        }
                        if (elm[k].type=="checkbox"){
                            isCheckbox++;
                            // Es un checkbox de un elemento
                            if (elm[k].checked){
                                checkboxChecked++;
                            }
                        }
                        if (elm[k].type=="hidden"){
                            isOther++;
                            if (elm[k].value.length>0){
                                nValues++;
                            }
                        }
                        if (elm[k].type=="file"){
                            isOther++;
                            if (elm[k].value.length>0){
                                nValues++;
                            }
                        }
                        if (elm[k].type=="select-multiple"){    
                            if (elm[k].selectedIndex==-1){
                                window.alert(paramarrayvalues[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(paramarrayvalues[i]);
                                return false;
                            }
                        }
                        if (elm[k].type=="select-one"){
                            if (elm[k].selectedIndex==-1){
                                window.alert(paramarrayvalues[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(paramarrayvalues[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(paramarrayvalues[i]);
                        return false;
                    }
                    if (isCheckbox!=0 && checkboxChecked==0){
                        window.alert(paramarrayvalues[i]);
                        return false;
                    }
                    if (isOther!=0 && nValues==0){
                        window.alert(paramarrayvalues[i]);
                        return false;
                    }
                }
            }
        }

        waitCursor();
        
        return true;
    }

    /**
     * Pone el cursor en estado de espera
     */
    function waitCursor() {

        /** Mecanismo que utilizamos para poner el cursor a wait **/
        if(navigator.family=="ie4") {
            document.disabled = 'true';
            document.documentElement.style.old_cursor = document.documentElement.style.cursor;
            document.documentElement.style.cursor='wait';
            var vInputs = document.getElementsByTagName("INPUT");
            for(j=0;j<vInputs.length;j++) {
                if(vInputs[j].style!=null) {
                    vInputs[j].style.old_cursor = vInputs[j].style.cursor;
                    vInputs[j].style.cursor='wait';
                }
            }
            vInputs = document.getElementsByTagName("TEXTAREA");
            for(j=0;j<vInputs.length;j++) {
                if(vInputs[j].style!=null) {
                    vInputs[j].style.old_cursor = vInputs[j].style.cursor;
                    vInputs[j].style.cursor='wait';
                }
            }
            vInputs = document.getElementsByTagName("DIV");
            for(j=0;j<vInputs.length;j++) {
                if(vInputs[j].style!=null) {
                    vInputs[j].style.old_cursor = vInputs[j].style.cursor;
                    vInputs[j].style.cursor='wait';
                }
            }
            vInputs = document.getElementsByTagName("BUTTON");
            for(j=0;j<vInputs.length;j++) {
                if(vInputs[j].style!=null) {
                    vInputs[j].style.old_cursor = vInputs[j].style.cursor;
                    vInputs[j].style.cursor='wait';
                }
            }
        }

    }



    function restoreCursor() {
        /** Mecanismo que utilizamos para poner el cursor a wait **/
        if(navigator.family=="ie4") {
            document.disabled = 'false';
            document.documentElement.style.cursor= document.documentElement.style.old_cursor;
            var vInputs = document.getElementsByTagName("INPUT");
            for(j=0;j<vInputs.length;j++) {
                if(vInputs[j].style!=null) {
                    vInputs[j].style.cursor=vInputs[j].style.old_cursor;
                }
            }
            vInputs = document.getElementsByTagName("TEXTAREA");
            for(j=0;j<vInputs.length;j++) {
                if(vInputs[j].style!=null) {
                    vInputs[j].style.cursor=vInputs[j].style.old_cursor;
                }
            }            
            vInputs = document.getElementsByTagName("DIV");
            for(j=0;j<vInputs.length;j++) {
                if(vInputs[j].style!=null) {
                    vInputs[j].style.cursor=vInputs[j].style.old_cursor;
                }
            }            
            vInputs = document.getElementsByTagName("BUTTON");
            for(j=0;j<vInputs.length;j++) {
                if(vInputs[j].style!=null) {
                    vInputs[j].style.cursor=vInputs[j].style.old_cursor;
                }
            }            
        }    
    }

    function doReset(_elem) {
        for(i=0;i<_elem.form.elements.length;i++) {
            // Recorremos todos los elementos.
            _item = _elem.form.elements.item(i);
            
            // Ignoramos los botones.
            if(_item.type == 'button' || _item.type == 'submit' || _item.type == 'reset') continue;
            if(_item.type == 'hidden') {
                // Tenemos que determinar si existe algun sub-elemento que se genere
                // a partir de ese select.
                var _select  = document.getElementById('sel'+_item.name);
                if(_select != undefined && _select!='null') {
                    // Limpiamos el SELECT, para poder seguir trabajando...
                    ec = _select.children[1].children;
                    var ecl = ec.length;
                    for (var j=0; j<ecl; j++) {
                        ec[j].removeAttribute("selected");	//Like I said. Only one selected!
                        if(ec[j].backupCss!=null) 
                            ec[j].style.cssText = ec[j].backupCss;
                    }
                    ec[0].setAttribute("selected",1);
                    _select.selectedIndex = findSelected(_select);                    
                    
                    if (ec[0].backupCss != null)
                        ec[0].style.cssText = ec[0].backupCss;
                        
                    copySelected(_select);
                    highlightSelected(_select, false);
                    _item.value = ec[0].value;
                }

            }
            
            if(_item.type == 'text') _item.value = '';
            if(_item.type == 'select-one') {
                _item.selectedIndex = 0;
            }
        }
        return false;
    
    }
