function seta_concordo_disclaimer() {
	createCookie('concordo_disclaimer_sexyhot','y',0);
	var refferer = readCookie('url_refferer_sexyhot');


	var f = document.getElementById('busca');
	if( f ) {
		// Caso o usuário tenha tentado acessar outra página 
		// senão o fluxo normal de acesso ao site, redirecionamos
		// ele para o lugar de onde ele veio.

		if( refferer ) 
			f.action = refferer;
		else
		        if( window.location.port == "" )
          			f.action = "http://" + document.domain + "/index.html";
       			else
       			        f.action = "http://" + document.domain + ":" + window.location.port + "/index.html";
	}

}

function checa_concordo_disclaimer() {
	var concordo = readCookie('concordo_disclaimer_sexyhot');
	if (concordo && concordo == "y")
	{
		return;
	} else {
		// Salva o endereço corrente que o usuário tentou acessar
		// e redireciona o mesmo para a página de disclaimer
		createCookie('url_refferer_sexyhot', window.location, 0);
                if( window.location.port == "" )
                    window.location.href = "http://" + document.domain + "/disclaimer_novo.html";
      		else
       		    window.location.href = "http://" + document.domain + ":" + window.location.port + "/disclaimer_novo.html";
	}

}

function ValidaIdade()
{
  var disclaimerCheckBox = document.getElementById('agree_');
  var disclaimerOperadora = document.getElementById('operadora');
  var disclaimerButton = document.getElementById('btnDisclaimerOk');

  if(disclaimerCheckBox)
  {

    if(disclaimerCheckBox.checked == true && disclaimerOperadora.value != 'Operadora')
    {
       disclaimerButton.disabled = false
       disclaimerButton.className = 'enabled'
    }
    else
    {
       disclaimerButton.disabled = true
       disclaimerButton.className = 'disabled'
    }
  }
}

function Uncheck()
{
  var disclaimerCheckBox = document.getElementById('agree_');
  disclaimerCheckBox.checked = false
}
