var flashvars = {};
var params = {
	id: "top_flash",
	scale: "noscale",
	wmode: "transparent",
	salign: "",
	menu: "false",
	play: "true",
	devicefont: "true",
	loop: "false",
	align: "middle"
};

var attributes = {};

swfobject.embedSWF ( "top.swf", "top", "837", "374", "10.1.52", "top.swf", flashvars, params, attributes );
swfobject.embedSWF ( "led.swf", "adds-flash", "837", "43", "10.1.52", "adds-flash", flashvars, params, attributes );

function openPage ( _url )
{
	//window.open ( _url );
	var load = window.open ( _url );
}

function loadView ( _imgAddress, _xmlAddress )
{
	// FIXME: detect container properly - this below is quick&dirty
	if ($('#top').is('div') && document.getElementById ( 'SWFObjectExprInst'))
	{
		var flash = document.getElementById ( 'SWFObjectExprInst');
	} else if ( document.getElementById ( "top" ) ) {
		var flash = document.getElementById ( "top" );
	} else if (document.getElementsByTagName('object') && document.getElementsByTagName('object')[0]) {
		flash = document.getElementsByTagName('object')[0];
		//$('#top').hide();
		
	} else if (document.getElementsByTagName('embed') && document.getElementsByTagName('embed')[0]) {
		flash = document.getElementsByTagName('embed')[0];
	} else {
		alert($('#top-cont').html());
	}
		
	
	flash.load ( _imgAddress, _xmlAddress);
	
	location.href = '#top';
}
