var htmlContent = document.getElementById("printp");
function infoBulles(){
	if(!document.getElementById('advSearch')){
		var html = htmlContent.innerHTML;
		
		nCount=0;
		whiled=false;
		while(html.indexOf('[--')!=-1){
			spos = html.indexOf('[--');
			epos = html.indexOf('--]');
			bulleTxt = html.substr(spos,((epos-spos)+3));
			spannedbulleTxt = bulleTxt.replace("[--","<span id='bulle_"+nCount+"' class='bulle' style='display: none;' onmouseover='showBulle(this);' onmouseout='hideBulle(this);'><span class='box'><span class='bottom'>");
			spannedbulleTxt = spannedbulleTxt.replace("--]","</" + "span></" + "span><span class='linner'>&nbsp;</" + "span><span class='shadow'><span class='bottom'>&nbsp;</" + "span></" + "span><span class='slinner'>&nbsp;</" + "span></" + "span>"); 
			html = html.replace(bulleTxt,spannedbulleTxt);
			nCount++;
			whiled=true;
		}
		if(whiled) htmlContent.innerHTML = html;
		
		// trouve les anchors et applique leurs proprietes ...
		var links = htmlContent.getElementsByTagName("A");
		
		nCount=0;
		for(i=0;i<links.length;i++){
			if(links[i].getAttribute("name")!=null && links[i].getAttribute("name")!=""){
				links[i].className = "bulle";
				links[i].id = "a_"+nCount;
				links[i].onmouseover = function(){
					var aID = this.id.toString();
						aID = aID.replace("a_","");
						showBulle(document.getElementById("bulle_"+aID));
				}
				links[i].onmouseout = function(){
					var aID = this.id.toString();
						aID = aID.replace("a_","");
						hideBulle(document.getElementById("bulle_"+aID));
				}
				nCount++;
			}
		}
	}
}
	
function showBulle(el){
	var bID = el.id.toString();
		bID = bID.replace("bulle_","");
	
	var alink = document.getElementById("a_"+bID);
		
		el.style.left='-'+(alink.offsetWidth+7)+'px';
		el.style.display='';
	
	var spanBox = el.childNodes[0];
	var spanLinner = el.childNodes[1];
	var spanShadow = el.childNodes[2];
	
	if(spanBox && spanLinner && spanShadow){
		spanLinner.style.height = (spanBox.offsetHeight-10)+'px';
		spanShadow.style.height = (spanBox.offsetHeight)+'px';
		
		var spanShadowBottom = spanShadow.childNodes[0];
		if(spanShadowBottom) spanShadowBottom.style.height = (spanBox.offsetHeight-35)+'px';
		
		var spanShadowLinner = el.childNodes[3];
		if(spanShadowLinner) spanShadowLinner.style.height = (spanBox.offsetHeight-58)+'px';
	}
}

function hideBulle(el){
	el.style.display='none';
}
infoBulles();
