function check_form() {
	for (var i = 0; i < document.forms['genInfo'].elements.length; i++) {
		var FormElement = document.forms['genInfo'].elements[i].name
		 
		if (FormElement == "user") {
				if (document.forms['genInfo'].elements[i].value.length == 0)
				{
					alert("You must provide your username!")
					return false
				}
			}
		if (FormElement == "password") {
				if (document.forms['genInfo'].elements[i].value.length == 0)
				{
					alert("You must provide your password!")
					return false
				}
			}
		}
	return true	

}