function cleanFields() {
	document.getElementById("CustomerEmail").value = "";
	document.getElementById("CustomerPassword").value = "";
}

function checkFieldsOnSubmit() {

	var customerEmail = document.getElementById('CustomerEmail').value;
	var customerPassword = document.getElementById('CustomerPassword').value;
	var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
	// Check mandatory fields
	if (customerEmail == "" ||
			customerPassword == "" ||
			customerPassword.length < 6 ||
			reg.test(customerEmail) == false) {
		alert(invalidEmailPasswordMessage);
		return false;
	}
	return true;
}

function openForgotPasswordPopup() {
	var sWidth = 450;
	var sHeight = 260;
	var sTop = Math.round((window.screen.availHeight - sHeight) / 2);
	var sLeft = Math.round(( window.screen.availWidth - sWidth) / 2);
	var addImagePopUp = window.open(rootPathAction+'customers/forgotPassword', "forgotpasswordPopup", "width="+sWidth+"px,height="+sHeight+"px,left="+sLeft+",top="+sTop+",status=yes,resizable=no");
	addImagePopUp.focus();
}