
function Login(pType)
{
var sWrkFld;

	sWrkFld = document.frmSMS.txtUID.value;
	
	if (sWrkFld.length == 0)
	{
		alert("Userid must be present and 8 characters in length");
		document.frmSMS.txtUID.select();
		return false;
	}
	
	if (pType != "F")
	{
		sWrkFld = document.frmSMS.txtPWD.value;
	
		if ((sWrkFld.length == 0) ||
			(sWrkFld.length < 3) ||
			(sWrkFld.length > 10))
		{
			alert("Password must be present and 3 to 6 characters in length");
			document.frmSMS.txtPWD.select();
			return false;
		}
	}
	
	if (pType == "L")
	{
		document.frmSMS.action = "http://www.smartsms.co.za/SMS_Login.asp";
	}
	else
	{
		if (pType == "F")
		{
			document.frmSMS.action = "http://www.smartsms.co.za/SMS_ForgotPwd.asp";
		}
		else
		{
			document.frmSMS.action = "http://www.smartsms.co.za/SMS_ChgPwd.asp";
		}
	}
	document.frmSMS.submit();
	
}
