// Used for AJAX callvar http;		function logActivity (){	/* The document could be opened using 		$First (the spash page)		a viewkey (resources are available e-mail notification)		a view link/url (a view within the database)		Need to be able to handle all situations	*/		try	{				var url;		var agent;		var filename;		var unid;		var view;				pathname = getPathname ();  //alert ( "pathname = " + pathname );				unid = getDocKey ( pathname );  //alert ( "unid = " + unid );				view = getView ( pathname );  //alert ( "view = " + view );				filename = pathname.substring(0,(pathname.lastIndexOf('nsf') + 4 ));			agent = "Web.LogFormActivity"			url = filename + agent + "?OpenAgent&UNID=" + unid + "&view=" + view;  //alert ( "url = " + url );		//return;		// START OF AJAX CODE		//alert ( "calling getHTTPObject ()" );		http = getHTTPObject(); // We create the HTTP Object		//alert ( "opening http" );		http.open("GET", url, true);		//alert ( "setting onreadystatechange" );		http.onreadystatechange = handleHttpResponse;		//alert ( "calling send" );		http.send(null);				}  // end of try	catch (err)	{		txt = "An error was encountered in the logActivity() function. \n\n";		txt += "Error description: " + err.description + "\n\n";		txt += "Click OK to continue. \n\n";		alert ( txt );	}}function getHTTPObject() {	//alert ( "inside getHTTPObject ()" );	var xmlhttp;		/* I'm not sure how, but the following "commented code is conditionally executed in the browser *//*@cc_on  @if (@_jscript_version >= 5)    try {      xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");    } catch (e) {      try {        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");      } catch (E) {        xmlhttp = false;      }    }  @else  xmlhttp = false;  @end @*/  if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {    try {      xmlhttp = new XMLHttpRequest();    } catch (e) {      xmlhttp = false;    }  }  return xmlhttp;}  // end of getHTTPObject ()function handleHttpResponse() {	//alert ( "inside handleHttpResponse ()" );	var results;		if (http.readyState == 4) 	{		results = http.responseText;		//alert ( results );	}}  // handleHttpResponse ()function getPathname (){	var pathname;	var pos;		pathname = window.location.pathname.toLowerCase ();	pos = pathname.indexOf ( '!' );	if ( pos >= 0 )	{		pathname = pathname.substr ( 0, pos );	}		return ( pathname );}function getDocKey ( pathname ){	var pos;	var key;		pos = pathname.lastIndexOf ( '/' );		key = pathname.substr ( pos + 1 );		return ( key );}function getView ( pathname ){	var search = ".nsf";	var pos;	var temp;	var view;		pos = pathname.lastIndexOf ( search );		temp = pathname.substr ( pos + search.length + 1 );		pos = temp.lastIndexOf ( '/' );		if ( pos >= 0 )	{		view = temp.substring ( 0, pos );	}	else	{		view = temp;	}		return ( view );}
