function init()
{
	user = false;
	bwid = getCookie("bwid");
	if(bwid==null || bwid=="") {
		document.jspForm.user_id.focus();
	} else {
		document.jspForm.user_id.value = bwid;
		document.jspForm.user_password.focus();
	}
}
function setCookie(theName, theValue)
{
	setDay = new Date();
	setDay.setTime(setDay.getTime()+(31536000000));
	expDay = setDay.toGMTString();
	document.cookie = theName + "="+escape(theValue)+";expires="+expDay;
}
function getCookie(theName)
{
	fname=theName+"=";
	cookie=document.cookie;
	if(cookie.length > 0){offset=cookie.indexOf(fname);
	if(offset !=-1){offset+=fname.length;
	var end=cookie.indexOf(";", offset);
	if(end==-1)end=cookie.length;
	return unescape(cookie.substring(offset, end));
	}
	}
	return null;
}
function contenSure(){

	if(document.jspForm.remember.checked) {
		setCookie("bwid",document.jspForm.user_id.value);
	}
	datacheckBtn();
}
function datacheckBtn()
{
	if (typeof(Page_ClientValidate) == 'function') { 
		if(Page_ClientValidate()) {
	 		Submit();			 		
		}
	}
}
function Submit()
{
	document.jspForm.btnSubmitSave.disabled = true;
	document.jspForm.__EVENTARGUMENT.value='null';
	document.jspForm.__EVENTTARGET.value='btnSubmitSave';
	document.jspForm.submit();
}
function KeyCode(e){
	if(document.e){
		if(e.which==13){
			contenSure();
		}
	} else{
		if(e.keyCode==13){ // IEÂsÄý¾¹°»´úÁä­Èªº¤è¦¡
			contenSure();
		}
	}
}