  function osubmit()
  {
     a=0;

     if(document.ff.sendername)
     {
         if(document.ff.sendername.value=="") a=1;
         if(document.ff.senderemail.value=="" || document.ff.senderemail.value.search('@') == -1) a=1;
	 	
         if(a==1)
         {
            alert(message);
            return false;
         }
     }
     else
     if(document.ff.purpose)
     {
         if(document.ff.nachname.value=="") a=1;
         if(document.ff.vorname.value=="") a=1;
         if(document.ff.telefongeschaeftlich.value=="") a=1;
         if(document.ff.redaktion.value=="") a=1;
         if(document.ff.purpose.value=="") a=1;
         if(document.ff.email.value=="" || document.ff.email.value.search('@') == -1) a=1;

         if(a==1)
         {
            alert(message);
            return false;
         }
     }
     else   
     if(document.ff.nachname)
     {
         if(document.ff.nachname.value=="") a=1;
         if(document.ff.vorname.value=="") a=1;
         if(document.ff.strasse.value=="") a=1;
         if(document.ff.postleitzahl.value=="") a=1;
         if(document.ff.ort.value=="") a=1;
         //if(document.ff.geschlecht.value=="") a=1;
         //if(document.ff.geburtsdatum.value=="") a=1;
         //if(document.ff.staatsangehoerigkeit.value=="") a=1;
         if(document.ff.telefonprivat.value=="") a=1;
         if(document.ff.email.value=="" || document.ff.email.value.search('@') == -1) a=1;

         if(a==1)
         {
            alert(message);
            return false;
         }
     }

     document.ff.submit();
     return false;
  }
  function popup(n)
  {
      if(n==1)
        alert("Please enter both languages before changing invisibility.");
      return false;
  }

  function nfopen(url,x,y)
  {
      window.open(url,"","width="+x+",height="+y);
      return false;
  }

  function openWin(url,x,y)
  {
      window.open(url,"","width="+x+",height="+y);
  }

  function openpopup(url,x,y)
  {
  	  if(x==0)x=330;
  	  if(y==0)y=430;
          window.open(url,"popup","width="+x+",height="+y+",resizable=no,scrollbars=yes");
	  return false;
  }

function hide (id) {
  var el, windowWidth, windowHeight, elWidth, elHeight, cx, cy;
  if (document.layers) {
    el = document[id];
    windowWidth = window.innerWidth;
    windowHeight = window.innerHeight;
    elWidth = el.document.width;
    elHeight = el.document.height;
  }
  else if (document.all) {
    el = document.all[id];
    windowWidth = document.body.clientWidth;
    windowHeight = document.body.clientHeight;
    elWidth = el.offsetWidth;
    elHeight = el.offsetHeight;
  }
  else if (document.getElementById) {
    el = document.getElementById(id);
    windowWidth = window.innerWidth;
    windowHeight = window.innerHeight;
    elWidth = el.offsetWidth;
    elHeight = el.offsetHeight;
  }
  cx = Math.floor((windowWidth - elWidth) / 2);
  cy = Math.floor((windowHeight - elHeight) / 2);
  if (document.layers) {
    el.left = cx;
    el.top = cy;
    el.visibility = 'hide';
  }
  else if (document.all || document.getElementById) {
    el.style.left = cx + 'px';
    el.style.top = cy + 'px';
    el.style.visibility = 'hidden';
  }
}

var lolo=0;

function init() {
	if(lolo==0)return;

	center("lala");
	
}

function center (id) {
  var el, windowWidth, windowHeight, elWidth, elHeight, cx, cy;
  if (document.layers) {
    el = document[id];
    windowWidth = window.innerWidth;
    windowHeight = window.innerHeight;
    elWidth = el.document.width;
    elHeight = el.document.height;
  }
  else if (document.all) {
    el = document.all[id];
    windowWidth = document.body.clientWidth;
    windowHeight = document.body.clientHeight;
    elWidth = el.offsetWidth;
    elHeight = el.offsetHeight;
  }
  else if (document.getElementById) {
    el = document.getElementById(id);
    windowWidth = window.innerWidth;
    windowHeight = window.innerHeight;
    elWidth = el.offsetWidth;
    elHeight = el.offsetHeight;
  }
  cx = Math.floor((windowWidth - elWidth) / 2)+240;
  cy = Math.floor((windowHeight - elHeight) / 2);
  if (document.layers) {
    el.left = cx;
    //el.top = cy;
    el.visibility = 'show';
  }
  else if (document.all || document.getElementById) {
    el.style.left = cx + 'px';
    //el.style.top = cy + 'px';
    el.style.visibility = 'visible';
  }
}
