home *** CD-ROM | disk | FTP | other *** search
- function leeren()
- {
- document.formular.edit.value = '';
- document.formular.Item.value = '';
- }
-
- /**/
-
- function feld_disabled()
- {
- with (document.formular)
- {
- var c2 = C2.checked;
-
- if (c2 == true)
- {
- C3.disabled = false;
- T2.disabled = false;
- T1.disabled = false;
- T3.disabled = false;
- }
- else
- {
- C3.disabled = true;
- T2.disabled = true;
- T1.disabled = true;
- T3.disabled = true;
- }
- }
- }
-
- /**/
-
- function Abfrage(edi, ser)
- {
- var Check = confirm(txt[20][31]);
-
- with (document.formular)
- {
- if ((Check == true) && (pruefen() == true))
- {
- var c2 = C2.checked;
-
- C3.disabled = false;
- T2.disabled = ((c2 == true) || (T2.value == '')) ? false : true;
- T1.disabled = ((c2 == true) || (T1.value == '')) ? false : true;
- T3.disabled = ((c2 == true) || (T3.value == '')) ? false : true;
-
- edit.value = '' + edi + '';
- Item.value = '' + ser + '';
-
- submit();
- }
- else
- {
- edit.value = '';
- Item.value = '';
- }
- }
- }
-
- /**/
-
- function edit(edi, ser)
- {
- if (pruefen() == true)
- {
- with (document.formular)
- {
- var c2 = C2.checked;
-
- C3.disabled = false;
- T2.disabled = ((c2 == true) || (T2.value == '')) ? false : true;
- T1.disabled = ((c2 == true) || (T1.value == '')) ? false : true;
- T3.disabled = ((c2 == true) || (T3.value == '')) ? false : true;
-
- edit.value = '' + edi + '';
- Item.value = '' + ser + '';
-
- submit();
- }
- }
- }
-
- /**/
-
- function send()
- {
- if (pruefen() == true)
- {
- with (document.formular)
- {
- var c2 = C2.checked;
-
- C3.disabled = false;
- T2.disabled = ((c2 == true) || (T2.value == '')) ? false : true;
- T1.disabled = ((c2 == true) || (T1.value == '')) ? false : true;
- T3.disabled = ((c2 == true) || (T3.value == '')) ? false : true;
-
- submit();
- }
- }
- }
-
- /**/
-
- function pruefen()
- {
- var f1 = document.formular.T1.value;
- var f2 = document.formular.T2.value;
- var f3 = document.formular.T3.value;
- var c2 = document.formular.C2.checked;
- var fe = new Array('T2');
- var va = new Array('\'', ',');
-
- for (i = 0; i < fe.length; i++)
- {
- for (j = 0; j < va.length; j++)
- {
- var ei = document.formular.elements[fe[i]];
-
- if (ei.value.indexOf(va[j]) != -1)
- {
- alert(txt[5][7] + va[j] + txt[5][8]);
- document.formular.edit.value = '';
- document.formular.Item.value = '';
- ei.select();
- ei.focus();
- return false;
- }
- }
- }
-
- if (c2 == true)
- {
- if (f2.indexOf('"') != -1)
- var ganz = (f2.match(/\"/g).length) % 2;
- else
- var ganz = 0;
-
- if (ganz != 0)
- {
- alert(txt[20][43]);
- document.formular.edit.value = '';
- document.formular.Item.value = '';
- document.formular.T2.select();
- document.formular.T2.focus();
- return false;
- }
- else
- {
- var z = (f2.charAt(0) != '"') ? 0 : 1;
- var LW1 = f2.charAt(z);
- var LW2 = f2.substr((1 + z), 2);
-
- if (((f2.substr(z, 2) != '\\\\') && ((/^([c-z])$/i.test(LW1) != true) || (LW2 != ':\\'))) || (f2.indexOf('.') == -1))
- {
- alert(txt[19][9] + txt[43][13] + txt[20][37]);
- document.formular.edit.value = '';
- document.formular.Item.value = '';
- document.formular.T2.select();
- document.formular.T2.focus();
- return false;
- }
- }
-
- if ((f1 != -1) && ((f1 < 1) || (f1.match(/\D/) != null)))
- {
- alert(txt[19][9] + txt[43][14] + txt[43][15]);
- document.formular.edit.value = '';
- document.formular.Item.value = '';
- document.formular.T1.select();
- document.formular.T1.focus();
- return false;
- }
-
- if ((f3 == '') || (f3.match(/\D/) != null))
- {
- alert(txt[19][9] + txt[43][16] + txt[43][15]);
- document.formular.edit.value = '';
- document.formular.Item.value = '';
- document.formular.T3.select();
- document.formular.T3.focus();
- return false;
- }
- }
-
- return true;
- }