/*
Function Name: onLogin()
Description	 : Login functionality for Update Profile.
Parameter	 : UsSer Type
Author		 : Prasanna Kalvit
Return Type	 : void
*/


function onReprintLogin(strUserType)
{
	var documentObject	=	document.frmReprintLogin;

	if(strUserType == "RU")
	{
		if(documentObject.txtUserName.value == "")
		{
			alert("Please enter Login Id");
			documentObject.txtUserName.focus();
			return;
		}

		if(documentObject.txtUserPassword.value == "")
		{
			alert("Please enter Password");
			documentObject.txtUserPassword.focus();
			return;
		}
	}else{
		if(documentObject.txtUserName.value != "")
		{
			alert("Please click on Continue.");
			documentObject.txtUserName.focus();
			return;
		}

		if(documentObject.txtUserPassword.value != "")
		{
			alert("Please click on Continue.");
			documentObject.txtUserPassword.focus();
			return;
		}
			
			documentObject.txtUserName.value = "";
			documentObject.txtUserPassword.value = "";

	}

	//documentObject.hidUserType.value = strUserType;
	documentObject.method = "post";
	documentObject.action = "loginController.do";
	documentObject.submit();
}
function checkKeyPress(strUserType)
{
	if (window.event.keyCode == 13)
	{
                  onReprintLogin(strUserType)
	}
}