function init() {
	var height	= getDocHeight();
	dojo.style('dark', {
		opacity: 0.5,
		width: dojo.coords(dojo.body()).w + 'px',
		height: height + 'px'
	});

	if(dojo.coords('content_all').w == 300) {
		dojo.query(".small_button_start").attr('target', '_self');
	}
}
function show_video(videolink, width, height) {
	var scroll_y, close_button;

	close_video();
	close_galerie();

	scroll_y	= 0;
	if(document.all) {
		scroll_y = document.documentElement.scrollTop;
	} else {
		scroll_y = window.pageYOffset;
	}

	if(width == '') {
		width	= 490;
		height	= 410;
	}

	width	= parseInt(width) + 10;
	height	= parseInt(height) + 30;

	close_button	= '<br/><a href="javascript:close_video()" title="Video schliessen" class="sprite pagetext">Video beenden</a>';
	dojo.style('dark', 'display', 'block');
	dojo.style('videolayer', {
		display:	'block',
		top:		(80 + scroll_y) + '' + 'px',
		width:		width + 'px',
		height:		height + 'px'
	});
	dojo.attr('videolayer', 'innerHTML', videolink + '' + close_button);
}
function show_photo() {
	var scroll_y, text;

	close_video();
	close_galerie();

	scroll_y	= 0;
	if(document.all) {
		scroll_y = document.documentElement.scrollTop;
	} else {
		scroll_y = window.pageYOffset;
	}

	dojo.style('dark', 'display', 'block');
	dojo.style('photolayer', {
		display:	'block',
		top:		(30 + scroll_y) + 'px'
	});
}
function close_video() {
	dojo.style('dark', 'display', 'none');
	dojo.style('videolayer', 'display', 'none');
	dojo.attr('videolayer', 'innerHTML', '');
}
function close_galerie() {
	dojo.style('dark', 'display', 'none');
	dojo.style('photolayer', 'display', 'none');
	frames['galerieframe'].src	= '';
}
function getDocHeight() {
    var D = document;
    return Math.max(
        Math.max(D.body.scrollHeight, D.documentElement.scrollHeight),
        Math.max(D.body.offsetHeight, D.documentElement.offsetHeight),
        Math.max(D.body.clientHeight, D.documentElement.clientHeight)
    );
}
