/*	
this code contains methods that allows the app to track events inside flash
*/
//
// vars
//
startQuiz="";
endQuiz="";
challengeFriend="";
//
// public methods
//
// track startQuiz
function trackStartQuiz(what) {
	//alert("trackStartQuiz(): " + what);
	var sps = what.split("&");
	sp1 = sps[0].split("=");
	startQuiz = sp1[1];
	reportStartQuiz();
	clearStartQuiz();
}
// track endQuiz
function trackEndQuiz(what) {
	//alert("trackEndQuiz(): " + what);
	var sps = what.split("&");
	sp1 = sps[0].split("=");
	endQuiz = sp1[1];
	reportEndQuiz();
	clearEndQuiz();
}
// track challengeFriend
function trackChallengeFriend(what) {
	//alert("trackChallengeFriend(): " + what);
	var sps = what.split("&");
	sp1 = sps[0].split("=");
	challengeFriend = sp1[1];
	reportChallengeFriend();
	clearChallengeFriend();
}
// report methods		
function reportStartQuiz() {
	send_to_omniture1(startQuiz);
}
function reportEndQuiz() {
	send_to_omniture2(endQuiz);
}
function reportChallengeFriend() {
	send_to_omniture3(challengeFriend);
}
//clear methods	
function clearStartQuiz() {
	startQuiz = "";
}
function clearEndQuiz() {
	endQuiz = "";
}
function clearChallengeFriend() {
	challengeFriend = "";
}
// omniture methods
function send_to_omniture1(myText) {
	var sendThis = "HBO: Big Love: Quiz: "+myText;
	//alert(sendThis);
	var s=s_gi(s_account);
	s.linkTrackVars='pageName,prop1,server';
	s.linkTrackEvents='None';
	s.pageName=sendThis;
	s.server='hbo.com';
	s.prop1="HBO"
	s.t(this,'o',myText);
}
function send_to_omniture2(myText) {
	var sendThis = "HBO: Big Love: Quiz: "+myText;
	//alert(sendThis);
	var s=s_gi(s_account);
	s.linkTrackVars='pageName,prop1,server';
	s.linkTrackEvents='None';
	s.pageName=sendThis;
	s.server='hbo.com';
	s.prop1="HBO"
	s.t(this,'o',myText);
}
function send_to_omniture3(myText) {
	var sendThis = "HBO: Big Love: Quiz: "+myText;
	//alert(sendThis);
	var s=s_gi(s_account);
	s.linkTrackVars='pageName,prop1,server';
	s.linkTrackEvents='None';
	s.pageName=sendThis;
	s.server='hbo.com';
	s.prop1="HBO"
	s.t(this,'o',myText);
}