﻿//发送彩信
function DownloadMms(obj) {
    var mmsId = obj.parentNode.getElementsByTagName('input')[0].value;
    var resultMsg = _smsmmsdownload.DownloadMms(mmsId).value;
    switch (resultMsg) {
        case "10001":
            ShowAlert1("发送成功");
            break;
        case "10002":
            ShowAlert1("发送失败");
            break;
        case "10003":
            ShowAlert1("彩信格式不正确,不能发送")
            break;
        case "10004":
            ShowError();
            break;
        case "10005":
            ShowLogin();
            break;
        default:
            ShowAlert1("数据错误,请稍后再试");
            break;
    }
}

//发送短信
function DownloadSms(obj) {
    var smsId = obj.parentNode.getElementsByTagName('input')[0].value;
    var resultMsg = _smsmmsdownload.DownloadSms(smsId).value;
    switch (resultMsg) {
        case "10001":
            ShowAlert1("发送成功");
            break;
        case "10002":
            ShowAlert1("发送失败");
            break;
        case "10003":
            ShowAlert1("彩信格式不正确,不能发送");
            break;
        case "10004": //首页弹出没有登陆提示框
            ShowError();
            break;
        case "10005":
            ShowLogin(); //发送页弹出登陆框
            break;
        default:
            ShowAlert1("数据错误");
            break;

    }
}

function ShowAlert1(msgContent) {
    var pop = new Popup({ contentType: 4, isReloadOnClose: false, width: 340, height: 80 });
    pop.setContent("title", "提示信息");
    pop.setContent("alertCon", msgContent);
    pop.build();
    pop.show();
}

function ShowError() {
    var pop = new Popup({ contentType: 1, scrollType: 'no', isReloadOnClose: false, width: 500, height: 500 });
    pop.setContent("contentUrl", "Error.htm");
    pop.setContent("title", "提示信息");
    pop.build();
    pop.show();
}

function CloseBox() {
    window.parent.document.body.removeChild(window.parent.document.getElementById("dialogCase"));
    //不会刷新父页面
}
function closebox1() {
    this.parent.Popup.prototype.reset_m(); //会刷新父页面
}
