function isEmail(value) {return /[\w\.\-]+@[\w\-]+\.\w+/.test(trim(value))}
function isDate(value) {return /(0[1-9]|[12[0-9]|3[01])\/(0[1-9]|1[0-2])\/[12][0-9]{3}/.test(trim(value))}
function isEmpty(value) { return (/^[\s]*$/.test(value+'')) }
function isNumber(value) { return /^[-+]?[0-9]+(,[0-9]{3})*(\.[0-9]+)?$/.test(value) }
function isTime(value) { return /^([01][0-9]|2[0-3]):[0-5][0-9]$/.test(value) }
function trim(strvar) { return ltrim(rtrim(strvar+'')) }
function ltrim(strvar) {return (strvar+'').replace(/^[\s]*/,'')}
function rtrim(strvar) {return (strvar+'').replace(/[\s]*$/,'')}



function noNumbers(e)
{
var keynum
var keychar
var numcheck

if(window.event) // IE
	{
	keynum = e.keyCode
	}
else if(e.which) // Netscape/Firefox/Opera
	{
	keynum = e.which
	}
keychar = String.fromCharCode(keynum)
numcheck = /\d/
return !numcheck.test(keychar)
}



function info() {
   window.onerror=null;
   document.pop.navigator.value = navigator.appName;
   document.pop.version.value = navigator.appVersion;
   document.pop.platform.value = navigator.platform;
}
function openWindow(url, name) {
   popupWin = window.open(url,name,"width=555,height=377,top=0,resizable=no,scrollbars=no");
}

function habilitaBotao(){
   document.getElementById("btEntrarFidelidade").disabled=false;
}

function postNCC(){
   if (isNumber(document.pop.txtCartaoFidelidade.value)){
        document.getElementById("IdArea").value=3;
	openWindow('about:blank', 'remote');
	document.pop.action="http://www.webcallcentertam.com.br/Cliente/frm_login.asp?frmPost=1&sel=WebCallCenter+TAM";
	document.pop.submit();
	document.getElementById("btEntrarFidelidade").disabled=true;
	setTimeout("habilitaBotao()",9000)
   } else {
	alert('O Cartão Fidelidade deve ser um número válido!');
	document.pop.txtCartaoFidelidade.focus();
	return false;
   }
}
