How do I use TimeMe.js?
			Simply include the following lines of code in your page's head element: 
			
<script src="ifvisible.js"></script>
<script src="timeme.js"></script">
<script type="text/javascript"">
	TimeMe.setIdleDurationInSeconds(30);
	TimeMe.setCurrentPageName("my-home-page");
	TimeMe.initialize();		
</script">
			
			This code both imports the TimeMe.js library and initializes it.  Notice that
			this code sets the idle duration to 30 seconds, which means 30 seconds of user
			inactivity (no mouse or keyboard usage on the page) will stop the timer.  Also,
			we define a page name (my-home-page) to associate with the current timer.
			
			Once imported and initialized, we can call the various methods made available
			by TimeMe.js.  See the 
API documentation below for
			a complete breakdown of all of the available functionality.  The most basic
			feature is to retrieve the time spent by the user on the current page:
			
				var timeSpentOnPage = TimeMe.getTimeOnCurrentPageInSeconds();
			 
			In most cases you will want to store the time spent on a page for analytic purposes.  You will
			therefore need to send the time spent on a page to the server at some point!  When is
			the best time to do this?  You can hook into the window.onbeforeunload event to do so.
			In most browsers this method is fired during a page's shut-down routine.
			Notice below that we use a synchronous request (not the usual asynchronous request) to guarantee
			the request to our server arrives before the page closes:
			
				window.onbeforeunload = function (event) {
	xmlhttp=new XMLHttpRequest();
	xmlhttp.open("POST","ENTER_URL_HERE",false);
	xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	var timeSpentOnPage = TimeMe.getTimeOnCurrentPageInSeconds();
	xmlhttp.send(timeSpentOnPage);
};
			 
			Using 'onbeforeunload' is by no means a requirement.  You can hook into any other event
			or logical point in your application to send the time spent information to the server.
			
			In a traditional web design where one static page is served for each request
			made by the client, any call to getTimeOnCurrentPageInSeconds() will be
			unique and valid for each page that imports and initializes TimeMe.js. Alternatively,
			if using a Single Page Application (SPA) design, TimeMe.js can have its timer stopped,
			page name switched, and the timer resumed (for the new page) with the following calls:
			
				TimeMe.stopTimer();
// ... Now might be a good time to upload the time spent on the page to your server!
// ... load up new page
TimeMe.setCurrentPageName("new-page-name");
TimeMe.startTimer();
			 
			All page times are tracked in TimeMe.js, so you can review total aggregate time
			spent on each page for a particular user's session:
			
				var timeSpentReport = TimeMe.getTimeOnAllPagesInSeconds();
			 
			This call will return an array of objects of page names and the corresponding aggregate
			time spent on that page.
		
 		
		
			
			API
	
			
				TimeMe.setCurrentPageName(newPageName);
				Sets the page name to be associated with any future calls to timer. 
				
			
 			
			
				TimeMe.setIdleDurationInSeconds(durationInSeconds);
				Sets the time (in seconds) that a user is idle before the timer is
				turned off.  Set this value to -1 to disable idle time outs.
				
			
 		
			
				TimeMe.initialize();
				Initializes the timer.  Should only be called when first importing the
				library and beginning to time page usage.
				
			
 				
			
				var timeInSeconds = TimeMe.getTimeOnCurrentPageInSeconds();
				Retrieves the time spent (in seconds) on the current page.
				
			
 
			
				var timeInSeconds = TimeMe.getTimeOnPageInSeconds(pageName);
				Retrieves the time spent (in seconds) on the indicated page.
				
			
 	
			
				var timeSpentInfo = TimeMe.getTimeOnAllPagesInSeconds();
				Retrieves the time spent on all pages that have been recorded using TimeMe.js.
				Notice this only works for Single Page Applications (SPAs) where TimeMe.js is
				only initialized once.
				
			
 	
			
				TimeMe.startTimer();
				Manually starts the timer for the current page.  Notice this only works if the
				timer is currently stopped.
				
			
 	
			
				TimeMe.stopTimer();
				Manually stops the timer.  Notice this only works if the timer is currently running.
				
			
 
			
				TimeMe.resetRecordedPageTime(pageName);
				Clears the recorded time for the indicated page name.
				
			
 	
			
				TimeMe.resetAllRecordedPageTimes();
				Clears all recorded times for all pages.