
function AcessPanel(dominio,senha)
	{
	domain = dominio;
	password  = senha;
	newwin = window.open("../Painel/loginPanel.asp?domain=" + domain + "&password=" + password,"url","width=765,height=540,top=0,left=10");
	}
	
function channel(url,janela,prop)
{
	newwin = window.open(url,janela,prop);
}

function whois()
{
	domain = document.frmwhois.dominio.value;
	//,document.logonPanel.password.value
	//extensao  = "";//document.frmwhois.extensao.value;
	//newwin = window.open("whois.php?whois=" + domain + "&extensao=","url","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizabe=no,copyhistory=no,width=480,height=340,top=0,left=10");
	window.location.href = "http://www.icdominios.com.br/?do=whois&whois=" + domain;
}

	
		hoje = new Date()
        dia = hoje.getDate()
        dias = hoje.getDay()
        mes = hoje.getMonth()
        ano = hoje.getYear()

		if (ano < 2000)    // Y2K Fix, Isaac Powell
		ano = ano + 1900; 		

        if (dia < 10)

                dia = "0" + dia

        function CriaArray (n) {

        this.length = n }

        NomeDia = new CriaArray(7)

			NomeDia[0] = "Dom"
			NomeDia[1] = "Seg"
			NomeDia[2] = "Ter"
			NomeDia[3] = "Qua"
			NomeDia[4] = "Qui"
			NomeDia[5] = "Sex"
			NomeDia[6] = "S&aacute;b"

         NomeMes = new CriaArray(12)

			NomeMes[0] = "Janeiro"
			NomeMes[1] = "Fevereiro"
			NomeMes[2] = "Mar&ccedil;o"
			NomeMes[3] = "Abril"
			NomeMes[4] = "Maio"
			NomeMes[5] = "Junho"
			NomeMes[6] = "Julho"
			NomeMes[7] = "Agosto"
			NomeMes[8] = "Setembro"
			NomeMes[9] = "Outubro"
			NomeMes[10] = "Novembro"
			NomeMes[11] = "Dezembro"

function escreveData()
{
 document.write (dia + " de " + NomeMes[mes] + " de " + ano)
}

function escreveDia ()
{
 document.write (NomeDia[dias])
}

function abre() {
    var foto = window.open("","janela","width=350,height=360,resizable=no,toolbar=0,location=0,directories=0,status=no,menubar=0");
    setTimeout ("document.dados.submit();",10);
}

function mostra_popup(url){
	janela = window.open(url,'Atendimento','width=473,height=315,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no')
    if (janela != null) {
          janela.location.href = url
    }
}

//Functions para a pagina assina.php

function Abre(url,target,x,y)
{
  if ( navigator.appName.indexOf("microsoft")>-1 && navigator.userAgent.indexOf("3.")>-1 )
  {
    x=x-13;
    y=y-27;
  }
  janela=window.open(url,target,'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=0,width='+520+',height='+400);
}

//Verificacao para os campos

function check()
{
  var tam = 0;
  // checa o procedimento
  if (f.dominioq[0].checked == false && f.dominioq[1].checked == false)
  {
    alert('Na seção Dominio selecione o procedimento.');
    this.document.f.dominioq[0].focus();
    return false;
  }
  // checa o nome do dominio
  if (f.dominio.value == "")
  {
    alert('Preencha o Nome do Dominio');
    this.document.f.dominio.focus();
    return false;
  }
  // checa o nome da empresa
  if (f.nome.value == "")
  {
    alert('O campo Nome ou Razão Social está em branco.');
    this.document.f.nome.focus();
    return false;
  }

  // checa o endereco
  if (f.endereco.value == "")
  {
    alert('O Endereço está em branco.');
    this.document.f.endereco.focus();
    return false;
  }

  // checa o numero
  if (f.numero.value == "")
  {
    alert('O Numero de Endereço está em branco.');
    this.document.f.numero.focus();
    return false;
  }
  // checa o bairro
  if (f.bairro.value == "")
  {
    alert('O Bairro está em branco.');
    this.document.f.bairro.focus();
    return false;
  }
  // checa o cep
  if (f.cep.value == "")
  {
    alert('O CEP esta em branco.');
    this.document.f.cep.focus();
    return false;
  }

  if (f.cep.value.length <= 7)
  {
    alert('O CEP esta incorreto.\nFormato válido: 99999-999');
    this.document.f.cep.focus();
    return false;
  }
  // checa a cidade
  if (f.cidade.value == "")
  {
    alert('A Cidade está em branco.');
    this.document.f.cidade.focus();
    return false;
  }
  // checa o estado
  if (f.estado.options[f.estado.selectedIndex].text == "")
  {
    alert('O Estado da esta em branco.');
    this.document.f.estado.focus();
    return false;
  }
  // checa o ddd
  if (f.dddfone.value == "")
  {
    alert('O DDD está em branco.');
    this.document.f.dddfone.focus();
    return false;
  }

  // checa o DDD - padrao 3 digitos. 4 digitos tambem sao aceitos
  if (f.dddfone.value.length < 2 || f.dddfone.value.length > 4)
  {
    alert('O DDD da está inválido.');
    this.document.f.dddfone.focus();
    return false;
  }

  // checa o telefone
  if (f.fone.value == "")
  {
    alert('O Telefone está em branco.');
    this.document.f.fone.focus();
    return false;
  }

  // checa o tamanho do telefone - no minimo 6 digitos sem hifen e no maximo 9 c/ hifen
  if (f.fone.value.length < 6 || f.fone.value.length > 9)
  {
    alert('O Telefone está inválido.');
    this.document.f.fone.focus();
    return false;
  }

  // checa o CGC
  if (f.cpfcgc.value == "")
  {
    alert('O campo CGC/CPF do está em branco.');
    this.document.f.cpfcgc.focus();
    return false;
  }


  // checa o Responsavel
  if (f.responsavel.value == "")
  {
    alert('O Nome do Responsável está em branco.');
    this.document.f.responsavel.focus();
    return false;
  }

  // checa o CONTEUDO do campo de e-mail
  if (f.email1.value == "")
  {
    alert('O Endereço de E-Mail está em branco.');
    this.document.f.email1.focus();
    return false;
  }

  // checa se o email tem @
  if (f.email1.value.indexOf('@', 0) == -1)
  {
    alert('O Endereço de E-Mail está incorreto.');
    this.document.f.email1.focus();
    return false;
  }

  // checa o TAMANHO do campo de e-mail - padrao minimo 7 caracteres
  if (f.email1.value.length < 7)
  {
    alert('O Endereço de E-Mail é inválido.');
    this.document.f.email1.focus();
    return false;
  }

  if (f.email2.value != "")
  {

    // checa se o email tem @
    if (f.email2.value.indexOf('@', 0) == -1)
    {
      alert('O Endereço de E-Mail da está incorreto.');
      this.document.f.email2.focus();
      return false;
    }

    // checa o TAMANHO do campo de e-mail - padrao minimo 7 caracteres
    if (f.email2.value.length < 7)
    {
      alert('O Endereço de E-Mail é inválido.');
      this.document.f.email2.focus();
      return false;
    }
  }

  if (f.rg.value == "")
  {
    alert('O RG está em branco.');
    this.document.f.rg.focus();
    return false;
  }

  if (f.dia_nascimento.options[f.dia_nascimento.selectedIndex].text == "")
  {
    alert('A dia de Nascimento está em branco.');
    this.document.f.dia_nascimento.focus();
    return false;
  }
  if (f.mes_nascimento.options[f.mes_nascimento.selectedIndex].text == "")
  {
    alert('A mês de Nascimento está em branco.');
    this.document.f.mes_nascimento.focus();
    return false;
  }
  if (f.ano_nascimento.options[f.ano_nascimento.selectedIndex].text == "")
  {
    alert('A ano de Nascimento está em branco.');
    this.document.f.ano_nascimento.focus();
    return false;
  }

//  if ( f.conta[0].checked == false &&
//       f.conta[1].checked == false &&
//       f.conta[2].checked == false &&
//       f.conta[3].checked == false &&
//       f.conta[4].checked == false &&
//       f.conta[5].checked == false )
//  {
//    alert('Nenhuma conta foi selecionada.');
//    this.document.f.conta[0].focus();
//    return false;
//  }

  if ( f.tipodeposito.options[f.tipodeposito.selectedIndex].text == "" )
  {
    alert('Selecione a forma de pagamento');
    this.document.f.tipodeposito.focus();
    return false;
  }

  if ( f.peridiocidadedeposito.options[f.peridiocidadedeposito.selectedIndex].text == "" )
  {
    alert('Selecione a peridiocidade de pagamento');
    this.document.f.peridiocidadedeposito.focus();
    return false;
  }

  if (f.comoencontrou.options[f.comoencontrou.selectedIndex].text == "")
  {
    alert('Como entrou em contato com a HostNet?');
    this.document.f.comoencontrou.focus();
    return false;
  }
}

//funcoes para todas as paginas

<!--

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

// begin absolutely positioned scrollable area object scripts
function verifyCompatibleBrowser(){
    this.ver=navigator.appVersion
    this.dom=document.getElementById?1:0
    this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
    this.ie4=(document.all && !this.dom)?1:0;
    this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;

    this.ns4=(document.layers && !this.dom)?1:0;
    this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5)
    return this
}
bw=new verifyCompatibleBrowser()


var speed=50

var loop, timer

function ConstructObject(obj,nest){
    nest=(!nest) ? '':'document.'+nest+'.'
    this.el=bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+'document.'+obj):0;
    this.css=bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+'document.'+obj):0;
    this.scrollHeight=bw.ns4?this.css.document.height:this.el.offsetHeight
    this.clipHeight=bw.ns4?this.css.clip.height:this.el.offsetHeight
    this.up=MoveAreaUp;this.down=MoveAreaDown;
    this.MoveArea=MoveArea; this.x; this.y;
    this.obj = obj + "Object"
    eval(this.obj + "=this")
    return this
}
function MoveArea(x,y){
    this.x=x;this.y=y
    this.css.left=this.x
    this.css.top=this.y
}

function MoveAreaDown(move){
	if(this.y>-this.scrollHeight+objContainer.clipHeight){
    this.MoveArea(0,this.y-move)
    if(loop) setTimeout(this.obj+".down("+move+")",speed)
	}
}
function MoveAreaUp(move){
	if(this.y<0){
    this.MoveArea(0,this.y-move)
    if(loop) setTimeout(this.obj+".up("+move+")",speed)
	}
}

function Performscroll(speed){
	if(initialised){
		loop=true;
		if(speed>0) objscroller.down(speed)
		else objscroller.up(speed)
	}
}

function Ceasescroll(){
    loop=false
    if(timer) clearTimeout(timer)
}
var initialised;
function InitialisescrollableArea(){
    objContainer=new ConstructObject('divContainer')
    objscroller=new ConstructObject('divContent','divContainer')
    objscroller.MoveArea(0,0)
    objContainer.css.visibility='visible'
    initialised=true;
}
// end absolutely positioned scrollable area object scripts

// -->

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

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_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function PessoaJuridica()
{
	document.getElementById("divIERG").innerHTML='I.E:';
	document.getElementById("divCNPJCPF").innerHTML='CNPJ:';
	document.getElementById("divData").innerHTML='Data de Abertura:'	
}

function PessoaFisica()
{
	document.getElementById("divIERG").innerHTML='RG:';
	document.getElementById("divCNPJCPF").innerHTML='CPF:';
	document.getElementById("divData").innerHTML='Data de Nascimento:'	
}

//-->


