function open_flash(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="allowScriptAccess" value="sameDomain" />' +
					'<param name="FlashVars" value="imatge=' + imatge + '&captionBgColor=0xcbab34&thumbBgColor=0x000000&thumbBgAlpha=0.8&thumbSelectedWidth=5&thumbSelectedColor=0xffffff&thumbPaddingVertical=15&thumbScale=10&captionBgPadding=0&frameColor=0xd5d5d5&frameWidth=6&borderColor=0xcccccc&borderWidth=0&showControls=1&showThumb=0&showCaptions=0&showImageNumbers=0&closeOnClick=1&controlsScale=70&controlsColor=0xd5d5d5&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.8&thumbSelectedWidth=5&thumbSelectedColor=0xffffff&thumbPaddingVertical=15&thumbScale=10&captionBgPadding=0&frameColor=0xd5d5d5&frameWidth=6&borderColor=0xcccccc&borderWidth=0&showControls=1&showThumb=0&showCaptions=0&showImageNumbers=0&closeOnClick=1&controlsScale=70&controlsColor=0xd5d5d5&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>';

	nFadeIn=500;
	$.blockUI.defaults.fadeOut = 200;
	
	$.blockUI({ 
		message: '<div id="flash_contingut" style="width: 100%;height: 100%;"></div>',
		fadeIn: nFadeIn,
		css: {  
			top:  '0', 
			left: '0',
			padding: '0',
			margin: '0',
			width:'100%',
			height:'100%',
			border:	'none',
			backgroundColor:'transparent',
            fadeIn: 0,
            fadeOut: 700
		},
		overlayCSS:  { 
				backgroundColor: '#000', 
				opacity:         0.6
			}

	}); 
	$('#flash_contingut').html(flash_contingut);
}
function view_video(){
	showPopWin('', $('#videoframe').width(), $('#videoframe').height(), '', true, '', '', false, $('#videoframe').html());
	
	nW = $('#videoframe').width() + 22;
	nH = $('#videoframe').height() + 22;	
	
	sContent = '<div class="modalBox"><div class="modalCloseImg"><a class="modalCloseImg" title="'+MODALBOX_CLOSE+'" onclick="hidePopWin(false);">'+MODALBOX_CLOSE+'</a></div>' + $('#videoframe').html() + '</div>';
	
	nFadeIn=500;
	$.blockUI.defaults.fadeOut = 200;
	
	$.blockUI({
		message: sContent,
		fadeIn: nFadeIn,
		css: {
			top:  ($(window).height() - nH) /2 + 'px',
			left: ($(window).width() - nW) /2 + 'px',
			padding: '0',
			margin: '0',
			width:nW + 'px',
			height:nH + 'px',
			border:	'none',
			backgroundColor:"#fff"
		},
		overlayCSS:  {
				backgroundColor: '#000',
				opacity:         0.6,
				cursor: 'default'
			}

	});
	
}

function close_viewer(){		
	$('div.blockMsg').hide()
	$.unblockUI();
}


function initialize() {
	var markerLatlng = new google.maps.LatLng(gl_latitude,gl_longitude);
	var centerLatlng = new google.maps.LatLng(gl_center_latitude,gl_center_longitude);
	var myOptions = {
	  zoom: gl_zoom,
	  center: centerLatlng,
	  mapTypeId: google.maps.MapTypeId.ROADMAP,
	  mapTypeControlOptions: {style: google.maps.MapTypeControlStyle.DROPDOWN_MENU}
	}
	
	var map = new google.maps.Map(document.getElementById("google_map"), myOptions);
	
	 
	var infowindow = new google.maps.InfoWindow({ 
		content: gl_content_string
	});	 
	
	var marker = new google.maps.Marker({
		position: markerLatlng,
		map: map,
		title: gl_title,
		streetViewControl: true
	});   
    infowindow.open(map,marker); 
}
