/* [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','239',jdecode('Home'),jdecode(''), jdecode('%2F239.html'), 'true',[],'',''],
	['PAGE','701',jdecode('Dates+of+Car+Show'),jdecode(''), jdecode('%2F701.html'), 'true',[],'',''],
	['PAGE','11101',jdecode('Special+Event+details'),jdecode(''), jdecode('%2F11101.html'), 'true',[],'',''],
	['PAGE','140467',jdecode('Message+Board'),jdecode(''), jdecode('%2F140467.html'), 'true',[],'',''],
	['PAGE','114767',jdecode('2012-Island+Cruisers+C.C.+Show+Flyer'),jdecode(''), jdecode('%2F114767.html'), 'true',[],'',''],
	['PAGE','116167',jdecode('2012-No+Boundries+C.C.+Show+Flyer'),jdecode(''), jdecode('%2F116167.html'), 'true',[],'',''],
	['PAGE','118567',jdecode('2012-Car+Show+Flyers+-+SoCal'),jdecode(''), jdecode('%2F118567.html'), 'true',[],'',''],
	['PAGE','148667',jdecode('2012-Car+shows+out+of+state+flyer'),jdecode(''), jdecode('%2F148667.html'), 'true',[],'',''],
	['PAGE','145467',jdecode('2011-photo+Dream+Cruise'),jdecode(''), jdecode('%2F145467.html'), 'true',[],'',''],
	['PAGE','119467',jdecode('2010+photo+Classic+Car+Show+'),jdecode(''), jdecode('%2F119467.html'), 'true',[],'',''],
	['PAGE','133867',jdecode('2010+photo+Halloween+Show%28Classics%29'),jdecode(''), jdecode('%2F133867.html'), 'true',[],'',''],
	['PAGE','134567',jdecode('2010+photo+Halloween+Show%28Scions%29'),jdecode(''), jdecode('%2F134567.html'), 'true',[],'',''],
	['PAGE','134588',jdecode('2010+photo+Halloween+Show%28PT%26%23x27%3Bs%29'),jdecode(''), jdecode('%2F134588.html'), 'true',[],'',''],
	['PAGE','137667',jdecode('2010+photo+Halloween+Awards'),jdecode(''), jdecode('%2F137667.html'), 'true',[],'',''],
	['PAGE','12801',jdecode('Join+Our+Club'),jdecode(''), jdecode('%2F12801.html'), 'true',[],'',''],
	['PAGE','113488',jdecode('Links+to+Friends'),jdecode(''), jdecode('%2F113488.html'), 'true',[],'',''],
	['PAGE','722',jdecode('Car+Picture+Album'),jdecode(''), jdecode('%2F722.html'), 'true',[],'',''],
	['PAGE','120267',jdecode('Vendors+-+open+to+see+who'),jdecode(''), jdecode('%2F120267%2Findex.html'), 'true',[ 
		['PAGE','113509',jdecode('Island+Cruiser+Awards+'),jdecode(''), jdecode('%2F120267%2F113509.html'), 'true',[],'',''],
		['PAGE','115867',jdecode('Trophy%2FPlaque+samples'),jdecode(''), jdecode('%2F120267%2F115867.html'), 'true',[],'','']
	],'',''],
	['PAGE','118588',jdecode('Items+For+Sale'),jdecode(''), jdecode('%2F118588.html'), 'true',[],'','']];
var siteelementCount=21;
theSitetree.topTemplateName='Angkor';
theSitetree.paletteFamily='879ED6';
theSitetree.keyvisualId='6878';
theSitetree.keyvisualName='kv_6878.jpg';
theSitetree.fontsetId='11212';
theSitetree.graphicsetId='12030';
theSitetree.contentColor='354B86';
theSitetree.contentBGColor='94AAE1';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'verizon',
  product: 'WSCSYSSSSLYTC245'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Angkor',
				paletteFamily: 	'879ED6',
				keyvisualId: 	'6878',
				keyvisualName: 	'kv_6878.jpg',
				fontsetId: 		'11212',
				graphicsetId: 	'12030',
				contentColor: 	'354B86',
				contentBGColor: '94AAE1',
				a_color: 		'94AAE1',
				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['5003']=webappMappings['5003-tid:1;pid:WSCSYSSSSLYTCPXC']={
webappId:    '5003',
documentId:  '239',
internalId:  'tid:1;pid:WSCSYSSSSLYTCPXC',
customField: 'en:US:'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '239',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '239',
internalId:  '',
customField: '20120109-182008'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '701',
internalId:  '',
customField: '20120115-184414'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11101',
internalId:  '',
customField: '20120115-185122'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12801',
internalId:  '',
customField: '20100827-232534'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '722',
internalId:  '',
customField: '20100827-232601'
};
webappMappings['7060']=webappMappings['7060-7fda9505d1cfe49501740ac3bfc7d527']={
webappId:    '7060',
documentId:  '722',
internalId:  '7fda9505d1cfe49501740ac3bfc7d527',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '113509',
internalId:  '',
customField: '20110516-204824'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '113488',
internalId:  '',
customField: '20101221-171205'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '115867',
internalId:  '',
customField: '20100827-231045'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '114767',
internalId:  '',
customField: '20120109-183400'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '116167',
internalId:  '',
customField: '20120109-183854'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '118588',
internalId:  '',
customField: '20101212-220024'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '118567',
internalId:  '',
customField: '20120109-183517'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '119467',
internalId:  '',
customField: '20101012-184139'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '120267',
internalId:  '',
customField: '20110526-183533'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '133867',
internalId:  '',
customField: '20101108-094743'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '134567',
internalId:  '',
customField: '20101108-164521'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '134588',
internalId:  '',
customField: '20101113-100152'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '137667',
internalId:  '',
customField: '20101119-205010'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '140467',
internalId:  '',
customField: '20120109-183200'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '145467',
internalId:  '',
customField: '20110409-145248'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '148667',
internalId:  '',
customField: '20120109-183637'
};
var webAppHostname = 'cgi-wsc.chi.us.siteprotect.com:80';
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050INVQX8';
var companyName   = 'I.E.+Island+Cruisers+Car+Club';
var htmlTitle	  = 'Car+Club';
var metaKeywords  = 'Cars+Meet+and+Greet+Awards+Car+shows+Events+PT+Cruisers+Trophies+sublimation+Plaques';
var metaContents  = 'Cars+Meet+and+Greet+Awards+Car+shows+Events+PT+Cruisers+Trophies+sublimation+Plaques';
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();
};

