/**
* 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(){
if(popUpEnvAmi){
popUpEnvAmi.close();
popUpEnvAmi= null;}
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("all.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= $w("partage_link");
try{
var coords= $j(cible).offset();
popUpEnvAmi= new PopUpHtml(html, coords.left-200, coords.top+30, 280, 400);} catch(e){
var coords= YAHOO.util.Dom.getXY(cible);
popUpEnvAmi= new PopUpHtml(html, coords[0]-300, coords[1]-20, 280, 400);}
var cf_data=[["email", _TR("glo.envoyer_ami_email" ,"Inscrivez l\'adresse de courriel de votre ami."), true],["nom", _TR("glo.saisir_votre_nom" ,"Inscrivez 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;
envAmiFrmHelper= new FormulaireHelper(cf_data,"frmEnvoyerAmi" , params, null, envoyerAmiSoum, true);
envAmiFrmHelper.afterSuccessSave= envoiAmiReussi;}

function envoiAmiReussi(){
$j("#frmEnvoyerAmi").html("<p><br />"+ _TR("glo.envoi_ami_reussi","Nous avons envoyé un message à votre ami, l\'invitant à visiter cette page." )+"</p>" );}

function reCap(){
var now= new Date();
var img_capcha= $w("img_capcha");
img_capcha.src='/plugin.php?plugin=visiteur&action=captcha&t='+now.getTime();
return false;}

function envoyerAmiSoum(){
envAmiFrmHelper.valider();}

function widgetArticle(){
$w("widget_base").style.display="none";
$w("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 >";
html+="<a href='"+ _URL_MEDIA("widgets/article_oetda.gg")+"'>Widget Article</a>";
html+="</td>";
html+="</tr>";
html+="</table>";
$w("widget_remplace").innerHTML= html;
$w("metachoseBg").style.background="url(/images/bg_repeat_metachose2.gif)";
$w("Aide").style.backgroundImage="url(/images/titre_nom_widgetBlanc.jpg)";
$w("metachosebottom").style.background="url(/images/metachose_btm2.gif)";}

function widgetBabillard(){
$w("widget_base").style.display="none";
$w("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 >";
html+="<a href='"+ _URL_MEDIA("widgets/babillard_oetda.gg")+"'>Widget Babillard</a>";
html+="</td>";
html+="</tr>";
html+="</table>";
$w("widget_remplace").innerHTML= html;
$w("metachoseBg").style.background="url(/images/bg_repeat_metachose2.gif)";
$w("Aide").style.backgroundImage="url(/images/titre_nom_widgetBlanc.jpg)";
$w("metachosebottom").style.background="url(/images/metachose_btm2.gif)";}

function widgetGalerie(){
$w("widget_base").style.display="none";
$w("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 >";
html+="<a href='"+ _URL_MEDIA("widgets/galerie_oetda.gg")+"'>Widget Galerie</a>";
html+="</td>";
html+="</tr>";
html+="</table>";
$w("widget_remplace").innerHTML= html;
$w("metachoseBg").style.background="url(/images/bg_repeat_metachose2.gif)";
$w("Aide").style.backgroundImage="url(/images/titre_nom_widgetBlanc.jpg)";
$w("metachosebottom").style.background="url(/images/metachose_btm2.gif)";}
function enabled_widget_base(){
$w("widget_base").style.display="block";
$w("widget_remplace").style.display="none";
$w("metachoseBg").style.backgroundImage="url(/images/bg_repeat_metachose.gif)";
$w("Aide").style.backgroundImage="url(/images/titre_nom_widget2.jpg)";
$w("metachosebottom").style.backgroundImage="url(/images/metachose_btm.gif)";}
