showBook = function() {
	var vBody = document.body;
	vBody.style.width = '100%';
	vBody.style.height = '100%';
	var vBookBgDiv = document.createElement('DIV');
	vBookBgDiv.id = 'divFlashBookBG';
	vBookBgDiv.style.position = 'absolute';
	vBookBgDiv.style.zIndex = 10000;
	vBookBgDiv.style.backgroundColor = '#f5bf3d';
	vBookBgDiv.style.top = '0px';
	vBookBgDiv.style.left = '0px';
	vBookBgDiv.style.width = '100%';
	vBookBgDiv.style.height = '100%';
	vBookBgDiv.style.opacity = 0.8;
	vBookBgDiv.style.filter = 'alpha(opacity = 80)';
	
	vBody.appendChild(vBookBgDiv);
	
	vFlashContainer = document.createElement('DIV');
	
	vFlashContainer.id = 'divFlashBook';
	vFlashContainer.style.position = 'absolute';
	vFlashContainer.style.zIndex = 10001;
	vFlashContainer.style.backgroundColor = '#FFFFFF';
	vFlashContainer.style.top = '50%';
	vFlashContainer.style.left = '50%';
	vFlashContainer.style.marginLeft = '-426px';
	vFlashContainer.style.marginTop = '-375px';
	vFlashContainer.style.width = '852px';
	vFlashContainer.style.height = '751px';
	
	vBody.appendChild(vFlashContainer);
	
	//swfobject.embedSWF("/kondolenzbuch/book.swf", "divFlashBook", "852", "751", "8.0.24");
	
	var so = new SWFObject("/kondolenzbuch/book.swf", "FlashBook", "852", "751", "8.0.24", "", false);
	so.write("divFlashBook");
	checkFlashPosition();
}

showFlipBook = function() {
	$("#flippingbook").fadeIn(200);
}
closeFlipBook = function() {
	$("#flippingbook").fadeOut(100);
}

closeBook = function() {
	document.body.removeChild(document.getElementById('divFlashBookBG'));
	document.body.removeChild(document.getElementById('divFlashBook'));
}

checkFlashPosition = function() {
	var vFlashDiv = document.getElementById('divFlashBook');
	
	if(vFlashDiv) {
		if(document.body.offsetHeight < 751) {
			vFlashDiv.style.top = '0px';
			vFlashDiv.style.marginTop = '0px';
		} else {
			vFlashDiv.style.top = '50%';
			vFlashDiv.style.marginTop = '-375px';
		}
		
		if(document.body.offsetWidth < 852) {
			vFlashDiv.style.left = '0px';
			vFlashDiv.style.marginLeft = '0px';
		} else {
			vFlashDiv.style.left = '50%';
			vFlashDiv.style.marginLeft = '-426px';
		}
	}
}
