
		
	// producao
	//var urlIB_Banespa = "https://netbanking2.banespa.com.br";
	var urlIB_Banespa = "https://www.santandernet.com.br";

	// desenvolvimento
	//var urlIB_Banespa   = "https://srvnetbanpi3";  // desenvolvimento

	// prova integrada HG
	//var urlIB_Banespa   = "http://bsbrsp2304";  // prova integrada HG

	// homologacao HK
	//var urlIB_Banespa   = "http://netbankinghk";  // homologacao HK

		
		
		function Enviar()
		{
			if (document.frmGovernos.txtCnpj.value == "__.___.___/____-__" || document.frmGovernos.txtCnpj.value == "")
			{
				alert("O número do CNPJ deve ser informado.");
				document.frmGovernos.txtCnpj.focus();
				return false;
			}
			if(!validaCNPJ(document.frmGovernos.txtCnpj))
			{
				alert("CNPJ Inválido.");
				document.frmGovernos.txtCnpj.focus();
				return false;
			}else{

			//	var URL = "https://netbanking2.banespa.com.br/governos/default.asp?txtcnpj=" + document.frmGovernos.txtCnpj.value;
				var URL = urlIB_Banespa + "/governos/default.asp?txtcnpj=" + document.frmGovernos.txtCnpj.value + '&oA=site';
				
				window.open(URL,  "_top");
			//	window.open(URL, "NetbankingNovo", "toolbar=yes,status=yes,menubar=yes,scrollbars=auto,resizable=yes,width=790,height=450,top=0,left=0");
				return false;
			}
		}
		
		function validaNumero(campo) 
		{
			for(var i=0;i<campo.value.length;i++)
			{
				if((campo.value.substring(i, i+1) < "0") || (campo.value.substring(i, i+1) > "9")) 
				{
					campo.value = campo.value.substring(0, i) + campo.value.substring(i+1, campo.value.length);
				}
			}
		}

		function maskField(field, mask) 
		{
			var i = 0
			var j = 0;
			var tmp = "";
		
			/*	só mascara se o tamanho do campo digitado for igual
				ao tamanho da mascara sem os separadores */
			if(field.value.length == removeLiterals(mask, false).length) 
			{
				for(i=0; i<mask.length; i++) 
				{
					if(mask.charAt(i) != "_") { tmp += mask.charAt(i); }
					else 
					{
						tmp += field.value.charAt(j);
						j++;
					}
				}
				field.maxLength = tmp.length; 
				field.value = tmp;
			}
			else if(field.value.length == 0) 
			{
				field.maxLength = mask.length;   
				field.value = mask;
			}
			else { field.maxLength = removeLiterals(mask, false).length; }       
			return;
		}

		function removeMask(field) 
		{
			var withoutMask = removeLiterals(field.value, true);
			var onlyMask = removeLiterals(field.value, false);
			if(field.value != withoutMask) 
			{
	        	if (withoutMask.length > 0) { field.maxLength = withoutMask.length; } 
	        	else
	        	{
	            	if (onlyMask.length > 0) { field.maxLength = onlyMask.length; }    
	        	}    
				field.value = withoutMask;
			}
		}

		function removeLiterals(str, underScore) 
		{
			var withoutLiterals = str;
			/* remove o underscore */
			if(underScore) { withoutLiterals = withoutLiterals.replace(/(_*)/g, ""); }
			withoutLiterals = withoutLiterals.replace(/(\.*)/g, "");
			withoutLiterals = withoutLiterals.replace(/(-*)/g, "");
			withoutLiterals = withoutLiterals.replace(/(\s*)/g, "");
			withoutLiterals = withoutLiterals.replace(/(\(*)/g, "");
			withoutLiterals = withoutLiterals.replace(/(\)*)/g, "");
			withoutLiterals = withoutLiterals.replace(/(\\*)/g, "");
			withoutLiterals = withoutLiterals.replace(/(\/*)/g, "");
			/* retorna a string passada sem os caracteres ".", "-", "(", ")", "\" e "/" */
			return withoutLiterals;
		}	

		function mover()
		{
			document.images['tudo'].src = "../../img/txt_tudo_ib_white.gif"
		}
	
		function mout()
		{
			document.images['tudo'].src = "../../img/txt_tudo_ib_red.gif"
		}

		function onMostraTudoSobregv(){
		document.getElementById('acessar').style.display = 'block';
		return;
		}

		function onInibeTudoSobregv(){
		document.getElementById('acessar').style.display = 'none';
		return;
		}

function onInibeTudoSobreg(strLink){
var iWidth = 650;
var iHeight = 450;
var iLeft;
var strFeatures;
var strURL;
var strTipo;
switch  (strLink) {
	case '1': //Primeiro Acesso Cadastramento
		strURL = '/portal/gsb/script/tudosobre/go_principal.htm?comoacessar';
		strTipo = 'TudoSobre';
		iWidth = 600;
		iHeight = 463;
		strFeatures = 'status=no,menubar=no,scrollbars=no,resizable=no,width=' + iWidth + ',height=' + iHeight + ',top=0,left=' + iLeft
		break;
	case '2': //Seguranca
		strURL = '/portal/gsb/script/tudosobre/go_principal.htm?seguranca';
		strTipo = 'TudoSobre';
		iWidth = 600;
		iHeight = 463;
		strFeatures = 'status=no,menubar=no,scrollbars=no,resizable=no,width=' + iWidth + ',height=' + iHeight + ',top=0,left=' + iLeft
		break;
	case '3': //Suporte
		strURL = '/portal/gsb/script/tudosobre/go_principal.htm?superlinha';
		strTipo = 'TudoSobre';
		iWidth = 600;
		iHeight = 463;
		strFeatures = 'status=no,menubar=no,scrollbars=no,resizable=no,width=' + iWidth + ',height=' + iHeight + ',top=0,left=' + iLeft
		break;
	}
	iLeft = (window.screen.width - iWidth) / 2; 
	window.open(strURL, strTipo, strFeatures);
}
