home *** CD-ROM | disk | FTP | other *** search
- function send()
- {
- if (pruefen() == true)
- document.formular.submit();
- }
-
- /**/
-
- function pruefen()
- {
- var f1 = document.formular.T1.value;
- var f2 = document.formular.T2.value;
-
- if (/^([a-z0-9]+)$/i.test(f1) == false)
- {
- alert(txt[31][3]);
- document.formular.T1.select();
- document.formular.T1.focus();
- return false;
- }
-
- if (/(^exe$)|(^com$)/i.test(f1) != false && (f2 != ''))
- {
- alert(txt[22][8] + txt[31][2] + ' " ' + txt[31][4]);
- document.formular.T2.select();
- document.formular.T2.focus();
- return false;
- }
-
- if (/(^exe$)|(^com$)/i.test(f1) == false)
- {
- if (f2.indexOf(' ') != -1)
- {
- if (f2.indexOf('"') == -1)
- {
- alert(txt[31][5]);
- document.formular.T2.select();
- document.formular.T2.focus();
- return false;
- }
- }
-
- if (f2.charAt(0) == '"')
- {
- if (f2.indexOf('"') != -1)
- {
- if ((f2.charAt(0) != '"') || (f2.charAt(f2.length - 1) != '"'))
- {
- alert(txt[31][6]);
- document.formular.T2.select();
- document.formular.T2.focus();
- return false;
- }
- }
-
- var x = (f2.charAt(0) != '"') ? 0 : 1;
- var tea = f2.slice(x, f2.length - x);
- var teb = tea.split('\\');
-
- if (tea.substr(0,2) != '\\\\')
- {
- if (/^([c-z])+([:])$/i.test(teb[0]) == false)
- {
- alert(teb[0] + '\n\n' + txt[28][22]);
- document.formular.T2.select();
- document.formular.T2.focus();
- return false;
- }
- }
-
- var z = (tea.substr(0, 2) != '\\\\') ? 1 : 2;
-
- for (k = z; k < teb.length; k++)
- {
- if (k == teb.length - 1)
- {
- tec = teb[k].split('.');
-
- if (/(^exe$)|(^com$)|(^dll$)/i.test(tec[tec.length - 1]) == false)
- {
- alert(teb[k] + ' --> ' + tec[tec.length - 1] + '\n\n' + txt[31][7]);
- document.formular.T2.select();
- document.formular.T2.focus();
- return false;
- }
- }
-
- if (/^([_a-z0-9- .]+)$/i.test(teb[k]) == false)
- {
- alert(teb[k] + '\n\n' + txt[28][23]);
- document.formular.T2.select();
- document.formular.T2.focus();
- return false;
- }
- }
- }
- else
- {
- var tea = f2.split('\\');
-
- if (f2.substr(0, 2) != '\\\\')
- {
- if (/^([c-z])+([:])$/i.test(tea[0]) == false)
- {
- alert(tea[0] + '\n\n' + txt[28][22]);
- document.formular.T2.select();
- document.formular.T2.focus();
- return false;
- }
- }
-
- var z = (f2.substr(0, 2) != '\\\\') ? 1 : 2;
-
- for (k = z; k < tea.length; k++)
- {
- if (tea[k].indexOf('"') != -1)
- {
- if ((tea[k].charAt(0) != '"') || (tea[k].charAt(tea[k].length - 1) != '"'))
- {
- alert(txt[29][14] + '\n\n' + tea[k]);
- document.formular.T2.select();
- document.formular.T2.focus();
- return false;
- }
- }
-
- var x = (tea[k].charAt(0) != '"') ? 0 : 1;
- var teb = tea[k].slice(x, tea[k].length - x);
-
- if (k == tea.length-1)
- {
- var tec = teb.split('.');
-
- if (/(^exe$)|(^com$)|(^dll$)/i.test(tec[tec.length - 1]) == false)
- {
- alert(teb + ' --> ' + tec[tec.length - 1] + '\n\n' + txt[31][7]);
- document.formular.T2.select();
- document.formular.T2.focus();
- return false;
- }
- }
-
- if (/^([_a-z0-9- .]+)$/i.test(teb) == false)
- {
- alert(teb + '\n\n' + txt[28][23]);
- document.formular.T2.select();
- document.formular.T2.focus();
- return false;
- }
- }
- }
- }
-
- return true;
- }