// JavaScript Document
//只能輸入數字跟刪除鍵
function CheckNum(e){
    var key = window.event ? e.keyCode : e.which;
	var keychar = String.fromCharCode(key);
	reg = /\d/;
	return reg.test(keychar);
}

// 開啟檔案管理視窗
function upload_window(action_file,return_id){   
    var new_width  = 720;
    var new_height = 500;
    //var scr_width  = screen.availWidth;
    //var scr_height = screen.availHeight;
    //var old_width  = scr_width - new_width;
    //var old_height = scr_height;
    //var space = 0 - window.screenLeft ;
    //window.resizeTo(old_width,old_height);
    //window.moveBy(space,0);
    window.open(action_file + '&return_id=' + return_id ,'','width='+new_width+',height='+new_height+',scrollbars=yes,status=yes');
}

function resize_opener(){
    var scr_width  = screen.availWidth;
    var scr_height = screen.availHeight;
    window.opener.resizeTo(scr_width,scr_height);
}

function ConfirmMSG(msg,url){
    var conf = confirm(msg);
    if(conf){
        location.href= url;
        return true;
    }else{
        return false;
    }
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

