﻿function AddIntoPackageOrder(packageID) {
    AjaxMethodPL.AddIntoPackageOrder
    (
        packageID,
        function (result) {
            AddIntoPackageOrder_CallBack(result);
        }
    );
}
function AddIntoPackageOrder_CallBack(result) {
    if (null == result.error) {
        if (result.value != null) {
            var resultAarry = result.value.split('|');
            if (resultAarry[0] != "-1") {
                if (resultAarry[1] == "false") {
                    //window.location.href = "PL_Login.aspx?TempPLOrderId=" + result.value + "&GameID=" + $("input[id$='hdGameID'][type='hidden']").val();
                    window.location.href = resultAarry[2] + "-Powerlevel-Login-" + resultAarry[0] + "-1.html";
                    return;
                }
                //window.location.href = "Cart_Powerlevelin.aspx?TempPLOrderId=" + result.value + "&GameID=" + $("input[id$='hdGameID'][type='hidden']").val();
                window.location.href = resultAarry[2] + "-Cart-Powerlevel-" + resultAarry[0] + "-1.html";
            }
        }
    }
    else {
        alert("Insert Order Error!");
        //return;
    }
}
