var
	promptObject = false,
	overPrompt = false;

function showPrompt() {
	if (promptObject == true) {
		getElement("prompt").className = "visible";
		getElement("promptName").className = "now";
	}
}

function closePrompt() {
	if (promptObject == true && overPrompt == false) {
		getElement("prompt").className = "hidden";
		getElement("promptName").className = "";
	}
}

function promptCoordinates() {
	promptObject = getCoordinates("prompt");
	getElement("prompt").style.marginTop = "-" + promptObject.height + "px";
	getElement("prompt").style.top = "auto";
	getElement("promptSource").className = "on";
	promptObject = true;
}

getBody().onclick = function () {
	closePrompt();
}

setOnload(promptCoordinates);