﻿//模态对话框
function jsShowModalDialog(strUrl, args, iWidth, iHeight) {
    var style = "dialogWidth:" + iWidth + "px;";
    style = style + " dialogHeight:" + iHeight + "px;";
    style = style + "center:yes; help:no; scroll:yes; status:no;";
    return window.showModalDialog(strUrl, args, style);
}

function jsReturnValue(v) {
    //由页面提供返回值
    if (window.jsPreReturnValue != null) {
        top.returnValue = jsPreReturnValue(v);
    }
    else {
        top.returnValue = v;
    }

    window.close();
}

function jsReturnCancel() {
    top.returnValue = null;
    window.close();
}

function jsLiRowStyle(id) {
    var Ptr = document.getElementById(id).getElementsByTagName("li");

    for (i = 1; i < Ptr.length + 1; i++) {
        Ptr[i - 1].className = (i % 2 > 0) ? "t1" : "t2";
    }

    for (var i = 0; i < Ptr.length; i++) {
        Ptr[i].onmouseover = function () {
            this.tmpClass = this.className;
            this.className = "t3";
        };
        Ptr[i].onmouseout = function () {
            this.className = this.tmpClass;
        };
    }
}
