

function initRecommendation() {
	var toggleButton = document.getElementById('toggleRecommendButton');
	var closeButton = document.getElementById('closeRecommendButton');
	var recommendationBox = document.getElementById('recommendationBox');
	if (toggleButton && closeButton && recommendationBox) {
		toggleButton.onclick = function() {
			var recommendationBox = document.getElementById('recommendationBox');
			if (recommendationBox) {
				// TODO what about confirmation  
				var node = document.getElementById('recommendationConfirmationBox');
				if (node) {
					addClass(node, 'hidden');
				} 
				if (matchClassName('hidden',recommendationBox.className)) {
					removeClass(recommendationBox, 'hidden');
				} else {
					addClass(recommendationBox, 'hidden');
				}
				this.blur();
				return false;
			}
			return true;
		}

		closeButton.onclick = function() {
			var recommendationBox = document.getElementById('recommendationBox');
			if (recommendationBox) {
				addClass(recommendationBox, 'hidden');
				this.blur();
				return false;
			}
			return true;
		}

		var closeRecommendConfirmButton = document.getElementById('closeRecommendConfirmButton');
		if (closeRecommendConfirmButton) {
			closeRecommendConfirmButton.onclick = function() {
				var recommendationBox = document.getElementById('recommendationConfirmationBox');
				if (recommendationBox) {
					addClass(recommendationBox, 'hidden');
					this.blur();
					return false;
				}
				return true;
			}
		}
	}
}


addInitFunction(initRecommendation);