// Procédures globales du projet
function navLireMusique(pIdMusique)
{
	top.frames["ifrPlayer"].playSongFromIdPlayer(pIdMusique);
}

function navAffThematiqueAPropos(pIdPlaylistThematique)
{
	switchIframes("ifrChargement")
	GKOOT_QUITTEAMBIANCE();
	changeSourceIframe("ifrPlaylistVitrine","pgePlaylistsThematiques.awp?P1=0&P2=&P3=&P4=0&P5=" + pIdPlaylistThematique)
}

function navAffSelectionExclusive(pIdAmbiance, pNumPage)
{
	var nNumPage;
	nNumPage = (pNumPage == null ? 1 : pNumPage);
	
	switchIframes("ifrChargement");
	GKOOT_QUITTEAMBIANCE();
	
	changeSourceIframe("ifrPlaylistVitrine","pgePlaylistsThematiques.awp?P1=" + pIdAmbiance + '&PAGE=' + nNumPage);
}

function navAffPlaylist(pIdPlaylist, pTypePlaylist, pLectureAuto)
{
	var sTypePlaylist;
	
	switch(pTypePlaylist)
	{
		case "GKOOT" : sTypePlaylist = "ACCEDER-GKOOT"; break;
		case "PARTENAIRE" : sTypePlaylist = "ACCEDER-PARTENAIRE"; break;
		case "THEM" : sTypePlaylist = "ACCEDER-THEM"; break;
		case "TOP20" : sTypePlaylist = "ACCEDER-TOP20"; break;
		default : sTypePlaylist = pTypePlaylist; break;
	}
	
	AfficherChargementPlaylist();
	changeSourceIframe("ifrPlaylist","pgePlaylist.awp?P1=0&P2=" + pIdPlaylist + "&P3=" + pLectureAuto + "&P4=" + sTypePlaylist + "&P5=1" + "&P6=" + "&P7=ACCEDER");
}

function navAffAmbiance(pIdAmbiance, pNumPage)
{
	var nNumPage;
	nNumPage = (pNumPage == null ? 1 : pNumPage);
	
	switchIframes('ifrChargement');
	refreshPub();
	
	changeSourceIframe( 'ifrCentre','pgeCentre.awp', true);
	changeSourceIframe( 'ifrPlaylistVitrineDivers','pgeAmbianceTitres.awp?AMBIANCE=' + pIdAmbiance + '&PAGE=' + nNumPage );
	
	GKOOT_CHANGEAMBIANCE( pIdAmbiance,false,true );
}

function navLireWebRadio(pIdAmbiance)
{
	top.frames['ifrPlayer'].LireWebRadio(pIdAmbiance);
}

function navAffAlbums(pIdArtiste)
{
	switchIframes("ifrChargement");
	changeSourceIframe("ifrAlbum","pgeAlbum.awp?ARTISTE=" + pIdArtiste);
}

function navAjouterPlaylist()
{
	top.frames["ifrPlaylist"].AfficherAjouterPlaylist();
}

function navAffArtisteAlbums(pIdArtiste)
{
	switchIframes("ifrChargement");
	GKOOT_QUITTEAMBIANCE();
	changeSourceIframe("ifrCentre","pgeArtisteFiche.awp?P1=" + pIdArtiste);
	changeSourceIframe("ifrAlbum","pgeAlbum.awp?ARTISTE=" + pIdArtiste);
}

function navAffArtiste(pIdArtiste)
{
	changeSourceIframe("ifrCentre","pgeArtisteFiche.awp?P1=" + pIdArtiste);
}

function navAffDA(pIdDA)
{
	changeSourceIframe("ifrCentre","pgeDAFiche.awp?P1=" + pIdDA);
}

function navAffLabel(pIdLabel)
{
	changeSourceIframe("ifrCentre","pgeLabelFiche.awp?P1=" + pIdLabel);
}

function navAffPlaylistThematique()
{
	switchIframes("ifrChargement");
	GKOOT_QUITTEAMBIANCE();
	changeSourceIframe("ifrPlaylistVitrine","pgePlaylistsThematiques.awp");
}

function navAffInscription()
{
	switchIframes("ifrChargement")
	GKOOT_QUITTEAMBIANCE();
	changeSourceIframe("ifrInscription","pgeInscription.awp?P1=&P2=0")
}

function navAffDAListe()
{
	switchIframes("ifrChargement");
	refreshPub();
	changeSourceIframe('ifrDa','pgeDa.awp');
	GKOOT_QUITTEAMBIANCE();
}

function navAffNouveauxTitresPublies(pIdAmbiance)
{
	var idPlaylist;
	
	AfficherChargementPlaylist();
	
	idPlaylist = GKOOT_IDPLAYLISTNOUVEAUXTITRES(pIdAmbiance);
	
	navAffPlaylist(idPlaylist, 'GKOOT', 1);
}

function navAffMusicList(pIdAmbiance, pNumPage, pMotCle)
{
	var nNumPage;
	var sMotCle;
	nNumPage = (pNumPage == null ? 1 : pNumPage);
	sMotCle = (pMotCle == null ? '' : pMotCle);
	
	switchIframes('ifrChargement');
	refreshPub();
	
	changeSourceIframe( 'ifrCentre','pgeCentre.awp', true);
	changeSourceIframe( 'ifrMusicList','pgeMusicList.awp?AMBIANCE=' + pIdAmbiance + '&PAGE=' + nNumPage + '&KEYWORD=' + sMotCle + '&CHGAMB=' );
	
	GKOOT_CHANGEAMBIANCE( pIdAmbiance,false,true );
}

function navAffSelection()
{
	navAffAmbiance(0);
}

function navAffRechercheAvancee(pMotCle)
{
	var sMotCle;
	sMotCle = (pMotCle == null ? '' : pMotCle);
	
	switchIframes('ifrChargement');
	GKOOT_QUITTEAMBIANCE();
	refreshPub();
	
	changeSourceIframe( 'ifrCentre','pgeCentre.awp', true);
	changeSourceIframe( 'ifrMusicList','pgeMusicList.awp?AMBIANCE=' + 0 + '&PAGE=' + 1 + '&KEYWORD=' + sMotCle + '&CHGAMB=' );
	
	GKOOT_CHANGEAMBIANCE( pIdAmbiance,false,true );
}

function navAffTop20()
{
	switchIframes("ifrChargement");
	GKOOT_QUITTEAMBIANCE();
	changeSourceIframe("ifrPlaylistVitrineTOP20","pgePlaylistsTop20.awp");
}


