// JavaScript (Popup)

// All scripts named "OM_": Copyright Oswald und Martin Werbeagentur, Berlin 2009

// beim Laden der Seite vorbereiten
function OM_initPU() {
	
	// Fensterbreite auslesen (falls vorhanden)
	vTitel = window.location.href;
	var a = (vTitel.indexOf("?"))+1;
	var b = vTitel.length;
	vWindowWidth = vTitel.substring(a,b)*1;
	
	// Fensterbreite nicht definiert
	if (!vWindowWidth) {vWindowWidth = 625;}
	
	// Fensterhöhe und -breite feststellen
	if (document.all) { // IE
		if (window.document.documentElement.clientHeight) { // IE6
			vWindowHeight = document.all.lBody.offsetHeight+31;
		} else { // IE5
			vWindowHeight = document.all.lBody.scrollHeight;
		}
	} else if (window.document.documentElement.offsetHeight) { // FF + Safari
		vWindowHeight = window.document.documentElement.offsetHeight;
	}
	
	// Rahmengröße (um Fensterinhalt) ermitteln
	if (window.outerWidth) { // FF + Safari
		vWindowWidth = vWindowWidth + window.outerWidth - window.innerWidth;
		vWindowHeight = vWindowHeight + window.outerHeight - window.innerHeight;
	} else { // IE
		window.resizeTo(200, 200);
		vFensterWidth = window.innerWidth || (window.document.documentElement.clientWidth || window.document.body.clientWidth);
		vFensterHeight = window.innerHeight || (window.document.documentElement.clientHeight || window.document.body.clientHeight);
		vWindowWidth = vWindowWidth + 200 - vFensterWidth;
		vWindowHeight = vWindowHeight + 200 - vFensterHeight;
	}
	
	// Fenster an Inhalt anpassen
	window.resizeTo(vWindowWidth, vWindowHeight);
	
}

