// JavaScript Document
function ValidateLoginForm1(theForm) {
	if (theForm.partner_username.value=='') {
		alert("Please enter your username (your email adres) !");
		theForm.partner_username.focus();
		return false;
	}
	if (theForm.partner_password.value=='') {
		alert("Please enter your password !");
		theForm.partner_password.focus();
		return false;
	}
	var rkey = Math.random();
	AjaxWaiting();
	AjaxRequest("../includes/ajax.asp?qid=2&partner_username="+theForm.partner_username.value+"&partner_password="+theForm.partner_password.value+"&rkey=" + rkey,"BecomeLoginForm1CallBack");
	return false;
}
function BecomeLoginForm1CallBack(req) {
	AjaxRemoveDiv('divShadow'); AjaxRemoveDiv('divLoading');
	if (req.responseText==0) {
		alert("Wrong username or password !");
	} else {
		GetPage(16);
	}
}
function ValidateLoginForm2(theForm) {
	if (theForm.email.value=='') {
		alert("Please enter your email !");
		theForm.email.focus();
		return false;
	}
	var rkey = Math.random();
	AjaxWaiting();
	AjaxRequest("../includes/ajax.asp?qid=5&email="+theForm.email.value+"&rkey=" + rkey,"BecomeLoginForm2CallBack");
	return false;
}
function BecomeLoginForm2CallBack(req) {
	AjaxRemoveDiv('divShadow'); AjaxRemoveDiv('divLoading');
	if (req.responseText==0) {
		alert("We couldn't find your e-mail address in our database !");
	} else {
		GetPage(19);
	}
}

