
function expand_props(prop_string,to_int){
	var props = {};
	var string = prop_string.replace(" ","","g");
	var s = prop_string.split(',').each(function(p,i){
		var clean = p.split(':');
		props[clean[0]] = (to_int) ? clean[1].toInt() : clean[1];
	},this);
	return props;
}

//parte dall'swfobject, al caricamento.
function start_app(e){
	var flash_box = $('flash-box');
	
	//posiziono il contenitore del flash
	flash_box.setStyles({
		'position':'absolute',
		'top':0,
		'left':'50%',
		'margin-top':0,
		'margin-bottom':0,
		'margin-right':0,
		'margin-left':-Math.round(flash_box.getSize().x/2),
		'z-index':200
	});

	//attivo resize del contenitore del flash
	var rm = new ResizeManager('#photo-box','#flash-box', null,{ 
		get_data_size:true, 
		adjust_margin_left:true, 
		top_offset:100, 
		bottom_offset:30, 
		side_offset:0, 
		min_width:880
	});
	

	var more = $('more');

	//gestisco resize dei contenuti aggiuntivi
	function resize_more(){

		var flash_box_size = flash_box.getSize();
		
		var styles = {
			'width':flash_box_size.x,//-40,//40 = padding*2
			'top':flash_box_size.y,
			'margin-left':flash_box.getStyle('margin-left')
		}

		$('more').setStyles(styles);
	}//resize_more
	
	rm.addEvent('resized',resize_more);

	resize_more();
	
	$('more').setStyles({
		'display':'block'
		,'visibility':'visible'
	});
	
// 	if(Browser.ie){
// 		document.getElement('#more .contents').setStyle('width','570');
// 	}
}//start_app


