function getHTTPObject() { 
	if (typeof XMLHttpRequest != 'undefined') { 
		return new XMLHttpRequest(); 
	} 
	try { 
		return new ActiveXObject("Msxml2.XMLHTTP"); 
	} catch (e) { 
		try { 
			return new ActiveXObject("Microsoft.XMLHTTP"); 
		} catch (e) {} 
	} return false; 
}

function login() { 
	alert (document.getElementById("files").action);
	var username = document.getElementById("name").value; 
	var password = document.getElementById("password").value; 
	var http = getHTTPObject(); 
	http.open("get", document.getElementById("files").action, false, username, password); 
	http.send(""); 
	if (http.status == 200) { 
		document.location = document.getElementById("files").action; 
	} else { 
		alert("Incorrect username and/or password."); 
	} 
	return false;
}

