//-------------------------------------------//
//     程式: function.js                     //
//     用途: 常用java判斷函數                //
//     作者: 鄭玉萍                          //
//     中華聯網寬頻維運部軟體開發團隊        //
//-------------------------------------------//


<!-- -------------------- 以按鈕開啟彈出視窗(開始) ------------------- -->
function MM_openBrWindow(theURL,winName,features) {
	window.open(theURL,winName,features);
}
<!-- -------------------- 以按鈕開啟彈出視窗(結束) ------------------- -->


<!-- -------------------- 以按鈕開啟彈出置中視窗(開始) ------------------- -->
function MM_centerWindow(theURL,winName,width,height,features) {
    var window_width = width;
    var window_height = height;
    var edfeatures= features;
    var window_top = (screen.height-window_height)/2;
    var window_left = (screen.width-window_width)/2;
    newWindow=window.open(''+ theURL + '',''+ winName + '','status=yes,scrollbars=yes,width=' + window_width + ',height=' + window_height + ',top=' + window_top + ',left=' + window_left + ',features=' + edfeatures + '');
    newWindow.focus();
}
<!-- -------------------- 以按鈕開啟彈出置中視窗(開始) ------------------- -->

<!-- -------------------- 以按鈕開啟同頁視窗(開始) ------------------- -->
function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
<!-- -------------------- 以按鈕開啟同頁視窗(開始) ------------------- -->

<!-- -------------------- 障礙申告查詢--跳出日期判斷式(開始) ------------------- -->
function getValue(selOBJ) { 
  get_value = selOBJ[selOBJ.selectedIndex].value;
  if(get_value == 'CauseTime'  || get_value == 'CSTime') {document.add_form.history_str.value=document.add_form.UpdDate.value;}
  if(get_value == 'InterruptID' || get_value == 'Cause' || get_value == 'FixStatus'  || get_value == 'CustomerID'  || get_value == 'FixerID') {document.add_form.history_str.value='';}
}
<!-- -------------------- 障礙申告查詢--跳出日期判斷式(結束) ------------------- -->