

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(form) {

	var http = getHTTPObject();

	var username = form.username.value;
	var password = form.password.value;


	var newlocation = form.action + username + "/" ;
	// form.username.value = "" ;
	// form.password.value = "" ;

	try {
		http.open("get", newlocation , false, username , password );
		http.send("");
		if (http.status == 200) {
			// document.location = newlocation ;
			window.open( newlocation );
		} else {
		alert("Incorrect username and/or password.");
		}
		return false;
	} catch(e) { alert ('there was a problem: ' + e ); return false ; }
}

