
        

/*============================================================
|LES PARTIES
**************************************************************/
var one=parent.frames[0];
var two=parent.frames[1];

/*___________________________________________________
* Variables du mew_Chrono
****************************************************/
var centi=0;
var secon=0;
var minu=0;
var mili=0;
var hour=0;
var ison=0;

//Temps de rafraichissement du chrono
var mew_chronoTimeout=10;

//autoplay set
mew_autoplay=false;

/*___________________________________________________
* Variables bar de defilement
****************************************************/
var barsize=300;
var barpas=1;

/*___________________________________________________
* pop window size
****************************************************/
var mew_pop_h=450;
var mew_pop_w=1000;
var mew_pop_top=75;

/*__________________________________________________
* Les playlist par defaut
****************************************************/

// Playlist par default:
var mew_default_playlist = new Playlist ("Default Playlist",new Array(new Page(-1,"Mewob.com - Help","http://www.mewob.com/frames/help.htm", "Mewob"),new Page(-1,"Mewob.com - Join","http://www.mewob.com/frames/f_join.php", "Mewob"),new Page(-1,"Aatoo.net les services à la personne","http://www.aatoo.net", "Mewob"),new Page(-1,"Publicmic","http://www.publicmic.com", "Mewob"),new Page(-1,"Mewob.com - Help","http://www.mewob.com/frames/help.htm", "Mewob")), "yes");
var mew_nowPlaylist = mew_default_playlist
var PlaylistToshow = mew_nowPlaylist;

//La playlist à afficher
var maxpage = ( mew_nowPlaylist.pages.length) -1;
var mew_playlistIndex =0;
var thepage=undefined; // la  page en cours.

//Page a copier
var favetosave='';


/*__________________________________________________
* Variables propres aux mew_Member
****************************************************/
//var frequence = 5 // la fréquence de changement en seconde. elle est deplacee et mise directement dans les mains. car elle est configurable
//var mew_nextTime = frequence; // le temps de passage en sec à la prochaine page.

//Membre par defaut
var mew_user = new Personne (undefined,"man","No");
var mew_friend = new Personne (undefined,"man","No");
var mew_finder1 = new Personne (undefined,"man","No");




/*=====================================================
  Player lib
=======================================================*/

// Le chrono principal
function chrono(){

mili++;
if (mili>9){mili=0;centi++}

// changement de page toute les frequences secondes
if (centi>9)
{
  centi=0;
  secon++
  mew_nextSecTest();
}

if (secon>59){secon=0;minu++; mew_nextSecTest();}
if (minu>59){minu=0;hour++}
document.timeForm.secc.value=""+centi+""+mili
document.timeForm.seca.value=""+secon
document.timeForm.secb.value=""+minu
document.timeForm.secd.value=""+hour
mew_defilbar();
compte=setTimeout('chrono()',mew_chronoTimeout)
}

//Cette fonction test si le passage à la prochaine page doit se faire
function mew_nextSecTest(){
    
   if (mew_nextTime == secon) 
       nextpage();
}


// Remise à zéro du chrono
function mew_rasee(){
centi=0;
secon=0;
minu=0;
hour=0;
mili=0;
document.timeForm.secc.value=""+centi+""+mili
document.timeForm.seca.value=""+secon
document.timeForm.secb.value=""+minu
document.timeForm.secd.value=""+hour
}

/* ----------------------
   Cette fonction charge la page p
   Entrée: Page p
   Sortie:
   Indications:
-------------------------*/
function mew_change(p){
  thepage = p;
  //Test de connection et affichage de la proposition de creation de compte
	var randJoin = Math.random()*10;
//On positionne le titre des boutons suivantes et précédentes
	updatenextkey();

	
	//Test de la connection
	if ((mew_user.login=="user") & (randJoin > 4) & (randJoin < 5)){
		two.location.replace("http://www.mewob.com/frames/joinNow.htm");
	}
	else
	{

  //Debut du processus de changement
	  changePlaylistPic();
	  mew_calculDefilPas();
	  p.url = tourl(p.url);
	  //Test si la page doit etre ouverte en externe
	  if((p.externe=="external") || (p.type=="Mail") || (strIn("mail.live",p.url)) || (strIn("myspace",p.url)) || (strIn("hotmail",p.url))  || (strIn("aim_express",p.url)) || (strIn("live.com",p.url)) || (strIn("webmessenger",p.url)) || (strIn("talkgadget",p.url)) || (strIn("gmail",p.url)))
	  {
	  var SlideWin = window.open(p.url,"slide", "height="+one.mew_pop_h+", width="+one.mew_pop_w+", top="+one.mew_pop_top+", toolbar=yes, menubar=no, location=no, resizable=yes, scrollbars=yes, status=yes");
	  SlideWin.focus();
	  one.document.surfForm.surfUrl.value=p.url; 
	  }
	  else 
	  {

		two.location.replace(p.url);
		one.document.surfForm.surfUrl.value=p.url; 
	  }
	}
}

/* ----------------------
   Cette fonction affiche la page suivante de la playlist courante
   Entrée:
   Sortie:
   Indications:
-------------------------*/
function nextpage(){
  mew_playlistIndex++;
  if (mew_playlistIndex > maxpage){mew_playlistIndex=0;}
  
  mew_nextTime = (mew_nextTime + frequence)%60; // calcul du temps prochain 
  mew_change(mew_nowPlaylist.pages[mew_playlistIndex]);
  }

/* ----------------------
   Cette fonction affiche la page 1 de la playlist courante
   Entrée:
   Sortie:
   Indications:
-------------------------*/
function initPage(){
  mew_playlistIndex = 0;
  if (mew_playlistIndex >= maxpage){mew_playlistIndex=0;}
  mew_nextTime = one.frequence; // calcul du temps prochain 
  mew_change(mew_nowPlaylist.pages[mew_playlistIndex]);
}

/* ----------------------
   Cette fonction affiche la page i de la playlist courante
   Entrée:
   Sortie:
   Indications:
-------------------------*/
function initPage_i(i){
  mew_playlistIndex = i;
  if (mew_playlistIndex > maxpage){mew_playlistIndex=0;}
  mew_nextTime = one.frequence; // calcul du temps prochain 
  mew_change(mew_nowPlaylist.pages[mew_playlistIndex]);
}


/* ----------------------
   Cette fonction affiche la page suivante de la playlist courante sans changer le nextTime
   Entrée:
   Sortie:
   Indications:
-------------------------*/
function mew_nextPageDirect(){
  mew_playlistIndex++;
  if (mew_playlistIndex > maxpage){mew_playlistIndex=0;}
  mew_change(mew_nowPlaylist.pages[mew_playlistIndex]);
  }


/*--------------------------------------
Change l'image de la playlist
----------------------------------------*/
function changePlaylistPic(){
   var reg1=new RegExp("pic/nowplaying-1","g");
   var text=document.getElementById("nowplayingPic").src; 
   if (reg1.test(text))
        document.getElementById("nowplayingPic").src="pic/nowplaying-2.gif" ;
   else 
        document.getElementById("nowplayingPic").src="pic/nowplaying-1.gif" ;
}


/* ----------------------
   Cette fonction active le chrono ou l'arrete selon son état
   Entrée:
   Sortie:
   Indications:
-------------------------*/
function chronoControl(){
  if (ison == 0)
    {
      ison =1;
      document.getElementById("keyPlay").src="pic/pause-off.gif";
      chrono()
    } 
  else 
  {
    ison =0;
    clearTimeout(compte);
    document.getElementById("keyPlay").src="pic/playNow-off.gif";
    }
    mew_refreshPlaylistName(mew_nowPlaylist.titre);   
}

/* ----------------------
   Cette fonction raffiche la page courrente
   Entrée:
   Sortie:
   Indications:
-------------------------*/
function refresh(){

}


/* ----------------------
   Cette fonction met à jour le titre des boutons suivant et précédent 
   Entrée:
   Sortie:
   Indications:
-------------------------*/
function updatenextkey() 
{
	     //alert(mew_playlistIndex);
	     if (mew_playlistIndex <= 0)
	     backindex =maxpage;
	     else
	     backindex = mew_playlistIndex -1;
	     
	     if (mew_playlistIndex >= maxpage)
	     nextindex =0;
	     else
	     nextindex = mew_playlistIndex +1;
	     
		 one.document.getElementById("keyPlay").title=mew_nowPlaylist.pages[mew_playlistIndex].titre;
		 one.document.getElementById("backkey").title="Back link : "+mew_nowPlaylist.pages[backindex].titre+" | "+mew_nowPlaylist.pages[backindex].url ;
		 one.document.getElementById("nextkey").title="Next link : "+mew_nowPlaylist.pages[nextindex].titre+" | "+mew_nowPlaylist.pages[nextindex].url ;
}


/* ----------------------
   Cette fonction met le chrono dans l'etat PAUSE
   Entrée:
   Sortie:
   Indications:
-------------------------*/
function pause(){
	if (ison == 0)
    { 
 
    }
 
 else 
    {
    ison =0; 
    document.getElementById("keyPlay").src="pic/playNow-off.gif";
    clearTimeout(compte);
    }
}


/* ----------------------
   Cette fonction met le chrono dans l'etat PAUSE
   Entrée:
   Sortie:
   Indications:
-------------------------*/
function mew_stop(){
  pause();
	mew_rasee();
	initPage();
	}

/* ----------------------
   Cette fonction lance la navigation vers le lien saisi dans la mew_AdressBar
   Entrée:
   Sortie:
   Indications:
-------------------------*/
function surf(url){
pause();
two.location.replace(url);
}

// on rajoute le http://www.
function addUrlPrefix(obj){
pause();
if (obj.value=="")
obj.value="http://www.bing.com";
}


/* ----------------------
   Cette fonction lance la navigation vers le lien saisi dans la mew_AdressBar
   Entrée:
   Sortie:
   Indications:
-------------------------*/
// on rajoute le http://www.
function mew_pastLink(){
one.document.surfForm.surfUrl.value= mew_navUrl;
}


// Baisse la vitesse de changement
function mew_low(){
  if (frequence >1){
    frequence--;
    mew_calculDefilPas();
    mew_nextTime = (mew_nextTime - 1)%60;
    // Le cas où l'utilisateur baisse la frequence pendant que chrono s'apprette à changer de page
    if (mew_nextTime <= secon)
    {
    mew_nextTime = (mew_nextTime + frequence)%60;
    
    //alert ("Next change at second "+mew_nextTime+". Press OK to hide");
    }
  }
  else 
  {
  frequence = 1;
  }
  mew_updSpeed();
}
// Augmente la vitesse de changement
function mew_fast(){
  if (frequence <59){
    frequence++;
    mew_nextTime++;
    mew_calculDefilPas();
    }
  else 
  {
    frequence = 59;
  }
  mew_updSpeed();
}

//Fonction qui rafraichi l'affichage de la vitesse de changement de page
function mew_updSpeed(){
  document.getElementById("mew_speed").value= frequence;
}

//Fonction de retour à la page précédente
function mew_backPage(){
  
  mew_playlistIndex--;
  if (mew_playlistIndex < 0){mew_playlistIndex=maxpage;}
  mew_change(mew_nowPlaylist.pages[mew_playlistIndex]);
  
}


// Fonction de retour à la page précédente par navigation
function mew_navBackPage(){
	if (ison==1) {
		mew_nextTime = (secon + frequence)%60;
   	}
  pause();
  mew_backPage();
}

// Fonction d'avancement à la page suivante par navigation
function mew_navNextPage(){
  if (ison==1) {
		mew_nextTime = (secon + frequence)%60;
   }
  pause();
  mew_nextPageDirect();
}


/* =====================================================================
  mew_goto ( frame , src)
========================================================================*/
 function mew_goto(frame, src){
 pause();
 parent.frames[frame].location.replace(src);
 document.surfForm.surfUrl.value=src;

 }
  

/* =====================================================================
  initChrono ()
========================================================================*/
 function initChrono(){
 pause(); 
 mew_playlistIndex=0;
 mew_stop(); 
 }

/* =====================================================================
  initChrono_i (i)
  initialise le chrono à partir de la page i
========================================================================*/
 function initChrono_i(i){
 pause(); 
 one.mew_playlistIndex=i;
 mew_change(mew_nowPlaylist.pages[mew_playlistIndex]);
 mew_rasee();
 initPage_i(i);
 }


/* =====================================================================
  mew_changePlaylist_i( playlist, i)
  charge une playlist et commence la lecture à partir de la page i
========================================================================*/
 function mew_changePlaylist_i(playlistvar,i){
  mew_nowPlaylist = playlistvar;
 maxpage = (playlistvar.pages.length) -1;
 initChrono_i(i);
 mew_refreshPlaylistName(mew_nowPlaylist.titre);
 one.mewefx();
 }
 

/* =====================================================================
  mew_changePlaylist ( playlist)
  charge une playlist et commence la lecture à partir de la page 0
========================================================================*/
 function mew_changePlaylist(playlistvar){
 mew_nowPlaylist = playlistvar;
 maxpage = (playlistvar.pages.length) -1;
 initChrono();
 chronoControl();
 one.mewefx();
 }
 

/* =====================================================================
  mew_loadpage(playlist, idpage) BETA
========================================================================*/
 function mew_loadpage(playlist, idpage){
   if(playlist !=""){
   mew_nowPlaylist = playlistvar;
   maxpage = (playlistvar.pages.length) -1;
   initChrono();
   chronoControl();
   }
 }
  

 /* ====================================================
 =======================================================*/    
function keycorrect(k){
    return ( (k!="") );
    }    
 /* ====================================================
 =======================================================*/    
function validkey(k){
    k=k.replace(/</g,"");
    k=k.replace(/>/g,"");
    return k;
    }    


/*=======================================================
mew_webSearch(key)
Cette fonction charge la playlist de recherche Web 
=========================================================*/
function mew_webSearch(key){
  
  if (keycorrect(key)){
  key=validkey(key);
  var titre = key+" search playlist";
  var plst = new Array(titre, new Array(""));
  i=0;
  plst[i]= new Page(-1,titre,"http://www.bing.com/search?q="+key+"&btnG=Recherche+Bing&meta=");
  i++;
  plst[i]= new Page(-1,titre,"http://search.yahoo.com/search?p="+key+"&vc=&fr=yfp-t-501&toggle=1&cop=mss&ei=UTF-8&fp_ip=FR");
  
  //i++; Bing desabled because of pop up
  //plst[i]= new Page(-1,titre,"http://search.live.com/results.aspx?q="+key+"&go=Rechercher&mkt=fr-fr&scope=&FORM=LIVSOP");
  i++;
  plst[i]= new Page(-1,titre,"http://fr.wikipedia.org/wiki/"+key);
  i++;
  plst[i]= new Page(-1,titre,"http://www.exalead.fr/search/results?q="+key+"&x=0&y=0&%24mode=allweb&%24searchlanguages=fr");
  i++;
  plst[i]= new Page(-1,titre,"http://fr.ask.com/web?q="+key+"&search=search&dm=lang&bql=fr&t=a&s=r&qsrc=0&o=312&l=dir");
  i++;
  plst[i]= new Page(-1,titre,"http://search.ke.voila.fr/S/voila?rtype=kw&rdata="+key+"&profil=voila&bhv=web_fr");
  i++;
  plst[i]= new Page(-1,titre,"http://guruji.com/search?hl=en&q="+key+"&hl=en");
  
  //Création de l'objet playlist
  plst = new Playlist (titre, plst, "yes");
  one.findkey=key;

  //Dans le cas d'une lecture direct
 //mew_changePlaylist(plst);
 //Sans le demarrage du chrono
 mew_Play_theP_i(plst,0) 
  }
  
}


/*=======================================================
mew_imageSearch(key)
Cette fonction charge la playlist image de recherche Web 
=========================================================*/
function mew_imageSearch(key){
  
  if (keycorrect(key)){
  key=validkey(key);
  var titre = key+" image playlist";
  var plst = new Array(titre, new Array(""));
  i=0;
  plst[i]= new Page(-1,titre,"http://www.bing.com/images/search?q="+key+"&btnG=Recherche+d%27images&gbv=2");
  i++;
  plst[i]= new Page(-1,titre,"http://www.flickr.com/search/?q="+key);
  i++;
  //plst[i]= new Page(-1,titre,"http://search.live.com/images/results.aspx?q="+key+"&mkt=fr-fr&scope=&FORM=LIVSOP");
  //i++;//=>Live is desabled because of pop up
  
  plst[i]= new Page(-1,titre,"http://images.search.yahoo.com/search/images?p="+key);
  i++;
  plst[i]= new Page(-1,titre,"http://search.deviantart.com/?section=browse&qh=boost%3Apopular+age_sigma%3A24h+age_scale%3A5&q="+key);
  
  //Création de l'objet playlist
  plst = new Playlist (titre, plst, "yes");
  one.findkey=key;
  //Dans le cas d'une lecture direct
 //mew_changePlaylist(plst);
 
 //Sans le demarrage du chrono
 mew_Play_theP_i(plst,0) 
 
  }
  
}

/*=======================================================
mew_videoSearch(key)
Cette fonction charge la playlist image de recherche Web 
=========================================================*/
function mew_videoSearch(key){
  
  if (keycorrect(key)){
  key=validkey(key);
  var titre = key+" video playlist";
  var plst = new Array(titre, new Array(""));
  
  i=0;
  plst[i]= new Page(-1,titre,"http://youtube.com/results?search_query="+key+"&search_type=&aq=f");
  i++;
  plst[i]= new Page(-1,titre,"http://www.dailymotion.com/relevance/search/"+key);
  i++;
  plst[i]= new Page(-1,titre,"http://www.bing.com/videos/search??q="+key+"");
  i++;
  plst[i]= new Page(-1,titre,"http://www.wideo.fr/search/?q="+key);
  i++;
  plst[i]= new Page(-1,titre,"http://www.kewego.com/search/?q="+key);
  i++;
  plst[i]= new Page(-1,titre,"http://search.bbc.co.uk/cgi-bin/search/results.pl?tab=av&q="+key+"&scope=all");
  
  //Création de l'objet playlist
  plst = new Playlist (titre, plst, "yes");
  
  one.findkey=key;
  //Dans le cas d'une lecture direct
 //mew_changePlaylist(plst);
 
 //Sans le demarrage du chrono
 mew_Play_theP_i(plst,0) 
 
   
  }
  
}



/*=======================================================
mew_newsSearch(key)
Cette fonction charge la playlist des news de recherche Web 
=========================================================*/
function mew_newsSearch(key){
  
  if (keycorrect(key)){
  key=validkey(key);
  var titre = key+" news playlist";
  var plst = new Array(titre, new Array(""));
  
  plst[0]= new Page(-1,titre,"http://news.google.fr/news?hl=fr&ned=fr&q="+key+"&btnG=Recherche+Actualit%C3%A9s");
  plst[1]= new Page(-1,titre,"http://www.lemonde.fr/web/recherche_resultats/1,13-0,1-0,0.html?dans=dansarticle&num_page=1&booleen=et&ordre=pertinence&query="+ key+"&periode=30&x=0&y=0&sur=LEMONDE"+key);
  plst[2]= new Page(-1,titre,"http://recherche.nouvelobs.com/?q="+key+"&go=OK");
  plst[3]= new Page(-1,titre,"http://search.bbc.co.uk/cgi-bin/search/results.pl?go=homepage&scope=all&tab=all&q="+key+"&Search=Search");
  plst[4]= new Page(-1,titre,"http://search.cnn.com/search.jsp?query="+key+"&type=news&sortBy=date&intl=true");
  plst[5]= new Page(-1,titre,"http://query.nytimes.com/search/query?query="+key+"&srchst=nyt");
  plst[6]= new Page(-1,titre,"http://search.live.com/news/results.aspx?q="+key+"&go=Rechercher+dans+les+actualit%C3%A9s&mkt=fr-fr&scope=&FORM=LIVSOP");
  plst[7]= new Page(-1,titre,"http://news.search.yahoo.com/search/news?p="+key+"&fr=yfp-t-501&ei=UTF-8");
  
  
  //Création de l'objet playlist
  plst = new Playlist (titre, plst, "yes");
  one.findkey=key;
   //Dans le cas d'une lecture direct
 //mew_changePlaylist(plst);
 //Sans le demarrage du chrono
 mew_Play_theP_i(plst,0) 
  
  }
  
}

/*=======================================================
mew_musicSearch(key)
Cette fonction charge la playlist des news de recherche Web 
=========================================================*/
function mew_musicSearch(key){
  
  if (keycorrect(key)){
  key=validkey(key);
  var titre = key+" music playlist";
  var plst = new Array(titre, new Array(""));
  i=0;
  plst[i]= new Page(-1,titre,"http://www.dilandau.com/telecharger_musique/"+key+"-1.html");
  i++;
//  plst[i]= new Page(-1,titre,"http://www.imeem.com/tag/"+key+"/");
  //i++;
  plst[i]= new Page(-1,titre,"http://www.lastfm.com/search?m=all&q="+key);
  i++;
  plst[i]= new Page(-1,titre,"http://www.esnips.com/_t_/"+key+"?q="+key);
  i++;
  plst[i]= new Page(-1,titre,"http://www.deezer.com/#music/result/all/"+key);
  i++;
  plst[i]= new Page(-1,titre,"http://www.musicme.com/#/page.php?q="+key);
  plst[i].externe="external";
  i++;
  plst[i]= new Page(-1,titre,"http://youtube.com/results?search_query="+key+"&search_type=&aq=f");
  i++;
  plst[i]= new Page(-1,titre,"http://video.google.com/videosearch?q="+key+"&sitesearch=");
  
  
  //Création de l'objet playlist
  plst = new Playlist (titre, plst, "yes");
  one.findkey=key;
  //Dans le cas d'une lecture direct
 //mew_changePlaylist(plst);
 
 //Sans le demarrage du chrono
 mew_Play_theP_i(plst,0) 
   
  }
  
}



/*=======================================================
mew_blogSearch(key)
Cette fonction charge la playlist de recherche de blog
=========================================================*/
function mew_blogSearch(key){
  
  if (keycorrect(key)){
  key=validkey(key);
  var titre = key+" blog playlist";
  var plst = new Array(titre, new Array(""));
  
  
  plst[0]= new Page(-1,titre,"http://fr.facebook.com/srch.php?nm="+key);
  plst[1]= new Page(-1,titre,"http://searchservice.myspace.com/index.cfm?searchBy=First&Submit=Find&country=&searchType=network&fuseaction=search&searchtarget=tpeople&searchBoxID=HeaderWebResults&interesttype=&f_search_criteria="+key+"e&f_first_name="+key);
  plst[2]= new Page(-1,titre,"http://home.services.spaces.live.com/search/?tp=1&pg=0&sc=0&form=SPDEFD&q="+key);
  plst[3]= new Page(-1,titre,"http://hi5.com/friend/processBrowseSearch.do?searchText="+key);  
  plst[4]= new Page(-1,titre,"http://blogsearch.google.com/blogsearch?hl=fr&client=firefox-a&um=1&ie=UTF-8&q="+key+"&btnG=Rechercher&lr=");
  plst[5]= new Page(-1,titre,"http://www.skyrock.com/recherche/?quicksearch="+key+"&searchtype=blog");
  
  //Création de l'objet playlist
  plst = new Playlist (titre, plst, "yes");
  one.findkey=key;
   //Dans le cas d'une lecture direct
 //mew_changePlaylist(plst);
 
 //Sans le demarrage du chrono
 mew_Play_theP_i(plst,0) 
  
  }
  
}

/*=======================================================
mew_buySearch(key)
Cette fonction charge la playlist des sites marchands 
=========================================================*/
function mew_buySearch(key){
  
  if (keycorrect(key)){
  key=validkey(key);
  var titre = key+" buy playlist";
  var plst = new Array(titre, new Array(""));
  
  plst[0]= new Page(-1,titre,"http://search.ebay.com/"+key);
  plst[1]= new Page(-1,titre,"http://www.alibaba.com/trade/search?Type=&ssk=y&year=&month=&industry=&location=&keyword=&SearchText="+key+"&Country=&srchLocation=&srchYearMonth=&IndexArea=product_en&CatId=0");
  plst[2]= new Page(-1,titre,"http://www.amazon.com/s/ref=nb_ss_gw/104-8817204-8408760?url=search-alias%3Daps&field-keywords="+key);
  plst[3]= new Page(-1,titre,"http://www.priceminister.com/navigation/se/category/sa/kw/"+key);
  plst[4]= new Page(-1,titre,"http://amazon.fr/s/ref=nb_ss_w/402-8578154-6988141?__mk_fr_FR=%C5M%C5Z%D5%D1&url=search-alias%3Daps&field-keywords="+key+"&Go.x=0&Go.y=0&Go=Go");
  plst[5]= new Page(-1,titre,"http://shopping.kelkoo.fr/ctl/do/search?fromform=true&siteSearchQuery="+key);
  plst[6]= new Page(-1,titre,"http://www.touslesprix.com/sea2.asp?typ=1&keyword="+key+"&image.x=0&image.y=0");
  plst[7]= new Page(-1,titre,"http://www.prixdunet.com/s/"+key);
  plst[8]= new Page(-1,titre,"http://www.cdiscount.com/search/ipod/sa-10.html?q="+key);
  plst[9]= new Page(-1,titre,"http://search.rueducommerce.fr/shared/recherche/index.cfm?recherche="+key+"&prix=&trix=1&typetrix=DESC&bound=20&schcid=");
  
  
  //Création de l'objet playlist
  plst = new Playlist (titre, plst, "yes");
  one.findkey=key;
  //Dans le cas d'une lecture direct
 //mew_changePlaylist(plst);
 
 //Sans le demarrage du chrono
 mew_Play_theP_i(plst,0) 
   
  }
  
}


/*=======================================================
mew_Search(key)
recherche dans la base mewob
Cette fonction charge la playlist à partir d'une cle 
=========================================================*/
function mew_Search(key){
  if (keycorrect(key))
  document.location = "f_playlist.php?key="+key;
}


/*=======================================================
mew_elarge()
Cette fonction ouvre une nouvelle fenetre avec l'Url de la page actuelle 
=========================================================*/
function new_elarge(){
if (one.document.surfForm.surfUrl.value !="")
  window.open( one.document.surfForm.surfUrl.value,'_blank');
}



/*=======================================================
mew_writePlaylist(p)
Cette fonction affiche dans le document la playlist p
=========================================================*/
function mew_writePlaylist(p){
var str="<td class='playlistFont1'><a href='javascript:one.mew_changePlaylist(p)' class='playlistFont1'> <img id='mew_gamePlaylist' src='../pic/playlist1-off.gif' class='noborder' onmouseover='javascript:onPic(this)' onmouseout='javascript:offPic(this)'><br></a></td>";
document.write(str);
}


/*=======================================================
mew_showP(p)
Cette fonction affiche la liste des pages de la playlist p
=========================================================*/
function mew_showP(p){

    if (p.titre !=undefined){
    one.PlaylistToshow=p;
    surf('f_playlist.php');
    }
}

function mew_showP2(p){

    if (p.titre !=undefined){
    one.PlaylistToshow=p;
    surf('frames/f_playlist.php');
    }
}

//refresh user page before show the playlist
function mew_showP3(p){

    if (p.titre !=undefined){
    one.PlaylistToshow=p;
    surf('f_playlist.php?RefreshPages=1');
    }
}


/*=======================================================
mew_PlayP(i)
Cette fonction lance la lecture de la playlist affichée,
La lecture commence à partir de la page numéro i
=========================================================*/
function mew_PlayP_i(i){
    var p = one.PlaylistToshow;
    if ((p.titre !=undefined)&&((one.PlaylistToshow.pages[0] !=undefined))){
    one.mew_changePlaylist_i(p,i);
    }
    else
    alert("This playlist is empty. Please try with another playlist.")
}

/*=======================================================
mew_PlayP()
Cette fonction lance la lecture de la playlist affichée,
La lecture commence à partir de la page numéro 0 et en lançant play
=========================================================*/
function mew_PlayP(){
    var p = one.PlaylistToshow;
    if ((p.titre !=undefined)&&((one.PlaylistToshow.pages[0] !=undefined))){
    one.mew_changePlaylist(p);
    }
    else
    alert("This playlist is empty. Please try with another playlist.")
}


/*=======================================================
mew_giveThePage()
Cette fonction retourne la page en cours de lecture
=========================================================*/
function mew_giveThePage(){
    if (mew_nowPlaylist.pages[mew_playlistIndex].url !=undefined){
      return mew_nowPlaylist.pages[mew_playlistIndex];
    }
    else 
      return (new Page(0, "", "", ""));
}

/*=======================================================
mew_createAndShowP(key)
Cette fonction permet de creer la playlist du candidat à partir d'une clé
Puis charge la playlist
=========================================================*/
function mew_createAndShowP(key){
    mew_showP(mew_user.createPlaylist(key));
    }
function mew_createAndShowP3(key){
    mew_showP3(mew_user.createPlaylist(key));
    }

function mew_createAndShowMailP(){
    mew_showP(mew_user.createMailPlaylist());
    }

function mew_createAndShowStartP(){
    mew_showP(mew_user.createStartPlaylist());
}

function mew_createAndShowPFriends(key){
    mew_showP(mew_friend.createPlaylist(key));
    }
function mew_searchCreateAndShowP(key){
    mew_showP(mew_user.searchCreatePlaylist(key));
    }

//============= BAR DEFILEMENT ==========================

/*=======================================================
mew_calculDefilPas()
Cette fonction calcul le pas de la bar de défilement
=========================================================*/
function mew_calculDefilPas(){
  // On calcul le pas d'avancement en % a effectuer toute les mew_chronoTimeout ms
  barpas = (mew_chronoTimeout*100)/ (frequence*1000);
  document.getElementById("bar_defil").style.width="0px";
  bar_i =0;
  document.getElementById("bar_message").innerHTML="";   
}
    

/*=======================================================
mew_defilbar()
Cette fonction fait avancer la bar de défilement
=========================================================*/
var bar_i =0;
function mew_defilbar() {
  if (bar_i <= barsize) {
    
    // Pour afficher le pourcentage
    if ((bar_i >= 0) ) {
    	if ((bar_i >= 70) )
    	document.getElementById("bar_message").innerHTML=parseInt(bar_i)+"% - Loading next link...";
			else 
      document.getElementById("bar_message").innerHTML=parseInt(bar_i)+"%";
			}
    
    document.getElementById("bar_defil").style.width=parseInt( Math.ceil(bar_i * (barsize/100)) )+"px";
    		
    if(bar_i<=100) {
     	bar_i+=barpas;
     	}  
    else{
      bar_i=0;
      document.getElementById("bar_message").innerHTML="";   
      document.getElementById("bar_defil").style.width="0px";
      }
    }
	}

//============== FIN DEFILEMENT ============================

/* =====================================================================
  mew_changePlaylist_i( playlist, i)
  charge une playlist et commence la lecture à partir de la page i
========================================================================*/
 function mew_refreshPlaylistName(name){
 document.getElementById("nowplayingInput").innerHTML=printer(name,25);
 }
 
 /*=======================================================
mewefx.
Cette fonction fun élumine les boutoms de mewob
=========================================================*/
function mewefx() {
//Temps de rafraichissement
 efxtmps=100;
//On test si les effets sont autorisés
if(one.mew_efx)
{
	one.mew_efxtime-= efxtmps;
   //***********************
   //Les effets scpéciaux
  //************************
 
  //Effet 1
  if(one.mew_efxtime==1900)
  {
   one.document.getElementById("backkey").src="pic/backk-on.gif";
  }
  //Effet 2
  if(one.mew_efxtime==1800)
  {
   one.document.getElementById("backkey").src="pic/backk-off.gif";
   one.document.getElementById("nextkey").src="pic/next-on.gif";
  }
   
  //Effet 3
  if(one.mew_efxtime==1700)
  {
   one.document.getElementById("nextkey").src="pic/next-off.gif";
   one.document.getElementById("backkey").src="pic/backk-on.gif";
 
  }
 
  //Effet 4
  if(one.mew_efxtime==1600)
  {
   one.document.getElementById("backkey").src="pic/backk-off.gif";
   one.document.getElementById("nextkey").src="pic/next-on.gif";
  }
 
  //Effet 5
  if(one.mew_efxtime==1500)
  {
   one.document.getElementById("backkey").src="pic/backk-off.gif";
   one.document.getElementById("nextkey").src="pic/next-on.gif";
   one.document.getElementById("backkey").src="pic/backk-on.gif";
   
  }
  
   //Effet 5
  if(one.mew_efxtime==1300)
  {
   one.document.getElementById("nextkey").src="pic/next-off.gif";
   one.document.getElementById("backkey").src="pic/backk-off.gif";
   
  }   

  //Effet 5
  if(one.mew_efxtime==1100)
  {
   one.document.getElementById("nextkey").src="pic/next-on.gif";
   one.document.getElementById("backkey").src="pic/backk-on.gif";
   
  }
  
   //Effet 5
  if(one.mew_efxtime==900)
  {
   one.document.getElementById("nextkey").src="pic/next-off.gif";
   one.document.getElementById("backkey").src="pic/backk-off.gif";
   
  }   

   //Effet 1
  if(one.mew_efxtime==700)
  {
   one.document.getElementById("backkey").src="pic/backk-on.gif";
  }
  //Effet 2
  if(one.mew_efxtime==600)
  {
   one.document.getElementById("backkey").src="pic/backk-off.gif";
   one.document.getElementById("nextkey").src="pic/next-on.gif";
  }
   
  //Effet 3
  if(one.mew_efxtime==500)
  {
   one.document.getElementById("nextkey").src="pic/next-off.gif";
   one.document.getElementById("backkey").src="pic/backk-on.gif";
 
  }
 
  //Effet 4
  if(one.mew_efxtime==400)
  {
   one.document.getElementById("backkey").src="pic/backk-off.gif";
   one.document.getElementById("nextkey").src="pic/next-on.gif";
  }
  
  //Effet 4
  if(one.mew_efxtime==300)
  {
   one.document.getElementById("nextkey").src="pic/next-off.gif";
  }
     

  	if(one.mew_efxtime >900)
   setTimeout('mewefx()',efxtmps); 
   else
   one.mew_efxtime=one.mew_efxsec;
   
   }

}


/* ----------------------
   Cette fonction affiche les differents bureaux
   Entrée:
   Sortie:
   Indications:
-------------------------*/
function showpaints(){
str="<H2>Custumize your home page</H2><HR size='1'>";
str2="";
    for (i =0 ; (i<painttab.length) ; i++) 
        {  
        	
        //On test si papier paint est activé
        if (painttab[i].active==1)
        { 	
	        // changement direct
	        //str+="<a href='#' onclick='javascript:painttab["+i+"].install(); document.getElementById(\"paintdiv\").style.display=\"none\";one.paintid="+i+";exit();'><img src='"+painttab[i].mini+"' style='padding-top:10px; border:3px solid'></a><H3>"+painttab[i].titre+"</H3><H5>Source: "+painttab[i].thesource+"</H5><a href='#' onclick='javascript:painttab["+i+"].install(); document.getElementById(\"paintdiv\").style.display=\"none\";one.paintid="+i+";exit();'><img src='../pic/savepaint-on.gif' style='border:0px;'></a><HR size='1' color='#cecece'><BR><BR>";	
	        str2="<a href='?paintid="+i+"''><img src='"+painttab[i].mini+"' style='padding-top:10px; border:3px solid'></a><!-- <H3>"+painttab[i].titre+"</H3> --><H5>"+(i+1)+"<BR>Source: "+painttab[i].thesource+"</H5><a href='?paintid="+i+"''><img src='../pic/savepaint-on.gif' style='border:0px;'></a><BR><BR><BR><BR>"+str2;	
	    }
	        
        }
 str+=str2;
 document.getElementById("paintdiv").innerHTML=str;
}

/* ----------------------
   Cette fonction affiche le menu bas en fonction de l utilisateur
   Entrée:
   Sortie:
   Indications:
-------------------------*/
function givemenu(){

//Menu d un membre connecte
menu="<a href='#' onclick='javascript:one.surf(f_myhome) '><img src=\"../pic/homedoc.png\" onmouseout=\"javascript:this.style.paddingBottom='5px'\" onmouseover=\"javascript:this.style.paddingBottom='10px' ; showEbox(\'ebox\', \'Back to home\', \'<a href= \\\'#\\\' onclick=\\\'javascript:one.surf(f_myhome) \\\'> <img class=\\\'noborder\\\' src=\\\'../pic/homedoc.png\\\' ></a>\');\" style='border:0px'></a><a href='#'><img src=\"../pic/maildoc-on.png\" onmouseout=\"javascript:this.style.paddingBottom='5px'\" onclick=\"javascript:one.mew_showP(mew_emailsPlaylist);\" onmouseover=\"javascript:this.style.paddingBottom='10px'; showEbox(\'ebox\', \'Check email\', one.mew_showPlaylistEbox(mew_emailsPlaylist)); \" style='border:0px'></a><a href='#'><img src=\"../pic/chatdoc-on.png\"  onclick=\"javascript:one.mew_showP(mew_blogsPlaylist);\" onmouseout=\"javascript:this.style.paddingBottom='5px'\" onmouseover=\"javascript:this.style.paddingBottom='10px' ; showEbox(\'ebox\', \'Blogs\', one.mew_showPlaylistEbox(mew_blogsPlaylist)); \" style='border:0px'></a><a href='#' onclick='javascript:one.surf(f_worldnews)'><img src=\"../pic/newsdoc-on.png\" onmouseout=\"javascript:this.style.paddingBottom='5px'\" onmouseover=\"javascript:this.style.paddingBottom='10px' ; showEbox(\'ebox\', \'Read all the newspapers of the world\', \'<a href= \\\'#\\\' onclick=\\\'javascript:one.surf(f_worldnews) \\\'> <img class=\\\'noborder\\\' src=\\\'../pic/worldnews-on.png\\\' ></a>\');\" style='border:0px'></a><a href='#' onclick='javascript:one.surf(f_myfaves) '><img src=\"../pic/favessdoc-on.png\" onmouseout=\"javascript:this.style.paddingBottom='5px'\" onmouseover=\"javascript:this.style.paddingBottom='10px' ; showEbox(\'ebox\', \'Browse your faves\', \'<a href= \\\'#\\\' onclick=\\\'javascript:one.surf(f_myfaves) \\\'> <img class=\\\'noborder\\\' src=\\\'../pic/favessdoc-on.png\\\' ></a>\');\" style='border:0px'></a><a href='#'><img src=\"../pic/musicdoc-on.png\" onmouseout=\"javascript:this.style.paddingBottom='5px'\" onclick=\"javascript:one.mew_showP(mew_musicPlaylist);\" onmouseover=\"javascript:this.style.paddingBottom='10px' ; showEbox(\'ebox\', \'Online Music\', one.mew_showPlaylistEbox(mew_musicPlaylist)); \" style='border:0px'></a><a href='#' onclick='javascript:one.surf(f_myfriends) '><img src=\"../pic/friendsdoc-on.png\" onmouseout=\"javascript:this.style.paddingBottom='5px'\" onmouseover=\"javascript:this.style.paddingBottom='10px' ; showEbox(\'ebox\', \'Browse your friends\', \'<a href= \\\'#\\\' onclick=\\\'javascript:one.surf(f_myfriends) \\\'> <img class=\\\'noborder\\\' src=\\\'../pic/friendsdoc-on.png\\\' ></a>\');\" style='border:0px'></a><a href='#' onclick='javascript:one.surf(f_community) '><img src=\"../pic/comdoc-on.png\" onmouseout=\"javascript:this.style.paddingBottom='5px'\" onmouseover=\"javascript:this.style.paddingBottom='10px' ; showEbox(\'ebox\', \'Browse community playlists\', \'<a href= \\\'#\\\' onclick=\\\'javascript:one.surf(f_community) \\\'> <img class=\\\'noborder\\\' src=\\\'../pic/community-on.png\\\' ></a>\');\" style='border:0px'></a><a href='#' onclick='javascript:one.surf(f_myedit) '><img src=\"../pic/editdoc-on.png\" onmouseout=\"javascript:this.style.paddingBottom='5px'\" onmouseover=\"javascript:this.style.paddingBottom='10px' ; showEbox(\'ebox\', \'Edit \', \'<a href= \\\'#\\\' onclick=\\\'javascript:one.surf(f_myedit) \\\'> <img class=\\\'noborder\\\' src=\\\'../pic/editdoc-on.png\\\' ></a>\');\" style='border:0px'></a><a href='#' onclick='javascript:one.surf(f_help) '><img src=\"../pic/helpdoc-on.png\" onmouseout=\"javascript:this.style.paddingBottom='5px'\" onmouseover=\"javascript:this.style.paddingBottom='10px' ; showEbox(\'ebox\', \'What is Mewob?\', \'<a href= \\\'#\\\' onclick=\\\'javascript:one.surf(f_help) \\\'> <img class=\\\'noborder\\\' src=\\\'../pic/helpdoc-on.png\\\' ></a>\');\" style='border:0px'></a>";


//Menu en mode non connecté
if (one.mew_user.login=="user")
//Menu d un membre connecte
menu="<a href='#' onclick='javascript:one.surf(f_home) '><img src=\"../pic/homedoc.png\" onmouseout=\"javascript:this.style.paddingBottom='0px'\" onmouseover=\"javascript:this.style.paddingBottom='10px' ; showEbox(\'ebox\', \'Back to home\', \'<a href= \\\'#\\\' onclick=\\\'javascript:one.surf(f_home) \\\'> <img class=\\\'noborder\\\' src=\\\'../pic/homedoc.png\\\' ></a>\');\" style='border:0px'></a><a href='#'><img src=\"../pic/maildoc-on.png\"  onclick=\"javascript:one.mew_showP(mew_emailsPlaylist);\" onmouseout=\"javascript:this.style.paddingBottom='0px'\" onmouseover=\"javascript:this.style.paddingBottom='10px'; showEbox(\'ebox\', \'Check email\', one.mew_showPlaylistEbox(mew_emailsPlaylist)); \" style='border:0px'></a><a href='#'><img src=\"../pic/chatdoc-on.png\" onmouseout=\"javascript:this.style.paddingBottom='0px'\" onclick=\"javascript:one.mew_showP(mew_blogsPlaylist);\" onmouseover=\"javascript:this.style.paddingBottom='10px' ; showEbox(\'ebox\', \'Blogs\', one.mew_showPlaylistEbox(mew_blogsPlaylist)); \" style='border:0px'></a><a href='#' onclick='javascript:one.surf(f_worldnews) '><img src=\"../pic/newsdoc-on.png\" onmouseout=\"javascript:this.style.paddingBottom='0px'\" onmouseover=\"javascript:this.style.paddingBottom='10px' ; showEbox(\'ebox\', \'Read all the newspapers of the world\', \'<a href= \\\'#\\\' onclick=\\\'javascript:one.surf(f_worldnews) \\\'> <img class=\\\'noborder\\\' src=\\\'../pic/worldnews-on.png\\\' ></a>\');\" style='border:0px'></a><a href='#'><img src=\"../pic/musicdoc-on.png\"  onclick=\"javascript:one.mew_showP(mew_musicPlaylist);\" onmouseout=\"javascript:this.style.paddingBottom='0px'\"  onmouseover=\"javascript:this.style.paddingBottom='10px' ; showEbox(\'ebox\', \'Online Music\', one.mew_showPlaylistEbox(mew_musicPlaylist)); \" style='border:0px'></a><a href='#' onclick='javascript:one.surf(f_community) '><img src=\"../pic/comdoc-on.png\" onmouseout=\"javascript:this.style.paddingBottom='0px'\" onmouseover=\"javascript:this.style.paddingBottom='10px' ; showEbox(\'ebox\', \'Browse community playlists\', \'<a href= \\\'#\\\' onclick=\\\'javascript:one.surf(f_community) \\\'> <img class=\\\'noborder\\\' src=\\\'../pic/community-on.png\\\' ></a>\');\" style='border:0px'></a><a href='#' onclick='javascript:one.surf(f_help) '><img src=\"../pic/helpdoc-on.png\" onmouseout=\"javascript:this.style.paddingBottom='0px'\" onmouseover=\"javascript:this.style.paddingBottom='10px' ; showEbox(\'ebox\', \'What is Mewob?\', \'<a href= \\\'#\\\' onclick=\\\'javascript:one.surf(f_help) \\\'> <img class=\\\'noborder\\\' src=\\\'../pic/helpdoc-on.png\\\' ></a>\');\" style='border:0px'></a>";

//menu="<img src=\"../pic/doc-left.png\"><img src=\"../pic/doc-right.png\">";


return menu;
  }

/* ----------------------
   Cette fonction affiche le un div translucide haut horizontal avec un contenu passer en parametre
   Entrée: nom, titre,contenu
   Sortie:
   Indications:
-------------------------*/
function showEboxV(nom, titre, contenu){

//pout tester si le navigateur est Internet explorer.
isIE = false;

//Recherche de l ebox.	
fenetre=document.getElementById(nom);

if (fenetre !=undefined){
	
	//Initialisation de l ebox
	  fenetre.style.backgroundImage = "url(\"../pic/eboxback.png\")";
	  //fenetre.style.borderTop = "1px solid #fffffff";
	  fenetre.style.backgroundRepeat = "repeat-y";
      fenetre.style.backgroundPosition = "center";

	  
//On ferme la ebox.
fenetre.style.display="none";

//Capture de la position de la fenetre
//===================================================
/*
	if (navigator.appName == "Microsoft Internet Explorer"){IE = true}
	if (!IE){document.captureEvents(Event.MOUSEMOVE)}
	m = document.onmousemove;

  		if (IE)	{
			 var tmpX = event.clientX;
  			 var tmpY = event.clientY;
			}	
 		else 	{
    			 var tmpX = m.pageX;
			 var tmpY = m.pageY;
  			}  
		if (!document.body.scrollTop)
			{
			 var iL = document.documentElement.scrollLeft;	
			 var iV = document.documentElement.scrollTop;
			}
		else 	{
			 var iL = document.body.scrollLeft;	
			 var iV = document.body.scrollTop;	
			}
  		sourisx = tmpX + iL;
  		sourisy = tmpY + iV;
  		
  //Cas d'une fenetre volante
//fenetre.style.top=sourisy;
//fenetre.style.left=sourisx;

//===================================================
//fin de la capture des coordonnées de la souris  
*/

//Cas d'une fenetre fixe 
fenetre.align="center";
fenetre.style.bottom=70;
fenetre.style.width="100%";

//sourisx=400;
//sourisy=500;



fenetre.style.position='absolute';
fenetre.style.margins =60;

//On ouvre la box
fenetre.style.display=""; 

//On affiche le div a la hauteur de la souris
fenetre.innerHTML ="<TABLE><TR><TD></TD><TD class=\"eboxtitre\" align=\"left\">"+titre+"</TD><TD><a href=\"#\" onclick=\"document.getElementById('"+nom+"\').style.display=\'none\';\"><img class=\"noborder\" src=\"../pic/eboxclose.png\"></a></TD></TR><TR><TD></TD><TD>"+contenu+"</TD><TD></TD></TR><TR><TD></TD><TD><!-- bas--></TD><TD></TD></TR></TABLE>"
}

 }

/* ----------------------
   Cette fonction affiche le un div translucide Verticalement sans limite  avec un contenu passer en parametre
   Entrée: nom, titre,contenu
   Sortie:
   Indications:
-------------------------*/
function showEbox(nom, titre, contenu){

// Desactivation de la ebox
return 1;

//pout tester si le navigateur est Internet explorer.
isIE = false;

//Recherche de l ebox.	
fenetre=document.getElementById(nom);

if (fenetre !=undefined){
	
	  
//On ferme la ebox.
fenetre.style.display="none";

//Capture de la position de la fenetre
//===================================================
/*
	if (navigator.appName == "Microsoft Internet Explorer"){IE = true}
	if (!IE){document.captureEvents(Event.MOUSEMOVE)}
	m = document.onmousemove;

  		if (IE)	{
			 var tmpX = event.clientX;
  			 var tmpY = event.clientY;
			}	
 		else 	{
    			 var tmpX = m.pageX;
			 var tmpY = m.pageY;
  			}  
		if (!document.body.scrollTop)
			{
			 var iL = document.documentElement.scrollLeft;	
			 var iV = document.documentElement.scrollTop;
			}
		else 	{
			 var iL = document.body.scrollLeft;	
			 var iV = document.body.scrollTop;	
			}
  		sourisx = tmpX + iL;
  		sourisy = tmpY + iV;
  		
  //Cas d'une fenetre volante
//fenetre.style.top=sourisy;
//fenetre.style.left=sourisx;

//===================================================
//fin de la capture des coordonnées de la souris  
*/

//Cas d'une fenetre fixe 
fenetre.align="center";
fenetre.style.bottom=70;
fenetre.style.width="100%";

//sourisx=400;
//sourisy=500;



fenetre.style.position='absolute';
fenetre.style.margins =60;

//On ouvre la box
fenetre.style.display=""; 

//On affiche le div a la hauteur de la souris
fenetre.innerHTML ="<TABLE cellSpacing=\"0\"  cellPadding=\"0\"><TR><TD style=\"background:transparent\"><img class=\"noborder\" src=\"../pic/eboxtop.png\"></a></TD></TR><TR><TD class=\"eboxtitre\" valign=\"top\" align=\"left\"  style=\"background-image: url(\'../pic/eboxHback.png\'); background-repeat: repeat-y; background-position:center;\">"+titre+"<a href=\"#\" onclick=\"document.getElementById('"+nom+"\').style.display=\'none\'; \"><img class=\"noborder\" src=\"../pic/eboxclose.png\" style=\"float:right;\"></a></TD></TR><TR><TD style=\"background-image: url(\'../pic/eboxHback.png\'); background-repeat: repeat-y; background-position:center; padding-left:40px;padding-right:40px;padding-bottom:20px;\">"+contenu+"</TD></TR><TR><TD><!-- bas--></TD></TR><TR><TD  style=\"background:transparent\"><img class=\"noborder\" src=\"../pic/eboxbas.png\"></a></TD></TR></TABLE>"
}

 }



/*=======================================================
mew_showPlaylistEbox(playlist)
Cette fonction retourne la liste des pages de la playlist
=========================================================*/
function mew_showPlaylistEbox(playlist){
 r="<a href=\"#\" onclick=\"javascript:mew_Play_theP("+playlist.variable+") \"><img title=\"Play all "+playlist.titre+" links\" onmouseover=\"javascript:onPic(this)\" onmouseout=\"javascript:offPic(this)\" class=\"noborder\" width=\"60px\" src=\"../pic/bigplay-off.png\"></a>";
 
 for (i=0; i< playlist.pages.length; i++ )
 {
r+="<a href=\"#\" onclick=\"javascript:one.mew_Play_theP_i("+playlist.variable+","+i+") \"> <img class=\"noborder\" width=\"60px\"  src=\"../pic/"+playlist.pages[i].titre+".png\"></a>";
  }
 
 //On test si la playlist n'est pas vide
if (i==0)
r="Sorry this playlist is empty."
 
return r; 
}

/*=======================================================
mew_Play_theP_i(playlist, index)
Cette fonction affiche directement la page i de la playlist sans la dérouler,
La lecture commence à partir de la page numéro i
=========================================================*/
function mew_Play_theP_i(playlist, i){
    one.PlaylistToshow=playlist;
    one.mew_PlayP_i(i);
}

/*=======================================================
mew_Play_the(playlist)
Cette fonction lance directement la playlist sans l'afficher
=========================================================*/
function mew_Play_theP(playlist){
    one.PlaylistToshow=playlist;
    one.mew_PlayP();
}

/*=======================================================
mew_GiveMenuFrame()
Cette fonction retourne le menu bas et positionne la ebox
=========================================================*/
function mew_GiveMenuFrame(){
    result="<div id=\"ebox\" style=\"display:none;\"></div><div id=\"framecontent\"><div class=\"innertube\" >	<TABLE cellSpacing=\"0\"  cellPadding=\"0\" border=\"0\"  align=\'center\' id=\"menutable\">            <TR>              <TD style=\"height:50px;\">              	<img src=\"../pic/doc-left.png\">              </TD>              <TD style=\"background: transparent url(../pic/docback.png) top left repeat-x;padding-bottom:0px;_padding-bottom:15px;\">"+givemenu()+"</TD>              <TD>              	<img src=\"../pic/doc-right.png\">              </TD>             </TR>      </TABLE></div></div>";
    
    return result;
}

/*=======================================================
mew_RefreshPlaylist(title)
Cette fonction affiche la playlist title de l utilisateur
=========================================================*/
function mew_RefreshPlaylist(title){
mew_createAndShowP(title);
}


