function imageMap(parent,coords,usemap,shape,imgsrc,imgwidth,imgheight) {
	var self = this; 
	
	//DEFINE PRIVATE METHODS
	//-----------------------------------------------------------------------------

	function getMapItems() { //inspect listitems and drop them in a new array
		var targetArray = new Array();
		if (self.parent.hasChildNodes())
		{
			var children = self.parent.childNodes;
			for(var i=0;i<children.length;i++) { 
				if (children[i].tagName == "LI")
				{
					targetArray[targetArray.length] = children[i];
				}
			}
		}
		else {
			console.log("no list items found");
			return false;
		}
		return targetArray;
	}
	//-----------------------------------------------------------------------------
	
	function cleanurl(theurl) { //clean white spaces for safari
		re = new RegExp(/%20/g);
		var scanurl =  theurl.match(re);
		if (scanurl) {
		    var newurl = theurl.replace(re, "");
		    return newurl
		}
		else {
		    return theurl
		}
	}
	//-----------------------------------------------------------------------------
	
	function createMap() { // Creates the full DOM implementation of the image map
		var themap,theimage;
		
		//create image associated with the image map
		theimage = document.createElement('img');
		theimage.setAttribute('width',self.imgwidth);
		theimage.setAttribute('height',self.imgheight);
		theimage.setAttribute('border','0');
		theimage.setAttribute('useMap','#' + self.usemap);
		//theimage.setAttribute('alt',self.usemap);
		theimage.setAttribute('src',self.imgsrc);

		//create image map area for each list item
		themap = document.createElement('map');
		themap.setAttribute('name',self.usemap); //attribute 'name' is used by FF
		themap.setAttribute('id',self.usemap);	//attribute 'id' is used by IE
		for(var i=0;i<getMapItems().length;i++) { 
			area = document.createElement('area');
			area.setAttribute('shape',self.shape);
			area.setAttribute('coords',self.coords[i]);
			var maptarget = cleanurl(getMapItems()[i].firstChild.href);
			area.setAttribute('href',maptarget);
			area.setAttribute('class',getMapItems()[i].firstChild.className);
			area.setAttribute('title',getMapItems()[i].firstChild.title);
			var tooltip = new Tips(area);
			/*
			$(getMapItems()[i]).tooltip({ 
			    track: true, 
			    delay: 0, 
			    showURL: true, 
			    showBody: " - ", 
			    opacity: 0.85 
		    });
		    */
			themap.appendChild(area);
		}
		//insert image and image map in DOM tree
		self.parent.className = "hideme";
		self.parent.parentNode.appendChild(theimage);
		self.parent.parentNode.appendChild(themap);
	}
	//-----------------------------------------------------------------------------


	//PUBLIC VARIABLES
	self.parent = document.getElementById(parent);
	self.coords = coords;
	self.usemap = usemap;
	self.shape = shape;
	self.imgsrc = imgsrc;
	self.imgwidth = imgwidth;
	self.imgheight = imgheight;

	//Initialize the image map and its variables
	createMap();
}
