home *** CD-ROM | disk | FTP | other *** search
- function leeren()
- {
- with (document.formular)
- {
- edit.value = '';
- Item.value = '';
- }
- }
-
- /**/
-
- function feld_disabled()
- {
- with (document.formular)
- T4.disabled = (C2.checked) ? false : true;
- }
-
- /**/
-
- function Abfrage(edi, ite)
- {
- var Check = confirm(txt[20][31]);
-
- with (document.formular)
- {
- if (Check && pruefen())
- {
- T4.disabled = (C2.checked || (T4.value == '')) ? false : true;
-
- edit.value = edi;
- Item.value = ite;
-
- submit();
- }
- else
- {
- edit.value = '';
- Item.value = '';
- }
- }
- }
-
- /**/
-
- function edit(edi, ite)
- {
- with (document.formular)
- {
- if (pruefen())
- {
- T4.disabled = (C2.checked || (T4.value == '')) ? false : true;
-
- edit.value = edi;
- Item.value = ite;
-
- submit();
- }
- }
- }
-
- /**/
-
- function send()
- {
- if (pruefen())
- {
- with (document.formular)
- {
- T4.disabled = (C2.checked || (T4.value == '')) ? false : true;
- submit();
- }
- }
- }
-
- /**/
-
- function pruefen()
- {
- with (document.formular)
- {
- var f1 = T1.value;
- var f2 = T2.value;
- var f3 = T3.value;
- var f4 = T4.value;
- var pr = new Array(f1, f2);
- var fe = new Array('T1', 'T2');
-
- for (var i = 0; i < pr.length; i++)
- {
- var se = elements[fe[i]];
-
- if (pr[i].charAt(0) == '"')
- {
- alert(txt[28][28]);
- edit.value = '';
- Item.value = '';
- se.select();
- se.focus();
- return false;
- }
-
- if (pr[i].charAt(pr[i].length - 1) == '\\')
- {
- alert(pr[i] + '\r\n\r\n' + txt[28][26]);
- edit.value = '';
- Item.value = '';
- se.select();
- se.focus();
- return false;
- }
-
- if (pr[i].substr((pr[i].length - 2), 2) == '\\"')
- {
- alert(pr[i].substr(0, (pr[i].length - 1)) + '\r\n\r\n' + txt[28][26]);
- edit.value = '';
- Item.value = '';
- se.select();
- se.focus();
- return false;
- }
-
- var tea = pr[i].split('\\');
-
- if (pr[i].substr(0, 2) != '\\\\')
- {
- if (/^([c-z])+([:])$/i.test(tea[0]) == false)
- {
- alert(tea[0] + '\r\n\r\n' + txt[28][22]);
- edit.value = '';
- Item.value = '';
- se.select();
- se.focus();
- return false;
- }
- }
-
- var z = (pr[i].substr(0,2) != '\\\\') ? 1 : 2;
-
- for (var k = z; k < tea.length; k++)
- {
- if (tea[k].indexOf(' ') != -1)
- {
- if (tea[k].indexOf('"') == -1)
- {
- alert(txt[29][13] + '\r\n\r\n"' + tea[k] + '"');
- edit.value = '';
- Item.value = '';
- se.select();
- se.focus();
- return false;
- }
- }
-
- if (tea[k].indexOf('"') != -1)
- {
- if ((tea[k].charAt(0) != '"') || (tea[k].charAt(tea[k].length - 1) != '"'))
- {
- alert(txt[29][14] + '\r\n\r\n"' + tea[k] + '"');
- edit.value = '';
- Item.value = '';
- se.select();
- se.focus();
- return false;
- }
- }
-
- var x = (tea[k].charAt(0) != '"') ? 0 : 1;
- var teb = tea[k].slice(x, tea[k].length - x);
-
- if (/^([_a-z0-9- .]+)$/i.test(teb) == false)
- {
- alert(teb + '\r\n\r\n' + txt[28][23]);
- edit.value = '';
- Item.value = '';
- se.select();
- se.focus();
- return false;
- }
- }
- }
-
- if ((f3.match(/\D/) != null) || (f3 < 10) || (f3 > 1200))
- {
- alert(txt[19][9] + txt[29][9] + ' "\t\r\n' + txt[29][12]);
- edit.value = '';
- Item.value = '';
- T3.select();
- T3.focus();
- return false;
- }
-
- if (C2.checked && (f4 == ''))
- {
- alert(txt[22][8] + txt[29][18] + txt[22][9]);
- edit.value = '';
- Item.value = '';
- T4.select();
- T4.focus();
- return false;
- }
- }
-
- return (filter_send()) ? true : false;
- }