/*
	 Marketing Analytics Tracking Script v4.0, 29 Apr 2007
	 Copyright HitDynamics Ltd. 2006, All Rights Reserved
	 @Vars:
	 - dmn_id - HD ID of tracked domain. Required.
	 - dmn_name - name of tracked domain. Required.
	 - act_id - HD ID of domain's action. Optional.
	 - val - action's revenue value. Required for every action.
	 - cur - action's currency. Required for every action.
	 - val_converted - action's revenue value, converted into domain's primary currency. Required for every action.
	 - act_atr - action's additional attributes. Optional for every action. Syntax for these attributes is:
	 attribute1_name=attribute1_value[;attribute2_name=attribute2_value...]
	 - vsr_code - Unique domain-specific ID of visitor. Optional.
 */

/**
 * NeoGetCookie()
 * @access public
 */

function NeoGetCookie(name)
{
	var c="; "+document.cookie;
	var b=c.indexOf("; "+name+"=");
	if (b==-1) return '';
	var e=c.indexOf(";",b+1);
	if (e==-1) e=c.length;
	return c.substring(b+name.length+3,e);
}

/**
 * NeoSetCookie()
 * @access public
 */

function NeoSetCookie(name,value)
{
	var x=new Date((new Date()).getTime()+8E10);
	document.cookie=name+"="+escape(value)+"; expires="+x.toGMTString()+"; path=/";
	return NeoGetCookie(name);
}

/**
 * NeoSetSource()
 * @access public
 */

function NeoSetSource()
{
	var page=document.location.href.substring(0,255);
	var page_len = page.length;
	if (page.substring(page.length-5, page.length) == 'hwneo')
	{
		NeoSetCookie("hwneo",1);
	}
}

function NeoCheckSource()
{
	var rv = '';
	if (NeoGetCookie('hwneo'))
	{
		rv = "Hitwise PPC";
	}
	return rv;
}

// vim:noai:cindent:cinkeys=0{,0},0),\:,!^F,o,O,e:cino=m1u4:noexpandtab
