var nomesf = new Array();
nomesf[0] = "frm_top";
nomesf[1] = "mid";
var nframes = 2;
var endsite = "http://www.bradescocartoes.com.br/";

if (document.URL.indexOf('SimuladorPJ') == -1){
    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;
	      }
    }
}
var URL = parent.self.location.href;
var c = new Array();
c[0]="www.bradesco.com.br";
c[1]="d4312s022";
c[2]="10.241.5.4";
c[3]="acelerador.bradesco.com.br";
c[4]="200.246.208.5";
c[5]="200.155.80.15";
c[6]="200.155.84.15";
c[7]="200.155.88.15";
c[8]="www.bradescocartoes.com.br";
c[9]="www.cartoesbradesco.com.br";
c[10]="bradescocartoes.com.br";
c[11]="cartoesbradesco.com.br";

var localizado = 0;
for (f = 0; f <= 11; f++) { 
	if (URL.indexOf(c[f]) > 1) {
	 localizado = 1;
	}
}

if (localizado == 0) {
 top.self.location.href = 'http://www.bradescocartoes.com.br';
} 