// ************************  Função para exibir o calendario
function pos_calendario(camporef, divexib){
	/*var el = document.getElementById(camporef); // Campo de referencia para localização
	var x = 0; //Lado
	var y = el.offsetHeight; // Topo
	//Walk up the DOM and add up all of the offset positions.
	while (el.offsetParent && el.tagName.toUpperCase() != 'BODY'){ // Pegar posição do campo do form
		x += el.offsetLeft;
		y += el.offsetTop;
		el = el.offsetParent;
	}

	x += el.offsetLeft;
	y += el.offsetTop;
	document.getElementById(divexib).style.left 		= x + 'px';
	document.getElementById(divexib).style.top 			= y + 'px';
	document.getElementById(divexib).style.display 		= 'block';
	*/
	ajaxGet('admin/homologacao/calendario.php',document.getElementById(divexib),true, '<span class=texto>Aguarde...</span>');
}

// ************************  Função para REMOVER o calendario
function rem_calendario(divexib){
	document.getElementById(divexib).style.left 		= '0px';
	document.getElementById(divexib).style.top 			= '0px';
	document.getElementById(divexib).style.display 		= 'none';
	document.getElementById(divexib).innerHTML			= '&nbsp;';
}

// ************************  Função para selecionar data_calendario
function muda_data_calend(nova_data, divexib){
	ajaxGet('homologa_campos.php?dia='+nova_data+'&semana='+divexib,document.getElementById('exibe_campos'),true, '<span class=texto>Aguarde...</span>');	
}

// ************************  Função para mudar o tipo de data
function muda_tipo_data(){
	if(document.getElementById('tipo_data').value=='2'){
		muda_estilo('tab_data_tipo_2', 3);
		muda_estilo('tab_data_tipo_1', 4);
	}
	if(document.getElementById('tipo_data').value=='1'){
		muda_estilo('tab_data_tipo_2', 4);
		muda_estilo('tab_data_tipo_1', 3);
	}
}

// ************************  Função para selecionar data_calendario
function muda_mes_calend(mes, ano, divexib){
	ajaxGet('admin/homologacao/calendario.php?mes='+mes+'&ano='+ano,document.getElementById(divexib),true, '<span class=texto>Aguarde...</span>');
}

