/*var UserID = sessionStorage.getItem("MiaoMuUserID");
var userInfo = JSON.parse(sessionStorage.getItem("miaomuUserInfo"));*/
if(UserID!=null&&UserID!=""){
	var forShow = userInfo.name;
	if(forShow==null||forShow==""){
		forShow = userInfo.mobile;
	}
}
//问候语
function helloTime(){
	var hour = new Date().getHours();
	if(hour<10){
		$("#hello-time").html(",早上好!");
	}else if(hour<11){
		$("#hello-time").html(",上午好!");
	}else if(hour<13){
		$("#hello-time").html(",中午好!");
	}else if(hour<17){
		$("#hello-time").html(",下午好!");
	}else if(hour<19){
		$("#hello-time").html(",傍晚好!");
	}else{
		$("#hello-time").html(",晚上好!");
	}
}
$(function(){
	helloTime();
	if(UserID!=null&&userInfo!=null&&UserID!=""){
		if(userInfo.touxiang!=null&&userInfo.touxiang!=""){
			$("#tx").attr("src",formatImgUrl(userInfo.touxiang));
			$("#tx").css("border-radius","50px");
		}
		$("#user").html(forShow);
	}
    $("#mm-type-list").show();
    $("#A").on("mouseenter", function () {
        $("#A").html("<span>采购商</span>");
        $("#B").html("<a>供应商</a>");
        $("#C").html("<a href=\"manage/ReleaseBuy.html\" target='_blank'><img alt=\"x\" src=\"images/首页求购.png\"><br>发布求购</a><br><span>需求是什么?直接发布</span>");
        $("#D").html(">>>我是采购商");
		$("#sc").attr("onclick","navigate('manage/soldCollection.html')");
    });
    $("#B").on("mouseenter", function () {
        $("#A").html("<a>采购商</a>");
        $("#B").html("<span>供应商</span>");
        $("#C").html("<a href=\"javascript:void(0);\" onclick=\"navigate('manage/ReleaseSold.html')\" target='_blank'><img alt=\"x\" src=\"images/首页供应.png\"><br>发布供应</a><br><span>手里有什么?直接发布</span>");
        $("#D").html(">>>我是供应商");
		$("#sc").attr("onclick","navigate('manage/buyCollection.html')");
    });
    if(UserID){
		$(".log>div").empty();
	}
});