// JavaScript Document
function createform (e,year,month,day){
	var xmlhttp = getxmlhttp();
	theObject = document.getElementById("createtask");
	theObject.style.visibility = "visible";
	theObject.style.height = "100px";
	theObject.style.width = "250px";
	var posx = 0;
	var posy = 0;
	posx = e.clientX + document.body.scrollLeft;
	posy = e.clientY + document.body.scrollTop;
	theObject.style.left = posx + "px";
	theObject.style.top = posy + "px";
	//The location we are loading the page into.
	var objID = "createtask";
	var serverPage = "ajax/theform.php";
	serverPage = serverPage + "?year="+year;
	serverPage = serverPage + "&month="+month;
	serverPage = serverPage + "&day="+day;
	var obj = document.getElementById(objID);
	xmlhttp.open("GET", serverPage);
	xmlhttp.onreadystatechange = function() {
		if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
			obj.innerHTML = xmlhttp.responseText;
		}
	}
	xmlhttp.send(null);
}

function closetask (){
	theObject = document.getElementById("createtask");
	theObject.style.visibility = "hidden";
	theObject.style.height = "0px";
	theObject.style.width = "0px";
}

function hidetask (){
	tObject = document.getElementById("taskbox");
	tObject.style.visibility = "hidden";
	tObject.style.height = "0px";
	tObject.style.width = "0px";
}
