var speed = 'slow';
function ShowMsg(content,timeout){
    var msglist = $("#SystemMsgList");
    msglist.prepend("<li>"+content+"</li>");
    setTimeout(function(){$(".cue li:first").fadeOut(speed,function(){$(this).remove();});setTimeout(function(){if($(".cue li").size() > 0){$(".cue li").fadeOut(speed,function(){$(this).remove();})}},3000)},timeout);
}
function ShowErrorMsg(content,timeout){
    var msglist = $("#SystemMsgList");
    msglist.prepend("<li class=\"err\">"+content+"</li>");
    setTimeout(function(){$(".cue li:first").fadeOut(speed,function(){$(this).remove();});setTimeout(function(){if($(".cue li").size() > 0){$(".cue li").fadeOut(speed,function(){$(this).remove();})}},3000)},timeout);
}        
function RefreshUserAvatar()
{
    var newimg=$(".user_icon").children().children().children("img:first").attr("src")+"&key="+Math.floor(100+Math.random()*899);
    $(".user_icon").children().children().children("img:first").slideUp(speed,function(){$(this).attr("src",newimg).fadeIn(speed);});
}

var Menu_Notic = {};
Menu_Notic.open = function(){
    $("#menu_notic_list").fadeIn('fast');
    $("#menu_notic").attr("open","yes");
};

Menu_Notic.close = function(){
    $("#menu_notic_list").fadeOut('fast');
    $("#menu_notic").attr("open","no");
};

$(document).ready(function(){
    $("#menu_notic").click(function(){if($(this).attr("open") == "no"){Menu_Notic.open();}else{Menu_Notic.close();}
    }).live("mouseover",function(){
        Menu_Notic.open();
    })
    
    $("#menu_notic,#menu_notic_list").hover(function(){
        $("#menu_notic").attr("over","yes");
    },function(){
        $("#menu_notic").attr("over","no");
    })

    
    $("").click(function(){
        if($("#menu_notic").attr("over") == "no")
        {
            Menu_Notic.close();
        }
    })
    
    if($("#menu_notic[class*='newing']").length > 0)
    {
        Menu_Notic.open();
    }
})
