
// ******************************************************************

// Sistem Check Anti Popup
// Criado dia 08/10/2004
// São Paulo Brasil
// Desenvolido para o site www.conectbus.com.br
// por Edson Hilios (hilios@brazu.con.br) e Thiago Elias (thiago@brazu.com.br)

function checkAntiPopup()
{
	tempo = 5 //tempo de espera em segundos
	delay = tempo*100 // não alterar
	count = 0 // não alterar
	antipopup = true
	window.open('includes/check.htm','teste','width=1 ,height=1, top=3000, left=3000')
	window.focus()
	Timer()
}

function Timer()
{
	if (count >= delay && antipopup == true)
		alert("        Para melhor navegação neste site\npedimos que você desabilite o seu Anti-Popup!!")
	else if (!antipopup) { null }
	else
	{
		count++
		setTimeout("Timer()", 1)
	}
}

function callOk()
{
	window.opener.antipopup = false
	window.close();
}

// ******************************************************************

function HotSite(xId)
{
	w = 490
	h = 430
	centerX = (screen.height/2)-h/2;
	centerY = (screen.width/2)-w/2;
	window.open('hotsite/default.asp?id='+xId, 'hotsite', 'width='+w+', height='+h+',top='+centerX+', left='+centerY+'');
}

function Social(xId)
{
	w = 490
	h = 430
	centerX = (screen.height/2)-h/2;
	centerY = (screen.width/2)-w/2;
	window.open('hotsite/default.asp?id='+xId+'&ct=social', 'hotsite', 'width='+w+', height='+h+',top='+centerX+', left='+centerY+'');
}

function Noticias(xId) 
{
	w = 490
	h = 550
	centerX = (screen.height/2)-h/2;
	centerY = (screen.width/2)-w/2;
	window.open('noticias/default.asp?id='+xId, 'noticias', 'width='+w+', height='+h+',top='+centerX+', left='+centerY+'');
}

function Prestacao(xId) 
{
	w = 490
	h = 550
	centerX = (screen.height/2)-h/2;
	centerY = (screen.width/2)-w/2;
	window.open('prestacao/default.asp?id='+xId, 'prestacao', 'width='+w+', height='+h+',top='+centerX+', left='+centerY+'');
}

function latitude()
{
	w = 490
	h = 430
	centerX = (screen.height/2)-h/2;
	centerY = (screen.width/2)-w/2;
	window.open('hotsite/latitude.asp', 'latitude', 'width='+w+', height='+h+',top='+centerX+', left='+centerY+'');
}
// ******************************************************************

/*******************************************************
FLASH DETECT 2.5
All code by Ryan Parman and mjac, unless otherwise noted.
(c) 1997-2004 Ryan Parman and mjac
http://www.skyzyx.com
*******************************************************/

// This script will test up to the following version.
flash_versions = 20;

// Initialize variables and arrays
var flash = new Object();
flash.installed=false;
flash.version='0.0';

// Dig through Netscape-compatible plug-ins first.
if (navigator.plugins && navigator.plugins.length) {
	for (x=0; x < navigator.plugins.length; x++) {
		if (navigator.plugins[x].name.indexOf('Shockwave Flash') != -1) {
			flash.version = navigator.plugins[x].description.split('Shockwave Flash ')[1];
			flash.installed = true;
			break;
		}
	}
}

// Then, dig through ActiveX-style plug-ins afterwords
else if (window.ActiveXObject) {
	for (x = 2; x <= flash_versions; x++) {
		try {
			oFlash = eval("new ActiveXObject('ShockwaveFlash.ShockwaveFlash." + x + "');");
			if(oFlash) {
				flash.installed = true;
				flash.version = x + '.0';
			}
		}
		catch(e) {}
	}
}

// Create sniffing variables in the following style: flash.ver[x]
// Modified by mjac
flash.ver = Array();
for(i = 4; i <= flash_versions; i++) {
	eval("flash.ver[" + i + "] = (flash.installed && parseInt(flash.version) >= " + i + ") ? true : false;");
}

