<!--
// 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!="/sitemap.php") 
   && (self.location.pathname!="/abfallkalender.php") 
   && (self.location.pathname.indexOf("/featureGips/Gips")<0)
  && (self.location.pathname!="/index.php") ) {
	page = self.location.pathname;
	weblicdat = page.indexOf("wTmp"); // wird Datei aus Weblication aufgerufen?
	if (weblicdat<0) {
		url = '/page.php?page='+page;
		self.location.replace(url);
	}
}


// Wieviele Navpunkte werden angezeigt
anzeige=0;

// Navigations- und Seitenaufruf
function showNavpoint(id, url){
	if(url != ""){
		if (url.indexOf("/featureGips/Gips")>=0){
			top.location.href = url;
		}
		else{
			self.location.href = "/page.php?page="+url+"&amp;navid="+id;
		}
	}
}

// Funktion zum öffnen der Druckansicht im PopUp-Fenster
function drucken(page)
{
	url = "/druck.php?page="+page;
	window.open(url,'Druckansicht','width=500,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://www.rh-entsorgung.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=850;
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)
{
popup = window.open(url, 'PopUp2', 'width='+w+',height='+h+',scrollbars=yes,resizable=yes');
}
function openWinOsterspiel(url,w,h){
popup = window.open(url, 'PopUp3', 'width='+w+',height='+h+',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no');
}

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');
}

// 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');
}

// Und noch eine PopUp-Funktion 
function openPopup(url){
 window.open(url, "popup", "scrollbars=yes,resizable=yes,menubar=yes,location=no,width=620,height=500");
}

function login()
{
gekowin = open('', 'gekowin', 'width=790,height=590,scrollbars=no,hotkeys=no,locationbar=no,menubar=no,resizable=no,status=no');
document.forms[0].target="gekowin";
return true;
}


// 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) winh = document.body.offsetHeight - 180;
		else winh = document.body.scrollHeight - 200;
		if (winh<740) winh=740;
		document.all.mitte.style.height = winh;
		document.all.mitte.style.visibility = "visible";
	}
	else {
		if (document.body.scrollHeight + 20 <= window.innerHeight) winh = window.innerHeight - 170;
		else winh = document.body.scrollHeight - 170;
		if (winh<740) winh=740;
		if (NS4) {
			document.layers['mitte'].height = winh;
			document.layers['mitte'].visibility = "show";
		}
		if (NS6) {
			document.getElementById('mitte').style.height = winh;
			document.getElementById('mitte').style.visibility = "visible";
		}
    }
	
	hoverIE();
}

// Quickinfo Menü Weiterleitung
function jump(dest) {
	if ((dest.indexOf(".pdf")>0) || (dest.indexOf(".php")>0)) {
		openWin(dest,700,500);
	}
	else if (dest.indexOf(".html")>0) {
		self.location.href = "/page.php?page="+dest;
	}
	else if (dest.indexOf("Geko")>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);
}

// Navi neu positionieren bei Resize NS + IE
	onresize=function(){location.reload();}

//Skript für Klapp-Navigation

if(window.navigator.systemLanguage && !window.navigator.language) {
  function hoverIE() {
    var LI = document.getElementById("navlinks").firstChild;
    do {
      if (sucheUL(LI.firstChild)) {
        LI.onmouseover=einblenden; LI.onmouseout=ausblenden;
      }
      LI = LI.nextSibling;
    }
    while(LI);
	 
	 
  }

  function sucheUL(UL) {
    do {
      if(UL) UL = UL.nextSibling;
      if(UL && UL.nodeName == "UL") return UL;
    }
    while(UL);
    return false;
  }

  function einblenden() {
    var UL = sucheUL(this.firstChild);
    UL.style.display = "block"; UL.style.backgroundColor = "silver";
  }
  function ausblenden() {
    sucheUL(this.firstChild).style.display = "none";
  }

}


//-->

