		// tracking for flash
		function simpleTrack(_tag,_folder){			
			if(_folder == null){
				var googletrack = _tag;
			}else{
				var googletrack = "/" +_folder + "/" + _tag;
			}
			setTimeout("pageTracker._trackPageview('" + googletrack + "')", 100);
		}


		//MESSENGER STUFF:

		var appId = '1703';
		var obj;
		var strLcid = '2057';

		//20575602

		window.onload = OnLoad;

		function OnLoad()
		{
			try
			{ obj = new ActiveXObject("MSNMessenger.P4QuickLaunch"); }
			catch (e)
			{ obj = null; }
		} // OnLoad

		function PlayGame()
		{
			if (HasIE() == true)
			{
				// Running IE so launch the game.
				LaunchGame();
			}
			else
			{
				// Running another browser.
				alert("Please reload this page in Internet Explorer\n\nOr choose Time for a Story from the applications menu in Windows Live Messenger.");
			}
		} // PlayGame

		/*
		 * Launches the windows live messenger app window.
		 *
		 * If the user doesn't have messenger, they are alerted.
		 */
		function LaunchGame()
		{
			if (HasMessenger() == true)
			{ obj.LaunchApp(strLcid + appId, ''); }
			else
			{ alert("You must have Windows Live Messenger to play the game."); }
		} // LaunchGame

		function HasMessenger()
		{
			return new Boolean((obj != null));
		} // HasMessenger

		/*
		 * Returns true is the user is running IE.
		 * Returns false if the user is running another browser
		 */
		function HasIE()
		{
			var correctBrowser = (navigator.appName == "Microsoft Internet Explorer");
			var correctVersion = (parseFloat(navigator.appVersion)>=6);
			return new Boolean(correctBrowser + correctVersion);
		} // HasIE



		// triggers the msn app
		function launchIt(_trackTag){
			simpleTrack(_trackTag);
			PlayGame();
		}