
    function getObject(obj) {
     var theObj;
     if(document.all) {
      if(typeof obj=="string") {
       return document.all(obj);
      }
      else {
       return obj.style;
      }
     }
     if(document.getElementById) {
      if(typeof obj=="string") {
       return document.getElementById(obj);
      }
      else {
       return obj.style;
      }
     }
     return null;
    }

    function validate(obj,porDefecto) {
     var texto = obj.value;
     for(i=0 ; i < 100 ; i++) {
      texto = texto.replace(" ","");
     }
     do {
      texto = texto.replace(/\|\|/,"|");
     } while(/\|\|/.test(texto));

      if(texto.substr(0,7)!="http://" && texto.substr(0,8)!="https://")
       if(texto!='') {
        texto = "http://" + texto;
       }

     obj.value = texto;
    }