<!--
var bBox,bStem,bImg;

function getOffset(refObj,y) {
	osTotal=0;
	while (refObj != document.body) {
		osTotal+=y?refObj.offsetTop:refObj.offsetLeft;
		refObj=refObj.offsetParent;
	}
	return osTotal;
}

function wordBalloon(arg) {
	evt=arg?arg:event;
	bShape=this.shape.toLowerCase();
	bCoords=this.coords.split(",");
	for (i=0;i<bCoords.length;i++) bCoords[i]=parseInt(bCoords[i]);
	bMinX=bCoords[0]
	bMinY=bCoords[1]
	if (this.shape.toLowerCase().indexOf("circ")>-1) {
		bMinX-=(bCoords[2]);
		bMinY-=(bCoords[2]);
		bMaxX=bMinX+(2.2*bCoords[2]);
		bMaxY=bMinY+(2.2*bCoords[2]);
	} else {
		bMaxX=bCoords[2];
		bMaxY=bCoords[3];
//		bMinX-=(bCoords[2]);
//		bMinY-=(bCoords[2]);
//		bMaxX=bMinX+(1+bCoords[2]);
//		bMaxY=bMinY+(1*bCoords[2]);	
	}
	
	wMaxW=window.innerWidth?innerWidth+pageXOffset:document.body.clientWidth+document.body.scrollLeft;
	wMinW=(window.pageXOffset!=null)?pageXOffset:document.body.scrollLeft;
	wMaxH=window.innerHeight?innerHeight+pageYOffset:document.body.clientHeight+document.body.scrollTop;
	wMinH=(window.pageYOffset!=null)?pageYOffset:document.body.scrollTop;
	// move left to prevent needless wrapping
	bBox.style.left=0;
	bText.data=this.exTitle
	bBox.style.width="auto";
	// switch back to fixed to prevent Mozilla bug
	bBox.style.width=(bBox.offsetWidth>150)?150:bBox.offsetWidth;
	bImg=null;
	for (i=0;i<document.images.length;i++) {
		if (document.images[i].useMap=="#"+this.parentNode.name) {
			bImg=document.images[i];
			break;
			}
		}
		if (!bImg) return;
		balloonMove(1,1);
		if (parseInt(bBox.style.left)+bBox.offsetWidth > wMaxW) balloonMove(-1,0);
  		if (parseInt(bBox.style.top)+bBox.offsetHeight > wMaxH) balloonMove(0,-1);
		bBox.style.visibility="visible";
		bStem.style.visibility="visible";
	}

function balloonMove(x,y) {
	if (x!=0) {
		bStem.style.borderLeftStyle=(x>0)?"solid":"none";
		bStem.style.borderRightStyle=(x>0)?"none":"solid";
		bStem.style.left=getOffset(bImg,0)+(x>0?bMaxX:(bMinX-bStem.offsetWidth));
		bBox.style.left=parseInt(bStem.style.left)+(x>0?bStem.offsetWidth-1:(1-bBox.offsetWidth));

	}
	if (y!=0) {
		bStem.style.top=getOffset(bImg,1)+(y>0?bMaxY-bStem.offsetHeight:bMinY);
		bBox.style.top=parseInt(bStem.style.top)-(y>0?15:(bBox.offsetHeight-20));
	}
}

function noBalloon() {
	bBox.style.visibility="hidden";
	bStem.style.visibility="hidden";
}

function initBalloon() {
	areas=document.getElementsByTagName("area");
	for (i=0;i<areas.length;i++) {
		areas[i].exTitle=areas[i].title;
		areas[i].title="";
		areas[i].onmouseover=wordBalloon;
		areas[i].onmouseout=noBalloon;
	}
	bBox=document.createElement("div");
	bText=document.createTextNode("");
	bBox.appendChild(bText);
	bStem=document.createElement("div");
	bBox.className="wordBox";
	bStem.className="wordBoxStem";
	bStem.style.borderRightStyle="none";
	bStem.style.fontSize="0px";
	bStem.style.height="0px";
	bStem.style.width="0px";
	document.body.appendChild(bBox);
	document.body.appendChild(bStem);
}

bCheck=navigator.appVersion.search(/msie [0-9.]+; mac/i);
if (document.getElementsByTagName && (bCheck<0 || parseFloat(navigator.appVersion.substr(bCheck+5,4))>5)) window.onload=initBalloon;
//-->
