//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; }
}

// effet alpha

function high(which2){
theobject=which2
highlighting=setInterval("highlightit(theobject)",20)
}
function low(which2){
clearInterval(highlighting)
if (which2.style.MozOpacity)
which2.style.MozOpacity=0.3
else if (which2.filters)
which2.filters.alpha.opacity=60
}
function highlightit(cur2){
if (cur2.style.MozOpacity<1)
cur2.style.MozOpacity=parseFloat(cur2.style.MozOpacity)+0.1
else if (cur2.filters&&cur2.filters.alpha.opacity<100)
cur2.filters.alpha.opacity+=10
else if (window.highlighting)
clearInterval(highlighting)
}