 

var wnc_thumb_pour_dhtml = '';
var wnc_w = '0';
var wnc_pop = '1';
var wnc_fermer = '0';
var wnc_url_pub = 'http://media.acces-charme.com/pdv/track.php?produit=vod&idw=750&t1=mbporno&t2='+tracker+'&lg=fr&idn=1&paiement=cb&rebill=1&idpdv_from=28';
var wnc_url_pub2 = 'http://www.branlix.com/track.php?produit=vod&idw=750&t1=mbporno&t2='+tracker+'&lg=fr&ids=0&idn=1&paiement=cb&typeo=pdv&rebill=1&ido=&idpdv=28&idfhg=0&idv=0&iddhtml=295';
var wnc_url_stats = 'http://media.acces-charme.com/dhtml/stats.php?ido=295&ide=455634&typeo=pdv';
var wnc_dhtml_url_base_thumbs = '';
var wnc_thumb_pour_dhtml = 'http://img.acces-charme.com/media/dhtml/295/images/loading.gif';

wnc_dhtml_template = '<style type="text/css">';
wnc_dhtml_template += '#wnc_back_over {display:none;position:fixed;left:0;top:0;background:#000000;opacity:0.8;filter:alpha(opacity=80);z-index: 20000;}';
wnc_dhtml_template += '*html #wnc_back_over {position:absolute; top:expression(documentElement.scrollTop+body.scrollTop);}';
wnc_dhtml_template += '#wnc_container img {vertical-align:bottom;}';
wnc_dhtml_template += '#wnc_dhtml {display:none;position:fixed;width:924px;height:419px;top:50%;left:50%;margin: -230px 0 0 -462px;z-index:20002;font-family: "Trebuchet MS", Verdana, Arial;}';
wnc_dhtml_template += '*html #wnc_dhtml {position:absolute;top:expression(documentElement.scrollTop+body.scrollTop);}';
wnc_dhtml_template += '#wnc_dhtml_close {position: absolute;right:0;bottom:0;cursor:pointer;z-index:20004;width:100%;text-align:center;display:block;color:#FFF;}';
wnc_dhtml_template += '#wnc_interdit {position: absolute;left:175px;top:167px;z-index:20004;display:block;opacity:0.9;filter:alpha(opacity=90);}';
wnc_dhtml_template += '#wnc_thumb_from_pdv {position: absolute  ;left:30px;top: 70px;width:400px;height:300px;}';
wnc_dhtml_template += '#wnc_container {position:relative;z-index:20003;width:924px;height:440px;}';
wnc_dhtml_template += '#wnc_frame {position:absolute;top:0;left:0;}';
wnc_dhtml_template += '#wnc_player { width:400px;height:19px;background:url(http://img.acces-charme.com/media/dhtml/295/images/player/lecteur_background.gif) repeat-x; position:absolute;top:370px;left:30px;}';
wnc_dhtml_template += '#wnc_player_l1 { width:17px;height:19px;position:absolute;left:0;top:0;}';
wnc_dhtml_template += '#wnc_player_l2 { width:17px;height:19px;position:absolute;left:17px;top:0;}';
wnc_dhtml_template += '#wnc_player_l3 { height:19px;position:absolute;left:39px;top:0;z-index:110;}';
wnc_dhtml_template += '#wnc_player_l4 { height:19px;width:222px;position:absolute;left:39px;top:0;z-index:100;}';
wnc_dhtml_template += '#wnc_duree { position:absolute;bottom:3px;right:3px;color:#000;font-size:10px;font-weight:bold;text-align:right;display:block;}';
wnc_dhtml_template += '#wnc_player_lend { width:3px;height:19px;position:absolute;right:0px;top:0;}';
wnc_dhtml_template += '</style>';
wnc_dhtml_template += '<div id="wnc_back_over"></div>';
wnc_dhtml_template += '<sc'+'ript language="javascript">';
wnc_dhtml_template += 'document.getElementById("wnc_back_over").style.height = document.documentElement.clientHeight+"px";';
wnc_dhtml_template += 'document.getElementById("wnc_back_over").style.width = document.documentElement.clientWidth+"px";';
wnc_dhtml_template += '</sc'+'ript>';
wnc_dhtml_template += '<div id="wnc_dhtml">';
wnc_dhtml_template += '<div id="wnc_container" >';
wnc_dhtml_template += '<img src="http://img.acces-charme.com/media/dhtml/295/images/loading.gif" alt="Sexe Gratuit !" id="wnc_thumb_from_pdv" />';
wnc_dhtml_template += '<img src="http://img.acces-charme.com/media/dhtml/295/images/interdit.png" alt="" width="115" height="117" id="wnc_interdit"/>';
wnc_dhtml_template += '<img src="http://img.acces-charme.com/media/dhtml/295/images/back_1.gif" alt="" width="924" height="64"/>';
wnc_dhtml_template += '<img src="http://img.acces-charme.com/media/dhtml/295/images/back_2.gif" alt="" width="924" height="95"/>';
wnc_dhtml_template += '<img src="http://img.acces-charme.com/media/dhtml/295/images/back_3.gif" alt="" width="924" height="67"/>';
wnc_dhtml_template += '<img src="http://img.acces-charme.com/media/dhtml/295/images/back_4.gif" alt="" width="924" height="72"/>';
wnc_dhtml_template += '<img src="http://img.acces-charme.com/media/dhtml/295/images/back_5.gif" alt="" width="924" height="121"/>';
wnc_dhtml_template += '<div id="wnc_player">';
wnc_dhtml_template += '<div style="position:relative;height:19px;width:400px;">';
wnc_dhtml_template += '<img src="http://img.acces-charme.com/media/dhtml/295/images/player/lecteur1.gif" alt="" id="wnc_player_l1" />';
wnc_dhtml_template += '<img src="http://img.acces-charme.com/media/dhtml/295/images/player/lecteur2.gif" alt="" id="wnc_player_l2" />';
wnc_dhtml_template += '<img src="http://img.acces-charme.com/media/dhtml/295/images/player/lecteur3.gif" alt="" id="wnc_player_l3" style="width:116px;"/>';
wnc_dhtml_template += '<img src="http://img.acces-charme.com/media/dhtml/295/images/player/lecteur4.jpg" alt="" id="wnc_player_l4" />';
wnc_dhtml_template += '<img src="http://img.acces-charme.com/media/dhtml/295/images/player/curseur.jpg" alt="" style="width:8px;height:19px;position:absolute;top:0;left:155px;z-index:130;" />';
wnc_dhtml_template += '<img src="http://img.acces-charme.com/media/dhtml/295/images/player/lecteur_end.gif" alt="" id="wnc_player_lend" />';
wnc_dhtml_template += '<span id="wnc_duree">31:35</span>';
wnc_dhtml_template += '</div>';
wnc_dhtml_template += '</div>';
wnc_dhtml_template += '<a href="javascript:wnc_fermer_popdhtml2();" id="wnc_dhtml_close">Continuer la navigation</a>';
wnc_dhtml_template += '<iframe width="924" height="419" src="http://media.acces-charme.com/dhtml/295/form.php?ido=295&ide=455634&parametres_url=produit%3Dvod%26idw%3D750%26t1%3Dmbporno%26t2%3D'+tracker+'%26lg%3Dfr%26ids%3D0%26idn%3D1%26paiement%3Dcb%26typeo%3Dpdv%26rebill%3D1%26ido%3D%26idpdv%3D28%26idfhg%3D0%26idv%3D0%26iddhtml%3D295" id="wnc_frame" id="wnc_frame_name" frameborder="0" scrolling="no" allowtransparency="yes"></iframe>';
wnc_dhtml_template += '</div>';
wnc_dhtml_template += '</div>';
//wnc_dhtml_template += '<!-'+'-[if lte IE 6]>';
//wnc_dhtml_template += '<sc'+'ript language="javascript">';
//wnc_dhtml_template += 'document.getElementById("wnc_dhtml").style.marginTop = (document.documentElement.clientHeight-474)/2+"px";';
//wnc_dhtml_template += '</sc'+'ript>';
//wnc_dhtml_template += '<![endif]>';

function wnc_ouvrir_popdhtml() {
    document.getElementById("wnc_back_over").style.display = "block";
    document.getElementById("wnc_dhtml").style.display = "block";
    wnc_rpc('wnc_dhtml', 'wnc_dhtml_stats', wnc_url_stats);
    return false;
}

function wnc_ouvrir_popdhtml_depuis_pdv(params) {
    wnc_rpc('wnc_dhtml', 'wnc_pdv_stats', "http://media.acces-charme.com/pdv/click.php?"+params);
    /* wnc_url_pub = wnc_url_pub2;*/
    wnc_ouvrir_popdhtml();
}

function wnc_ouvrir_popdhtml_depuis_pdv2(params, thumb, url_pop) {
// HACK
    if (thumb != '') { 
        var thumb_tmp = thumb;
//        if (thumb.indexOf("http://") != "-1") { thumb_tmp = thumb; } else { thumb_tmp = wnc_dhtml_url_base_thumbs+"/"+thumb; }
        document.getElementById("wnc_thumb_from_pdv").src = thumb_tmp; 
    }
    wnc_rpc('wnc_dhtml', 'wnc_pdv_stats', "http://media.acces-charme.com/pdv/click.php?"+params);
    /* wnc_url_pub = wnc_url_pub2; */
    /*alert("http://media.acces-charme.com/pdv/click.php?"+params); */
    if (url_pop != '') { wnc_url_pub = url_pop; }
    wnc_ouvrir_popdhtml();
}

function wnc_ouvrir_popdhtml_depuis_pdv3(params, url_pub) {
    wnc_rpc('wnc_dhtml', 'wnc_pdv_stats', "http://media.acces-charme.com/pdv/click.php?"+params);
    wnc_url_pub = url_pub;
    wnc_ouvrir_popdhtml();
}

function wnc_ouvrir_popdhtml_depuis_pdv4(params, thumb, url_pop) {
    if (thumb != '') { 
        var thumb_tmp = "";
        var thumb_tmp2 = "";
        thumb_tmp = wnc_dhtml_url_base_thumbs+"/"+thumb; 
        thumb_tmp2 = wnc_dhtml_url_base_thumbs2+"/"+thumb;
        document.getElementById("wnc_thumb_from_pdv").src = thumb_tmp; 
        document.getElementById("wnc_thumb_from_pdv2").src = thumb_tmp2; 
    }
    wnc_rpc('wnc_dhtml', 'wnc_pdv_stats', "http://media.acces-charme.com/pdv/click.php?"+params);
    if (url_pop != '') { wnc_url_pub = url_pop; }
    wnc_ouvrir_popdhtml();
}

function wnc_ouvrir_popdhtml_depuis_pdv_adwords(params, thumb, url_pop, url_pop2) {
    if (thumb != '') { document.getElementById("wnc_thumb_from_pdv").src = wnc_dhtml_url_base_thumbs+"/"+thumb; }
    wnc_rpc('wnc_dhtml', 'wnc_pdv_stats', "http://media.acces-charme.com/pdv/click.php?"+params);
    wnc_ouvrir_popdhtml();
    if (url_pop2 != '') { wnc_popup_url(url_pop2); }
}

function wnc_ouvrir_popdhtml_depuis_mosaique(ido, ide, thumb) {
    document.getElementById("wnc_thumb_from_pdv").src = wnc_dhtml_url_base_thumbs+"/"+thumb;
    wnc_rpc('wnc_dhtml', 'wnc_mosaique_stats', "http://media.acces-charme.com/mosaique/click.php?ido="+ido+"&ide="+ide);
    wnc_ouvrir_popdhtml();
}

function wnc_ouvrir_popdhtml_depuis_mosaique_sans_thumb(ido, ide) {
    wnc_rpc('wnc_dhtml', 'wnc_mosaique_stats', "http://media.acces-charme.com/mosaique/click.php?ido="+ido+"&ide="+ide);
    wnc_ouvrir_popdhtml();
}

function wnc_ouvrir_popdhtml_depuis_sites(params) {
    wnc_rpc('wnc_dhtml', 'wnc_sites_stats', "http://media.acces-charme.com/sites/click.php?"+params);
    wnc_ouvrir_popdhtml();
}

function wnc_fermer_popdhtml() {
    document.getElementById("wnc_back_over").style.display = "none";
    document.getElementById("wnc_dhtml").style.display = "none";
    if (wnc_pop == '1') wnc_popup();
    //return false;
}

function wnc_fermer_popdhtml2() {
    document.getElementById("wnc_back_over").style.display = "none";
    document.getElementById("wnc_dhtml").style.display = "none";
    if (wnc_thumb_pour_dhtml != "") document.getElementById("wnc_thumb_from_pdv").src = wnc_thumb_pour_dhtml;
    if (wnc_pop == '1') wnc_popup();
}

function wnc_popup() {
    var vnc_win_options = "width="+screen.availWidth+",height="+screen.availHeight+",scrollbars=1,resizable=1,toolbar=1,location=1,menubar=1,status=1,directories=0";
    var vnc_new_win = window.open(wnc_url_pub,"",vnc_win_options);
    vnc_new_win.blur(); window.self.focus();
    wnc_pop = '0';
}

function wnc_popup_url(pop_url) {
    var vnc_win_options = "width="+screen.availWidth+",height="+screen.availHeight+",scrollbars=1,resizable=1,toolbar=1,location=1,menubar=1,status=1,directories=0";
    var vnc_new_win = window.open(pop_url,"",vnc_win_options);
    vnc_new_win.blur(); window.self.focus();
}

function wnc_set_cookie(c_name, value, expiredays) {
    var exdate = new Date();
    exdate.setDate(exdate.getDate()+expiredays);
    document.cookie = c_name+ "=" +escape(value)+";"+((expiredays=='') ? "" : "expires="+exdate.toGMTString()+";")+"path=/;";
}

function wnc_get_cookie(c_name) {
    if (document.cookie.length > 0) {
        c_start = document.cookie.indexOf(c_name + "=");
        if (c_start != -1) {
            c_start = c_start + c_name.length+1;
            c_end = document.cookie.indexOf(";",c_start);
            if (c_end == -1) { c_end = document.cookie.length; }
            return unescape(document.cookie.substring(c_start,c_end));
        }
    }
    return "";
}

function wnc_rpc(where, new_id, url) {
    var theDiv = document.getElementById(where); 
    if (theDiv && document.createElement) {
        try {
                var iframe = document.createElement("iframe");
                iframe.setAttribute('src', url); 
                iframe.setAttribute('id', new_id);
                iframe.setAttribute('width', '1'); 
                iframe.setAttribute('height', '1'); 
                iframe.setAttribute('frameBorder', '0'); 
                iframe.setAttribute('scrolling', 'no');
                theDiv.appendChild(iframe);
        } catch(exception) {
            // This is for IE5 PC, which does not allow dynamic creation and manipulation of an iframe object. Instead, we'll fake it up by creating our own objects.
            iframe = '\<iframe id="'+new_id+'" src="'+url+'" style="';
            iframe += 'border:0px;';
            iframe += 'width:0px;';
            iframe += 'height:0px;';
            iframe += '"><\/iframe>';
            theDiv.innerHTML += iframeHTML;
        }
    }
}

if (typeof(wnc_w) == "undefined") { wnc_w = '0'; }
if (wnc_w == '1') {
    wnc_cook = wnc_get_cookie("wnc_dhtml_ok");
    if ((wnc_cook == null) || (wnc_cook == "")) {
        wnc_set_cookie("wnc_dhtml_ok", "oui", 0);
        document.write(wnc_dhtml_template);
        wnc_ouvrir_popdhtml();
    }
} else {
    document.write(wnc_dhtml_template);
}
