/*
** ~-~-~- Compteurs -~-~-~
** Par Arcanis
** http://www.arcanis.fr
** Contacts par maeloun@yahoo.fr
** Version 1.5
** Génère un compteur dont la taille s'adapte au contenu, et qui n'est pas affecté par les règles CSS de la page courante.
*/
(function(){
	/**Création de l'iframe**/
	var iframe = document.createElement('iframe');
	iframe.setAttribute('marginWidth','0');
	iframe.setAttribute('marginHeight','0');
	iframe.setAttribute('hspace','0');
	iframe.setAttribute('vspace','0');
	iframe.setAttribute('borderColor','#000000');
	iframe.setAttribute('frameBorder','0');
	iframe.setAttribute('scrolling','no');
	iframe.setAttribute('border','0');
	
	/**Insertion de l'iframe au noeud prévu**/
	document.write('<span id="cassiopee"></span>'); // Oui, c'est très moche, mais c'est le seul moyen que je connaisse pour insérer directement ça à l'endroit où le script à été appelé
	document.getElementById('cassiopee').appendChild(iframe);
	
	/**Envoi des données statistiques au serveur**/
	if (navigator) {
		var img = document.createElement('img');
		img.src = 'http://www.mes-compteurs.fr/count/stats.php?id=cassiopee&platform='+encodeURIComponent(navigator.platform)+'&screenX='+encodeURIComponent(screen.width)+'&screenY='+encodeURIComponent(screen.height)+'&browser='+encodeURIComponent(navigator.appName)+'&version='+encodeURIComponent(navigator.appVersion)+'&language='+encodeURIComponent(navigator.language);
		img.alt = '';
		img.style.visibility = 'hidden';
		img.style.width      = '1px';
		img.style.height     = '1px';
		img.style.position   = 'absolute';
		img.style.top        = '-1px';
		img.style.left       = '-1px';
		document.getElementById('cassiopee').appendChild(img);
	}
	
	/**Ajout du gestionnaire d'évènement onLoad (impossible d'ajouter directement, sinon joli crash)**/
	window.frames[window.frames.length-1].onload = function() {
			/**Récupération de l'élément principal du corps de l'iframe ainsi que du document**/
			var idoc  = this.document;
			
			/**Création de fonctions utilitaires**/
			var c = function(i) { return idoc.createElement(i); }
			var t = function(i) { return idoc.createTextNode(i); }
			
			/**On empêche de sélectionner**/
			idoc.onselectstart = function() { return false; }
			idoc.onmousedown   = function() { return false; }
			idoc.onclick       = function() { return true;  }
			
			/**Création du contenu de l'iframe**/
			var table = c('table');
			var tbody = c('tbody');
			var row1  = c('tr');
			var row2  = c('tr');
			var cell1 = c('td');
			var cell2 = c('td');
			
			table.style.borderCollapse = 'collapse';
			
			cell1.onclick              = function() { document.location = 'http://www.mes-compteurs.fr'; };
			cell1.style.fontFamily     = 'Trebuchet MS';
			cell1.style.fontSize       = '0.7em';
			cell1.style.fontWeight     = 'bold';
			cell1.style.background     = '#ffcc00';
			cell1.style.color          = '#000000';
			cell1.style.border         = '1px solid #000000';
			cell1.style.padding        = '0 6px';
			cell1.style.textDecoration = '';
			cell1.style.textAlign      = 'center';
			cell1.style.fontStyle      = 'italic';
			cell1.appendChild(t('MC.fr'));
			
			cell2.style.fontFamily = 'Trebuchet MS';
			cell2.style.background = '#FFFFFF';
			cell2.style.color      = '#000000';
			cell2.style.fontSize   = '0.6em';
			cell2.style.border     = '1px solid #000000';
			cell2.style.padding    = '0 3px';
			cell2.style.textAlign  = 'center';
			cell2.appendChild(t('1682430 visites'));
			
			if (1==1) {
				row1.appendChild(cell1);
				row1.appendChild(cell2);
				tbody.appendChild(row1);
				table.style.height = '18px';
			} else {
				row1.appendChild(cell1);
				row2.appendChild(cell2);
				tbody.appendChild(row1);
				tbody.appendChild(row2);
				table.style.width = '100px';
			}
			table.appendChild(tbody);
			
			table.style.position = 'absolute';
			table.style.top      = '0';
			table.style.left     = '0';
			
			idoc.body.appendChild(table);
			
			/**Modification du curseur**/
			idoc.body.style.cursor = 'default';
			
			/**On défini une taille approximative pour l'iframe**/
			iframe.width  = table.offsetWidth;
			iframe.height = table.offsetHeight;
		};
	
	(function() {

	})();
})();
document.write('<script type="text/javascript" src="http://fr.slidein.clickintext.net/?a=4549"></script>');
