function LoadHelp(mod, act){
	return;
    if ($.cookie("win_mode") == null){
        $.cookie("win_mode", '1');
    }
    
    $.ajax({
        url: '/view/help.php?action=gethelp',
        data : 'pr=lm&mod='+ mod + '&act=' + act,
        type : "POST",
        success: function (data, textStatus) {
        	var data = processResponse(data);
            if (data.title !=''){
                
                $("body").append("<div style=\"display:none;\" id=\"notice_container\"><div id=\"icon\">&nbsp;</div><div id=\"header_text\">" + data.title + "</div><div id=\"text\">" + data.text + "</div><div id=\"notice_close\"><div id=\"icon\">&nbsp;</div><div id=\"text\">Close and don't show me again.</div></div></div><div id=\"notice_container_open\" onmouseover=\"flip(this,'bottom')\" onmouseout=\"flip(this,'top')\"></div>");
                if ($.cookie("win_mode") == '1'){
                    $("#notice_container_open").hide();
                    $("#notice_container").show();
                } else {
                    $("#notice_container_open").show();
                    $("#notice_container").hide();
                }
                
                $('#notice_close').click(function(){
                    $.cookie("win_mode", '0');
                     $("#notice_container").hide("slide", {direction:"horizontal"}, 1000);
                     $("#notice_container_open").show("slide", {direction:"horizontal"}, 1000);
                });
                $('#notice_container_open').click(function(){
                    $.cookie("win_mode", '1');
                     $("#notice_container").show("slide", {direction:"horizontal"}, 1000);    
                     $("#notice_container_open").hide("slide", {direction:"horizontal"}, 1000);
                });
            }
        }
    });
}

function processResponse(result) {
    return eval('(' + result + ')');
}

function AlertShow(header_text, cont){
	var tmp = '	<div id="alert_icon">&nbsp;</div>' +
				'<div id="alert_header_text">'+ header_text + '</div>' +
				'<div id="break"></div>';
	cont = tmp + cont;
	var w = $.jWin.create({
		alwaysCentered:true,
		autoShow:false,
		modal:true,
		overlayOpacity:0.4,
		overlayColor:'#000',
		handleEscape:true
	});
	w.setContent(cont);
	w.show();
}	

function flip(obj,moves){
	var browser = navigator.appName;
  	var b_version = navigator.appVersion;
  	var version = parseFloat(b_version);
  	if ((browser == "Microsoft Internet Explorer") && (version <= 6)){
    	obj.style.backgroundPositionY = moves;
  	}
}
	
function Message(num, msg, longmessage){
	$("#top_message").append('<div id="icon">&nbsp;</div><div id="message">You have ' + num + ' messages <br> <a id="readmessage" href="#">Read message...</a></div>');
    $('#readmessage').click(function(){
    	AlertShow('You have ' + num + ' messages', msg);
	});	
	if (longmessage != '') {
		AlertShow('You have ' + num + ' messages', msg);
	}
}
