﻿// JScript 文件
//以下只能在服务器可见
function document.onkeydown() 
{ 
    var e=event.srcElement; 
    if(event.keyCode==13) 
    { 
        document.getElementById("btnSubmit").click(); 
        return false; 
    } 
} 
function cls()
{
    openwindow("usrRegistDrop.aspx","机构",450,250,0);
}
function select()
{
    openwindow("orgSelect.aspx","选择机构",500,400,0);
}
function openwindow(url, winName, width, height,scrollbar) 
{
    xposition=0; yposition=0;
    if ((parseInt(navigator.appVersion) >= 4 ))
    {
        xposition = (screen.width - width) / 2;
        yposition = (screen.height - height) / 2;
    }
    theproperty= "width=" + width + "," 
                + "height=" + height + "," 
                + "location=0," 
                + "menubar=0,"
                + "resizable=0,"
                + "scrollbars="+scrollbar+","
                + "status=0," 
                + "titlebar=0,"
                + "toolbar=0,"
                + "hotkeys=0,"
                + "screenx=" + xposition + "," //仅适用于Netscape
                + "screeny=" + yposition + "," //仅适用于Netscape
                + "left=" + xposition + ","    //IE
                + "top=" + yposition;          //IE 
    window.open( url,winName,theproperty );
}