<!--

// Browserdefinitionen

NS4=false;

IE4=false;

NS6=false;

if(document.layers) NS4=true;

if(document.all) IE4=true;

if(document.getElementById) NS6=true;	

	

// Funktion startet direkt aufgerufenen Seiten mit Rahmenansicht

if ( (self.location.pathname!="/page.php") && 

(self.location.pathname!="/search.php") && 

(self.location.pathname!="/suchergebnisse.php") && 

(self.location.pathname!="/netzrechner.php") && 

(self.location.pathname!="/esslingen/kontakt/search.php") &&

(self.location.pathname!="/sitemap.php") ) {

	page = self.location.pathname;

	weblicdat = page.indexOf("wTmp"); // wird Datei aus Weblication aufgerufen?

	if (weblicdat<0) {

/*		if (self.name != "DOMAINFRAME") window.top.location.href = '/?page='+page;

		else {*/

			url = '/page.php?page='+page;

			self.location.replace(url);

//		}

	}

}

/*else if ((self.location.pathname=="/page.php") && (self.name!="DOMAINFRAME")) {

	page = self.location.search;

	url = '/'+page;

	top.location.replace(url);

}*/



// Navigations- und Seitenaufruf

function showNavpoint(id, url){

	if(url != ""){

		self.location.href = "/page.php?page="+url+"&amp;navid="+id;

//		self.location.href = url;

	}

}



function checkSearch(){

      if(document.frmSearchFull.term.value == ""){

        alert("Sie m?ssen einen Suchbegriff eingeben!");

      }

      document.frmSearchFull.submit();

 }



// Funktion zum öffnen der Druckansicht im PopUp-Fenster

function drucken(page)

{

	url = "/druck.php?page="+page;

	window.open(url,'Druckansicht','width=480,height=550,scrollbars=yes,toolbar=no');

}



// Funktion zum öffnen eines Formulars, über das eine Seite versendet werden kann

function senden(page)

{

	url = "/send.php?page="+page;

	window.open(url,'Seitesenden','width=570,height=550,scrollbars=yes,toolbar=no');

}



// Funktion zum Bookmark setzen

function bookmark(page)

{

	bookmarkurl="http://swe.gipsprojekt.de/"+page;

	bookmarktitle=document.title;

	if (document.all) {

		window.external.AddFavorite(bookmarkurl,bookmarktitle)

	} else alert("STRG + D drücken"); 

}	



// Funktionen zum Aufruf von PopUp-Fenstern



function openFormcenter(service,email){

w=800;

h=600;

url="/formcenter.php?service="+service+"&email="+email;

popup = window.open(url, 'PopUp1', 'width='+w+',height='+h+',toolbar=yes,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes');

//popup.resizeTo(w, h);

popup.focus();

}



function PopUp(url,w,h)

{

h=h+70;

w=w+50;

popup = window.open(url, 'PopUp2', 'width='+w+',height='+h+',scrollbars=yes,resizable=yes');

popup.resizeTo(w, h);

popup.focus();

}



function openWin(url,w,h){

popup = window.open(url, 'PopUp3', 'width='+w+',height='+h+',toolbar=yes,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes');

}



function openWinRE(url,w,h){

popup = window.open(url, 'PopUp4', 'width='+w+',height='+h+',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes');

}



// Und noch eine PopUp-Funktion für die alten SWE-Seiten

function openPopup(url){

 window.open(url, "popup", "scrollbars=yes,resizable=yes,menubar=yes,location=no,width=600,height=480");

}



function login()

{

gekowin = open('', 'gekowin', 'width=850,height=680,scrollbars=no,hotkeys=no,locationbar=no,menubar=no,resizable=yes,status=no');

document.forms[0].target="gekowin";

return true;

}



function openGeko()

{

gekowin = open('http://88.79.72.131/cis', 'gekowin', 'width=850,height=680,scrollbars=no,hotkeys=no,locationbar=no,menubar=no,resizable=yes,status=no');

}



// PopUp-Funktion für Routenplaner

function openRoute(url) {

popup = window.open(url,'Anfahrt','width=652,height=540,location=no,menubar=no,toolbar=no,status=no,resizable=yes,scrollbars=yes');

}



// Bei IE für schöne Optik sorgen

function formOptik() {

	if (document.all) {

	 for (var _i=0; _i < document.forms[1].length; _i++) {

	  if ((document.forms[1].elements[_i].type=="button") || (document.forms[1].elements[_i].type=="submit") || (document.forms[1].elements[_i].type=="reset")) document.forms[1].elements[_i].className="formbutton";

  	  else if (document.forms[1].elements[_i].type!="hidden") document.forms[1].elements[_i].className="formfelder"; 

	 }

	}

}

// Neue Funktion zum Setzen von Formularwerten (Werte kommen aus einer PHP-Session), Aufruf in page.php

function formGetvalues(frm,key,val) {

	if (frm.elements[key]) {

//		alert(key +": "+frm.elements[key].type);

		if ((frm.elements[key].type != "radio") && (frm.elements[key].type != "checkbox") && (frm.elements[key].type != undefined)) frm.elements[key].value=val;

		else {

			if (frm.elements[key].type == "checkbox") frm.elements[key].checked = true;

			else {

				nr = frm.elements[key].length;

				for (i=0;i<nr;i++) {

					if (frm.elements[key][i].value == val) frm.elements[key][i].click();

//					alert(frm.elements[key][i].value +"=="+ val);

				}

			}

		}

	}

}



function initLook() {

// Bei IE für schöne Optik sorgen

	if (document.all) {

	 var s = document.getElementsByTagName('input');

	 for (i=0; i < s.length; i++) {

	  if (s[i].type=="image") s[i].className=""; 

  	  else if ((s[i].type=="button") || (s[i].type=="submit") || (s[i].type=="reset")) s[i].className="formbutton";

	  else if (s[i].className=="") s[i].className="formfelder"; 

	 }

	}

	

// Damit Seite 100 % Höhe von Fenster

	if (IE4) {

		if (document.body.scrollHeight + 20 < document.body.offsetHeight) winh3 = document.body.offsetHeight - 225;

		else winh3 = document.body.scrollHeight - 225;

//		if (winh<400) winh=400;

		document.all.nav.style.height = winh3;

		document.all.nav.style.visibility = "visible";

	}

	else {

		if (document.body.scrollHeight + 20 <= window.innerHeight) winh3 = window.innerHeight - 225;

		else winh3 = document.body.scrollHeight - 225;

//		if (winh<400) winh=400;

		if (NS4) {

			document.layers['nav'].height = winh3;

			document.layers['nav'].visibility = "show";

		}

		if (NS6) {

			document.getElementById('nav').style.height = winh3;

			document.getElementById('nav').style.visibility = "visible";

		}

    }

	

	if (IE4) {

		if (document.body.scrollHeight + 20 < document.body.offsetHeight) winh2 = document.body.offsetHeight - 146;

		else winh2 = document.body.scrollHeight - 146;

//		if (winh<400) winh=400;

		document.all.info.style.height = winh2;

		document.all.info.style.visibility = "visible";

	}

	else {

		if (document.body.scrollHeight + 20 <= window.innerHeight) winh2 = window.innerHeight - 146;

		else winh2 = document.body.scrollHeight - 146;

//		if (winh<400) winh=400;

		if (NS4) {

			document.layers['info'].height = winh2;

			document.layers['info'].visibility = "show";

		}

		if (NS6) {

			document.getElementById('info').style.height = winh2;

			document.getElementById('info').style.visibility = "visible";

		}

    }

	

	if (IE4) {

		if (document.body.scrollHeight + 20 < document.body.offsetHeight) winh1 = document.body.offsetHeight - 10;

		else winh1 = document.body.scrollHeight;

		document.all.Rahmen.style.height = winh1;

		document.all.Rahmen.style.visibility = "visible";

	}

	else {

		if (document.body.scrollHeight + 20 <= window.innerHeight) winh1 = window.innerHeight - 10;

		else winh1 = document.body.scrollHeight;

		if (NS4) {

			document.layers['Rahmen'].height = winh1;

			document.layers['Rahmen'].visibility = "show";

		}

		if (NS6) {

			document.getElementById('Rahmen').style.height = winh1;

			document.getElementById('Rahmen').style.visibility = "visible";

		}

    }

}



save_kopfbild="";

// Hilighten der Kopfbilder

function hlkopfbild(rubrik) {

	if (IE4) {

		if (rubrik=="") document.all.kopfbild.style.backgroundImage = save_kopfbild;

		else {

			save_kopfbild=document.all.kopfbild.style.backgroundImage;

			document.all.kopfbild.style.backgroundImage = "url(/esslingen/img/kopf/" + rubrik + ".jpg)";

		}

	}

	else {

		if (rubrik=="") kopfbild = save_kopfbild;

		else kopfbild = "url(/esslingen/img/kopf/" + rubrik + ".jpg)";

		if (NS4) {

			save_kopfbild=document.layers['kopfbild'].backgroundImage;

			document.layers['kopfbild'].backgroundImage = kopfbild;

		}

		else {

			save_kopfbild=document.getElementById('kopfbild').style.backgroundImage;

			document.getElementById('kopfbild').style.backgroundImage = kopfbild;

		}

	}

}



function MM_preloadImages() { 

//v3.0  

	var d=document; 

	if(d.images){

	 if(!d.MM_p) d.MM_p=new Array();    

	 var i,j=d.MM_p.length,a=MM_preloadImages.arguments; 

	 for(i=0; i<a.length; i++) {

	  if (a[i].indexOf("#")!=0){

	   d.MM_p[j]=new Image; 

	   d.MM_p[j++].src=a[i];

	  }

	 }

	}

}



// Quickinfo Menü Weiterleitung

function jump(dest) {

	if ((dest.indexOf(".pdf")>0) || (dest.indexOf(".php")>0)) {

		openPopup(dest,800,600);

	}
	
	else if (dest.indexOf("https")>0) {
		
		openWinRE(dest,825,800)
	
	}

	else if (dest.indexOf(".shtml")>0) {

		self.location.href = dest;

	}

	else if (dest.indexOf("/cis")>0) {

		openGeko();

	}

	/*else if (dest.indexOf(".jsp&bgcolor=#cococo")>0) {

		openRhenag(dest);

	}

	else if (dest!="") {

		openFormcenter(dest);

	}*/

}

	

// Cookie-Funktionen

function WertHolen() {

 var Wert = "";

 if(document.cookie) {

  var Wertstart = document.cookie.indexOf("=") + 1;

  var Wertende = document.cookie.indexOf(";");

  if (Wertende == -1) Wertende = document.cookie.length;

  Wert = document.cookie.substring(Wertstart,Wertende);

 }

 return Wert;

}



function WertSetzen(Bezeichner, Wert, Verfall) {

 var jetzt = new Date();

 var Auszeit = new Date(jetzt.getTime() + Verfall);

 document.cookie = Bezeichner+"="+Wert+"; expires="+Auszeit.toGMTString()+";";

}



function Laden() {

 var Checkstr = WertHolen();

 var Check = "";

 if (Checkstr != "") {

  for (var i=0; i < Checkstr.length; i++) {

   Check = Checkstr.substring(i,i+1);

   if (Check == "1") document.forms['checkliste'].elements[i].click();

  }

//  alert("Ihre gespeicherten Daten wurden geladen!\n");

 }

}



function Speichern() {

 var Verfallszeit = 1000*60*60*24*365; // 1 Jahr

 var Checkstr = "";

 var Check = "";

 for (var i=0; i < document.forms['checkliste'].length; i++) {

  if (document.forms['checkliste'].elements[i].checked) Check = "1";

  else Check = "0";

  Checkstr += Check;

 }

 WertSetzen("Checkstr",Checkstr,Verfallszeit);

}



// Überprüfe Email mit Wiederholung in Formularen



function checkEmail() {

	var Email1 = document.Inhaltsform.elements["E-Mail*"].value;

	var Email2 = document.Inhaltsform.elements["E-Mail-Wiederholung"].value;

	if (Email1!=Email2) {

		alert("Die eingegebene E-Mail-Adresse muss \nmit der Wiederholung übereinstimmen. \nBitte überprüfen Sie Ihre Eingabe!");

		document.Inhaltsform.elements["E-Mail-Wiederholung"].focus();

		return false;

	}

	else return true;

}



// Navi neu positionieren bei Resize NS + IE

//	onresize=function(){location.reload();}





//-->


