<!--
// (c)BEP CONCEPT - FRANCE
// Eric Pasquier

var tld_ = new Array()
tld_[0] = "com";
tld_[1] = "fr";
tld_[2] = "net";
tld_[3] = "ws";
tld_[4] = "info";
tld_[10] = "co.uk";
tld_[11] = "org.uk";
tld_[12] = "gov.uk";
tld_[13] = "ac.uk";
var topDom_ = 13;
var m_ = "mailto:";
var a_ = "@";
var d_ = ".";

function OpenGraphic(PImage) {
  whnd = window.open("", "", "top=0,left=0,width=1014,height=700,directories=no,location=no,menubar=no,status=no,toolbar=no, resizable=yes,scrollbars=yes");
  whnd.document.write("<div style=\"text-align:center;\" >");
  whnd.document.write("<form>");
/*  whnd.document.write("<input type=\"button\" value=\"Refermer cette fenêtre\" onclick=\"window.close();\" >");
  whnd.document.write("<br /><br />"); */
  whnd.document.write("<img src=\"" + PImage + "\" />");
  whnd.document.write("<br /><br />");
  whnd.document.write("<input type=\"button\" value=\"Refermer cette fenêtre\" onclick=\"window.close();\" />");
  whnd.document.write("</form>");
  whnd.document.write("</div>");
}

function mail(name, dom, tl, params)
{
        var s = e(name,dom,tl);
        document.write('<a href="'+m_+s+params+'">'+s+'</a>');
}

function mail2(name, dom, tl, params, display)
{
        document.write('<a href="'+m_+e(name,dom,tl)+params+'">'+display+'</a>');
}

function e(name, dom, tl)
{
        var s = name+a_;
        if (tl!=-2)
        {
                s+= dom;
                if (tl>=0)
                        s+= d_+tld_[tl];
        }
        else
                s+= swapper(dom);
        return s;
}

function swapper(d)
{
        var s = "";
        for (var i=0; i<d.length; i+=2)
                if (i+1==d.length)
                        s+= d.charAt(i)
                else
                        s+= d.charAt(i+1)+d.charAt(i);
        return s.replace(/\?/g,'.');
}


// Ouvre l'image dans une popup
function ouvrirImage(url, height, width) {
  window.open(url, '', 'height='+height+', width='+width +',toolbar=no,menubar=no,status=no,resizable=yes');
}

//-->
