// ---------------------------------------- +
// - Função para executar flashs
// ---------------------------------------- +
function RodarFlash( path, variaveis, _width, _height ) {
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+_width+'" height="'+_height+'">');
	document.write('<param name="movie" value="'+path+'?'+variaveis+'">');
	document.write('<param name="quality" value="high">');
	document.write('<param name="wmode" value="transparent">');
	document.write('<embed src="'+path+'?'+variaveis+'" width="'+_width+'" height="'+_height+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent"></embed>');
	document.write('</object>');
}



// ---------------------------------------- +
// - Função limpa campo busca
// ---------------------------------------- +
function limpaTexto(campo, valor){
	if(document.getElementById(campo).value == valor){
		document.getElementById(campo).value = "";
	}else if(document.getElementById(campo).value == ""){
		document.getElementById(campo).value = valor;
	}
}

// --------------------------------------------------- +
// - Função para abrir e  fechar a introdução na home
// --------------------------------------------------- +
function abrirFecharIntroducao( nomeElemento ) {
	
	divcalendario = document.getElementById( 'calendario' );	
	divIntroducao = document.getElementById( nomeElemento );
	comboscalendario = divcalendario.getElementsByTagName( "select" );
	
	// ----------------------------------------------------------- +
	// - esconde todos os selects da pagina (resolve bug com ie)
	// ----------------------------------------------------------- +
	for( x = 0; x < comboscalendario.length; x++ ) {
		if( divIntroducao.style.display == "" || divIntroducao.style.display == "none" ) {
			comboscalendario[ x ].style.visibility = "hidden";
		} else {
			comboscalendario[ x ].style.visibility = "visible";			
		}
	}
	
	if( divIntroducao.style.display == "" || divIntroducao.style.display == "none" ) {
		divIntroducao.style.display = "block";	
	} else {		
		divIntroducao.style.display = "none";	
	}
	
}