/************************/
/* Autor: Felipe Jaekel */
/**********************************/
/* Funções para manipular janelas */
/**********************************/

/******************************************************/
/* Abre uma nova janela em tela cheia(autoMaximize()) */
/******************************************************/
FSpopup.settings = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes';
function FSpopup(file)
{
	window.open(file, '', FSpopup.settings);
}

/******************************************************/
/* Abre uma nova janela em tela cheia(autoMaximize()) */
/******************************************************/
FSonly1popup.novaJanela = '';
function FSonly1popup(file)
{
   //Deve ser testado se o popup existente não foi fechado antes de tentar alterar suas propriedades
   if(FSonly1popup.novaJanela == '' || FSonly1popup.novaJanela.closed)
   {
		FSonly1popup.novaJanela = window.open(file, '', FSpopup.settings);
	}
	else
	{
      //Abre o novo link no popup existente e posiciona nele
   	FSonly1popup.novaJanela.location.href = file;
   	FSonly1popup.novaJanela.focus();
	}
}

/********************/
/* Monta um browser */
/********************/
browser.novaJanela = '';
function browser(url, height, width, left, top)
{
	//Deve ser testado se o popup existente não foi fechado antes de tentar alterar suas propriedades
   if(browser.novaJanela == '' || browser.novaJanela.closed)
   {
   	browser.novaJanela = window.open(url, '', 'height=' + height + 'px, width=' + width + 'px, left=' + left + 'px, top=' + top + 'px, location=no, menubar=no, resizable=no, scrollbars=yes, status=no, toolbar=no');
	}
	else
	{
      //Abre o novo link no popup existente e posiciona nele
   	browser.novaJanela.location.href = url;
   	browser.novaJanela.focus();
	}
}