/* [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 POS_TARGET=8;
var theSitetree=[ 
	['PAGE','21501',jdecode('Home'),jdecode(''), jdecode('%2F21501.html'), 'true',[],'',''],
	['PAGE','22301',jdecode('Services'),jdecode(''), jdecode('%2F22301%2Findex.html'), 'true',[ 
		['PAGE','22322',jdecode('Choosing+a+Vehicle'),jdecode(''), jdecode('%2F22301%2F22322.html'), 'true',[],'',''],
		['PAGE','22401',jdecode('Providing+a+Vehicle'),jdecode(''), jdecode('%2F22301%2F22401.html'), 'true',[],'','']
	],'',''],
	['PAGE','22422',jdecode('Vehicles'),jdecode(''), jdecode('%2F22422%2Findex.html'), 'true',[ 
		['PAGE','22443',jdecode('Convertibles'),jdecode(''), jdecode('%2F22422%2F22443.html'), 'true',[],'',''],
		['PAGE','39301',jdecode('Closed+Cars'),jdecode(''), jdecode('%2F22422%2F39301.html'), 'true',[],'',''],
		['PAGE','22485',jdecode('Sports+Cars'),jdecode(''), jdecode('%2F22422%2F22485.html'), 'true',[],'',''],
		['PAGE','52401',jdecode('Wagons'),jdecode(''), jdecode('%2F22422%2F52401.html'), 'true',[],'',''],
		['PAGE','39322',jdecode('Trucks+%26+4x4%26%23x27%3Bs'),jdecode(''), jdecode('%2F22422%2F39322.html'), 'true',[],'',''],
		['PAGE','22527',jdecode('Small+Cars'),jdecode(''), jdecode('%2F22422%2F22527.html'), 'true',[],'',''],
		['PAGE','46901',jdecode('Muscle+Cars'),jdecode(''), jdecode('%2F22422%2F46901.html'), 'true',[],'',''],
		['PAGE','22506',jdecode('Racers+%26+%26%23x27%3BRods'),jdecode(''), jdecode('%2F22422%2F22506.html'), 'true',[],'',''],
		['PAGE','58201',jdecode('Motorcycles'),jdecode(''), jdecode('%2F22422%2F58201.html'), 'true',[],'',''],
		['PAGE','58222',jdecode('Miscellaneous'),jdecode(''), jdecode('%2F22422%2F58222.html'), 'true',[],'','']
	],'',''],
	['PAGE','22548',jdecode('Clients'),jdecode(''), jdecode('%2F22548.html'), 'true',[],'',''],
	['PAGE','22569',jdecode('About+Us'),jdecode(''), jdecode('%2F22569.html'), 'true',[],'',''],
	['PAGE','22611',jdecode('Contact'),jdecode(''), jdecode('%2F22611.html'), 'true',[],'','']];
var siteelementCount=18;
theSitetree.topTemplateName='Undulate';
theSitetree.paletteFamily='413D42';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='33124';
theSitetree.graphicsetId='14071';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='413D42';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'grp35-attweb',
  product: 'WSCSYSSSSLY0X9RC'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Undulate',
				paletteFamily: 	'413D42',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'33124',
				graphicsetId: 	'14071',
				contentColor: 	'FFFFFF',
				contentBGColor: '413D42',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21501',
internalId:  '',
customField: '20111120-233355'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22301',
internalId:  '',
customField: '20110509-023253'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22322',
internalId:  '',
customField: '20111120-233617'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22401',
internalId:  '',
customField: '20111120-233751'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22422',
internalId:  '',
customField: '20111120-210041'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22443',
internalId:  '',
customField: '20111229-031153'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39301',
internalId:  '',
customField: '20111229-034555'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22485',
internalId:  '',
customField: '20111229-034330'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22506',
internalId:  '',
customField: '20111120-204824'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22527',
internalId:  '',
customField: '20111213-003325'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22548',
internalId:  '',
customField: '20111121-000538'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22569',
internalId:  '',
customField: '20110627-221507'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22611',
internalId:  '',
customField: '20111121-000751'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '21501',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39322',
internalId:  '',
customField: '20111212-154614'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46901',
internalId:  '',
customField: '20111121-003453'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52401',
internalId:  '',
customField: '20111121-021835'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58201',
internalId:  '',
customField: '20111120-204944'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58222',
internalId:  '',
customField: '20111120-235531'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVFL30INPZ6D';
var companyName   = '++++++++++++++WHEELS++-+++Picture+Cars+for+Every+Need';
var htmlTitle	  = 'WHEELS-Cars-for-Film.com';
var metaKeywords  = 'prop+cars%2C+prop+car%2C+movie+cars%2C+movie+car%2C+movie+vehicles%2C+movie+vehicle%2C+picture+vehicles%2C+picture+vehicle%2C+film+cars%2C+film+car%2C+film+vehicles%2C+film+vehicle%2C+picture+cars%2C+picture+car%2C+prop+vehicles%2C+prop+vehicle%2C+San+Francisco%2C+Bay+area%2C+California%2C+San+Francisco+prop+cars%2C+San+Francisco+picture+cars%0D%0A';
var metaContents  = 'Wheels+is+a+picture+car+agency+that+sources+and+provides+prop+vehicles+of+any+type+from+any+era+for+photographers%2C+film+makers%2C+and+event+planners+in+the+greater+San+Francisco+Bay+Area.++With+over+500+vehicles+on+file%2C+and+a+vast+network+of+contacts+in+the+field+of+special+interest+cars%2C+we+can+save+you+time+and+find+you+the+car+you+need.+';
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();
};

