function trim(str){
	        var sStr = new String(str);
	        sStr = sStr.replace(/(^\s*)|(\s*$)/,"");
	        return sStr;
        }
function check_msg(){
var patn = /^[_a-zA-Z0-9\-]+(\.[_a-zA-Z0-9\-]*)*@[a-zA-Z0-9\-]+([\.][a-zA-Z0-9\-]+)+$/;
	if (trim(document.MSG.name.value)=="")
	{
		alert("Please enter the name")
		document.MSG.name.focus();
		return false;
	}
	if (trim(document.MSG.authcode.value)=="")
	{
		alert("Please enter to code")
		document.MSG.authcode.focus();
		return false;
	}
	if (!patn.test(document.MSG.email.value)){
		alert("Please enter the right email format.")
		document.MSG.email.focus();
		return false;
	}
	if (trim(document.MSG.email.value)==""){
		alert("Please enter the country.Thanks.")
		document.MSG.country.focus();
		return false;
	}
		if (trim(document.MSG.content.value)==""){
		alert("Please enter the content.Thanks.")
		document.MSG.text.focus();
		return false;
	}
	}		
