/*

>>>> DO NOT EDIT THIS SCRIPT <<<<

Name: Google Analytics Keyword Sleuth 2.0.4 - ga.js Version
Author: Michael Harrison
Created: 01/18/2008
Description: If a visitor arrives from a search engine, grab their exact search query and store it in the user defined variable.

<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-734224-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>

~~~~~~
~~~~~~
Last modified by Michael Harrison on 11/05/2008
*/

function noPercent(x)
{
	x = unescape(x);
	return x.replace(/\+/g," ").replace(/^\s\s*/, '').replace(/\s\s*$/, '');
}

function getRef()
{
	ref = document.referrer;
	re = /(\?|&)(q|p|query|encquery|qt|terms|rdata|qs|wd|text|szukaj|k|searchExpr|search_for|string|search_query|searchfor)=([^&]+)/;
	searchq = re.exec(ref);
	if(searchq) {
		searchq[3] = noPercent(searchq[3]);
		sleuthTracker._setVar(searchq[3]);
	}
	else {
		sleuthTracker._setVar('Referral: ' + document.referrer);
	}
}

function sleuth()
{
	if(document.location.search.indexOf("gclid")!=-1||document.location.search.indexOf("cpc")!=-1) {
		getRef();
	}
}

var sleuthTracker = _gat._getTracker("UA-1");
sleuthTracker._initData();
sleuth();
