// onresize for ns4
var origWidth, origHeight;
if (document.layers) {
	origWidth = window.innerWidth; origHeight = window.innerHeight;
	window.onresize = function() { if (window.innerWidth != origWidth || window.innerHeight != origHeight) history.go(0); }
}

var cur_lyr;	// holds id of currently visible layer
function swapLayers(id) {
  
	if (cur_lyr) hideLayer(cur_lyr);
  showLayer(id);
  cur_lyr = id;
}

function showLayer(id) {
  var lyr = getElemRefs(id);
  if (lyr && lyr.css) lyr.css.display = "block";
}

function hideLayer(id) {
  var lyr = getElemRefs(id);
  if (lyr && lyr.css) lyr.css.display = "none";
}

function getElemRefs(id) {
	var el = (document.getElementById)? document.getElementById(id): (document.all)? document.all[id]: (document.layers)? document.layers[id]: null;
	if (el) el.css = (el.style)? el.style: el;
	return el;
}

//--------------------------------------------------------------------------------
// Öffnet neues Content-Fenster (popup) und plaziert es in der Bildschirmmitte
//--------------------------------------------------------------------------------
function openWinPopup(url, w, h){

var parameter = 'width='+w+',height='+h+',left='+eval((screen.width-w)/2)+',top=50,scrollbars=1,resizable=no,location=no,menubar=no,toolbar=no';


if (self.window.name != "popupOK" ) {
	self.window.name == "popupOK"
	bdbwin = window.open(url,'remote',parameter);
	window.bdbwin.focus();
	}
else {
	if (window.bdbwin.closed == true) {
		bdbwin = window.open(url,'remote',parameter);
		window.bdbwin.focus();
		}
	else {
		window.bdbwin.location.href=url;
		window.bdbwin.resizeTo(w,h);
		window.bdbwin.focus();
		}
	}
}

//--------------------------------------------------------------------------------
// Druckt die Popup-Layer
//--------------------------------------------------------------------------------
function printlayer(lname) { 
	var txt = document.getElementById(lname).innerHTML; 
	document.open(); 
	document.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">')
	document.write('<HTML><HEAD><TITLE>Bankenverband - Reisespecial: Druckversion</TITLE>')
	document.write('<LINK HREF="/bdb-pc-ie.css" REL="stylesheet" TYPE="text/css"></HEAD>');
	document.write('<BODY>');
	document.write(txt); 
	document.write('</BODY></HTML>');
	document.close(); 
	window.print(); 
	//the previous line may need to be... 
	//document.print(); 
} 