// JavaScript para exibir o flash

function statusDiv(check, idDiv){
	if(check.checked)
		document.getElementById(idDiv).style.visibility = "visible";
	else
		document.getElementById(idDiv).style.visibility = "hidden";
}

function mudaCheckBox(campo, valor){
	campo.checked = valor == "true";
}

function mudarSelect(campo, valor){
	for(var i = 0; i < campo.length; i++){
		if(campo[i].value == valor){
			campo[i].selected = true;
			break;
		}
	}
}

function mudarSelectMultiple(campo, valores){
	for(var i = 0; i < valores.length; i++){
		for(var j = 0; j < campo.options.length; j++){
			if(campo.options[j].value == valores[i]){
				campo.options[j].selected = true;
				break;
			}
		}
	}
}

function lightUp(id) {
	document.getElementById(id).style.background = "#00c7e6";
}

function dimDown(id) {
	document.getElementById(id).style.background = "#e8eff5";
} 

/*on:marca menu */
function marcaUp(id) {
	document.getElementById(id).style.background = "#00c7e6";
	var endereco = document.getElementById(id+"img").src.substring(0, document.getElementById(id+"img").src.indexOf("tit"));
	document.getElementById(id+"img").src = endereco + "tit_"+ id +"_on.gif";
}

function marcaDown(id) {
	document.getElementById(id).style.background = "#e8eff5";
	var endereco = document.getElementById(id+"img").src.substring(0, document.getElementById(id+"img").src.indexOf("tit"));
	document.getElementById(id+"img").src = endereco + "tit_"+ id +"_off.gif";
} 
/*off:marca menu */

/*on:marca menu */
function marcaUpDica(id) {
	document.getElementById(id).style.background = "#00c7e6";
	var endereco = document.getElementById(id+"img").src.substring(0, document.getElementById(id+"img").src.indexOf("tit"));
	document.getElementById(id+"img").src = endereco + "tit_"+ id +"_on.gif";
}

function marcaDownDica(id) {
	document.getElementById(id).style.background = "#e8eff5";
	var endereco = document.getElementById(id+"img").src.substring(0, document.getElementById(id+"img").src.indexOf("tit"));
	document.getElementById(id+"img").src = endereco + "tit_"+ id +"_off.gif";
} 
/*off:marca menu */

/*on:marca menu */
function marcaUpImg(id, img) {
	document.getElementById(id).style.background = "#00c7e6";
	var endereco = document.getElementById(id+"img").src.substring(0, document.getElementById(id+"img").src.indexOf("tit"));
	document.getElementById(id+"img").src = endereco + "tit_"+ img +"_on.gif";
}

function marcaDownImg(id, img) {
	document.getElementById(id).style.background = "#e8eff5";
	var endereco = document.getElementById(id+"img").src.substring(0, document.getElementById(id+"img").src.indexOf("tit"));
	document.getElementById(id+"img").src = endereco + "tit_"+ img +"_off.gif";
} 
/*off:marca menu */

function swfobject(largura, altura, arquivo){
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+largura+'" height="'+altura+'" id="teste" align="middle" valign="middle">');
	document.write('<param name="allowScriptAccess" value="sameDomain" /><param name="wmode" value="transparent" />');
	document.write('<param name="movie" value="'+arquivo+'" /><param name="quality" value="best" /><param name="bgcolor" value="#ffffff" /><embed src="'+arquivo+'" wmode="transparent" quality="best" width="'+largura+'" height="'+altura+'" name="teste" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	document.write('</object>');
}

function alterarImagem(elemento, imagem){
	elemento.src=imagem;
}

var handlePrevButtonState = function(type, args) {

    var enabling = args[0];
    var leftImage = args[1];
    if(enabling) {
        leftImage.src = "../img/left-enabled.gif";    
    } else {
        leftImage.src = "../img/left-disabled.gif";    
    }
    
};

var handleNextButtonState = function(type, args) {

    var enabling = args[0];
    var rightImage = args[1];
    
    if(enabling) {
        rightImage.src = "../img/right-enabled.gif";
    } else {
        rightImage.src = "../img/right-disabled.gif";
    }
    
};


var carousel;

function ocultar () {
	document.getElementById("destaqueDireitaHome").style.display = "none";
	document.getElementById("destaqueEsquerdaHome").style.display = "none";
}
function exibir () {
	document.getElementById("destaqueDireitaHome").style.display = "block";
	document.getElementById("destaqueEsquerdaHome").style.display = "block";
}
