/**
* Envoyer une page à un ami
**/
ressourcesTextes.add([["glo.saisir_votre_nom","Inscrivez votre nom."],["glo.envoi_ami_reussi","Nous avons envoyé un message à votre ami, l'invitant à visiter cette page."],["extr.widget_article","Consultez un article différent chaque jour et étoffez vos connaissances sur l’histoire de l’art."],["extr.widget_babillard","Soyez au courant de certains événements touchant le domaine artistique."],["extr.widget_galerie","Admirez les œuvres de divers artistes de talent inscrits sur le site."],["extr.widget_telechargement","Avant de télécharger un gadget logiciel, vous devez installer Google Desktop."],["extr.widget_lien","Lien vers Google Desktop."]]);

var envAmiFrmHelper= null;
var popUpEnvAmi= null;
var eamicode= 0;
var popCreerDossier;
var popRenommerDossier;
var cDossierFrmHelper;

function envoyerAmi(){
var html= '<div id="envoyer-ami">';
html+= '<a class="fermer" href="" onclick="popUpEnvAmi.close(); return false;">Fermer</a>';
html+= '<form action="" id="frmEnvoyerAmi">';
html+= '    <table>';
html+= '<tr>';
html+= '      <td class="interrogation"><a class="interrogation1" href="#" id="email_i">?</a></td>';
html+= '  <td>';
html+= '    <label for="email">'+ _TR("pvp.courriel" ,"Courriel")+ '</label><br />';
html+= '    <input id="email" type="text" tabindex="1" maxlength="100" />';
html+= '  </td>';
html+= '</tr>';
html+= '<tr>';
html+= '      <td class="interrogation"><a class="interrogation1" href="#" id="nom_i">?</a></td>';
html+= '  <td>';
html+= '    <label for="nom">'+ _TR("glo.votre_nom" ,"Votre nom")+ '</label><br />';
html+= '    <input id="nom" type="text" tabindex="2" maxlength="100" />';
html+= '  </td>';
html+= '</tr>';
html+= '</table>';
html+= '<p class="soumettre"><a href="#" tabindex="4" onclick="envoyerAmiSoum(); return false;" >'+ _TR("all.soumettre" ,"Soumettre")+ '</a></p>';
html+= '</form>';
html+= "</div>";
var cible= $("add-fav");
if(cible){} else{
cible= $("add-rss");}
var coords= YAHOO.util.Dom.getXY(cible);
popUpEnvAmi= new PopUpHtml(html, coords[0]-40, coords[1]-20, 280, 400);
var cf_data=[["email", _TR("glo.envoyer_ami_email" ,"Veuillez saisir le courriel de votre ami."), true],["nom", _TR("glo.saisir_votre_nom" ,"Veuillez saisir votre nom."), true]];
var params= "&plugin=commentaire&action=envoyer_ami";
var titre= document.title;
var sepa= titre.lastIndexOf("-");
if(sepa>0){
titre= titre.substr(0, sepa);}
params+= "&titre="+ titre;
params+= "&url="+ getCurStateUrl();
params+= "&eamicode="+ eamicode;
var langueid= 1;
if(curlangue== "en") langueid= 2;
params+= "&langueid="+ langueid;
envAmiFrmHelper= new FormulaireHelper(cf_data, "frmEnvoyerAmi", params, null, envoyerAmiSoum, true);
envAmiFrmHelper.afterSuccessSave= envoiAmiReussi;}

function envoiAmiReussi(){
alert(_TR("glo.envoi_ami_reussi", "Nous avons envoyé un message à votre ami contenant un lien vers cette page"));
popUpEnvAmi.close();}

function reCap(){
var now= new Date();
var img_capcha= $("img_capcha");
img_capcha.src='/plugin.php?plugin=visiteur&action=captcha&t='+now.getTime();
return false;}

function envoyerAmiSoum(){
envAmiFrmHelper.valider();}

function widgetArticle(){
$("widget_base").style.display= "none";
$("widget_remplace").style.display= "block";
var html= "";
html+= "<a href='#' id='fermerDetails' onclick='enabled_widget_base()'>Fermer</a>";
html+= "<p id='introPres'>"+ _TR("extr.widget_telechargement" ,"Avant de télécharger un gadget logiciel, vous devez installer Google Desktop.")+ "</p>";
html+= "<p id='googleDesk'><a href='http://desktop.google.com/' target='_blank'> "+ _TR("extr.widget_lien" ,"Lien vers Google Desktop.")+ "</a></p>";
html+= "<p id='introWidget'>"+ _TR("extr.widget_article" ,"Consultez un article différent chaque jour et étoffez vos connaissances sur l’histoire de l’art.")+ "</p>";
html+= "<table id='btns_widgets'>";
html+= "<tr>";
html+= "<td class='pc_link' align='right'>";
html+= "<a href='/medias/widgets/pc_article_oetda.gg'>PC</a>";
html+= "</td>";
html+= "<td class='mac_link' align='left'>";
html+= "<a href='/medias/widgets/mac_article_oetda.gg'>MAC</a>";
html+= "</td>";
html+= "</tr>";
html+= "</table>";
$("widget_remplace").innerHTML= html;
$("metachoseBg").style.background= "url(/images/bg_repeat_metachose2.gif)";
$("Aide").style.backgroundImage= "url(/images/titre_nom_widgetBlanc.jpg)";
$("metachosebottom").style.background= "url(/images/metachose_btm2.gif)";}

function widgetBabillard(){
$("widget_base").style.display= "none";
$("widget_remplace").style.display= "block";
var html= "";
html+= "<a href='#' id='fermerDetails' onclick='enabled_widget_base()'>Fermer</a>";
html+= "<p id='introPres'>"+ _TR("extr.widget_telechargement" ,"Avant de télécharger un gadget logiciel, vous devez installer Google Desktop.")+ "</p>";
html+= "<p id='googleDesk'><a href='http://desktop.google.com/' target='_blank'> "+ _TR("extr.widget_lien" ,"Lien vers Google Desktop.")+ "</a></p>";
html+= "<p id='introWidget'>"+ _TR("extr.widget_babillard" ,"Soyez au courant de certains événements touchant le domaine artistique.")+ "</p>";
html+= "<table id='btns_widgets'>";
html+= "<tr>";
html+= "<td class='pc_link' align='right'>";
html+= "<a href='/medias/widgets/pc_babillard_oetda.gg'>PC</a>";
html+= "</td>";
html+= "<td class='mac_link' align='left'>";
html+= "<a href='/medias/widgets/mac_babillard_oetda.gg'>MAC</a>";
html+= "</td>";
html+= "</tr>";
html+= "</table>";
$("widget_remplace").innerHTML= html;
$("metachoseBg").style.background= "url(/images/bg_repeat_metachose2.gif)";
$("Aide").style.backgroundImage= "url(/images/titre_nom_widgetBlanc.jpg)";
$("metachosebottom").style.background= "url(/images/metachose_btm2.gif)";}

function widgetGalerie(){
$("widget_base").style.display= "none";
$("widget_remplace").style.display= "block";
var html= "";
html+= "<a href='#' id='fermerDetails' onclick='enabled_widget_base()'>Fermer</a>";
html+= "<p id='introPres'>"+ _TR("extr.widget_telechargement" ,"Avant de télécharger un gadget logiciel, vous devez installer Google Desktop.")+ "</p>";
html+= "<p id='googleDesk'><a href='http://desktop.google.com/' target='_blank'> "+ _TR("extr.widget_lien" ,"Lien vers Google Desktop.")+ "</a></p>";
html+= "<p id='introWidget'>"+ _TR("extr.widget_galerie" ,"Admirez les œuvres de divers artistes de talent inscrits sur le site.")+ "</p>";
html+= "<table id='btns_widgets'>";
html+= "<tr>";
html+= "<td class='pc_link' align='right'>";
html+= "<a href='/medias/widgets/pc_galerie_oetda.gg'>PC</a>";
html+= "</td>";
html+= "<td class='mac_link' align='left'>";
html+= "<a href='/medias/widgets/mac_galerie_oetda.gg'>MAC</a>";
html+= "</td>";
html+= "</tr>";
html+= "</table>";
$("widget_remplace").innerHTML= html;
$("metachoseBg").style.background= "url(/images/bg_repeat_metachose2.gif)";
$("Aide").style.backgroundImage= "url(/images/titre_nom_widgetBlanc.jpg)";
$("metachosebottom").style.background= "url(/images/metachose_btm2.gif)";}
function enabled_widget_base(){
$("widget_base").style.display= "block";
$("widget_remplace").style.display= "none";
$("metachoseBg").style.backgroundImage= "url(/images/bg_repeat_metachose.gif)";
$("Aide").style.backgroundImage= "url(/images/titre_nom_widget2.jpg)";
$("metachosebottom").style.backgroundImage= "url(/images/metachose_btm.gif)";}