function check()
{
	var pword="";
	var pwd="";
    var v1 = document.webForm.Msg.value;
    var v2 = document.webForm.Byname.value;
    var v3 = document.webForm.username.value;
    var v4 = document.webForm.password.value;	
	  
    if ((v1.length==0) || (v1.length>5000))
    {
         alert("กรุณาป้อนรายละเอียด");
         document.webForm.Msg.focus();           
         return false;
    }
	else if (v2.length==0 && v3.length==0)
    {
         alert("กรุณาป้อนชื่อ");
         document.webForm.Byname.focus();           
		 return false;
    }
	else  if (v2.length==0 && v4.length==0)
    {
         alert("กรุณาป้อนรหัสผ่าน");
         document.webForm.password.focus();           
		 return false;
    }
	else
	{	
		pword = escape(ENTurbo(document.webForm.password.value));
		document.webForm.passwordpc.value = pword;
		pwd = escape(hex_hmac_turbo(seckey,document.webForm.passwordpc.value));
		document.webForm.passwordpc.value = pwd;
		document.webForm.password.value="";
	   	return true;
	}
}
var s=0;
function setsmile(what)
{
	if(s<10) {
		document.webForm.Msg.value = document.webForm.elements.Msg.value+" "+what;
		document.webForm.Msg.focus();
		s++;
	}
}
function semail (address) {
	address = address.split("#");
	address = address.join("@");
	window.open ('mailto:'+address,'_blank');
}
function Address(loc) {
	window.open(loc, "", "width=400,height=220,status=no,toolbar=no,menubar=no,scrollbars=yes,resizable=yes");
}
function Vote(loc) {
	window.open(loc, "", "width=200,height=40,status=no,toolbar=no,menubar=no,scrollbars=0,resizable=yes");
}