﻿
function PageDate()
{
	currentDate = new Date();
	with (currentDate) {
		day = getDay();
		month = getMonth() + 1;
		this.document.write(getFullYear() + '年' + month + '月' + getDate() + '日');
	}
	if (day==1) document.write(' 星期一');                                                
	if (day==2) document.write(' 星期二');
	if (day==3) document.write(' 星期三');
	if (day==4) document.write(' 星期四');
	if (day==5) document.write(' 星期五');
	if (day==6) document.write(' 星期六');
	if (day==0) document.write(' 星期日');
	document.write('');
}

function PageDate1()
{
	currentDate = new Date();
	with (currentDate) {
		day = getDay();
		month = getMonth()+1;
		this.document.write(getFullYear() + '年' + month + '月' + getDate() + '日');
	}
}

function check_user_pwd(theForm)
{
	if (theForm.username.value.length < 3) {
		alert("用户名最少要有3个字符!");
		theForm.username.focus();theForm.username.select();return false;
	}
	if (theForm.password.value.length < 3) {
		alert("密码也至少要有3个字符!");
		theForm.password.focus();theForm.password.select();return false;
	}
}

function check_search_value(theForm)
{
	var temp='';
	var theString = theForm.byvalue.value.toString();
	var pos = theString.indexOf("%");
	for(var i=0; i<theForm.byvalue.value.length; i++) {
		if (theString.charAt(i) != " ")
			temp += theString.charAt(i);
	}
	if (pos > -1 || temp.length < 1) {
		alert("检索值不能为空,最少也要有1个字符且不含字符\'%\' !");
		theForm.byvalue.focus();theForm.byvalue.select();return false;
	}
}

function show_menu(iObj, x, y, jObj)
{
	var Bdy = document.body;
	jObj.style.display = 'block';
	jObj.style.pixelTop =  iObj.getBoundingClientRect().top + iObj.offsetHeight + Bdy.scrollTop - x;
	jObj.style.pixelLeft = iObj.getBoundingClientRect().left + Bdy.scrollLeft - y;
}

function vOver(vObj)
{
	vObj.style.display='block';
}

function vOut(vObj)
{
	vObj.style.display='none';
}

var subWin = null;
function sameWin(surl, sWidth, sHeight)
{
	if (subWin) subWin.close();
	subWin = window.open(surl, "subWin", "width="+sWidth+", height="+sHeight+",left="+(screen.width - sWidth)/2+",top="+(screen.height - sHeight)/2+",directories=no,location=0,channelmode=0,status=no,scrollbars=yes,resizable=yes,menubar=no");
}

function popWin(surl, sWidth, sHeight, sNo)
{
	if (subWin) subWin.close();
	subWin = window.open(surl, "subWin", "width="+sWidth+", height="+sHeight+",left="+(screen.width - sWidth)/2+",top="+(screen.height - sHeight)/2+",directories=no,location=0,channelmode=0,status=no,scrollbars="+sNo+",resizable=no,menubar=no");
}

var glb_Help_Online_Call_Lable = "您在一分钟内不能连续拨打电话！";
