<!--
Sub QueType_OnChange
	If frmNew.QueType.value <> 0 AND frmNew.QueType.value <> 3 AND frmNew.QueType.value <> 5 Then
		frmNew.QueOptions.disabled = False
		frmNew.QueOptions.style.background = "white"  
	Else
		frmNew.QueOptions.disabled = True
		frmNew.QueOptions.style.background = "rgb(192,192,192)"  
	End If	
End Sub

Sub cmdQueSave_OnClick
	If frmNew.SCode.value = "New" Then
		tmpURL = "QueSave.asp?QUETYPE=" & frmNew.QueType.value & "&REQUIRED=" & frmNew.Required.checked & "&QUETEXT=" & Replace(frmNew.QueText.value, "&", chr(164)) & "&QUEOPTIONS=" & frmNew.QueOptions.value & "&SCode=" & frmNew.SCode.value & "&SurvGroup=" & frmNew.SurvGroup.value & "&SortOrder=" & frmNew.SortOrder.value
	Else
		tmpURL = "QueSave.asp?QUETYPE=" & frmNew.QueType.value & "&REQUIRED=" & frmNew.Required.checked & "&QUETEXT=" & Replace(frmNew.QueText.value, "&", chr(164)) & "&QUEOPTIONS=" & frmNew.QueOptions.value & "&SCode=" & frmNew.SCode.value & "&QueID=" & frmNew.QueID.value & "&SurvGroup=" & frmNew.SurvGroup.value & "&SortOrder=" & frmNew.SortOrder.value
	End If
	result = window.showmodaldialog(tmpURL,,"dialogWidth:100; dialogHeight:100")
	If result = "INC" Then
		msgbox "Incomplete Entry!"
	Else
		msgbox "Record saved successfully!"
	End If
End sub

Sub cmdDelete_OnClick
	response = Msgbox("Are you sure?  Deleted item will be unrecoverable.",32+4,"Delete")
	If response = 6 then
		tmpURL = "QueSave.asp?QUETYPE=" & frmNew.QueType.value & "&REQUIRED=" & frmNew.Required.checked & "&QUETEXT=" & frmNew.QueText.value & "&QUEOPTIONS=" & frmNew.QueOptions.value & "&SCode=Del" & "&QueID=" & frmNew.QueID.value
		result = window.showmodaldialog(tmpURL,,"dialogWidth:100; dialogHeight:100")
		window.navigate "ListQuest.asp"
	End If
End sub

Function CheckThis(Source)
	'--- Loop through the controls
	For v = 1 to document.all.length - 1
		tmpObject = document.all.item(v).id
		If tmpObject <> "" AND InStr(1,tmpObject,"-") <> 0 Then
			If Mid(tmpObject,1,(InStr(1,tmpObject,"-") - 1)) = Mid(Source,1,(InStr(1,Source,"-") - 1)) AND document.all.item(v).id <> Source Then
				document.all.item(v).checked = False
			End If
		End If
	Next
End Function
-->