// begin help options dropdown area
var isHelpDDVisible = false;
var onHelpDD = false;

function onClickInit(e){
	if (isHelpDDVisible) {
		if (onHelpDD == false) helpDDToggle();
	}
	onHelpDD = false;
} 

function onMouseDownPop(e) {
	onHelpDD = true;
}

function helpDDToggle() {
	var ref = document.getElementById("helpOptionsContainer");
	if (isHelpDDVisible){
		ref.style.display = "none";
		isHelpDDVisible = false;
	} else {
		ref.style.display = "block";
		isHelpDDVisible = true;
	}
}
// end help options dropdown area

// function to set a bookmark
function bookmark(title, url) {
	if (document.all)
		window.external.AddFavorite(url, title);
	else if (window.sidebar)
		window.sidebar.addPanel(title, url, '')
}

// Onload event handler
addLoadEvent( function() {
	// disable content highlighting
	//document.onselectstart = function () { return false; } // ie
	//document.onmousedown = function () { return false; } // mozilla
	
	// define onclick and onmousedown event handlers
	document.onclick = onClickInit;
	document.getElementById('helpOptionsTitle').onmousedown = onMouseDownPop;
} );
