function checkform() {
	
	var radio_is_check=false;
	for (var i=0; i<document.customerservicevote.vote_type.length; i++) {  
		if (document.customerservicevote.vote_type[i].checked) {  
				 radio_is_check = true;
				 votetype = document.customerservicevote.vote_type[i].value;
				 break;
		 }
	}
	
	if (radio_is_check == false) {
		alert("請剔選投票類型");
		return false;
	}
	
	if (votetype=='Other'&&document.customerservicevote.vote_type_specify.value == "") {
		alert("請註明投票類型");
		return false;
	}
	
	if (document.customerservicevote.staff_name.value == "") {
		alert("請填寫員工姓名");
		document.customerservicevote.staff_name.focus();
		return false;
	}
	
	if (document.customerservicevote.staff_branch.value == "") {
		alert("請填寫員工所屬分店");
		document.customerservicevote.staff_branch.focus();
		return false;
	}
	
	if (document.customerservicevote.voter_name.value == "") {
		alert("請填寫投票人姓名");
		document.customerservicevote.voter_name.focus();
		return false;
	}
	
	if (document.customerservicevote.voter_number.value == "") {
		alert("請填寫聯絡電話");
		document.customerservicevote.voter_number.focus();
		return false;
	}
	
	if (!isNumeric(document.customerservicevote.voter_number.value)) {
		alert("聯絡電話只能是數字");
		document.customerservicevote.voter_number.focus();
		return false;
	}
	
	alert("多謝你的支持！\n請按確定送出並返回首頁。");
	return true;

}

function isNumeric(s) {
   var strValidChars = "0123456789-";
   var strChar;
   var blnResult = true;

   if (s.length == 0) return false;

   //  test strString consists of valid characters listed above
   for (i = 0; i < s.length && blnResult == true; i++)
   {
		strChar = s.charAt(i);
		if (strValidChars.indexOf(strChar) == -1) {
			blnResult = false;
		}
	}
	return blnResult;
}