/********************************************************
		Version 1.0
		Description: swapImage() and swapImage2() can be use in conjuction with
		swapImgRestore() and swapImgRestore2() to perform multiple rollovers
 		for one mouse event and later return either image to its previous state
 		Passes:		onMouseOver="swapImage('imgName','','/pathToImageRollover.jpg',1);"
							onMouseOut="swapImgRestore();"
********************************************************/
// image rollover helper function
function findObj(n, d) { //v4.01
	var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
	d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
	if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
	for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=findObj(n,d.layers[i].document);
	if(!x && d.getElementById) x=d.getElementById(n); return x;
}	
// image rollover
function swapImg() {
	var i,j=0,x,a=swapImg.arguments; document.sr=new Array; for(i=0;i<(a.length-2);i+=3)
	   if ((x=findObj(a[i]))!=null){document.sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
// secondary image rollover
function swapImg2() {
	var i,j=0,x,a=swapImg2.arguments; document.sr2=new Array; for(i=0;i<(a.length-2);i+=3)
		if ((x=findObj(a[i]))!=null){document.sr2[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
	
}

function swapGalleryImage(strImage,ele) {
	var oImg = document.getElementById("photo_main")
	
	setTimeout(function () {oImg.src = strImage}, 100);

	if (ele && ele.className.indexOf("gallery_thumb")!=-1) 
		{ photogalleryThumbTurn(ele); }
}

// image restore
function swapImgRestore() {
	var i,x,a=document.sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
// secondary image restore
function swapImgRestore2() {
	var i,x,a=document.sr2; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

/********************************************************************
Version: 1.0
Date: 06-28-04
Description: checks to make sure the keyword search is not empty.
*********************************************************************/
function submitSearch() {
	if ((document.forms["question"].query.value == "") || (document.forms["question"].query.value == "Enter Keyword")) {
		alert("You must enter a keyword to continue.");
		document.forms["question"].query.focus();
		return false;
	} else {
		document.forms["question"].submit();
	}
}

function generatespotlight(cat,nameplate){
	var axel = Math.random()+ "";
	var a = axel * 10000000000000;
	try{
	   
	    var obj = document.getElementById("ospotlight");
	    obj.innerHTML = '<IFRAME SRC="http://fls.doubleclick.net/activityi;src=690333;type=mcgen2;cat=' + cat + ';u1=' + nameplate + ';ord='+ a + '?" WIDTH=1 HEIGHT=1 FRAMEBORDER=0></IFRAME>';
         
    }catch(e){
    }
   
}

function SubmitToFooterSearch( thisForm ) {
		/********************************************************************
		Version: 1.0
		Date: 06-28-04
		Description: checks to make sure the keyword search is not empty.
		*********************************************************************/
		if ((document.forms[thisForm].query.value == "") || (document.forms[thisForm].query.value == "Search")) {
			alert("You must enter a keyword to continue.");
			document.forms[thisForm].query.focus();
			return false;
		} else {
			document.forms[thisForm].submit();
		}
	}
	
function ClearFooterSearch( thisForm ) {
		/***********************************************************
		Version: 1.0
		Date: 06-28-04
		Description: Clears search input box on the footer.
		************************************************************/
		if (document.forms[thisForm].query.value == "Search") {
			document.forms[thisForm].query.value = "";
		}
	}

/*********************************************************************
	Version 1.0
	Date: 03-23-04
	Description: Checks for valid form information 
				 on locate a dealer global header
**********************************************************************/
function CheckDealerLocator() {
		var frmLocator = document.forms["frmHeaderDealer"];
		var sSearchBy = frmLocator.txtSearchBy.value;

		if(sSearchBy == "") {
			alert("Please enter a 5-digit numeric Zip Code");
			return false;
		}
		if(sSearchBy == "Enter Zip Code") {
			alert("Please enter a 5-digit numeric Zip Code");
			return false;
		}
		if(sSearchBy.length != 5) {
			alert("Please enter a 5-digit numeric Zip Code");
			return false;
		}
		if(! IsZipCode(sSearchBy)) {
			alert("Please enter a 5-digit numeric Zip Code");
			return false;
		}
		cookieDelete('dlr_search', '/', '');
		cookieSet('dlr_search', sSearchBy, 180, '/');
		setZipCookie( sSearchBy );
		frmLocator.action = frmLocator.action + "?zip=" + sSearchBy;
		return true;
}
/*  flash only dealer search */
function CheckDealerLocator2(value) {
	cookieSet('dlr_search', value, 180, '/');
	setZipCookie(value);
	document.location.href='/shoptools/find_dealer.asp?zip=' + value + "&radius=50";
}

/*************************************************************
	Version: 1.0
	Date: 06-21-04
	Description: Clears zipcode input box on the header.
**************************************************************/
function ClearDealerBox() {
	//var sValue = cookieGet("dlr_search");

		var sValue = cookieGet( 'zipcode' );
		if(!sValue) {
			sValue = ""; 
		}
	
	if (document.forms["frmHeaderDealer"].txtSearchBy.value == "Enter Zip Code") {
		if(sValue == "") {
			document.forms["frmHeaderDealer"].txtSearchBy.value = "";
		} else {
			document.forms["frmHeaderDealer"].txtSearchBy.value = sValue;
		}
	} else {
		if(sValue == "") {
			document.forms["frmHeaderDealer"].txtSearchBy.value = "";
		} else {
			document.forms["frmHeaderDealer"].txtSearchBy.value = sValue;
		}
	}
}
/*************************************************************
	Version: 1.0
	Date: 06-21-04
	Description: Clears zipcode input box on the footer.
**************************************************************/
function CheckCPODealerLocator() {
	var frmLocator = document.forms["frmCPO"];
	var sSearch = frmLocator.txtSearchBy.value;
	
	if(sSearch == "") {
		alert("Please enter a 5-digit numeric Zip Code");
		return false;
	}
	if(sSearch == "Enter Zip Code") {
		alert("Please enter a 5-digit numeric Zip Code");
		return false;
	}
	if(! IsZipCode(sSearch)) {
		alert("Please enter a 5-digit numeric Zip Code");
		return false;
	}
	cookieSet('dlr_search', frmLocator.txtSearchBy.value, 180, '/');
	setZipCookie(frmLocator.txtSearchBy.value)
	return true;
}
function ClearCPODealerBox() {
	var sValue = cookieGet("dlr_search");
	if(!sValue) { 
		sValue = cookieGet( 'zipcode' );
		if(!sValue) {
			sValue = ""; 
		}
	}
	if (document.forms["frmCPO"].txtSearchBy.value == "Enter Zip Code") {
		if(sValue == "") {
			document.forms["frmCPO"].txtSearchBy.value = "";
		} else {
			document.forms["frmCPO"].txtSearchBy.value = sValue;
		}
	} else {
		if(sValue == "") {
			document.forms["frmCPO"].txtSearchBy.value = "";
		} else {
			document.forms["frmCPO"].txtSearchBy.value = sValue;
		}
	}
}
/***********************************************************
Version 1.0
Date: 03-23-04
Description: Deletes a cookie
************************************************************/
function cookieDelete(name, path, domain) {
	/***********************************************************
	Version 1.0
	Date: 03-23-04
	Description: Deletes a cookie
	************************************************************/
	//alert( 'cookieDelete called with: ' + name + ', ' + path + ', ' + domain );
	var value = cookieGet(name);
	if( !path ) { path = '/'; }
	if( !domain ) { domain = ''; }
	if (value != null) {
		document.cookie = name + '=' + ((path) ? '; path=' + path : '') + ((domain) ? '; domain=' + domain : '') + '; expires=Thu, 01-Jan-70 00:00:01 GMT';
	}
	return value;
}
/***********************************************************
Version 1.0
Date: 03-23-04
Description: Gets a cookie value
************************************************************/
function cookieGet(name) {
	/***********************************************************
	Version 1.0
	Date: 03-23-04
	Description: Gets a cookie value
	************************************************************/
	//alert( 'cookieGet called with: ' + name );
	var docCookie = document.cookie;
	// find beginning of cookie value in document.cookie
	var prefix = name + "=";
	var start = docCookie.indexOf("; " + prefix);
	if (start == -1) {
		start = docCookie.indexOf(prefix);
		if (start != 0) return null;
	}	else {
		start += 2;
	}	
	var end = docCookie.indexOf(";", start);
	if (end == -1) {
		end = docCookie.length;
	}
	return unescape(docCookie.substring(start + prefix.length, end));
}
/***********************************************************
Version 1.0
Date: 03-23-04
Description: Sets a cookie value
************************************************************/
function cookieSet(name, value, daysToKeep, path, domain, secure) {
	/***********************************************************
	Version 1.0
	Date: 03-23-04
	Description: Sets a cookie value
	************************************************************/
	//alert( 'cookieSet called with: ' + name + ', ' + value + ', ' + daysToKeep + ', ' + path + ', ' + domain + ', ' + secure);
	var today = new Date();
	var expires = new Date();
	if( !daysToKeep ) { daysToKeep = 1; }
	expires.setTime(today.getTime() + 3600000*24*daysToKeep);
	if( !path ) { path = '/'; }
	if( !domain ) { domain = ''; }
	if( !secure ) { secure = ''; }
	var tmpCookie = name + '=' + escape(value) + ((expires) ? '; expires=' + expires.toGMTString() : '') + ((path) ? '; path=' + path : '') + ((domain) ? '; domain=' + domain : '') + ((secure) ? '; secure' : '');
	document.cookie = tmpCookie;
/*	alert("Cookie set: " + name + " = " + value);
*/
}

/*********************************************************************
	Version 1.0
	Date: 04-04-06
	Description: Sets zip code cookie
**********************************************************************/
function setZipCookie( zipCode ) {
	if((IsNumeric( zipCode )) && (IsZipCode( zipCode ))) {
		oCookie.setCookieValue("zipcode", zipCode, 65)
	}
}

/***********************************************************
		Version: 1.0
		Date: 04-22-04
		Description: Site Help - Change users stored zipcode in the cookie.
************************************************************/
function ChangeStoredZip() {
	cookieDelete( 'zipcode', zipcode, 365, '/' );
	cookieDelete("dlr_search", zipcode, 180, '/');
	var zipcode = document.forms["frmChangeZip"].txtZip.value;
	if(IsZipCode(zipcode)) {
		setZipCookie( zipcode );
		cookieSet("dlr_search",  zipcode, 180, '/');
		document.forms["frmChangeZip"].submit();
	}
}
/******************************************************************
	Version 1.0
	Date: 03-23-2004
	Description: tests to see if all the charecters are numeric
********************************************************************/
function IsNumeric(sValue) {
	var sValidChars = "0123456789";
	var sChar;
	var blnResult = true;
	
	if (sValue.length == 0) return false;
	for (i = 0; i < sValue.length && blnResult == true; i++)	{
		sChar = sValue.charAt(i);
		if (sValidChars.indexOf(sChar) == -1) {
			blnResult = false;
		}
	}
	return blnResult;
}
/***********************************************************
	Version: 1.0
	Date: 06-05-2005
	Description: Validates a zip code.
************************************************************/
function IsZipCode(sZip) {
	var valid = "0123456789";
	
	if(sZip.length!=5) {
		return false;
	}
	for(var i=0; i < sZip.length; i++) {
		temp = "" + sZip.substring(i, i+1);
		if (valid.indexOf(temp) == "-1") {
			return false;
		}
	}
	return true;
}

/********************************************************
		Version: 1.0
		Date: 04-02-07
		Description: Passes vars to incentives isis feed
		Passes multiple paraments for incentives page
*********************************************************/
function goIncentives( vehicleYear, vehicle ) {
	/* sends user to incentives for the correct vehicle */
	var zipCode = cookieGet( 'zipcode' );
	//alert(vehicleYear);
	if( !zipCode ) { zipCode = ""; }
	document.location = "/shoptools/special_offers.asp?vehicle=" + vehicle + "&modelyear=" + vehicleYear + "&zipcode=" + zipCode;
	//return false;
}

/********************************************************
		Version: 1.0
		Date: 07-27-05
		Description: Pops window in the center of clients screen.
		Passes multiple paraments for custom page
*********************************************************/
function popWindow(winURL, winName, winWidth, winHeight, winScroll, resizeable, toolbar, directories, status, menubar) { 
	if( menubar == '' ) { menubar = '0' }
	if( status == '' ) { status = '0' }
	if( directories == '' ) { directories = '0' }
	if( toolbar == '' ) { toolbar = '0' }
	if( resizeable == '' ) { resizeable = 'no' }
	if(winScroll == '') { winScroll = 'no' }
	if(winWidth == '') { winWidth = 800; }
	if(winHeight == '') { winHeight = 600; }
	if(winName == '') { winName == 'NewWindow'; }
	var winLeft = (screen.width - winWidth) / 2;
	var winTop = (screen.height - winHeight) / 2;
	var winProps = 'height='+winHeight+',width='+ winWidth+',top='+winTop+',left='+winLeft+',scrollbars='+winScroll+',resizeable='+resizeable+',toolbar='+toolbar+',directories='+directories+',status='+status+',menubar='+menubar;
	var win = window.open(winURL, winName, winProps);
}

/********************************************************
	Generic layer visibility function
	layerName -- identifies the div layer being affected
********************************************************/

// show layer
function divShow( divName ){
	document.getElementById( divName ).style.display='block';
	if (document.getElementById("dlr_select")) {
		document.getElementById("dlr_select").style.visibility = 'hidden';
	}
}

// hide layer
function divHide( divName ){
	document.getElementById( divName ).style.display='none';
	if (document.getElementById("dlr_select")) {
		document.getElementById("dlr_select").style.visibility = 'visible';
	}
}

// show layer visible
function divVisible( divName ){
	document.getElementById( divName ).style.visibility='visible';
}

// hide layer hidden
function divHidden( divName ){
	document.getElementById( divName ).style.visibility='hidden';
}

function hideBBC( thisDiv ){
	document.getElementById( "bbc_milan" ).style.display='none';
	document.getElementById( "bbc_mariner" ).style.display='none';
	document.getElementById( "bbc_montego" ).style.display='none';
	document.getElementById( "bbc_mountaineer" ).style.display='none';
	document.getElementById( "bbc_monterey" ).style.display='none';
	document.getElementById( "bbc_grandmarquis" ).style.display='none';
	document.getElementById( "cnt_noborder" ).style.display='block';
}

function showBBC( thisDiv ){
	document.getElementById( "cnt_noborder" ).style.display='none';
	document.getElementById( thisDiv ).style.display='block';
}

function expandFeature( divName, divState, vehName ){
	var oCopy = document.getElementById( divName + "_copy" );
	var oIntro = document.getElementById( divName + "_intro" );
	var oImage = document.getElementById( "img_" + divName );
	var oButton = document.getElementById( "btn_" + divName );
	var oPlay = document.getElementById( "play_" + divName );
	
	oButton.src = (/btn_expand_off.gif/.test(oButton.src)) ? oButton.src.replace('btn_expand_off.gif', 'btn_collapse_2_off.gif') : oButton.src.replace('btn_collapse_2_off.gif', 'btn_expand_off.gif');
	//oPlay.src = (/play_btn_off.jpg/.test(oPlay.src)) ? oPlay.src.replace('play_btn_off.jpg', 'play_btn_over.jpg') : oPlay.src.replace('play_btn_over.jpg', 'play_btn_off.jpg');
	
	setTimeout(function () {
											 
	if (oCopy.style.display == "none") {
		oCopy.style.display = "block";
		oIntro.style.display = "none";
		if( (divState) && (flashEnabled)){
			oImage.style.display = "none";
			oImage.src = (/pop_/.test(oImage.src)) ? oImage.src.replace('pop_', 'col_') : oImage.src.replace('col_', 'pop_');
			document.getElementById(divState).style.display = "block";
			var fo = new SWFObject("/swf/flvplayer.swf?fileURI=/" + vehName + "/img/" + divState + ".flv&metricsFunction=mVideoActivity&autoStart=true", "myfeatmovie", 361, 210, 8, "#ffffff");
			fo.addParam("quality", "best");
			fo.addParam("allowScriptAccess", "sameDomain");
			fo.addParam("salign", "t");
			fo.addParam("FlashVars", "");
			fo.addParam("autoStart", "true");
			fo.addVariable("currSwf", "/swf/flvplayer.swf");
			fo.write(divState);
			oPlay.style.display = "none";				
		} else {
			oImage.src = (/pop_/.test(oImage.src)) ? oImage.src.replace('pop_', 'col_') : oImage.src.replace('col_', 'pop_');
			oImage.style.display = "block";
		}
	} else {
		oCopy.style.display = "none";
		oIntro.style.display = "block";
		oImage.src = (/pop_/.test(oImage.src)) ? oImage.src.replace('pop_', 'col_') : oImage.src.replace('col_', 'pop_');
		oImage.style.display = "block";
		if( divState ){
			document.getElementById(divState).innerHTML = "";
			document.getElementById(divState).style.display = "none";
			oPlay.style.display = "block";
		}
	}	
	
	}, 50);	
}



function expandImgSwap( thisSrc, thisImg ){
	document[ thisSrc ].src = thisImg;
}


/********************************************************
	Draw Flash object function
	thisFlashFeature -- identifies the flash file
	wFlash, hFlash, vFlash, bgcolorFlash -- width, height, version, background color
	"flash_asset" -- name of div id surrounding the flash function on the page
********************************************************/
function drawFlashAsset( thisFlashFeature, wFlash, hFlash, vFlash, bgcolorFlash, swfVars, divName ){
	var fo = new SWFObject(thisFlashFeature, "mymovie", wFlash, hFlash, vFlash, bgcolorFlash);
	fo.addParam("quality", "best");
	fo.addParam("allowScriptAccess", "sameDomain");
	fo.addParam("salign", "t");
	fo.addParam("FlashVars", swfVars);
	fo.addVariable("currSwf", thisFlashFeature);
	fo.write(divName);
}

function drawFlashWMode( thisFlashFeature, wFlash, hFlash, vFlash, bgcolorFlash, swfVars, divName ){
	var fo = new SWFObject(thisFlashFeature, "mymovie", wFlash, hFlash, vFlash, bgcolorFlash);
	fo.addParam("quality", "best");
	fo.addParam("allowScriptAccess", "sameDomain");
	fo.addParam("wmode", "transparent");
	fo.addParam("salign", "t");
	fo.addParam("FlashVars", swfVars);
	fo.addVariable("currSwf", thisFlashFeature);
	fo.write(divName);
}

function moduleDeepLink(vehicleID, sceneID, sectionID ){
		cookieSet("sceneLink",sceneID,'1','','','');
		cookieSet("sectionLink",sectionID,'1','','','');
		document.location.href="landing.asp?vehicleID=" + vehicleID + "&sceneID=" + sceneID + "&sectionID=" + sectionID;
}

function topNavRefresh( sectionID ){
	cookieSet("sectionLink",sectionID,'1','','','');
	window.location.href = "landing.asp?section="+sectionID;
}

function sceneRefresh( sceneID ){
	cookieSet("sceneLink",sceneID,'1','','','');
	window.location.href = "landing.asp?scene="+sceneID;
}

function flashMetricsCall( thisCall ){
	
}

/********************************************************
	SWF Animation, Version 1.0
	10/26/05
	functions below for displaying animations in the specs charts
********************************************************/

function findPosition( oLink ) {
	if( oLink.offsetParent ) {
		for( var posX = 0, posY = 0; oLink.offsetParent; oLink = oLink.offsetParent ) {
			posX += oLink.offsetLeft;
			posY += oLink.offsetTop;
		}
		document.getElementById("feature_flash").style.visibility = "visible";
		document.getElementById("feature_flash").style.top = posY-90 + "px";
		return [ posX, posY ];
		} else {
		return [ oLink.x, oLink.y ];
	}
}

function findPositionColors( oLink, thisDiv ) {
	if (thisDiv == "ext_indicator"){
		posLeft = document.getElementById(oLink).offsetLeft;
		posTop = ((document.getElementById(oLink).offsetTop)-8);
		document.getElementById(thisDiv).style.visibility = "visible";
		document.getElementById("int_indicator").style.visibility = "hidden";
	} else if (thisDiv == "int_indicator") {
		posLeft = document.getElementById(oLink).offsetLeft;
		posTop = ((document.getElementById(oLink).offsetTop)-8);
		document.getElementById(thisDiv).style.visibility = "visible";
		document.getElementById("ext_indicator").style.visibility = "hidden";
	}
	document.getElementById(thisDiv).style.left = posLeft + "px";
	document.getElementById(thisDiv).style.top = posTop + "px";
}

function swapTitle(thisTitle,thisSwapDiv){
	if ( thisSwapDiv == "ext_colortitle" ){
		document.getElementById(thisSwapDiv).innerHTML = thisTitle;
		document.getElementById("int_colortitle").innerHTML = "";
	} else {
		document.getElementById(thisSwapDiv).innerHTML = thisTitle;
		document.getElementById("ext_colortitle").innerHTML = "";
	}
}

function swapColors( oLink, thisDiv ) {
	posLeft = document.getElementById(oLink).offsetLeft;
	posTop = document.getElementById(oLink).offsetTop;
	document.getElementById(thisDiv).style.visibility = "visible";
	document.getElementById(thisDiv).style.left = posLeft + "px";
	document.getElementById(thisDiv).style.top = posTop + "px";
}

function swapColorsOut( thisDiv ) {
		document.getElementById(thisDiv).style.visibility = "hidden";
}

function removeFlash() {
	document.getElementById("feature_flash").innerHTML = "";
	document.getElementById("feature_flash").style.visibility = "hidden";
}

/********************************************************
	Navigation Tabs Vehicle Home, Version 1.0
	03/29/07
	functions for overlaying tab position
********************************************************/

/********************************
small and handy function for rollovers
*********************************/
function roll(ele) {
	var img = ele.getElementsByTagName("img")[0];
	var src = img.src.toLowerCase();
	img.src = (/_on/.test(src)) ? src.replace('_on', '_off') : src.replace('_off', '_on');	
}

function rollMeImage(ele) {
	var src = ele.src.toLowerCase();
	ele.src = (/_on/.test(src)) ? src.replace('_on', '_off') : src.replace('_off', '_on');	
}

/*********************************
photo gallery
*********************************/
var oThumb = null;
function photogalleryThumbTurn(ele) {
	if (oThumb)
		oThumb.className = "gallery_thumb_off";
	
	ele.className = "gallery_thumb_on";	
	oThumb = ele;
}
function rollMeClass(ele) {
	if (ele!=oThumb)
		ele.className = (/_on/.test(ele.className)) ? ele.className.replace('_on', '_off') : ele.className.replace('_off', '_on');	
} 

/*********************************
sync news function
*********************************/
news_div_id_Selected = "";

function flipNewsArticle(id) {

	if ((news_div_id_Selected != "") && (news_div_id_Selected != id)) {
	
		document.getElementById(news_div_id_Selected).style.display = "none";
	
	} 

	var divId = document.getElementById(id);
	
	if (divId.style.display == 'block') {
	
		divId.style.display = "none";
	
	} else if (divId.style.display == 'none') {
	
		news_div_id_Selected = id;
	
		divId.style.display = "block";
	}
}

function getPos(oObj, bUseOffset){
	if(typeof(oObj) == "string") oObj = document.getElementById(oObj)
	var rect = {l:0,t:0,r:0,b:0}
	var b = document.getElementsByTagName("body")[0]
	var sl = b.scrollLeft
	var st = b.scrollTop
	if(document.getBoxObjectFor){
		var r = document.getBoxObjectFor(oObj)
		rect.l = r.x
		rect.t = r.y
		rect.r = r.width+r.x
		rect.b = r.y+r.height
	} else{
		if(oObj.getBoundingClientRect){
			var r = oObj.getBoundingClientRect()
			rect.l = r.left-2+sl
			rect.t = r.top-2+st
			rect.r = r.right-2+sl
			rect.b = r.bottom-2+st
		} else {
			var l = oObj.offsetLeft
			var t = oObj.offsetTop
			rect.l = l //+sl
			rect.t = t //+st
			rect.r = l+oObj.offsetWidth+sl
			rect.b = t+oObj.offsetHeight+st
			var p = oObj.parentNode
			if(bUseOffset) p = oObj.parentNode
			while(p){
				l = p.offsetLeft
				t = p.offsetTop
				rect.l += l
				rect.t += t
				rect.r += l
				rect.b += t
				//p = p.offetParent
				p = p.parentNode
				if(bUseOffset) p = p.offetParent
			}
		}
	}
	return rect
}

//Various pages call this to open a new window to the Sirius minisite.
function openSirius() {
	window.open('http://www.fordvehicles.com/SIRIUS-Mercury','windowName','status,width=540,height=650,scrollbars');
}
