/* Flashs em geral */
function GerarSWF($arquivo,$altura,$largura){
    document.writeln('    <object type="application/x-shockwave-flash" data="'+ $arquivo +'" width="'+ $largura +'" height="'+ $altura +'">');
    document.writeln('        <param name="movie" value="' + $arquivo + '" />');
    document.writeln('        <param name="menu" value="false" />');
    document.writeln('        <param name="quality" value="high" />');
	document.writeln('        <param name="wmode" value="transparent" />');
    document.writeln('    </object>');
}

function sFaq(id_resposta) {
	obj = document.getElementById(id_resposta);
	if (obj.style.display == "none")
		obj.style.display = "block";
	else
		obj.style.display = "none";
}

numNoticia = 0;
function news(valor) {
    if (numNoticia == 0){
     numNoticia = numNoticiaTotal;
    }
	chamada = "chamada_";
	obj = document.getElementById(chamada + numNoticia);
	obj.style.display = "none";
	if (valor == "anterior") {
		numNoticia += 1;
		if (numNoticia >= numNoticiaTotal+1) { // zera contador se a noticia chamada for maior q o numero da ultima cadastrada
			obj = document.getElementById("chamada_" + numNoticiaTotal);
			obj.style.display = "block";
			numNoticia = numNoticiaTotal;
		} else {
			obj = document.getElementById("chamada_" + numNoticia);
			obj.style.display = "block";
		}
	}
	else if (valor == "proxima") {
		numNoticia -= 1;
		if (numNoticia <= 1) { // contador fica com o valor total de noticias cadastradas
			//obj = document.getElementById("chamada_" + numNoticiaTotal);
			obj = document.getElementById("chamada_1");
			obj.style.display = "block";
			numNoticia = 1;
		} else {
			obj = document.getElementById("chamada_" + numNoticia);
			obj.style.display = "block";
		}
	}
}


