var wnc_son = '0'; 
var wnc_fermer = '0';
var wnc_infopop_base_url = 'http://media.acces-charme.com/infopop';
var wnc_url_pub = 'http://media.acces-charme.com/pdv/track.php?produit=vod&idw=24&t1=sexecollection&t2=infopop&lg=fr&ids=0&idn=1&paiement=cb&typeo=infopop&rebill=1&ido=326&ide=27025';
/* var wnc_url_pub = 'http://www.branlix.com/track.php?produit=vod&idw=24&t1=sexecollection&t2=infopop&lg=fr&ids=0&idn=1&paiement=cb&typeo=infopop&rebill=1&ido=326&ide=27025'; */
var wnc_url_clic = 'http://media.acces-charme.com/infopop/click.php?ido=326&ide=27025';
var wnc_url_son = 'http://media.acces-charme.com/infopop/son.php?piste=1';
var wnc_thumb_pour_dhtml = '110.jpg';
wnc_infopop_template = '<style type="text/css">';
wnc_infopop_template += '#wnc_infopop {width:320px;height:260px;position:fixed;overflow:hidden;right:30px;bottom:0;padding-top:5px;z-index:10000;border:none;}';
wnc_infopop_template += '#wnc_infopop img {border:none;}';
wnc_infopop_template += '* html #wnc_infopop {position:absolute;top:expression(documentElement.scrollTop+body.scrollTop+document.documentElement.clientHeight-255);right:5px;}';
wnc_infopop_template += '#wnc_pop_move {height:250px;width: 320px;margin:265px 0 0 0 ;position:relative;}';
wnc_infopop_template += '#wnc_player_326 {width:320px;height:250px;position:absolute;top:0;left:0;z-index:10040;}';
wnc_infopop_template += '#wnc_loading_326 {width:320px;height:250px;position:absolute;top:0;left:0;z-index:10030;}';
wnc_infopop_template += '#wnc_play_326 {width:320px;height:250px;position:absolute;top:0;left:0;z-index:10020;filter:alpha(opacity=70);-moz-opacity:0.7;opacity:0.7;}';
wnc_infopop_template += '#wnc_thumb_326 {width:320px;height:240px;position:absolute;top:0px;left:0;z-index:10010;}';
wnc_infopop_template += '#wnc_play {width:220px;height:50px;position:absolute;bottom:0px;left:0px;z-index:10020;}';
wnc_infopop_template += '</style>';
wnc_infopop_template += '<div id="wnc_infopop"><div id="wnc_pop_move">';
wnc_infopop_template += '<a href="http://www.sexecollection.com/boost-ratio.html" target="_blank" onclick="wnc_infopop_clic();">';wnc_infopop_template += '<img src="http://img.acces-charme.com/media/infopop/326/images/player.gif" border="0" alt="" id="wnc_player_326"/></a>';
wnc_infopop_template += '<img src="http://img.acces-charme.com/media/infopop/326/images/loading.gif" border="0" alt="" id="wnc_loading_326"/>';
wnc_infopop_template += '<img src="http://img.acces-charme.com/media/infopop/326/images/play.gif" border="0" alt="" id="wnc_play_326"/>';
wnc_infopop_template += '<img src="http://img.acces-charme.com/media/thumbs/320x240/110.jpg" alt="" id="wnc_thumb_326" />';
wnc_infopop_template += '<a href="http://media.acces-charme.com/pdv/track.php?produit=vod&idw=24&t1=sexecollection&t2=infopop&lg=fr&ids=0&idn=1&paiement=cb&typeo=infopop&rebill=1&ido=326&ide=27025" target="_blank" onclick="wnc_infopop_clic();">';wnc_infopop_template += '<img src="http://img.acces-charme.com/media/infopop/326/images/blank.gif" border="0" alt="" id="wnc_play"/></a></div></div>';
var wnc_son_ok = true;
var wnc_time_up = "35000";
var wnc_time_down = "4000";
document.write(wnc_infopop_template);

function wnc_ouvrir_popdhtml_infopop() {
	wnc_rpc('wnc_infopop', 'wnc_infopop_clic', wnc_url_clic);
	// alert("clic : "+wnc_url_clic);
	wnc_ouvrir_popdhtml();
	// return false;
}

function wnc_ouvrir_popdhtml_infopop_video() {
	parent.frames['wnc_video_infopop'].player.sendEvent('PLAY', 'false');
	wnc_rpc('wnc_infopop', 'wnc_infopop_clic', wnc_url_clic);
	wnc_ouvrir_popdhtml();	
	// return false;
}

function wnc_fermer_popdhtml_infopop_video() {
	wnc_fermer_popdhtml();
	parent.frames['wnc_video_infopop'].player.sendEvent('PLAY', 'true');
	return false;
}

function wnc_infopop_clic() {
	wnc_rpc('wnc_infopop', 'wnc_infopop_clic', wnc_url_clic);
}

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;
		}
	}
}

function wnc_infopop_move (what, sens) {
	var quoi = document.getElementById(what);
	var origine = quoi.offsetWidth;
	var haut = sens > 0 ? 0 : origine;
	if ((wnc_son > 0) && (wnc_son_ok)) {
		wnc_rpc('wnc_infopop', 'wnc_infopop_son', wnc_url_son);
		if (wnc_son == 1) wnc_son_ok = false;
	}
	if (sens > 0) { wnc_time = wnc_time_down; } else { wnc_time = wnc_time_up; }
	setTimeout('wnc_infopop_move("wnc_pop_move",'+(-1*sens)+')', wnc_time);
	wnc_infopop_updown(what, haut, origine, sens);
	return false;
}

function wnc_infopop_updown (what, haut, origine, sens) {
	var quoi = document.getElementById(what);
	haut += sens;
	if (haut>0 && haut<origine) {
		quoi.style.marginTop = haut+'px';
		setTimeout('wnc_infopop_updown("'+what+'",'+haut+','+origine+','+sens+')',5);
	}
}

function wnc_infopop_close () {
	if (wnc_fermer == "1") { document.getElementById("wnc_infopop").style.display = "none"; } else { wnc_popup(); }
}

setTimeout('wnc_infopop_move("wnc_pop_move",-10)', 3000); 
