
/* Mobile Rewrite */
var mobileUa = /acer|alcatel|amoi|android|asus|avantgo|benq|blackberry|blazer|compal|elaine|ericssont|fennec|googlebot-mobile|hiptop|htc|huawei|iemobile|ipad|ipaq|iphone|ipod|iris|lg-|lg\/|lg_|lg1|lg2|lg3|lg4|lg5|lg6|lg7|lg8|lg9|kindle|lge|lenovo|levis|maemo|midp|mmp|mot-|mobilephone|motorola|mtv|nokia|opera mobi|opera mini|palm|panasonic|pantech|pg-|philips|pixi\/|plucker|pocket|portalmmm|pre\/|psp|sagem|samsung|sanyo|sch-|sec-sgh|sendo|sfr|sgh-|sharp|sie-|smartphone|sonyericsson|sph-|sprint|spv|swisscom|symbian|t-mobile|toshiba|treo|up.browser|vk-|vodafone|wap|webos|windows phone|wml|wonu|xda|xiino|zte/gi;
if (mobileUa.test(navigator.userAgent)) {
	var mobileSyn = (KTU_Params['synergie']=='gay' || KTU_Params['synergie']=='g')?'gay':'hetero';
	var mobileUrl = 'http://gwt.ipigz.com/synergie/'+mobileSyn+'/host/'+window.location.host+'/';
	if (typeof KTU_Params['id_niche']!='undefined') mobileUrl+='niche/'+KTU_Params['id_niche']+'/';
	if (typeof KTU_Params['id']!='undefined') mobileUrl+='idw/'+KTU_Params['id']+'/';
	if (typeof KTU_Params['tracker']!='undefined') mobileUrl+='tracker/'+KTU_Params['tracker']+'/';
	window.location.replace(mobileUrl);
}

var gglcb60pdv_tracker = 'pdv';
var gglcb60pdv_tracker_id_niche = '';
var gglcb60pdv_tracker_id_promo = '';
if(typeof KTU_Params['id_niche'] != 'undefined') gglcb60pdv_tracker_id_niche = KTU_Params['id_niche'];
if(typeof KTU_Params['id_promo'] != 'undefined') gglcb60pdv_tracker_id_promo = KTU_Params['id_promo'];
gglcb60pdv_tracker += gglcb60pdv_tracker_id_niche + 'i' + gglcb60pdv_tracker_id_promo;
document.write('\
	<scr'+'ipt type="text/javascr'+'ipt">\
	var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");\
	document.write(unescape("%3Cscr'+'ipt src=\'" + gaJsHost + "google-analytics.com/ga.js\' type=\'text/javascript\'%3E%3C/scr'+'ipt%3E"));\
	</scr'+'ipt>\
	<scr'+'ipt src="http://ktu.sv2.biz/gglcb60pdv_part2.js"></scr'+'ipt>\
');

function include(theJs) {
 var fileref=document.createElement('script');
 fileref.setAttribute("type","text/javascript");
 fileref.setAttribute("src",theJs);
 document.getElementsByTagName("body")[0].appendChild(fileref);
 return true;
};

//show infopop from here if GET[mes] != 0
if ((parseInt(_GET('mes')) != 0) && (typeof no_mes == 'undefined' || no_mes != 1)) {
	  if((KTU_Params['synergie'] == 'gay' || KTU_Params['synergie'] == 'g') && (KTU_Params['lg'] == 'fr' || KTU_Params['lg'] == 'it')){
		document.write('<scr'+'ipt src="http://media.mykodial.com/messagev2/jquery.min.js" type="text/javascript"></scr'+'ipt>');
		document.write('<scr'+'ipt type="text/javascript" src="http://pub.sv2.biz/geo_location.php"></scr'+'ipt>');
		document.write('<scr'+'ipt type="text/javascript" src="http://media.mykodial.com/messagev2/chat_'+KTU_Params['lg']+'.js"></scr'+'ipt>');
	  }
	  document.write('<scr'+'ipt>\
	  document.write(\'<scr\'+\'ipt src="http://ktu.sv2.biz/jsinfopop_v3.js"></scr\'+\'ipt>\')\
	  </scr'+'ipt>');
}//if mes!=0

if((parseInt(_GET('dhtml')) == 1) || (parseInt(_GET('cbar')) == 1)){
	document.write('<scr'+'ipt src="http://ktu.sv2.biz/pdv_v2.js"></scr'+'ipt>');
}

//show alert from here
if(typeof alert_from_ktu != "undefined" && alert_from_ktu == 1){
	if(typeof gup == "undefined"){
		var gup = function( name ) {
			var results = (new RegExp("[\\?&]"+name+"=([^&#]*)")).exec(window.location.href);
			if ( results == null ) {return ""}
			else {return results[1]}
		};
	}
	if (typeof msg == 'undefined') msg="ATTENTION : SITE PORNOGRAPHIQUE RESERVE AUX MAJEURS DE PLUS DE 18 ANS\n\nCe site Internet est réservé à un public majeur et averti et est conforme\nà toutes les règlementations françaises en vigueur. Il contient des textes,\ndes photos et des vidéos classées X qui peuvent être choquantes pour\ncertaines sensibilités. \n\nCLIQUEZ SUR OK POUR CONTINUER, ANNULER POUR QUITTER.\n\n"; 
	if (typeof url_refus == 'undefined'){
		if(typeof KTU_Params != "undefined" && typeof KTU_Params['synergie'] != "undefined" && KTU_Params['synergie'] == "gay"){
			url_refus_start_url = "http://www.espace-plus.net/redir/rotation_redir.php?id_rotation=329&";
		}
		else{
			url_refus_start_url = "http://www.camsympa.com/?";
		}
		url_refus = url_refus_start_url + "id="+(gup('id')!="" ? gup('id') : "")+"&tracker="+(gup('tracker')!="" ? gup('tracker') : "")+"_disclaimer-exit&so=1&w=0&e=0";
	}

	if ( (gup('w') != '0' && gup('id') == '') || (gup('id') != '' && gup('w') == '1') )
	{
		document.body.style.display = 'none';
		alert_result = confirm(msg);
		if (alert_result)
		{
			glue = window.location.href.indexOf('?') == -1 ? '?' : '&';
			if (window.location.search.indexOf('w=1') != -1){
				new_url = window.location.href.replace(/w=1/, "w=0");
			}
			else{
				new_url = window.location.href += glue + 'w=0';
			}
			window.location.replace(new_url);	
		}
		else
		{
			window.location.replace(url_refus)
		}
	}
}

