var contactBox = null;
var contactBoxCloseButton = null;
var timerId = -1;

/* functions for showing/hiding contact box */

function ActivateContactButton() {
	contactBox = document.getElementById("contactBox");
	if (contactBox == null) {
		return;
	}

	// HACK
	/*contactBox.style.filter = "alpha(opacity=20)";
	contactBox.style.opacity = ".2";
	contactBox.style.visibility = "visible";*/
	
	contactBoxCloseButton = document.getElementById("contactBoxCloseButton");
	if (contactBoxCloseButton) {
		contactBoxCloseButton.setAttribute("onclick", "HideContactForm();"); // add javascript event handler
	}
	
	var contactBtn = document.getElementById("contactMenuButton");
	if (contactBtn != null) {
		// prepare menu button
		contactBtn.setAttribute("href", "#"); // remove href url
		contactBtn.setAttribute("onclick", "ShowContactForm();"); // add javascript event handler
	}
}

function ShowContactForm() {
	if (contactBox != null) {
		if (contactBox.style.visibility == "visible") {
			HideContactForm();
		}
		else {
			contactBox.style.visibility = "visible";
			if (contactBoxCloseButton != null) {
				contactBoxCloseButton.style.visibility = "visible";
			}
		}
	}
}

function HideContactForm() {
	if (contactBox != null) {
		contactBox.style.visibility = "hidden";
	}
	if (contactBoxCloseButton) {
		contactBoxCloseButton.style.visibility = "hidden";
	}
}
