
  function textCounter (field, countfield, maxlimit)

  {

   if (field.value.length > maxlimit)

    field.value = field.value.substring(0, maxlimit);

   else 

    countfield.value = maxlimit - field.value.length;

  }

 function newWindow (mypage,myname,w,h,features)

  {

  if(screen.width)

   {

    var winl = (screen.width-w)/2;
    var wint = (screen.height-h)/2;

   }

else

   {

    winl = 0;wint =0;

   }

  if (winl < 0) winl = 0;
  if (wint < 0) wint = 0;

  var settings = 'height=' + h + ',';
  settings += 'width=' + w + ',';
  settings += 'top=' + wint + ',';
  settings += 'left=' + winl + ',';
  settings += features;
  settings += ' scrollbars=yes ';

  win = window.open(mypage,myname,settings);

  win.window.focus();

  }

  function checkemail (email)

  {

   if ( !( email.indexOf("@") > 1 && email.indexOf(".") > 1 ) && email.length!=0 )

    {

      alert("Sorry, email is incorrect!");
      document.forms[0].mail.value="";
      document.forms[0].mail.focus();

    }

  }

   function ContactWindow()
  {
   MeinFenster =
   window.open("contact.html", "contact", "width=340,height=150,dependent=yes,resizable=no,screenX=200,screenY=200");
   MeinFenster.focus();
  }

   function AccountWindow()
  {
   MeinFenster =
   window.open("accounts.html", "contact", "width=400,height=450,dependent=yes,resizable=no,screenX=200,screenY=200");
   MeinFenster.focus();
  }
