/* //Procedure qui va enregistrer les infos concernant le marker : description... */
function ajaxConstruireGraph( i )
{
	var url ='../modules/mod3_genererGraph/include/ajax/ajax_construireGraphe.php';
	
	var ajax = new Ajax.Request(
	url,
	{
		method:'post',
		parameters: { id:i },
		evalScripts :true,
		onComplete:ajaxConstruireGraphCallback
	});

}

function ajaxConstruireGraphCallback( request )
{
	var tab = request.responseText.split("|#|");
	var id = tab[0];
	var onglet1 = tab[1];
	var onglet2 = tab[2];
	var onglet3 = tab[3];
	var script = tab[4];
	
	
	eval(script);


	this.currentGInfoWindowsListe[id] = onglet1+"|#|"+onglet2+"|#|"+onglet3;
	
	
	 GEvent.addListener(this.currentGMarkerListe[ id ] , "click", function() 
		{
			
			if ( onglet1 != "")
			{
				if  ( onglet2 != "")/* //1,2,3 */
				{
					currentGMarkerListe[ id ].openInfoWindowTabsHtml
					(
					[
						new GInfoWindowTab("Sejours",onglet1),
						new GInfoWindowTab("Hebergement",onglet2),
						new GInfoWindowTab("TO",onglet3)
						
					]
					);
				}
				else /* //1,3 */
				{
					currentGMarkerListe[ id ].openInfoWindowTabsHtml
					(
					[
						new GInfoWindowTab("Sejours",onglet1),
						new GInfoWindowTab("TO",onglet3)
						
					]
					);
				}	
					
			}	
			else
			if ( onglet2 != "")/* //2,3 */
			{
			
				currentGMarkerListe[ id ].openInfoWindowTabsHtml
					(
					[
						new GInfoWindowTab("Hebergement",onglet2),
						new GInfoWindowTab("TO",onglet3)
						
					]
					);

			}
			else
			{
			
				currentGMarkerListe[ id ].openInfoWindowTabsHtml
					(
					[
						new GInfoWindowTab("TO",onglet3)
					]
					);
			
			}
		}, 100);
		
		
	/* // GEvent.addListener ( this.currentGMarkerListe[ id ] , "click", function() 
	// {
		// currentGMarkerListe[ id ].openInfoWindow( infoWindows );
	// }, 100); */
	
}


function changerPageSpreadSheet ( page, id )
{
	var pages = document.getElementById('spreadSheetInfoWindows_'+id).getElementsByTagName('DIV'); 

	for(var i=0;i<pages.length;i++)
	{
		pages[i].style.display="none";
	}

	document.getElementById('spreadSheet_'+page).style.display=""; 

}


