// awstats_navigationUrl_tracker.js
// 
// Writes a String like followed into log, which contains the NavigationUrl and the QueryString.
// The logentry has to be analyzed with the extra sections of awstats.
// 
// example of logentry:
// 127.0.0.1 - - [06/Dec/2006:08:50:15 +0100] "GET /js/awstats_navigationUrl_tracker.js?navigationUrl=My_Portal/NeedsAssessment/PreAssessmentReport&PC_7_0_M0_spf_strutsAction=!2fdspAverageGapValues.do!3fassessmentID=Pre!20teacher-assessment-ChiangMai&nocachehelp=1165391415222 HTTP/1.1" 200 1598
// 
// There is a little possibility to configure the hits on the logentries. Because of the browsercaching, each page is normaly logged one's on the same browser session.
// If you want to log each single hit, than you have to write a changing variable to the output (search for 'nocachehelp' and replace the the set of the 'imgsrc1' with this one)
// 
//-------------------------------------------------------------------
// You can add this file onto some of your web pages (main home page can
// be enough) by adding the following HTML code to your page body:
// 
// <script language="javascript" type="text/javascript" src="<%= awstatsNavigationTrackerFile %>" ></script>
// <script language="javascript" type="text/javascript">
// 	showNavigationPath("<%=navigationUrl %>");	
// </script> 
// <noscript><img src="<%= awstatsNavigationTrackerFile %>" height="0" width="0" border="0" style="display: none"></noscript>
//
//-------------------------------------------------------------------

  
   
function showNavigationPath(navigationPath) {
  	
	var awstatsnavigationtrackerurl="/wps/js/awstats_navigationUrl_tracker.js";
	var imgsrc1 = awstatsnavigationtrackerurl + navigationPath + "&nocache=" + new Date().getTime();    // to bypass the caching...
	//var imgsrc1 = awstatsnavigationtrackerurl + navigationPath;
	
	if( document.createElementNS ) { 
    	var l=document.createElementNS("http://www.w3.org/1999/xhtml","img");
        l.setAttribute("src", imgsrc1 );
        l.setAttribute("height", "0");
        l.setAttribute("width", "0");
        l.setAttribute("border", "0");
        document.getElementsByTagName("body")[0].appendChild(l);
	} else {
		document.write('<img style="display:none;" src="'+ imgsrc1 +'" height="0" width="0" border="0" />');
 	}
} 
	
