Sub tdMenuBarItemDacasa_onClick
  window.location = "http://www.dacasa.com.br"

End Sub

Sub Dacasa_OnClick
  Dim Result

  Set Result = window.open ("Main.asp", "Main")
  Result.focus

  Set Result = Nothing

End Sub


' Menu Principal

Sub Logon_onClick
  Dim varReturnValue, varJava, varReturnValue2
  Dim varTamanho, varCidade

  varReturnValue = window.showModalDialog (_
   "Logon.asp", ,_
   "DialogHeight: 217px; DialogWidth: 448px; center: yes; help: no; resizable: no; status: no")

'varJava  = openchromeless("Logon.asp","CHROMELESSWIN",440,172,"fechar.bmp","fechar.bmp","fechar.bmp","a.gif","a.gif","Dacasa Financeira","Dacasa Finaceira","#63a576","#63a576","#63a576","#63a576")       
if varReturnValue <> "" then

	varReturnValue = Split(varReturnValue, ";")

  If  (varReturnValue(0) <> "") Then
    
     varTamanho = len("Você está operando pela loja " & varReturnValue(0) & ".") + 20    
     varJava = openITString("Seja bem vindo à Dacasa Net! <br>Você está operando pela loja " & varReturnValue(0) & ".",450,190)
        
     call window.open("PopUpMain.htm", "", "resizable=no,status= no,height=372px,width=644px, center: yes")
     	
     'window.open "PopUpMain.asp",,"scrollbars=no,location=no,menubar=no,resizable=no,height=500px,width=780px,top=50,left=50"
	 
	 'Somente para os lojistas que estão nas seguintes cidades:
	 'Vitória, Vila Velha, Cariacica, Serra, Viana, Guarapari e Fundão
	 varCidade = varReturnValue(1)
	 If ((varCidade = "Vitória")or(varCidade = "Vila Velha")or(varCidade = "Cariacica")or(varCidade = "Viana")or(varCidade = "Serra")or(varCidade = "Guarapari")or(varCidade = "Fundão")) Then
		varReturnValue2 = window.showModalDialog (_
			"Proposta_Cartao.asp", ,_
			"DialogHeight: 353px; DialogWidth: 433px; center: yes; help: no; resizable: no; status: no")
	 End If
   
  End If

End If
End Sub

Sub Logoff_onClick
  Dim varReturnValue, varJava

  varReturnValue = window.showModalDialog (_
    "Logoff.asp", ,_
    "DialogHeight: 197px; DialogWidth: 447px; center: yes; help: no; resizable: no; status: no")

  If Not (varReturnValue = "") Then
     varJava = openITString("Obrigado por utilizar o nosso sistema!",450,190)

  End If

End Sub

Sub Consulta_Cliente_onClick
  Dim PosX, PosY
  Dim Result

  PosX = (screen.width - 730) / 2
  PosY = (screen.height - 290) / 2

  Set Result = window.open ("Consulta_Cliente.asp", "Consulta_Cliente", "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=720, height=260, left=" & PosX & ", top=" & PosY)
  Result.focus

  Set Result = Nothing

End Sub

Sub Simulacao_onClick
  Dim PosX, PosY
  Dim Result

  PosX = (screen.width - 730) / 2
  PosY = (screen.height - 290) / 2

  Set Result = window.open ("Simulacao.asp", "Simulacao", "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=720, height=260, left=" & PosX & ", top=" & PosY)
  Result.focus

  Set Result = Nothing
  
End Sub

Sub Envia_Ficha_Cliente_onClick
  Dim PosX, PosY
  Dim Result

  PosX = (screen.width - 720) / 2
  PosY = (screen.height - 390) / 2

  Set Result = window.open ("Envia_Ficha_Cliente.asp", "Envia_Ficha_Cliente", "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=710, height=360, left=" & PosX & ", top=" & PosY)
  Result.focus

  Set Result = Nothing
  
End Sub

Sub Envia_Avalista_onClick
  Dim PosX, PosY
  Dim Result

  PosX = (screen.width - 600) / 2
  PosY = (screen.height - 250) / 2

  Set Result = window.open ("Envia_Avalista.asp", "Envia_Avalista", "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=590, height=220, left=" & PosX & ", top=" & PosY)
  Result.focus
  
  Set Result = Nothing
  
End Sub

Sub Consulta_TA_onClick
  Dim PosX, PosY
  Dim Result

  PosX = (screen.width - 600) / 2
  PosY = (screen.height - 250) / 2

  Set Result = window.open ("Consulta_TA.asp", "Consulta_TA", "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=590, height=220, left=" & PosX & ", top=" & PosY)
  Result.focus

  Set Result = Nothing
  
End Sub

Sub Historico_TA_onClick
  Dim PosX, PosY
  Dim Result

  PosX = (screen.width - 600) / 2
  PosY = (screen.height - 250) / 2

  Set Result = window.open ("ConsultaSituacao.asp", "ConsultaSituacao", "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=600, height=250, left=" & PosX & ", top=" & PosY)
  Result.focus

  Set Result = Nothing
  
End Sub

Sub Cancela_TA_onClick
  Dim PosX, PosY
  Dim Result

  PosX = (screen.width - 450) / 2
  PosY = (screen.height - 200) / 2

  Set Result = window.open ("Cancela_TA.asp", "Cancela_TA", "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=440, height=170, left=" & PosX & ", top=" & PosY)
  Result.focus

  Set Result = Nothing
  
End Sub

Sub Atualiza_Ficha_Cliente_onClick
  Dim PosX, PosY
  Dim Result

  PosX = (screen.width - 600) / 2
  PosY = (screen.height - 250) / 2

  Set Result = window.open ("Atualiza_Ficha_Cliente.asp", "Atualiza_Ficha_Cliente", "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=590, height=220, left=" & PosX & ", top=" & PosY)
  Result.focus

  Set Result = Nothing
  
End Sub

Sub Atualiza_Ficha_Avalista_onClick
  Dim PosX, PosY
  Dim Result

  PosX = (screen.width - 600) / 2
  PosY = (screen.height - 250) / 2

  Set Result = window.open ("Atualiza_Ficha_Avalista.asp", "Atualiza_Ficha_Avalista", "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=590, height=220, left=" & PosX & ", top=" & PosY)
  Result.focus

  Set Result = Nothing
  
End Sub

Sub Cadastra_Usuario_onClick
  Dim PosX, PosY
  Dim Result

  PosX = (screen.width - 510) / 2
  PosY = (screen.height - 200) / 2

  Set Result = window.open ("Cadastra_Usuario.asp", "Cadastra_Usuario", "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=500, height=170, left=" & PosX & ", top=" & PosY)
  Result.focus

  Set Result = Nothing
  
End Sub

Sub Imprimir_Solicitacao_Usuario_onClick
  Dim PosX, PosY
  Dim Result

  PosX = (screen.width - 680) / 2
  PosY = (screen.height - 300) / 2

  Set Result = window.open ("Imprime_Solicitacao_Usuario.asp", "Imprimir_Solicitacao_Usuario", "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=670, height=270, left=" & PosX & ", top=" & PosY)
  Result.focus

  Set Result = Nothing
  
End Sub

Sub Alterar_Acesso_onClick
  Dim PosX, PosY
  Dim Result

  PosX = (screen.width - 630) / 2
  PosY = (screen.height - 320) / 2

  Set Result = window.open ("Altera_Acesso.asp?Fl_Inicializa=1", "Altera_Acesso", "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=620, height=290, left=" & PosX & ", top=" & PosY)
  Result.focus

  Set Result = Nothing
  
End Sub

Sub Imprime_TA_onClick
  Dim PosX, PosY
  Dim Result

  PosX = (screen.width - 600) / 2
  PosY = (screen.height - 250) / 2

  Set Result = window.open ("Imprime_TA.asp", "Imprime_TA", "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=590, height=220, left=" & PosX & ", top=" & PosY)
  Result.focus

  Set Result = Nothing
  
End Sub

Sub Lista_Carnes_onClick
  Dim PosX, PosY
  Dim Result

  PosX = (screen.width - 600) / 2
  PosY = (screen.height - 250) / 2

  Set Result = window.open ("Lista_Carnes.asp", "Lista_Carnes", "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=yes, copyhistory=no, width=590, height=220, left=" & PosX & ", top=" & PosY)
  Result.focus

  Set Result = Nothing
  
End Sub

Sub Imprime_Carne_onClick
  Dim PosX, PosY
  Dim Result

  PosX = (screen.width - 600) / 2
  PosY = (screen.height - 250) / 2

  Set Result = window.open ("Imprime_Carne.asp", "Imprime_Carne", "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no, width=450, height=200, left=" & PosX & ", top=" & PosY & """")
  Result.focus

  Set Result = Nothing
  
End Sub

Sub Imprime_Carne_2_onClick
  Dim PosX, PosY
  Dim Result

  PosX = (screen.width - 600) / 2
  PosY = (screen.height - 250) / 2

  Set Result = window.open ("Imprime_Carne_2.asp", "Imprime_Carne_2", "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=590, height=220, left=" & PosX & ", top=" & PosY)
  Result.focus

  Set Result = Nothing
  
End Sub

Sub Imprime_Carne_Vencido_onClick
  Dim PosX, PosY
  Dim Result

  PosX = (screen.width - 600) / 2
  PosY = (screen.height - 250) / 2

  Set Result = window.open ("ImprimirCarneVencido.asp", "Imprime_Carne_Vencido", "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=450, height=272, left=" & PosX & ", top=" & PosY)
  Result.focus

  Set Result = Nothing
  
End Sub

Sub Parceria_Premiada_onClick
  Dim PosX, PosY
  Dim Result

  PosX = (screen.width - 600) / 2
  PosY = (screen.height - 250) / 2

  Set Result = window.open ("ParceriaPremiada.asp", "Parceria_Premiada", "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=450, height=272, left=" & PosX & ", top=" & PosY)
  Result.focus

  Set Result = Nothing
  
End Sub

Sub Alterar_Senha_Loja_onClick
  Dim PosX, PosY
  Dim Result

  PosX = (screen.width - 450) / 2
  PosY = (screen.height - 200) / 2

  Set Result = window.open ("Altera_Senha_Loja.asp", "Altera_Senha_Loja", "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=440, height=170, left=" & PosX & ", top=" & PosY)
  Result.focus

  Set Result = Nothing
  
End Sub

Sub Alterar_Senha_Usuario_onClick
  Dim PosX, PosY
  Dim Result

  PosX = (screen.width - 450) / 2
  PosY = (screen.height - 200) / 2

  Set Result = window.open ("Altera_Senha_Usuario.asp", "Altera_Senha_Usuario", "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=400, height=190, left=" & PosX & ", top=" & PosY)
  Result.focus

  Set Result = Nothing
  
End Sub

Sub Imprime_Tabela_Financiamento_onClick
  Dim PosX, PosY
  Dim Result

  PosX = (screen.width - 650) / 2
  PosY = (screen.height - 300) / 2

  Set Result = window.open ("EmissaoTabelaFinanc.aspx","ImpressãoTabelaFinanc", "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width=750, height=490, left=" & PosX & ", top=" & PosY)
  
  Result.focus

  Set Result = Nothing
  
End Sub

' Sobre

Sub Sobre_onclick
dim varJava

  window.showModalDialog _
    "Sobre.asp", ,_
    "DialogHeight: 307px; DialogWidth: 387px; center: yes; help: no; resizable: no; status: no"

End Sub

Sub Gera_Bordero_onClick
  Dim PosX, PosY
  Dim Result

  PosX = (screen.width - 600) / 2
  PosY = (screen.height - 250) / 2

  Set Result = window.open ("Fechamento_Bordero.asp", "Gera_Bordero", "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=600, height=320, left=" & PosX & ", top=" & PosY)
  Result.focus

  Set Result = Nothing
  
  'PosX = (screen.width - 440) / 2
  'PosY = (screen.height - 171) / 2
  
  'window.showModalDialog _
  '"Valida_Senha.asp?url=1", "Gera_Bordero", "DialogHeight: 197px; DialogWidth: 447px; center: yes; help: no; resizable: no; status: no"
  'Set Result = window.open ("Valida_Senha.asp?url=1", "Gera_Bordero", "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=440, height=171, left=" & PosX & ", top=" & PosY)
  'Result.focus

  'Set Result = Nothing
  
End Sub

Sub Calcular_Margem_onClick
  Dim PosX, PosY
  Dim Result

  PosX = (screen.width - 600) / 2
  PosY = (screen.height - 250) / 2

  Set Result = window.open ("Calcula_Margem.asp", "Calcula_Margem", "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=374, height=172, left=" & PosX & ", top=" & PosY)
  Result.focus

  Set Result = Nothing
  
End Sub

Sub Enviar_Comprovante_onClick
  Dim PosX, PosY
  Dim Result

  PosX = (screen.width - 600) / 2
  PosY = (screen.height - 250) / 2

  Set Result = window.open ("EnviarComprovanteCredito.aspx", "Enviar_Comprovante", "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=500, height=227, left=" & PosX & ", top=" & PosY)
  Result.focus

  Set Result = Nothing
  
End Sub

'Sub Informativo_CET_onClick
'  Dim PosX, PosY
'  Dim Result

'  PosX = (screen.width - 600) / 2
'  PosY = (screen.height - 250) / 2

'  Set Result = window.open ("InformeCet.htm", "Informativo_CET", "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width=690, height=800, left=" & PosX & ", top=" & PosY)
'  Result.focus

 ' Set Result = Nothing
  
'End Sub