 
function OpenWindowBancoImagens(Url) {
  BIWindow=window.open(Url,'BancoImagens','toolbar= 0,location= 0,directories= 0,status= 1,menubar= 0,scrollbars= 1,resizable= 0,copyhistory= 1,width=650,height=500');
  BIWindow.focus();
}

function OpenWindowAdmin(Url) {
  AdminWindow=window.open(Url,'ArtistaNetAdmin','toolbar= 0,location= 0,directories= 0,status= 1,menubar= 0,scrollbars= 1,resizable= 0,copyhistory= 1,width=500,height=500');
  AdminWindow.focus();
}

function OpenWindowAgenda(Url) {
  NotWindow=window.open(Url,'Agenda','toolbar= 0,location= 0,directories= 0,status= 1,menubar= 0,scrollbars= 1,resizable= 0,copyhistory= 1,width=400,height=400');
  NotWindow.focus();
}

function OpenWindowCritica(Url) {
  CritWindow=window.open(Url,'Critica','toolbar= 0,location= 0,directories= 0,status= 1,menubar= 0,scrollbars= 1,resizable= 0,copyhistory= 1,width=500,height=400');
  CritWindow.focus();
}

function OpenWindowComprar(Url) {
  ComprarWindow=window.open(Url,'ArtistaNetComprar','toolbar= 0,location= 0,directories= 0,status= 1,menubar= 0,scrollbars= 1,resizable= 0,copyhistory= 1,width=500,height=500');
  ComprarWindow.focus();
}


function OpenWindowAssinar(Url) {
  AssinarWindow=window.open(Url,'ArtistaNetAssinar','toolbar= 0,location= 0,directories= 0,status= 1,menubar= 0,scrollbars= 1,resizable= 0,copyhistory= 1,width=500,height=500');
  AssinarWindow.focus();
}

function OpenWindowArtigo(Url) {
  ArtWindow=window.open(Url,'ArtistaNetArtigo','toolbar= 0,location= 0,directories= 0,status= 1,menubar= 0,scrollbars= 1,resizable= 0,copyhistory= 1,width=600,height=500');
  ArtWindow.focus();
}


function SetHomeSite(olink) {
    Endereco = window.location;
    olink.style.behavior='url(#default#homepage)'
    olink.setHomePage(Endereco);
    return false;
}

function AddBookmark() {
    Titulo = document.title;
    Endereco = window.location;
    window.external.AddFavorite(Endereco, Titulo);
}







/*-------------------------------------------------------------------------------------
SetTextBox
Descrição: Função para setar um valor em um determinado text box de um form
Autor: Mário Wittler
Data:22/11/01
Parâmetros:
	-> Formulario: Nome do Form
	-> TextBox: Nome do TextBox
	-> Valor: Valor do textbox
Retorno:
	-> Nenhum
Exemplo: 
	-> <script Language="Javascript">SetFileName('Form', 'Imagem', 'imagem.gif')</script>
Observações:
	-> A janela que contém este código deve ser aberta por outra janela (Opener)
	-> Na janela Opener deve conter um edit chamado Arquivo em um Form FormArquivo
-------------------------------------------------------------------------------------*/
function SetFileName(Formulario, TextBox, Valor){
	window.opener.document.forms[Formulario].elements[TextBox].value = Valor;
	window.close();
} 






function OpenWindowImagem(Url) {
  ImagemWindow=window.open(Url,'Imagem','toolbar= 0,location= 0,directories= 0,status= 1,menubar= 0,scrollbars= 0,resizable= 1,copyhistory= 1,width=400,height=450');
}

function OpenWindowArquivo(Url) {
  ArqWindow=window.open(Url,'AnexarArquivo','toolbar= 0,location= 0,directories= 0,status= 1,menubar= 0,scrollbars=0,resizable=0,copyhistory= 1,width=550,height=200');
}


function OpenWindowFiltro(Url) {
  FiltroWindow=window.open(Url,'Filtro','toolbar= 0,location= 0,directories= 0,status= 1,menubar= 0,scrollbars= 0,resizable= 0,copyhistory= 1,width=450,height=250');
}


function OpenWindowAviso(Url) {
  AvisoWindow=window.open(Url,'Avisos','toolbar= 0,location= 0,directories= 0,status= 1,menubar= 0,scrollbars= 1,resizable= 0,copyhistory= 1,width=400,height=400');
}

function OpenWindowBookmarks(Url) {
  BMWindow=window.open(Url,'Bookmarks','toolbar= 0,location= 0,directories= 0,status= 1,menubar= 0,scrollbars= 1,resizable= 0,copyhistory= 1,width=650,height=300');
}


function OpenWindowChamados(Url) {
  ChamWindow=window.open(Url,'Chamados','toolbar= 0,location= 0,directories= 0,status= 1,menubar= 0,scrollbars= 1,resizable= 0,copyhistory= 1,width=600,height=500');
}


function OpenWindowCadastros(Url) {
  CadWindow=window.open(Url,'Cadastros','toolbar= 0,location= 0,directories= 0,status= 1,menubar= 0,scrollbars= 1,resizable= 0,copyhistory= 1,width=600,height=500');
}


function OpenWindowLivros(Url) {
  LivroWindow=window.open(Url,'Livros','toolbar= 0,location= 0,directories= 0,status= 1,menubar= 0,scrollbars= 1,resizable= 0,copyhistory= 1,width=550,height=400');
}


//Funções do Macromedia Flash
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_controlShockwave(objStr,x,cmdName,frameNum) { //v3.0
  var obj=MM_findObj(objStr);
  if (obj) eval('obj.'+cmdName+'('+((cmdName=='GotoFrame')?frameNum:'')+')');
}
