if (document.getElementById && document.createTextNode) {
  addEvent(window, "load", init);
}
//displays and hides notes inline with the text
function init() {
	var dl = JLTA.getElementsByClassName(document, "products", "dl")[0];
  var parents = dl.getElementsByTagName("dt");
  var notes = dl.getElementsByTagName("dd");
	for (var i=0; i<parents.length; i++) {
		initialiseNote(parents[i], notes[i]);
	}
	
	if (document.forms["locations"]) {
		document.forms["locations"].onsubmit = locationLinks;
	}
}

//initialises a floating note for reference element dt and child element dd
function initialiseNote(dt, dd) {
	dt.dd = dd;
  dd.style.position = "absolute";
  dt.onmouseover = showNote;
  dt.onmouseout = hideNote;
}

//display associated note next to the calling element. This should be assigned to the element's onMouseOver event.
function showNote() {
	JLTA.addClass(this.dd, "floated_note");
  this.dd.style.top=(JLTA.getPageOffsetTop(this)+this.offsetHeight+5)+"px";
  this.dd.style.left=(JLTA.getPageOffsetLeft(document.getElementById("content")))+"px";
}

//hides the calling element's associated note. This should be assigned to the element's onMouseOut event.
function hideNote() {
	JLTA.removeClass(this.dd, "floated_note");
}

//jlt location menu. User will be redirected to selected destination
function locationLinks() {
	window.location = this["location"].value;
	return false;
}