function initMaps(map,active) {
	var i,j,area,areas;
		areas=document.getElementById(map).getElementsByTagName("area");
		for (j=0;j<areas.length;j++) {
			area=areas[j];
			area.onmousedown=imgSwap;
			area.onmouseout=imgSwap;
			area.onmouseover=imgSwap;
			area.onmouseup=imgSwap;
		}
	}

function imgSwap(evt) {
	evt=(evt)?evt:event;
	var elem=(evt.target) ? evt.target : evt.srcElement;
	var imgClass=elem.parentNode.name;
	var coords=elem.coords.split(",");
	var clipVal="rect("+coords[1]+"px "+coords[2]+"px "+coords[3]+"px "+coords[0] + "px)";
	var imgStyle;

	switch (evt.type) {
		case "mousedown" :
			imgStyle=document.getElementById(imgClass+"Down").style;
			imgStyle.clip=clipVal;
			imgStyle.visibility="visible";
			break;
		case "mouseout" :
			document.getElementById(imgClass+"Over").style.visibility="hidden";
			document.getElementById(imgClass+"Down").style.visibility="hidden";
			break;
		case "mouseover" :
			imgStyle=document.getElementById(imgClass+"Over").style;
			imgStyle.clip=clipVal;
			imgStyle.visibility="visible";
			break;
		case "mouseup" :
			document.getElementById(imgClass+"Down").style.visibility="hidden";
			// guarantee click in IE
			if (elem.click) {elem.click();}
			break;
		case "active" :
			imgStyle=document.getElementById(imgClass+"Active").style;
			imgStyle.clip=clipVal;
			imgStyle.visibility="visible";
			break;
	}
	evt.cancelBubble=true;
	return false;
}
