start = false
d = document
function isDef(S){return(eval('typeof('+S+')')!='undefined'&&eval('typeof('+S+')')!='unknown')}
function preload(imgSrc) {
	if (d.images) {
    imgObj = imgSrc.substring(imgSrc.lastIndexOf('/')+1,imgSrc.lastIndexOf('.'))
		eval(imgObj+' = new Image()')
		eval(imgObj+'.src = "'+imgSrc+'"')
	}
}
function changeImage(imgName,imgObj,layer) {
	if (d.images && start) {
		if (d.layers && layer) eval('d.'+layer+'.d.images["'+imgName+'"].src = '+imgObj+'.src')
		else d.images[imgName].src = eval(imgObj+".src")
	}
}
function makeSubMenu(secao,sitemap){
 tabela = ''
 if (sitemap) tabela+= '<div class="esq-10">'
 tabela += '<table cellspacing=0 cellpadding=0 border=0>'
 for(i=0;i<eval('links_'+secao).length;i++){
  if (!eval('links_'+secao)[i][0]) tabela += '<tr><td><img src="../_img/0.gif" width=1 height=5></td></tr>'
  tabela += '<tr>'
  if (eval('links_'+secao)[i][0]) tabela += '<td><img src="../_img/0.gif" width=1 height=1></td>'
  if (sitemap) tabela +='<td valign="top"><img src="../_img/'+((eval('links_'+secao)[i][0])?'0_00_sub_bullet':'0_00_green_arrow')+'.gif"></td>'
  else tabela += '<td valign="top"><img src="../_img/0_00_'+((eval('links_'+secao)[i][0])?'sub_':'')+'bullet'+((secao=='recompensas'&&eval('links_'+secao)[i][0])?'_rewards':'')+'.gif"></td>'
  tabela += '<td'+((eval('links_'+secao)[i][0])?'':' colspan=2')+' width=140>'+((eval('links_'+secao)[i][1])?'<a href="'+eval('links_'+secao)[i][1]+'" class="menu'+((secao=='recompensas'&&!sitemap)?'-rewards':'')+'" id="'+eval('links_'+secao)[i][3]+'">'+eval('links_'+secao)[i][2]+'</a>':'<span class="menu'+((secao=='recompensas'&&!sitemap)?'-rewards':'')+'">'+eval('links_'+secao)[i][2]+'</span>')+'</td>'+
  '</tr>'
 }
 tabela += '</table>'
 if (sitemap) tabela += '</div>'
 return tabela
 
}
function markSubMenu(){
	if (d.layers || subsecao=='home' || !isDef(subsecao)) return
	eval(subsecao).style.textDecoration = 'underline'
}
function clearLinkFocus(){
	for(i=0;i<d.links.length;i++) {
		o = d.links[i]
		o.onfocus = o.blur
	}
}
function Request(rparam){
	sLoc = d.location.toString()
	sMat = sLoc.split("=")
	sValor = ''
	for(ri=0;ri<sMat.length;ri++){
	nPos = sMat[ri].indexOf(rparam)
		if(nPos>0){
			sEnd = sMat[ri+1].indexOf('&')
			if (sMat[ri+1].indexOf('%26')!= -1) sEnd = sMat[ri+1].indexOf('%26')
			if (sEnd < 0 ) sEnd = sMat[ri+1].length
			sValor = sMat[ri+1].substr(0,sEnd)
			break
		}
	}
	return sValor
}
function pop(u,n,w,h){
	winPopup = window.open(u, n,',width='+w+',height='+h+',directories=0,location=0,menubar=0,resizable=0,scrollbars=1,status=0,toolbar=0,marginleft=0,margintop=0,left='+(((screen.width-w)/2)+-10)+',top='+(((screen.height-h)/2)+-30));
}

function verificabrowser() { // www.r2vector.com
	var requisito1 = (navigator.appName == "Netscape" && parseInt(navigator.appVersion) >= 3)
	var requisito2 = (navigator.appName.indexOf("Microsoft") >= 0 && parseInt(navigator.appVersion) >= 4)
	var necessario = requisito1 || requisito2   // ns3 e ie4
	return necessario
}

function abre_black()
{
	window.open('http://ww32.itau.com.br/blackstar/flash/index.htm','escolha','toolbar=no,left=0,top=0,width=780,height=200,location=no,Directory=no,Status=no,menubar=no,scrollbars=no,resizable=no');
}

function abre(param){
if (param==0)
{
	window.open('https://ww46.itau.com.br/itau/redeatendimento/platinum/caixasplatinum_fr.htm','agenc','toolbar=no,location=no,Directory=no,Status=no,menubar=no,scrollbar=no,resizable=no,width=380,height=450,top=0,left=0')
}
else
{
	window.open('http://ww18.itau.com.br/redeatendimento_itau/caixasitaupl_fr.htm','agenc','toolbar=no,location=no,Directory=no,Status=no,menubar=no,scrollbar=no,resizable=no,width=380,height=450,top=0,left=0')
}
}

//Promoção Itaucard Paga as suas Compras
function hotsite()
	{
	window.open('http:\\itaupersonnalite.com.br/campanhas/hotsite_cartao/cartao_final.swf','agenc','toolbar=no,location=no,Directory=no,Status=no,menubar=no,scrollbar=no,resizable=no,width=665,height=415,top=0,left=0')
	}

function privacidade()
{
Win5=window.open('http://www.itau.com.br/itau/seguranca/ind_seguranca.htm','priv');
}

function validapontos()
{
	pontos = document.frmsimulador.ipontos.value;
	if (ConsisteNumeros(pontos) == true )
	{
		if (pontos > 0)
			{				
				document.frmsimulador.pontos.value="0§" + pontos;	
				document.frmsimulador.submit();
			}
		else
			{
				alert ('A pontuação deve ser superior a zero.');
				document.frmsimulador.ipontos.focus();
			}
	}
	else	
	{
		alert ('A pontuação deve ser um número inteiro.');
		document.frmsimulador.ipontos.focus();
	}
}

function ConsisteNumeros( Valor )  
{
	if(Valor.length==0) 
		return (false);
		
	StringRef="1234567890.";
	for (Count=0; Count < Valor.length; Count++)  {
		TempChar= Valor.substring (Count, Count+1);
		if (StringRef.indexOf (TempChar, 0)==-1)  
			return (false);
	}
	return (true);
}

//Verifica qual tecla foi pressionada
function keyVerify() {
	var key;
	var tecla;
		
	if (navigator.appName.indexOf("Netscape") != -1) {
		tecla = event.which;
	}
	else {
		tecla = event.keyCode;
	}
	
	if ((tecla == 9) || (tecla == 13)) {	//Tab ou enter
		//Deve chamar a validapontos()
		validapontos();
	}
}

function deferias()
{
	window.open('http://www.itau.com.br/campanhas/cartoes/itaucard/bolso_ferias_ceu/platinum/detecta.htm', '_blank', 'width=800 height=200,directories=0,location=0,menubar=0,resizable=0,scrollbars=0,status=0,toolbar=0,marginleft=0,margintop=0,left=20,top=30');
}

function AbreAdicionais()
{
	window.parent.central.window.location.href='../2_vantagens/2_01_adicionais_00.htm';
	window.parent.topo.location.href='http://www.itau.com.br/bankline/bankline_fr.htm';
}

//Inicio função Seja Sócio Itaú
function seja_socio()
	{
		window.open('http://www.itaupersonnalite.com.br/campanhas/hotsite_socio/index.htm', '_blank','menubar=no,scrollbars=no,resizable=no,width=750,height=450,top=2,left=2');
	}
//Fim função Seja Sócio Itaú

//Inicio função Newsletter
function news()
{
	window.open('../news/default.html', '_blank','toolbar=yes,menubar=yes,scrollbars=yes,resizable=yes,width=772,height=450,top=100,left=100');
}
//Fim função Newsletter
function AbreFaturaDet()
{
	window.parent.central.location.href='../4_conveniencia/4_01_fatura_detalhada_00.htm';
	window.parent.topo.location.href='';
}
function promocoes()
{
	Win3=void(window.open('http://www.itaupersonnalite.com.br/itaupersonnalite/campanhas/cartao_diadeganhar/contrate.htm','','top=150,left=0,width=800,height=200'));
}

function pesquisa()
{
	window.open('http://www.itau.com.br/campanhas/cartoes/itaucard/pedemeia/platinum/detecta.htm','pesquisa','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=800,height=200,top=0,left=0');
}

function abrepopup(URL)
{
	window.open('https://ww46.itau.com.br/itau/alerta/aviso.jsp?lk=http://'+ URL,'alerta','toolbar=no,location=no,Directory=no,Status=no,menubar=no,scrollbar=no,resizable=no,width=708,height=412,top=0,left=0');
}