// (C) vwittich.de

   function bg(){
   if(screen.width <= 800){ document.getElementsByTagName("body")[0].background = 'images/hintergrund800.jpg'; }
   else {
     if(screen.width <= 1024){ document.getElementsByTagName("body")[0].background = 'images/hintergrund1024.jpg'; }
     else {
       if(screen.width <= 1280){ document.getElementsByTagName("body")[0].background = 'images/hintergrund1280.jpg'; }
       else {
         if(screen.width <= 1280){ document.getElementsByTagName("body")[0].background = 'images/hintergrund1280.jpg'; }
         else {
           if(screen.width <= 1400){ document.getElementsByTagName("body")[0].background = 'images/hintergrund1400.jpg'; }
           else {
           document.getElementsByTagName("body")[0].background = 'images/hintergrund.jpg'; }
         }
       }
     }
   }
   }

var ms=navigator.appVersion.indexOf("MSIE");
var ie4=(ms>0)&&(parseInt(navigator.appVersion.substring(ms+5,ms+6))>=4);

function active(f,w){
 if (f == 'on'){
  document.form.what.value = w;
  if (ie4>0){
   document.onmousemove = couser;}
  else{
   document.captureEvents(Event.MOUSEMOVE);
   document.onmousemove = cousernet;
  }
 }
 else {
  w = document.form.what.value;
  document.onmousemove = '';
  if (ie4>0){
   document.all[w].style.left = -50;
   document.all[w].style.top  = -50;}
  else {
   document[w].style.left = -50;
   document[w].style.top  = -50;
  }
 }
}

function couser(){
 w = document.form.what.value;
 document.all[w].style.left=(event.clientX+12);
 document.all[w].style.top=(event.clientY+15+document.body.scrollTop);
 }

function cousernet(){
 w = document.form.what.value;
 for (m=0;m<16;m++){
  document[w].left=(e.pageX)+12;
  document[w].top=(e.pageY)+15;
 }
}

function check() {
if(document.formular.email.value == "ihre@e-mail") {
   document.formular.email.value = "E-mail fehlt!";
   document.formular.email.select();
   return false;
   }
if(document.formular.email.value.indexOf('@') == -1) {
   document.formular.email.focus();
   document.formular.email.select();
   return false;
  }
if(document.formular.nachricht.value == ""){
   document.formular.nachricht.value = "Bitte Ihre Nachricht eingeben!";
   document.formular.nachricht.focus();
   document.formular.nachricht.select();
   return false; }
   document.formular.submit();
}


