home *** CD-ROM | disk | FTP | other *** search
/ Cricao de Sites - 650 Layouts Prontos / WebMasters.iso / Servidores / JanaSetup.exe / admin / pruefen_js / bcc_edit.js < prev    next >
Encoding:
Text (UTF-16)  |  2006-05-08  |  2.7 KB  |  71 lines

  1. function test_email()
  2. {
  3.     var f1 = document.formular.S1;
  4.  
  5.     if (f1.value.search(/janaserver/i) != -1)
  6.     {
  7.         alert(txt[41][26]);
  8.         f1.select();
  9.         f1.focus();
  10.         return false;
  11.     }
  12.  
  13.     if (f1.value.search(/\*\*\*\*\*\*\*\*\*\*/) != -1)
  14.     {
  15.         var repl = f1.value.replace(/\*\*\*\*\*\*\*\*\*\*/, 'janaserver');
  16.         f1.value = repl;
  17.     }
  18.  
  19.     return true;
  20. }
  21.  
  22. /**/
  23.  
  24. function send()
  25. {
  26.     if ((pruefen() == true) && (test_email() == true))
  27.         document.formular.submit();
  28. }
  29.  
  30. /**/
  31.  
  32. function pruefen()
  33. {
  34.     var d1 = document.formular.D1.options[document.formular.D1.selectedIndex].value;
  35.     var li = document.formular.S1.value;
  36.     var la = li.split(',');
  37.  
  38.     if (d1 == '')
  39.     {
  40.         alert(txt[41][26]);
  41.         document.formular.D1.focus();
  42.         return false;
  43.     }
  44.  
  45.     for (a = 0; a < la.length; a++)
  46.     {
  47.         if (d1 == la[a])
  48.         {
  49.             alert(txt[4][5]);
  50.             document.formular.S1.select();
  51.             document.formular.S1.focus();
  52.             return false;
  53.         }
  54.     }
  55.  
  56.     for (b = 0; b < la.length; b++)
  57.     {
  58.         if (la[b].search(/\*\*\*\*\*\*\*\*\*\*/) == -1)
  59.         {
  60.             if (/^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@([a-zA-Z0-9-áàăâåäãąāæćĉčċçďđéèĕêěëėęēğĝġģĥħíìĭîïĩįīıĵķĺľļłńňñņŋóòŏôöőõøōœĸŕřŗśŝšşťţŧúùŭûůüűũųūŵýŷÿźžżðþ]+\.)+([a-zA-Z0-9]+)$/.test(la[b]) == false)
  61.             {
  62.                 alert(la[b] + '\n\n' + txt[41][26]);
  63.                 document.formular.S1.select();
  64.                 document.formular.S1.focus();
  65.                 return false;
  66.             }
  67.         }
  68.     }
  69.  
  70.     return true;
  71. }