﻿var bo_ns_id = 0;


function startIeFix(){

    if(isIE()){

        document.write('<div id="bo_ns_id_' + bo_ns_id + '"><!-- ');
    }
    
}

 

function endIeFix(){

    if(isIE()){

        document.write('</div>');

        var theObject = document.getElementById("bo_ns_id_" + bo_ns_id++);

        var theCode = theObject.innerHTML;

        theCode = theCode.substring(4 ,9+theCode.indexOf("</object>"))

        document.write(theCode); 
    }
}

 

function isIE(){ // only for Win IE 6+ // But not in Windows 98, Me, NT 4.0, 2000

    var strBrwsr= navigator.userAgent.toLowerCase();

    if(strBrwsr.indexOf("msie") > -1 && strBrwsr.indexOf("mac") < 0){

        if(parseInt(strBrwsr.charAt(strBrwsr.indexOf("msie")+5)) < 6){

            return false; 
        }

        if(strBrwsr.indexOf("win98") > -1 || strBrwsr.indexOf("win 9x 4.90") > -1 ||strBrwsr.indexOf("winnt4.0") > -1 ||strBrwsr.indexOf("windows nt 5.0") > -1)
        {
            return false;
        }

        return true;
        
    }else{
        return false; 
    }
}


// - CONTROLA FLASHS DA ÁGUA ---> ( para essa solução funcionar é necessário que haja embed nos objetos flash do topo)
/*function capturarFlash(movieName){
	if (window.document[movieName]){
		return window.document[movieName];
		}

	if (navigator.appName.indexOf("Microsoft Internet")==-1){
		if (document.embeds && document.embeds[movieName])
		return document.embeds[movieName];
		//
		} else {
		return document.getElementById(movieName);
		}
  
}

// - DISPARAR CONTROLE DO FLASHS DA ÁGUA
function acao_controle_topo(url){	
	document.getElementById('flashMovie').SetVariable('caminho',url);
	var flashMovie=capturarFlash("flashMovie");
	flashMovie.Play();
}
*/

// - CONTROLA FLASHS DA ÁGUA
function acao_controle_topo(url){
	//
	// - verifica qual movie de água se aplica o setVariable "água", "intro" , "pula intro"
	variaveis=location.search.replace(/\x3F/,"").replace(/\x2B/g," ").split("=");
	if(variaveis[1]=="no"){ 
		document.getElementById('flashMoviePulaIntro').SetVariable('caminho',url);
	}else{
		document.getElementById('flashMovie').SetVariable('caminho',url);
		}
		
}
function verificaIntro(){
	//
	// - verifica qual movie de água se aplica o setVariable "intro" , "pula intro"
	variaveis=location.search.replace(/\x3F/,"").replace(/\x2B/g," ").split("=");
	if(variaveis[1]=="no"){ 
		//alert("a")
		document.getElementById('intro').style.display="none"; 
		document.getElementById('pulaIntro').style.display="block";
		controleFlashHome();
	}else{
		//alert("b")
		document.getElementById('intro').style.display="block"; 
		document.getElementById('pulaIntro').style.display="none"; 
		}
		
}
// - CONTROLA INICIALIZAÇÂO DOS FLASHS DA HOME
function controleFlashHome()
{	  
	document.getElementById('flashsMenuHome0').style.display="block"; 
	document.getElementById('flashsMenuHome1').style.display="block"; 
	document.getElementById('flashsMenuHome2').style.display="block"; 
	document.getElementById('flashsMenuHome3').style.display="block"; 
	document.getElementById('flashDestaqueRegional').style.display="block"; 
	document.getElementById('flashDestaquePrincipal').style.display="block";
	document.getElementById('separador1').style.display="block";
	document.getElementById('separador2').style.display="block";
}



