﻿// 产生一个弹出式窗口，且窗口居中。
// 参数说明：obj--URL;winName--窗口名称;width--窗口宽度;height--窗口高度
function openwindow( obj, winName, width, height) 
{
    xposition=0; yposition=0;
    if ((parseInt(navigator.appVersion) >= 4 ))
    {
        xposition = (screen.width - width) / 2;
        yposition = (screen.height - height) / 2;
    }
    theproperty= "width=" + width + "," + "height=" + height + "," + "screenx=" + xposition + "," + "screeny=" + yposition + "," + "left=" + xposition + "," + "top=" + yposition+",scrollbars=yes";
    window.open(obj,winName,theproperty );
}

// 产生一个模态对话框
function openDialog(obj,width,height)
{
    showModalDialog(obj, window, "dialogWidth:"+width+"; dialogHeight:"+height+"; status:0; help:0");
} 






