function CallLostPassword(result)
{
	hide("Loading")
	if(result.value == 'Success')
	{
		hide("Panel1");
		show("Panel2");
	}
	else if (result.value == 'No User')
	{
		alert("No User was found with the e-mail address of "+ document.getElementById("Email").value +".  Please re-check your e-mail address.")
		show("Panel1");
		hide("Panel2");
	}
	else {
		alert("An error has occurred: "+ result.value)
	}
}

function Send()
{	
	hide("Panel1");
	hide("Panel2");
	show("Loading");
	Wonderbra.LostPassword.Send(
		document.getElementById("Email").value,
		CallLostPassword
		);
}

function Resend()
{	
	hide("Panel1");
	hide("Panel2");
	show("Loading");
	Wonderbra.LostPassword.Resend(
		document.getElementById("Email").value,
		CallLostPassword
		);
}

function ValidateData() {
   var CanSubmit = false;
   var errormessage = "Please make sure that you have filled in the following fields before clicking Send:\n\n"
   CanSubmit = ForceEntry(document.forms[0].Email);
   if (CanSubmit == false) 
	{
		errormessage += "E-mail address.\n";
	}
	CanSubmit = checkEmailAddress(document.forms[0].Email);
   if (CanSubmit == false) 
	{
		errormessage += "Please enter a Valid E-mail Address.\n";
	}
   // Check to make sure ranking is between 1 and 10
   if (errormessage == 'Please make sure that you have filled in the following fields before clicking Send:\n\n')
   {
	return true;
   }
   else 
   {
	alert(errormessage)
	return false;
   }
}
