/* die eingegebene Emailadresse nochmal nachfragen, ob auch richtig */ 
var testresults
function checkemail(old_email)
{
  var mymail=document.eingabe.email.value;
/*  var filter=/^(\w+(?:\.\w+)*)@((?:\w+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;*/
  var filter=/^([\w\-\.]+)@(([\w\-]{2,}\.)+[\w\-]{2,3})$/i;

  if (mymail=="")           /* Mail ist leer */
  {
    alert('Sie haben keine Email-Adresse angegeben');
    return false;
  }
  if (old_email==mymail)    /* Mail hat sich nicht geaendert */
  {
    return true;
  }
  if (!filter.test(mymail))
  {
    alert('Die eingegebene Email-Adresse kann nicht stimmen');
    return false;
  }
  else
  {  
    ok=null;                /* noch mal nachfragen */
    confirm('Ist das Ihre korrekte Emailadresse ?\nDiese Adresse wird zur Bestätigung Ihrer Bestellung und zur Übermittlung der Daten Ihres Kundenzugangs verwendet !\n'+mymail+'\n\n')?ok=1:ok=0;
    if (ok==1) return true;
    else return false;
  }
}

function checkform(oldemail)    /* Eingabefle Email checken */
{
  if (document.layers||document.getElementById||document.all)
  {
    return checkemail(oldemail)
  }
  else
  {
    return true
  }
}

/** JA NEIN Abfrage ***/
function checkyesno(mytext)
{
  ok=null;
  confirm(mytext)?ok=1:ok=0;
  if (ok==1) return true;
  else return false;
}

/****************************************************************************************************/
/* Btowsertyp ermitteln */
function getbrowser()
{
  isMac  = (navigator.appVersion.indexOf("Mac")!=-1) ? true : false;
  isPC   = (navigator.appVersion.indexOf("Windows")!=-1) ? true : false;
  isUnix = (navigator.appVersion.indexOf("Unix")!=-1) ? true : false;
  
  // Browser
  var ie4=document.all
  var ie5=document.getElementById&&document.all
  var ie6=document.getElementById&&document.all&&(navigator.appVersion.indexOf("MSIE 6.")!=-1)
  
  var ns4=document.layers
  var ns6=document.getElementById&&!document.all
  
  // OS
  if (isMac)
  {
  document.write("Macintosh/");
  }
  if (isPC)
  {
  document.write("PC/");
  }
  if (isUnix)
  {
  document.write("Unix/");
  }
  
  // Browser
  if (ns4)
  {
  document.write("Netscape 4");
  }
  if (ns6)
  {
  document.write("Netscape 6");
  }
  if (ie4 && !ie5 && !ie6)
  {
  document.write("Internet Explorer 4");
  }
  if (ie5 && ie4 && !ie6)
  {
  document.write("Internet Explorer 5");
  }
  if (ie6)
  {
  document.write("Internet Explorer 6");
  }
  if (!ie4 && !ie5 && !ie6 && !ns4 && !ns6)
  {
  document.write("unknown:)");
  }
}

/* sind Cookies aktiv ? */
function cookiesallowed()
{
  if (navigator.cookieEnabled) cookie = "Cookies aktiviert.";
  else cookie = "Cookies nicht aktiviert.";
  document.write(cookie)
}

/* fragt ab, ob vorhanden  */
function checkforavail(str,text)
{
  if(str=="")
  {
    alert(text);
    return false;
  }
  if(str<=0)
  {
    alert(text);
    return false;
  }
  return true;
}


