var which_strip = 2;
var which_site = "TVE";
var redirect = "http://www.tvebrasil.com.br";

document.write('<STYLE TYPE="text/css"><!--');
document.write('/* Classes */');
document.write('.pipe{font-size: 14px;font-family: verdana,arial,helvetica,tahoma,sans-serif;font-weight: bold;color: #F8C300}');
document.write('a.footer:visited {color: #898989; font-weight:bold; font-size:10px; font-family: Verdana}');
document.write('a.footer:active {color: #898989; font-weight:bold; font-size:10px; font-family: Verdana}');
document.write('a.footer:hover {color: #000000; font-weight:bold; font-size:10px; font-family: Verdana}');
document.write('a.footer:link {color: #898989; font-weight:bold; font-size:10px; font-family: Verdana');

document.write('-->');
document.write('</STYLE>');

document.write('<BASE TARGET="_top">');
document.write('<TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0" WIDTH="1');
document.write('00%" BGCOLOR="#ffffff"><TR><TD ALIGN="CENTER" WIDTH="');
document.write('99%"><A CLASS="footer" HREF="http://www.tvebra');
document.write('sil.com.br/empresa/" TARGET="_top">EMPRESA</A>');
document.write('<SPAN CLASS="pipe">&nbsp;&#8226;&nbsp;</SPAN><A CLASS="foo');
document.write('ter" HREF="http://www.tvbrasil.org.br/" TARGET="_top">TV');
document.write(' BRASIL</A><SPAN CLASS="pipe">&nbsp;&#8226;&nbsp;</SP');
document.write('AN><A CLASS="footer" HREF="http://www.radiomec.com.');
document.write('br" TARGET="_top">RÁDIO MEC</A><SPAN CLASS="pip');
document.write('e">&nbsp;&#8226;&nbsp;</SPAN><A CLASS="foote');
document.write('r" HREF="http://www.tvebrasil.com.br/mapa/" T');
document.write('ARGET="_top">MAPA DO SITE</A><SPAN CLASS="pi');
document.write('pe">&nbsp;&#8226;&nbsp;</SPAN><A CLASS="foot');
document.write('er" HREF="http://www.tvebrasil.com.br/faleconosco/form');
document.write('web.asp" TARGET="_top">FALE&nbsp;CONOSCO</A>');
document.write('<SPAN CLASS="pipe">&nbsp;&#8226;&nbsp;</SPAN><A CLA');
document.write('SS="footer" HREF="http://www.tvebrasil.com.br/expe');
document.write('diente/" TARGET="_top">EXPEDIENTE</A></TR>');
document.write('<TR><TD HEIGHT="24" align="center"><SPAN STYL');
document.write('E="font: bold 10px Verdana;color:#000">Copyright©200');
document.write('7&nbsp;TV&nbsp;Brasil&nbsp;|&nbsp;Tel.:&nbsp;55-21-2117&nbsp;6200</SPAN> &nbsp;&nbsp;</TD></TR>');
document.write('<TR><TD HEIGHT="1" BGCOLOR="#FFFFFF" COLSPAN="3"><IMG SR');
document.write('C="http://www.tvebrasil.com.br/imagens/1X1clear.gif" WID');
document.write('TH=1 HEIGHT=1 ALT="" BORDER="0"></TD></TR></TABLE>');


function Is ()
{   // convert all characters to lowercase to simplify testing
    var agt=navigator.userAgent.toLowerCase();

    this.major = parseInt(navigator.appVersion);
    this.minor = parseFloat(navigator.appVersion);

    this.nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
                && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
                && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
    this.nav2 = (this.nav && (this.major == 2));
    this.nav3 = (this.nav && (this.major == 3));
    this.nav4 = (this.nav && (this.major == 4));
    this.nav4up = (this.nav && (this.major >= 4));
    this.navonly      = (this.nav && ((agt.indexOf(";nav") != -1) ||
                          (agt.indexOf("; nav") != -1)) );
    this.nav6 = (this.nav && (this.major == 5));
    this.nav6up = (this.nav && (this.major >= 5));
    this.gecko = (agt.indexOf('gecko') != -1);


    this.ie     = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
    this.ie3    = (this.ie && (this.major < 4));
    this.ie4    = (this.ie && (this.major == 4) && (agt.indexOf("msie 4")!=-1) );
    this.ie4up  = (this.ie  && (this.major >= 4));
    this.ie5    = (this.ie && (this.major == 4) && (agt.indexOf("msie 5.0")!=-1) );
    this.ie5_5  = (this.ie && (this.major == 4) && (agt.indexOf("msie 5.5") !=-1));
    this.ie5up  = (this.ie  && !this.ie3 && !this.ie4);
    this.ie5_5up =(this.ie && !this.ie3 && !this.ie4 && !this.ie5);
    this.ie6    = (this.ie && (this.major == 4) && (agt.indexOf("msie 6.")!=-1) );
    this.ie6up  = (this.ie  && !this.ie3 && !this.ie4 && !this.ie5 && !this.ie5_5);

    this.aol   = (agt.indexOf("aol") != -1);
    this.aol3  = (this.aol && this.ie3);
    this.aol4  = (this.aol && this.ie4);
    this.aol5  = (agt.indexOf("aol 5") != -1);
    this.aol6  = (agt.indexOf("aol 6") != -1);

    this.opera = (agt.indexOf("opera") != -1);
    this.opera2 = (agt.indexOf("opera 2") != -1 || agt.indexOf("opera/2") != -1);
    this.opera3 = (agt.indexOf("opera 3") != -1 || agt.indexOf("opera/3") != -1);
    this.opera4 = (agt.indexOf("opera 4") != -1 || agt.indexOf("opera/4") != -1);
    this.opera5 = (agt.indexOf("opera 5") != -1 || agt.indexOf("opera/5") != -1);
    this.opera5up = (this.opera && !this.opera2 && !this.opera3 && !this.opera4);

    this.webtv = (agt.indexOf("webtv") != -1); 

    this.TVNavigator = ((agt.indexOf("navio") != -1) || (agt.indexOf("navio_aoltv") != -1)); 
    this.AOLTV = this.TVNavigator;

    this.hotjava = (agt.indexOf("hotjava") != -1);
    this.hotjava3 = (this.hotjava && (this.major == 3));
    this.hotjava3up = (this.hotjava && (this.major >= 3));

    if (this.nav2 || this.ie3) this.js = 1.0;
    else if (this.nav3) this.js = 1.1;
    else if (this.opera5up) this.js = 1.3;
    else if (this.opera) this.js = 1.1;
    else if ((this.nav4 && (this.minor <= 4.05)) || this.ie4) this.js = 1.2;
    else if ((this.nav4 && (this.minor > 4.05)) || this.ie5) this.js = 1.3;
    else if (this.hotjava3up) this.js = 1.4;
    else if (this.nav6 || this.gecko) this.js = 1.5;

    else if (this.nav6up) this.js = 1.5;
    // note ie5up on mac is 1.4
    else if (this.ie5up) this.js = 1.3

    else this.js = 0.0;

}

var is;
var isIE3Mac = false;
// this section is designed specifically for IE3 for the Mac

if ((navigator.appVersion.indexOf("Mac")!=-1) && (navigator.userAgent.indexOf("MSIE")!=-1) && 
(parseInt(navigator.appVersion)==3))
       isIE3Mac = true;
else   is = new Is(); 


var what_site = which_site;

if ((what_site.toLowerCase() != "drv") && (what_site.toLowerCase() != "dom"))	{

	checkBrowVer();
}



function setCookie() {
var exp = new Date();
exp.setTime(exp.getTime() + 1209600000);
document.cookie = "ifiyk92817=false; path=/; expires=" + exp.toGMTString();
}

function detectCookie() {
  if(document.cookie.length > 0) {
    var cookiebegin=document.cookie.indexOf("ifiyk92817=");
    if(cookiebegin >= 0) {
      return true;
    }
  }
  return false;
}

function checkBrowVer()	{

	if (detectCookie() == false) {

	if (is.ie && !is.ie5up)	{ showPopUp() }
	else if (is.nav && !is.nav6up)	{ showPopUp() }
	else if (is.aol3 || is.aol4 || is.aol5)	{ showPopUp() }
	else if (is.opera && !is.opera5up)	{ showPopUp() }
	else if (is.hotjava && !is.hotjava3up)	{ showPopUp() }
	
	setCookie();

	}
}