        /** Dice si el String introducido es valido */
        function isValidString(s){
            var res = false;
            res = (s!=null)&&(s.length>0);
            return res;
        }
        
        
        /** Dice si un String es un numero */
        function isNumber(s){
            var res = false;
            try{
               var temp = parseFloat(s);
               res = true && (!isNaN(temp));
            }
            catch(e){
            }
            return res;
        }
        
        /** Obtiene el valor */
        function getValue(obj){
            var res = 0;
            if(obj != null){
                if(isNumber(obj.value)){
                    try{
                        res = parseFloat(obj.value);
                    }
                    catch(e){
                    }
                }
            }
            return res;
        }


        function deleteItem(o){
            if(o != null){
                var largoInicial  = o.length;
                var indiceInicial = o.selectedIndex;
                var i = indiceInicial;
                for(i = i; i < largoInicial -1 ; i++){
                    o[i] = new Option(o.options[i+1].text,o.options[i+1].value);
                }
                o.options[i] = null;
                o.options[largoInicial-1] = null;
                o.length = largoInicial-1;
            }
	}


        function getInputValueAsInt(cbo){
            return (cbo!=null)?cbo.value:'';
	}


	function obtenerDescripcionCombo(cbo){
            var i = cbo.selectedIndex;
            var res = "";
            if(i>=0){
		res = cbo.options[i].text;
            }
            return res;
	}



	function addItem(it,valor,cbo){
            cbo.length = cbo.length+1;
            cbo.options[cbo.length-1] = new Option(it,valor);
	}

        function validateInputInt(obj){
            if(obj!=null){
                if(isNumber(obj.value)){
                }
                else{
                    obj.value = 0;
                    alert('El numero digitado no es un entero');
                }
            }
	}



        function allSelect(){
            var list = document.getElementById('tabla');
            if (list.length && list.options[0].value == 'temp'){
                return;
            }
            for (i=0; i < list.length; i++){
                list.options[i].selected = true;
            }
            return false;
       }