// This function will handle the xml Onload event
		// handler. It will be passed the XML data object
		// and the status of the XmlHttpRequest object.
		function XmlOnLoad( xmlData, strStatus ){
			// Let's start out by converting the XML data
			// returned by the AJAX request into a jQuery
			// XML document object model.
			var jData = $( xmlData );
 
			// Get the person object (but only if it is a girl).
			var jRub = jData.find( "menus");
 
			// Get the direct children of the girl. These
			// will represent the sections of the body.
			var jSections = jRub.children();
 
			
			var rubriques = $( "#rubriques" );
			
			
			
			var str='<ul class="nav">';
 			
			var str0="";
			
 
			// For each section, create a list item.
			jSections.each(
				function( intSectionIndex ){
					var jSection = $( this );
					
					var name0=jSection.attr( "name" );
					var idPL=jSection.attr( "pl" );
					var textBL=jSection.attr( "bl" );
					
					str0 += '<li class="nav2 drop" id="'+name0+'"><a class="main down" href="#' + name0 + '" onClick="refreshTitrePL('+ idPL +'); return false;"><b>' + name0 + '</b>' + textBL + '</a>';      
 
					
					var str1 = '<ul>';
					 
 
					// Now, for each part of the section, we are
					// going to need to create a list.
					jSection.children().each(
						function( intPartIndex ){
							var jPart = $( this );
							
							var name1=jPart.attr( "name" );
							var idPL1=jPart.attr( "pl" );
							
							str1 += '<li class="fly" id="'+name1+'"><a class="main" href="#' + name1 + '" onClick="refreshTitrePL('+ idPL1 +'); return false;"><b>' + name1 + '</b></a>';
							
							
							var str2 = '<ul>';
							
								jPart.children().each(
									function( intPartIndex ){
										var jssmenu = $( this );
										
										var name2=jssmenu.attr( "name" );
										var idPL2=jssmenu.attr( "pl" );
							
										str2 += '<li class="fly" id="'+name2+'"><a class="main" href="#' + name2 + '" onClick="refreshTitrePL('+ idPL2 +'); return false;"><b>' + name2 + '</b></a></li>';
			 
									}
									);
								str2 += '</ul>';
								if(jPart.children().length != 0){
									str1 += str2;
								}	
									
							str1 += '</li>';
										
							
						}
						);
						str1 += '</ul>';
						if(jSection.children().length != 0){
							str0 += str1;
						}
						str0 += '</li>';
						
				}
				);
				rubriques.append(str + str0 + '</ul>');
						
				

		}
					 $(function(){
							$('ul.sf-menu').superfish();
						});
 
		// When the document has loaded, request the girl
		// XML object which will then use to populate the
		// XHTML document.
		$(
			function(){
				$.get(
					"http://www.ville-roubaix.tv/xml/arboMenus.xml",
					{},
					XmlOnLoad
					);
			}
			);
			
			function refreshTitrePL( plid){
				if(plid != undefined ){
					//getPlaylist(  plid );
					window.open("http://www.ville-roubaix.tv/?bclid="+plid,'_self');
					
				}
			}
