sub window_onload()
	document.getElementById("R_chrUserID").focus()
	lblError.style.color="#24313a"
	'if instr(lblError.innerHTML, "https:")>0 then
	'if instr(lblError.innerHTML, "http:")>0 then
	if (instr(lblError.innerHTML, "https:")>0) or (instr(lblError.innerHTML, "http:")>0) then
		window.open lblError.innerHTML, "_blank"
		
		lblError.innerHTML=""
		document.getElementById("R_chrUserID").value=""
		document.getElementById("R_chrEmailAddress").value=""
		'if document.getElementById("D_chrNewPassword").Disabled=False then document.getElementById("D_chrNewPassword").value=""
	elseif instr(lblError.innerHTML, "localhost")>0 then
		window.open lblError.innerHTML, "_blank"
		
		lblError.innerHTML=""
		document.getElementById("R_chrUserID").value=""
		document.getElementById("R_chrEmailAddress").value=""
		'if document.getElementById("D_chrNewPassword").Disabled=False then document.getElementById("D_chrNewPassword").value=""
	elseif lblError.innerHTML="E" then
		lblError.innerHTML=""
		alert("Your password has been sent to: " & Trim(document.getElementById("R_chrEmailAddress").value) & ". If you do not receive an email within 30 minutes, please call the Bass Underwriters for assistance.")
	elseif lblError.innerHTML="EE" then
		lblError.innerHTML=""
		alert("Email address " & Trim(document.getElementById("R_chrEmailAddress").value) & " is not on file, please call the Bass Underwriters for assistance.")
	end if
	lblError.style.color="red"

	'call SetColor ("lblNewPassword", true)
	'document.getElementById("D_chrNewPassword").Disabled=true

end sub

Sub SetColor(byval strField, byval bDisable)
	Dim e
	set e = document.getElementById(strField)
	if bDisable then
		e.style.color = "#666666"
	else
		e.style.color = "#ffffff"
	end if
End Sub

sub ShowNewPass
	if document.getElementById("D_chrNewPassword").Disabled=true then
		if trim(document.getElementById("R_chrPassword").value)<>"" and trim(document.getElementById("R_chrEmailAddress").value)<>"" then
			call SetColor ("lblNewPassword", false)
			document.getElementById("D_chrNewPassword").Disabled=false
			document.getElementById("D_chrNewPassword").focus
		elseif trim(document.getElementById("R_chrPassword").value)="" then
			alert("You must enter your email address before you can change your password.")
			document.getElementById("R_chrPassword").focus
		elseif trim(document.getElementById("R_chrEmailAddress").value)="" then
			alert("You must enter your current password in order to change your password.")
			document.getElementById("R_chrEmailAddress").focus
		end if
	else
		call SetColor ("lblNewPassword", true)
		document.Form1.D_chrNewPassword.value=""
		document.Form1.D_chrNewPassword.Disabled=true
		document.getElementById("cmdLogin").focus()
	end if
end sub
