// Todos Scripts do Icaixa que são usados no site devem ser colocados aqui.

// script para abrir links no flash
function linkFlash(href, target){
	if (href.toLowerCase().indexOf("javascript:") != -1){
		eval(href.replace("javascript:", ""));
	}else{
		if(target == null || target == "") target = "_self";
		open(href,target);
	}
}

//window.onerror = function () {return true}

var acceptedURLS = new Array();
acceptedURLS[0] = "caixa.gov.br";
acceptedURLS[1] = "caixa.com.br";
acceptedURLS[2] = "10.192";
acceptedURLS[3] = "5399";

var accepted = false;
loc = (String(window.top.document.location.host)).toLowerCase();
for (var k = 0; k < acceptedURLS.length; k++){
	if (loc.indexOf(acceptedURLS[k]) >=0){	
		accepted = true;
		break;
	}	
}


if (top.frames.length > 0){
	if (!accepted){
		window.open(document.location, "_blank");
		document.location = "about:blank";
	}
}


window.onerror = null;
