﻿var VPay8 = PayClass.create();
VPay8.prototype={
    initialize :function(){
    },
    CheckPay : function(){
        var page_server = $.trim($("#ddlArea").val());
        var page_account = $.trim($("#txtAccount").val());
        var page_check_account = $.trim($("#txtConAccount").val());
        var page_price = $("#ddlPay").val();
        var page_check_code  = $.trim($("#txtCode").val());
        if(page_server == "")
        {
            alert("请选择充值区服！");
            $("#ddlArea").focus();
            return false;
        }
        if(page_account == ""){
            alert("充值账号不能为空！");
            $("#txtAccount").focus();
            return false;
        }
        if(!validate.isEMail(page_account)){
            alert("充值账号格式不正确！");
            $("#txtAccount").focus();
            return false;
        }
        if(page_check_account == ""){
            alert("确认账号不能为空！");
            $("#txtConAccount").focus();
            return false;
        }
        if(page_check_account != page_account){
            alert("充值账号与确认账号不同！");
            $("#txtConAccount").focus();
            return false;
        }
        if(page_price == undefined){
            alert("请选择充值金额！");
            return false;
        }
        if(page_check_code == ""){
            alert("验证码不能为空！");
            $("#txtCode").focus();
            return false;
        }
        if(page_check_code.length!=4){
            alert("验证码格式不正确！");
            $("#txtCode").focus();
            return false;   
        }
        return true;
    }
}
var checkPay = new VPay8();
