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 checkLogin()
{
	if(KillSpace(document.loginForm.username.value)=='')
	{
		alert('用户名不能为空！');
		document.loginForm.username.focus();
		return false;
	}
	else if(KillSpace(document.loginForm.userPasswd.value)=='')
	{
		alert('密码不能为空！');
		document.loginForm.userPasswd.focus();
		return false;
	}
	else 
	{
		document.loginForm.action = "home/login.jsp";
		document.loginForm.submit();
		return true;
	}
}
function ShowWrtieDialog(filename,tid,obid,bid) {
	//alert(tid+"@@"+obid);
	window.open(filename+"?tid="+tid+"&obid="+obid+"&bid="+bid,"","height=180, width=600, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, resizable=yes,location=no, status=no");
}
function fPopUpWin(filename,prop_w,prop_h,prop_l,prop_t) 
{
	
	/*
	var features =
		'dialogWidth:'  + prop_w + 'px;' +
		'dialogHeight:' + prop_h + 'px;' +
		'dialogLeft:'   + prop_l + 'px;' +
		'dialogTop:'    + prop_t + 'px;'+
		'directories:yes; localtion:yes; menubar:no; status=no; toolbar=no;scrollbars:no;Resizeable=no';    
		*/
		window.open(filename,"","height=220, width=400, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no");
	//var reval = window.open(filename,"",features);
	//if(reval)
	//parent.showArticleFrame.window.location.reload(); // 刷新开启页面的作用
}
