/*	**********************************************************************************************
		*                                                                                            *
		*   Développeur : SIBILLE Thibaut - thibaut@rimay.net                                        *
		*   Destinataire : Sangha Rimay International                                                *
		*   Date de création du projet : juin 2009                                                   *
		*   Version du projet : 3.0                                                                  *
		*   Adresse web : www.rimay.net                                                              *
		*                                                                                            *
		*   Commentaires : contient les fonctions JavaScript Globales                                *
		*                                                                                            *
		********************************************************************************************** */


		/********************************************************************************************
		* Ouvre une popup du calendrier                                                            *
		********************************************************************************************/
			function popupCalendrier(idSl,folder)
			{
				winName = window.open(folder + "/popupCalendriers.php?idSl=" + idSl,"calendrier","left=1,top=1,width=" + screen.width + ",height=" + screen.height/1.2 + ",resizable=1,scrollbars=1,status=0");
				winName.focus();
			}


		/********************************************************************************************
		* Ouvre une popup du détail du calendrier                                                   *
		* %% CODE EN DUR ! %% : le dossier d'accès est en dur                                       *		
		********************************************************************************************/
			function popupCalendrierDetails(idEvent,idSl,anneeEvent,moisEvent)
			{
				winName = window.open("../espacesangha/popupCalendriers_details.php?idEvent=" + idEvent + "&idSl=" + idSl + "&annee=" + anneeEvent + "&mois=" + moisEvent,"calendrier","left=1,top=1,width=" + screen.width + ",height=" + screen.height/1.2 + ",resizable=1,scrollbars=1,status=0");
				winName.focus();
			}


		/********************************************************************************************
		* Permet d'afficher une video avec le lecteur flash FlowPlayer                              *
		********************************************************************************************/

			function display_videoPlayer(divVideo,video)
			{
				flowplayer(divVideo, "http://192.168.0.110/spip/squelettes/flowplayer/flowplayer-3.1.5.swf",  {
			
					// here is our playlist with two clips
			
						playlist:
						[
			
							// this first PNG clip works as a splash image
								{
									url: 'http://192.168.0.110/spip/squelettes/videos/' + video + '.jpg', 
									scaling: 'orig'
								},
			
							// second clip is a video. when autoPlay is set to false the splash screen will be shown
								{
									url: 'http://192.168.0.110/spip/squelettes/videos/' + video + '.flv', 
									autoPlay: false, 
			
									// video will be buffered when splash screen is visible
										autoBuffering: false 
								}
						],
			
						plugins :
						{
							controls:
							{
								time : false,
								// controlbar specific settings 
									progressColor: '#AA0033', 
									background: '#FF0000', 
									sliderGradient:'high', 
									scrubberHeightRatio: 0.3,
									volumeBarHeightRatio : 0.3,
									scrubber: true
							}
						}
				});
			}
