// JavaScript Document


// Help popup functions
var time_to_hide = 500;

var help_popup_timeout = null;
var help_popup_element = null;

function show_help_popup(element) {
    if (help_popup_timeout != null) {
        clearTimeout(help_popup_timeout);
        help_popup_timeout = null;
    }
    
    if (element != help_popup_element) {
        hide_help_popup();
    }

    help_popup_element = element;
    help_popup_element.style.display = 'block';
    help_popup_element.style.visibility = 'visible';
	  help_popup_element.style.zIndex = 300;

}

function delayed_hide_help_popup() {
    if (help_popup_timeout != null) {
        clearTimeout(help_popup_timeout);
    }
    
    help_popup_timeout = setTimeout("hide_help_popup()", time_to_hide);
}

function hide_help_popup() {
    if (help_popup_element != null) {
        help_popup_element.style.display = 'none';
        help_popup_element.style.visibility = 'hidden';
        help_popup_timeout = null;
    }
}
// End help popup functions
