home *** CD-ROM | disk | FTP | other *** search
- function send()
- {
- if (pruefen() == true)
- document.forms[1].submit();
- }
-
- /**/
-
- function pruefen()
- {
- var f1 = document.forms[1].T1;
- var f2 = document.forms[1].T2;
- var f4 = document.forms[1].T4;
- var f5 = document.forms[1].T5;
- var f7 = document.forms[1].T7;
-
- if ((f1.value.match(/\D/) != null) || (f1.value < 1))
- {
- alert(txt[42][6] + ' ' + txt[76][16] + ' "' + txt[76][12] + '"!');
- f1.select();
- f1.focus();
- return false;
- }
-
- if ((f2.value.match(/\D/) != null) || (f2.value < 1))
- {
- alert(txt[42][6] + ' ' + txt[76][16] + ' "' + txt[76][13] + '"!');
- f2.select();
- f2.focus();
- return false;
- }
-
- if ((f4.value != '') && (check_ip(1, 'T4') == false))
- return false;
-
- if ((f5.value != '') && (check_ip(1, 'T5') == false))
- return false;
-
- if (check_ip(1, 'T6') == false)
- return false;
-
- if ((f7.value != '') && (check_ip(1, 'T7') == false))
- return false;
-
- return true;
- }
-
- /**/
-
- function pruefen_2(az, bz)
- {
- var f1 = document.forms[2].elements[bz];
- var f2 = document.forms[2].elements[bz + 1];
- var vb = new Array(',', '|', '\'', '"');
-
- if (az == 1)
- {
- if (check_ip(2, bz) == false)
- return false;
-
- if ((f2.value != '') && (check_ip(2, (bz + 1)) == false))
- return false;
- }
- else
- {
- if (f1.value != '')
- {
- for (i = 0; i < vb.length; i++)
- {
- if (f1.value.indexOf(vb[i]) != -1)
- {
- alert(txt[5][7] + vb[i] + txt[5][8]);
- f1.select();
- f1.focus();
- return false;
- }
- }
-
- if (check_ip(2, (bz + 1)) == false)
- return false;
- }
- }
- }
-
- /**/
-
- function check_ip(fr, fe)
- {
- var fx = document.forms[fr].elements[fe];
- var ip = fx.value.split('.');
-
- if (ip.length != 4)
- {
- alert(fx.value + ', ' + txt[18][27]);
- fx.select();
- fx.focus();
- return false;
- }
- else
- {
- for (i = 0; i < ip.length; i++)
- {
- if ((isNaN(ip[i]) == true) || (ip[i] == '') || (ip[i] < 0) || (ip[i] > 255))
- {
- alert(fx.value + ', ' + txt[18][27]);
- fx.select();
- fx.focus();
- return false;
- }
- }
- }
-
- return true;
- }