	// Pulled this out so it can be changed just once
	var baseServiceURL = "http://nasonex.mxmsite.net/webservice.php";

/** Web Services Methods **/
	function populateLeaderboard() {
		$.getScript(baseServiceURL+"?handler=getLeaderboardData", function() {
			thisMovie("DontBlowIt").leaderboardDataToAS(leaderboardData);
		});
	}

	function postEvent(action, data) {
		var dataToPass = "handler=postEvent&app=" + application + "&sesID=" + sesID + "&userID=" + userID + "&action=" + action + "&data=" + data;
		$.getScript(baseServiceURL+"?"+dataToPass);
	}
	
	function postScore(name, score) {
		var dataToPass = "handler=postScore&name=" + name + "&score=" + score;
		$.getScript(baseServiceURL+"?"+dataToPass, function() {
			thisMovie("DontBlowIt").scoreRankToAS(scoreRank);
		});
	}
	
	function getTreeCount() {
		$.getScript(baseServiceURL+"?handler=getTreeCount", function() {
			thisMovie("DontBlowIt").treeCountToAS(treeCount);
		});
	}
	
/** Calls to AS **/
	function showTreeInitiative() {
		thisMovie("DontBlowIt").showTreeInitiative();
	}
	
	function showShareWithFriends() {
		thisMovie("DontBlowIt").showShareWithFriends();
	}
	
	
/** UTILITY METHODS **/
	// Gets Embedded SWF as addressable object by id
     function thisMovie(movieName) {
         if (navigator.appName.indexOf("Microsoft") != -1) {
             return window[movieName];
         } else {
             return document[movieName];
         }
     }	