<!--
function check()
{
	
	if(chk_check("form_q","vote","你最愛實現的版本","2")== 0)
	{
		form_q.vote[0].focus();
		return false;
	}

	j_session = checkSpace(window.document.form_q.NET_AUTH_USER.value)
	if (j_session == "")
	{
	
		j_NET_AUTH_USER = checkSpace(window.document.form_q.login_name.value)
		if( j_NET_AUTH_USER == "")
		{
			alert('請輸入會員帳號');
			window.document.form_q.login_name.focus();					
			return false; 	
		}
		
		j_NET_AUTH_PW = checkSpace(window.document.form_q.password.value)
		if(j_NET_AUTH_PW == "" )
		{
			alert('請請輸入會員密碼');
			window.document.form_q.password.focus();					
			return false; 	
		}
	}

	j_note = window.document.form_q.note.value
	if(j_note == "")
	{
		alert('請發表您最愛星願的理由');			
		window.document.form_q.note.focus();
		return false; 	
	}
	l_note = window.document.form_q.note.value.length
	if (l_note > 100)
	{
		alert('發表的星願理由過長');
		window.document.form_q.note.focus();
		return false;		
	}
	


     								
}

function stars_check()
{

	j_session = checkSpace(window.document.form_q.NET_AUTH_USER.value)
	if (j_session == "")
	{
	
		j_NET_AUTH_USER = checkSpace(window.document.form_q.login_name.value)
		if( j_NET_AUTH_USER == "")
		{
			alert('請輸入會員帳號');
			window.document.form_q.login_name.focus();					
			return false; 	
		}
		
		j_NET_AUTH_PW = checkSpace(window.document.form_q.password.value)
		if(j_NET_AUTH_PW == "" )
		{
			alert('請請輸入會員密碼');
			window.document.form_q.password.focus();					
			return false; 	
		}
	}	
	
	j_code = checkSpace(window.document.form_q.code.value)
	if (j_code=="") 
	{
		alert('請輸入統一編號');
		window.document.form_q.code.focus();
		return false;	
	}	
	if (j_code !="")  
		{
		if (isNaN(j_code) == true)  
		{
			alert("統一編號請輸入數字")
			window.document.form_q.code.focus();
			return false;						
		}
		else
		{
			if ( (window.document.form_q.code.value.length) != 8 )
			{
				alert("統一編號有誤")
				window.document.form_q.code.focus();
				return false;					
			}	
		}
	}
	
	j_nickname = checkSpace(window.document.form_q.nickname.value)
	if (j_nickname == "") 
	{
		alert('請輸入暱稱');
		window.document.form_q.nickname.focus();
		return false;	
	}	
	
	j_note = checkSpace(window.document.form_q.note.value)
	if(j_note == "")
	{
		alert('請發表您的星炫體驗心得');			
		window.document.form_q.note.focus();
		return false; 	
	}
	l_note = window.document.form_q.note.value.length
	if (l_note > 100)
	{
		alert('星炫體驗心得過長');
		window.document.form_q.note.focus();
		return false;		
	}
	


     								
}

//----------以下為查詢空白字元------------------------------
function checkSpace(UI) 
{
  //alert(UI);
  var str = UI;	
  str = str.replace(/^[\s　]+/g, "");	// 刪除頭部的空白字串
  str = str.replace(/[\s　]+$/g, "");	// 刪除尾部的空白字串
  str = str.replace(/[\s　]+/g, " ");	// 將其他空白字串帶換成單一半形空格
  //UI.value = str;
  return str;	
  
} 

//----------以上為查詢空白字元------------------------------       

function chk_check(x, y, z, c) { //核取類選項的確認, c為CheckBox的個數
	 var i, chk_no=0;
	 for (i=0; i<c; i++) {if (document[x].elements[y][i].checked==true) chk_no+=1;}
	 if (chk_no==0) { alert('請選取'+z+'！'); return 0;}
	 else return 1;
	 }

-->