var help_background = "white";

function show_help_click(elem)
{
	$(".div-help").hide();
	var div_help = $(elem).parent().find(".div-help");
	$(div_help).show();

	$(div_help).hover(
		function()
		{
			 $(document).unbind("click");
		},
		function() 
		{	
			if ($(".div-help:visible").length)
			{
				$(document).unbind("click");
				$(document).click(function(event){
	 				$(document).unbind("click");
					$(div_help).hide();
				});
			};
		}
	);

	$(div_help).find("a").click(function()
	{	
		$(document).unbind("click");
		$(".div-help").unbind("hover");
		$(".div-help").hide();
	});
}

function help_m_out(elem)
{	
	if (typeof(help_background) == 'undefined' || help_background == 'none none none none' || help_background == 'none' || help_background == '')
		help_background = "white";
		
	$(elem).parent().find("label:first").css("background", help_background);
}

function help_m_over(elem)
{
	help_background = $(elem).parent().find("label:first").css("background");
	
	if (typeof(help_background) == 'undefined' || help_background == 'none none none none' || help_background == 'none' || help_background == '')
		help_background = "white";

	$(elem).parent().find("label:first").css("background", "#dde");
}
