var xclient;

function Login()
{
	var inNVC = new	NameValueCollection();
	inNVC.Set("UserName", Tag("UserName").value);
	inNVC.Set("Password", Tag("Password").value);
	
	function Login_Success()
	{
		window.location = "http://www.actinnovations.com/mccmsalesmap/default.aspx";
	}
	
	xclient = new XmlClient(Login_Success, Failure);
	xclient.SendNVC(inNVC);
}

function Failure()
{
	var error = Show("about:blank", 'yes', 500, 500, 'yes', 'yes');
	error.document.write(xclient.GetResponseText());
	error.document.close();
}

/*function AddJSFile(relativeFilePath)
{
	var script	= document.createElement("script");
	var head	= document.getElementsByTagName("head")[0];
	
	script.type = "text/javascript";
	script.src	= relativeFilePath;
	
	head.appendChild(script);	
}

function ImportJSLinks()
{
	AddJSFile("../scripts/System.Xml.js");
	AddJSFile("../scripts/System.Collections.Specialized.js");
	AddJSFile("../scripts/System.Web.js");
	AddJSFile("../scripts/element.js");
	
}*/
