var xmlHttp;

function createXMLHttpRequest(){
	if(window.ActiveXObject){
		xmlHttp = new ActiveXObject("Microsoft.XMLHttp");
	}
	else if(window.XMLHttpRequest){
		xmlHttp = new XMLHttpRequest();
	}




}

function doValidate(name){
	createXMLHttpRequest();
	var url="http://www.mmoabc.com/downloads.html?d="+name;

	xmlHttp.open("GET", url, true);
	xmlHttp.onreadystatechange = callback;
	xmlHttp.send(null);
}

function callback(){
	if(xmlHttp.readyState == 1){
		//lastTd[2].innerHTML = "<p>Checking. Please //wait...</p>";
	}
	if(xmlHttp.readyState == 4){
		if(xmlHttp.status == 200){
			showInfo(xmlHttp.responseText);
			
		}
	}
}

function showInfo(responseText){
//alert(responseText);
//window.location.href="http://static.mmoabc.com/Downloads/"+responseText;
	if(responseText == "nologin"){
		//lastTd[2].innerHTML = "";
				alert("You have to login before downloading this client. If you are not a member, sign up for a MMOABC account.");
	}else{
                //alert("success");
                //window.location.href="http://my.mmoabc.com";
                window.location.href="http://static.mmoabc.com/Downloads/"+responseText;
	}
	
}