	var idkit;
	var p = "accueil.html";
	var w = 1;
	var e = 1;
	var wp = 0;
	var md = 4;
	var lotto;
	var isa;
	var em;
	var t_dh = '';
	var le = '';
	var fe = '';
	var tm = 1;

	var params = window.document.location.href.substr((window.document.location.href.indexOf("?")+1));
	var tab_params = params.split("&");
	var i;

	for (i=0; i<tab_params.length;i++)
	{
		tab_params[i] = tab_params[i].split("=");	
		if(tab_params[i][0] == 'id') { idkit = tab_params[i][1]; }
		if(tab_params[i][0] == 'w') { w = tab_params[i][1]; }
		if(tab_params[i][0] == 'e') { e = tab_params[i][1]; }
		if(tab_params[i][0] == 'p') { p = tab_params[i][1] +".html"; }
		if(tab_params[i][0] == 'warning') { wp = tab_params[i][1]; }
		if(tab_params[i][0] == 'md') { md = tab_params[i][1]; }
		if(tab_params[i][0] == 'isa') { isa = tab_params[i][1]; }
		if(tab_params[i][0] == 'em') { em = tab_params[i][1]; }
		if(tab_params[i][0] == 'tracker') { t_dh = tab_params[i][1]; }
		if(tab_params[i][0] == 'le') { le = tab_params[i][1]; }
		if(tab_params[i][0] == 'fe') { fe = tab_params[i][1]; }
		if(tab_params[i][0] == 'tm') { tm = tab_params[i][1]; }
	}

	var mdt = md;
 	if(md == '0') { md = "loader"; }
         else if (md == '1') { md = "cb"; }
         else if (md == '2') { md = "cb_loader"; }
         else if (md == '3') { md = "autodownload"; }
         else if (md == '4') { md = "dialer_html_gc"; } 
         else if (md == '5') { md = "cb_adsl_gc"; } 
	 else { md = "loader"; }

				 

	 if((window.document.location.href.indexOf("http://www") == -1)&&(window.document.location.href.indexOf("media") == -1)&&(window.document.location.href.indexOf("live") == -1))
	{
	       e = 0;
	       w = 0;
	       window.location = window.document.location.href.replace(/http:\/\//,"http://www.");

               function exit_console() {}
        }


idkit = parseInt(idkit);
var error = 0;
if(((w == 1)&&(!(idkit)))||(wp)) { warning(); }

if(!(idkit)) { idkit = 500000; }
function warning()

{

	var msg = "ATTENTION : SITE PORNOGRAPHIQUE RESERVE AUX MAJEURS DE PLUS DE 18 ANS\n\n" + 
"Ce 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,\n" + 
"des photos et des vidéos classées X qui peuvent être choquantes pour\n" + 
"certaines sensibilités. \n\n" + 
"CLIQUEZ SUR OK POUR CONTINUER, ANNULER POUR QUITTER.\n\n" 

	if (! confirm(msg)) { error = 1; window.location = "http://www.ludorama.com";}

}

function exit_console()
{
	if((e == 1)&&(!le)&&(!fe)) 
	{		
		var newwin=window.open("","","scrollbars=no,status=no,toolbar=no,location=no,directories=no,resizable=no");
 	        newwin.moveTo((screen.availWidth-350)/2,(screen.availHeight-450)/2);
                newwin.resizeTo(350,450);
		newwin.location='http://media.arenagay.com/fr/exit/index.html?p=arenagay&w=0&id='+ idkit +'&e=0';

		if(idkit != 500235)
		{
			if(tm != 0) 
			{
				var popup_topmec = window.open("http://www.topmecs.com/top.php?id_service="+ idkit , '');
			}
		}
	}
	if(le)
	{
		var liste_exit = le.split("*");
		var deja_exit = new Array();

		for(var i=0; i<liste_exit.length; i++)
		{		
			if((liste_exit[i] >0)&&(liste_exit[i] < 8))
			{
				if(!deja_exit[liste_exit[i]])
				{
					window.open('http://media.arenagay.com/fr/PDV/00'+ liste_exit[i] +'.html?id='+ idkit, '', 'width=800,height=600,location=0,scrollbars=1');
					deja_exit[liste_exit[i]] = 1;
				}
			}
		}
	}
	else if (fe)
	{
		window.open('http://media.arenagay.com/fr/PDV/00'+ Math.ceil(Math.random()* 7) +'.html?id='+ idkit, '', 'top=0,left=0,location=0,scrollbars=1,width='+ screen.availWidth +',height='+ screen.availHeight);
	}
}



function frame_init()

{



}



function load_page()
{
	 if(navigator.userAgent.toLowerCase().indexOf('mac') != -1)
	 {
				 window.frames[0].location = p +"?id="+ idkit;
	 }
	 else
	 {
		 window.frames[0].location.replace( p +"?id="+ idkit);
	 }
}

if(!(error))

{

	setTimeout('load_page();', 800);

}



