<SCRIPT LANGUAGE="VBScript">
function MyFormOne_OnSubmit
	if ((Document.MyFormOne.name.Value) = "") then
		msgbox "Please Enter Your Name"
		MyFormOne_OnSubmit = false
		exit function
	end if
	if (Len(Document.MyFormOne.MP.Value) > 8) then
		//msgbox "Good as Gold"
		MyFormOne_OnSubmit = true
		exit function
	end if
	//Check the home phone nos
	if (Len(Document.MyFormOne.HPAC.Value) > 1) then
		HPACFlag = true
	end if
	if (Len(Document.MyFormOne.HPAN.Value) > 6) then
		HPANFlag = true
	end if
	//check work phone nos
	if (Len(Document.MyFormOne.WPAC.Value) > 1) then
		WPACFlag = true
	end if
	if (Len(Document.MyFormOne.WPAN.Value) > 6) then
		WPANFlag = true
	end if
	//check for home phone flags
	if ((HPACFlag = true) and (HPANFlag = true)) then
		totalHPFlag = true
	else
		totalHPFlag = false
	end if
	//check for work phone flags
	if ((WPACFlag = true) and (WPANFlag = true)) then
		totalWPFlag = true
	else
		totalWPFlag = false
	end if
	
	//total Check
	if ((totalHPFlag = true) or (totalWPFlag = true)) then
		//msgbox "Good to go"
		MyFormOne_OnSubmit = true
	else
		msgbox "Please fill either your Work, Home or Mobile phone number correctly."
		MyFormOne_OnSubmit = false
	end if
end function
</script>