function GM_ValidaCadastro() {
  try {
    var vValidadores = Page_Validators.length;
    var vErros = '';
    for (i = 0; i < vValidadores; i++) {
      if (!Page_Validators[i].isvalid) {
        vErros += Page_Validators[i].errormessage + '\n';
      }
    }
    if (vErros != '') {
      alert('Atenção!\n\n' + vErros);
    }
  }
  catch (err) {
    //Handle errors here
  }
}



function GM_SOH_Numeros(e) {
  var tecla;
  var caracter;
  var expressao;
  if (window.event) { // IE
    tecla = e.keyCode;
  }
  else if (e.which) { // Netscape/Firefox/Opera
    tecla = e.which;
  }
  if (tecla != 8) { // backspace   
    //event.keyCode = 0;   
    caracter = String.fromCharCode(tecla); //converte o numero da tecla para caracter
    expressao = /\d/; // expressao regular so para numeros
    return expressao.test(caracter); //este return depende do resultado do teste da expressao 
  }
  else {
    return true;
  }
}

function GM_ClickProduto_SEO(vURL_RWrite_Location) {
  document.location.href = vURL_RWrite_Location;
}


function GM_Renova_Lightbox(obj) {
  myLightbox.start(document.getElementById(obj));
  return false;
}

