﻿// JScript 檔
function checkbrowser()
{
//	if(!window.ActiveXObject) location.href="../pages/tip.aspx";
}
function chklogin()
{
    var language = document.getElementById("txtLanguage").value;//語言
    var user = document.getElementById("txtUser").value;//會員編號
    var passWord = document.getElementById("txtPassword").value;//密碼
    var validationCode = document.getElementById("txtValidationCode").value;//驗證碼
    if(user=="")
    {
        ShowError('J00001','J00006',language);
        return false;
    }    
    if(passWord=="")
    {
        ShowError('J00002','J00006',language);
        return false;
    }
    if(validationCode=="")
    {
        ShowError('J00003','J00006',language);
        return false;
    }
    return true;
}

function login_reset()
{
    document.getElementById("txtUser").value="";
    document.getElementById("txtPassword").value="";
    document.getElementById("txtValidationCode").value="";
    document.getElementById("selLogin").value="0";
}

//限制只能輸入字母和數字

function  _onluyNum_En(obj)
{   
    obj.value = obj.value.replace(/[^a-zA-Z0-9]/g,'');  
} 

//開啟忘記密碼畫面
function Open_GetPassword()
{
    var language = document.getElementById("txtLanguage").value;//語言
    
    window.open("GetPassword.aspx?CULTURE="+language,"newwindow","height=530,width=1024,toolbar= no,menubar=no,scrollbars=no,resizable=no,location=no,status=no,top="+0+",left="+0);
    return false;

}

//開啟忘記密碼畫面
function Open_UserName()
{
    window.showModalDialog('../Files/UserName.htm','Username','dialogWidth:700px;dialogHeight:350px;help:no;resizable:no;status:no;scroll:no')
    return false;

}
function fun_click()
{
   document.all.btnOk.click();
}
function fun_change()
{
   document.all.btnImg.click();
}
