
/*
function ExibeFlash(src, larg, alt, vars)
{
    var strHtml = '<object id="flashId" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="' + larg + '" height="' + alt + '">';
	strHtml += '<param name="movie" value="'+ src +'" />';	
	strHtml += '<param name="allowScriptAccess" value="always">';
	strHtml += '<param name="flashvars" value="' + vars + '" />';
	strHtml += '<param name="quality" value="high" />';
	strHtml += '<param name="wmode" value="transparent" />';
	strHtml += '<embed src="' + src + '" quality="high"  flashvars="' + vars + '" allowScriptAccess="always" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + larg + '" height="' + alt + '" wmode="transparent"></embed>';
	strHtml += '</object>';
	document.write(strHtml);
}*/

function sistema() {
    var linux = false;

    if (navigator.userAgent.indexOf('Linux') != -1)
    { linux = true; }

    if (navigator.userAgent.indexOf('linux') != -1)
    { linux = true; }

    var divTopoFlash = document.getElementById("divTopoFlash");
    var divTopoImg = document.getElementById("divTopoImg");

    if (linux) {
        divTopoFlash.style.display = "none";
    }
    else {
        divTopoImg.style.display = "none";
        
        var flash = '<object id="flashtopo" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="100%" height="196">';
        flash += '<param name="movie" value="_images/topo.swf" />';
        flash += '<param name="quality" value="high" />';
        flash += '<param name="wmode" value="transparent" />';
        flash += '<embed src="_images/topo.swf" quality="high" wmode="transparent"pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="100%" height="196"></embed>';
        flash += '</object>';

        divTopoFlash.innerHTML = flash;        
    }
}

function nomeiaCampo(pCampo, pValor, pAcao) {
    if (pAcao == 0) {
        if (pCampo.value == pValor)
            pCampo.value = '';
    }

    if (pAcao == 1) { 
        if (pCampo.value == '')
            pCampo.value = pValor;
    }
}

function mostraEsconde(qual) {
    if (document.getElementById(qual).style.display == "none") {
        document.getElementById(qual).style.display = "";
    }
    else {
        document.getElementById(qual).style.display = "none";
    }
}

function mostra(theId) {
    var theArray = new Array('unidade01', 'unidade02', 'unidade03', 'unidade04', 'unidade05', 'unidade06', 'unidade07', 'unidade08', 'unidade09', 'unidade10', 'unidade11', 'unidade12');
    w = document.getElementById(theId)
    if (w.style.display == "block") { w.style.display = 'none'; } else {
        for (i = 0; i < theArray.length; i++) {
            if (theArray[i] == theId) {
                w.style.display = 'block';
            } else {
                document.getElementById(theArray[i]).style.display = 'none';
            }
        }
    }
}

function aparecer(obj) {
    var theArray = new Array('divSubMenuEmpresa', 'divSubMenuSustentavel', 'divSubMenuImprensa', 'divSubMenuRecurso', 'divSubMenuProduto', 'divSubMenuAssistencia', 'divSubMenuRevenda');

    for (i = 0; i < theArray.length; i++) {
        var elemento = document.getElementById(theArray[i]);
        if (elemento != null) {
            if (theArray[i] == obj) {
                elemento.style.display = 'block';
            } else {
                elemento.style.display = 'none';
            }
        }
    }

    //document.getElementById(obj).style.display = 'block';
}
function desaparecer(obj) {
    document.getElementById(obj).style.display = 'none';
}