Dim popytka11
Dim popytka12
Dim popytka13
Dim popytka14
Dim popytka15
Dim popytka16
Dim popytka17
Dim popytka18
Dim popytka19
Dim popytka2
Dim popytka31
Dim popytka32
Dim popytka33
popytka11 = Cbyte(1)
popytka12 = Cbyte(1)
popytka13 = Cbyte(1)
popytka14 = Cbyte(1)
popytka15 = Cbyte(1)
popytka16 = Cbyte(1)
popytka17 = Cbyte(1)
popytka18 = Cbyte(1)
popytka19 = Cbyte(1)
popytka2 = Cbyte(1)
popytka31 = Cbyte(1)
popytka32 = Cbyte(1)
popytka33 = Cbyte(1)

Sub znaok11_OnClick
Dim otwet,potwet,tochn

' Правильный ответ
potwet=CDbl(0.61)
tochn=CDbl(0.01)

' Проверка вводимого числа (Текст или не текст)
If (Document.ans1.zna11.value="") OR (Not IsNumeric(Document.ans1.zna11.value)) Then
Alert "Необходимо ввести число"
ans1.zna11.focus
Exit Sub
End If

' Проверка вводимого числа (на попадание в диапазон)
otwet=CDbl(Document.ans1.zna11.value)
If ((Abs(otwet - potwet)) <= tochn AND (popytka11 <= 3)) or ( (Abs(otwet - potwet)) > tochn AND ((popytka11 >= 1)and(popytka11 <= 3))) Then 
   Top.Hlp.Help.Document.Open
   Top.Hlp.Help.Document.Write "<HTML>"
   Top.Hlp.Help.Document.Write "<HEAD><meta http-equiv='Content-Type' content='text/html; charset=windows-1251'><STYLE>"
   Top.Hlp.Help.Document.Write "A { text-decoration: none}"
   Top.Hlp.Help.Document.Write "A:hover {text-decoration: underline; color: #FF00FF}"
   Top.Hlp.Help.Document.Write "BODY {background-image : URL(img/b_help.gif); font-variant: normal; font-family: Times New Roman; background-color: #DFEFFF; color: black;}"
   Top.Hlp.Help.Document.Write "</STYLE></HEAD>"
   Top.Hlp.Help.Document.Write "<BODY LINK='#0000FF' ALINK='#0000FF' VLINK='#0000FF'>"
End If
If (Abs(otwet - potwet) <= tochn) AND (popytka11 <= 3) Then 
   Top.Hlp.Help.Document.Write "Контрольная задача 1, вопрос 1: <font color=#009933><b>Ответ верный !</B></font><BR>"
   Top.Hlp.Help.Document.Write "Отвечайте на следующий вопрос."
   popytka11 = 5
ElseIf (Abs(otwet - potwet) > tochn) AND (popytka11 = 1) Then 
   Top.Hlp.Help.Document.Write "Контрольная задача 1, вопрос 1: <font color=#FF0066><b>Ответ не верный !</B></font><BR>"
   Top.Hlp.Help.Document.Write "<font color=#99CC00><B>Осталось две попытки</B></FONT>."
   popytka11 = popytka11 + 1
ElseIf (Abs(otwet - potwet) > tochn) AND (popytka11 = 2) Then
   Top.Hlp.Help.Document.Write "Контрольная задача 1, вопрос 1: <font color=#FF0066><b>Ответ не верный !</B></font><BR>"
   Top.Hlp.Help.Document.Write "<font color=#FF9900><B>Осталась последняя попытка</B></font>."
   popytka11 = popytka11 + 1
ElseIf (Abs(otwet - potwet) > tochn) AND (popytka11 = 3) Then
   Top.Hlp.Help.Document.Write "<font color=#FF3399><b>Контрольная задача 1, вопрос 1: Ответ не верный !</B></font><BR>"
   Top.Hlp.Help.Document.Write "<A HREF=z10.htm TARGET=Main>Выход в меню занятия</A>"
   popytka11 = popytka11 + 1
End If
If ((Abs(otwet - potwet)) <= tochn AND (popytka11 <= 3)) or ( (Abs(otwet - potwet)) >tochn AND ((popytka11 >= 1)and(popytka11 <= 3))) Then 
   Top.Hlp.Help.Document.Write "</BODY>"
   Top.Hlp.Help.Document.Write "</HTML>"
   Top.Hlp.Help.Document.Close
End If
End Sub


Sub znaok12_OnClick
Dim otwet,potwet,tochn

' Правильный ответ
potwet=CDbl(0.74)
tochn=CDbl(0.01)

' Проверка вводимого числа (Текст или не текст)
If (Document.ans1.zna12.value="") OR (Not IsNumeric(Document.ans1.zna12.value)) Then
Alert "Необходимо ввести число"
ans1.zna12.focus
Exit Sub
End If

' Проверка вводимого числа (на попадание в диапазон)
otwet=CDbl(Document.ans1.zna12.value)
If ((Abs(otwet - potwet)) <= tochn AND (popytka12 <= 3)) or ( (Abs(otwet - potwet) > tochn) AND ((popytka12 >= 1)and(popytka12 <= 3))) Then 
   Top.Hlp.Help.Document.Open
   Top.Hlp.Help.Document.Write "<HTML>"
   Top.Hlp.Help.Document.Write "<HEAD><meta http-equiv='Content-Type' content='text/html; charset=windows-1251'><STYLE>"
   Top.Hlp.Help.Document.Write "A { text-decoration: none}"
   Top.Hlp.Help.Document.Write "A:hover {text-decoration: underline; color: #FF00FF}"
   Top.Hlp.Help.Document.Write "BODY {background-image : URL(img/b_help.gif); font-variant: normal; font-family: Times New Roman; background-color: #DFEFFF; color: black;}"
   Top.Hlp.Help.Document.Write "</STYLE></HEAD>"
   Top.Hlp.Help.Document.Write "<BODY LINK='#0000FF' ALINK='#0000FF' VLINK='#0000FF'>"
End If
If (Abs(otwet - potwet) <= tochn) AND (popytka12 <= 3) Then 
   Top.Hlp.Help.Document.Write "Контрольная задача 1, вопрос 2: <font color=#009933><b>Ответ верный !</B></font><BR>"
   Top.Hlp.Help.Document.Write "Отвечайте на следующий вопрос."
   popytka12 = 5
ElseIf (Abs(otwet - potwet) > tochn) AND (popytka12 = 1) Then 
   Top.Hlp.Help.Document.Write "Контрольная задача 1, вопрос 2: <font color=#FF0066><b>Ответ не верный !</B></font><BR>"
   Top.Hlp.Help.Document.Write "<font color=#99CC00><B>Осталось две попытки</B></FONT>."
   popytka12 = popytka12 + 1
ElseIf (Abs(otwet - potwet) > tochn) AND (popytka12 = 2) Then
   Top.Hlp.Help.Document.Write "Контрольная задача 1, вопрос 2: <font color=#FF0066><b>Ответ не верный !</B></font><BR>"
   Top.Hlp.Help.Document.Write "<font color=#FF9900><B>Осталась последняя попытка</B></font>."
   popytka12 = popytka12 + 1
ElseIf (Abs(otwet - potwet) > tochn) AND (popytka12 = 3) Then
   Top.Hlp.Help.Document.Write "<font color=#FF3399><b>Контрольная задача 1, вопрос 2: Ответ не верный !</B></font><BR>"
   Top.Hlp.Help.Document.Write "<A HREF=z10.htm TARGET=Main>Выход в меню занятия</A>"
   popytka12 = popytka12 + 1
End If
If ((Abs(otwet - potwet)) <= tochn AND (popytka12 <= 3)) or ( (Abs(otwet - potwet) > tochn) AND ((popytka12 >= 1)and(popytka12 <= 3))) Then 
   Top.Hlp.Help.Document.Write "</BODY>"
   Top.Hlp.Help.Document.Write "</HTML>"
   Top.Hlp.Help.Document.Close
End If
End Sub

Sub znaok13_OnClick
Dim otwet,potwet,tochn

' Правильный ответ
potwet=CDbl(1.00)
tochn=CDbl(0.01)

' Проверка вводимого числа (Текст или не текст)
If (Document.ans1.zna13.value="") OR (Not IsNumeric(Document.ans1.zna13.value)) Then
Alert "Необходимо ввести число"
ans1.zna13.focus
Exit Sub
End If

' Проверка вводимого числа (на попадание в диапазон)
otwet=CDbl(Document.ans1.zna13.value)
If ((Abs(otwet - potwet)) <= tochn AND (popytka13 <= 3)) or ( (Abs(otwet - potwet)) > tochn AND ((popytka13 >= 1)and(popytka13 <= 3))) Then 
   Top.Hlp.Help.Document.Open
   Top.Hlp.Help.Document.Write "<HTML>"
   Top.Hlp.Help.Document.Write "<HEAD><meta http-equiv='Content-Type' content='text/html; charset=windows-1251'><STYLE>"
   Top.Hlp.Help.Document.Write "A { text-decoration: none}"
   Top.Hlp.Help.Document.Write "A:hover {text-decoration: underline; color: #FF00FF}"
   Top.Hlp.Help.Document.Write "BODY {background-image : URL(img/b_help.gif); font-variant: normal; font-family: Times New Roman; background-color: #DFEFFF; color: black;}"
   Top.Hlp.Help.Document.Write "</STYLE></HEAD>"
   Top.Hlp.Help.Document.Write "<BODY LINK='#0000FF' ALINK='#0000FF' VLINK='#0000FF'>"
End If
If (Abs(otwet - potwet) <= tochn) AND (popytka13 <= 3) Then 
   Top.Hlp.Help.Document.Write "Контрольная задача 1, вопрос 3: <font color=#009933><b>Ответ верный !</B></font><BR>"
   Top.Hlp.Help.Document.Write "Отвечайте на следующий вопрос."
   popytka13 = 5
ElseIf (Abs(otwet - potwet) > tochn) AND (popytka13 = 1) Then 
   Top.Hlp.Help.Document.Write "Контрольная задача 1, вопрос 3: <font color=#FF0066><b>Ответ не верный !</B></font><BR>"
   Top.Hlp.Help.Document.Write "<font color=#99CC00><B>Осталось две попытки</B></FONT>."
   popytka13 = popytka13 + 1
ElseIf (Abs(otwet - potwet) > tochn) AND (popytka13 = 2) Then
   Top.Hlp.Help.Document.Write "Контрольная задача 1, вопрос 3: <font color=#FF0066><b>Ответ не верный !</B></font><BR>"
   Top.Hlp.Help.Document.Write "<font color=#FF9900><B>Осталась последняя попытка</B></font>."
   popytka13 = popytka13 + 1
ElseIf (Abs(otwet - potwet) > tochn) AND (popytka13 = 3) Then
   Top.Hlp.Help.Document.Write "<font color=#FF3399><b>Контрольная задача 1, вопрос 3: Ответ не верный !</B></font><BR>"
   Top.Hlp.Help.Document.Write "<A HREF=z10.htm TARGET=Main>Выход в меню занятия</A>"
   popytka13 = popytka13 + 1
End If
If ((Abs(otwet - potwet)) <= tochn AND (popytka13 <= 3)) or ( (Abs(otwet - potwet)) >tochn AND ((popytka13 >= 1)and(popytka13 <= 3))) Then 
   Top.Hlp.Help.Document.Write "</BODY>"
   Top.Hlp.Help.Document.Write "</HTML>"
   Top.Hlp.Help.Document.Close
End If
End Sub

Sub znaok14_OnClick
Dim otwet,potwet,tochn

' Правильный ответ
potwet=CDbl(0.50)
tochn=CDbl(0.01)

' Проверка вводимого числа (Текст или не текст)
If (Document.ans1.zna14.value="") OR (Not IsNumeric(Document.ans1.zna14.value)) Then
Alert "Необходимо ввести число"
ans1.zna14.focus
Exit Sub
End If

' Проверка вводимого числа (на попадание в диапазон)
otwet=CDbl(Document.ans1.zna14.value)
If ((Abs(otwet - potwet)) <= tochn AND (popytka14 <= 3)) or ( (Abs(otwet - potwet)) > tochn AND ((popytka14 >= 1)and(popytka14 <= 3))) Then 
   Top.Hlp.Help.Document.Open
   Top.Hlp.Help.Document.Write "<HTML>"
   Top.Hlp.Help.Document.Write "<HEAD><meta http-equiv='Content-Type' content='text/html; charset=windows-1251'><STYLE>"
   Top.Hlp.Help.Document.Write "A { text-decoration: none}"
   Top.Hlp.Help.Document.Write "A:hover {text-decoration: underline; color: #FF00FF}"
   Top.Hlp.Help.Document.Write "BODY {background-image : URL(img/b_help.gif); font-variant: normal; font-family: Times New Roman; background-color: #DFEFFF; color: black;}"
   Top.Hlp.Help.Document.Write "</STYLE></HEAD>"
   Top.Hlp.Help.Document.Write "<BODY LINK='#0000FF' ALINK='#0000FF' VLINK='#0000FF'>"
End If
If (Abs(otwet - potwet) <= tochn) AND (popytka14 <= 3) Then 
   Top.Hlp.Help.Document.Write "Контрольная задача 1, вопрос 4: <font color=#009933><b>Ответ верный !</B></font><BR>"
   Top.Hlp.Help.Document.Write "Отвечайте на следующий вопрос."
   popytka14 = 5
ElseIf (Abs(otwet - potwet) > tochn) AND (popytka14 = 1) Then 
   Top.Hlp.Help.Document.Write "Контрольная задача 1, вопрос 4: <font color=#FF0066><b>Ответ не верный !</B></font><BR>"
   Top.Hlp.Help.Document.Write "<font color=#99CC00><B>Осталось две попытки</B></FONT>."
   popytka14 = popytka14 + 1
ElseIf (Abs(otwet - potwet) > tochn) AND (popytka14 = 2) Then
   Top.Hlp.Help.Document.Write "Контрольная задача 1, вопрос 4: <font color=#FF0066><b>Ответ не верный !</B></font><BR>"
   Top.Hlp.Help.Document.Write "<font color=#FF9900><B>Осталась последняя попытка</B></font>."
   popytka14 = popytka14 + 1
ElseIf (Abs(otwet - potwet) > tochn) AND (popytka14 = 3) Then
   Top.Hlp.Help.Document.Write "<font color=#FF3399><b>Контрольная задача 1, вопрос 4: Ответ не верный !</B></font><BR>"
   Top.Hlp.Help.Document.Write "<A HREF=z10.htm TARGET=Main>Выход в меню занятия</A>"
   popytka14 = popytka14 + 1
End If
If ((Abs(otwet - potwet)) <= tochn AND (popytka14 <= 3)) or ( (Abs(otwet - potwet)) >tochn AND ((popytka14 >= 1)and(popytka14 <= 3))) Then 
   Top.Hlp.Help.Document.Write "</BODY>"
   Top.Hlp.Help.Document.Write "</HTML>"
   Top.Hlp.Help.Document.Close
End If
End Sub

Sub znaok15_OnClick
Dim otwet,potwet,tochn

' Правильный ответ
potwet=CDbl(1.0)
tochn=CDbl(0.1)

' Проверка вводимого числа (Текст или не текст)
If (Document.ans1.zna15.value="") OR (Not IsNumeric(Document.ans1.zna15.value)) Then
Alert "Необходимо ввести число"
ans1.zna15.focus
Exit Sub
End If

' Проверка вводимого числа (на попадание в диапазон)
otwet=CDbl(Document.ans1.zna15.value)
If ((Abs(otwet - potwet)) <= tochn AND (popytka15 <= 3)) or ( (Abs(otwet - potwet)) > tochn AND ((popytka15 >= 1)and(popytka15 <= 3))) Then 
   Top.Hlp.Help.Document.Open
   Top.Hlp.Help.Document.Write "<HTML>"
   Top.Hlp.Help.Document.Write "<HEAD><meta http-equiv='Content-Type' content='text/html; charset=windows-1251'><STYLE>"
   Top.Hlp.Help.Document.Write "A { text-decoration: none}"
   Top.Hlp.Help.Document.Write "A:hover {text-decoration: underline; color: #FF00FF}"
   Top.Hlp.Help.Document.Write "BODY {background-image : URL(img/b_help.gif); font-variant: normal; font-family: Times New Roman; background-color: #DFEFFF; color: black;}"
   Top.Hlp.Help.Document.Write "</STYLE></HEAD>"
   Top.Hlp.Help.Document.Write "<BODY LINK='#0000FF' ALINK='#0000FF' VLINK='#0000FF'>"
End If
If (Abs(otwet - potwet) <= tochn) AND (popytka15 <= 3) Then 
   Top.Hlp.Help.Document.Write "Контрольная задача 1, вопрос 5: <font color=#009933><b>Ответ верный !</B></font><BR>"
   Top.Hlp.Help.Document.Write "Отвечайте на следующий вопрос."
   popytka15 = 5
ElseIf (Abs(otwet - potwet) > tochn) AND (popytka15 = 1) Then 
   Top.Hlp.Help.Document.Write "Контрольная задача 1, вопрос 5: <font color=#FF0066><b>Ответ не верный !</B></font><BR>"
   Top.Hlp.Help.Document.Write "<font color=#99CC00><B>Осталось две попытки</B></FONT>."
   popytka15 = popytka15 + 1
ElseIf (Abs(otwet - potwet) > tochn) AND (popytka15 = 2) Then
   Top.Hlp.Help.Document.Write "Контрольная задача 1, вопрос 5: <font color=#FF0066><b>Ответ не верный !</B></font><BR>"
   Top.Hlp.Help.Document.Write "<font color=#FF9900><B>Осталась последняя попытка</B></font>."
   popytka15 = popytka15 + 1
ElseIf (Abs(otwet - potwet) > tochn) AND (popytka15 = 3) Then
   Top.Hlp.Help.Document.Write "<font color=#FF3399><b>Контрольная задача 1, вопрос 5: Ответ не верный !</B></font><BR>"
   Top.Hlp.Help.Document.Write "<A HREF=z10.htm TARGET=Main>Выход в меню занятия</A>"
   popytka15 = popytka15 + 1
End If
If ((Abs(otwet - potwet)) <= tochn AND (popytka15 <= 3)) or ( (Abs(otwet - potwet)) >tochn AND ((popytka15 >= 1)and(popytka15 <= 3))) Then 
   Top.Hlp.Help.Document.Write "</BODY>"
   Top.Hlp.Help.Document.Write "</HTML>"
   Top.Hlp.Help.Document.Close
End If
End Sub

Sub znaok16_OnClick
Dim otwet,potwet,tochn

' Правильный ответ
potwet=CDbl(0.25)
tochn=CDbl(0.01)

' Проверка вводимого числа (Текст или не текст)
If (Document.ans1.zna16.value="") OR (Not IsNumeric(Document.ans1.zna16.value)) Then
Alert "Необходимо ввести число"
ans1.zna16.focus
Exit Sub
End If

' Проверка вводимого числа (на попадание в диапазон)
otwet=CDbl(Document.ans1.zna16.value)
If ((Abs(otwet - potwet)) <= tochn AND (popytka16 <= 3)) or ( (Abs(otwet - potwet)) > tochn AND ((popytka16 >= 1)and(popytka16 <= 3))) Then 
   Top.Hlp.Help.Document.Open
   Top.Hlp.Help.Document.Write "<HTML>"
   Top.Hlp.Help.Document.Write "<HEAD><meta http-equiv='Content-Type' content='text/html; charset=windows-1251'><STYLE>"
   Top.Hlp.Help.Document.Write "A { text-decoration: none}"
   Top.Hlp.Help.Document.Write "A:hover {text-decoration: underline; color: #FF00FF}"
   Top.Hlp.Help.Document.Write "BODY {background-image : URL(img/b_help.gif); font-variant: normal; font-family: Times New Roman; background-color: #DFEFFF; color: black;}"
   Top.Hlp.Help.Document.Write "</STYLE></HEAD>"
   Top.Hlp.Help.Document.Write "<BODY LINK='#0000FF' ALINK='#0000FF' VLINK='#0000FF'>"
End If
If (Abs(otwet - potwet) <= tochn) AND (popytka16 <= 3) Then 
   Top.Hlp.Help.Document.Write "Контрольная задача 1, вопрос 6: <font color=#009933><b>Ответ верный !</B></font><BR>"
   Top.Hlp.Help.Document.Write "Отвечайте на следующий вопрос."
   popytka16 = 5
ElseIf (Abs(otwet - potwet) > tochn) AND (popytka16 = 1) Then 
   Top.Hlp.Help.Document.Write "Контрольная задача 1, вопрос 6: <font color=#FF0066><b>Ответ не верный !</B></font><BR>"
   Top.Hlp.Help.Document.Write "<font color=#99CC00><B>Осталось две попытки</B></FONT>."
   popytka16 = popytka16 + 1
ElseIf (Abs(otwet - potwet) > tochn) AND (popytka16 = 2) Then
   Top.Hlp.Help.Document.Write "Контрольная задача 1, вопрос 6: <font color=#FF0066><b>Ответ не верный !</B></font><BR>"
   Top.Hlp.Help.Document.Write "<font color=#FF9900><B>Осталась последняя попытка</B></font>."
   popytka16 = popytka16 + 1
ElseIf (Abs(otwet - potwet) > tochn) AND (popytka16 = 3) Then
   Top.Hlp.Help.Document.Write "<font color=#FF3399><b>Контрольная задача 1, вопрос 6: Ответ не верный !</B></font><BR>"
   Top.Hlp.Help.Document.Write "<A HREF=z10.htm TARGET=Main>Выход в меню занятия</A>"
   popytka16 = popytka16 + 1
End If
If ((Abs(otwet - potwet)) <= tochn AND (popytka16 <= 3)) or ( (Abs(otwet - potwet)) >tochn AND ((popytka16 >= 1)and(popytka16 <= 3))) Then 
   Top.Hlp.Help.Document.Write "</BODY>"
   Top.Hlp.Help.Document.Write "</HTML>"
   Top.Hlp.Help.Document.Close
End If
End Sub

Sub znaok17_OnClick
Dim otwet,potwet,tochn

' Правильный ответ
potwet=CDbl(0.0)
tochn=CDbl(0.1)

' Проверка вводимого числа (Текст или не текст)
If (Document.ans1.zna17.value="") OR (Not IsNumeric(Document.ans1.zna17.value)) Then
Alert "Необходимо ввести число"
ans1.zna17.focus
Exit Sub
End If

' Проверка вводимого числа (на попадание в диапазон)
otwet=CDbl(Document.ans1.zna17.value)
If ((Abs(otwet - potwet)) <= tochn AND (popytka17 <= 3)) or ( (Abs(otwet - potwet)) > tochn AND ((popytka17 >= 1)and(popytka17 <= 3))) Then 
   Top.Hlp.Help.Document.Open
   Top.Hlp.Help.Document.Write "<HTML>"
   Top.Hlp.Help.Document.Write "<HEAD><meta http-equiv='Content-Type' content='text/html; charset=windows-1251'><STYLE>"
   Top.Hlp.Help.Document.Write "A { text-decoration: none}"
   Top.Hlp.Help.Document.Write "A:hover {text-decoration: underline; color: #FF00FF}"
   Top.Hlp.Help.Document.Write "BODY {background-image : URL(img/b_help.gif); font-variant: normal; font-family: Times New Roman; background-color: #DFEFFF; color: black;}"
   Top.Hlp.Help.Document.Write "</STYLE></HEAD>"
   Top.Hlp.Help.Document.Write "<BODY LINK='#0000FF' ALINK='#0000FF' VLINK='#0000FF'>"
End If
If (Abs(otwet - potwet) <= tochn) AND (popytka17 <= 3) Then 
   Top.Hlp.Help.Document.Write "Контрольная задача 1, вопрос 7: <font color=#009933><b>Ответ верный !</B></font><BR>"
   Top.Hlp.Help.Document.Write "Отвечайте на следующий вопрос."
   popytka17 = 5
ElseIf (Abs(otwet - potwet) > tochn) AND (popytka17 = 1) Then 
   Top.Hlp.Help.Document.Write "Контрольная задача 1, вопрос 7: <font color=#FF0066><b>Ответ не верный !</B></font><BR>"
   Top.Hlp.Help.Document.Write "<font color=#99CC00><B>Осталось две попытки</B></FONT>."
   popytka17 = popytka17 + 1
ElseIf (Abs(otwet - potwet) > tochn) AND (popytka17 = 2) Then
   Top.Hlp.Help.Document.Write "Контрольная задача 1, вопрос 7: <font color=#FF0066><b>Ответ не верный !</B></font><BR>"
   Top.Hlp.Help.Document.Write "<font color=#FF9900><B>Осталась последняя попытка</B></font>."
   popytka17 = popytka17 + 1
ElseIf (Abs(otwet - potwet) > tochn) AND (popytka17 = 3) Then
   Top.Hlp.Help.Document.Write "<font color=#FF3399><b>Контрольная задача 1, вопрос 7: Ответ не верный !</B></font><BR>"
   Top.Hlp.Help.Document.Write "<A HREF=z10.htm TARGET=Main>Выход в меню занятия</A>"
   popytka17 = popytka17 + 1
End If
If ((Abs(otwet - potwet)) <= tochn AND (popytka17 <= 3)) or ( (Abs(otwet - potwet)) >tochn AND ((popytka17 >= 1)and(popytka17 <= 3))) Then 
   Top.Hlp.Help.Document.Write "</BODY>"
   Top.Hlp.Help.Document.Write "</HTML>"
   Top.Hlp.Help.Document.Close
End If
End Sub

Sub znaok18_OnClick
Dim otwet,potwet,tochn

' Правильный ответ
potwet=CDbl(0.0)
tochn=CDbl(0.1)

' Проверка вводимого числа (Текст или не текст)
If (Document.ans1.zna18.value="") OR (Not IsNumeric(Document.ans1.zna18.value)) Then
Alert "Необходимо ввести число"
ans1.zna18.focus
Exit Sub
End If

' Проверка вводимого числа (на попадание в диапазон)
otwet=CDbl(Document.ans1.zna18.value)
If ((Abs(otwet - potwet)) <= tochn AND (popytka18 <= 1)) or ( (Abs(otwet - potwet)) > tochn AND ((popytka18 >= 1)and(popytka18 <= 1))) Then 
   Top.Hlp.Help.Document.Open
   Top.Hlp.Help.Document.Write "<HTML>"
   Top.Hlp.Help.Document.Write "<HEAD><meta http-equiv='Content-Type' content='text/html; charset=windows-1251'><STYLE>"
   Top.Hlp.Help.Document.Write "A { text-decoration: none}"
   Top.Hlp.Help.Document.Write "A:hover {text-decoration: underline; color: #FF00FF}"
   Top.Hlp.Help.Document.Write "BODY {background-image : URL(img/b_help.gif); font-variant: normal; font-family: Times New Roman; background-color: #DFEFFF; color: black;}"
   Top.Hlp.Help.Document.Write "</STYLE></HEAD>"
   Top.Hlp.Help.Document.Write "<BODY LINK='#0000FF' ALINK='#0000FF' VLINK='#0000FF'>"
End If
If (Abs(otwet - potwet) <= tochn) AND (popytka18 <= 1) Then 
   Top.Hlp.Help.Document.Write "Контрольная задача 1, вопрос 8: <font color=#009933><b>Ответ верный !</B></font><BR>"
   Top.Hlp.Help.Document.Write "Отвечайте на следующий вопрос."
   popytka18 = 5
ElseIf (Abs(otwet - potwet) > tochn) AND (popytka18 = 1) Then
   Top.Hlp.Help.Document.Write "<font color=#FF3399><b>Контрольная задача 1, вопрос 8: Ответ не верный !</B></font><BR>"
   Top.Hlp.Help.Document.Write "<A HREF=z10.htm TARGET=Main>Выход в меню занятия</A>"
   popytka18 = popytka18 + 1
End If
If ((Abs(otwet - potwet)) <= tochn AND (popytka18 <= 1)) or ( (Abs(otwet - potwet)) >tochn AND ((popytka18 >= 1)and(popytka18 <= 1))) Then 
   Top.Hlp.Help.Document.Write "</BODY>"
   Top.Hlp.Help.Document.Write "</HTML>"
   Top.Hlp.Help.Document.Close
End If
End Sub

Sub znaok19_OnClick
Dim otwet,potwet,tochn

' Правильный ответ
potwet=CDbl(0.0)
tochn=CDbl(0.1)

' Проверка вводимого числа (Текст или не текст)
If (Document.ans1.zna19.value="") OR (Not IsNumeric(Document.ans1.zna19.value)) Then
Alert "Необходимо ввести число"
ans1.zna19.focus
Exit Sub
End If

' Проверка вводимого числа (на попадание в диапазон)
otwet=CDbl(Document.ans1.zna19.value)
If ((Abs(otwet - potwet)) <= tochn AND (popytka19 <= 1)) or ( (Abs(otwet - potwet)) > tochn AND ((popytka19 >= 1)and(popytka19 <= 1))) Then 
   Top.Hlp.Help.Document.Open
   Top.Hlp.Help.Document.Write "<HTML>"
   Top.Hlp.Help.Document.Write "<HEAD><meta http-equiv='Content-Type' content='text/html; charset=windows-1251'><STYLE>"
   Top.Hlp.Help.Document.Write "A { text-decoration: none}"
   Top.Hlp.Help.Document.Write "A:hover {text-decoration: underline; color: #FF00FF}"
   Top.Hlp.Help.Document.Write "BODY {background-image : URL(img/b_help.gif); font-variant: normal; font-family: Times New Roman; background-color: #DFEFFF; color: black;}"
   Top.Hlp.Help.Document.Write "</STYLE></HEAD>"
   Top.Hlp.Help.Document.Write "<BODY LINK='#0000FF' ALINK='#0000FF' VLINK='#0000FF'>"
End If
If (Abs(otwet - potwet) <= tochn) AND (popytka19 <= 1) Then 
   Top.Hlp.Help.Document.Write "Контрольная задача 1, вопрос 9: <font color=#009933><b>Ответ верный !</B></font><BR>"
   Top.Hlp.Help.Document.Write "<A HREF=z10.htm TARGET=Main>Выход в меню занятия</A>"
   popytka19 = 5
ElseIf (Abs(otwet - potwet) > tochn) AND (popytka19 = 1) Then
   Top.Hlp.Help.Document.Write "<font color=#FF3399><b>Контрольная задача 1, вопрос 9: Ответ не верный !</B></font><BR>"
   Top.Hlp.Help.Document.Write "<A HREF=z10.htm TARGET=Main>Выход в меню занятия</A>"
   popytka19 = popytka19 + 1
End If
If ((Abs(otwet - potwet)) <= tochn AND (popytka19 <= 1)) or ( (Abs(otwet - potwet)) >tochn AND ((popytka19 >= 1)and(popytka19 <= 1))) Then 
   Top.Hlp.Help.Document.Write "</BODY>"
   Top.Hlp.Help.Document.Write "</HTML>"
   Top.Hlp.Help.Document.Close
End If
End Sub

Sub znaok2_OnClick
Dim otwet,potwet,tochn

' Правильный ответ
potwet=CDbl(0.0)
tochn=CDbl(0.1)

' Проверка вводимого числа (Текст или не текст)
If (Document.ans2.zna2.value="") OR (Not IsNumeric(Document.ans2.zna2.value)) Then
Alert "Необходимо ввести число"
ans2.zna2.focus
Exit Sub
End If

' Проверка вводимого числа (на попадание в диапазон)
otwet=CDbl(Document.ans2.zna2.value)
If ((Abs(otwet - potwet) <= tochn) AND (popytka2 <= 1)) or ( (Abs(otwet - potwet) > tochn) AND ((popytka2 >= 1)and(popytka2 <= 1))) Then 
   Top.Hlp.Help.Document.Open
   Top.Hlp.Help.Document.Write "<HTML>"
   Top.Hlp.Help.Document.Write "<HEAD><meta http-equiv='Content-Type' content='text/html; charset=windows-1251'><STYLE>"
   Top.Hlp.Help.Document.Write "A { text-decoration: none}"
   Top.Hlp.Help.Document.Write "A:hover {text-decoration: underline; color: #FF00FF}"
   Top.Hlp.Help.Document.Write "BODY {background-image : URL(img/b_help.gif); font-variant: normal; font-family: Times New Roman; background-color: #DFEFFF; color: black;}"
   Top.Hlp.Help.Document.Write "</STYLE></HEAD>"
   Top.Hlp.Help.Document.Write "<BODY LINK='#0000FF' ALINK='#0000FF' VLINK='#0000FF'>"
End If
If (Abs(otwet - potwet) <= tochn) AND (popytka2 <= 1) Then 
   Top.Hlp.Help.Document.Write "Контрольная задача 2: <font color=#009933><b>Ответ верный !</B></font><BR>"
   Top.Hlp.Help.Document.Write "<A HREF=z10.htm TARGET=Main>Выход в меню занятия</A>"
   popytka2 = 5
ElseIf (Abs(otwet - potwet) > tochn) AND (popytka2 = 1) Then
   Top.Hlp.Help.Document.Write "<font color=#FF3399><b>Контрольная задача 2 не решена !</B></FONT><BR>"
   Top.Hlp.Help.Document.Write "<A HREF=z10.htm TARGET=Main>Выход в меню занятия</A>"
   popytka2 = popytka2 + 1
End If
If ((Abs(otwet - potwet) <= tochn) AND (popytka2 <= 1)) or ( (Abs(otwet - potwet) > tochn) AND ((popytka2 >= 1)and(popytka2 <= 1))) Then 
   Top.Hlp.Help.Document.Write "</BODY>"
   Top.Hlp.Help.Document.Write "</HTML>"
   Top.Hlp.Help.Document.Close
End If
End Sub

Sub znaok31_OnClick
Dim otwet,potwet,tochn

' Правильный ответ
potwet=CDbl(0.125)
tochn=CDbl(0.001)

' Проверка вводимого числа (Текст или не текст)
If (Document.ans3.zna31.value="") OR (Not IsNumeric(Document.ans3.zna31.value)) Then
Alert "Необходимо ввести число"
ans3.zna31.focus
Exit Sub
End If

' Проверка вводимого числа (на попадание в диапазон)
otwet=CDbl(Document.ans3.zna31.value)
If ((Abs(otwet - potwet)) <= tochn AND (popytka31 <= 3)) or ( (Abs(otwet - potwet)) > tochn AND ((popytka31 >= 1)and(popytka31 <= 3))) Then 
   Top.Hlp.Help.Document.Open
   Top.Hlp.Help.Document.Write "<HTML>"
   Top.Hlp.Help.Document.Write "<HEAD><meta http-equiv='Content-Type' content='text/html; charset=windows-1251'><STYLE>"
   Top.Hlp.Help.Document.Write "A { text-decoration: none}"
   Top.Hlp.Help.Document.Write "A:hover {text-decoration: underline; color: #FF00FF}"
   Top.Hlp.Help.Document.Write "BODY {background-image : URL(img/b_help.gif); font-variant: normal; font-family: Times New Roman; background-color: #DFEFFF; color: black;}"
   Top.Hlp.Help.Document.Write "</STYLE></HEAD>"
   Top.Hlp.Help.Document.Write "<BODY LINK='#0000FF' ALINK='#0000FF' VLINK='#0000FF'>"
End If
If (Abs(otwet - potwet) <= tochn) AND (popytka31 <= 3) Then 
   Top.Hlp.Help.Document.Write "Контрольная задача 3, вопрос 1: <font color=#009933><b>Ответ верный !</B></font><BR>"
   Top.Hlp.Help.Document.Write "Отвечайте на второй вопрос."
   popytka31 = 5
ElseIf (Abs(otwet - potwet) > tochn) AND (popytka31 = 1) Then 
   Top.Hlp.Help.Document.Write "Контрольная задача 3, вопрос 1: <font color=#FF0066><b>Ответ не верный !</B></font><BR>"
   Top.Hlp.Help.Document.Write "<font color=#99CC00><B>Осталось две попытки</B></FONT>."
   popytka31 = popytka31 + 1
ElseIf (Abs(otwet - potwet) > tochn) AND (popytka31 = 2) Then
   Top.Hlp.Help.Document.Write "Контрольная задача 3, вопрос 1: <font color=#FF0066><b>Ответ не верный !</B></font><BR>"
   Top.Hlp.Help.Document.Write "<font color=#FF9900><B>Осталась последняя попытка</B></font>."
   popytka31 = popytka31 + 1
ElseIf (Abs(otwet - potwet) > tochn) AND (popytka31 = 3) Then
   Top.Hlp.Help.Document.Write "<font color=#FF3399><b>Контрольная задача 3, вопрос 1: Ответ не верный !</B></font><BR>"
   Top.Hlp.Help.Document.Write "<A HREF=z10.htm TARGET=Main>Выход в меню занятия</A>"
   popytka31 = popytka31 + 1
End If
If ((Abs(otwet - potwet)) <= tochn AND (popytka31 <= 3)) or ( (Abs(otwet - potwet)) >tochn AND ((popytka31 >= 1)and(popytka31 <= 3))) Then 
   Top.Hlp.Help.Document.Write "</BODY>"
   Top.Hlp.Help.Document.Write "</HTML>"
   Top.Hlp.Help.Document.Close
End If
End Sub


Sub znaok32_OnClick
Dim otwet,potwet,tochn

' Правильный ответ
potwet=CDbl(0.0)
tochn=CDbl(0.1)

' Проверка вводимого числа (Текст или не текст)
If (Document.ans3.zna32.value="") OR (Not IsNumeric(Document.ans3.zna32.value)) Then
Alert "Необходимо ввести число"
ans3.zna32.focus
Exit Sub
End If

' Проверка вводимого числа (на попадание в диапазон)
otwet=CDbl(Document.ans3.zna32.value)
If ((Abs(otwet - potwet)) <= tochn AND (popytka32 <= 1)) or ( (Abs(otwet - potwet) > tochn) AND ((popytka32 >= 1)and(popytka32 <= 1))) Then 
   Top.Hlp.Help.Document.Open
   Top.Hlp.Help.Document.Write "<HTML>"
   Top.Hlp.Help.Document.Write "<HEAD><meta http-equiv='Content-Type' content='text/html; charset=windows-1251'><STYLE>"
   Top.Hlp.Help.Document.Write "A { text-decoration: none}"
   Top.Hlp.Help.Document.Write "A:hover {text-decoration: underline; color: #FF00FF}"
   Top.Hlp.Help.Document.Write "BODY {background-image : URL(img/b_help.gif); font-variant: normal; font-family: Times New Roman; background-color: #DFEFFF; color: black;}"
   Top.Hlp.Help.Document.Write "</STYLE></HEAD>"
   Top.Hlp.Help.Document.Write "<BODY LINK='#0000FF' ALINK='#0000FF' VLINK='#0000FF'>"
End If
If (Abs(otwet - potwet) <= tochn) AND (popytka32 <= 1) Then 
   Top.Hlp.Help.Document.Write "Контрольная задача 3, вопрос 2: <font color=#009933><b>Ответ верный !</B></font><BR>"
   Top.Hlp.Help.Document.Write "Отвечайте на третий вопрос."
   popytka32 = 5
ElseIf (Abs(otwet - potwet) > tochn) AND (popytka32 = 1) Then
   Top.Hlp.Help.Document.Write "<font color=#FF3399><b>Контрольная задача 3, вопрос 2: Ответ не верный !</B></font><BR>"
   Top.Hlp.Help.Document.Write "<A HREF=z10.htm TARGET=Main>Выход в меню занятия</A>"
   popytka32 = popytka32 + 1
End If
If ((Abs(otwet - potwet)) <= tochn AND (popytka32 <= 1)) or ( (Abs(otwet - potwet) > tochn) AND ((popytka32 >= 1)and(popytka32 <= 1))) Then 
   Top.Hlp.Help.Document.Write "</BODY>"
   Top.Hlp.Help.Document.Write "</HTML>"
   Top.Hlp.Help.Document.Close
End If
End Sub

Sub znaok33_OnClick
Dim otwet,potwet,tochn

' Правильный ответ
potwet=CDbl(1.0)
tochn=CDbl(0.1)

' Проверка вводимого числа (Текст или не текст)
If (Document.ans3.zna33.value="") OR (Not IsNumeric(Document.ans3.zna33.value)) Then
Alert "Необходимо ввести число"
ans3.zna33.focus
Exit Sub
End If

' Проверка вводимого числа (на попадание в диапазон)
otwet=CDbl(Document.ans3.zna33.value)
If ((Abs(otwet - potwet)) <= tochn AND (popytka33 <= 1)) or ( (Abs(otwet - potwet)) > tochn AND ((popytka33 >= 1)and(popytka33 <= 1))) Then 
   Top.Hlp.Help.Document.Open
   Top.Hlp.Help.Document.Write "<HTML>"
   Top.Hlp.Help.Document.Write "<HEAD><meta http-equiv='Content-Type' content='text/html; charset=windows-1251'><STYLE>"
   Top.Hlp.Help.Document.Write "A { text-decoration: none}"
   Top.Hlp.Help.Document.Write "A:hover {text-decoration: underline; color: #FF00FF}"
   Top.Hlp.Help.Document.Write "BODY {background-image : URL(img/b_help.gif); font-variant: normal; font-family: Times New Roman; background-color: #DFEFFF; color: black;}"
   Top.Hlp.Help.Document.Write "</STYLE></HEAD>"
   Top.Hlp.Help.Document.Write "<BODY LINK='#0000FF' ALINK='#0000FF' VLINK='#0000FF'>"
End If
If (Abs(otwet - potwet) <= tochn) AND (popytka33 <= 1) Then 
   Top.Hlp.Help.Document.Write "Контрольная задача 3, вопрос 3: <font color=#009933><b>Ответ верный !</B></font><BR>"
   Top.Hlp.Help.Document.Write "<A HREF=z10.htm TARGET=Main>Выход в меню занятия</A>"
   popytka33 = 5
ElseIf (Abs(otwet - potwet) > tochn) AND (popytka33 = 1) Then
   Top.Hlp.Help.Document.Write "<font color=#FF3399><b>Контрольная задача 3, вопрос 3: Ответ не верный !</B></font><BR>"
   Top.Hlp.Help.Document.Write "<A HREF=z10.htm TARGET=Main>Выход в меню занятия</A>"
   popytka33 = popytka33 + 1
End If
If ((Abs(otwet - potwet)) <= tochn AND (popytka33 <= 1)) or ( (Abs(otwet - potwet)) >tochn AND ((popytka33 >= 1)and(popytka33 <= 1))) Then 
   Top.Hlp.Help.Document.Write "</BODY>"
   Top.Hlp.Help.Document.Write "</HTML>"
   Top.Hlp.Help.Document.Close
End If
End Sub