////////////////////////////////////////////////////////////////////////////////////////////
/*Funcao para target*/
function fnTarget(str_target){
	//declaracao de variaveis
	var ch_tag_A, vet_A, int_i;
	var str_titulo;	
	//pega todos os <a> da pagina e percorre um por um para achar o rel="external"
    ch_tag_A = document.getElementsByTagName('a');
    for(int_i=0; int_i<ch_tag_A.length; int_i++){
		vet_A = ch_tag_A[int_i];
		if(vet_A.getAttribute("href") && vet_A.getAttribute('rel') != null){
			if(vet_A.getAttribute('rel').substring(0,8) == 'external'){
				vet_A.target = str_target;
				str_titulo = ch_tag_A.title;
				ch_tag_A.title = str_titulo;
			}
		}
	}
}
///////////////////////////////////////////////////////////////////////////////////////////
//Funcao para flash
function fnFlash(str_url, int_largura, int_altura){
	document.writeln('<object type="application/x-shockwave-flash" data="' + str_url + '" width="' + int_largura + '" height="' + int_altura + '">');
	document.writeln('<param name="movie" value="' + str_url + '">');
	document.writeln('<param name="quality" value="high">');
	document.writeln('<param name="wmode" value="transparent">');
	document.writeln('</object>');
}
////////////////////////////////////////////////////////////////////////////////////////////
//Funcao de popup
function MM_openBrWindow(theURL,winName,features) 
{
	var myWin =  window.open(theURL,winName,features);
	myWin.focus();
}
////////////////////////////////////////////////////////////////////////////////////////////
//mostra e oculta (menu)
function mostra(campo){
    document.getElementById(campo).style.display='' ;
}
function oculta(campo){
    document.getElementById(campo).style.display='none' ;
}
////////////////////////////////////////////////////////////////////////////////////////////
/*FUNCAO PARA EXPERIENCIAS COR VERDE */
function bolinha(id){
	esconder = (document.getElementById(id).style.display == 'block');
	divs = document.getElementsByTagName('DIV');
	for(d=0; d<divs.length; d++){
		_div = divs[d];
		if (_div.className == 'sem_bolinha'){
			id_link = 'sem_bolinha_'+(_div.id);
			_link = document.getElementById(id_link);
			if(_div.id != id){ _div.style.display = 'none'; }
			else{ _div.style.display = esconder ? 'none' : 'block'; }
		}
	}
}

//funcao pop up do mapa
function MM_openBrWindow(theURL,winName,features){
	var myWin =  window.open(theURL,winName,features);
	myWin.focus();
}

//funcao video
function fnFlash(str_url, int_largura, int_altura){
	document.writeln('<object type="application/x-shockwave-flash" data="' + str_url + '" width="' + int_largura + '" height="' + int_altura + '">');
	document.writeln('<param name="movie" value="' + str_url + '">');
	document.writeln('<param name="quality" value="high">');
	document.writeln('<param name="wmode" value="transparent">');
	document.writeln('</object>');
}
function fnVideoFLV(str_url,width,height){
	document.writeln('<object id="player" type="application/x-shockwave-flash" data="player-licensed.swf" width="'+width+'" height="'+height+'">');
	document.writeln('<param name="movie" value="player-licensed.swf" />');
	document.writeln('<param name="allowfullscreen" value="true" />');
	document.writeln('<param name="allowscriptaccess" value="always" />');
	document.writeln('<param name="flashvars" value="file=http://www.tvtercodalibertacao.com.br/dbarquivos/'+str_url+'&image=" />');
	document.writeln('</object>');
}
function fnVideo(){
	document.writeln('<object id="player" type="application/x-shockwave-flash" data="player-licensed.swf" width="320" height="260">');
	document.writeln('<param name="movie" value="player-licensed.swf" />');
	document.writeln('<param name="allowfullscreen" value="true" />');
	document.writeln('<param name="allowscriptaccess" value="always" />');
	document.writeln('<param name="flashvars" value="file=http://www.tvtercodalibertacao.com.br/video/video.FLV"/>');
	document.writeln('</object>');
}

