// 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)');
 }
 */

 //]]>
	// JavaScript Document
	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 fechaJanela(){  
	  setTimeout( "document.getElementById('BannerAlternativo').style.display='none'", 4000);  
    }  
	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 check_form(frmString, frmCampoValidar){
				
		var TstringCompara = frmCampoValidar.split(",").length;
		var StringElement = frmCampoValidar.split(",");
		var i;
		for (i=0;i<=(TstringCompara-1);i++){		
			var NomeCampo = StringElement[i];
			if(document.getElementById(NomeCampo).type == 'text' || document.getElementById(NomeCampo).type == 'textarea'){
				if(document.getElementById(NomeCampo).value==''){
					alert('Preencha: ' + document.getElementById(NomeCampo).title);
					document.getElementById(NomeCampo).focus();				
					return false;
					break;		
				}
			}else if(document.getElementById(NomeCampo).type == 'checkbox'){
				if(!document.getElementById(NomeCampo).checked){
					alert('Selecione: ' + document.getElementById(NomeCampo).title);
					document.getElementById(NomeCampo).focus();				
					return false;
					break;		
				}							
			}
		}
		return true;
	}
/* Exibe campo*/	
	function exibirCampo(campoexibir,campoocutar){		
		if(document.getElementById(campoexibir).display=='none'){
			document.getElementById(campoexibir).display='block';
			document.getElementById(campoocutar).display='none';
		}		
	}	
	function SaveIMG(){
	
		document.getElementById("enviar_img").Value = "Aguarde enviando...";
		document.getElementById("enviar_img").disabled = true;
		document.getElementById("img_form").action="zoup.fit-salvar-img.asp"
		document.getElementById("img_form").submit();
		return true;	
	}
	function DellIMG(){
	
		document.getElementById("deletar_img").Value = "Aguarde enviando...";
		document.getElementById("deletar_img").disabled = true;
		document.getElementById("enviar_img").Value = "\&gt\;\&gt\;  selecionar imagem  \&lt\;\&lt\;";
		document.getElementById("enviar_img").disabled = false;
		document.getElementById("img_form").action="zoup.fit-deletar-img.asp"
		document.getElementById("img_form").submit();
		return true;	
	}		
	function SaveIMGBanco(){
		document.forms[0].acao.value ='atualizar_imagem';
		document.forms[0].target="execFunc";		
		document.forms[0].submit();
		return true;	
	}		 