function check()
{
if (window.XMLHttpRequest) {
        req = new XMLHttpRequest();
        req.onreadystatechange = processChech;
		req.open("GET", "http://"+location.hostname+"/register/member1.php?pathname="+location.pathname, true);
		req.send(null);
    } else if (window.ActiveXObject) {
        req = new ActiveXObject("Microsoft.XMLHTTP");
        if (req) {
            req.onreadystatechange = processChech;
            req.open("GET", "http://"+location.hostname+"/register/member1.php?pathname="+location.pathname, true);
            req.send();
        }
    }
}


function processChech()
{
if (req.readyState == 4) {
	if (req.status == 200) {
		if(req.responseText.indexOf("1") != -1)
		{
			location.href = "/register/login.php?message=1";		
		}
		else if (req.responseText.indexOf("2") != -1)
		{
			location.href = "/register/login.php?message=2";
		}
		else{
			try{
			document.all.article.style.display='';
			}
			catch(e)
			{
			}
		}	
	} else {
			try{
			document.all.article.style.display='';
			}
			catch(e)
			{
			}
	}
}
}
check();
