// ------------------------ Help Functions ------------------------
var details_timer = 500;
var details_timer_id = null;
var details_help = null;
var details_mouse_in = false;
var isIE = (navigator.appName.indexOf("Microsoft Internet Explorer") > -1);

function getObjectById(id){
	return document.getElementById(id);
}
function show_help(id, e){
	if (!e) var e = window.event;
	var x = (e.pageX)?(e.pageX):(event.clientX + document.body.scrollLeft);
	var y = (e.pageY)?(e.pageY):(event.clientY + document.body.scrollTop);

	if (details_timer_id) clearTimeout(details_timer_id);
	obj = getObjectById(id);
	if (details_help){
		details_help.className = "display_none";
	}
	if (obj){
		width = parseInt(obj.style.width) + 20;
		if (document.body.clientWidth){
			if (x + width >= document.body.clientWidth){
				x = document.body.clientWidth - width;
			}
		}
		obj.style.left = x;
		obj.style.top = y;
		if (isIE){
			var frame = getObjectById("iframe1");
			if (frame){
				frame.style.left = parseInt(obj.style.left) + 5;
				frame.style.top = parseInt(obj.style.top) + 5;
				frame.style.width = obj.style.width;
				frame.style.height = obj.style.height;
				frame.style.display = "block";
			}
		}
		obj.className = "display_block";
		details_help = obj;
	}
}

function hide_help(){
	if (details_mouse_in){
		details_timer_id = setTimeout("hide_help()", details_timer);
		return;
	}
	if (details_help){
		if (isIE){
			var frame = getObjectById("iframe1");
			if (frame){
				frame.style.display = "none";
			}
		}
		details_help.className = "display_none";
	}
}

function hide_help_timeout(){
	details_timer_id = setTimeout("hide_help()", details_timer);
}

function help_mouse_in(){
	details_mouse_in = true;
}

function help_mouse_out(){
	details_mouse_in = false;
}