// SARENET

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function leapto(form) {
var myindex=form.dest.selectedIndex
parent.location.href=(form.dest.options[myindex].value);
}

function getPermission() {
	return window.confirm("Desea enviar esta informacion?")
}

function CSURLPopupShow(formName, popupName, target) {
var popup = document[formName].elements[popupName];
window.open(popup.options[popup.selectedIndex].value, target);
popup.selectedIndex = 0;
}

function FrontPage_Form1_Validator(theForm)
{

  if (theForm.telef.value == "")
  {
    alert("Escriba un valor para el campo \"Número de Teléfono\".");
    theForm.telef.focus();
    return (false);
  }

  if (theForm.telef.value.length < 9)
  {
    alert("Escriba por lo menos 9 caracteres en el campo \"Número de Teléfono\".");
    theForm.telef.focus();
    return (false);
  }

  if (theForm.telef.value.length > 9)
  {
    alert("Escriba como máximo 9 caracteres en el campo \"Número de Teléfono\".");
    theForm.telef.focus();
    return (false);
  }

  var checkOK = "0123456789-";
  var checkStr = theForm.telef.value;
  var allValid = true;
  var decPoints = 0;
  var allNum = "";
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
    allNum += ch;
  }
  if (!allValid)
  {
    alert("Escriba sólo dígito caracteres en el campo \"Número de Teléfono\".");
    theForm.telef.focus();
    return (false);
  }
  return (true);
}


