var xOffset = 20;
var yOffset = -5;
function showHelp (objectId, eventObj) {
    if(eventObj) {
		// hide any currently-visible popups
		closeHelp();
		// stop event from bubbling up any farther
		eventObj.cancelBubble = true;
		
		// move popup div to current cursor position 
		// (add scrollTop to account for scrolling for IE)
		var x = (eventObj.pageX)?eventObj.pageX + xOffset:eventObj.x + xOffset + ((document.body.scrollLeft)?document.body.scrollLeft:0);
		var y = (eventObj.pageY)?eventObj.pageY + yOffset:eventObj.y + yOffset + ((document.body.scrollTop)?document.body.scrollTop:0);
				
		moveObject(objectId, x, y);
		
		// and make it visible
		if( changeObjectVisibility(objectId, 'visible') ) {
		    // if we successfully showed the popup
		    // store its Id on a globally-accessible object
		    window.currentlyVisiblePopup = objectId;
		    return true;
		} else {
		    // we couldn't show the popup
		    return false;
		}
	} else {
		// there was no event object, so we won't be able to position anything, so give up
		return false;
    }
}

function closeHelp() {
    // note: we've stored the currently-visible popup on the global object window.currentlyVisiblePopup
    if(window.currentlyVisiblePopup) {
		changeObjectVisibility(window.currentlyVisiblePopup, 'hidden');
		window.currentlyVisiblePopup = false;
    }
}

function closeWindow() {
    window.close();
}

