function addToFavorites(anchor,urlAddress,pageName)
{	if ( navigator.appName != 'Microsoft Internet Explorer'){
		window.sidebar.addPanel(""+pageName+"",""+urlAddress+"",""+pageName+"");	
	}else if (window.external){
		window.external.AddFavorite(""+urlAddress+"",""+anchor.getAttribute("title")+"");
	}		
}
function setLocation(url){
    window.location.href = url;
}
function confirmSetLocation(message,url){
    if( confirm(message) ) {
        setLocation(url);
    }
    return false;
}
function deleteConfirm_new(message, url) {
    confirmSetLocation(message, url);
}
function popup(page,w,h,toscroll){	
	l=(screen.width)?(screen.width-w)/4:100;
	t=(screen.height)?(screen.height-h)/2:100;
	params='width='+w+',height='+h+',top='+t+',left='+l+',scrollbars='+toscroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
	win=window.open(page,"Annikids",params);
}
function popup_target(page,w,h,toscroll,targetname){
	l=(screen.width)?(screen.width-w)/4:100;
	t=(screen.height)?(screen.height-h)/2:100;
	params='width='+w+',height='+h+',top='+t+',left='+l+',scrollbars='+toscroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
	win=window.open(page,targetname,params);
} 
function popup_tnt(page,w,h){
	l=(screen.width)?(screen.width-w)/4:100;
	t=(screen.height)?(screen.height-h)/2:100;
	params='width='+w+',height='+h+',top='+t+',left='+l+',scrollbars=yes,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
	win=window.open(page,"AnnikidsRelais",params);
} 
function showdiv(mydiv){
	x = document.getElementsByTagName('div')
	for (a=0;a<x.length;a++)
		if (x[a].id.indexOf("bulle") != -1) {x[a].style.visibility="hidden";x[a].style.zIndex = -1;}
	thediv = document.getElementById(mydiv);
	thediv.style.visibility="visible"; 
	thediv.style.zIndex =1001;
}
function hidediv(mydiv){
	thediv = document.getElementById(mydiv);	
	thediv.style.visibility="hidden"; 
	thediv.style.zIndex = -1;
}
function ismaxlength(obj){
	var mlength=obj.getAttribute? parseInt(obj.getAttribute("maxlength")) : ""
	if (obj.getAttribute && obj.value.length>mlength)
	obj.value=obj.value.substring(0,mlength)
}
function encode(cible){
	var newcible = cible;
	tag_e = newcible.indexOf("é");	
	if(tag_e >= 0){
		debut = newcible.substring(0,tag_e);
		fin = newcible.substring(tag_e+1 );
		newcible = debut+"%e9"+fin;
	}
	return newcible;
}
function TabsProduitClick(nTab){
	if(nbOnglet>0){
		if(nTab>=0){
			for(i=0;i<nbOnglet;i++){
				document.getElementById('Content_'+i).style.display='none';   
				document.getElementById('mn_'+i).className = "default"; 
			}
			document.getElementById('Content_'+nTab).style.display='block';  
			document.getElementById('mn_'+nTab).className = "selectLi"; 
		}	
	}
}
