
	var httpSubmit = createRequestObject();
	
	function sendPassword()
	{
  		str = getFormValues(document.form1);
		httpSubmit.open('post', 'ajaxScripts/pwdReminder.php');
		httpSubmit.onreadystatechange = handleResponse;
		httpSubmit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=ISO-8859-1");
		httpSubmit.send(str);
		showProgressLayers();
	}
	
	function handleResponse()
	{
		if(httpSubmit.readyState == 4)
		{
			document.getElementById("progress").style.display = "none";
			document.getElementById("progress2").style.display = "none";

			var response = httpSubmit.responseXML;
			
			switch(response.getElementsByTagName("exitCode")[0].firstChild.nodeValue)
       		{           				
				case '0':
					var content = response.getElementsByTagName("content")[0].firstChild.nodeValue;
					document.getElementById("responseContent").innerHTML = content;
					showResponseLayer();
					setTimeout("document.location = 'index.php'", 2500);
           			break;

				case '-2':
					//debug purpose-----------------------------
					alert(Sarissa.serialize(response));
					break;
					//debug purpose-----------------------------
						
				case '7':
       			case '-1':
       			default:
					var content = response.getElementsByTagName("content")[0].firstChild.nodeValue;
					document.getElementById("responseContent").innerHTML = content;
					showResponseLayer();
           			break;
			}
		}
		else
		{
			return;
		}
	}
	