function userLogin(formNameEl, formPasswordEl, formActionUrl) {
	
	Prado.Validation.validate();

	if (Prado.Validation.isValid()) {
		var name = Form.Element.getValue(formNameEl);
		var pass = Form.Element.getValue(formPasswordEl);
		
		var formEl = document.createElement("form");
		formEl.setAttribute("method", "post");
		formEl.setAttribute("action", formActionUrl);
		formEl.setAttribute("target", "_self");
		formEl.setAttribute("name", "userlogin_form");
		formEl.setAttribute("id", "userlogin_form");
		formEl.setAttribute("style", "display: hidden;");
		
		var nameEl = document.createElement("input");
		nameEl.setAttribute("type", "hidden");
		nameEl.setAttribute("name", "username");
		nameEl.setAttribute("value", name);
		formEl.appendChild(nameEl);
		
		var passEl = document.createElement("input");
		passEl.setAttribute("type", "hidden");
		passEl.setAttribute("name", "password");
		passEl.setAttribute("value", pass);	
		formEl.appendChild(passEl);
		
		var submitEl = document.createElement("input");
		submitEl.setAttribute("type", "submit");
		submitEl.setAttribute("name", "submit");
		formEl.appendChild(submitEl);
		
		document.body.appendChild(formEl);
		
		//for compatability reasons with IE6/7 we use click on the submit btn. element directly
		//do not use formEl.submit.click() because in Firefox submit function is overridden by the submit button,
		//IE however does not overrride it.
		submitEl.click(); 
		
		//remove the form from the document tree
		document.body.removeChild(formEl);
	}
}
