/**
 * SWFObject v1.4.4: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2006 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 * **SWFObject is the SWF embed script formerly known as FlashObject. The name was changed for
 *   legal reasons.
 */

// function to swap out the Flash elements on a page with static equivalents
	function replaceFlashLinks(){

		as = document.getElementsByTagName("a");
		divs = document.getElementsByTagName("div");
		// replace View 360 links in Configurator
		for(i=0; i<as.length; i++)
			{
			if (((as[i].getAttribute("onclick")) != -1))
				{
				var x = as[i].getAttribute("onclick");
				y = String(x);
				if(y.indexOf("view360") !=-1)
					{
					as[i].innerHTML = "Get Flash Player to View 360&#176;";
					as[i].setAttribute("onclick","#");
					as[i].setAttribute("href","http://www.adobe.com/go/getflashplayer/");
					as[i].setAttribute("target","_blank");
					}
				}
			}

		// replace FAQ links in Contact Us
	/*	for(i=0; i<divs.length; i++)
			{
			if ((divs[i].className != null) && (divs[i].className.indexOf("tContactFAQ")>-1))
				{
				divs[i].style.cssText='display:none;';
				}
			}*/

	}

 	var alertBool = false;


	function nissan_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=nissan_findObj(n,d.layers[i].document);
	  if(!x && d.getElementById) x=d.getElementById(n); return x;
	}

	function nissan_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=nissan_findObj(n,d.layers[i].document);
	  if(!x && d.getElementById) x=d.getElementById(n); return x;
	}

	function nissan_showHideLayers() { //v6.0
		//alert("nissan_showHideLayers");
	  var i,p,v,obj,args=nissan_showHideLayers.arguments;
	  for (i=0; i<(args.length-2); i+=3) if ((obj=nissan_findObj(args[i]))!=null) { v=args[i+2];
		if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
		obj.visibility=v; }
	}



if(typeof deconcept == "undefined") var deconcept = new Object();
if(typeof deconcept.util == "undefined") deconcept.util = new Object();
if(typeof deconcept.SWFObjectUtil == "undefined") deconcept.SWFObjectUtil = new Object();
deconcept.SWFObject = function(swf, id, w, h, ver, c, useExpressInstall, quality, xiRedirectUrl, redirectUrl, detectKey){
	if (!document.getElementById) { return; }
	this.DETECT_KEY = detectKey ? detectKey : 'detectflash';
	this.skipDetect = deconcept.util.getRequestParameter(this.DETECT_KEY);
	this.params = new Object();
	this.variables = new Object();
	this.attributes = new Array();
	if(swf) { this.setAttribute('swf', swf); }
	if(id) { this.setAttribute('id', id); }
	if(w) { this.setAttribute('width', w); }
	if(h) { this.setAttribute('height', h); }
	if(ver) { this.setAttribute('version', new deconcept.PlayerVersion(ver.toString().split("."))); }
	this.installedVer = deconcept.SWFObjectUtil.getPlayerVersion();
	if(c) { this.addParam('bgcolor', c); }
	var q = quality ? quality : 'high';
	this.addParam('quality', q);
	this.setAttribute('useExpressInstall', useExpressInstall);
	this.setAttribute('doExpressInstall', false);
	var xir = (xiRedirectUrl) ? xiRedirectUrl : window.location;
	this.setAttribute('xiRedirectUrl', xir);
	this.setAttribute('redirectUrl', '');
	if(redirectUrl) { this.setAttribute('redirectUrl', redirectUrl); }
}
deconcept.SWFObject.prototype = {
	setAttribute: function(name, value){
		this.attributes[name] = value;
	},
	getAttribute: function(name){
		return this.attributes[name];
	},
	addParam: function(name, value){
		this.params[name] = value;
	},
	getParams: function(){
		return this.params;
	},
	addVariable: function(name, value){
		this.variables[name] = value;
	},
	getVariable: function(name){
		return this.variables[name];
	},
	getVariables: function(){
		return this.variables;
	},
	getVariablePairs: function(){
		var variablePairs = new Array();
		var key;
		var variables = this.getVariables();
		for(key in variables){
			variablePairs.push(key +"="+ variables[key]);
		}
		return variablePairs;
	},
	getSWFHTML: function() {
		var swfNode = "";
		if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) { // netscape plugin architecture
			if (this.getAttribute("doExpressInstall")) { this.addVariable("MMplayerType", "PlugIn"); }
			swfNode = '<embed type="application/x-shockwave-flash" src="'+ this.getAttribute('swf') +'" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'"';
			swfNode += ' id="'+ this.getAttribute('id') +'" name="'+ this.getAttribute('id') +'" ';
			var params = this.getParams();
			 for(var key in params){ swfNode += [key] +'="'+ params[key] +'" '; }
			var pairs = this.getVariablePairs().join("&");
			 if (pairs.length > 0){ swfNode += 'flashvars="'+ pairs +'"'; }
			swfNode += '/>';
		} else { // PC IE
			if (this.getAttribute("doExpressInstall")) { this.addVariable("MMplayerType", "ActiveX"); }
			swfNode = '<object id="'+ this.getAttribute('id') +'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'">';
			swfNode += '<param name="movie" value="'+ this.getAttribute('swf') +'" />';
			var params = this.getParams();
			for(var key in params) {
			 swfNode += '<param name="'+ key +'" value="'+ params[key] +'" />';
			}
			var pairs = this.getVariablePairs().join("&");
			if(pairs.length > 0) {swfNode += '<param name="flashvars" value="'+ pairs +'" />';}
			swfNode += "</object>";
		}
		return swfNode;
	},
	writeHTMLFooterNav: function(){

		var htmlFooter;
		if(alertBool)alert(" in - writeHTMLFooterNav()");

		/*htmlFooter = "<div id='footer'><table width='100%'>";
		htmlFooter+="<tr><td height='37' align='right' class='footertext'>";
		htmlFooter+="<a href='/apps/contactus' class='footerLinks'>Contact Nissan</a>&nbsp;";
		htmlFooter+="|&nbsp;<a href='javascript:O_LC();void(0)' class='footerLinks'>Site Feedback</a>&nbsp;";
		htmlFooter+="|&nbsp;<a href='/global/copyright.html' class='footerLinks'>Copyright</a>&nbsp;";
		htmlFooter+="|&nbsp;<a href='/global/privacy.html' class='footerLinks'>Privacy Policy</a>&nbsp;";
		htmlFooter+="<td width='20'>&nbsp;</td></tr></table></div>";*/
						htmlFooter = "<div id='footer'><table width='955px'>";
						htmlFooter+="<tr><td height='37' align='left' class='footertext'>";
						htmlFooter+="<img src='/img/sav_redesign/joinMailing_envelope.gif' style='display:inline;'/>&nbsp;&nbsp;<a href='/apps/handraiser/siteWideOptin?tool=footer.sitewide_optin' class='footerLinks' style='font-weight:bold;color:#222222'>JOIN MAILING LIST</a>";
						htmlFooter+="&nbsp;&nbsp;|&nbsp;&nbsp;<a href='/buying' class='footerLinks' style='color:#858585'>BUYING</a>";
						htmlFooter+="&nbsp;&nbsp;|&nbsp;&nbsp;<a href='/about' class='footerLinks' style='color:#858585'>ABOUT NISSAN</a>";
						htmlFooter+="&nbsp;&nbsp;|&nbsp;&nbsp;<a href='/more-nissan-sites' class='footerLinks' style='color:#858585'>MORE NISSAN SITES</a></td>";
						htmlFooter+="<td height='37' align='right' class='footertext'>";
						htmlFooter+="<a href='/' class='footerLinks' style='color:#858585'>Home</a>";
						htmlFooter+="&nbsp;&nbsp;|&nbsp;&nbsp;<a href='/apps/contactus' class='footerLinks' style='color:#858585'>Contact Nissan</a>";
						htmlFooter+="&nbsp;&nbsp;|&nbsp;&nbsp;<a href='javascript:void(0)' onclick='showbox()' class='footerLinks' style='color:#858585'>Site Feedback</a>";
						htmlFooter+="&nbsp;&nbsp;|&nbsp;&nbsp;<a href='/global/privacy.html' class='footerLinks' style='color:#858585'>Privacy & Legal</a>";
						htmlFooter+="&nbsp;&nbsp;|&nbsp;&nbsp;<a href='/global/sitemap.html' class='footerLinks' style='color:#858585'>Site Map</a></td>";
						htmlFooter+="<td width='20'>&nbsp;</td></tr></table></div>";

		return htmlFooter;
	},
	writeHTMLTopNav: function(){

		if(alertBool)alert(" in - writeHTMLTopNav()");

		var htmlTopnav;

		//  Build Your Nissan Car Models

		var nPth = "/non-flash/images/global/nav/";
		var dPth = "/non-flash/images/global/dropdown/";

		var buLnk = "/tools/build/";
		var brLnk = "/tools/brochure/";
		var raLnk = "/tools/raq/";


		htmlTopnav ="<div id='header'>";
        htmlTopnav+="<table width='100%' cellspacing='0' cellpadding='0'>";
		htmlTopnav+="<tr>";
		htmlTopnav+="<td width='163'><a href='"+nonSecurePath+"' onload='setOverSrc(this)'><img src='"+nonSecurePath+nPth+"badge.jpg' alt='Nissan' name='Badge' width='163' height='75' border='0' id='Badge' /></a></td>";

		htmlTopnav+="<td width='166' height='75' align='left' valign='bottom'>";

		htmlTopnav+="<div id='build_your_nissan' onMouseOver='nissan_showHideLayers(\"build_your_nissan\",\"\",\"show\")' onMouseOut='nissan_showHideLayers(\"build_your_nissan\",\"\",\"hide\")'>";

		htmlTopnav+="<table width='100%' cellpadding='0' cellspacing='0'>";
		htmlTopnav+="<tr>";
		htmlTopnav+="<td><a href='"+nonSecurePath+"/tools/build/cube?tool=HTML_Nav.build'><img src='"+dPth+"cube.jpg' onload='setOverSrc(this)' alt='Cube' width='156' height='26' border='0' /></a></td>";
		htmlTopnav+="</tr>";
		
		
		htmlTopnav+="<tr>";
		htmlTopnav+="<td><a href='"+nonSecurePath+"/tools/build/versa?tool=HTML_Nav.build'><img src='"+dPth+"versa.jpg' onload='setOverSrc(this)' alt='Versa' width='156' height='26' border='0' /></a></td>";
		htmlTopnav+="</tr>";


		htmlTopnav+="<tr>";
		htmlTopnav+="<td><a href='"+nonSecurePath+"/tools/build/sentra?tool=HTML_Nav.build'><img src='"+dPth+"sentra.jpg' onload='setOverSrc(this)' alt='Sentra' width='156' height='26' border='0' /></a></td>";
		htmlTopnav+="</tr>";

		htmlTopnav+="<tr>";
		htmlTopnav+="<td><a href='"+nonSecurePath+"/tools/build/sentraSER?tool=HTML_Nav.build'><img src='"+dPth+"sentra_ser.jpg'  onload='setOverSrc(this)' alt='Sentra SE-R' width='156' height='26' border='0' SE-R' /></a></td>";
		htmlTopnav+="</tr>";


		htmlTopnav+="<tr>";
		htmlTopnav+="<td><a href='"+nonSecurePath+"/tools/build/altima?tool=HTML_Nav.build'><img src='"+dPth+"altima.jpg' onload='setOverSrc(this)' alt='Altima' width='156' height='26' border='0' /></a></td>";
		htmlTopnav+="</tr>";

		htmlTopnav+="<tr>";
        htmlTopnav+="<td><a href='"+nonSecurePath+"/tools/build/altimacoupe?tool=HTML_Nav.build'><img src='"+dPth+"alt_coupe.jpg' onload='setOverSrc(this)' alt='AltimaCoupe' width='156' height='26' border='0' /></a></td>";
		htmlTopnav+="</tr>";

		htmlTopnav+="<tr>";
		htmlTopnav+="<td><a href='"+nonSecurePath+"/tools/build/maxima?tool=HTML_Nav.build'><img src='"+dPth+"maxima.jpg' onload='setOverSrc(this)' alt='Maxima' width='156' height='26' border='0' /></a></td>";
		htmlTopnav+="</tr>";

		htmlTopnav+="<tr>";
		htmlTopnav+="<td><a href='"+nonSecurePath+"/tools/build/zcoupe?tool=HTML_Nav.build'><img src='"+dPth+"zcoupe.jpg'  onload='setOverSrc(this)' alt='Z Coupe' width='156' height='26' border='0' /></a></td>";
		htmlTopnav+="</tr>";
		
		htmlTopnav+="<tr>";
		htmlTopnav+="<td><a href='"+nonSecurePath+"/tools/build/zroadster?tool=HTML_Nav.build'><img src='"+dPth+"zroadster.jpg'  onload='setOverSrc(this)' alt='Z Roadster' width='156' height='26' border='0' /></a></td>";
		htmlTopnav+="</tr>";
		

		/*htmlTopnav+="<tr>";
		htmlTopnav+="<td><a href='"+nonSecurePath+"/tools/build/quest?tool=HTML_Nav.build'><img src='"+dPth+"quest.jpg'  onload='setOverSrc(this)' alt='Quest' width='156' height='26' border='0' /></a></td>";
		htmlTopnav+="</tr>";*/

		htmlTopnav+="<tr>";
		htmlTopnav+="<td><a href='"+nonSecurePath+"/tools/build/rogue?tool=HTML_Nav.build'><img src='"+dPth+"rogue.jpg'  onload='setOverSrc(this)' alt='Rogue' width='156' height='26' border='0' /></a></td>";
		htmlTopnav+="</tr>";

		htmlTopnav+="<tr>";
		htmlTopnav+="<td><a href='"+nonSecurePath+"/tools/build/xterra?tool=HTML_Nav.build'><img src='"+dPth+"xterra.jpg'  onload='setOverSrc(this)' alt='Xterra' width='156' height='26' border='0' /></a></td>";
		htmlTopnav+="</tr>";

		htmlTopnav+="<tr>";
		htmlTopnav+="<td><a href='"+nonSecurePath+"/tools/build/pathfinder?tool=HTML_Nav.build'><img src='"+dPth+"pathfinder.jpg' onload='setOverSrc(this)'  alt='Pathfinder'  width='156' height='26' border='0' /></a></td>";
		htmlTopnav+="</tr>";

		htmlTopnav+="<tr>";
		htmlTopnav+="<td><a href='"+nonSecurePath+"/tools/build/murano?tool=HTML_Nav.build'><img src='"+dPth+"murano.jpg'  onload='setOverSrc(this)'  alt='Murano' width='156' height='26' border='0' /></a></td>";
		htmlTopnav+="</tr>";

		htmlTopnav+="<tr>";
		htmlTopnav+="<td><a href='"+nonSecurePath+"/tools/build/armada?tool=HTML_Nav.build'><img src='"+dPth+"armada.jpg'  onload='setOverSrc(this)'   alt='Armada' width='156' height='26' border='0' /></a></td>";
		htmlTopnav+="</tr>";

		htmlTopnav+="<tr>";
		htmlTopnav+="<td><a href='"+nonSecurePath+"/tools/build/titan?tool=HTML_Nav.build'><img src='"+dPth+"titan.jpg'  onload='setOverSrc(this)'  alt='Titan' width='156' height='26' border='0' /></a></td>";
		htmlTopnav+="</tr>";

		htmlTopnav+="<tr>";
		htmlTopnav+="<td><a href='"+nonSecurePath+"/tools/build/frontier?tool=HTML_Nav.build'><img src='"+dPth+"frontier.jpg'  onload='setOverSrc(this)' alt='Frotier' width='156' height='26' border='0' /></a></td>";
		htmlTopnav+="</tr>";


    	htmlTopnav+="<tr>";
		htmlTopnav+="<td><a href='"+nonSecurePath+"/tools/build?tool=HTML_Nav.build'><img src='"+dPth+"see_all_veh.jpg'  onload='setOverSrc(this)' alt='See All Vehicles' width='156' height='26' border='0'  /></a></td>";
		htmlTopnav+="</tr>";
		htmlTopnav+="</table>";

		htmlTopnav+="</div>";

		// Build Your Nissan Car Models End Here



		// BROUCHURE FOR NISSAN CAR MODELS BEGIN HERE

		htmlTopnav+="<td width='166' height='75' align='left' valign='bottom'>";
		htmlTopnav+="<div id='brochure_nissan' onMouseOver='nissan_showHideLayers(\"brochure_nissan\",\"\",\"show\")' onMouseOut='nissan_showHideLayers(\"brochure_nissan\",\"\",\"hide\");'>";
		htmlTopnav+="<table width='100%' cellpadding='0' cellspacing='0'>";
		
		htmlTopnav+="<tr>";
		htmlTopnav+="<td><a href='"+nonSecurePath+"/tools/brochure/cube?tool=HTML_Nav.Brochure'><img src='"+dPth+"cube.jpg' onload='setOverSrc(this);' alt='Versa' width='156' height='26' border='0' /></a></td>";
		htmlTopnav+="</tr>";

		htmlTopnav+="<tr>";
		htmlTopnav+="<td><a href='"+nonSecurePath+"/tools/brochure/versa?tool=HTML_Nav.Brochure'><img src='"+dPth+"versa.jpg' onload='setOverSrc(this);' alt='Versa' width='156' height='26' border='0' /></a></td>";
		htmlTopnav+="</tr>";

		htmlTopnav+="<tr>";
		htmlTopnav+="<td><a href='"+nonSecurePath+"/tools/brochure/sentra?tool=HTML_Nav.Brochure'><img src='"+dPth+"sentra.jpg' onload='setOverSrc(this);' alt='Sentra' width='156' height='26' border='0' /></a></td>";
		htmlTopnav+="</tr>";

		htmlTopnav+="<tr>";
		htmlTopnav+="<td><a href='"+nonSecurePath+"/tools/brochure/sentraSER?tool=HTML_Nav.Brochure'><img src='"+dPth+"sentra_ser.jpg' onload='setOverSrc(this)' alt='Sentra SE-R' width='156' height='26' border='0' /></a></td>";
		htmlTopnav+="</tr>";

		htmlTopnav+="<tr>";
		htmlTopnav+="<td><a href='"+nonSecurePath+"/tools/brochure/altima?tool=HTML_Nav.Brochure'><img src='"+dPth+"altima.jpg' onload='setOverSrc(this)' alt='Altima' width='156' height='26' border='0' /></a></td>";
		htmlTopnav+="</tr>";

		htmlTopnav+="<tr>";
		htmlTopnav+="<td><a href='"+nonSecurePath+"/tools/brochure/altimacoupe?tool=HTML_Nav.Brochure'><img src='"+dPth+"alt_coupe.jpg' onload='setOverSrc(this)' alt='AltimaCoupe' width='156' height='26' border='0' /></a></td>";
		htmlTopnav+="</tr>";

		htmlTopnav+="<tr>";
		htmlTopnav+="<td><a href='"+nonSecurePath+"/tools/brochure/maxima?tool=HTML_Nav.Brochure'><img src='"+dPth+"maxima.jpg' onload='setOverSrc(this)' alt='Maxima' width='156' height='26' border='0' /></a></td>";
		htmlTopnav+="</tr>";

		htmlTopnav+="<tr>";
		htmlTopnav+="<td><a href='"+nonSecurePath+"/tools/brochure/zcoupe?tool=HTML_Nav.Brochure'><img src='"+dPth+"zcoupe.jpg' onload='setOverSrc(this)' alt='Z Coupe' width='156' height='26' border='0' /></a></td>";
		htmlTopnav+="</tr>";
		
		htmlTopnav+="<tr>";
		htmlTopnav+="<td><a href='"+nonSecurePath+"/tools/brochure/zroadster?tool=HTML_Nav.Brochure'><img src='"+dPth+"zroadster.jpg' onload='setOverSrc(this)' alt='Z Roadster' width='156' height='26' border='0' /></a></td>";
		htmlTopnav+="</tr>";

		/*htmlTopnav+="<tr>";
		htmlTopnav+="<td><a href='"+nonSecurePath+"/tools/brochure/quest?tool=HTML_Nav.Brochure'><img src='"+dPth+"quest.jpg' onload='setOverSrc(this)' alt='Quest' width='156' height='26' border='0' /></a></td>";
		htmlTopnav+="</tr>";*/

		htmlTopnav+="<tr>";
		htmlTopnav+="<td><a href='"+nonSecurePath+"/tools/brochure/rogue?tool=HTML_Nav.Brochure'><img src='"+dPth+"rogue.jpg'  onload='setOverSrc(this)' alt='Rogue' width='156' height='26' border='0' /></a></td>";
		htmlTopnav+="</tr>";

		htmlTopnav+="<tr>";
		htmlTopnav+="<td><a href='"+nonSecurePath+"/tools/brochure/xterra?tool=HTML_Nav.Brochure'><img src='"+dPth+"xterra.jpg' onload='setOverSrc(this)' alt='Xterra' width='156' height='26' border='0' /></a></td>";
		htmlTopnav+="</tr>";

		htmlTopnav+="<tr>";
		htmlTopnav+="<td><a href='"+nonSecurePath+"/tools/brochure/pathfinder?tool=HTML_Nav.Brochure'><img src='"+dPth+"pathfinder.jpg' onload='setOverSrc(this)' alt='Pathfinder' onload='setOverSrc(this)' width='156' height='26' border='0' /></a></td>";
		htmlTopnav+="</tr>";

		htmlTopnav+="<tr>";
		htmlTopnav+="<td><a href='"+nonSecurePath+"/tools/brochure/murano?tool=HTML_Nav.Brochure'><img src='"+dPth+"murano.jpg' onload='setOverSrc(this)' alt='Murano' width='156' height='26' border='0' /></a></td>";
		htmlTopnav+="</tr>";

		htmlTopnav+="<tr>";
		htmlTopnav+="<td><a href='"+nonSecurePath+"/tools/brochure/armada?tool=HTML_Nav.Brochure'><img src='"+dPth+"armada.jpg' onload='setOverSrc(this)' alt='Armada' width='156' height='26' border='0' /></a></td>";
		htmlTopnav+="</tr>";

		htmlTopnav+="<tr>";
		htmlTopnav+="<td><a href='"+nonSecurePath+"/tools/brochure/titan?tool=HTML_Nav.Brochure'><img src='"+dPth+"titan.jpg' onload='setOverSrc(this)' alt='Titan' width='156' height='26' border='0' /></a></td>";
		htmlTopnav+="</tr>";

		htmlTopnav+=("<tr>");
		htmlTopnav+="<td><a href='"+nonSecurePath+"/tools/brochure/frontier?tool=HTML_Nav.Brochure'><img src='"+dPth+"frontier.jpg' onload='setOverSrc(this)' alt='Frotier' width='156' height='26' border='0' /></a></td>";
		htmlTopnav+="</tr>";

		htmlTopnav+="<tr>";
		htmlTopnav+="<td><a href='"+nonSecurePath+"/tools/brochure?tool=HTML_Nav.Brochure'><img src='"+dPth+"see_all_veh.jpg' onload='setOverSrc(this)' alt='See All Vehicles' width='156' height='26' border='0'  /></a></td>";
		htmlTopnav+="</tr>";
		htmlTopnav+="</table>";
		htmlTopnav+="</div>";



		//  BROUCHURE FOR NISSAN CAR MODELS END HERE

		//RAQ FOR NISSAN CAR MODELS


		htmlTopnav+="<td width='166' height='75' align='left' valign='bottom'>";

		htmlTopnav+="<div id='raq_nissan' onMouseOver='nissan_showHideLayers(\"raq_nissan\",\"\",\"show\")' onMouseOut='nissan_showHideLayers(\"raq_nissan\",\"\",\"hide\");'>";

		htmlTopnav+="<table width='100%' cellpadding='0' cellspacing='0'>";
		
		htmlTopnav+="<tr>";
		htmlTopnav+="<td><a href='"+nonSecurePath+"/tools/raq/cube?tool=HTML_Nav.RAQ'><img src='"+dPth+"cube.jpg' onload='setOverSrc(this);' alt='cube' width='156' height='26' border='0' /></a></td>";
		htmlTopnav+="</tr>";
		
		htmlTopnav+="<tr>";
		htmlTopnav+="<td><a href='"+nonSecurePath+"/tools/raq/versa?tool=HTML_Nav.RAQ'><img src='"+dPth+"versa.jpg' onload='setOverSrc(this);' alt='Versa' width='156' height='26' border='0' /></a></td>";
		htmlTopnav+="</tr>";

		htmlTopnav+="<tr>";
		htmlTopnav+="<td><a href='"+nonSecurePath+"/tools/raq/sentra?tool=HTML_Nav.RAQ'><img src='"+dPth+"sentra.jpg' onload='setOverSrc(this);' alt='Sentra' width='156' height='26' border='0' /></a></td>";
		htmlTopnav+="</tr>";

		htmlTopnav+="<tr>";
		htmlTopnav+="<td><a href='"+nonSecurePath+"/tools/raq/sentraSER?tool=HTML_Nav.RAQ'><img src='"+dPth+"sentra_ser.jpg' onload='setOverSrc(this)' alt='Sentra SE-R' width='156' height='26' border='0' SE-R' /></a></td>";
		htmlTopnav+="</tr>";

		htmlTopnav+="<tr>";
		htmlTopnav+="<td><a href='"+nonSecurePath+"/tools/raq/altima?tool=HTML_Nav.RAQ'><img src='"+dPth+"altima.jpg' onload='setOverSrc(this)' alt='Altima' width='156' height='26' border='0' /></a></td>";
		htmlTopnav+="</tr>";

		htmlTopnav+="<tr>";
		htmlTopnav+="<td><a href='"+nonSecurePath+"/tools/raq/altimacoupe?tool=HTML_Nav.RAQ'><img src='"+dPth+"alt_coupe.jpg' onload='setOverSrc(this)' alt='AltimaCoupe' width='156' height='26' border='0' /></a></td>";
		htmlTopnav+="</tr>";

		htmlTopnav+="<tr>";
		htmlTopnav+="<td><a href='"+nonSecurePath+"/tools/raq/maxima?tool=HTML_Nav.RAQ'><img src='"+dPth+"maxima.jpg' onload='setOverSrc(this)' alt='Maxima' width='156' height='26' border='0' /></a></td>";
		htmlTopnav+="</tr>";

		htmlTopnav+="<tr>";
		htmlTopnav+="<td><a href='"+nonSecurePath+"/tools/raq/zcoupe?tool=HTML_Nav.RAQ'><img src='"+dPth+"zcoupe.jpg' onload='setOverSrc(this)' alt='Z Coupe' width='156' height='26' border='0' /></a></td>";
		htmlTopnav+="</tr>";
		
		htmlTopnav+="<tr>";
		htmlTopnav+="<td><a href='"+nonSecurePath+"/tools/raq/zroadster?tool=HTML_Nav.RAQ'><img src='"+dPth+"zroadster.jpg' onload='setOverSrc(this)' alt='Z Roadster' width='156' height='26' border='0' /></a></td>";
		htmlTopnav+="</tr>";

		/*htmlTopnav+="<tr>";
		htmlTopnav+="<td><a href='"+nonSecurePath+"/tools/raq/quest?tool=HTML_Nav.RAQ'><img src='"+dPth+"quest.jpg' onload='setOverSrc(this)' alt='Quest' width='156' height='26' border='0' /></a></td>";
		htmlTopnav+="</tr>";*/

		htmlTopnav+="<tr>";
		htmlTopnav+="<td><a href='"+nonSecurePath+"/tools/raq/rogue?tool=HTML_Nav.RAQ'><img src='"+dPth+"rogue.jpg'  onload='setOverSrc(this)' alt='Rogue' width='156' height='26' border='0' /></a></td>";
		htmlTopnav+="</tr>";

		htmlTopnav+="<tr>";
		htmlTopnav+="<td><a href='"+nonSecurePath+"/tools/raq/xterra?tool=HTML_Nav.RAQ'><img src='"+dPth+"xterra.jpg' onload='setOverSrc(this)' alt='Xterra' width='156' height='26' border='0' /></a></td>";
		htmlTopnav+="</tr>";

		htmlTopnav+="<tr>";
		htmlTopnav+="<td><a href='"+nonSecurePath+"/tools/raq/pathfinder?tool=HTML_Nav.RAQ'><img src='"+dPth+"pathfinder.jpg' onload='setOverSrc(this)' alt='Pathfinder' onload='setOverSrc(this)' width='156' height='26' border='0' /></a></td>";
		htmlTopnav+="</tr>";

		htmlTopnav+="<tr>";
		htmlTopnav+="<td><a href='"+nonSecurePath+"/tools/raq/murano?tool=HTML_Nav.RAQ'><img src='"+dPth+"murano.jpg' onload='setOverSrc(this)' alt='Murano' width='156' height='26' border='0' /></a></td>";
		htmlTopnav+="</tr>";

		htmlTopnav+="<tr>";
		htmlTopnav+="<td><a href='"+nonSecurePath+"/tools/raq/armada?tool=HTML_Nav.RAQ'><img src='"+dPth+"armada.jpg' onload='setOverSrc(this)' alt='Armada' width='156' height='26' border='0' /></a></td>";
		htmlTopnav+="</tr>";

		htmlTopnav+="<tr>";
		htmlTopnav+="<td><a href='"+nonSecurePath+"/tools/raq/titan?tool=HTML_Nav.RAQ'><img src='"+dPth+"titan.jpg' onload='setOverSrc(this)' alt='Titan' width='156' height='26' border='0' /></a></td>";
		htmlTopnav+="</tr>";

		htmlTopnav+="<tr>";
		htmlTopnav+="<td><a href='"+nonSecurePath+"/tools/raq/frontier?tool=HTML_Nav.RAQ'><img src='"+dPth+"frontier.jpg' onload='setOverSrc(this)' alt='Frotier' width='156' height='26' border='0' /></a></td>";
		htmlTopnav+="</tr>";

		htmlTopnav+="<tr>";
		htmlTopnav+="<td><a href='"+nonSecurePath+"/tools/raq?tool=HTML_Nav.RAQ'><img src='"+dPth+"see_all_veh.jpg' onload='setOverSrc(this)' alt='See All Vehicles' width='156' height='26' border='0'  /></a></td>";
		htmlTopnav+="</tr>";

		htmlTopnav+="</table>";
		htmlTopnav+="</div>";


		//RAQ FOR  NISSAN CAR MODELS END HERE ..



		// More Tools Module

		htmlTopnav+="<div id='more_tools' onMouseOver='nissan_showHideLayers(\"more_tools\",\"\",\"show\")' onMouseOut='nissan_showHideLayers(\"more_tools\",\"\",\"hide\")'>";

		htmlTopnav+="<table width='100%' cellspacing='0' cellpadding='0'>";
		htmlTopnav+="<tr>";
		htmlTopnav+="<td><a href='"+nonSecurePath+"/tools/inventory?tool=HTML_Nav.SearchInventory'><img src='"+nonSecurePath+dPth+"search_inventory.jpg'   onload='setOverSrc(this)' alt='Search Inventory' name='Search Inventory' width='156' height='26' border='0' id='Search Inventory' /></a></td>";
		htmlTopnav+="</tr>";

		htmlTopnav+="<tr>";
		htmlTopnav+="<td><a href='"+nonSecurePath+"/compare/en?tool=HTML_Nav.Comparator'><img src='"+nonSecurePath+dPth+"compare_competitors.jpg'  onload='setOverSrc(this)' alt='Compare Competitors' name='Compare Competitors' width='156' height='26' border='0' id='Compare Competitors' /></a></td>";
		htmlTopnav+="</tr>";

		htmlTopnav+="<tr>";
		htmlTopnav+="<td><a href='"+nonSecurePath+"/apps/paymentestimator?tool=HTML_Nav.PaymentEstimator'><img src='"+nonSecurePath+dPth+"estimate_payment.jpg'  onload='setOverSrc(this)' alt='Estimate Payment' name='Estimate Payment' width='156' height='26' border='0' id='Estimate Payment' /></a></td>";
		htmlTopnav+="</tr>";

		htmlTopnav+="<tr>";
		htmlTopnav+="<td><a href='"+nonSecurePath+"/apps/preapprovedinput?tool=HTML_Nav.Pre_Approval'><img src='"+nonSecurePath+dPth+"get_preapproved.jpg' onload='setOverSrc(this)' alt='Get Pre-Approved' name='Get Pre-Approved' width='156' height='26' border='0' id='Get Pre-Approved' /></a></td>";
		htmlTopnav+="</tr>";

		htmlTopnav+="<tr>";
		htmlTopnav+="<td><a href='"+nonSecurePath+"/tools/build?tool=HTML_Nav.build_SAV'><img src='"+nonSecurePath+dPth+"see_all_veh.jpg' onload='setOverSrc(this)' alt='moretools_sav' name='moretools_sav' width='156' height='26' border='0' id='moretools_sav' /></a></td></tr>";
		htmlTopnav+="</table>";

		htmlTopnav+="</div>";

		// More Tools Module Ends Here


		// Build Your Nissan Link


		htmlTopnav+="<td width='166' align='left' valign='bottom'><a href='"+nonSecurePath+"/tools/build?tool=HTML_Nav.build' onload='setOverSrc(this)'><img src='"+nonSecurePath+nPth+"build_your_nissan.jpg' alt='Build Your Nissan' name='Build Your Nissan' width='166' height='75' border='0' id='Build Your Nissan' onMouseOver='nissan_showHideLayers(\"build_your_nissan\",\"\",\"show\")' onMouseOut='nissan_showHideLayers(\"build_your_nissan\",\"\",\"hide\")' /></a></td>";
		//Build Your Nissan Link Ends here

		// Brochure Link
		htmlTopnav+="<td width='151' align='left' valign='bottom'><a href='"+nonSecurePath+"/tools/brochure?tool=HTML_Nav.Brochure' onload='setOverSrc(this)'><img src='"+nonSecurePath+nPth+"get_a_brochure.jpg' alt='Brochure Nissan' name='Brochure Nissan' width='151' height='75' border='0' id='Brochure Nissan' onMouseOver='nissan_showHideLayers(\"brochure_nissan\",\"\",\"show\")' onMouseOut='nissan_showHideLayers(\"brochure_nissan\",\"\",\"hide\")' /></a></td>";
		// Brochure Link Ends Here

		// RAQ Links
		htmlTopnav+="<td width='157' align='left' valign='bottom'><a href='"+nonSecurePath+"/tools/raq?tool=HTML_Nav.RAQ' onload='setOverSrc(this)'><img src='"+nonSecurePath+nPth+"request_a_quote.jpg' alt='RAQ Nissan' name='RAQ Nissan' width='157' height='75' border='0' id='RAQ Nissan' onMouseOver='nissan_showHideLayers(\"raq_nissan\",\"\",\"show\")' onMouseOut='nissan_showHideLayers(\"raq_nissan\",\"\",\"hide\")' /></a></td>";
		//RAQ Links Ends Here

		//Locate A Dealer
		htmlTopnav+="<td width='152' align='left' valign='bottom'><a href='"+nonSecurePath+"/tools/locate?tool=HTML_Nav.locate' onload='setOverSrc(this)'><img src='"+nonSecurePath+nPth+"locate_a_dealer.jpg' alt='Locate Nissan' name='Locate Nissan' width='152' height='75' border='0' id='Locate Nissan' /></a></td>";
		// Locate A Dealer Ends Here

		// More Tools
		htmlTopnav+="<td align='left' valign='bottom'><a href='#' onload='setOverSrc(this)'><img src='"+nonSecurePath+nPth+"more_tools.jpg' alt='More Tools' name='More Tools' width='175' height='75' border='0' id='More Tools' onMouseOver='nissan_showHideLayers(\"more_tools\",\"\",\"show\")'onmouseout='nissan_showHideLayers(\"more_tools\",\"\",\"hide\")' /></a></td>";
		// More Tools Ends Here-->

		htmlTopnav+="</tr>";
		htmlTopnav+="</table>";

		htmlTopnav+="</div>";




		//alert("htmlTopnav:");
		//alert("htmlTopnav: "+htmlTopnav);
		return htmlTopnav;
	},
	writeStyle:function(){

			//alert("in writeStyle");

			var objHead = document.getElementsByTagName('head');
  			//alert("objHead: "+objHead);
			if (objHead[0])
				  {
				  	var dynHost = "http://"+window.location.host;
					var objCSS = objHead[0].appendChild(document.createElement('link'));
					objCSS.id = 'widepage';
					objCSS.rel = 'stylesheet';
					objCSS.href = ''+dynHost+'/css/t/non-flash.css';
					objCSS.type = 'text/css';
				  }


	},
	write: function(elementId){
		if(this.getAttribute('useExpressInstall')) {
			// check to see if we need to do an express install
			var expressInstallReqVer = new deconcept.PlayerVersion([6,0,65]);
			if (this.installedVer.versionIsValid(expressInstallReqVer) && !this.installedVer.versionIsValid(this.getAttribute('version'))) {
				this.setAttribute('doExpressInstall', true);
				this.addVariable("MMredirectURL", escape(this.getAttribute('xiRedirectUrl')));
				document.title = document.title.slice(0, 47) + " - Flash Player Installation";
				this.addVariable("MMdoctitle", document.title);
			}
		}
		// if we have flash, or if the non-flash string is present, or if the nonflash querystring is on
		if( (this.skipDetect || this.getAttribute('doExpressInstall') || this.installedVer.versionIsValid(this.getAttribute('version')) && currentURI.indexOf("non-flash")==-1 && location.href.indexOf("nonflash=on")==-1) ){
			var currentURL = window.location;
			if(String(currentURL).indexOf("cpo") != -1)
			{
				var regNavDiv = document.createElement('div');
				regNavDiv.id="movFlashRegionalNav";
				regNavDiv.className="gFlashRnav";
				if(document.getElementById('box'))
				{
					document.getElementById('box').appendChild(regNavDiv);
				}
				//alert("movFlashRegionalNav:"+document.getElementById('movFlashRegionalNav'));			
			}
			var n = (typeof elementId == 'string') ? document.getElementById(elementId) : elementId;
			n.innerHTML = this.getSWFHTML();
			return true;
		}else{
			//Changes made by : Chandan Lakkoju -- Start here
			// else if the user does NOT have Flash, BUT the page contains header/footer elements but not regional/core elements.
			// this sifts out microsites, homepage, SAV, VLPs, etc.
			var ele = (typeof elementId == 'string') ? document.getElementById(elementId) : elementId;
			if ($("movFlashGlobalNav") && $("movFlashBottomNav") && !$("movFlashRegionalNav") && !$("movFlashCore") && !isSpanishPage) {

				this.writeStyle();
				if(ele.id == "movFlashGlobalNav"){
					//Writing Top Nav
					if(alertBool)alert("Element exists - Please write Top DHTML");
					ele.innerHTML = this.writeHTMLTopNav();
				}else if(ele.id == "movFlashBottomNav"){
					//Writing Bottom Nav
					if(alertBool)alert("Element exists - Please write Footer DHTML");
					ele.innerHTML = this.writeHTMLFooterNav();
				}
				replaceFlashLinks();

			}else if(this.getAttribute('redirectUrl') != "") {


				document.location.replace(this.getAttribute('redirectUrl'));
				//writeHTMLTopNav();
				//writeHTMLFooterNav();
				//Changes made by : Chandan Lakkoju -- End here
			}
		}
		return false;
	}
}

//Changes made by : Chandan Lakkoju -- Start here
//Changes made by : Chandan Lakkoju -- End here

/* ---- detection functions ---- */
deconcept.SWFObjectUtil.getPlayerVersion = function(){
	var PlayerVersion = new deconcept.PlayerVersion([0,0,0]);
	if(navigator.plugins && navigator.mimeTypes.length){
		var x = navigator.plugins["Shockwave Flash"];
		if(x && x.description) {
			PlayerVersion = new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split("."));
		}
	}else{
		// do minor version lookup in IE, but avoid fp6 crashing issues
		// see http://blog.deconcept.com/2006/01/11/getvariable-setvariable-crash-internet-explorer-flash-6/
		try{
			var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
		}catch(e){
			try {
				var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
				PlayerVersion = new deconcept.PlayerVersion([6,0,21]);
				axo.AllowScriptAccess = "always"; // throws if player version < 6.0.47 (thanks to Michael Williams @ Adobe for this code)
			} catch(e) {
				if (PlayerVersion.major == 6) {
					return PlayerVersion;
				}
			}
			try {
				axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
			} catch(e) {}
		}
		if (axo != null) {
			PlayerVersion = new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));
		}
	}
	return PlayerVersion;
}
deconcept.PlayerVersion = function(arrVersion){
	this.major = arrVersion[0] != null ? parseInt(arrVersion[0]) : 0;
	this.minor = arrVersion[1] != null ? parseInt(arrVersion[1]) : 0;
	this.rev = arrVersion[2] != null ? parseInt(arrVersion[2]) : 0;
}
deconcept.PlayerVersion.prototype.versionIsValid = function(fv){
	if(this.major < fv.major) return false;
	if(this.major > fv.major) return true;
	if(this.minor < fv.minor) return false;
	if(this.minor > fv.minor) return true;
	if(this.rev < fv.rev) return false;
	return true;
}
/* ---- get value of query string param ---- */
deconcept.util = {
	getRequestParameter: function(param) {
		var q = document.location.search || document.location.hash;
		if(q) {
			var pairs = q.substring(1).split("&");
			for (var i=0; i < pairs.length; i++) {
				if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
					return pairs[i].substring((pairs[i].indexOf("=")+1));
				}
			}
		}
		return "";
	}
}
/* fix for video streaming bug */
deconcept.SWFObjectUtil.cleanupSWFs = function() {
	if (window.opera || !document.all) return;
	var objects = document.getElementsByTagName("OBJECT");
	for (var i=0; i < objects.length; i++) {
		objects[i].style.display = 'none';
		for (var x in objects[i]) {
			if (typeof objects[i][x] == 'function') {
				objects[i][x] = function(){};
			}
		}
	}
}
// fixes bug in fp9 see http://blog.deconcept.com/2006/07/28/swfobject-143-released/
deconcept.SWFObjectUtil.prepUnload = function() {
	__flash_unloadHandler = function(){};
	__flash_savedUnloadHandler = function(){};
	if (typeof window.onunload == 'function') {
		var oldUnload = window.onunload;
		window.onunload = function() {
			deconcept.SWFObjectUtil.cleanupSWFs();
			oldUnload();
		}
	} else {
		window.onunload = deconcept.SWFObjectUtil.cleanupSWFs;
	}
}
if (typeof window.onbeforeunload == 'function') {
	var oldBeforeUnload = window.onbeforeunload;
	window.onbeforeunload = function() {
		deconcept.SWFObjectUtil.prepUnload();
		oldBeforeUnload();
	}
} else {
	window.onbeforeunload = deconcept.SWFObjectUtil.prepUnload;
}
/* add Array.push if needed (ie5) */
if (Array.prototype.push == null) { Array.prototype.push = function(item) { this[this.length] = item; return this.length; }}

/* add some aliases for ease of use/backwards compatibility */
var getQueryParamValue = deconcept.util.getRequestParameter;
var FlashObject = deconcept.SWFObject; // for legacy support
var SWFObject = deconcept.SWFObject;




















/*
Object inheritance framework from
http://www.coolpage.com/developer/javascript/Correct%20OOP%20for%20Javascript.html

Example implementation:

function Foo (a, b, c) {
	// do something
}

Bar.Inherits(Foo);
function Bar (a, b) {
	var c = 'blah';
	this.Inherits(Foo, a, b, c);
}

*/

/* Object.prototype.Inherits = function( parent )
	{
		if( arguments.length > 1 )
		{
			parent.apply( this, Array.prototype.slice.call( arguments, 1 ) );
		}
		else
		{
			parent.call( this );
		}
	}
*/

Function.prototype.Inherits = function( parent )
	{
		this.prototype = new parent();
		this.prototype.constructor = this;
	}

  // **************************************************************************************************
  // ****      I.E. DOM IMPLEMENTATION ISSUE FIX                                                   ****
  // **************************************************************************************************

  // Stub function
  function createElementWithName(){}

  // Anonymous function fills in stub automatically depending on browser implementation of name
  // attribute.  IE requires a non-standard call to document.createElement in order to set the name
  // attribute for elements, which is necessary for dynamically generated forms.
  (function(){
    try {
      var el=document.createElement( '<div name="foo">' );
      if( 'DIV'!=el.tagName ||
          'foo'!=el.name ){
        throw 'create element error';
      }
      createElementWithName = function( tag, name ){
        return document.createElement( '<'+tag+' name="'+name+'"></'+tag+'>' );
      }
    }catch( e ){
      createElementWithName = function( tag, name ){
        var el = document.createElement( tag );
        // setAttribute might be better here ?
        el.name = name;
		el.setAttribute("name",name);
        return el;
      }
    }
  })();

  // Add createElementWithName to document object as createNamedElement
  if (typeof(document.createNamedElement) == 'undefined') {
    document.createNamedElement = createElementWithName;
  }

  /*
  Example usage:
  	// Declare variables object
  	var flashvars = {
  		handle:'handletest'
  		,flashVarText:'testing'
  		,anothervar:'testing'
  	};
  	// Embed Flash object in page
  	var so = new swfoWrapper('so_tester.swf','flashcontent',flashvars,300,300);
  */
  swfoWrapper.Inherits(SWFObject);




  //var swfoCoreURL = (swfoBaseURL.length > 0 ? window.location.protocol+"//"+swfoBaseURL : "");
  //var swfoCoreURL = (swfoBaseURL.length > 0 ? window.location.protocol+"//"+swfoBaseURL : "") + "/flash/core.swf";

  //var swfoCoreURL = swfoBaseURL.replace(/https:\/\//i,"http://") + "/flash/core.swf";


  function swfoWrapper (swf, container, vartable, width, height){
  	// this = new SWFObject();
  	// default required flash version, background color
  	this.requiredversion = 8;
  	this.backcolor = '#ffffff';
  	// if width and height specified then set, otherwise default
  	this.height = !isNaN(width) ? width : 964;
  	this.width = !isNaN(height) ? height : 555;
  	// parameters provided by default constructor
  	this.swf = (/^http/).test(swf) ? swf :  swfoBaseURL+swf  ;
  	this.container = container;
  	// call the SWFObject constructor
  	this.Inherits(SWFObject, this.swf, container + '_swf', this.height, this.width, this.requiredversion, this.backcolor);

  	// add all variables!
  	//this.setAttribute('redirectUrl', 'http://www.nissanusa.com/global/error/getflash.html');

  	//Changes made by : Chandan Lakkoju -- Start here
  	//this.setAttribute('redirectUrl', 'http://www.nissanusa.com/global/error/getflash.html');

  	this.setAttribute('redirectUrl', '/non-flash/index.html');
  	//Changes made by : Chandan Lakkoju -- End here
	
	//Redirecting to nonFlash home page with tracking codes
	var nFlashUrl = '/non-flash/index.html';
	var trackCode = location.search;
	finalRedirectUrl = nFlashUrl + trackCode;
	if(trackCode == "")
	{this.setAttribute('redirectUrl', nFlashUrl);
	}
	else{
  	this.setAttribute('redirectUrl', finalRedirectUrl);
	}
	//End here
	
  	if(isSpanishPage){
  		this.addVariable( "lang",  "es" );
  	}

  	if(typeof crmPageId!="undefined"){
  		this.addVariable("pageid", crmPageId);
  	}

  	//Add some variables and params from Refresh2
  	this.addVariable( "handle",  location.pathname.replace(/\.(x|ht)ml$/,'')  );

  	//-var basePrefix=(typeof nissanRootSrc == 'string' )?nissanRootSrc:'http://www.nissanusa.com';
  	//-this.addParam('base',basePrefix+'/flash');

  	this.addParam('base',swfoBaseURL+'/flash');
  	//this.addParam('base',swfoBaseURL);

  	//this.addVariable('url',window.location.protocol+"//"+window.location.host+window.location.pathname);

  	this.addParam('scale','noscale');
  	// Added for SR: 12472
  	//this.addParam('wmode','transparent');
  	// Ends here SR: 12472
  	this.addParam('allowScriptAccess','always');


	/// begin regional nav text.
	this.doRegionalNav=function(){
		var _lp=location.pathname.replace(/\/$/,'/index.html');//location pathname
		var _pnp=location.pathname.replace(/^\/espanol/,'').split("/");//pathname parts
		_pnp.shift();// shift off the always-blank first part
		_pnp[_pnp.length-1]=_pnp[_pnp.length-1].replace('index.html','');// if it's index, zap it to simplify.
		//_pnp=Array.concat(_pnp,['','','']);//add a few blanks
		_pnp.push('');
		_pnp.push('');
		_pnp.push('');
		switch(_pnp[0]){
			case 'about': /// about is pretty easy
				if(!_pnp[1]){return false}//blank. index.
				return _pnp[1];
			case 'buying': /// buying. go from most specific to most general to reduce number of conditionals
				if(!_pnp[1]){return false}//blank. index.
				if(_pnp[2]=='faqs'){return '/buying/nissan-financing/faqs/'} //credit.html
				if(_pnp[2]=='current-offers.html'){return '/buying/nissan-financing/current-offers.html'}
				if(_pnp[1]=='finance-account-manager.html'){return '/buying/finance-account-manager.html'}
				if(_pnp[1]=='nissan-financing'){return '/buying/nissan-financing/index.html'}
			case '':;
		}
		if(isVehiclePage && /^(specifications|packaged-options|individual-options|accessories)/.test(_pnp[1]) ){
			return 'specifications';
		}
		if(isVehiclePage && /^(awards)/.test(_pnp[1]) ){
			return 'awards';
		}
		return false;
	}


   var RNAVstr = location.href;

	if((RNAVstr.indexOf('se-r') > -1)||(RNAVstr.indexOf('gt-r') > -1)||(RNAVstr.indexOf('altimacoupe') > -1)||(RNAVstr.indexOf('rogue') > -1)||(RNAVstr.indexOf('zcoupe') > -1)||(RNAVstr.indexOf('zroadster') > -1)||(RNAVstr.indexOf('cube') > -1)){
			if(RNAVstr.indexOf('awards') > -1){
				
				var regNavUrlPart="awards";
				this.addVariable( "regNavUrlPart", regNavUrlPart );
			}
			if((RNAVstr.indexOf('specifications') > -1)||(RNAVstr.indexOf('packaged-options') > -1)||(RNAVstr.indexOf('individual-options') > -1)||(RNAVstr.indexOf('accessories') > -1)){
				var regNavUrlPart="specifications";	
				this.addVariable( "regNavUrlPart", regNavUrlPart );
			}
	}

   if((height>width)||(RNAVstr.indexOf('specifications') > -1)||(RNAVstr.indexOf('awards') > -1)){
		

			var regNavUrlPart=this.doRegionalNav();
			//console.info(regNavUrlPart)
			if(regNavUrlPart){
				//console.info(regNavUrlPart)
				
				this.addVariable( "regNavUrlPart", regNavUrlPart );
				
			
		}
		
	}
	/// end regional nav text.



  	for (var varitem in vartable) {
  		if (typeof(vartable[varitem]) != 'function'){
  			if(/^atr_/.test(varitem)){
  				this.setAttribute(varitem.replace(/^atr_/,''),vartable[varitem]);
  			}else if(/^param_/.test(varitem)){
  				this.addParam(varitem.replace(/^param_/,''),vartable[varitem]);
  			}else{
  				this.addVariable(varitem,String(vartable[varitem]).replace(/&amp;/g,'%26').replace(/\+/g,'%2B'));
  			}
  		}
  	}
  	if(vartable.CFE && vartable.CFE=='true'){
  		//this.addVariable('url',location.protocol+"//"+location.host+location.pathname+  ((location.port) ? ":"+location.port : "")  );

      // keep hash in for flash
  		//this.addVariable('url',location.href.replace(/#.+/,'').replace('?','%3F').replace(/&/g,'%26').replace(/=/g,'%3F')  );
  		this.addVariable('url',location.href.replace('?','%3F').replace(/&/g,'%26').replace(/=/g,'%3F').replace('dhash%3F','#')  );

  		this.addParam('wmode','transparent');
  	}
  	if(vartable.page=='globalnav'){
  		this.addParam('wmode','transparent');
  	}
  	// so flash has its own id:
  	this.addVariable( "htmlSwfId",  vartable['atr_id']||container + '_swf' );
  	///this.addVariable('url',""); //#  TEST




  	this.postform = function (action,query) {
  		var fe = document.createElement("form");
  		fe.id = "flashsearchform";
  		fe.action = action;
  		fe.enctype = "multipart/form-data";
  		fe.encoding = "multipart/form-data";
  		fe.method = "post";
  		fe.style.display = "none";
  		var qv = "";
  		var qa = query.split(",");
  		for (var i = 0; i < qa.length; i++) {
  			qv += String.fromCharCode(qa[i])
  		}

  		var qps = qv.split("&");
  		for (var i = 0; i < qps.length; i++) {
  			var qp = qps[i].split("=");
  			var qpe = document.createNamedElement("input",qp[0]);
  			qpe.type = "hidden";
  			var qpev = qp[1];
  			qpe.value = qpev;
  			fe.appendChild(qpe);
  		}

  		var qpcs = document.createNamedElement("input","_charset_");
  		qpcs.type = "hidden";
  		qpcs.value = "utf-8";
  		fe.appendChild(qpcs);
  		document.body.appendChild(fe);
  		fe.submit();
  	}

  	this.write(this.container);
  	return;
  }

  swfoWrapper.prototype.Inherits=function(parent){
  	if( arguments.length > 1 ){
  		parent.apply( this, Array.prototype.slice.call( arguments, 1 ) );
  	}else{
  		parent.call( this );
  	}
}

if(typeof globalNavFv=='undefined') var globalNavFv={};
if(typeof footerNavFv=='undefined') var footerNavFv={};
if(typeof regionalNavFv=='undefined') var regionalNavFv={};
if(typeof promoNavFv=='undefined') var promoNavFv={};

var wasMissingSWFO=false;
if(typeof SWFObject=='undefined'){
	wasMissingSWFO=true;
	document.write('<sc'+'ript src="'+swfoBaseURL+'/js/swfobject/swfobject.js" language="JavaScript" type="text/javascript"></s'+'cript>');
}
if(wasMissingSWFO || typeof swfoWrapper == "undefined" ){
	document.write('<sc'+'ript src="'+swfoBaseURL+'/js/swfobject/objectinheritance.js" language="JavaScript" type="text/javascript"></s'+'cript>');
	document.write('<sc'+'ript src="'+swfoBaseURL+'/js/swfobject/swfobjectWrapper.js" language="JavaScript" type="text/javascript"></s'+'cript>');
}

function addAllTheNavigation() {
	//var coreURL="/flash/core.swf" //MY

	var myVehicle=location.pathname.split("/")[1]; //not just for vehicles. for all
	if(/snugkids|apps\/(mynissan|techpubs|servicecoupons|servicerecords|cpo)/.test(location.pathname)){
		if(/apps\/cpo/.test(location.pathname)){
			myVehicle='cpo';
		}else{
			myVehicle='owning';
		}
	} else if (/espanol/.test(location.pathname)) {
		if(/cpo/.test(location.pathname)){
			myVehicle='cpo';	
		}else{
		 	myVehicle=location.pathname.split("/")[2];
		}
		
	}
	
	//Non-Flash header for SAV Page
	if(document.getElementById("savBody"))
	{
		//importXMLRaw();
		importXML();
	}

	//- a bunch of things are set globally in swfwrapper and a few in global.js
	if ($("movFlashBottomNav")) {
		footerNavFv.page='footer';
		footerNavFv.atr_id='dataFlashBottomNav';
		footerNavFv.param_wmode='transparent'; /*Added to fix SR 16401 by Pavan*/
		new swfoWrapper("/flash/footer/footer.swf", 'movFlashBottomNav', footerNavFv, 964, 37);
	}
	if ($("movFlashGlobalNav")) {
		globalNavFv.page="globalnav";
		globalNavFv.atr_id='dataFlashGlobalNav';
		globalNavFv.param_wmode='transparent';
		new swfoWrapper("/flash/globalnav/globalnav.swf", 'movFlashGlobalNav', globalNavFv, 964, 85);

		//document.getElementById("dataFlashGlobalNav").style.height = "85px";
		document.getElementById("movFlashGlobalNav").style.zIndex = 99;
	}
	if ($("movFlashRegionalNav")) {
		regionalNavFv.page="regionalnav";
		regionalNavFv.atr_id='dataFlashRegionalNav';
		regionalNavFv.param_wmode='transparent';
		regionalNavFv.staticPage='true';
		regionalNavFv.vehicle=myVehicle;
		new swfoWrapper("/flash/regionalnav/regionalnav.swf", 'movFlashRegionalNav', regionalNavFv, 192, 500);

		document.getElementById("movFlashRegionalNav").style.zIndex = 199;
	}
	if ($("movFlashPromoNav")) {
		promoNavFv.page='promo';
		promoNavFv.vehicle=myVehicle;
		promoNavFv.pageid=crmPageId;
		promoNavFv.staticPage='true';
		promoNavFv.atr_id='dataFlashPromoNav';
		promoNavFv.param_wmode='transparent';
		new swfoWrapper("/flash/promo/promo.swf", 'movFlashPromoNav', promoNavFv, 716, 70);
	}
}

function makeReallySureTheReadyStateIsOK(){
	if(document.readyState && document.readyState != "complete"){
		document.onreadystatechange=function(){
			if(document.readyState == "complete"){
				addAllTheNavigation();
				document.onreadystatechange='';
			}
		}
	}else{
		addAllTheNavigation();
	}
}
//-nna.dom.addOnloadListener(makeReallySureTheReadyStateIsOK);
if ((typeof nna == 'object') && nna.dom && nna.dom.addOnloadListener) {
	nna.dom.addOnloadListener(addAllTheNavigation);
}else{
	addLoadEvent(addAllTheNavigation);
}

function initDynHdrTxt(){
fv = new deconcept.SWFObject;
if (typeof(swfoWrapper) == 'function') {
	if ((typeof(swfoWrapper) == 'function') && fv.installedVer.versionIsValid(fv.installedVer["major"])==true) {
		var _heights=[22,16]
		for(var i=1;i<=2;i++){
			var _h=document.getElementsByTagName('h'+i);
			for(var j=0;j<_h.length;j++){
				if(/gSwap/.test(_h[j].className)){
					var _ih=_h[j].innerHTML.replace(/^\s+|\s+$|[\r\n]/g,'');
					var _d=document.createElement('div');
					_h[j].innerHTML="";
					var _id="h{0}_{1}".format(i,j);
					_d.className="gNoPrint";
					_d.id=_id;
					_h[j].appendChild(_d);
					var _d=document.createElement('div');
					_d.className="gOnlyPrint";
					_d.innerHTML=_ih;
					_h[j].appendChild(_d);
					var _fv={}
					_fv["h{0}Text".format(i)]=_ih
					_fv.param_wmode='transparent';
					new swfoWrapper("/flash/menus/header.swf", _id, _fv, 400, _heights[i-1])
				}
			}
		}
	}
}
}

	function submitForm(){
		"/dealerlocator/en?service=direct/0/DealerSearch/dealerSearchFormShort&sp=S0&Form0=zipCodeShort,cityShort,stateShort,dealerNameShort,radiusShort,$ImageSubmit&zipCodeShort="+document.forms.form1.locateadealer.value
		document.brochureForm.submit();
	}

	function hidePopup()
	{
		document.getElementById('flashpop').style.visibility = 'hidden';
		document.getElementById('transparentdiv').style.display='none';
	}

	function flashDetection()
	    {
								var flashdetect;

								flashdetect="<div id='flashpopContent'>";
								flashdetect+="<table width='100%' cellpadding='0' cellspacing='10'>";
								flashdetect+="<tr>";
								flashdetect+="<td height='284' bgcolor='#ffffff'><table width='100%'>";
								flashdetect+="<tr>";
								flashdetect+="<td>&nbsp;</td>";
								flashdetect+="<td><div align='right'><img src='images/btn/popup_close_btn.gif' onClick='javascript:hidePopup()' alt='CLOSE' width='52' height='17' /></div></td>";
								flashdetect+="<td>&nbsp;</td>";
								flashdetect+="</tr>";
								flashdetect+="<tr>";
								flashdetect+="<td>&nbsp;</td>";
								flashdetect+=" <td><div align='left'><span class='tBlackTextBold'>We have detected you do not have the latest version of Flash Player on your computer.<br />";
								flashdetect+=" This limits the full functionality of NissanUSA.com.<br /><br />";

								 flashdetect+=" With the current version, you can still shop for and locate your next Nissan beginning with the page below.<br />";
								 flashdetect+="<br />";
								 flashdetect+="However, for the full web experience, download Flash Player and see:<br />";
								 flashdetect+="</span><span class='tTableText'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&bull; Interior and Exterior Photos and 360&#176;s<br />";
								 flashdetect+="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&bull; Interior and Exterior Color Selector<br />";
								 flashdetect+="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&bull; Product demonstrations and more</span><br />";
								 flashdetect+="<br />";
								 flashdetect+="<span class='tBlackTextBold'>Would you like to install the latest version?<br /><br /></span></div></td>";
								 flashdetect+="<td>&nbsp;</td>";
								 flashdetect+="</tr>";
								 flashdetect+="<tr>";
								 flashdetect+="<td>&nbsp;</td>";
								 flashdetect+="<td><table width='100%' cellspacing='0' cellpadding='0'>";
								 flashdetect+="<tr>";
								 flashdetect+="<td width='120'><a href='http://www.adobe.com/products/flashplayer/' onclick='crmEvent2();' target='_blank'><img src='images/btn/yes.jpg' onload='setOverSrc(this);' alt='YES' name='Image37' width='47' height='21' border='0' id='Image37' /></a></td>";

								 flashdetect+="<td height='30'><div align='left'><a href='javascript:hidePopup()'><img src='images/btn/no_thanks.jpg' onload='setOverSrc(this);' alt='NO THANKS' name='Image38' width='86' height='21' border='0' id='Image38' /></a></div></td>";
							     flashdetect+="</tr>";
							     flashdetect+="</table></td>";
							     flashdetect+="<td>&nbsp;</td>";
								 flashdetect+="</tr>";
								 flashdetect+="</table></td>";
								 flashdetect+="</tr>";
								 flashdetect+="</table>";
								 flashdetect+="</div>";

								 document.getElementById("flashpop").innerHTML = flashdetect;
								 //return flashdetect;

								document.getElementById('transparentdiv').style.margin='auto';
								document.getElementById('transparentdiv').style.width=document.body.clientWidth+'px';
								document.getElementById('transparentdiv').style.position='absolute';
								document.getElementById('transparentdiv').style.top='0px';
								document.getElementById('transparentdiv').style.zIndex=5;
								document.getElementById('transparentdiv').style.opacity=0.5;
							//	document.getElementById('transparentdiv').style.filter = 'alpha(opacity=' + 50 + ')';
								setOpacity(document.getElementById("transparentdiv"), 50)
								document.getElementById('transparentdiv').style.height='550px';
						
		}

addLoadEvent(initDynHdrTxt);


function setOpacity(obj, opacity) {
  opacity = (opacity == 100)?99.999:opacity;

  // IE/Win
  obj.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity="
+ opacity + ");";

  // Safari<1.2, Konqueror
  obj.style.KHTMLOpacity = opacity/100;

  // Older Mozilla and Firefox
  obj.style.MozOpacity = opacity/100;

  // Safari 1.2, newer Firefox and Mozilla, CSS3
  obj.style.opacity = opacity/100;
}
