var nomesf = new Array();
nomesf[0] = "frm_top";
nomesf[1] = "mid";
var nframes = 2;
var endsite = "http://www.bradescoseguranca.com.br/";

try
{
	if (parent.frames.length > 0)
	{
		if (parent.frames.length != nframes)
		 {
		   //Quantidade de frames diferente do permitido.
		   top.location.href=endsite;
		 }	
		for(x=0;x<parent.frames.length;x++)
		 {
		  if (nomesf[x] != parent.frames[x].name)
		    {
			//Nome dos Frames
			top.location.href=endsite;
			}
		 }
	}
}
catch(e)
{
	  var detect = navigator.userAgent.toLowerCase();
	  if (detect.indexOf('mac') < 1)
	  {
	   //Catch caso carrege de um iframe
	   top.location.href=endsite;
	  }
}

// Função Popup: <a href="arquivo.ext" onclick="popup(this.href,'360','535','1'); return false;"></a>
function popup(url,w,h,s) {
	var oW=window.open(url,'popup','width='+w+',height='+h+',directories=0,location=0,menubar=0,resizable=0,scrollbars='+s+',status=0,toolbar=0,marginleft=0,margintop=0,left='+(((screen.availWidth-w)/2)+-10)+',top='+(((screen.height-h)/2)+-10));
}
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
//Função para impressão
function imprimir(){
	popimpressao = window.open('', '_blank', 'width=751,height=450,left=0,top=0,scrollbars=yes,resizable=no,menubar=no,toolbar=no');

	with (popimpressao.document) {
		write('<html><head><title></title></head>');
		write('<link rel="stylesheet" href="../../css/default.css" type="text/css">');
		write('<link rel="stylesheet" href="../../css/print.css" type="text/css">');
		write('<body>');
		write(document.getElementById("impressao").innerHTML);
		write('</body></html>');
		close();
		}
        popimpressao.print();
}

// ######################################
function escrevebanner(){
	if(screen.width > 800)
	{
		document.write ('<div style="position:absolute; left:790px; z-index:1;" id="staticbuttons">');
		document.write (document.getElementById("bannerFloat").innerHTML);
		document.write ('<\/div>');
		document.write ("<scr"+"ipt src='../../js/bannerflutuante.js' type='text/javascript'><\/scr"+"ipt>");
	}}


function popFaleConoscoSAC(){
    var popup = window.open('https://institucional.bradesco.com.br/faleconosco/default.aspx?site=1&setor=sac','FaleConosco','width=820,height=505,resizable=yes,scrollbars=yes,tollbar=0,menubar=0,top=0,left=0');
   
}


