function KillSpace(x)
{
	while((x.length>0) && (x.charAt(0)==' '))
		x = x.substring(1,x.length)
	while((x.length>0) && (x.charAt(x.length-1)==' '))
		x = x.substring(0,x.length-1)
	return x
}

function checkshield()
{
	fdMarkName=KillSpace(document.MarkForm.fdMarkName.value);
	if(fdMarkName=='')
	{
		alert("禁止词语必须填写"); return false;	
	}
	else return true;
}


function checkvbbform() {
	if ((!document.vbcodeform.fdLabel.value)||(!document.vbcodeform.fdReplace.value)||(!document.vbcodeform.fdExample.value)||(!document.vbcodeform.fdDescribe.value))
	{
		alert("必须填写每一项"); return false;
	} else {
		return true;
	}
}

function checkuserinfo()
{
		if(KillSpace(document.inputform.fdPassword.value)=='')
		{
			alert("必须输入密码");
			document.inputform.fdPassword.value='';
			document.inputform.fdPassword.focus();
			return false;
		}
		else
		{
			if( document.inputform.repass.value != document.inputform.fdPassword.value )
			{
				alert("两次输入的密码必须相同");
				document.inputform.repass.value='';
				document.inputform.repass.focus();
				return false;
			}
			else
			{
				return true;
			}
		}
}

//弹出日历的框架
function fPopUpCalendarDlg(ctrlobj) {
	showx = event.screenX - event.offsetX - 4 - 210 ; // + deltaX;
	showy = event.screenY - event.offsetY + 18; // + deltaY;
	newWINwidth = 210 + 4 + 18;

	retval = window.showModalDialog("calendardlg.htm", "", "dialogWidth:197px; dialogHeight:210px; dialogLeft:"+showx+"px; dialogTop:"+showy+"px; status:no; directories:yes;scrollbars:no;Resizable=no; "  );
	if( retval != null ) {
		ctrlobj.value = retval;
	}
}

