ns4 = (document.layers)? true:false;
ie4 = (document.all)? true:false;
//////////////////MENU RAPIDO COMBO /////////////////
 	function menuRapido(url){
		//alert(url);
		if (url != ""){
			location.href=url;
		}		
	}
//////////////////MUDAR IMAGEM DO DISCO GRANDE/////////////////
function mudarImgBarra(img,url){
	if (ie4){
		document.images[img].src = url;
	}
	if (ns4){
		document.tituloLyr.document.images[img].src = url;
	}
}
///////////// MUDAR SECAO, MENU ///////////////////////

function secao(nomesec){		
		
	if (nomesec == "visao"){
		escrever('texto',null,'Farinha_principal.htm');
		mudarImgBarra('tituloIMG','titulo_visao.gif');		
	}
	if (nomesec == "elementos"){		
		escrever('texto',null,'elementos.htm');
		mudarImgBarra('tituloIMG','titulo_elementos.gif');		
	}
	if (nomesec == "ingredientes"){
		escrever('texto',null,'ingredientes.htm');
		mudarImgBarra('tituloIMG','titulo_ingre.gif');		
	}
	if (nomesec == "repertorio"){
		escrever('texto',null,'Farinha_repertorio.htm');
		mudarImgBarra('tituloIMG','titulo_reper.gif');	
	}
}

//////////////////////////////////////////////////////////
//  Escrever dentro do Layer TEXTO emulando um Buffer   //
/////////////////////////////////////////////////////////

	function escrever(id,nestref,url){
		if (ns4) {
			var lyr = (nestref)? eval('document.'+nestref+'.document.'+id) : document.layers[id]
			lyr.load(url,lyr.clip.width)
		}
		else if (ie4) {
			parent.bufferFrame.document.location = url
		}
	}
	
	function escreverfinal(id){
		if (ie4) document.all[id].innerHTML = parent.bufferFrame.document.body.innerHTML
	}
//////////////////////////////////////////////////////

