//load this first - some slow loading pages may receive runtime error if sideNavEngine doesn't load fast enough.
document.write("<SCR" + "IPT LANGUAGE='JavaScript1.2' SRC='/budgetWeb/html/js/en/common/sideNavEngine.js' TYPE='text/javascript'><\/SCR" + "IPT>");
var headerTitle = '';
var headerLink = '';
if(typeof(window['navArrayName']) != "undefined" && navArrayName != null && navArrayName != '') {
	if(typeof(window['navHeaderTitle']) != "undefined" && navHeaderTitle != null && navHeaderTitle != '') {
		headerTitle = navHeaderTitle;
	}
	if(typeof(window['navHeaderLink']) != "undefined" && navHeaderLink != null && navHeaderLink != '') {
		headerLink = navHeaderLink;
	}
	// handle corner-case: freqrenters pages that need to look like they're deals pages
  if (document.location.search.indexOf("selfreqrentersub=display-meetingsInfo") >= 0 ||
		 document.location.search.indexOf("selfreqrentersub=display-reunionsInfo") >= 0 ||
		 document.location.search.indexOf("selfreqrentersub=display-businessGiftsInfo") >= 0 ||
		 document.location.search.indexOf("selfreqrentersub=display-weddingsInfo") >= 0) {
		  headerTitle = 'specials';
		  headerLink = '/budgetWeb/html/en/deals/index.html';
		  document.write("<SCR" + "IPT LANGUAGE='JavaScript1.2' SRC='/budgetWeb/html/js/en/common/deals_array.js' TYPE='text/javascript'><\/SCR" + "IPT>");
	} else { 
	document.write("<SCR" + "IPT LANGUAGE='JavaScript1.2' SRC='/budgetWeb/html/js/en/common/"+navArrayName+"_array.js' TYPE='text/javascript'><\/SCR" + "IPT>");
	 } 
} else {

if( document.location.search.indexOf("deals") != -1 || 
		document.location.pathname.indexOf("deals") != -1 ||
		document.location.pathname.indexOf("searchupgrade") != -1 ||
		(document.location.search.indexOf("selfreqrentersub=display-meetingsInfo") >= 0 ||
		 document.location.search.indexOf("selfreqrentersub=display-reunionsInfo") >= 0 ||
		 document.location.search.indexOf("selfreqrentersub=display-weddingsInfo") >= 0))
{
  headerTitle = 'specials';
  headerLink = '/budgetWeb/html/en/deals/index.html';
  document.write("<SCR" + "IPT LANGUAGE='JavaScript1.2' SRC='/budgetWeb/html/js/en/common/deals_array.js' TYPE='text/javascript'><\/SCR" + "IPT>");
} else if( document.location.search.indexOf("cars") != -1 || document.location.pathname.indexOf("cars") != -1 ){
  headerTitle = 'car types';
  headerLink = '/budgetWeb/html/en/cars/index.html';
  document.write("<SCR" + "IPT LANGUAGE='JavaScript1.2' SRC='/budgetWeb/html/js/en/common/cars_array.js' TYPE='text/javascript'><\/SCR" + "IPT>");
} else if( document.location.search.indexOf("smartservices") != -1 || document.location.pathname.indexOf("smartservices") != -1 ){
  headerTitle = 'services';
  headerLink = '/budgetWeb/html/en/smartservices/index.html';
  document.write("<SCR" + "IPT LANGUAGE='JavaScript1.2' SRC='/budgetWeb/html/js/en/common/smart_services_array.js' TYPE='text/javascript'><\/SCR" + "IPT>");
} else if( document.location.search.indexOf("locations") != -1 || document.location.pathname.indexOf("locations") != -1 ){
  headerTitle = 'locations';
  headerLink = '';
  document.write("<SCR" + "IPT LANGUAGE='JavaScript1.2' SRC='/budgetWeb/html/js/en/common/locations_array.js' TYPE='text/javascript'><\/SCR" + "IPT>");
} else if (document.location.search.indexOf("selfreqrentersub=display-guaranteedRateInfo") != -1 &&
	document.location.pathname.indexOf("freqrenterSubSubmit.ex") != -1) {

  headerTitle = 'customer care';
  headerLink = '/budgetWeb/feedback/feedbackrouter.ex?feedbackhome=display-contactus';
//alert("Loading customer care (1)");  
  document.write("<SCR" + "IPT LANGUAGE='JavaScript1.2' SRC='/budgetWeb/html/js/en/common/customer_care_array.js' TYPE='text/javascript'><\/SCR" + "IPT>");

} else if (document.location.search.indexOf("selfreqrentersub=display-lowestGuaranteeInfo") != -1 &&
	document.location.pathname.indexOf("freqrenterSubSubmit.ex") != -1) {
  headerTitle = 'customer care';
  headerLink = '/budgetWeb/feedback/feedbackrouter.ex?feedbackhome=display-contactus';
//alert("Loading customer care (2)");  
  document.write("<SCR" + "IPT LANGUAGE='JavaScript1.2' SRC='/budgetWeb/html/js/en/common/customer_care_array.js' TYPE='text/javascript'><\/SCR" + "IPT>");

} else if( (document.location.search.indexOf("freqrenter") != -1 && 
          (document.location.search.indexOf("meetingsInfo") != -1 || 
           document.location.search.indexOf("weddingsInfo") != -1 || 
           document.location.search.indexOf("reunionsInfo") != -1 ||
           document.location.search.indexOf("reunionsQuesInfo") != -1 ) ) ||
           document.location.pathname.indexOf("freqrenterReunionsSubmit") != -1 ||
           document.location.pathname.indexOf("freqrenterMeetingsSubmit") != -1 ||
           document.location.pathname.indexOf("freqrenterWeddingsSubmit") != -1 ||
           document.location.pathname.indexOf("freqrenterReunionsQuesSubmit") != -1 ||
           document.location.search.indexOf("display-businessGiftsInfo") != -1 ||
		   document.location.pathname.indexOf("monrentenrollment") != -1 ||
	   document.location.pathname.indexOf("giftCertificateSubmit") != -1 ) {
  headerTitle = 'specials';
  headerLink = '/budgetWeb/html/en/deals/';
  document.write("<SCR" + "IPT LANGUAGE='JavaScript1.2' SRC='/budgetWeb/html/js/en/common/deals_array.js' TYPE='text/javascript'><\/SCR" + "IPT>");
} else if( (document.location.search.indexOf('display-profileUpdateInfo') == -1 &&
            document.location.pathname.indexOf('freqrenterFastbreakProfileUpdateSubmit') == -1 &&
            document.location.pathname.indexOf('freqrenter') == -1) &&
           (document.location.search.indexOf("contactus") != -1 ||
            document.location.pathname.indexOf("canadianOptionInfo") != -1 ||
            document.location.pathname.indexOf("feedback") != -1 ||
            document.location.pathname.indexOf("contactSubSubmit.ex") != -1 ||
            document.location.pathname.indexOf("customer") != -1 )){

  headerTitle = 'customer care';
  headerLink = '/budgetWeb/feedback/feedbackrouter.ex?feedbackhome=display-contactus';
//alert("Loading customer care (3)");  
  
  document.write("<SCR" + "IPT LANGUAGE='JavaScript1.2' SRC='/budgetWeb/html/js/en/common/customer_care_array.js' TYPE='text/javascript'><\/SCR" + "IPT>");
  
} else if(  document.location.search.indexOf("freqrenter") != -1 && document.location.search.indexOf("travelAgentsOnlyInfo") != -1 || 
            document.location.search.indexOf("ourPartnersInfo") != -1 || 
            document.location.search.indexOf("donationFormInfo") != -1 || 
            document.location.search.indexOf("businessRewardsInfo") != -1 ||  
            document.location.search.indexOf("affiliatesInfo") != -1 ||  
            document.location.search.indexOf("affiliatesEnrollAgreeInfo") != -1){

  headerTitle = 'about us';
  headerLink = '/budgetWeb/html/en/aboutus/index.html';
  document.write("<SCR" + "IPT LANGUAGE='JavaScript1.2' SRC='/budgetWeb/html/js/en/common/about_us_array.js' TYPE='text/javascript'><\/SCR" + "IPT>");

} else if( document.location.search.indexOf("aboutus") != -1 ||
				document.location.pathname.indexOf("aboutus") != -1 ||
				//document.location.pathname.indexOf("tahome.ex") != -1 ||
				document.location.search.indexOf("affiliatesEnrollAgreeInfo") != -1 ){
  headerTitle = 'about us';
  headerLink = '/budgetWeb/html/en/aboutus/index.html';
  document.write("<SCR" + "IPT LANGUAGE='JavaScript1.2' SRC='/budgetWeb/html/js/en/common/about_us_array.js' TYPE='text/javascript'><\/SCR" + "IPT>");
  
} else if( document.location.search.indexOf("travelagent") != -1 ||
				document.location.pathname.indexOf("tahome.ex") != -1 ||
				document.location.pathname.indexOf("travelagent") != -1){
  headerTitle = 'travel agents home';
  headerLink = '/budgetWeb/html/en/travelagent/index.html';
  document.write("<SCR" + "IPT LANGUAGE='JavaScript1.2' SRC='/budgetWeb/html/js/en/common/travel_agent_array.js' TYPE='text/javascript'><\/SCR" + "IPT>");
  
} else if( document.location.search.indexOf("freqrenter") != -1 || 
           document.location.pathname.indexOf("freqrenter") != -1 ||
           document.location.search.indexOf("budgetBusinessProgramInfo") != -1 || 
           document.location.search.indexOf("smallbiz") != -1 || 
           document.location.pathname.indexOf("MRAletter") != -1 ||
           document.location.pathname.indexOf("smallbiz") != -1 ||
           document.location.pathname.indexOf("findbcn") != -1 ){
  headerTitle = 'frequent renter';
  headerLink = '/budgetWeb/profile/frequentrenter.ex?action=frequentRenter';
  document.write("<SCR" + "IPT LANGUAGE='JavaScript1.2' SRC='/budgetWeb/html/js/en/common/frequent_renter_array.js' TYPE='text/javascript'><\/SCR" + "IPT>");

}
}
var doCreateLink = true;
if (document.location.pathname.indexOf(headerLink) != -1) {
  doCreateLink = false;
}

document.write('<table width=175 border=0 cellpadding=0 cellspacing=0><tr><td width=7><img src=\"/budgetWeb/images/common/side_nav_left_01.gif\" width=7 height=25></td>');
document.write('<td width=161 background=\"/budgetWeb/images/common/side_nav_center_01.gif\" class=elvnPxWht><strong>');
if(headerLink != '' && doCreateLink) {
  document.write('<a href='+headerLink+' class=elvnPxWht>');
}
document.write(headerTitle);
if(headerLink != '' && doCreateLink) {
  document.write('</a>');
}
document.write('</strong></td>');
document.write('<td width=7><img src=\"/budgetWeb/images/common/side_nav_right_01.gif\" width=7 height=25></td></tr></table>');


