function dopopup(u,a) {
	params="menubar=no, scrollbars=0, resizable=yes, top=0";
	if(a="a380"){
params+=",resizable=no, width=300, height=400";
 }
 else {
params+=", width=500, height=350";
 }
	
	win=window.open(u, "pfwpopup", params);
	win.focus();
	return false;
}

function winopen(u, w, h, params) {
	if (params==null) {
		params="menubar=yes, scrollbars=1, resizable=yes, top=80";
	}
	if (w==null || h==null) {
		w=600;
		h=parseInt(screen.availHeight);
		if (h>0) h=h-250;
		else h=650;
	}
	params+=", width="+w+", height="+h;
	return window.open(u, "_blank", params);
}

function bild_gross(n) {	
	orig=document.getElementById(n);
	lay=document.getElementById(n+'_div');
	gross=document.getElementById(n+'_gross');
	c=orig.className;
	origLeft=parseInt(orig.offsetLeft)+parseInt(document.body.offsetLeft);
	p=orig;ot=40; // offsetTop
	while (p.tagName!="BODY" && p.offsetParent) {
		ot+=parseInt(p.offsetTop);
		p=p.offsetParent;
	}
	ot+=parseInt(p.offsetTop);
	if (orig.className=="cms_bildlinks") {
		lay.style.left=origLeft;
	} else if (orig.className=="cms_bildrechts") {
		lay.style.left=origLeft+parseInt(orig.width)-parseInt(gross.width)-20;
	} else if (orig.className=="cms_bildmitte") {
		lay.style.left=origLeft+Math.round(((parseInt(orig.width)-parseInt(gross.width))/2));
	}
	t=ot+Math.round(parseInt(orig.height)/2)-Math.round(parseInt(gross.height)/2)
	//window.status=t;
 	lay.style.top=t;
	lay.style.visibility="visible";
}

function bild_aus(n) {
	obj=document.getElementById(n+'_div');
	obj.style.visibility="hidden";
}

function dump(obj) {
	var msg="";
	for (i in obj)
		if ((obj[i]!=null) && (typeof(obj[i])!="function") && (typeof(obj[i])!="1object") && i!="innerHTML" && i!="outerHTML")
			msg+="obj["+i+"]="+obj[i]+"\n";
	alert(msg);
}

function check_frames() {
	if (top==self) {
		if (window.location.search.indexOf('lang=de')!=-1)
			location=("index.html"+window.location.search);
		else
			location=("index.html"+window.location.search);
	}
}
