<!-- //
//*** DATE DISPLAY REMOVED
// Does not work on dynamic pages!

//*****DISPLAY URL****************
// Input: URL from a CF Fusebox application in either SES (search-engine-safe) or regular format:
//   Examples:
//   SES: http://127.0.0.1/C3Ded/index.cfm/fuseaction/search.ShowSearchPage/fromWhere/XFA.DEDSearch
//   non-SES: http://127.0.0.1/C3Ded/index.cfm?fuseaction=search.ShowSearchPage&fromWhere=XFA.DEDSearch
// Output: URL up to but not including "index.cfm" with rightslash-fuseactionName appended:
//   http://127.0.0.1/C3Ded/search.ShowSearchPage

// document.write("Before URL: " + location.href + "<br />");

// Find Fuseaction value ("fuseaction=xyz") if one exists, strip off everything beyond it
var fuseidx = location.href.indexOf("fuseaction");
//  document.write("fuseidx: " + fuseidx + "<br />");
if (fuseidx > 0)
{
  // Check for SES format or not
	if (location.href.indexOf("?") > 0) //regular
	{
		var fuseidx1 = location.href.indexOf("=",fuseidx+1);
		// document.write("fuseidx1: " + fuseidx1 + "<br />");
		var fuseidx2 = location.href.indexOf("&",fuseidx1+1);
		// document.write("fuseidx2: " + fuseidx2 + "<br />");
		
		var URLAddress = location.href.substring(0, fuseidx1)
		// document.write("URLAddress: " + URLAddress + "<br />");
		if (fuseidx2 < 0)
		{
			// Already at end of URL, nothing to strip
			var URLAddress = location.href
		}
		else
		{
		  // Strip everything beyond fuseaction value 
			var URLAddress = location.href.substring(0, fuseidx2)
		}
		// Strip out "index.cfm?fuseaction="
		var newAddress = URLAddress.replace("/index.cfm?fuseaction=","/");
	}
	else //SES
	{
		var fuseidx1 = location.href.indexOf("/",fuseidx+1);
		// document.write("fuseidx1: " + fuseidx1 + "<br />");
		var fuseidx2 = location.href.indexOf("/",fuseidx1+1);
		// document.write("fuseidx2: " + fuseidx2 + "<br />");
		if (fuseidx2 < 0)
		{
			// Already at end of URL, nothing to strip
			var URLAddress = location.href
		}
		else
		{
		  // Strip everything beyond fuseaction value 
			var URLAddress = location.href.substring(0, fuseidx2)
		}
		// Strip out "index.cfm/fuseaction/"
		var newAddress = URLAddress.replace("/index.cfm/fuseaction/","/");
	}
}
else
  // Leave unchanged
	var newAddress = location.href;
	
// write cleaned URL
document.write("URL: " + newAddress);
//-->