/*
 * If the Locationfinder is iFramed, use this script outside the iFrame. Be sure to create a reference from the "flashframe" to its top window,
 * because flash calls the method showRoute() via Externalinterface in its own location/path!
 */
//Event.observe(window, 'load', locf_lightwindowInit, false);
var locf_myLightWindow = null;

function locf_lightwindowInit() {
	locf_myLightWindow = new lightwindow( {
		resizeSpeed : 8,
		overlay : {
			opacity : 0.7,
			image : '/SiteCollectionDocuments/lightwindow_special/black.png',
			presetImage : '/SiteCollectionDocuments/lightwindow_special/macFFBgHack.png'
		}
	} );

	// initialize a lightwindow, show it outside the viewport and destroy it.
	// this prevents flash content beyond lightwindow not to flicker.
	//locf_myLightWindow.initializeWindow({type:'killFlashFlicker', width:0, height:0, left:-10000});
}

/*
 * called by flash
 */
function showRoute( id, locType ) {
	var lightwindowURL = "/standorte/Documents/standorte-google/map.html?id=" + id + "&type=" + locType;

	if( locf_myLightWindow == null ) {
		locf_lightwindowInit();
	}
	locf_myLightWindow.activateWindow({
		href: lightwindowURL,
		title:'',
		width: 830,
		height: 540,
		iframe_embed:true
	});
}