// JavaScript Document

function exibeVlCp(comp,cp,txt){
	//var cp=campo;
	switch(comp){
		//Comportamento Focus
		case 1:
		if(cp.value.length==0 || cp.value==txt) cp.value=''; 
			break;
		//Comportamento Blur
		case 2:
		if(cp.value.length==0) cp.value=txt;					
			break;
		}
		return true;
}

window.onload = function(){
	var calendario = new  Epoch('calendario','popup',document.getElementById('periodo'));
	var calendario = new  Epoch('calendario','popup',document.getElementById('periodo2'));
}

function setCampo(acao,campo) {
	
	switch(acao){
		
		case 1:
		document.getElementById(campo).style.display = 'block';
		break;
		
		case 2:
		document.getElementById(campo).style.display = 'none';
		var temp = document.reserva.opcao_apartamento;
		var aux="";
		for(x=0;x<temp.length;x++)aux+=(temp[x].checked==true)?temp[x].value+", ":"";
		aux=aux.substring(0,aux.length-2);
		if(aux != '') document.getElementById('apartamento').value = aux;
		else
		document.getElementById('apartamento').value = ' Tipo de Apartamento';
		break;
		
	}
	
}
