function open_viewer(imatge){

	flash_contingut =
				'<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="100%" height="100%" id="/common/jscripts/viewer/viewer" align="middle">' +
					'<param name="movie" value="/common/jscripts/viewer/viewer.swf" />' +
					'<param name="quality" value="high" />' +
					'<param name="scale" value="noscale" />' +
					'<param name="play" value="true" />' +
					'<param name="loop" value="true" />' +
					'<param name="wmode" value="transparent" />' +
					'<param name="scale" value="showall" />' +
					'<param name="wmode" value="transparent" />' +
					'<param name="allowScriptAccess" value="sameDomain" />' +
					'<param name="FlashVars" value="imatge=' + imatge + '&captionBgColor=0xcbab34&thumbBgColor=0x000000&thumbBgAlpha=0.9&thumbSelectedWidth=2&thumbSelectedColor=0xffffff&thumbPaddingVertical=10&thumbScale=12&showControls=0&captionBgPadding=0&frameWidth=0&showThumb=0&dataUrl=' + images_xml + '" />' +
				'<!--[if !IE]>-->' +
				'<object type="application/x-shockwave-flash" data="/common/jscripts/viewer/viewer.swf" width="100%" height="100%">' +
					'<param name="movie" value="/common/jscripts/viewer/viewer.swf" />' +
					'<param name="quality" value="high" />' +
					'<param name="scale" value="noscale" />' +
					'<param name="play" value="true" />' +
					'<param name="loop" value="true" />' +
					'<param name="wmode" value="transparent" />' +
					'<param name="allowScriptAccess" value="sameDomain" />' +
					'<param name="FlashVars" value="imatge=' + imatge + '&captionBgColor=0xcbab34&thumbBgColor=0x000000&thumbBgAlpha=0.9&thumbSelectedWidth=2&thumbSelectedColor=0xffffff&thumbPaddingVertical=10&thumbScale=12&showControls=0&captionBgPadding=0&frameWidth=0&showThumb=0&dataUrl=' + images_xml + '" />' +
				'<!--<![endif]-->' +
					'<a href="http://www.adobe.com/go/getflash">' +
						'<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />' +
					'</a>' +
				'<!--[if !IE]>-->' +
				'</object>' +
				'<!--<![endif]-->' +
			'</object>';
	
	showPopWin('', 900, 80, '', true, '', '', false, flash_contingut,'px','%');

}
function close_viewer(){
	$('div.blockMsg').hide()
	$.unblockUI();
}

function next() {

	// get handle to scrollable API
	var api = $(".scrollable").data("scrollable");
	
	// use API to add our new item. after the item is being added seek to the end
	api.next();
}
function prev() {

	// get handle to scrollable API
	var api = $(".scrollable").data("scrollable");
	
	// use API to add our new item. after the item is being added seek to the end
	api.prev();
}

function initialize() {
	var myLatlng = new google.maps.LatLng(gl_latitude,gl_longitude);
	var myOptions = {
	  zoom: gl_zoom,
	  center: myLatlng,
	  mapTypeId: google.maps.MapTypeId.TERRAIN,
	  mapTypeControlOptions: {style: google.maps.MapTypeControlStyle.DROPDOWN_MENU}
	}
	
	var map = new google.maps.Map(document.getElementById("google_map"), myOptions);
	
	var marker = new google.maps.Marker({
		position: myLatlng,
		map: map,
		title: gl_title,
		streetViewControl: true
	});   
}
function toggle(what){
	$('#membres'+what).toggle('slow');
	$('#up'+what).toggle('slow');
	$('#down'+what).toggle('slow');
	
}
function show_exhibition(exhibition_id){
	//$('#exhibition_'+gl_selected_exhibition).hide();
	$('#first_exhibition_cont').height($('#exhibition_'+exhibition_id).height());
	
	html1 = $('#exhibition_'+exhibition_id).html();
	$('#exhibition_'+exhibition_id).hide();
	$('#first_exhibition').hide();
	$('#first_exhibition').html(html1);
	$('#first_exhibition').slideDown();
	
	$('#exhibition_'+gl_selected_exhibition).show();
	gl_selected_exhibition = exhibition_id;
	return;
	
	$('#exhibition_'+gl_selected_exhibition).hide();
	$('#exhibition_'+exhibition_id).show();
	gl_selected_exhibition = exhibition_id;
}
