// JavaScript Document
//Função exibe Página
function exibeCalendario(e,mover,pagServidor)
{
	xmlhttp = criaXMLHTTP();
	obj = document.getElementById('areaCalendario');	
	
	//mover DIV para o local do clique
	if(mover == 'moverSIM')
	{
		var posx = 0;
		var posy = 0;
		posx = e.clientX+document.documentElement.scrollLeft;
		posy = e.clientY+document.documentElement.scrollTop;
		obj.style.position = 'absolute';

		obj.style.left = posx+(-188)+"px";
		obj.style.top  = posy+(5)+"px";
	}//FIM mover DIV para o local do clique
	
	obj.style.display = 'block';
	
	xmlhttp.open('POST',pagServidor,true);
	xmlhttp.onreadystatechange = function()
	{
		if(xmlhttp.readyState == 4 && xmlhttp.status == 200)
		{
			obj.innerHTML = xmlhttp.responseText;	
		}
	}
	
	xmlhttp.send(null);
}//FIM função exibe Página

function buscaDados(e,pagServidor,mover)
{
	xmlhttp = criaXMLHTTP();
	obj = document.getElementById('areaInfo');	
	
	//mover DIV para o local do clique
	if(mover == 'moverSIM')
	{
		var posx = 0;
		var posy = 0;
		posx = e.clientX+document.documentElement.scrollLeft;
		posy = e.clientY+document.documentElement.scrollTop;
		obj.style.position = 'absolute';

		obj.style.left = posx+(-90)+"px";
		obj.style.top  = posy+(30)+"px";
	}//FIM mover DIV para o local do clique	
	
	obj.style.display = 'block';
	
	xmlhttp.open('POST',pagServidor,true);
	xmlhttp.onreadystatechange = function()
	{
		if(xmlhttp.readyState == 4 && xmlhttp.status == 200)
		{
			obj.innerHTML = xmlhttp.responseText;	
		}
	}
	
	xmlhttp.send(null);
}

function fecharQuadro(obj)
{
	document.getElementById(obj).style.display = 'none';
}