home *** CD-ROM | disk | FTP | other *** search
/ Cricao de Sites - 650 Layouts Prontos / WebMasters.iso / Servidores / JanaSetup.exe / admin / pruefen_js / pop3_servers.js < prev    next >
Encoding:
Text File  |  2006-05-08  |  3.8 KB  |  189 lines

  1. function leeren()
  2. {
  3.     document.formular.edit.value = '';
  4.     document.formular.Item.value = '';
  5. }
  6.  
  7. /**/
  8.  
  9. function feld_disabled()
  10. {
  11.     with (document.formular)
  12.     {
  13.         var c2 = C2.checked;
  14.  
  15.         if (c2 == true)
  16.         {
  17.             C3.disabled = false;
  18.             T2.disabled = false;
  19.             T1.disabled = false;
  20.             T3.disabled = false;
  21.         }
  22.         else
  23.         {
  24.             C3.disabled = true;
  25.             T2.disabled = true;
  26.             T1.disabled = true;
  27.             T3.disabled = true;
  28.         }
  29.     }
  30. }
  31.  
  32. /**/
  33.  
  34. function Abfrage(edi, ser)
  35. {
  36.     var Check = confirm(txt[20][31]);
  37.  
  38.     with (document.formular)
  39.     {
  40.         if ((Check == true) && (pruefen() == true))
  41.         {
  42.             var c2 = C2.checked;
  43.  
  44.             C3.disabled = false;
  45.             T2.disabled = ((c2 == true) || (T2.value == '')) ? false : true;
  46.             T1.disabled = ((c2 == true) || (T1.value == '')) ? false : true;
  47.             T3.disabled = ((c2 == true) || (T3.value == '')) ? false : true;
  48.  
  49.             edit.value = '' + edi + '';
  50.             Item.value = '' + ser + '';
  51.  
  52.             submit();
  53.         }
  54.         else
  55.         {
  56.             edit.value = '';
  57.             Item.value = '';
  58.         }
  59.     }
  60. }
  61.  
  62. /**/
  63.  
  64. function edit(edi, ser)
  65. {
  66.     if (pruefen() == true)
  67.     {
  68.         with (document.formular)
  69.         {
  70.             var c2 = C2.checked;
  71.  
  72.             C3.disabled = false;
  73.             T2.disabled = ((c2 == true) || (T2.value == '')) ? false : true;
  74.             T1.disabled = ((c2 == true) || (T1.value == '')) ? false : true;
  75.             T3.disabled = ((c2 == true) || (T3.value == '')) ? false : true;
  76.  
  77.             edit.value = '' + edi + '';
  78.             Item.value = '' + ser + '';
  79.  
  80.             submit();
  81.         }
  82.     }
  83. }
  84.  
  85. /**/
  86.  
  87. function send()
  88. {
  89.     if (pruefen() == true)
  90.     {
  91.         with (document.formular)
  92.         {
  93.             var c2 = C2.checked;
  94.  
  95.             C3.disabled = false;
  96.             T2.disabled = ((c2 == true) || (T2.value == '')) ? false : true;
  97.             T1.disabled = ((c2 == true) || (T1.value == '')) ? false : true;
  98.             T3.disabled = ((c2 == true) || (T3.value == '')) ? false : true;
  99.  
  100.             submit();
  101.         }
  102.     }
  103. }
  104.  
  105. /**/
  106.  
  107. function pruefen()
  108. {
  109.     var f1 = document.formular.T1.value;
  110.     var f2 = document.formular.T2.value;
  111.     var f3 = document.formular.T3.value;
  112.     var c2 = document.formular.C2.checked;
  113.     var fe = new Array('T2');
  114.     var va = new Array('\'', ',');
  115.  
  116.     for (i = 0; i < fe.length; i++)
  117.     {
  118.         for (j = 0; j < va.length; j++)
  119.         {
  120.             var ei = document.formular.elements[fe[i]];
  121.  
  122.             if (ei.value.indexOf(va[j]) != -1)
  123.             {
  124.                 alert(txt[5][7] + va[j] + txt[5][8]);
  125.                 document.formular.edit.value = '';
  126.                 document.formular.Item.value = '';
  127.                 ei.select();
  128.                 ei.focus();
  129.                 return false;
  130.             }
  131.         }
  132.     }
  133.  
  134.     if (c2 == true)
  135.     {
  136.         if (f2.indexOf('"') != -1)
  137.             var ganz = (f2.match(/\"/g).length) % 2;
  138.         else
  139.             var ganz = 0;
  140.  
  141.         if (ganz != 0)
  142.         {
  143.             alert(txt[20][43]);
  144.             document.formular.edit.value = '';
  145.             document.formular.Item.value = '';
  146.             document.formular.T2.select();
  147.             document.formular.T2.focus();
  148.             return false;
  149.         }
  150.         else
  151.         {
  152.             var z   = (f2.charAt(0) != '"') ? 0 : 1;
  153.             var LW1 = f2.charAt(z);
  154.             var LW2 = f2.substr((1 + z), 2);
  155.  
  156.             if (((f2.substr(z, 2) != '\\\\') && ((/^([c-z])$/i.test(LW1) != true) || (LW2 != ':\\'))) || (f2.indexOf('.') == -1))
  157.             {
  158.                 alert(txt[19][9] + txt[43][13] + txt[20][37]);
  159.                 document.formular.edit.value = '';
  160.                 document.formular.Item.value = '';
  161.                 document.formular.T2.select();
  162.                 document.formular.T2.focus();
  163.                 return false;
  164.             }
  165.         }
  166.  
  167.         if ((f1 != -1) && ((f1 < 1) || (f1.match(/\D/) != null)))
  168.         {
  169.             alert(txt[19][9] + txt[43][14] + txt[43][15]);
  170.             document.formular.edit.value = '';
  171.             document.formular.Item.value = '';
  172.             document.formular.T1.select();
  173.             document.formular.T1.focus();
  174.             return false;
  175.         }
  176.  
  177.         if ((f3 == '') || (f3.match(/\D/) != null))
  178.         {
  179.             alert(txt[19][9] + txt[43][16] + txt[43][15]);
  180.             document.formular.edit.value = '';
  181.             document.formular.Item.value = '';
  182.             document.formular.T3.select();
  183.             document.formular.T3.focus();
  184.             return false;
  185.         }
  186.     }
  187.  
  188.     return true;
  189. }