function acceptCheckEn() {
	document.open();
	document.write("<input type='checkbox' name='accept' value='1' onclick='this.form.send.disabled=!this.form.send.disabled' id='accept'><label for='accept'>I agree with the privacy policy</label><br />");
	document.write("<button type='submit' name='send' disabled>Contact form</button>");
	document.close();
}


	function radioChange() {
	var d = $('for-pa');
 var animal01 = $('animal01');
	var animal02 = $('animal02');
	var animal03 = $('animal03');
	var animal04 = $('animal04');
	var animal05 = $('animal05');
	
	var comp = $('company');
	var post = $('post');
	var address = $('address');
	var phone = $('phone');
	
	if($F('c-animal')=="pet") {
	   d.style.color = "#cccccc"; 
	   animal01.disabled = true;
	   animal02.disabled = true;
	   animal03.disabled = true;
	   animal04.disabled = true;
	   animal05.disabled = true;
	   comp.disabled = true;
	   post.disabled = true;
	   address.disabled = true;
	   phone.disabled = true;
} 
	if($F('p-animal')=="livestock") {
	   d.style.color = "#000000"; 
	   animal01.disabled = false;
	   animal02.disabled = false;
	   animal03.disabled = false;
	   animal04.disabled = false;
	   animal05.disabled = false;
	   comp.disabled = false;
	   post.disabled = false;
	   address.disabled = false;
	   phone.disabled = false;
	}
	if($F('other')=="other") {
	   d.style.color = "#cccccc"; 
	   animal01.disabled = true;
	   animal02.disabled = true;
	   animal03.disabled = true;
	   animal04.disabled = true;
	   animal05.disabled = true;
	   comp.disabled = true;
	   post.disabled = true;
	   address.disabled = true;
	   phone.disabled = true;
}
  }


 function dataCheck(){
	cnt=0;
	for (i = 0; i < document.contact.domain.length; i++)
	{
		if (document.contact.domain[i].checked)
		{
		cnt++;
		}
	}
	if(cnt==0)
	{
		alert("'About' has not been selected.");
        return false;
    }

 	if(escape($F('yourname')).length ==0){
        alert("'Name' is not input.");
        return false;
    }
	
 	if(escape($F('mail')).length ==0){
        alert("'Email-address' is not input.");
        return false;
    }
	else{
		if(!escape($F('mail')).match(/.+@.+\..+/)){ 
			alert("'Email-address' is not correct. ");
			return false;
		}
	}

 	if(escape($F('subject')).length ==0){
        alert("'Title' is not input.");
        return false;
    }


 	if(escape($F('body')).length ==0){
        alert("'Comments' is not input.");
        return false;
    }	
	

	if($F('p-animal')=="livestock") {
		
		cnt=0;
		for (i = 0; i < document.contact.kind.length; i++)
		{
			
			if (document.contact.kind[i].checked)
			{
			cnt++;
			}
		}
		
		if(cnt==0)
		{
			alert("'Kind' has not been selected.");
        	return false;
    	}
		
	 	if(escape($F('address')).length ==0){
	        alert("'Address' is not input.");
	        return false;
	    }	
			
	 	if(escape($F('phone')).length ==0){
	        alert("'Telphone' is not input.");
	        return false;
	    }	
	}
	
}
