function inputValidation(Val)
{
	if(Val.alertmsg=="")
	{Val.alertmsg=='請檢查資料的正確性'}
	var bResult=true
	switch (Val.validaType)
	{
// 7-12-2010, TAM, specification change: exhibition application date from calendar input into individual pull-down menu of year, month, day
	case 'notnone':
		if(Val.value=="none")
		{
			bResult=false;
		}
	break;
// end 7-12-2010, TAM, specification change: exhibition application date from calendar input into individual pull-down menu of year, month, day
	case 'notnull':
		if(Val.value=="")
		{
			bResult=false
		}
	break;
	case 'notempty':
		if(Val.innerHTML=="")
		{
			bResult=false
		}
	break;
	case 'notzero':
		if(Val.value==0)
		{
			bResult=false
		}
	break;
	case 'noten':
		if(Val.value<10)
		{
			bResult=false
		}
	break;
	case 'notvedio':
		if(Val.value !=''){
			var tmp_str= "file://" + Val.value.replace(/\\/g, "/");
			var subname = tmp_str.split(".");
			var type="";
			for(var a=0;a< subname.length;a++){
				type = subname[a];
			}
			if(type !="avi" && type !="AVI" && type !="WMV" && type != "wmv" && type !="MPG" && type != "mpg" && type !="MPEG" && type != "mpeg"){
				bResult=false
			}
		}
	break;
	case 'TaiwanID':
		var idStr=Val.value
		  var letters = new Array('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'L', 'M', 'N', 'P', 'Q', 'R', 'S', 'T', 'U', 'V','X', 'Y', 'W', 'Z', 'I', 'O');
		  var multiply = new Array(1, 9, 8, 7, 6, 5,  4, 3, 2, 1);
		  var nums = new Array(2);
		  var firstChar;
		  var firstNum;
		  var lastNum;
		  var total = 0;
		  var bResult=true
			if(idStr =='')
				return bResult;
		  // 撰寫「正規表達式」。第一個字為英文字母，
		  // 第二個字為1或2，後面跟著8個數字，不分大小寫。
		  var regExpID=/^[a-z](1|2)\d{8}$/i;
		  // 使用「正規表達式」檢驗格式
		  if (idStr.search(regExpID)==-1) {
			bResult=false; break;
		  } else {
			// 取出第一個字元和最後一個數字。
			firstChar = idStr.charAt(0).toUpperCase();
			lastNum = idStr.charAt(9);
		  }
		  // 找出第一個字母對應的數字，並轉換成兩位數數字。
		  for (var i=0; i<26; i++) {
			if (firstChar == letters[i]) {
			  firstNum = i + 10;
			  nums[0] = Math.floor(firstNum / 10);
			  nums[1] = firstNum - (nums[0] * 10);
				break;
			}
		  }
		  // 執行加總計算
		 for(var i=0; i<multiply.length; i++){
			if (i<2) {
			  total += nums[i] * multiply[i];
			} else {
			  total += parseInt(idStr.charAt(i-1)) * multiply[i];
			}
		  }
		  // 和最後一個數字比對
		 if (lastNum == 0 && (total % 10) != lastNum )
			bResult=false;
		//規則二餘數與檢查碼需相符
		if (lastNum != 0 && (10 - (total % 10))!= lastNum)
			bResult=false;
		break;
		case 'email':
			var isEmail_re=/^(([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5}){1,25})+([;.](([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5}){1,25})+)*$/;
			bResult=isEmail_re.test(Val.value)
		break;


	}
	if(!bResult)
	{
		alert(Val.alertmsg);
// 7-12-2010, TAM, specification change: exhibition application date from calendar input into individual pull-down menu of year, month, day
        if(Val.hidden==false)
// end 7-12-2010, TAM, specification change: exhibition application date from calendar input into individual pull-down menu of year, month, day
		    Val.focus();
	}
	return bResult

}
