function checkBrowser(){
	this.agt = navigator.userAgent.toLowerCase();
	this.ver = navigator.appVersion;
	this.dom = document.getElementById?1:0;
	this.linux = (this.agt.indexOf("linux")!=-1) ? 1:0;
	this.mac = (this.agt.indexOf("mac")!=-1) ? 1:0;
	this.win = (this.agt.indexOf("win")!=-1) ? 1:0;
	this.ie6 = (this.ver.indexOf("MSIE 6")>-1 && this.dom)?1:0;
	this.ie55 = (this.ver.indexOf("MSIE 5.5")>-1 && this.dom)?1:0;
	this.ie5 = (this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.ie55)?1:0;
	this.ie4 = (document.all && !this.dom) ? 1:0;
	this.ns6 = (this.dom && parseInt(this.ver) >= 5 && this.ver.indexOf("Gecko")>-1) ? 1:0;
	this.ns5 = (this.dom && parseInt(this.ver) >= 5 && !this.ns6 && !this.linux && (this.agt.indexOf('opera')==-1)) ? 1:0;
	this.ns4 = (document.layers) ? 1:0;
	this.nn = ((document.captureEvents) && (!this.dom)) ? 1:0;
	this.mz = (((this.dom) && (!document.all) && (document.documentElement)) && (this.agt.indexOf("safari")==-1)) ? 1:0;
	this.op = ((this.dom) && (this.agt.indexOf('opera')!=-1)) ? 1:0;
	this.kon = ((this.agt.indexOf("konqueror")!=-1) || (this.agt.indexOf("safari")!=-1)) ? 1:0;
	this.bw = (this.ie5 || this.ie4 || this.ns4 || this.ns5 || this.ie55 || this.ie6);
	this.os = (this.ver.indexOf("Macintosh")>-1)? "mac":"pc";
	this.ie = (this.ie5 || this.ie4 || this.ie55 || this.ie6);
	this.ns = (this.ns4 || this.ns5 || this.ns6);
	this.client = (!this.ns4) ? "ie" : "ns";
	this.iemac = (this.mac && this.ie) ? 1:0;
	return this;
}

checkBrowser.prototype.toString = function() {
	return (this.client + "_" + this.os);
}

var is = new checkBrowser();

function openPopUp(url) {
	var sp = new Object();

	screenw = window.screen.width;
	screenh = window.screen.height;

	sp.name = 'bombardier';
	sp.location = 0;
	sp.top = 'center';
	sp.left = 'center';
	sp.width = 950;
	sp.height = 660;
	sp.width_iemac = -1;
	sp.height_iemac = -1;
	sp.width_nnmac = -1;
	sp.height_nnmac = -1;
	sp.width_ie = -1;
	sp.height_ie = -1;
	sp.width_kon = -1;
	sp.height_kon = -1;
	sp.width_nn = -1;
	sp.height_nn = -1;
	sp.width_mz = -1;
	sp.height_mz = -1;
	sp.menubar = 0;
	sp.status = 0;
	sp.directories 	= 0;
	sp.scrollbars = 0;
	sp.resizable = 0;
	sp.fullscreen = -1;

	for (i = 1; i < window.openPopUp.arguments.length; i++) {
		var a = window.openPopUp.arguments[i];
		split = a.indexOf("=");
		if (split != -1) {
			v = a.substring(split + 1, a.length);
			k = a.substring(0, split);
			eval("sp." + k.replace(/ /g,"") + "='" + v.replace(/ /g,"") + "'");
		}
	}
	if (is.nn && sp.width_nn != -1) sp.width = sp.width_nn;
	if (is.nn && sp.height_nn != -1) sp.height = sp.height_nn;
	if (is.mz && sp.width_mz != -1) sp.width = sp.width_mz;
	if (is.mz && sp.height_mz != -1) sp.height = sp.height_mz;
	if (is.ie && sp.width_ie != -1) sp.width = sp.width_ie;
	if (is.ie && sp.height_ie != -1) sp.height = sp.height_ie;
	if (is.kon && sp.width_kon != -1) sp.width = sp.width_kon;
	if (is.kon && sp.height_kon != -1) sp.height = sp.height_kon;
	if (is.iemac && sp.width_iemac != -1) sp.width = sp.width_iemac;
	if (is.iemac && sp.height_iemac != -1) sp.height = sp.height_iemac;
	if (is.mac && is.nn && sp.width_nnmac != -1) sp.width = sp.width_nnmac;
	if (is.mac && is.nn && sp.height_nnmac != -1) sp.height = sp.height_nnmac;
	if (sp.top=="center") sp.top = Math.round((screenh-sp.height) / 2);
	if (sp.left=="center") sp.left = Math.round((screenw-sp.width) / 2);
	n = sp.name;
	sp.name = -1;
	sp.width_nn = -1;
	sp.height_nn = -1;
	sp.width_mz = -1;
	sp.height_mz = -1;
	sp.width_ie = -1;
	sp.height_ie = -1;
	sp.width_kon = -1;
	sp.height_kon = -1;
	sp.width_iemac = -1;
	sp.height_iemac = -1;
	a = "";

	if(sp.fullscreen=='yes'){
		sp.width = window.screen.availWidth - 10;
		sp.height = window.screen.availHeight -30;
		sp.top=0;
		sp.left=0;
		sp.fullscreen = -1;
	}

	for (p in sp) if (sp[p] != -1) a += p + "=" + sp[p] + ",";
	a = a.substring(0, a.length - 1);
	try
	{
		top[n] = window.open(url, n, a);
		top[n].focus();

		if (!top[n].opener) top[n].opener = window;

		popupHandle = top[n];
	}
	catch(e)
	{
		//alert("Popup Bloqueada!");
	}	
}