function checkinput()
{
	if(document.frmcontact.name.value=="")
	{
		alert("Please enter your fullname");
		frmcontact.name.focus();
		return false;
	}
	if(document.frmcontact.subject.value=="")
	{
		alert("Please enter title of question");
		frmcontact.subject.focus();
		return false;
	}
	if(document.frmcontact.add.value=="")
	{
		alert("Please enter your address");
		frmcontact.add.focus();
		return false;
	}
	if(document.frmcontact.tel.value!="")
	{		
		if(!checkdt(document.frmcontact.tel.value))
		{
			alert("Please enter correct format phone number");
			frmcontact.tel.focus();
			frmcontact.tel.select();
			return false;
		}
	}
	if(document.frmcontact.email.value=="")
	{
		alert("Please enter your email");
		frmcontact.email.focus();
		return false;
	}
	if(!isEmail(document.frmcontact.email.value))
	{
		alert("Please enter correct foramt email address");
		frmcontact.email.focus();
		frmcontact.email.select();
		return false;
	}
	
	if(document.frmcontact.comment.value=="")
	{
		alert("Please enter content of question");
		frmcontact.comment.focus();
		return false;
	}
return true;
}
function getdep()
{
	document.frmcontact.submit();
}
function getfocus()
{
	document.frmcontact.name.focus();
}
function havefocus(object)
{
	object.style.backgroundColor='#eeeeee';	
}
function  losefocus(object)
{
		object.style.backgroundColor='#ffffff';	

}
function check(str)
{
	var count=str.length;		
	var s=document.frmcontact.comment.value;
	if(count>500)	
	{	
		var s2=s.substring(0,500);		
		document.frmcontact.comment.value=s2;
		alert('B?n ch? nh?p vào t?i da là 500 ký t?');
		document.frmcontact.comment.focus();
		document.frmcontact.comment.select();
	}
	
}
-->