﻿
function inputIDout() {
    if ($.trim($("#txtPartnerID").val()) == "") {
        $("#txtPartnerID").val("请输入您的微软合作伙伴ID号码");
    }
}
function inputIDin() {
    if ($.trim($("#txtPartnerID").val()) == "请输入您的微软合作伙伴ID号码") {
        $("#txtPartnerID").val("");
    }
}
function inputCodeout() {
    if ($.trim($("#txtValidateCode").val()) == "") {
        $("#txtValidateCode").val("输入较验码");
    }
}
function inputCodein() {
    if ($.trim($("#txtValidateCode").val()) == "输入较验码") {
        $("#txtValidateCode").val("");
    }
}

function btnGo() {
    if (!($.trim($("#txtValidateCode").val()) == "输入较验码" || $.trim($("#txtPartnerID").val()) == "请输入您的微软合作伙伴ID号码"))
        $.post("../SourceHandler.ashx", { id: $.trim($("#txtPartnerID").val()), code: $.trim($("#txtValidateCode").val()) }, function (data) {

            var temp = data.toString().split('|');
            if ($.trim(temp[0]) == "1000") {
                $("#trHomePage").attr("style", "display:none");
                $("#trError").attr("style", "display:none");
                $("#trContent").attr("style", "display:");
                $("#textareaC").val(temp[1]);
            }
            else {
                $("#trHomePage").attr("style", "display:none");
                $("#trError").attr("style", "display:");
                $("#trContent").attr("style", "display:none");
                $("#divError").html(temp[1]);
            }
        });
}

function btnReturn() {
    $("#trHomePage").attr("style", "display:");
    $("#trError").attr("style", "display:none");
    $("#trContent").attr("style", "display:none");
    $("#txtPartnerID").val("请输入您的微软合作伙伴ID号码");
    $("#txtValidateCode").val("输入较验码");
}