function checkEmailContact(error_msg,attr, default_msg,form)
{
	var contact_person=document.getElementById('contact_person');
	var email=document.getElementById('email');
	var detail =document.getElementById('detail');
	var tel =document.getElementById('tel');

	var msg='';
	var temp;
	
	temp=checkNull(contact_person.value, attr[0], error_msg[0]);
	if(typeof(temp)=='string')
		msg+=temp;
	
	temp=checkNull(email.value, attr[1], error_msg[0]);
	if(typeof(temp)=='string')
		msg+=temp;
	else
	{
		temp=checkEmail(email.value, attr[1], error_msg[1]);
		if(typeof(temp)=='string')
			msg+=temp;
	}
		
	temp=checkNull(detail.value, attr[2], error_msg[0]);
	if(typeof(temp)=='string')
		msg+=temp;
		
		
	temp=checkNull(tel.value, attr[3], error_msg[0]);
	if(typeof(temp)=='string')
		msg+=temp;
	
	if(msg=='')
		form.submit();
	else
		alert(default_msg+'\n'+msg);
}
