var _SiteID = "XSKN";
var _LoginUserName = GetUsernameCookie("cookiesusername");
var _CurrentURL = escape(location.href);
var _ReferURL = escape(document.referrer);
var _ScreenSize = screen.width + 'x' + screen.height;
var _UserAction = GetActionCookie("action");


function GetAction()
{
	var obj = window.event.srcElement;
	if(obj.name)
	{
		var action = obj.name;
		if(action.indexOf("submit_") > -1)
		{
			var cookieName = "action";
			var cookieValue = "";
			if(obj.name.lastIndexOf("_") == action.indexOf("_"))
			{
			cookieValue = cookieName + "=" + obj.name.substring(7) ;
			}
			else
			{
				if(obj.action !=null)
				{
				cookieValue = cookieName + "=" + obj.action.substring(7,obj.name.lastIndexOf("_")) ;
				}	
			}
			document.cookie = cookieValue;
		}
	}
}

document.onclick = GetAction;



function GetActionCookie(name)
{
  var cookieValue = "";
  var search = name + "=";
  if(document.cookie.length > 0)
  { 
    offset = document.cookie.indexOf(search);
   
    if (offset != -1)
    { 
      offset += search.length;
      end = document.cookie.indexOf(";", offset);
      if (end == -1) end = document.cookie.length;
      cookieValue = unescape(document.cookie.substring(offset, end))
    }
  }
  document.cookie = name + "=" + "" ;
  return cookieValue;
}

function GetUsernameCookie(name)
{
  var cookieValue = "";
  var search = name + "=";
  if(document.cookie.length > 0)
  { 
    offset = document.cookie.indexOf(search);
   
    if (offset != -1)
    { 
      offset += search.length;
      end = document.cookie.indexOf(";", offset);
      if (end == -1) end = document.cookie.length;
      cookieValue = unescape(document.cookie.substring(offset, end))
    }
  }
  return cookieValue;
}

var _countURL = "http://www.lajogroup.com/Analysis/counter.aspx?u="+_LoginUserName+"&c="+_CurrentURL+"&r="+_ReferURL+"&s="+_ScreenSize+"&ua="+_UserAction+"&sid="+_SiteID;
var _countURL2 = "/WebLogs/Analysis.aspx?c="+_CurrentURL+"&r="+_ReferURL+"&time=" + new Date();
document.write('<img src="'+_countURL+'" width="=" height="0" alt="" border=0>');
document.write('<img src="'+_countURL2+'" width="=" height="0" alt="" border=0>');