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

  1. function feld_disabled(seite)
  2. {
  3.     with (document.formular)
  4.     {
  5.         var c1 = C1.checked;
  6.  
  7.         if (seite == 'responder')
  8.             S1.disabled = (c1) ? false : true;
  9.  
  10.         if (seite == 'umleitung')
  11.         {
  12.             if (c1)
  13.             {
  14.                 T1.disabled = false;
  15.                 D3.disabled = false;
  16.             }
  17.             else
  18.             {
  19.                 T1.disabled = true;
  20.                 D3.disabled = true;
  21.             }
  22.         }
  23.     }
  24. }
  25.  
  26. /**/
  27.  
  28. function taste()
  29. {
  30.     with (document.formular)
  31.         page.value = parent.header.document.dummy.page.value;
  32. }
  33.  
  34. /**/
  35.  
  36. function test_email()
  37. {
  38.     var f1 = document.formular.T1;
  39.  
  40.     if (f1.value.search(/janaserver/i) != -1)
  41.     {
  42.         alert(txt[41][26]);
  43.         f1.select();
  44.         f1.focus();
  45.         return false;
  46.     }
  47.  
  48.     if (f1.value.search(/\*{10}/) != -1)
  49.     {
  50.         var repl = f1.value.replace(/\*{10}/, 'janaserver');
  51.         f1.value = repl;
  52.     }
  53.  
  54.     return true;
  55. }
  56.  
  57. /**/
  58.  
  59. function send1()
  60. {
  61.     parent.header.document.dummy.page.value = '';
  62.  
  63.     with (document.formular)
  64.     {
  65.         S1.disabled = (C1.checked || (S1.value != '')) ? false : true;
  66.         submit();
  67.     }
  68. }
  69.  
  70. /**/
  71.  
  72. function send2()
  73. {
  74.     if (pruefen())
  75.     {
  76.         parent.header.document.dummy.page.value = '';
  77.  
  78.         var email = document.dummy.empf.value;
  79.  
  80.         with (document.formular)
  81.         {
  82.             if (!C1.checked && (email != '') && (T1.value != ''))
  83.                 T1.value = email;
  84.  
  85.             T1.disabled = false;
  86.             D3.disabled = false;
  87.  
  88.             submit();
  89.         }
  90.     }
  91. }
  92.  
  93. /**/
  94.  
  95. function pruefen()
  96. {
  97.     with (document.formular)
  98.     {
  99.         var f0 = org.value;
  100.  
  101.         if (C1.checked)
  102.         {
  103.             if (!test_email())
  104.                 return false;
  105.  
  106.             if (f0 == T1.value)
  107.             {
  108.                 alert(txt[4][5]);
  109.                 T1.select();
  110.                 T1.focus();
  111.                 return false;
  112.             }
  113.  
  114.             if (T1.value != '')
  115.             {
  116.                 if (/^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@([a-zA-Z0-9-├í├á─â├ó├Ñ├ñ├ú─à─ü├ª─ç─ë─ì─ï├º─Å─æ├⌐├¿─ò├¬─¢├½─ù─Ö─ô─ƒ─¥─í─ú─Ñ─º├¡├¼─¡├«├»─⌐─»─½─▒─╡─╖─║─╛─╝┼é┼ä┼ê├▒┼å┼ï├│├▓┼Å├┤├╢┼æ├╡├╕┼ì┼ô─╕┼ò┼Ö┼ù┼¢┼¥┼í┼ƒ┼Ñ┼ú┼º├║├╣┼¡├╗┼»├╝┼▒┼⌐┼│┼½┼╡├╜┼╖├┐┼║┼╛┼╝├░├╛]+\.)+([a-zA-Z0-9]+)$/.test(T1.value) == false)
  117.                 {
  118.                     alert(txt[41][26]);
  119.                     T1.select();
  120.                     T1.focus();
  121.                     return false;
  122.                 }
  123.             }
  124.         }
  125.         else
  126.         {
  127.             var fe = new Array('T1');
  128.             var va = '\' " ,';
  129.             var rx = new RegExp('[\'",]', '');
  130.  
  131.             for (var i = 0; i < fe.length; i++)
  132.             {
  133.                 var ei = elements[fe[i]];
  134.  
  135.                 if (rx.test(ei.value))
  136.                 {
  137.                     alert(txt[5][7] + va + txt[5][8]);
  138.                     ei.disabled = false;
  139.                     ei.select();
  140.                     ei.focus();
  141.                     return false;
  142.                 }
  143.             }
  144.         }
  145.     }
  146.  
  147.     return true;
  148. }