// JavaScript Document	
	
	function $(id)
	{	return document.getElementById(id);	}
	
	function hideBlock( id )
	{	$(id).style.display = "none";	}
	
	function showBlock( id)
	{	$(id).style.display = "block";	}
	
	function switchBlock( id )
	{	$(id).style.display = ( $(id).style.display == "none") ? "block" : "none";	}
	
	function switchTabMenu( x , n , id )
	{
		if( id == undefined ) id = "CILabel" ;
		for( var i = 0 ; i <= n ; i++ )
		{
			$( id + i ).className = "";
			$( id + "Area" + i ).style.display = "none";			
		}
		$( id + x ).className = "menuon";
		$( id + "Area" + x ).style.display = "block";
	}
	
	function switchCheckBox( c , idArray , displayArray)
	{
		if( displayArray == undefined )
			displayArray = new Array("block","none")
		var display = displayArray[0];
		if( c.checked )	
		{	display = displayArray[1];	}
		
		for( var i = 0 ; i < idArray.length ; i++)
		{
			$(idArray[i]).style.display = display;	
		}
	}


	/*					*/
	
	function switchRadioOnChange( value , id , display )
	{	if( value.checked) $(id).style.display = display;	}
	
	
	function checkMessage( f )
	{
		if( f.name.value == "" )
		{	alert("請填寫姓名");	return false;}
		if( f.by.value == "" || f.bm.value == "" || f.bd.value == "" )
		{	alert("請填寫生日");	return false;}
		if( f.address.value == "" )
		{	alert("請填寫地址");	return false;}
		if( f.phone.value == "" || f.cellphone.value == "" )
		{	alert("請填寫聯絡電話");	return false;}
		if( f.email.value == "" )
		{	alert("請填寫電子郵件信箱");	return false;}
		if( f.service.value == "" )
		{	alert("請選擇委託鑑定服務項目");	return false;}
		if( f.payway.value == "" )
		{	alert("請選擇付費方式");	return false;}
		
		return true;
	}
