<!--
function CheckNoEnglish( String )
{ 
    var Letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890";
     var i;
     var c;
     for( i = 0; i < String.length; i ++ )
     {
          c = String.charAt( i );
	  if (Letters.indexOf( c ) > -1)
	     return false;
     }
     return true;
}

function CheckPass( String )
{ 
    var Letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890_";
     var i;
     var c;
     for( i = 0; i < String.length; i ++ )
     {
          c = String.charAt( i );
	  if (Letters.indexOf( c ) > -1)
	     return false;
     }
     return true;
}

function CheckNumber( String )
{ 
    var Letters = "1234567890_";
     var i;
     var c;
     for( i = 0; i < String.length; i ++ )
     {
          c = String.charAt( i );
	  if (Letters.indexOf( c ) > -1)
	     return false;
     }
     return true;
}

function CheckMail( String )
{ 
    var Letters = ".@";
     var i;
     var c;
     for( i = 0; i < String.length; i ++ )
     {
          c = String.charAt( i );
	  if (Letters.indexOf( c ) > -1)
	     return false;
     }
     return true;
}

function CheckReg(theForm)
	{
		if( theForm.UserId.value.length < 2 || theForm.UserId.value.length > 15 )
		{
			alert("登陸名要2-15位,不能太簡單也不能太復雜哦?");
			theForm.UserId.focus();
			return false;
		}
		if( theForm.UserId.value == "所有人" )
		{
			alert("所有人 被繫統禁止注冊");
			theForm.UserId.focus();
			return false;
		}
		if( CheckNoEnglish(theForm.UserId.value) )
		{
			alert("登陸名隻能使用英文或數字");
			theForm.UserId.focus();
			return false;
		}
		if( theForm.pw1.value.length < 5 || theForm.pw1.value.length > 10 )
		{
			alert("登陸密碼要5-15位,不能太簡單也不能太復雜哦?");
			theForm.password.focus();
			return false;
		}
		if( CheckPass(theForm.pw1.value) )
		{
			alert("登陸密碼隻能使用英文,數字和下劃線_");
			theForm.password.focus();
			return false;
		}
		if( theForm.pw1.value != theForm.pw2.value )
		{
			alert("重復密碼與登陸密碼不一致");
			theForm.cfpassword.focus();
			return false;
		}
		if( CheckMail(theForm.Usermail.value) || theForm.Usermail.value.length < 6 )
		{
			alert("您填寫的信箱是假的吧,為了方便我們更好的為您服務,請您填寫真實信箱");
			theForm.Usermail.focus();
			return false;
		}
		return true;
	}

function CheckLog(theForm)
	{
		if( theForm.uid.value == "" || theForm.uid.value == null)
		{
			theForm.uid.focus();
			return false;
		}
		if( theForm.pass.value == "" || theForm.pass.value == null)
		{
			theForm.pass.focus();
			return false;
		}
		return true;
	}

function CheckClass(theForm)
	{
		if( theForm.product_dclass.value == "" || theForm.product_dclass.value == null)
		{
			alert("請選擇頂級分類");
			return false;
		}
		if( theForm.product_class.value == "" || theForm.product_class.value == null)
		{
			alert("請選擇二級分類");
			return false;
		}
		return true;
	}

//限制隻輸入數字
function JHshNumberText()
	{
		if ( !(((window.event.keyCode >= 48) && (window.event.keyCode <= 57)) || (window.event.keyCode == 13) || (window.event.keyCode == 46) || (window.event.keyCode == 45)))
		{
			window.event.keyCode = 0 ;
		}
	} 
//-->