/************************************************************
		Name: s.code_flash2catalyst.js
		Date: Dec. 14, 2004
		Creator: skube
/************************ DESCRIPTION ************************

		For when Site Catalyst is used inside Flash pieces.
		
		Basically, the swf passes an argument via the function below, 
		which then re-assigns a Site Catalyst value and then
		proceeds to invoke a specific funciton with the s.code_remote_en_CA.js
		
/************************ USAGE INSTRUCTIONS ************************
		
		The swf inovkes the function: siteTrack(arg)
		where:
			arg is an integer
		
		The arg gets appended to a string to form a new value for the
		s.pageName variable for Site Catalyst.
		
		Depending on environment, the specific Site Catalyst function will
		require different arguments, shown below:
				
		// for Testing (mo.gm.ca)
		s.gs("devgmcanadacom");

		// for live
		s.gs("gmcanadacom");
		
		Since substitutions occur during MO builds & deploys,
		Any instance of "http://gm.ca" should be translated to
		"http://mo.gm.ca". We can use this fact to automatically
		set the proper server...
		
/************************** AUTO CONFIG SECTION **************************/
// Set which development environment
var currServer = "http://gm.ca"; // this should change to mo.gm.ca 
var server = (currServer == 'http://mo.gm.ca') ? "devgmcanadacom" : "gmcanadacom";
/************************** AUTO CONFIG SECTION **************************/

function scTrack(num){

	// Rather than setting s.pageName here, we'll use s.pageName from page load...
	//s.pageName = "Goodwrench Service - Autocare Video Library -";
	
	switch(num) {
		case "a":
			s.pageName += " - Landing Page"
			break;
		case "b":
			s.pageName += " - Your Tires"
			break;
		case "c":
			s.pageName += " - Changing A Flat"
			break;
		case "d":
			s.pageName += " - Checking Your Oil"
			break;
		case "e":
			s.pageName += " - Your Battery"
			break;
		case "f":
			s.pageName += " - Filters"
			break;
		case "g":
			s.pageName += "  - Air Conditioning"
			break;
		case "h":
			s.pageName += " - Identifying Fluids"
			break;			
		case "i":
			s.pageName += " - Fluids"
			break;
		case "j":
			s.pageName += " - Belts and Hoses"
			break;			
		case "k":
			s.pageName += " - Wiper Blades"
			break;
		case "l":
			s.pageName += " - Brakes"
			break;
		case "m":
			s.pageName += " - Headlamps"
			break;
		case "n":
			s.pageName += " - Suspension"
			break;
		case "o":
			s.pageName += " - Exhaust System" 
			break;
		case "p":
			s.pageName += " - Roadside Safety and OnStar" 
			break;
	}
	
	// Apparently, all other variable are supposed to be cleared...stupido.
	s.channel = 'Parts &#38; Service';
	s.server = 'GMCanada.com';
	s.prop3 = '';
	s.prop4 = '';
	s.prop5 = '';
	s.prop6 = '';
	s.prop7 = '';
	
	
	// re-invoke funtion
	//alert(isLoaded2);
	 s.t();
}

// make sure page has loaded before starting the movie
function checkpageLoad() {
	//keep checking to see if page is loaded before continuing
	if (isLoaded2) {
		var movie = window.document.coba_fc;
		movie.SetVariable("scloaded","true");
		
	}
	else {
		setTimeout('checkpageLoad()',1000)
	}
	
}
