/*
 * Finalidade:	Abrir um pop-up
 * Criação:		29/08/2007
 * Programador:	Gustavo HenPerS
*/
function abreJanela(url, X, Y, scroll){
	pagina	= url; //encodeURIComponent(url);
	largura = X;
	altura	= Y;
	left	= (parseInt(screen.width) - largura)/2;
	topo	= ((parseInt(screen.height) - altura)/2) - 10;
	var desktop = window.open(pagina, 'popup','width=' + X + ',height=' + Y + ',toolbar=no,location=no,status=yes,menubar=no,scrollbars='+scroll+',resizable=no,left='+left+',top='+topo+',STANDBY');
}

/*
 * Finalidade:	Ajustar a altura do iframe que contem os formulários de assinatura
 * Criação:		07/07/2007
 * Programador:	Gustavo HenPerS
*/
function mudaAlturaFrame(idElemento, valor){
	top.document.getElementById(idElemento).style.height = valor;
	alert("Elemento " + idElemento + " Valor = " + valor);
}

/*
 * Finalidade: 	Exibe e esconde as "guias" do arquivo dados.php -> dados do assinante;
 * Criação: 	08/08/2007
 * Programador:	Gustavo HenPerS
*/
function exibeGuia(guiaSelecionada){
	
	var select = 0;
	
	if ( guiaSelecionada == 'guia_1'){
		select = 1;
	} else if ( guiaSelecionada == 'guia_2'){
		select = 2;
	} else if ( guiaSelecionada == 'guia_3'){
		select = 3;
	}
	
	for (i = 1; i <= 2; i++){
		
		temp = new String();
		temp = i.toString();
		
		if (i == select){
			document.getElementById("guia_" + temp).style.background  = '#CCCCCC';
			document.getElementById("spanguia_" + temp).style.display = 'block';
		} else {
			document.getElementById("guia_" + temp).style.background  = '#FFFFFF';
			document.getElementById("spanguia_" + temp).style.display = 'none';
		}
	}
}

/*
 * Finalidade: 	Exibe e esconde Formulário de envio de postagem do Forum;
 * Criação: 	14/12/2007
 * Programador:	Gustavo HenPerS
*/
function exideHide(id){
	
	var status = document.getElementById( id ).style.display;
	
	if ( status == 'none' ){
		status = 'block';
	} else {
		status = 'none';
	}	
	
	document.getElementById( id ).style.display = status; 

}
