// Vom Inhaltsframe aus die Flash-Navi beeinflussen
function setFlashNavi(curmain, cursub) {
	if (parent.fnavigat.this_page_loaded == 1) {
		parent.fnavigat.setNaviMovieVar("main", curmain);
		parent.fnavigat.setNaviMovieVar("sub", cursub);
		parent.fnavigat.startNaviMovie();
	}
	//alert("Yo, sucker\ncurmain = " + curmain + "\ncursub = " + cursub);
}

function mozillaScrollbarHack() {
	if (document.getElementById && !document.all) {
		// == Spielerei nur für Moz/NS-Design-Quatsch: Scrollbalken "erkennen"
		//var sichtbareHoehe = document.body.clientHeight;
		//var seitenHoehe    = document.height;
		if (document.body.clientHeight < document.height) {
			// == Es muß ein Scrollbalken vorhanden sein
			document.body.style.paddingLeft = "14px";
		} else {
			document.body.style.paddingLeft = "0px";
		}
	}
}

function findeFlash(flash) {
	var browsername = navigator.userAgent.toLowerCase();
	var opera = (browsername.indexOf("opera") > -1);
	if (opera) return;

	// http://aktuell.de.selfhtml.org/artikel/programmiertechnik/liveconnect/
	if (document.all) {
		if (document.opera) {
			var movie = eval(window.document + flash);
			if (movie.SetVariable) {
				return movie;
			}
		}
		if (document.all[flash]) {
			return document.all[flash];
		}
		return;
	}

	if(document.layers) {
		if(document.embeds) {
			var movie = document.embeds[flash];
			if (movie.SetVariable) {
				return movie;
			}
		}
		return;
	}

	if (!document.getElementById) {
		return;
	}

	var movie = document.getElementById(flash);
	if (movie) {
		if (movie.SetVariable) {
			return movie;
		}
	}
	if (movie) {
		var movies = movie.getElementsByTagName('embed');
		if (!movies || !movies.length) {
			return;
		}

    movie = movies[0];
    if (movie.SetVariable) {
    	return movie;
    }
	}
    return;
}

// Allgemein: Bild vergrößert darstellen
function allgVergroessern(datei, grafik_pfad_gross, breite, hoehe) {
	wb = breite;
	wh = hoehe;
	if (screen.width - 60	< wb) wb = screen.width  - 60;
	if (screen.height - 130 < wh) wh = screen.height - 130;
	aver_win = window.open(datei + "?fname=" + grafik_pfad_gross + "&b=" + breite + "&h=" + hoehe, "AVER", "left=30,top=30,scrollbars=no,resizable=no,width=" + wb + ",height=" + wh);
	aver_win.focus();
}

// News: Bild vergrößert darstellen
function vergroessern(datei, grafik_pfad_gross, breite, hoehe, lang) {
	wb = breite + 20;	// Scrollbalken
	wh = hoehe  + 20;
	if (screen.width - 60	< wb) wb = screen.width  - 60;
	if (screen.height - 130 < wh) wh = screen.height - 130;
	ver_win = window.open(datei + "?lang=" + lang + "&fname=" + grafik_pfad_gross + "&b=" + breite + "&h=" + hoehe, "VER", "left=30,top=30,scrollbars=yes,resizable=yes,width=" + wb + ",height=" + wh);
	ver_win.focus();
}

// Chronik: Großansicht
function chron_popup(pfad, w, h, lang) {
	big_win = window.open("../../global/chron_grossansicht.asp?lang=" + lang + "&pfad=" + pfad, "big", "left=20,top=20,scrollbars=auto,resizable=auto,width=" + w + ",height=" + h);
	big_win.focus();
}

// Ausbildung: Auf Drop-Down-Liste reagieren
function lade_ausbildung(link, objname) {
	var obj = MM_findObj(objname);
	idx = obj.options[obj.selectedIndex].value;
	location.href = link + idx;
	//obj = MM_findObj('frm_beruf');
	//idx = obj.options[obj.selectedIndex].value;
	//location.href = "ausb_berufe.asp?zeige=" + idx;
}

// Sitemap der Produktsuche
function pop_sitemap(pfad, w, h) {
	pop_smap = window.open(pfad, "pop_smap_win", "left=20,top=20,scrollbars=no,resizable=yes,width=" + w + ",height=" + h);
	pop_smap.focus();
}