function ladeSubNav(buttons) {

	if(top.subnavRechts) { top.subnavRechts.location.href = root + 'nav/subnav_rechts.php?buttons=' + buttons; }
}


function drucken() {

	//self.focus();
	//self.print();
	top.inhalt.focus();
	top.inhalt.print();
}


function zumSeitenanfang() {

	self.scrollTo(0,0);
}


function zurUebersicht() {

	var link = top.linkIndex;

	if(top.gruppeId)   { link += ((top.linkIndex.indexOf("?") != -1) ? "&" : "?") + "gruppeId="   + top.gruppeId;   }
	if(top.yScrollPos) { link += ((link.indexOf("?")          != -1) ? "&" : "?") + "yScrollPos=" + top.yScrollPos; }
	if(top.ordnung)    { link += ((link.indexOf("?")          != -1) ? "&" : "?") + "ordnung="    + top.ordnung; }
	if(top.richtung)   { link += ((link.indexOf("?")          != -1) ? "&" : "?") + "richtung="   + top.richtung; }
	if(top.anzeigen)   { link += ((link.indexOf("?")          != -1) ? "&" : "?") + "anzeigen="   + top.anzeigen; }
	if(top.suchwort)   { link += ((link.indexOf("?")          != -1) ? "&" : "?") + "suchwort="   + top.suchwort; }

	self.location.href = link;
}


function zeigeBildGross(id, breite, hoehe) {

	dBreite  = 32;
	dHoehe   = 122;
	dMonitorHoehe = 50;

	hoehe  = hoehe + dHoehe;

	if ( hoehe > screen.availHeight - dMonitorHoehe ) {

		hoehe = screen.availHeight - dMonitorHoehe;
		dBreite = 45;
	}

	breite = breite + dBreite;

	var BildLupe   = open("" , "BildLupe" + id, "width=" + breite + "px, height=" + hoehe + "px, left=10px, top=10px, menubar=no, status=no, resizable=no");
	//BildLupe.location.href = phpPfad + "bildlupe.php?id=" + id;
	BildLupe.location.href = phpPfad + "bildlupe/index.php?id=" + id;
	BildLupe.focus();
}

function warenkorb() {

	var ep_id   = warenkorb.arguments[0];

	var sid     = top.navigation.sid;
	var anzahl  = 0;

	if(document.getElementById("shop") && document.getElementById("shop").style.display) {
			
		if(ep_id) { anzahl = document.getElementById("stueck_" + ep_id).value; }
		
		if(anzahl && anzahl.match(/[^0-9]/gi)) { anzahl = 1; }
		
		FensterDombauWarenkorb = window.open("","fensterWarenkorb","width=557,height=537,status=yes,scrollbars=yes,resizable=no");
		FensterDombauWarenkorb.focus();
		
		FensterDombauWarenkorb.location.href = root + "inhalt/19_shop/warenkorb.php?sid=" + ((sid) ? sid : "" ) + "&ep_id=" + ((ep_id) ? ep_id : "" ) + "&anzahl=" + ((anzahl) ? anzahl : "1" );
	}
	else { alert('Leider kann Ihr Browser den Warenkorb nicht anzeigen.\nBitte verwenden Sie einen anderen Browser,\nwie z.B. Mozilla (TM) Firefox (TM). Download unter:\n\nhttp://www.getfirefox.com'); }
}

function hilfeAGB(param) {

	FensterDombau = window.open("","fenster","width=557,height=537,status=no,scrollbars=no,resizable=no");
	FensterDombau.focus();

	FensterDombau.location.href = root + "inhalt/19_shop/index_hilfe_agb.php?aktion=" + param;
}

function vormerken() {

	var ep_id = vormerken.arguments[0];

	if(ep_id) {

		var formObj = document.forms["shopF"];
		var anzahl  = eval("formObj.stueck_" + ep_id + ".value;");

		if(document.getElementById("shop") && document.getElementById("shop").style.display) {
			
	
			FensterDombauVormerken = window.open("","fensterVormerken","width=557,height=537,status=yes,scrollbars=yes,resizable=no");
			FensterDombauVormerken.focus();
	
			FensterDombauVormerken.location.href = root + "inhalt/19_shop/vormerken.php?ep_id=" + ((ep_id) ? ep_id : "" ) + "&anzahl=" + ((anzahl) ? anzahl : "" );
		}
		else { alert('Leider kann Ihr Browser das Vormerken-Fenster nicht anzeigen.\nBitte verwenden Sie einen anderen Browser,\nwie z.B. Mozilla (TM) Firefox (TM). Download unter:\n\nhttp://www.getfirefox.com'); }
	}
}
