function nothing() {}

function createElem() {
	var def = document.createElement("DIV");
	def.id = "def";
	def.className = "defBox";
	document.body.appendChild(def);
}


function hideElem(elemid) {
	box = document.getElementById(elemid);
	box.style.visibility = "hidden";
	}

function getDef(defName) {
	switch(defName)
	{
		//enter all definitions below
		case "contact":
			definition = "Contact Insecticides kill pests simply by coming into direct contact with the target pest.";
			break;
		case "residual":
			definition = "Residual Insecticides remain on the treated surface long after treatment and kill insects which come in contact with the surface. This helps achieve long lasting control for troublesome pest problems.";
			break;
		default:
			definition = "Error: definition not found.";
	}
	return definition;
}
	
function popUp(elemid,e,defName) {
	box = document.getElementById(elemid);
	box.style.visibility = "visible";
	offset = 15;
	
	definition = getDef(defName);
	
	box.innerHTML = definition;
	
	if (document.all) {
		mouseX = event.clientX + document.body.scrollLeft;
		mouseY = event.clientY + document.body.scrollTop;
	} else {
		mouseX = e.pageX;
		mouseY = e.pageY;
	}
	
	if (mouseX < 0) {mouseX = 0}
	if (mouseY < 0) {mouseY = 0}
	
	box.style.left = (mouseX + offset) + 'px';
	box.style.top = (mouseY + offset) + 'px';
}