//Verifica se o telefone está no formato correto 9999-9999
function IsTelefone(strTelefone){
      var r = new RegExp("([0-9][0-9][0-9]-[0-9][0-9][0-9][0-9])|([0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9])|([0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])|([0-9][0-9][0-9][0-9][0-9][0-9][0-9])");
      

      if (strTelefone==""){
         return false;
      }
      
      //Verifica se o telefone é válido
      var arrResultado = strTelefone.match(r); 
      if (arrResultado != null && arrResultado.length > 0 && arrResultado[0] == strTelefone)
         return true;
      else
         return false;
}


