/* [nodename, id, name, navigationtext, href, isnavigation, childs[], templatename] */

if (typeof(decodeURIComponent) == 'undefined') {
  decodeURIComponent = function(s) {
    return unescape(s);
  }
}

function jdecode(s) {
    s = s.replace(/\+/g, "%20")
    return decodeURIComponent(s);
}

var POS_NODENAME=0;
var POS_ID=1;
var POS_NAME=2;
var POS_NAVIGATIONTEXT=3;
var POS_HREF=4;
var POS_ISNAVIGATION=5;
var POS_CHILDS=6;
var POS_TEMPLATENAME=7;
var theSitetree=[ 
	['PAGE','42901',jdecode('Free+Price+Check'),jdecode(''),'/42901.html','true',[],''],
	['PAGE','1801',jdecode('What+we+do'),jdecode(''),'/1801.html','true',[],''],
	['PAGE','32601',jdecode('How+it+works'),jdecode(''),'/32601.html','true',[],''],
	['PAGE','6843',jdecode('Contact'),jdecode(''),'/6843.html','true',[],''],
	['PAGE','41501',jdecode('Purchase+%2417.95'),jdecode(''),'/41501.html','false',[],''],
	['PAGE','93801',jdecode('Purchase+%2429.95'),jdecode(''),'/93801.html','false',[],''],
	['PAGE','6801',jdecode('Purchase+%2449.95'),jdecode(''),'/6801.html','false',[],'']];
var siteelementCount=7;
theSitetree.topTemplateName='Simple';
theSitetree.paletteFamily='EAD8C1';
theSitetree.keyvisualId='2579';
theSitetree.keyvisualName='transport.jpg';
theSitetree.fontsetId='10346';
theSitetree.graphicsetId='10458';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='ead8c1';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Simple',
				paletteFamily: 	'EAD8C1',
				keyvisualId: 	'2579',
				keyvisualName: 	'transport.jpg',
				fontsetId: 		'10346',
				graphicsetId: 	'10458',
				contentColor: 	'000000',
				contentBGColor: 'ead8c1',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'857157',
				e_color: 		'FFFFFF',
				f_color: 		'817E7E',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1801',
internalId:  '',
customField: '20100407-183143'
};
webappMappings['7008']=webappMappings['7008-1512']={
webappId:    '7008',
documentId:  '6843',
internalId:  '1512',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6801',
internalId:  '',
customField: '20090516-083316'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6843',
internalId:  '',
customField: '20100407-182345'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32601',
internalId:  '',
customField: '20100407-181855'
};
webappMappings['7008']=webappMappings['7008-4794']={
webappId:    '7008',
documentId:  '42901',
internalId:  '4794',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '93801',
internalId:  '',
customField: '20090516-083301'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41501',
internalId:  '',
customField: '20091014-182436'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42901',
internalId:  '',
customField: '20100414-194427'
};
var canonHostname = 'cmworker02.yourhostingaccount.com';
var accountId     = 'AENDU0IN2DXI';
var companyName   = 'RENTAL+CAR+MAGIC%3A+Your+Lowest+Price.+Delivered.';
var htmlTitle	  = 'Rental+Car+Magic';
var metaKeywords  = 'compare+car+rental+prices%2C+rental+car+prices%2C+florida+car+rental%2C+rental+car+discount+code+coupon%2C+national+car+rental+discount+code%2C+national+car+rental+discount+coupon%2C+best+car+rental+prices%2C+best+rental+car+prices%2C+airport+rental+car+discount%2C+discount+florida+car+rental%2C+florida+car+car+rental%2C+discount+car+rental+florida%2C+rental+car+magic%2C+rental%2C+car%2C+magic%2C+rental+car%2C+car+rental%2C+discounts%2C+rate%2C+coupons%2C+promotion+codes%2C+discount+codes%2C+reduced+rates%2C+rate+worry%2C+email+alerts%2C+rental+car+magic%2C+personalized+rental+car+rate+tracking%2C+personalized+rental+car+rate+monitoring%2C+rental+car+rate+monitor%2C+rate+comparison%2C+discount+auto+rates%2C+NATIONAL+CAR+RENTAL%2C+THRIFTY%2C+ALAMO%2C+ENTERPRISE%2C+HERTZ%2C+AVIS%2C+DOLLAR%2C+BUDGET%2C+RENTAL+CAR%2C+CAR+RENTAL%2C+RENTAL+CARS%2C+FLORIDA+RENTAL+CARS%2C+FLORIDA+CAR+RENTALS%2C+DISCOUNTS%2C+ORLANDO%2C+TAMPA%2C+FORT+LAUDERDALE%2C+AIRPORT%2C+COMPARE+RATES%2C+RENTAL+CAR+PROMOTIONS%2C+CHEAP+RATES%2C+CAR+RENTAL+DEALS%2C+RENTAL+CAR+DEALS%2C+CAR+HIRE%2C+CHEAP+CAR+RENTAL%2C+CAR+RENTAL+DISCOUNT+CODE%2C+CAR+RENTAL+CODES%2C+BEST+CAR+RENTAL+RATES%2C+RENTAL+CAR+FLORIDA%2C+FL+RENTAL+CAR%2C+MCO%2C+RSW%2C+FLL%2C+TPA%2C+SRQ%2C+BDL%2C+SAN%2C+SFO%2C+PHX%2C+SLC%2C+MKE%2C+CMH%2C+OGG%2C+MIA%2C+BOS%2C+PHL%2C+OMA%2C+DAB%2C+DFW%2C+LAX%2C+ALB%2C+RDU%2C+MYR%2C+JAX%2C+HNL%2C+SUU%2C+SEA%2C+AUS%2C+YYC%2C+PBI%2C+PNS%2C+MSN%2C+SMF%2C+APF%2C+OCF%2C+IAH%2C+TUS%2C+PIT%2C+BOI%2C+BWI%2C+JAN%2C+MDW%2C+SRQ%2C+SDF%2C+PSP%2C+LGB%2C+SJC%2C+LAS%2C+SEA%2C+PIT%2C+PIE%2C+MSP%2C+JAX%2C+SBY%2C+ATL%2C+BTV%2C+YXX%2C+GEG%2C+SAT%2C+ORD%2C+ONT%2C+ASE%2C+TYS%2C+ATC%2C+CLT%2C+STL%2C+RDU%2C+STX%2C+ORF%2C+PNS%2C+FAT%2C+MSO%2C+BOI%2C+HOU%2C+DAL%2C+HRL%2C+GNV%2C+YUM%2C+SAV%2C+CLE%2C+MCI%2C+ABQ%2C+ISP%2C+KOA%2C+best+car+rental+prices';
var metaContents  = 'compare+car+rental+prices%2C+rental+car+prices%2C+florida+car+rental%2C+rental+car+discount+code+coupon%2C+national+car+rental+discount+code%2C+national+car+rental+discount+coupon%2C+best+car+rental+prices%2C+best+rental+car+prices%2C+airport+rental+car+discount%2C+discount+florida+car+rental%2C+florida+car+car+rental%2C+discount+car+rental+florida%2C+rental+car+magic%2C+rental%2C+car%2C+magic%2C+rental+car%2C+car+rental%2C+discounts%2C+rate%2C+coupons%2C+promotion+codes%2C+discount+codes%2C+reduced+rates%2C+rate+worry%2C+email+alerts%2C+rental+car+magic%2C+personalized+rental+car+rate+tracking%2C+personalized+rental+car+rate+monitoring%2C+rental+car+rate+monitor%2C+rate+comparison%2C+discount+auto+rates%2C+NATIONAL+CAR+RENTAL%2C+THRIFTY%2C+ALAMO%2C+ENTERPRISE%2C+HERTZ%2C+AVIS%2C+DOLLAR%2C+BUDGET%2C+RENTAL+CAR%2C+CAR+RENTAL%2C+RENTAL+CARS%2C+FLORIDA+RENTAL+CARS%2C+FLORIDA+CAR+RENTALS%2C+DISCOUNTS%2C+ORLANDO%2C+TAMPA%2C+FORT+LAUDERDALE%2C+AIRPORT%2C+COMPARE+RATES%2C+RENTAL+CAR+PROMOTIONS%2C+CHEAP+RATES%2C+CAR+RENTAL+DEALS%2C+RENTAL+CAR+DEALS%2C+CAR+HIRE%2C+CHEAP+CAR+RENTAL%2C+CAR+RENTAL+DISCOUNT+CODE%2C+CAR+RENTAL+CODES%2C+BEST+CAR+RENTAL+RATES%2C+RENTAL+CAR+FLORIDA%2C+FL+RENTAL+CAR%2C+MCO%2C+RSW%2C+FLL%2C+TPA%2C+SRQ%2C+BDL%2C+SAN%2C+SFO%2C+PHX%2C+SLC%2C+MKE%2C+CMH%2C+OGG%2C+MIA%2C+BOS%2C+PHL%2C+OMA%2C+DAB%2C+DFW%2C+LAX%2C+ALB%2C+RDU%2C+MYR%2C+JAX%2C+HNL%2C+SUU%2C+SEA%2C+AUS%2C+YYC%2C+PBI%2C+PNS%2C+MSN%2C+SMF%2C+APF%2C+OCF%2C+IAH%2C+TUS%2C+PIT%2C+BOI%2C+BWI%2C+JAN%2C+MDW%2C+SRQ%2C+SDF%2C+PSP%2C+LGB%2C+SJC%2C+LAS%2C+SEA%2C+PIT%2C+PIE%2C+MSP%2C+JAX%2C+SBY%2C+ATL%2C+BTV%2C+YXX%2C+GEG%2C+SAT%2C+ORD%2C+ONT%2C+ASE%2C+TYS%2C+ATC%2C+CLT%2C+STL%2C+RDU%2C+STX%2C+ORF%2C+PNS%2C+FAT%2C+MSO%2C+BOI%2C+HOU%2C+DAL%2C+HRL%2C+GNV%2C+YUM%2C+SAV%2C+CLE%2C+MCI%2C+ABQ%2C+ISP%2C+KOA%2C+best+car+rental+prices';
theSitetree.getById = function(id, ar) {
	if (typeof(ar) == 'undefined'){
		ar = this;
	}
	for (var i=0; i < ar.length; i++) {
		if (ar[i][POS_ID] == id){
			return ar[i];
		}
		if (ar[i][POS_CHILDS].length > 0) {
			var result=this.getById(id, ar[i][POS_CHILDS]);
			if (result != null){
				return result;
			}
		}
	}
	return null;
};

theSitetree.getParentById = function(id, ar) {
	if (typeof(ar) == 'undefined'){
		ar = this;
	}
	for (var i=0; i < ar.length; i++) {
		for (var j = 0; j < ar[i][POS_CHILDS].length; j++) {
			if (ar[i][POS_CHILDS][j][POS_ID] == id) {
				// child found
				return ar[i];
			}
			var result=this.getParentById(id, ar[i][POS_CHILDS]);
			if (result != null){
				return result;
			}
		}
	}
	return null;
};

theSitetree.getName = function(id) {
	var elem = this.getById(id);
	if (elem != null){
		return elem[POS_NAME];
	}
	return null;
};

theSitetree.getNavigationText = function(id) {
	var elem = this.getById(id);
	if (elem != null){
		return elem[POS_NAVIGATIONTEXT];
	}
	return null;
};

theSitetree.getHREF = function(id) {
	var elem = this.getById(id);
	if (elem != null){
		return elem[POS_HREF];
	}
	return null;
};

theSitetree.getIsNavigation = function(id) {
	var elem = this.getById(id);
	if (elem != null){
		return elem[POS_ISNAVIGATION];
	}
	return null;
};

theSitetree.getTemplateName = function(id, lastTemplateName, ar) {
	if (typeof(lastTemplateName) == 'undefined'){
		lastTemplateName = this.topTemplateName;
	}
	if (typeof(ar) == 'undefined'){
		ar = this;
	}
	for (var i=0; i < ar.length; i++) {
		var actTemplateName = ar[i][POS_TEMPLATENAME];
		if (actTemplateName == ''){
			actTemplateName = lastTemplateName;
		}
		if (ar[i][POS_ID] == id) {
			return actTemplateName;
		}
		if (ar[i][POS_CHILDS].length > 0) {
			var result=this.getTemplateName(id, actTemplateName, ar[i][POS_CHILDS]);
			if (result != null){
				return result;
			}
		}
	}
	return null;
};

theSitetree.getByXx = function(lookup, xx, ar) {
    if (typeof(ar) == 'undefined'){
    	ar = this;
    }
    for (var i=0; i < ar.length; i++) {
        if (ar[i][xx] == lookup){
        	return ar[i];
        }
        if (ar[i][POS_CHILDS].length > 0) {
        	var result=this.getByXx(lookup, xx, ar[i][POS_CHILDS]);
            if (result != null){
                return result;
               }
        }
    }
    return null;
};

function gotoPage(lookup) {
	if(__path_prefix__ == "/servlet/CMServeRES" && typeof (changePage) == 'function'){
		changePage(lookup);
		return;
	}
	var page = theSitetree.getHREF(lookup);
	if (!page) {
		var testFor = [ POS_NAME, POS_NAVIGATIONTEXT ];
		for (var i=0 ; i < testFor.length ; i++) {
			var p = theSitetree.getByXx(lookup, testFor[i]);
			if (p != null) {
				page = p[POS_HREF];
				break;
			}
		}
	}
	document.location.href = (new URL(__path_prefix__ + page, true, true)).toString();
};
