// JavaScript Document
function doRegisterUser()
{
	with (window.document.Form1) {
		/* if (isEmpty(userid, 'Enter choosen UserID')) {
			return;
		} else if (isEmpty(firstname, 'Firstname field should not be empty')) {
			return;
		} else if (isEmpty(lastname, 'Lastname field should not be empty')) {
			return;
		} else if (isEmpty(password, 'password field should not be empty')) {
			return;
		} else if (isEmpty(email, 'EMail field should not be empty')) {
			return;
		}else { */
			submit();	
		//}
	}
}

function doLogin()
{
	with (window.document.Form1) {
		if (isEmpty(username, 'Enter User name')) {
			return;
		} else if (isEmpty(password, 'Password field should not be empty')) {
			return;
		}else {
			submit();
		}
	}
}

function doSubmitResetPass()
{
	with (window.document.Form1) {
		if (isEmpty(username, 'Enter User name')) {
			return;
		} else if (isEmpty(email, 'Email address should not be empty')) {
			return;
		}else {
			submit();
		}
	}
}

function CancelReg(whatPage)
{
	var strCaption='';
	if (whatPage=="Register"){
		strCaption='registration.';
	}else if(whatPage=="UpdateProfile"){
		strCaption='updating your profile.'
	}
	
	if (confirm('This action will cancel '+ strCaption)) {
		window.location.href = 'index.php?page_request=home';
	}
}
