function loadInspectionNav(eventArgs) {
	if (typeof sIFR == "function" && useFlash) {
		sIFR.replaceElement(named({sWmode: "opaque", nWidth: "780", nHeight: "445", oNodeRef: document.getElementById("pIC_Nav"), sFlashSrc: "/certified/flash/inspection_fpo.swf"}));
	}
}

if ((deep == "inspection") || (window.location.href.indexOf("/certified/whatis/inspection/")!==-1)) AttachEvent(window, "load", loadInspectionNav);

function openGMBrochure() {

	/*openWindow("../../certified/pdf/GM_Certified_Used_Brochure.pdf","new");*/
	var newWindow = window.open("../../certified/pdf/GMCertified_brochure_09.pdf");
	if (window.focus && newWindow) { newWindow.focus() }
}

function loadWhatisVideo() {
	if (typeof sIFR == "function" && useFlash) {
		//document.getElementById("flashW").innerHTML = '<embed id="movie1" height="313" width="557" src="/certified/flash/whatIsVideo.swf" allowFullScreen=true quality="best" flashvars="videoPath=/certified/flash/flv/GM_QuestionMark_Mix.flv&vehicleSearchLink=/cuv/gmcertified/searchvehicle.jhtml&vehicleSearchTarget=_self&locateADealerLink=/certified/dealerlocator/&locateADealerTarget=_self&skinPath=/certified/flash/whatIsVideoSkin.swf&actionSourcePath=/certified/flash/OmnitureActionSource.swf" wmode="opaque" bgcolor="#FFFFFF" pluginspace="http://www.macromedia.com/go/getflashplayer" scale="noscale" type="application/x-shockwave-flash" style="width: 557px; height: 313px;"/>';
		//sIFR.replaceElement(named({sWmode: "opaque", nWidth: "557", nHeight: "313", allowFullScreen: "true", oNodeRef: document.getElementById("whatVideo"), sFlashSrc: "/certified/flash/whatIsVideo.swf"}));
		var so = new SWFObject("/certified/flash/whatIsVideo.swf", "movie1", "557", "313", "8", "#fffff");
		so.addParam("wmode", "opaque");
		so.addParam("allowFullScreen", "true");
		so.addVariable("txtCount", 1);
		var ihtml = sIFR.myInnerHTML(document.getElementById('flashW'));
		ihtml = ihtml.split("\"").join(escape("\""));
		ihtml = ihtml.split("&").join(escape("&"));
		so.addVariable("txt0", ihtml);
		so.addVariable("videoPath", "/certified/flash/flv/GM_QuestionMark_Mix.flv");
		so.addVariable("vehicleSearchLink", "/cuv/gmcertified/searchvehicle.jhtml");
		so.addVariable("vehicleSearchTarget", "_self");
		so.addVariable("locateADealerLink", "/certified/dealerlocator/");
		so.addVariable("locateADealerTarget", "_self");
		so.addVariable("skinPath", "/certified/flash/whatIsVideoSkin.swf");
		so.addVariable("actionSourcePath", "/certified/flash/OmnitureActionSource.swf");
		so.write("flashW");

		var movie = document.getElementById("movie1");

		movie.onmouseout = function() {
			this.hideVideoControls();
		}

		movie.onmouseover = function() {
			this.showVideoControls();
		}
	}
}
var tabsArray = new Array("#WhatIsGMCertified","#WhatGMCertifiedMeanstoMe");
function closeTabs(){
	for (i in tabsArray){
		$(tabsArray[i]).hide();
		$(tabsArray[i]+"Tab").addClass("off");
	}
}
function showTab(toShowId){
	$(closeTabs());
	$(toShowId).show();
	$(toShowId+"Tab").removeClass("off");
}

function showMathVideo(){
	document.getElementById("videoInfo").style.display = "block";
	document.getElementById("gmCertifiedVideoImage").style.display = "none";
	document.getElementById("gmCertifiedBrochure").style.marginLeft = "296px";
}

function onFlashReady() {
	//Call flash method
	thisMovie("movie1").playVideo();
}

function thisMovie(movieName) {
	if (navigator.appName.indexOf("Microsoft") != -1) {
		return window[movieName];
	} else {
		return document[movieName];
	}
}
