function sendloginblock(event){
	var key = event.keyCode;
	if (key==13) {
	  document.getElementById('frmLogin').submit();
	}
}

function fncGetCookie(){
	var strEmail = getCookie('saved_email[email]');
	if(strEmail) {
		document.getElementById('txtEmail').value = unescape(strEmail);
		document.getElementById('chkEmailSave').checked = true;
	}else{
		document.getElementById('txtEmail').value = "請輸入e-mail帳號";
		document.getElementById('txtPassword').value = "請輸入密碼";
		document.getElementById('chkEmailSave').checked = false;
	}
}
fncGetCookie();
function look_input_txt(obj){
	var show_code=document.getElementById("div_"+obj.id);
	switch(obj.id){
		case "txtEmail":
			show_code.innerHTML='<input id="txtEmail" class="InputText" style="color:#999" type="text" name="txtEmail" onkeypress="return sendloginblock(event);" />';
			break;
		case "txtPassword":
			show_code.innerHTML='<input class="InputText" type="password" name="txtPassword" onkeypress="return sendloginblock(event);" />';
			break;
	}
	setTimeout('$("'+obj.id+'").focus();',200);
}