var theForm;

function OnPageLoad()
{
	if (window.navigator.appName.toLowerCase().indexOf("netscape") > -1)
		theForm = document.forms["frmMain"];
	else
		theForm = document.frmMain;
	
	if (typeof(Page_IsValid) == 'boolean')
		theForm.cmdSubmit.disabled = true;
}

function Changed()
{
	if (theForm && theForm.cmdSubmit)
		if (typeof(Page_IsValid) == 'boolean' && Page_IsValid)
			theForm.cmdSubmit.disabled = false;
}

function MouseWheel()
{
	if (window.scrollBy) 
		window.scrollBy(0, -(event.wheelDelta / 3));
		
	return false;
}

function txtUserName_Validate(validator, args)
{
	var len = args.Value.length;
	
	if (len < 6 || len > 100)
		args.IsValid = false;
}

function txtPassword_Validate(validator, args)
{
	var len = args.Value.length;
	
	if (len < 4 || len > 20)
		args.IsValid = false;
}
