function activateCacheImgIE6(){
	try {
	  javascript:void(document.execCommand("BackgroundImageCache",false,true));
	} catch(e) {}
}

activateCacheImgIE6();

function OnEnterItemList(anchor) {
	if (anchor.childNodes.length > 1){
		anchor.childNodes[2].style.display = "block";
		anchor.childNodes[1].style.display = "none";
	}
}

function OnExitItemList(anchor) {
	if (anchor.childNodes.length > 1){
		anchor.childNodes[1].style.display = "block";
		anchor.childNodes[2].style.display = "none";
	}
}

//http://www.biasecurities.com/blogs/jim/archive/2005/04/28/1794.aspx
function AttachEvent(elementObj, eventName, eventHandlerFunctionName)
{
  if (elementObj.addEventListener)
  { // Non-IE browsers
    elementObj.addEventListener(eventName, eventHandlerFunctionName, false);
  }
  else if (elementObj.attachEvent)
  { // IE 6+
    elementObj.attachEvent('on' + eventName, eventHandlerFunctionName);
  }
  else
  { // Older browsers
    var currentEventHandler = elementObj['on' + eventName];
    if (currentEventHandler == null)
    {
      elementObj['on' + eventName] = eventHandlerFunctionName;
    }
    else
    {
      elementObj['on' + eventName] = function(e) { currentEventHandler(e); eventHandlerFunctionName(e); }
    }
  }
}

function getObj(eventArgs){
 	var obj;

	if (eventArgs.target) {
		obj = eventArgs.target;
	} else if (eventArgs.srcElement) {
		obj = eventArgs.srcElement;
	}
	/* For most browsers, obj would now be the object we're after; Safari however
		returns a text node so we need to check the node type to make sure */
	if (obj.nodeType == 3) {
	    obj = obj.parentNode;
	}

 	return obj;
}

function getObjID(eventArgs){
  var obj = getObj(eventArgs)
  return obj.id;
}

function replaceAll( str, from, to ) {
    var idx = str.indexOf( from );

    while ( idx > -1 ) {
        str = str.replace( from, to );
        idx = str.indexOf( from );
    }
    return str;
}

function getElemRefs(id) {
    var el = (document.getElementById)? document.getElementById(id): (document.all)? document.all[id]: (document.layers)? getLyrRef(id,document): null;
    if (el) el.css = (el.style)? el.style: el;
    return el;
}

// --------------------------------------------------------------
// generic name/value pair function
// return a hash (of sorts) of name value pairs from the querystring
// uasge: var qsParams = getQsParams();
// then: qsParams['url'] whould equal whatever url=XXX in the querystring

function getQsParams() {
	var qs = location.search;
	qs = qs.substring(1);
	// create an 'array' called newArray with the name value pairs from the querystring
	var qsArray = new Array;
	qsArray = qs.split('&'); //creating an array in which the values are separated by ampersands in the code//
	var keyValueArray = new Array; //this one loads the names and values into a hash (of sorts)//
	for(i=0; i<qsArray.length; i++) {
		var nameValue = qsArray[i].split('='); //splitting what we find between each ampersand into key value pairs //
		keyValueArray[nameValue[0]] = unescape(nameValue[1]); //we are then turning all the escaped characters back into the 'real thing' ie. %3F turns into a '?' //
	}
	return keyValueArray;
}

function createCookie(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	} else {
		var expires = "";
	}
	document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

function eraseCookie(name) {
	createCookie(name,"",-1);
}

/* pop-up function. only needs a url and winName parameter -- attributes are defaulted.
it is recommended that call to function at least include width and height attributes.
any attribute passed in will take precedence over default. -- dtw 8/5/05 */
function popUpWindow(url, winName, attributes) {
	if (navigator.appName=="Microsoft Internet Explorer" && winName=="GM_Certified_Survey"){
		attributes += ",width=785"; 
	}

	var browser = navigator.appVersion;
	if (attributes.indexOf("directories") == -1) { attributes += ",directories=0"; }
	if (attributes.indexOf("location") == -1) {	attributes += ",location=0"; }
	if (attributes.indexOf("menubar") == -1) { attributes += ",menubar=0"; }
	if (attributes.indexOf("resizable") == -1) { attributes += ",resizable=0"; }
	if (attributes.indexOf("scrollbars") == -1) { attributes += ",scrollbars=1"; }
	if (attributes.indexOf("status") == -1) { attributes += ",status=0"; }
	if (attributes.indexOf("toolbar") == -1) { attributes += ",toolbar=0"; }
	if (attributes.indexOf("top") == -1) { attributes += ",top=80";	}
	if (attributes.indexOf("left") == -1) { attributes += ",left=50"; }
	if((browser.indexOf("Macintosh")>-1)&&(winName=="add_details")){
       if (attributes.indexOf("height") == -1) { attributes += ",height=590"; }				
	}
	else{
		if (attributes.indexOf("height") == -1) { attributes += ",height=720"; }				
	}
	var newWindow = window.open(url,winName,attributes);
	if (window.focus && newWindow) { newWindow.focus() }
}

// We have a lot of popup windows that show up all over the site.
// We define them commonly here, so that should a request come in to change a param of the window (say the size, or position),
// we can update it in one place as opposed to accross the site.

function getParameter (queryString, parameterName ) {
	// Add "=" to the parameter name (i.e. parameterName=value)
	var parameterName = parameterName + "=";
	if (queryString.length > 0 ) {
		// Find the beginning of the string
		begin = queryString.indexOf ( parameterName );
		// If the parameter name is not found, skip it, otherwise return the value
		if ( begin != -1 ) {
			// Add the length (integer) to the beginning
			begin += parameterName.length;
			// Multiple parameters are separated by the "&" sign
			end = queryString.indexOf ( "&" , begin );
			if ( end == -1 ) {
				end = queryString.length
			}
			// Return the string
			return unescape ( queryString.substring ( begin, end ) );
		}
		// Return "null" if no parameter has been found
		return "null";
	}
}


function addParameter (queryString, parameterName, parameterValue) {
	if(queryString.indexOf ( "?" )==-1){
		queryString+="?";
	}
	else{
		queryString+="&";
	}
	queryString+=parameterName+"="+parameterValue;
	return queryString;
}


function breakWord(word) {
	if (word.indexOf("/") > -1) word = word.split("/").join("/<wbr/>");
	if (word.indexOf("-") > -1) word = word.split("-").join("-<wbr/>");
	if (word.indexOf("_") > -1) word = word.split("_").join("_<wbr/>");
	if (word.indexOf(",") > -1) word = word.split(",").join(",<wbr/>");
	word = word.split(" ").join(" <wbr/>");
	return word;
}

function breakName(word) {
	if(word.indexOf("/")>-1){
		word = word.split("/").join("/<wbr/>");
	}
	if(word.indexOf(",")>-1){
		word = word.split(",").join(",<wbr/>");
	}
	return word;
}

function reduceWord(word) {
	if (word.indexOf("CONVERTIBLE")) 
			word = word.split("CONVERTIBLE").join("CONV");
	else if (word.indexOf("HATCHBACK")) 
			word = word.split("HATCHBACK").join("HATCHB");
	return word;
}

function pageTrack(pagename, oArg) {
	s_pageName = pagename;
	if (oArg) {
		if (oArg.s_prop1) { s_prop1 = oArg.s_prop1.toUpperCase(); }    
		if (oArg.s_prop2) { s_prop2 = oArg.s_prop2.toUpperCase(); }    
		if (oArg.s_prop3) { s_prop3 = oArg.s_prop3.toUpperCase(); }
		if (oArg.s_prop9) { s_prop9 = oArg.s_prop9.toUpperCase(); }    
		if (oArg.s_prop10) { s_prop10 = oArg.s_prop10.toUpperCase(); }  		
		if (oArg.s_prop11) { s_prop11 = oArg.s_prop11.toUpperCase(); }  		
		if (oArg.s_prop12) { s_prop12 = oArg.s_prop12.toUpperCase(); }  		
		if (oArg.s_prop13) { s_prop13 = oArg.s_prop13.toUpperCase(); }  		
		if (oArg.s_prop14) { s_prop14 = oArg.s_prop14.toUpperCase(); }  		
		if (oArg.s_prop15) { s_prop15 = oArg.s_prop15.toUpperCase(); }  		
   		if (oArg.s_prop24) { s_prop24 = oArg.s_prop24.toUpperCase(); } 
   		if (oArg.s_prop25) { s_prop25 = oArg.s_prop25.toUpperCase(); } 
	}
	s_lnk = false;
	s_wds(s_account); s_ca(s_account); 
}
function clickTrack(oArg,noPageName) { 
   if (typeof(oArg.s_pageName) == "string") { s_pageName = oArg.s_pageName; }
   if (typeof(oArg.s_lnk) == "boolean") {s_lnk = oArg.s_lnk;} else {s_lnk = true;}
   if (typeof(oArg.s_linkName) == "string") { s_linkName = oArg.s_linkName; }
   if (typeof(oArg.s_linkType) == "string") { s_linkType = oArg.s_linkType; } else { s_linkType="o"; }   if (typeof(oArg.s_prop2) == "string") { s_prop2 = oArg.s_prop2; }                                                           
   if (typeof(oArg.s_prop1) == "string") { s_prop1 = oArg.s_prop1; }
   if (typeof(oArg.s_prop2) == "string") { s_prop2 = oArg.s_prop2; }
   if (typeof(oArg.s_prop3) == "string") { s_prop3 = oArg.s_prop3; }
   if (typeof(oArg.s_prop4) == "string") { s_prop4 = oArg.s_prop4; }
   if (typeof(oArg.s_prop5) == "string") { s_prop5 = oArg.s_prop5.toUpperCase(); }
   if (typeof(oArg.s_prop9) == "string") { s_prop9 = oArg.s_prop9; }
   if (typeof(oArg.s_prop10) == "string") { s_prop10 = oArg.s_prop10; }
   if (typeof(oArg.s_prop11) == "string") { s_prop11 = oArg.s_prop11; }
   if (typeof(oArg.s_prop12) == "string") { s_prop12 = oArg.s_prop12; }
   if (typeof(oArg.s_prop13) == "string") { s_prop13 = oArg.s_prop13; }
   if (typeof(oArg.s_prop14) == "string") { s_prop14 = oArg.s_prop14; }
   if (typeof(oArg.s_prop15) == "string") { s_prop15 = oArg.s_prop15; }
   if (typeof(oArg.s_prop20) == "string") { s_prop20 = oArg.s_prop20; }
   if (typeof(oArg.s_prop22) == "string") { s_prop22 = oArg.s_prop22; }
   if (typeof(oArg.s_prop24) == "string") { s_prop24 = oArg.s_prop24; }
   if (typeof(oArg.s_prop25) == "string") { s_prop25 = oArg.s_prop25; }      
   if (typeof(oArg.s_prop28) == "string") { s_prop28 = oArg.s_prop28; }
   if (!s_lnk) {
		s_linkType="";
	}
   if (s_pageName=="null") {
	   s_pageName="";
	}   
	if (s_prop1=="null") {
	   s_prop1="";
	}   

	if (noPageName=="true" || noPageName==null){
		s_pageName = "";
	 }
	 else{
		s_pageName = s_linkName;
		s_linkName="";
	 }

   
   s_gs(s_account);
   s_prop14="";
   s_prop28="";
}

function clickTrackPN(oArg) { 
   if (typeof(oArg.s_pageName) == "string") { s_pageName = oArg.s_pageName; }
   if (typeof(oArg.s_prop5) == "string") { s_prop5 = oArg.s_prop5.toUpperCase(); }
   s_prop1 = "";
   s_prop24 = "";
   s_prop25 = "";
      
   s_gs(s_account);
 }

function quickSearchTracking(method){//Search or Advance Search
 if(method=="search"){
	clickTrack({s_linkName:'GM CERTIFIED | HOMEPAGE | QUICK SEARCH | SEARCH', s_prop5:'HP | QUICK SEARCH | SEARCH', s_prop1:'', s_prop24:'', s_prop25:''});
 }
 else if(method=="advancedSearch"){
	clickTrack({s_linkName:'GM CERTIFIED | HOMEPAGE | QUICK SEARCH | ADVANCED SEARCH', s_prop5:'HP | QUICK SEARCH | ADVANCED SEARCH', s_prop1:'', s_prop24:'', s_prop25:''});
 }
}

function openPrivacyPopUp(){
	var w = 480, h = 340;
	var popW = 500, popH = 500;

	if (document.all || document.layers) {
		w = screen.availWidth;
	    h = screen.availHeight;
	}
	var leftPos = (w-popW)/2, topPos = (h-popH)/2;
//	window.open('/privacy/index_popup' + (lang == "s" ? '_s' : '') + '.html','','resize=no, width=' + popW + ', height=' + popH + ', scrollbars=yes, top=' + topPos + ',left=' + leftPos);	
	window.open('http://www.gm.com/privacy/index_popup.html','','resize=no, width=' + popW + ', height=' + popH + ', scrollbars=yes, top=' + topPos + ',left=' + leftPos);	
}

function superPopup(pOptions){
	
	var url, type, directories, location, menubar, resizable, scrollbars, status, toolbar, top, left, width, height, winName, clickTrackValue;
	
	// URL is the only required field.
	if (pOptions.url != null) {	url = pOptions.url;} else { alert('Error: Link URL Missing')};
	
	if (pOptions.type != null) { type = pOptions.type;};

	// type will set some basic options to make the function cleaner -- otherwise all values can be set
	if(type == "_blank"){	//used to generate a window the same size as the previous
		var windowWidth = f_clientWidth();
		var windowHeight = f_clientWidth();	
			
		//used to generate original "window names"
		var randomNumber = Math.floor(Math.random()*1000);
		winName="blank" + randomNumber; width=windowWidth; height=windowHeight; scrollbars="yes"; menubar="yes"; toolbar="yes"; directories="yes"; location="yes"; top="0"; left="0";
	} else if(type == "mapwin"){
		winName="mapwin"; width = "586"; height= "550"; scrollbars = "yes"; resizable = "yes"; toolbar="no"; directories="no"; location="no"; status="no"; menubar="no";
	} else if(type == "KBB"){
		winName="kbbPopup"; width = "780"; height= "500"; scrollbars = "yes"; resizable = "yes"; toolbar="no"; directories="no"; location="no"; status="no"; menubar="no";
    } else if(type == "regionDetails"){
		winName="regionDetails"; width = "750"; height= "650"; scrollbars = "yes"; resizable = "yes"; toolbar="no"; directories="no"; location="no"; status="no"; menubar="no";
    } else if(type == "otherPage"){
		winName="outsidePage"; width = "780"; height= "780"; scrollbars = "yes"; resizable = "yes"; toolbar="yes"; directories="no"; location="yes"; status="yes"; menubar="yes";
    } else if(type == "reqBrochure"){
		winName="reqBrochure"; width = "800"; height= "600"; scrollbars = "no"; resizable = "yes"; toolbar="no"; directories="no"; location="no"; status="no"; menubar="no";
    } else if(type == "bonusCash"){
		winName="bonusCash"; width = "720"; height= "610"; scrollbars = "no"; resizable = "no"; toolbar="no"; directories="no"; location="no"; status="no"; menubar="no";
    } else if(type == "windowSticker"){
		winName="windowSticker"; width = "720"; height= "500"; scrollbars = "yes"; resizable = "yes"; toolbar="no"; directories="no"; location="no"; status="no"; menubar="no";
    } else if(type == "map"){
		winName="map"; width = "590"; height= "630"; scrollbars = "yes"; resizable = "no"; toolbar="no"; directories="no"; location="no"; status="no"; menubar="no";
    }
	 
					
	// test to see if we have set a window option on the function or in a profile above, if not then set the value to be a default.
	if (pOptions.directories != null) { directories = pOptions.directories;} else if (directories == null) { directories = "no" ;}
	if (pOptions.location != null) { location = pOptions.location;} else if (location == null) { location = "no" ;}
	if (pOptions.menubar != null) { menubar = pOptions.menubar;} else if (menubar == null) { menubar = "no" ;}
	if (pOptions.resizable != null) { resizable = pOptions.resizable;} else if (resizable == null) { resizable = "no" ;}
	if (pOptions.scrollbars != null) { scrollbars = pOptions.scrollbars;} else if (scrollbars == null) { scrollbars = "yes" ;}
	if (pOptions.status != null) { status = pOptions.status; } else if (status == null) { status = "yes" ;}
	if (pOptions.toolbar != null) { toolbar = pOptions.toolbar; } else if (toolbar == null) { toolbar = "no" ;}
	if (pOptions.top != null) { top = pOptions.top} else if (top == null) { top = "50";}
	if (pOptions.left != null) { left = pOptions.left;} else if (left == null) { left = "50" ;}
	if (pOptions.width != null) { width = pOptions.width;} else if (width == null) { width = "250" ;}
	if (pOptions.height != null) { height = pOptions.height;} else if (height == null) { height = "250" ;}
	if (pOptions.winName != null) { winName = pOptions.winName;} else if (winName == null) { winName = "popUp" ;}
	if (pOptions.clickTrack != null) { clickTrackValue = pOptions.clickTrack;}
	
	// build our complete window options statement
	windowOptions = "width=" + width + ", height=" + height + ", directories=" + directories + ", location=" + location + ", menubar=" + menubar + ", resizable=" + resizable + ", scrollbars=" + scrollbars + ", toolbar=" + toolbar + ", status=" + status + ", toolbar=" + toolbar + ", top=" + top + ", left=" + left;

	var newWindow = window.open(url,winName,windowOptions);
	//alert(windowOptions);
	if (newWindow == null){
		//alert('A popup containing important information was blocked by your browser. Please enable popups for this site in order to view this information.');
		var errorBox = document.getElementById("blockedPopup");
		errorBox.style.display = "block";

		
	} else { 
		if (window.focus && newWindow) { newWindow.focus() }
	}
}

function setWidths(tableID) {
		var table = document.getElementById(tableID);
		var cols = new Array();
		var thead;
		var tbody;
		var colCount=1;
		var firstTrNotReached = true;
		var headerNotReached = true;
		for (var q = 0; q < table.childNodes.length && headerNotReached; q++) {
			if (table.childNodes[q].nodeName == "THEAD") {
				headerNotReached = false;
				thead = table.childNodes[q];
				for (var w = 0; w < thead.childNodes.length; w++) {
					if (thead.childNodes[w].nodeName == "TR") {
						var colCount = 0;
						var tr = thead.childNodes[w];
						for (var e = 0; e < tr.childNodes.length; e++) {
							if (tr.childNodes[e].nodeName == "TH") {
								cols[cols.length] = tr.childNodes[e];

							}
						}
					}
				}
			} 
		}
		
		for (var q = 0; q < table.childNodes.length && firstTrNotReached; q++) {
			if (table.childNodes[q].nodeName == "TBODY") {
					tbody = table.childNodes[q];
					for (var w = 0; w < tbody.childNodes.length && firstTrNotReached; w++) {
						if (tbody.childNodes[w].nodeName == "TR") {
							var tr = tbody.childNodes[w];
							firstTrNotReached = false;
							var colCount = 0;
							for (var e = 0; e < tr.childNodes.length; e++) {
								if (tr.childNodes[e].nodeName == "TD") {
									var td = tr.childNodes[e];
									cols[colCount].style.width =  td.offsetWidth;
									colCount++;
								}
							}
						}
					}
				}
		}
	}


/* ------------------------------------------------------------------- */
/* A MORE PRECISE WAY TO DETECT THE BROWSER IN USE */
/* ------------------------------------------------------------------- */
var BrowserDetect = {
	init: function () {
		this.browser = this.searchString(this.dataBrowser) || "An unknown browser";
		this.version = this.searchVersion(navigator.userAgent)
			|| this.searchVersion(navigator.appVersion)
			|| "an unknown version";
		this.OS = this.searchString(this.dataOS) || "an unknown OS";
	},
	searchString: function (data) {
		for (var i=0;i<data.length;i++)	{
			var dataString = data[i].string;
			var dataProp = data[i].prop;
			this.versionSearchString = data[i].versionSearch || data[i].identity;
			if (dataString) {
				if (dataString.indexOf(data[i].subString) != -1)
					return data[i].identity;
			}
			else if (dataProp)
				return data[i].identity;
		}
	},
	searchVersion: function (dataString) {
		var index = dataString.indexOf(this.versionSearchString);
		if (index == -1) return;
		return parseFloat(dataString.substring(index+this.versionSearchString.length+1));
	},
	dataBrowser: [
		{ 	string: navigator.userAgent,
			subString: "OmniWeb",
			versionSearch: "OmniWeb/",
			identity: "OmniWeb"
		},
		{
			string: navigator.vendor,
			subString: "Apple",
			identity: "Safari"
		},
		{
			prop: window.opera,
			identity: "Opera"
		},
		{
			string: navigator.vendor,
			subString: "iCab",
			identity: "iCab"
		},
		{
			string: navigator.vendor,
			subString: "KDE",
			identity: "Konqueror"
		},
		{
			string: navigator.userAgent,
			subString: "Firefox",
			identity: "Firefox"
		},
		{
			string: navigator.vendor,
			subString: "Camino",
			identity: "Camino"
		},
		{		// for newer Netscapes (6+)
			string: navigator.userAgent,
			subString: "Netscape",
			identity: "Netscape"
		},
		{
			string: navigator.userAgent,
			subString: "MSIE",
			identity: "Explorer",
			versionSearch: "MSIE"
		},
		{
			string: navigator.userAgent,
			subString: "Gecko",
			identity: "Mozilla",
			versionSearch: "rv"
		},
		{ 		// for older Netscapes (4-)
			string: navigator.userAgent,
			subString: "Mozilla",
			identity: "Netscape",
			versionSearch: "Mozilla"
		}
	],
	dataOS : [
		{
			string: navigator.platform,
			subString: "Win",
			identity: "Windows"
		},
		{
			string: navigator.platform,
			subString: "Mac",
			identity: "Mac"
		},
		{
			string: navigator.platform,
			subString: "Linux",
			identity: "Linux"
		}
	]
};
BrowserDetect.init();

//------Spanish----//
function openWindow(url, type){
	if (type=="new"){
		var newW;
		newW =	window.opener.open(url, "blank");
		newW.focus();
	}else{
		window.opener.location.href= url;
		window.opener.focus();
	}
}

/*function goSpanish() {
	loc = window.location.href;
	if (loc.find("/certified/")){
	loc = loc.replace("/certified/","/es/");
	}else{
	loc = loc + "/es/";	
		}
	window.open(loc, "_parent");

}*/

function goSpanish() {
	loc = window.location.href;

	if(loc.indexOf("/offers-tools/index.jsp?deep=onstar-trial")!==-1){
 	 loc = loc.replace("/offers-tools/index.jsp?deep=onstar-trial","/es/buyingtools/index.jsp?deep=osoffer");
	 window.open(loc, "_parent");
	 return;
	}
	if(loc.indexOf("/offers-tools/index.jsp?deep=xm-radio-trial")!==-1){
 	 loc = loc.replace("/offers-tools/index.jsp?deep=xm-radio-trial","/es/buyingtools/index.jsp?deep=xmoffer");
	 window.open(loc, "_parent");
	 return;
	}
	if(loc.indexOf("/offers-tools/index.jsp?deep=used-car-appraisal")!==-1){
 	 loc = loc.replace("/offers-tools/index.jsp?deep=used-car-appraisal","/es/buyingtools/index.jsp?deep=intelli");
	 window.open(loc, "_parent");
	 return;
	}

	if(loc.indexOf("/offers-tools")!==-1){
 	 loc = loc.replace("/offers-tools/","/es/buyingtools/");
	 window.open(loc, "_parent");
	 return;
	}

	if(loc.indexOf("/certified")!==-1){
 	 loc = loc.replace("/certified/","/es/");
	 window.open(loc, "_parent");
	 return;
	}

	if(loc.indexOf("/certified")==-1 && loc.indexOf("index")==-1 && loc.indexOf("useFlash")==-1) {
	 window.open(loc+"es/", "_parent");
	 return;
	}
	 
	if(loc.indexOf("index")!=-1){
	 loc = loc.replace("/index.jsp","/es/");
	 window.open(loc, "_parent");
	 return;
	 }
	 
	 if(loc.indexOf("/?")!=-1){
	 loc = loc.replace("/?","/es/?");
	 window.open(loc, "_parent");
	 return;
	 }
}

function goSpanishjhtml(now,redirect) {
	loc = window.location.href;
	loc = loc.replace(now,redirect);
	window.open(loc, "_parent");

}

//Global footer Tracking
function footerTrack(){
if (siteSection == ""){siteSection="HOMEPAGE";}
	clickTrack({s_pageName: "GM CERTIFIED | "+siteSection+" | GLOBAL FOOTER | CONTACT US", s_prop2: "CONTACT US", s_prop24: "ENG", s_lnk:false});
}