/*
 status_text()
 checkForm()
 winopen(x,y,path,alter)
 OpenWin(state)
 chooseRes()
 sys_info()

*/

/*--------------------------------------------------------------------------------------------------*/
function status_text(text)
{
 window.status=text;
}
/*--------------------------------------------------------------------------------------------------*/
function checkForm()
{
 var name, email, msg, n=0, e=0, m=0;
 name=document.kontakt.name.value;
 email=document.kontakt.email.value;
 msg=document.kontakt.msg.value;

 if(name=="")n=0;else n=1;
 if(email=="")e=0;else e=1;
 if(msg=="")m=0;else m=1;

 if(n==0 && e==0 && m==0){alert("Bitte geben sie in alle Felder etwas ein."); return false;}
 if(n==0 && e==0 && m==1){alert("Haben sie auch einen Name und eine e-mail Adresse ?"); return false;}
 if(n==0 && e==1 && m==0){alert("Ihr Name und ihre Meinung interessiert mich auch."); return false;}
 if(n==0 && e==1 && m==1){alert("Wie war ihr Name doch gleich ?"); return false;}
 if(n==1 && e==0 && m==0){alert("Und sie wollen mir gar nichts sagen "+document.kontakt.name.value); return false;}
 if(n==1 && e==0 && m==1){alert("Wie lautet ihre e-mail Adresse"); return false;}
 if(n==1 && e==1 && m==0){alert("Jetzt weiss ich ihren Name und ihre Adresse, aber nicht ihre Meinung"); return false;}
 if(n==1 && e==1 && m==1){}

}
/*--------------------------------------------------------------------------------------------------*/
function winopen(x, y, path, alter, title)
{
 var win;

 win=window.open("", 'BildFenster', 'status=0, location=0, directories=0,resizable=0, width='+(x)+' ,height='+(y)+', top=10, left=10');
 
 win.document.write('<HTML>');
 win.document.write('<HEAD>');
 win.document.write('<title>'+title+'<\/title>');
 win.document.write('<\/HEAD>');
 win.document.write('<BODY TOPMARGIN="0" LEFTMARGIN="0" link="#FF0000" vlink="#00FF00" alink="#0000FF>\n');
 win.document.write('<div align="left">');
 win.document.write('<a href="javascript:window.close()">');
 win.document.write('<img border="0" src="'+path+'" width="'+x+'" height="'+y+'" alt="'+alter+'" title="close window" \/>');
 win.document.write('<\/a>');
 win.document.write('<\/div>');
 win.document.write('<\/BODY>');
 win.document.write('<\/HTML>');
 
 win.document.close();
}
/*--------------------------------------------------------------------------------------------------*/

function OpenWin(state)  // Öffnet ein Fenster mit den entsprechenden Einstellungen
{

 if(screen.width == 640 && screen.height == 480){
   alert("Stellen sie eine höhere Auflösung ein ! (minimum : 800*600)");
 }
 else{
   var win;
   switch(state)
    {
     case 1:{win = window.open("index2.html",'HauptFenster','width=1024,height=768,fullscreen=1');
     win.focus();
     }break;
     case 2:{win = window.open("index2.html",'HauptFenster','left=0,top=0,width=1015,height=581,fullscreen=0,toolbar=1,menubar=1,location=1,status=1,resizable=1');
     win.focus();
     }break;
     case 3:{win = window.open("index2.html",'HauptFenster','width=800,height=600,fullscreen=1');
     win.focus();
     }break;
     case 4:{win = window.open("index2.html",'HauptFenster','left=0,top=0,width=800,height=600,fullscreen=0,toolbar=1,menubar=1,location=1,status=1,resizable=1');
     win.focus();
     }break;
    }

 }
}
/*--------------------------------------------------------------------------------------------------*/

function chooseRes()
{
 var win;
 if(screen.width == 640 && screen.height == 480){
   alert("Sorry ihre Auflösung ist zu klein (minimum : 800*600)");
 }
 else{

   if(screen.width == 800 && screen.height == 600){
     win = window.open("index2.html",'mainwindow','left=0,top=0,width= 800,height=600,fullscreen=0,toolbar=1,menubar=1,location=1,status=1,resizable=0');
     win.focus();
   }
   if(screen.width == 1024 && screen.height == 768){
     win = window.open("index2.html",'mainwindow','left=0,top=0,width=1015,height=581,fullscreen=1,toolbar=1,menubar=1,location=1,status=1,resizable=0');
     win.focus();
   }
   if(screen.width >= 1024 && screen.height >= 768){
     win = window.open("index2.html",'mainwindow','left=0,top=0,width=1015,height=581,fullscreen=0,toolbar=1,menubar=1,location=1,status=1,resizable=0');
     win.focus();
   }
 }
}
/*--------------------------------------------------------------------------------------------------*/

function sys_info()
{
 alert("\n Auflösung     \t:  " +screen.width+ "*" +screen.height+ " Pixel"+
       "\n akt. Aflösung \t:  " +screen.availWidth+ "*" +screen.availHeight+ " Pixel"+
       "\n Farbtiefe     \t:  " +screen.colorDepth+ " Bit"+
       "\n OS            \t:  " +navigator.platform+
       "\n Browser       \t:  " +navigator.appName
      );
}
/*--------------------------------------------------------------------------------------------------*/

function click()
 {
  document.onmousedown=click
 }
/*--------------------------------------------------------------------------------------------------*/

if(document.images)
 {
  var b_1 = new Image(); b_1.src = "bilder/b_1a.jpg"; var b_1a = new Image(); b_1a.src = "bilder/b_1.jpg";
  var b_2 = new Image(); b_2.src = "bilder/b_2a.jpg"; var b_2a = new Image(); b_2a.src = "bilder/b_2.jpg";
  var b_3 = new Image(); b_3.src = "bilder/b_3a.jpg"; var b_3a = new Image(); b_3a.src = "bilder/b_3.jpg";
  var b_4 = new Image(); b_4.src = "bilder/b_4a.jpg"; var b_4a = new Image(); b_4a.src = "bilder/b_4.jpg";
  var b_5 = new Image(); b_5.src = "bilder/b_5a.jpg"; var b_5a = new Image(); b_5a.src = "bilder/b_5.jpg";
  var b_6 = new Image(); b_6.src = "bilder/b_6a.jpg"; var b_6a = new Image(); b_6a.src = "bilder/b_6.jpg";
  var b_7 = new Image(); b_7.src = "bilder/b_7a.jpg"; var b_7a = new Image(); b_7a.src = "bilder/b_7.jpg";
  var b_8 = new Image(); b_8.src = "bilder/b_8a.jpg"; var b_8a = new Image(); b_8a.src = "bilder/b_8.jpg";
 }
else
 {
  alert("Sie haben einen zu alten Browser !");
 }
/*--------------------------------------------------------------------------------------------------*/

function pass()
{

 if(document.form1.log.value=="test" && document.form1.pwd.value=="test")
  {
   alert("Willkommen im Secret Bereicht");
   location.href="secret.html"
   return 0;
  }

 if(document.form1.log.value=="x" && document.form1.pwd.value=="x")
  {
   alert("richtig");
   location.href="secret.html"
   return 0;
  }

 if(document.form1.log.value=="x" && document.form1.pwd.value=="x")
  {
   alert("richtig");
   location.href="secret.html"
   return 0;
  }

 if(document.form1.log.value=="x" && document.form1.pwd.value=="x")
  {
   alert("richtig");
   location.href="secret.html"
   return 0;
  }
 else
  {
   alert("Ihr Loginname oder Password ist falsch ! \n Wenn sie noch keins haben können sie hier eins bekommen !");
   location.href="kontakt.html"
   return 0;
  }
}
/*--------------------------------------------------------------------------------------------------*/


/*--------------------------------------------------------------------------------------------------*/

