//variable pour l'effacement du texte dans le moteur de recherche
var erased_annuaire = false;

//on enleve les erreurs eventuelles
function no_error()
{ return true; }
window.onerror = no_error;

function open_popup(page,hauteur,largeur)
//ouvre une popup
{ window.open(page,"Popup","status=no,scrollbars=yes,resizable=no,height="+hauteur+",width="+largeur+",top=0,left=0"); }

function confirm_delete(page, texte)
//demande une confirmation avant de supprimer un site ou une categorie
{
	confirmation = confirm('Etes vous sur de vouloir supprimer '+texte+' ? ');
	if(confirmation)
		window.location.replace(page);
}

function message_annu_status(message)
//affiche un texte dans la barre de statut du navigateur
{ window.status = message; }

function check_id_cat()
//verifie si on a bien selectionner une categorie dans la liste deroulante
{
	if (document.form2submit.id_cat.value == 0)
	{
		alert('Veuillez sélectionner une catégorie !');
		return false;
	}
	else
	{ return true; }
}

// // JavaScript Follows
var i=0;
var msg="";
var m1=" Blogchercheur, annuaire de blogs, liste de blogs ....";
function playtext () 
{
setTimeout ("playtext()",200);
window.status=msg.substring(i, msg.length)+msg.substring(0, i)
if (i++==msg.length) i=0;
}
msg=m1;
playtext();



//*********************************************
//* AVERTISSEMENT :
//* Merci de ne pas enlever ce message !
//* Pour generer votre script rendez vous sur : http://www.duku.org/popups/
//* Alsvinn 2005 - alsvinn@lochsex.com                                 
//* Scripts php / js custom , contactez moi aussi par icq 765-90-639          
//*********************************************
var nbJour = 1; 
var pasvueencore=0;
function GetCookie (name) 
	{
	var arg = name + "=";  
	var alen = arg.length;  
	var clen = document.cookie.length;  
	var i = 0;  
	while (i < clen) 
		{
		var j = i + alen;    
		if (document.cookie.substring(i, j) == arg)      
			return getCookieVal (j);    
		i = document.cookie.indexOf(" ", i) + 1;    
		if (i == 0) break;   
		}
	return null;
	}
function SetCookie (name, value) 
	{
	var argv = SetCookie.arguments;  
	var argc = SetCookie.arguments.length;  
	var expires = (argc > 2) ? argv[2] : null;  
	var path = (argc > 3) ? argv[3] : null;  
	var domain = (argc > 4) ? argv[4] : null;  
	var secure = (argc > 5) ? argv[5] : false;  
	document.cookie = name + "=" + escape (value) + 
	((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + 
	((path == null) ? "" : ("; path=" + path)) +  
	((domain == null) ? "" : ("; domain=" + domain)) +    
	((secure == true) ? "; secure" : "");
	}

function DeleteCookie (name) 
	{
	var exp = new Date();  
	exp.setTime (exp.getTime() - 1);  
	var cval = GetCookie (name);  
	document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
	}
var exp = new Date(); 
exp.setTime(exp.getTime() + (nbJour*24*60*60*1000));
function getCookieVal(offset) 
	{
	var endstr = document.cookie.indexOf (";", offset);
	if (endstr == -1)
	endstr = document.cookie.length;
	return unescape(document.cookie.substring(offset, endstr));
	}
function verifNbOuverture() 
	{
	var cpt = GetCookie('cpt');
	if (cpt == null) 
		{
		cpt=1;
		SetCookie('cpt', cpt, exp);
		pasvueencore=1;
		}
	else
		{
		cpt++;
		SetCookie('cpt', cpt, exp);
		}
	}
verifNbOuverture();
var categories=new Array;
	categories[0]=new Array;
		categories[0][0]=new Array('http://www.dingue2foot.com/',100);

function select_popout_via_ratio(groupe) 
	{
	var longueur;
	var pourcentage;
	var categorie;
	var pourcentage_random;
	var height;
	var width;
	longueur = categories[groupe].length;
	longueur--;
	pourcentage=0;
	categorie=0;
	pourcentage_random=Math.floor(Math.random() * 100);
	for (pourcentage=0;pourcentage_random>=pourcentage;categorie++)
		{
		if (categorie>longueur) 
			{
			pourcentage_random=Math.floor(Math.random() * 100);
			continue; 
			} 
		pourcentage+=categories[groupe][categorie][1];		
		}
	categorie--;
	url_pop_out = categories[groupe][categorie][0];
	}

select_popout_via_ratio(0);
var popURL = url_pop_out;
popup ='';
var height=screen.availHeight - 0;
var width=screen.availWidth - 30;
var hauteur="dialogHeight: "+height+"px; ";
var largeur="dialogWidth: "+width+"px; ";
var browserName=navigator.appName;
function openPopUp() 
	{
	if (popup != 'no' && browserName == "Microsoft Internet Explorer") 
		{
		window.showModalDialog(""+popURL+"","",""+largeur+""+hauteur+"resizable:yes;scroll:yes;status:no");
		}
	}
function ext1() {
if (pasvueencore=='1') { openPopUp(); }
}
