

$(document).ready(function() {


		// Hide help text elements on calculation pages
	$('.helptext').hide().css('height', 0).css('width', 0);


	
		// Show help text when user puts cursor over "?" next to calculation input boxes
	$("a[href='#']").mouseover(function(){

		var offset = $(this).offset();
		var height = $(this).children('span').height();
		var width = $(this).children('span').width();

		var text = $(this).children('span').html();
		$('div.helptext').html(text);
	
		$('.helptext').show();
		$('div.helptext').css('height', 'auto');
		$('div.helptext').css('width', 'auto');
		$('iframe.helptext').css('height', $('div.helptext').height() );
	
		var w = $('div.helptext').width();
	
		$('.helptext').css('left', offset.left - w);
		$('.helptext').css('top', offset.top + 20);
			
	});

		
		// Hide help tex box when user clicks on the box itself or anywhere else
	$("div, table").click(function(){
		$('.helptext').hide().css('height', 0);
		$('.helptext').hide().css('width', 0);
	});
		
		
});




function disableEnterKey(e) {

	var key;      
	if(window.event) key = window.event.keyCode; 	//IE
	else key = e.which; //firefox      
	return (key != 13);

}



