// JavaScript Document
/*
 * Scripts Legais - Funções básicas para o site www.floripasom.com
 * Copyright (C) 2007 Acelio Filho
 *
 * Licensed under the terms of the GNU Lesser General Public License
 * (http://www.opensource.org/licenses/lgpl-license.php)
 *
 * For further information go to http://floripasom.com/ 
 * or contact acelio@floripasom.com
 *
 * geral.js: Functions for AJAX.
 *
 * Authors:
 *   Acelio filho (acelio@floripasom.com)
 */
var telaH = screen.availHeight-250;
var telaV = screen.availWidth-100;
function abre(URL){
var trackback = URL;
alert('Você acessará a página\n'+URL+'');
window.open(URL,"nova","height="+telaH+",width="+telaV+",toolbar=yes,location=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,top=50,left=50");
}
function abre2(URL, largura, altura){
window.open(URL,"teste","height="+altura+",width="+largura+",toolbar=no,location=no,copyhistory=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,top=10,left=10");
}
function abreTeste(URL){
window.open(URL,"teste","height="+telaH+",width="+telaV+",toolbar=no,location=no,copyhistory=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,top=10,left=10");
}
function abreFoto(URL){
window.open("foto.php?qual="+URL,"nova","height=550,width=600,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,top=50,left=50");
}
function resize(valor1,valor2){
		var w=(valor1+12);
		var h=(valor2+55);
		window.resizeTo(w,h);
		}
function abreplayer(theURL) { //v2.0
  window.open(theURL,"player","width=400,height=280,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,top=20,left=20");
  }
  function abreCreditos(theURL) { //v2.0
  window.open(theURL,"creditos","width=760,height=500,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=no,top=10,left=10");
  }
  /* function abrefotos(theURL) { //v2.0
  window.open(theURL,"fotos","width=400,height=300,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=yes,top=20,left=20");
  } */
  function abrefotosFlash(theURL,oq,qual,titulo) { //v2.0
  window.open(""+theURL+"?oq="+oq+"&qual="+qual+"&titulo="+titulo+"","fotos","width=400,height=300,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=yes,top=20,left=20");
  }
  function mudaDiv(id, texto){
  html_div = document.getElementById(id);
  html_div.innerHTML = texto;
}
function mudaDivParent(id, texto){
  html_div = parent.document.getElementById(id);
  html_div.innerHTML = texto;
}
function mostraDiv(id){
document.getElementById(id).style.visibility = "visible";
}
function mostraDiv2(id){
document.getElementById(id).style.display = "block";
}
function mostraDivParent(id){
parent.document.getElementById(id).style.visibility = "visible";
}
function escondeDiv(id){
document.getElementById(id).style.visibility = "hidden";
}
function escondeDiv2(id){
document.getElementById(id).style.display = "none";
}
function escondeDivParent(id){
parent.document.getElementById(id).style.visibility = "hidden";
}
function fazFrame(pagina){
	//mudaDiv('conteudo','&lt;iframe name=&quot;frame&quot; width=&quot;100%&quot; height=&quot;300&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; src=&quot;'+pagina+'&quot;&gt;&lt;/iframe&gt;');
	mudaDiv('conteudo','<iframe name="frame" width="100%" height="300" scrolling="no" frameborder="0" src="'+pagina+'"></iframe>');
	}
