//Description:    Client-side code library for Children's .asp templates
//Author:         Steve Eidemiller
//Created:        03/29/2011

/**************************************************************************
Revision History:
03/29/2011 - SteveE - Added Google Analytics function
04/01/2011 - SteveE - Added Omniture's Site Catalyst function
**************************************************************************/



var _gaq = _gaq || [];
function chcGoogleAnalytics()
{
	_gaq.push(['_setAccount', 'UA-11218847-1']);
	_gaq.push(['_setDomainName', '.childrensmn.org']);
	_gaq.push(['_trackPageview']);

	chcGoogleAnalytics2();
	/*
	(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);
	})();
	*/
}

function chcGoogleAnalytics2()
{
	(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);
	})();
}

function chcOmnitureAnalytics()
{
	var s_code = s.t();
	if (s_code) document.write(s_code);
}

