function logout()
{
var req;
if (window.XMLHttpRequest) req=new XMLHttpRequest();
else if (window.ActiveXObject) req=new ActiveXObject("Microsoft.XMLHTTP");
else
{
alert("Browser not support");return false;
}
req.onreadystatechange=function()
{
if (req.readyState==4)
{
alert("ออกจากระบบแล้วค่ะ");
window.location="index.php";
checklogin();
}