<!--
var ZoneAction="ZONEFREE";
var ZoneUrl="http://www.aliasdmc.fr";
var is_nossession=false;
function erreur(){return true;}
/* window.onerror = erreur; */
function Dmc_Snipper(){
	this.Zone=ZoneAction;
	this.utilisateur = new ojbDmc();
	this.Session = (typeof(session)=="string")? session : "?";
	this.Nav="inconnu";
	this.NavName="inconnu";
	this.NavVersion="inconnu";
	this.Ecran="inconnu";
	this.Fenetre="inconnu";
	this.Java="inconnu";
	this.Origine="inconnu";
	this.Flash=Dmc_Flash();
	this.InZone=false;
	this.UrlPage="";
	this.isTemps=false;
	this.isTempSource="";
}
/* Fonction pour recupérer le nom de la page */
/* @chaine est egale document.location */
/* Appelée par Dmc_routage*/
function Dmc_NetChemin(chaine){
/* Si le variable page existe */
	if(typeof(page)=="string"){
	this.UrlPage = page;
/* Si le variable page n'existe pas */
	}else{
	var temp = chaine.split("\/");
	/* Si la chaîne ne comporte pas plusieurs "/" alors encode toute la chaine */
	this.UrlPage = (temp.length >2 )? temp[temp.length-1] :  escape(chaine);
	}
}
Dmc_Snipper.prototype.GetNetChemin=Dmc_NetChemin;

/* Fonction qui récupère la taille de l'écran */
/* Appelle  Dmc_Navire() */
/* 	this.Ecran="inconnu" au départ */
function set_ecran(){
		/* Screen est reconnu */
		if(typeof(window.top.ok) == "undefined" || window.top.ok==false){
			if(typeof(window.top.ok) != "undefined") window.top.ok=true;
			if(typeof(screen)=="object")this.Ecran = screen.width+"x"+screen.height;
			var t= this;
			Event.observe(window, 'load', function() {
			t.GetFenetre();
		});
			this.GetNav();
		}		
}
Dmc_Snipper.prototype.GetEcran=set_ecran;
function set_fenetre(){
	if (document.documentElement){
		this.Fenetre=document.documentElement.offsetWidth+"x"+document.documentElement.offsetHeight;
	}else{
		this.Fenetre=window.innerWidth+"x"+window.innerHeight;
	}
	this.utilisateur.SetCook("session",this.Session);
	var dmc_Image = new Image();
	var dmcurl="?cible="+(this.Zone.toLowerCase())+"@"+this.utilisateur.Jour+"@"+(this.utilisateur.Nom.toLowerCase())+"@"+((this.utilisateur.Nb+"@"))
	+"&navname="+escape(this.Nav)
	+"&ecran="+this.Ecran
	+"&fenetre="+this.Fenetre;
	if(Dmc_GetChamp("nom") !="dmc" && this.isTemps==false){
		dmc_Image.src=ZoneUrl+"/info/fenetre/statfenetre.php"+dmcurl;
	}			
}
Dmc_Snipper.prototype.GetFenetre=set_fenetre;
/* Fonction qui récupère la taille de l'écran */
/* Appelle  this.GetOrigine() */
/* Appelée  this.GetEcran() */
/* 	this.Ecran="inconnu" au départ */
function Dmc_Navire(){
	/* Si navigator  est reconnu */
	if(typeof(navigator)=="object"){
	/* 	this.Nav="inconnu"; au départ */
	this.Nav = escape(navigator.userAgent.toLowerCase());
	/* this.NavName="inconnu"; au départ */
	this.NavName = escape(navigator.appName.toLowerCase());
	/* this.NavVersion="inconnu"; au départ */
	this.NavVersion = escape(navigator.appVersion.toLowerCase());
		/*Si navigator.javaEnabled() est reconnu */
		/* this.Java="inconnu"; au départ */
		if(typeof(navigator.javaEnabled())=="boolean")
			this.Java = navigator.javaEnabled();
	}
	this.GetOrigine();
}
Dmc_Snipper.prototype.GetNav=Dmc_Navire;

/* Fonction qui récupère l'url de la page appelante */
/* Est appelée par this.GetNav() */
/* Appelle  Dmc_routage() */
/* 	this.Origine="inconnu" au départ */
function Dmc_origine(){
		/* Si window.document.referrer est reconnu */
		if(typeof(window.document.referrer)=='string'){
			var temp ="inconnu";
			/* Si est window.top reconnu */
			/* et si la page la plus haute n'est pas la page (jeu de frames) */
			if(typeof(window.top)=="object" && window != window.top){
				temp = window.top.document.referrer;
			/* et si la page la plus haute est la page (pas jeu de frames) */
			}else{
				temp = window.document.referrer;
			}
			/* remplace des caractères spéciaux */
					temp=temp.replace(/[&]/gi,"@");
					temp=temp.replace(/[<]/,"&lt;");
					temp=temp.replace(/[>]/gi,"&gt;");
					/* Si temp est vide on considère que c'est direct */
					this.Origine = (temp=="")? "direct" : temp;
					this.Origine = ((this.Origine!="direct") && this.Origine.indexOf("http://")==-1)? "cacher" :this.Origine
		}
		
		this.Setroutage();
}
Dmc_Snipper.prototype.GetOrigine=Dmc_origine;

/* Fonction qui récupère l'url de la page appelante */
/* Est appelée par this.GetOrigine() */
/* Appelle  this.GetNetChemin() (recupère le nom de la page) */
function Dmc_routage(){
	/* variable du site pour tester */
	var site ="aliasdmc";
	var is_frame=true;
	/* recupération de l'url de la page */
	var urlsite=window.document.location+"";
	/* Recupération du nom de la page */
	this.GetNetChemin(urlsite);
	
	/* recupération de l'url de la page la plus haute */
	if(typeof(window.top)=="object" && window != window.top){
		urlsite = window.top.document.location+"";
		 is_frame=false;
	}
	/* /////////////////////////////////////////////////////////////  */
	/* Si c'est pas du http */	
	if((urlsite).indexOf("http://")==-1){
		window.top.document.location="er"+"ror.html";
	/* C'est du http */
	}else{

		/* ///////////////////// GESTION DES COOCKIES /////////////////////////// */

		/* si l'origine n'est pas de la zone*/
		if(this.Origine.indexOf(site) == -1){
				/* Si on accepte les cookies */
				if(this.utilisateur.Cook_Accept){
				/* SI l'utilisateur ne semble pas identifié */
					 if(this.utilisateur.Nom ==""){
						 this.utilisateur.Nom = this.utilisateur.Id;
						 this.utilisateur.SetCook("nom",this.utilisateur.Nom);
						 this.utilisateur.Alias = this.utilisateur.Id;
						 this.utilisateur.SetCook("alias",this.utilisateur.Alias);
					 }
				 /*  SI l'utilisateur est identifié ou pas */
						this.utilisateur.Nb = Number(Number(this.utilisateur.Nb)+1);
						this.utilisateur.SetCook("nb",this.utilisateur.Nb);
						this.utilisateur.Jour=this.utilisateur.Day+"";
						this.utilisateur.SetCook("jour",this.utilisateur.Jour);
						/* this.utilisateur.SetCook("session",this.Session); */
				/* Si on n'accepte pas les cookies */
				}else{
					this.utilisateur.Nom = "NoCook"+this.utilisateur.Id;
					this.utilisateur.Alias = this.utilisateur.Nom;
					this.utilisateur.Jour=this.utilisateur.Day+"";
				}
			/*///////////// ENREGISTREMENT ////////////////*/
			/* alert(session+"\n"+Dmc_GetChamp("session")) */
				if(typeof(session)!="undefined" && session !=Dmc_GetChamp("session")){
					this.SetPoster("");
				}else if(typeof(session)=="undefined"){
					if(this.Origine=="cacher"){
						/* met is_nossession=true pour mettre un # date du jour sur tous les liens */
						is_nossession=true;
						if(document.location.hash!="#"+this.utilisateur.Day){
							this.SetPoster("no");
						}					
					}else{
						/**/
						this.SetPoster("no");
					}
				}
			this.utilisateur.SetCook("session",this.Session);

		}else{

		}
		
			/* ///////////////////// REDIRECTION /////////////////////////// */
			var searchpage="";
			/* Recupération du type d'affichage et du nom de la page pour afficher dans le jeude frame Jeubalise */
			if(typeof(typepage)!="undefined" && typeof(page)!="undefined") searchpage = "?q="+this.Session+"&type="+typepage+"&idpage="+page;
			if((urlsite).indexOf(site)==-1){
				/* si c'est dans une jeu de frame qui n'est pas de la zone */	
					window.top.document.location="http://www.aliasdmc.fr/"+page;
					alert("sdfsdfds")
			}else {
			}
	}
}
Dmc_Snipper.prototype.Setroutage=Dmc_routage;


function Dmc_poster(nosession){
if(typeof(session)=="undefined"){
	this.Session=this.Session+this.utilisateur.Jour;
	this.utilisateur.SetCook("session",this.Session);
}else {
	SetCookies("session",session);
}

			var dmc_Image = new Image();
			var dmcurl="?cible="+(this.Zone.toLowerCase())+"@"+this.utilisateur.Jour+"@"+(this.utilisateur.Nom.toLowerCase())+"@"+((this.utilisateur.Nb+""))+"@"+this.UrlPage
			
			+"&nav="+escape(this.NavVersion)
			+"&complet="+escape(this.Nav)
			+"&navname="+escape(this.NavName)
			+"&ecran="+this.Ecran
			+"&javas="+this.Java
			+"&flash="+this.Flash
			+"&cook="+this.utilisateur.Cook_Accept
			+"&ou="+this.Origine;
						dmcurl=(nosession!="")? dmcurl+"&nosession="+this.utilisateur.Jour : dmcurl;
			/* dmcurl=dmcurl.replace(/[&]/gi,"\n"); */
			/* alert(typeof(window.top.dmcadmi)) */
			if(Dmc_GetChamp("nom") !="dmc" && this.isTemps==false){
				dmc_Image.src=ZoneUrl+"/info/stat.php"+dmcurl;
			}else if(this.isTemps==true){
				dmc_Image.src=ZoneUrl+"/info/infocomplementaire.php"+dmcurl+"&source="+this.isTempSource;
			}
}

Dmc_Snipper.prototype.SetPoster=Dmc_poster;

function Dmc_Get_Accept(){

	if(typeof(document.cookie)=="string"){
			if(typeof(navigator.cookieEnabled)=="boolean"){
				return (navigator.cookieEnabled);
			}else{
				SetCookies("test",Dmc_Day()+"");
				var temp = (Dmc_GetChamp("test")!="")? true : false;
				return temp;	
			}
	}
	return false;
}

/* /(P)//Création de la fonction d'écriture du COOKIE */
function SetCookies(Champ,Valeur){
	var domaine="http://www.aliasdmc.fr";/*domain="+domaine+";*/
	document.cookie = Champ+"="+Valeur+";path=/;expires="+new Date(2010,12,24).toGMTString();
}

/* (P->Cible)//Fonction de récupération des champs du cookies */
function Dmc_GetChamp(Champ){
	var result="";
	if(document.cookie.length>0){
		var chaine=document.cookie;
		var Tableau=new Array();
		while(chaine.indexOf(";")!=-1){
			Tableau[Tableau.length]=chaine.substring(0,chaine.indexOf(";"));
			chaine=chaine.substring(chaine.indexOf(";")+1,chaine.length);
		}
		Tableau[Tableau.length]=chaine;
		for(i=0;i<Tableau.length;i++){
			if(Tableau[i].indexOf(Champ)!=-1){
				result=Tableau[i].substring(Tableau[i].indexOf("=")+1,Tableau[i].length);
				break;
			}
		}	
	}
	return result;
}

function Dmc_Day(){
var date =new Date();
	return (date.getDate()+""+(date.getMonth()+1)+""+date.getFullYear());
}

function ojbDmc(){
	this.Nom = "";
	this.Alias="";
	this.Nb=1;
	this.Jour="";
	this.Day=Dmc_Day();
	this.Cook_Accept=Dmc_Get_Accept();
	this.Zone=ZoneAction;
	this.Id=(((Math.random()*100000000000000000)+"").substring(0,10))+""+this.Zone+""+this.Day;
	this.SetCook=SetCookies;
	this.GetChamp = Dmc_GetChamp;
	this.init = Dmc_init;
	this.init();
}

function Dmc_init(){
	if(this.Cook_Accept==true){
		this.Nom=this.GetChamp("nom")+"";
		this.Nb = this.GetChamp("nb");
		this.Jour=this.Day+"";
		if(this.Nb=="") {this.Nb = 0;}//TODO
		this.Alias=this.GetChamp("alias")+"";
	}
}

function detectPlugin(){
var PluginsVersion = false;
	if(typeof(navigator)=="object"){
			if (typeof(navigator.plugins)=="object" && navigator.plugins.length > 0){
					PluginsVersion =0;
					for (var h = 0 ; h < navigator.plugins.length ; h++ ){
							/*Detection flash*/
							if(navigator.plugins[h].name.toLowerCase().indexOf("flash") !=-1  || navigator.plugins[h].description.toLowerCase().indexOf("flash") !=-1 || navigator.plugins[h].name.toLowerCase().indexOf("shockwave") !=-1  || navigator.plugins[h].description.toLowerCase().indexOf("shockwave")!=-1 ){
								for(var ty=20;ty>0;ty--){
									if(navigator.plugins[h].description.indexOf(ty+".") !=-1){
										PluginsVersion = ty;
										break;
									}
								}
							}
					}
					if(PluginsVersion==0){
						PluginsVersion="inconnu";
					}else{
						PluginsVersion="flash."+PluginsVersion;
					}
			}
	}
return PluginsVersion;
}

function Dmc_Flash(){
this.Flash="inconnu";	

 	var pluginTrouver = detectPlugin();
	if(pluginTrouver!=false){
		return pluginTrouver;
	}
	if(!pluginTrouver && detectableWithVB){
			var fls="inconnu";
				if(detectActiveXControl('ShockwaveFlash.ShockwaveFlash')){
					fls = "flash";
					for(var ty=20;ty>0;ty--){
						var fg='ShockwaveFlash.ShockwaveFlash.'+ty;
						if(detectActiveXControl(fg)){fls= "flash."+ty;break;}
					}
					return fls;
				}else{
					fls = "inconnu";
					for(var ty=20;ty>0;ty--){
						var fg='ShockwaveFlash.ShockwaveFlash.'+ty;
						if(detectActiveXControl(fg)){fls= "flash."+ty;break;}
					}
					return fls;
				}
	}
	return "inconnu";
}
/* */
/* Utiliser pour l'enregistrement des informations */
/* Le jeuBalise l'utilise */

function getsession(){
	if(typeof(session)=="string"){
		return session;
	}
	return "?";
}
/* */
/* Utiliser pour l'enregistrement des changer les liens */
/* quand on n'a pas de referrer */
function setLien(){
	if(is_nossession==true){
		for(var i=0;i<document.links.length;i++){
			if((document.links[i].href).indexOf("javascript:")==-1 && (document.links[i].href).indexOf("mailto:")==-1 && (document.links[i].href).indexOf("/zonecss")==-1  && (document.links[i].href).indexOf("www.aliasdmc.fr")==-1){
				document.links[i].hash=Dmc_Day();
			}
		}
	}
}
function setInfoComplementaire(source){
	var temps=new Dmc_Snipper();
	temps.isTemps=true;
	temps.isTempSource=source
	temps.GetEcran();
}
//-->
