﻿function PageDate() {
	var a = "星期日,星期一,星期二,星期三,星期四,星期五,星期六".split(",");
	with (new Date()) {document.write(getFullYear() + '年' + (getMonth()+1) + '月' + getDate() + '日 ' + a[getDay()]);}
}
function PageDate1() {with (new Date()) {getFullYear() + '年' + (getMonth()+1) + '月' + getDate() + '日'}}

function check_user_pwd(pFrm) {
	if (pFrm.username.value.length < 3) {
		alert("用戶名最少要有3個字元!");
		pFrm.username.focus();pFrm.username.select();return false;
	}
	if (pFrm.password.value.length < 3) {
		alert("密碼也至少要有3個字元!");
		pFrm.password.focus();pFrm.password.select();return false;
	}
}

function check_search_value(pFrm) {
	var sTmp = "", i,
		s = pFrm.byvalue.value.toString(),
		pos = s.indexOf("%");
		
	for (i=0; i<s.length; i++) {
		if (s.charAt(i) != " ")
			sTmp += s.charAt(i);
	}
	if (pos > -1 || sTmp.length < 1) {
		alert("檢索值不能為空,最少也要有1個字元且不含字元\'%\' !");
		pFrm.byvalue.focus();pFrm.byvalue.select();return false;
	}
}

function show_menu(io, x, y, jo) {
	var d = document.body;
	jo.style.display = 'block';
	jo.style.pixelTop =  io.getBoundingClientRect().top + io.offsetHeight + d.scrollTop - x;
	jo.style.pixelLeft = io.getBoundingClientRect().left + d.scrollLeft - y;
}

function vOver(o){o.style.display='block';}
function vOut(o){o.style.display='none';}

var subWin = null;
function sameWin(u, w, h) {if (subWin) subWin.close(); subWin = window.open(u, "subWin", "width="+w+", height="+h+",left="+(screen.width - w)/2+",top="+(screen.height - h)/2+",directories=no,location=0,channelmode=0,status=no,scrollbars=yes,resizable=yes,menubar=no");}
function popWin(u, w, h, sNo) {if (subWin) subWin.close(); subWin = window.open(u, "subWin", "width="+w+", height="+h+",left="+(screen.width - w)/2+",top="+(screen.height - h)/2+",directories=no,location=0,channelmode=0,status=no,scrollbars="+sNo+",resizable=no,menubar=no");}

var glb_Help_Online_Call_Lable = "您在一分鐘內不能連續撥打電話！";

