// JavaScript Document
 //<![CDATA[

 // If you don't want to put unstandard properties in your stylesheet, here's yet
 // another means of activating the script. This assumes that you have at least one
 // stylesheet included already. Remove the /* and */ lines to activate.

 /*
 if (document.all && document.styleSheets && document.styleSheets[0] &&
  document.styleSheets[0].addRule)
 {
  // Feel free to add rules for specific tags only, you just have to call it several times.
  document.styleSheets[0].addRule('*', 'behavior: url(iepngfix.htc)');
 }
 */

 //]]>
    function fechaJanela(){  
	  setTimeout( "document.getElementById('BannerAlternativo').style.display='none'", 60000);  
    }  
	function fechaBanner(){document.getElementById('BannerAlternativo').style.display='none';}
	function GeraData(strData1,strData2){
		document.frm_agendamento.anomesdia.value = strData1;
		document.getElementById('escreveData').innerHTML = '(' + strData2 + ')';
		document.frm_agendamento.data_agendada.value = strData2;
	}
	function GeraDataErro(){
		alert('Agendamento esgotado para esta data');
	}	
	function GeraDataErro1(){
		alert('Os agendamentos só poderão ser feitos com 2 dias de antecedência');
	}	
	function GeraDataErro2(){
		alert('O agendamento para esta data só será possível ser feito até a quinta-feira ao meio-dia. Obrigado!');
	}	
/********************************************************************************************
			HIDDEN LAYER
*/
	function mostraLayer(Nlayer){
		var NomeLayer = Nlayer;
		if(document.getElementById(NomeLayer).style.display=='none'){
			document.getElementById(NomeLayer).style.display='block';
		}else{
			document.getElementById(NomeLayer).style.display='none';
		}
	 }
	 function seleciona_anuncio(nLayer){
		document.getElementById(nLayer).style.border = "solid red 0px";	
		document.getElementById(nLayer).style.backgroundColor = "#E5EEF5";	
	 }
/********************************************************************************************
			VALIDA FORMULÁRIO DE AGENDAMENTO
*/

	function checkform(){
		if(document.forms[0].nome_msg.value==''){
			alert('Preencha ' + document.forms[0].nome_msg.title);
			document.forms[0].nome_msg.focus();
			return false;
		}
		if(document.forms[0].email_msg.value==''){
			alert('Preencha ' + document.forms[0].email_msg.title);
			document.forms[0].email_msg.focus();
			return false;
		}
		if(document.forms[0].mensagem_msg.value==''){
			alert('Preencha ' + document.forms[0].mensagem_msg.title);
			document.forms[0].mensagem_msg.focus();
			return false;
		}	
		document.forms[0].submit();
		return true;
	}

	function valida_Agendamento(){
		if(document.frm_agendamento.data_agendada.value==''){
			alert('Preencha ' + document.frm_agendamento.data_agendada.title);
			return false;
		}
		if(document.frm_agendamento.agend_tx_nome.value==''){
			alert('Preencha ' + document.frm_agendamento.agend_tx_nome.title);
			document.frm_agendamento.agend_tx_nome.focus();
			return false;
		}	
		if(document.frm_agendamento.agend_tx_email.value==''){
			alert('Preencha ' + document.frm_agendamento.agend_tx_email.title);
			document.frm_agendamento.agend_tx_email.focus();
			return false;
		}		
		if(document.frm_agendamento.agend_tx_predio.value==''){
			alert('Preencha ' + document.frm_agendamento.agend_tx_predio.title);
			document.frm_agendamento.agend_tx_predio.focus();
			return false;
		}		
		if(document.frm_agendamento.agend_tx_apartamento.value==''){
			alert('Preencha ' + document.frm_agendamento.agend_tx_apartamento.title);
			document.frm_agendamento.agend_tx_apartamento.focus();
			return false;
		}		
		if(document.frm_agendamento.agend_tx_telefone.value==''){
			alert('Preencha ' + document.frm_agendamento.agend_tx_telefone.title);
			document.frm_agendamento.agend_tx_telefone.focus();
			return false;
		}
		document.frm_agendamento.submit();
		return true;
	}
	 