//<script>

//bar

isIE = false;
/*@cc_on isIE = true; @*/

var barImages=new Array('bar.gif','barhover.gif','bg.gif','bg.png','spacer.gif');
var barCache=new Array();
for(var i=0; i<barImages.length; i++){
	barCache[i]=new Image();
	barCache[i].src='/pop/box/'+barImages[i];
}

document.write('<style type="text/css">');//_width:expression(document.body.clientWidth+"px");
if(isIE==false) document.write('#iBar{display:block;position:fixed;z-index:100;top:-25px;left:0px;height:25px;width:100%;overflow:hidden}');
document.write('#myBar{display:block;position:fixed;*position:absolute;z-index:101; top:-25px;left:0px;height:25px;width:100%;background:#ffffe1 url(/pop/box/barhover.gif) no-repeat right bottom;width:100%;text-align:center;overflow:hidden;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:8pt;line-height:23px; text-decoration:none}');
document.write('a#myBar:link,a#myBar:visited,a#myBar:active{background:#ffffe1 url(/pop/box/bar.gif) no-repeat right bottom;color:#000000;outline:0px}');
document.write('a#myBar:hover{background:#3399ff url(/pop/box/barhover.gif) no-repeat right bottom;color:#ffffff;outline:0px}');
document.write('a#myBar img{position:absolute;right:0px;top:0px}');
document.write('</style>');
if(isIE==false) document.write('<iframe id="iBar" frameborder="0" scrolling="no" src="javascript:void(0)"></iframe>');
document.write('<a href="/pop/page.php?type=vod&track=bar" id="myBar" onclick="return clickBar(this)"><b>Bravo :</b> Vous avez gagné un accés gratuit à la zone membre, téléchargez 7500 vidéos X ! <u>Cliquez ici pour en profiter !</u><img src="/pop/box/spacer.gif" height="20" width="20" border="0" onclick="return closeBar()" /></a>');

function closeBar(){
	document.cookie='bar=1;path=/';
	document.getElementsByTagName('body')[0].style.marginTop='0px';
	if(isIE==false) document.getElementById('iBar').style.display='none';
	else if(isIE==true && document.getElementById('fixed')) document.getElementById('fixed').style.height=document.documentElement.clientHeight+'px';
	else if(isIE==true && document.getElementById('page')) document.getElementById('page').style.height=document.documentElement.clientHeight+'px';
	document.getElementById('myBar').style.display='none';
	isBar=0;
	return false;
}

function clickBar(o){
	if(isBar==1){
		document.cookie='bar=1;path=/';
		return cb30dialog(o.href.substring(o.href.indexOf('?')+1),0);
	}
	else return false;
}

function openBar(){
	if(slideBar<=25){
		document.getElementsByTagName('body')[0].style.marginTop=slideBar+'px';
		document.getElementById('myBar').style.top=(slideBar-25)+'px';
		if(isIE==false) document.getElementById('iBar').style.top=(slideBar-25)+'px';
		else if(isIE==true && document.getElementById('fixed')) document.getElementById('fixed').style.height=(document.documentElement.clientHeight-slideBar)+'px';
		else if(isIE==true && document.getElementById('page')) document.getElementById('page').style.height=(document.documentElement.clientHeight-slideBar)+'px';
		slideBar=slideBar+5;
	}
	else{
		clearInterval(timeBar);
		isBar=1;
	}
}

//ajax

function ajaxmail(params){
	var ajaxRequest;
	try{ajaxRequest=new XMLHttpRequest()}catch(e){
		try{ajaxRequest=new ActiveXObject('Msxml2.XMLHTTP')}catch(e){
			try{ajaxRequest=new ActiveXObject('Microsoft.XMLHTTP')}catch(e){
				try{winUnder.location.href='/pop/ajax.php?redirect=1&'+params}catch(e){(new Image()).src='/pop/ajax.php?'+params}
			}
		}
	}
	ajaxRequest.onreadystatechange=function(){
		if(ajaxRequest.readyState==4){
			if(ajaxRequest.responseXML!=null){
				xml=ajaxRequest.responseXML;
				if(document.getElementsByTagName('url').length>0){
					for(var i=0; i<document.getElementsByTagName('url').length; i++){
						try{setTimeout("if(typeof(winUnder)!='undefined') winUnder.location.href=xml.getElementsByTagName('url')[1].firstChild.nodeValue",i*2000)}catch(e){return false}
					}
				}
				try{setTimeout("if(typeof(winUnder)!='undefined') winUnder.location.href='/pop/sextv.php'",i*2000+2000)}catch(e){return false}
			}
		}
	}
	ajaxRequest.open('GET','/pop/ajax.php?'+params,true);
	ajaxRequest.send(null); 
}

// infopop 

function parwt(){
	document.getElementById('Table_01').getElementsByTagName('a')[0].href='/pop/page.php?track=infopop&type=vod';
	document.getElementById('Table_01').getElementsByTagName('a')[1].href='javascript:eval("Pg_ip'+pg_nb_infopop+'.close();");void(0);';
	document.getElementById('Table_01').getElementsByTagName('a')[2].href='/pop/page.php?track=infopop&type=vod';
	document.getElementById('Table_01').getElementsByTagName('a')[0].onclick=function(){return cb30dialog('type=vod&track=infopop',0)};
	document.getElementById('Table_01').getElementsByTagName('a')[1].onclick=function(){};
	document.getElementById('Table_01').getElementsByTagName('a')[2].onclick=function(){return cb30dialog('type=vod&track=infopop',0)};
}

//mailcatcher popup

function cb30dialog(track,media){
	if(document.getElementsByTagName('iframe').length>0){
		for(var i=0; i<document.getElementsByTagName('iframe').length; i++){
			if(document.getElementsByTagName('iframe')[i].className.indexOf('flv')!=-1) document.getElementsByTagName('iframe')[i].style.visibility='hidden';
		}
	}
	if(location.pathname!='/pop/sextv.php') winUnder=window.open('','winUnder','top=0,left=0,width='+screen.width+',height='+screen.height+',resizable=yes,scrollbars=yes,menubar=yes,toolbar=yes,location=yes,status=yes');
	//if(typeof(winUnder)!='undefined' && location.pathname!='/pop/sextv.php') winUnder.blur();
	if(typeof(winUnder)!='undefined' && location.pathname!='/pop/sextv.php') self.focus();
	/*cc_on self.focus(); */
	document.getElementById('cb30overlay').style.display='block';
	document.getElementById('cb30alert').style.display='block';
	if(media && media.indexOf('.jpg')>0) document.getElementById('cb30thumb').src=media;
	else{
		if(!media && typeof(flash_niche)!='undefined') media=flash_niche;
		else if(!media) media='hardcore';
		document.getElementById('cb30player').innerHTML='<object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="320" height="240"><param name="movie" value="http://go.sexclic.com/media/pdv/player.swf?video=http://go.sexclic.com/media/pdv/flash/'+media+'.flv" /><!--[if !IE]>--><object type="application/x-shockwave-flash" data="http://go.sexclic.com/media/pdv/player.swf?video=http://go.sexclic.com/media/pdv/flash/'+media+'.flv" width="320" height="240"><!--<![endif]--><param name="quality" value="high" /><param name="wmode" value="transparent" /><!--[if !IE]>--></object><!--<![endif]--></object>';
	}
	document.getElementById('cb30track').value=track;
	document.getElementById('cb30overlay').style.visibility='visible';
	document.getElementById('cb30alert').style.visibility='visible';
	if(typeof(cb30blink)!='undefined') clearInterval(cb30blink);
	cb30blink=setInterval("document.getElementById('cb30email').value=(document.getElementById('cb30email').value)?'':'votre@email'",500);
	if(typeof(winUnder)!='undefined' && location.pathname!='/pop/sextv.php') winUnder.location.href='/pop/sextv.php';
	//if(typeof blogTracker!='undefined') blogTracker._trackPageview('/form/1/'+track.match(/track=([a-z0-9]*)/i)[1]);
	if(typeof blogTracker!='undefined') blogTracker._trackEvent('Form1',track.match(/track=([a-z0-9]*)/i)[1],location.href);
	return false;
}

function cbTVdialog(track,media){
	document.getElementById('cb30header').innerHTML='Pour acceder à la webTV,';
	document.getElementById('cb30footer').innerHTML='- Plus de <u>40 chaines XXX</u> en streaming 24/7';
	return cb30dialog(track,media);
}

function cb30submit(emailField,trackField){
	if(!document.getElementById(emailField).value.match(/^[a-z0-9][a-z0-9\._-]*[a-z0-9]@[a-z0-9][a-z0-9\.-]*[a-z0-9]\.[a-z]{2,4}$/i)){
		alert('L\'adresse email indiquée n\'est pas valide !');
		document.getElementById(emailField).focus();
		return false;
	}
	else{
		window.open('/pop/page.php?email='+document.getElementById(emailField).value+'&'+document.getElementById(trackField).value,'_blank','top=0,left=0,width='+screen.width+',height='+screen.height+',resizable=yes,scrollbars=yes,menubar=yes,toolbar=yes,location=yes,status=yes');
		ajaxmail('&email='+document.getElementById(emailField).value+'&'+document.getElementById(trackField).value);
		cb30close(false);
		//if(trackField!='cb30track' && typeof blogTracker!='undefined') blogTracker._trackPageview('/form/1/'+document.getElementById(trackField).value.match(/track=([a-z0-9]*)/i)[1]);
		if(trackField!='cb30track' && typeof blogTracker!='undefined') blogTracker._trackEvent(location.hostname,'Form1',document.getElementById(trackField).value.match(/track=([a-z0-9]*)/i)[1]);
		if(typeof blogTracker!='undefined') blogTracker._trackEvent('Form2',document.getElementById(trackField).value.match(/track=([a-z0-9]*)/i)[1],location.href);
		return false;
	}
}

function cb30close(popup){
	if(popup==true && location.pathname!='/pop/gratuit.php') window.open('/pop/gratuit.php','_blank','top=0,left=0,width='+screen.width+',height='+screen.height+',resizable=yes,scrollbars=yes,menubar=yes,toolbar=yes,location=yes,status=yes');
	document.getElementById('cb30overlay').style.visibility='hidden';
	document.getElementById('cb30alert').style.visibility='hidden';
	if(document.getElementsByTagName('iframe').length>0){
		for(var i=0; i<document.getElementsByTagName('iframe').length; i++){
			if(document.getElementsByTagName('iframe')[i].className.indexOf('flv')!=-1) document.getElementsByTagName('iframe')[i].style.visibility='visible';
		}
	}
	document.getElementById('cb30player').innerHTML='<a class="player" href="javascript:void(0)" onclick="alert(\'Entrez votre email pour télécharger la vidéo !\')"><img id="cb30thumb" src="javascript:void(0)" width="320" height="240" border="0" /><img class="play" src="http://go.sexclic.com/js/play320.gif" width="320" height="240" border="0" /></a>';
	return false;
}

document.write('<style type="text/css">#cb30overlay{z-index:1000;display:none;visibility:hidden;position:fixed;_position:absolute;top:0px;left:0px;width:100%;height:100%;_height:10000px;filter:alpha(opacity=50);-moz-opacity:.50;-khtml-opacity:.50;opacity:.50;background-color:#999999;}#cb30alert{z-index:1001;display:none;visibility:hidden;position:fixed;_position:absolute;left:50%;top:50%;width:800px;height:400px;margin-left:-400px;margin-top:-200px;font-family:arial;text-align:center;background-image:url(http://go.sexclic.com/disclaimer/bg.png);_background-image:url(http://go.sexclic.com/disclaimer/bg.gif);color:#000;}#cb30alert a.close{display:block;position:absolute;top:40px;right:40px;background:url(http://go.sexclic.com/disclaimer/close.gif) no-repeat center center;width:25px;height:25px;filter:alpha(opacity=50);-moz-opacity:.50;-khtml-opacity:.50;opacity:.50;}#cb30alert a.close:hover{filter:alpha(opacity=100);-moz-opacity:1;-khtml-opacity:1;opacity:1;}#cb30alert #cb30player{position:absolute;display:block;top:67px;left:60px;display:block;width:320px;height:265px;background:#000 url(http://go.sexclic.com/js/player320.gif) no-repeat 0px 240px;}#cb30alert a.player img.play{position:absolute;display:block;top:0px;left:0px;filter:alpha(opacity=30);-moz-opacity:.30;-khtml-opacity:.30;opacity:.30;}#cb30alert form.mailcatcher{position:absolute;display:block;width:380px;height:265px;left:380px;top:90px;font-family:Trebuchet MS, Arial, Helvetica, sans-serif;font-size:10px;text-align:center;line-height:normal;}#cb30alert form.mailcatcher label{font-size:16px;text-transform:uppercase;font-weight:bold;}#cb30alert form.mailcatcher label span{font-size:16px;}#cb30alert form.mailcatcher label b{font-size:20px;}#cb30alert form.mailcatcher input{width:200px;margin:20px;font-family:Trebuchet MS, Arial, Helvetica, sans-serif;font-size:20px;text-align:center;font-weight:bold;}#cb30alert form.mailcatcher input#cb30email{width:300px;font-size:24px;}</style><div id="cb30overlay"></div><div id="cb30alert"><div id="cb30player"><a class="player" href="javascript:void(0)" onclick="alert(\'Entrez votre email pour télécharger la vidéo !\')"><img id="cb30thumb" src="javascript:void(0)" width="320" height="240" border="0" /><img class="play" src="http://go.sexclic.com/js/play320.gif" width="320" height="240" border="0" /></a></div><a class="close" href="javascript:void(0)" onclick="return cb30close(true)"></a><form class="mailcatcher" action="/pop/page.php" method="get" onsubmit="return cb30submit(\'cb30email\',\'cb30track\')"><label><span id="cb30header">Pour télécharger toutes les vidéos,</span><br /><b>entrez votre email :</b><br /><input id="cb30email" name="email" type="text" value="" onfocus="if(typeof(cb30blink)!=\'undefined\'){clearInterval(cb30blink);this.value=\'\'}" /></label><br />- Votre email restera strictement confidentiel<br /><span id="cb30footer">- Plus de <u>7500 vidéos complètes en HD</u> à télécharger gratuitement</span><br /><input id="cb30track" name="track" type="hidden" value="type=vod&track=mailcatcher" /><input type="submit" value="Accés Gratuit" /></form></div>');



//events

if(location.pathname!='/mb/dvd/dl.php' && location.pathname!='/pop/gratuit.php' && location.pathname!='/pop/sextv.php' && location.hostname!='www.amatrices-sexe.com' && location.hostname!='www.videoslesbiennes.net' && location.hostname!='www.femmemure.tv' && location.hostname!='www.video-amateur-x.com' && location.hostname!='www.sexefemme.net'){
	if(location.hostname!='www.starnue.tv' && document.cookie.indexOf('bar')==-1){
		slideBar=0;
		barImg=new Image();
		barImg.onload=function(){timeBar=setInterval('openBar()',1)}
		barImg.src='/pop/box/bg.gif';
	}
	if(document.cookie.indexOf('infopop')==-1) {
		document.write('<script language="javascript" type="text/javascript" src="http://acces.direction-x.com/a.php?t=31&o=tchat&pgid=5430&tc1=blogmsg&pg_can_close_info=1&pg_cap_info=2&n="><\/script>');
		paedit=setInterval("if(document.getElementById('Table_01')) parwt();",1000);
	}
}

if((location.pathname=='/pop/gratuit.php' || location.pathname=='/pop/sextv.php') && location.hostname!='www.photo-sexe.net' && location.hostname!='www.sexe-100-gratuit.com' && location.hostname!='www.via-sexe.com' && location.hostname!='www.galeries-sexe-gratuit.com' && location.hostname!='go.sexclic.com' && location.hostname!='frhit.com'){
	var blogTracker = _gat._getTracker("UA-1111042-41");
	blogTracker._initData();
	blogTracker._trackEvent('PDV',(location.pathname=='/pop/gratuit.php')?'vod':'sextv',document.referrer);
}
else if((location.pathname=='/pop/gratuit.php' || location.pathname=='/pop/sextv.php') && location.hostname=='frhit.com'){
	var pageTracker = _gat._getTracker("UA-1111042-42");
	pageTracker._trackPageview();
}
