var ns = (document.layers) ? true : false;
var ie = (document.all) ? true : false;
var mz = (document.getElementById && (window.innerWidth > 0)) ? true : false; //Mozilla/Opera//Netscape6
if (mz) {ie = false;}



if (ns) {
  document.write("<STYLE type='text/javascript'>");

  document.write("ids.logo.borderWidths('1px','0px','1px','0px');");
  document.write("ids.inhalt.borderWidths('0px','0px','0px','0px');");

  document.write("tags.h1.margins('16px','0','0','0');");
  document.write("tags.h1.paddings('0','16px','0','0');");
  document.write("contextual(ids.inhalt, tags.h2).margins('16px','0','0','0');");
  document.write("contextual(ids.inhalt, tags.h2).paddings('0','16px','0','0');");
  document.write("tags.h3.margins('16px','0','0','0');");
  document.write("tags.h3.paddings('0','16px','0','0');");
  document.write("tags.h4.margins('16px','0','0','0');");
  document.write("tags.h4.paddings('0','16px','0','0');");

  document.write("ids.information.backgroundColor = 'C3DFFF';");
  document.write("ids.information.width = '220';");

  document.write("contextual(ids.information, tags.p).paddings('0','0','0','0');");
  document.write("contextual(ids.information, tags.p).margins('0','0','0','20');");
  document.write("contextual(ids.information, tags.p).backgroundColor = 'C3DFFF';");
  document.write("contextual(ids.information, tags.p).fontFamily = 'verdana,arial,helvetica,sans-serif';");
  document.write("contextual(ids.information, tags.p).fontSize = '14';");
  document.write("contextual(ids.information, tags.p).color = 'black';");
  document.write("contextual(ids.information, tags.h2).paddings('0','0','0','0');");
  document.write("contextual(ids.information, tags.h2).margins('0','0','0','20');");
  document.write("contextual(ids.information, tags.h2).backgroundColor = 'C3DFFF';");
  document.write("contextual(ids.information, tags.h2).fontFamily = 'verdana,arial,helvetica,sans-serif';");
  document.write("contextual(ids.information, tags.h2).fontSize = '14';");
  document.write("contextual(ids.information, tags.h2).color = 'black';");

  document.write("ids.suche.paddings('0','7','0','7');");
  document.write("ids.suche.borderWidths('1','0','1','0');");
  document.write("ids.suche.borderColor = 'A3AAB0';");
  document.write("ids.suche.width = '220';");
  document.write("ids.suche.backgroundColor = 'D7E9FF';");

  document.write("ids.w3c.borderWidths('1px','1px','1px','1px');");
  document.write("ids.w3c.borderColor = 'EAF3FE';");
  document.write("ids.w3c.width = '200';");
  document.write("ids.w3c.backgroundColor = 'D7E9FF';");

  document.write("</STYLE>");
  }

function fensterBreite() {
  if (window.innerWidth) return window.innerWidth;
  else if (document.body && document.body.offsetWidth) return document.body.offsetWidth;
  else return 0;
  }

function fensterHoehe() {
  if (window.innerHeight) return window.innerWidth;
  else if (document.body && document.body.offsetHeight) return document.body.offsetHeight;
  else return 0;
  }

function neuLaden() {
  if ((breite != fensterBreite()) || (hoehe != fensterHoehe())) window.history.go(0);
  }

if (!window.breite && ns) {
  window.onresize = neuLaden;
  breite = fensterBreite();
  hoehe = fensterHoehe();
}

function wiehoch() {
    var links = 0;
    var rechts = 0;
    var hoehe = 0;

    if(ie) {
        links = document.all.information.offsetHeight + 450;
        rechts = document.all.inhalt.offsetHeight;
        if(links > rechts) {
            hoehe = links;
            document.all.inhalt.style.height = hoehe;
            }
        }
        else if(mz) {
            links = document.getElementById("information").clip.height;
            rechts = document.getElementById("inhalt").height;
            if(links > rechts) {
                hoehe = links;
                document.getElementById("inhalt").style.height = hoehe;
                }
            }
    }
		
/**  check mailform  **/
function chkFormular(x){	
     if(document.forms[0].Name.value == ""){
	 	alert("Bitte füllen Sie das Feld \"Name\" aus!");
        document.forms[0].Name.focus();
       return false;
      }
     if(document.forms[0].Betreff.value == ""){
	 	alert("Bitte füllen Sie das Feld \"Betreff\" aus!");
        document.forms[0].Betreff.focus();
       return false;
      }	

    /* if((document.forms[0].Email.value.indexOf('@') == -1)||
	    (document.forms[0].Email.value.indexOf('.') == -1)){
		alert("Bitte gültige E-Mail-Adresse eingeben!");
        document.forms[0].Email.focus();
       return false;
	  }*/
    if(document.forms[0].Mailtext.value == ""){
	 	alert("Sie haben noch keine Nachricht in den Bereich \"Text Ihrer Nachricht\" geschrieben!");
     	 document.forms[0].Mailtext.focus();
       return false;
      }
		if((document.forms[0].stringCaptcha.value == "") ){
				alert("Bitte Code eingegeben");
				document.forms[0].stringCaptcha.focus();
				return false;
		}			
return (true);
}

