
function flash_command ( div_id, flash_id, command, params, y, h ) {

	if (div_id) show_hide_layer( div_id, true, y, h );
	
	var obj = get_flash_movie( flash_id );
	
	if (obj != null && obj.flash_command) {
		obj.flash_command( command, params );
	} else {
		if (obj != null) {
			alert("Flash-Film gefunden, aber kein ExternalEvent-Listener in Flash fuer flash_command()");
		} else {
			alert("Flash-Film mit der ID '"+flash_id+"' nicht gefunden!");
		}
	}
}



function show_layer( id, y, h ) {
   show_hide_layer( id, true, y, h );
}


function hide_layer( id ) {
	show_hide_layer( id, false, false, false );
}


function show_hide_layer ( id, show, y, h ) {

	if (!h) h = '500px';
	if (!y) y = '35px';
	
	var ref = get_reference();
	var newObj = ref.getElementById( id );
	//newObj.style.visibility = show ? 'visible' : 'hidden';
	//newObj.style.display = show ? 'block' : 'none';
	newObj.style.height = show ? h : '1px';
	newObj.style.top = show ? y : '1px';
}



function get_flash_movie( name ) {
	var ref = get_reference();
	if (ref[name]) return ref[name];
	return null;
}

function get_reference() {
	return document;
	//return (navigator.appName.indexOf("Microsoft") != -1) ? window : document;
}


function swop_text( html, div_id ) {
	var ref = get_reference();
	if (ref.getElementById) {
		var obj = ref.getElementById( div_id );
		obj.innerHTML = html;
	}
}


/*
function show_layer_and_tell_flash ( id ) {
	show_layer( id );
	var obj = get_flash_movie( 'flashmovie' );
	
	if (obj != null && obj.go_to_year) {
		obj.go_to_year( id );
	}
}

function init_content() {
	var ref = get_reference();
	if (ref.getElementById) {
	
		var obj = ref.getElementById('all_hidden_content');
		
		if (obj != null) {
			obj.style.visibility = 'visible';
			obj.style.display = 'block';
		}

		var obj = ref.getElementById('year_navigation_hidden');
		
		if (obj != null) {
			obj.style.visibility = 'visible';
			obj.style.display = 'block';
		}
		
		show_layer( 1 );
	}
}
*/
