﻿// JScript 檔
function calendarPicker(oCtrlID,boolTime) {
        var sURL = '/Tools/CalendarPicker.aspx?CtrlID=' + oCtrlID   + '&Time='+boolTime;
        var x = parseInt(screen.width / 2.0) - (width / 2.0);  
        var y = parseInt(screen.height / 2.0) - (height / 2.0);
        var width = 280;
        var height= 330;
        //if (window.showModalDialog) {
        //  window.showModalDialog(sURL,window,'dialogLeft:' +  x + 'px;dialogTop:' + y + 'px;' +
        //      'dialogWidth:'+width+'px;dialogHeight:'+height+'px;directories:yes;scrollbars:no,resizable=no');
        //}
        //else {
            var win = window.open(sURL, "calendarPopup", "top=" + y + ",left=" + x + ",scrollbars=no,dialog=yes,modal=yes,width=" + width + ",height=" + height + ",resizable=no" ); 
            eval('try { win.resizeTo(width, height); } catch(e) { }'); 
            win.focus();
        //}
    }
    
function calendarPicker(oCtrlID,boolTime,sLang) {
        var sURL = '/Tools/CalendarPicker.aspx?CtrlID=' + oCtrlID   + '&Time='+boolTime +'&Lang='+sLang;
        var x = parseInt(screen.width / 2.0) - (width / 2.0);  
        var y = parseInt(screen.height / 2.0) - (height / 2.0);
        var width = 280;
        var height= 330;
        //if (window.showModalDialog) {
        //  window.showModalDialog(sURL,window,'dialogLeft:' +  x + 'px;dialogTop:' + y + 'px;' +
        //      'dialogWidth:'+width+'px;dialogHeight:'+height+'px;directories:yes;scrollbars:no,resizable=no');
        //}
        //else {
            var win = window.open(sURL, "calendarPopup", "top=" + y + ",left=" + x + ",scrollbars=no,dialog=yes,modal=yes,width=" + width + ",height=" + height + ",resizable=no" ); 
            eval('try { win.resizeTo(width, height); } catch(e) { }'); 
            win.focus();
        //}
    }

