//隐藏Module
function HideModule(id)
{
	if(confirm('你确定要移除该模块吗？该操作只是隐藏模块，不会删除'))
	{
		$.get("/BlogEd_HideModule.aspx?mid="+id, null, function(t){if(t.Length>0){eval(t);}else{$('#'+id).hide();}});
	}
	return false;
}
//显示编辑层
function LoadEditDiv(url)
{
	var time = new Date().getTime();
	if(url.indexOf("?")!=-1)
	{
		url += "&random="+time;
	}else{
		url += "?random="+time;
	}
	$('#ModuleDivEdit').load(url,null,function(){ShowDivInCenter('ModuleDiv',600, 400);});
}
//申请专业博客或企业博客
function ToBeRequest(type)
{
	var time = new Date().getTime();
	$.get("/ToBeRequest.aspx?type="+type+"&random="+time, null, function(t){alert(t);});
}

    var vptypelable = null;
    function ShowVPType(obj) {
        if (vptypelable != null) {
            $("#" + vptypelable).hide();
        }
        $("#" + obj).show();
        vptypelable = obj;
    }

function ChangeMoney(vscoin,unchoice) {
	if(unchoice){
		var choicerad = document.getElementById("UnChoice");
		if ($("#OtherVSCoin").val() == null || $("#OtherVSCoin").val() <= 0) {
			$("#ValidateVSCoin").html("<font color='red'> 请输入V币数量值!</font>");
			SetMoney(0);
			return;
		}
		else if ($("#OtherVSCoin").val() < 10) {
			$("#ValidateVSCoin").html("<font color='red'> V币数量值不能低与10!</font>");
			SetMoney($("#OtherVSCoin").val());
		}
		else if (choicerad.checked) {
			vscoin == -1 ? SetMoney($("#OtherVSCoin").val()) : SetMoney(vscoin.value);
		}
	}
	else {
		$("#ValidateVSCoin").html("");
		SetMoney(vscoin.value);
	}
}
function SetMoney(vscoin){
	var money = parseFloat(vscoin) / 10;
	$("#MoneySpan").html("<font color='red'>" + ForDight(money, 2) + "</font>");
	$("#money").val(ForDight(money, 2));
}
function ForDight(Dight, How) {
   Dight = Math.round(Dight * Math.pow(10, How)) / Math.pow(10, How);
   return Dight;
}
function ShowLoadWindows() {
   openWin('V币充值','Loading.aspx',260);
}
function UnChoiceClick() {
   var choicerad = document.getElementById("UnChoice");
   choicerad.checked = true;
   choicerad.onclick();
}

