/* [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','6301',jdecode('Home'),jdecode(''),'/6301.html','true',[],''],
	['PAGE','7001',jdecode('Rentals'),jdecode(''),'/7001.html','true',[],''],
	['PAGE','7106',jdecode('New+Vehicles'),jdecode(''),'/7106/index.html','true',[ 
		['PAGE','6352',jdecode('Utility+Cars'),jdecode(''),'/7106/6352.html','true',[],''],
		['PAGE','6373',jdecode('Golf+Cars'),jdecode(''),'/7106/6373.html','true',[],''],
		['PAGE','6394',jdecode('Personal+Transport+Vehicle'),jdecode(''),'/7106/6394.html','true',[],''],
		['PAGE','6415',jdecode('People+Movers'),jdecode(''),'/7106/6415.html','true',[],''],
		['PAGE','7127',jdecode('Food+%26+Beverage+Cars'),jdecode(''),'/7106/7127.html','true',[],'']
	],''],
	['PAGE','6436',jdecode('Custom+Vehicles'),jdecode(''),'/6436.html','true',[],''],
	['PAGE','15801',jdecode('Refurbished+vehicles'),jdecode(''),'/15801.html','true',[],''],
	['PAGE','6457',jdecode('Used+Vehicles'),jdecode(''),'/6457.html','true',[],''],
	['PAGE','6478',jdecode('Car+Accessories'),jdecode(''),'/6478.html','true',[],''],
	['PAGE','7401',jdecode('Why+YAMAHA'),jdecode(''),'/7401.html','true',[],''],
	['PAGE','6499',jdecode('Our+services'),jdecode(''),'/6499/index.html','true',[ 
		['PAGE','6520',jdecode('Financing+%2F+Leasing'),jdecode(''),'/6499/6520.html','true',[],''],
		['PAGE','6583',jdecode('New+Car+Warranty'),jdecode(''),'/6499/6583.html','true',[],''],
		['PAGE','7148',jdecode('Used+Car+Warranty'),jdecode(''),'/6499/7148.html','true',[],'']
	],''],
	['PAGE','6625',jdecode('Contact+us+%2F+Directions'),jdecode(''),'/6625.html','true',[],''],
	['PAGE','6646',jdecode('About+us'),jdecode(''),'/6646.html','true',[],'']];
var siteelementCount=19;
theSitetree.topTemplateName='Toronto';
theSitetree.paletteFamily='3358C6';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='16898';
theSitetree.graphicsetId='12318';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='3358C6';
var theTemplate={
				name: 			'Toronto',
				paletteFamily: 	'3358C6',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'16898',
				graphicsetId: 	'12318',
				contentColor: 	'FFFFFF',
				contentBGColor: '3358C6',
				hasFlashNavigation: 'true',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'true',
				hasCompanyname: 'false',
				a_color: 		'3358C6',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6301',
internalId:  '',
customField: '20090310-005245'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7001',
internalId:  '',
customField: '20090310-002418'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7106',
internalId:  '',
customField: '20090203-010223'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6436',
internalId:  '',
customField: '20090120-170114'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6352',
internalId:  '',
customField: '20090310-005442'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6373',
internalId:  '',
customField: '20090122-010037'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6394',
internalId:  '',
customField: '20090122-012925'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6415',
internalId:  '',
customField: '20090122-010347'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7127',
internalId:  '',
customField: '20090122-012834'
};
webappMappings['1501']=webappMappings['1501-3497616']={
webappId:    '1501',
documentId:  '6301',
internalId:  '3497616',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6625',
internalId:  '',
customField: '20090127-004642'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '6301',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6457',
internalId:  '',
customField: '20090403-181635'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6478',
internalId:  '',
customField: '20090310-005839'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7401',
internalId:  '',
customField: '20090310-010111'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6499',
internalId:  '',
customField: '20090127-014549'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6520',
internalId:  '',
customField: '20090310-012402'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6583',
internalId:  '',
customField: '20090120-170114'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7148',
internalId:  '',
customField: '20090120-171733'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15801',
internalId:  '',
customField: '20090403-184211'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6646',
internalId:  '',
customField: '20090310-005312'
};
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050INVFAX';
var companyName   = 'Mountain+Golf+%26+Utility+Cars';
var htmlTitle	  = 'YAMAHA+Mountain+Golf+%26+Utility+Cars';
var metaKeywords  = 'golf%2C+cart%2Crent%2C+rental';
var metaContents  = 'golf+car%2C+utility+car';
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();
};

