var formdump = function(frm) {
	var _pub = {
		map: null,
		controls: true,
		info_div: null,
		last_parent_node: null,
		inputfocus: function() {
			
			// Use a helper tag only if we need to...otherwise hide it
			if (this.title == "") {
				_pub.info_div.style.display = "none";
			}
			else {
				lbl = document.getElementById("label-" + this.name); // NOTE: LABELS ARE IDENTIFIED BY #label-[labelname] 
																		// Its a hack until later fixed
																		
				// Get the title
				item_title = lbl.innerHTML;
				
				// Create the HTML
				html = '';
				html += '<div>' + item_title + '</div>';
				html += '<p>' + this.title + '</p>';
				
				opos = _pub.obj_pos(this);
				
				// Position Object and set HTML
				_pub.info_div.innerHTML = html;
				_pub.info_div.style.left = (opos.x + this.offsetWidth + 30) + "px";
				_pub.info_div.style.top = (opos.y + (this.offsetHeight/2 - 20)) + "px";
				_pub.info_div.style.display = "";
				
			}
			
			// Change the last parent <p class="selected"> tag to <p>
			if (_pub.last_parent_node != null) {
				_pub.last_parent_node.className="";
			}
			
			// Change the parent <p> tag to <p class="selected">
			if (this.type.toLowerCase() != "submit") {
				if (this.parentNode.nodeName.toLowerCase() == "p") {
					_pub.last_parent_node = this.parentNode;
					_pub.last_parent_node.className = "selected";
				}
			}
			
			if (this.oldonfocus != null) {
				this.oldonfocus();
			}
		},
		bind: function(frm) {
			// Loop through each input field
			for (i=0;i<frm.elements.length;i++) {
				if (frm.elements[i].onfocus != null) {
					frm.elements[i].oldonfocus = frm.elements[i].onfocus;
				}
				frm.elements[i].onfocus = _pub.inputfocus;
					
				// Set the parent to activate the child
				if (frm.elements[i].parentNode.nodeName.toLowerCase() == "p") {
					
					// Attach the child input box to the parent <p> so we can ref. it later
					frm.elements[i].parentNode._childElement = frm.elements[i];
					
					// This function calls the ref. we created on the line above
					frm.elements[i].parentNode.onclick = function () {
						this._childElement.focus();
					}
				}
			}
			frm.onblur = _pub.inputnofocus;
		},
		obj_pos: function(e){
			var left = 0;
			var top  = 0;
			while (e.offsetParent){
				left += e.offsetLeft + (e.currentStyle?(parseInt(e.currentStyle.borderLeftWidth)).NaN0():0);
				top  += e.offsetTop  + (e.currentStyle?(parseInt(e.currentStyle.borderTopWidth)).NaN0():0);
				e     = e.offsetParent;
			}
		
		
			left += e.offsetLeft + (e.currentStyle?(parseInt(e.currentStyle.borderLeftWidth)).NaN0():0);
			top  += e.offsetTop  + (e.currentStyle?(parseInt(e.currentStyle.borderTopWidth)).NaN0():0);
		
			return {x:left, y:top};
		}
	}
	
	_pub.info_div = document.createElement('div');
	_pub.info_div.style.display = "none";
	_pub.info_div.className = "forminfo";
	
	//document.body.appendChild(_pub.info_div);
	frm.appendChild(_pub.info_div);
	
	// Bind the form to this
	_pub.bind(frm);
}