/* [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','1801',jdecode('Home'),jdecode(''),'/1801.html','true',[],'',''],
	['PAGE','1852',jdecode('Absolute+Nails'),jdecode(''),'/1852.html','true',[],'',''],
	['PAGE','1873',jdecode('ALLSTATE+INSURANCE'),jdecode(''),'/1873.html','true',[],'',''],
	['PAGE','1894',jdecode('Capehart+Floral'),jdecode(''),'/1894.html','true',[],'',''],
	['PAGE','1915',jdecode('Creative+Daycare'),jdecode(''),'/1915.html','true',[],'',''],
	['PAGE','10701',jdecode('United+Support'),jdecode(''),'/10701.html','true',[],'',''],
	['PAGE','1957',jdecode('Mama+Alvino%26%23x27%3Bs'),jdecode(''),'/1957.html','true',[],'',''],
	['PAGE','1978',jdecode('O%26%23x27%3BBanions+Sport+Bar'),jdecode(''),'/1978.html','true',[],'',''],
	['PAGE','1999',jdecode('Capehart+Hair+Salon'),jdecode(''),'/1999.html','true',[],'',''],
	['PAGE','10722',jdecode('Space+for+Rent'),jdecode(''),'/10722.html','true',[],'',''],
	['PAGE','33512',jdecode('Events%2FDiscounts'),jdecode(''),'/33512/index.html','true',[ 
		['PAGE','33533',jdecode('Events'),jdecode(''),'/33512/33533.html','true',[],'',''],
		['PAGE','33554',jdecode('Discounts'),jdecode(''),'/33512/33554.html','true',[],'','']
	],'','']];
var siteelementCount=13;
theSitetree.topTemplateName='Borders';
theSitetree.paletteFamily='CECEA9';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10432';
theSitetree.graphicsetId='10772';
theSitetree.contentColor='692643';
theSitetree.contentBGColor='F3F9FC';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Borders',
				paletteFamily: 	'CECEA9',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10432',
				graphicsetId: 	'10772',
				contentColor: 	'692643',
				contentBGColor: 'F3F9FC',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1801',
internalId:  '',
customField: '20100801-135821'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1852',
internalId:  '',
customField: '20100801-133954'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1873',
internalId:  '',
customField: '20100321-132314'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1894',
internalId:  '',
customField: '20100605-111724'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1915',
internalId:  '',
customField: '20100605-112916'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1957',
internalId:  '',
customField: '20100605-114640'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1978',
internalId:  '',
customField: '20100318-032542'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1999',
internalId:  '',
customField: '20100801-134811'
};
webappMappings['7008']=webappMappings['7008-26675']={
webappId:    '7008',
documentId:  '10701',
internalId:  '26675',
customField: 'language:en;country:US;'
};
webappMappings['7008']=webappMappings['7008-26676']={
webappId:    '7008',
documentId:  '10722',
internalId:  '26676',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10701',
internalId:  '',
customField: '20100605-114155'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10722',
internalId:  '',
customField: '20100605-115949'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1801',
internalId:  '1006',
customField: '1006'
};
webappMappings['7008']=webappMappings['7008-28327']={
webappId:    '7008',
documentId:  '33512',
internalId:  '28327',
customField: 'language:en;country:US;'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '33533',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:true;'
};
webappMappings['1002']=webappMappings['1002-33554aendu0inl1ah']={
webappId:    '1002',
documentId:  '33554',
internalId:  '33554aendu0inl1ah',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33512',
internalId:  '',
customField: '20100809-034708'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33533',
internalId:  '',
customField: '20100523-133052'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33554',
internalId:  '',
customField: '20100523-133503'
};
var canonHostname = 'cmworker02.yourhostingaccount.com';
var accountId     = 'AENDU0INL1AH';
var companyName   = 'CAPEHART+SQUARE';
var htmlTitle	  = 'Capehart+Square+in+Bellevue';
var metaKeywords  = 'capehart+square+in+bellevue+ne%2C+nebraska%2C+bellevue+ne%2C+offutt+airforce+base%2C+retail+in+bellevue+ne%2C+city+of+bellevue+ne%2C+salon+in+bellevue+ne%2C+spa+bellevue+ne+%2C+pizza+bellevue+ne+%2C+subs%2C+bar+bellevue+ne%2C+childcare+bellevue+ne+%2C+capehart+bellevue+ne+%2C+allstate+bellevue+ne+%2C+united+support+bellevue+ne+%2C+nails+bellevue+ne+%2C+pedicure+bellevue+ne%2C+body+wrap+bellevue+ne%2C+federal+contracting+bellevue+ne%2C+united+support+usa%2C';
var metaContents  = 'Capehart+Square+a+retail+complex+close+to+Offutt+Air+Force+Base+in+Bellevue+Ne%2C+is+the+hot+spot+for+shopping+in+Bellevue%2C+Nebraska.+Great+location+for+affordable+shopping+pizza%2C+salon+spa%2C+nail+specialist%2C+childcare%2C+daycare%2C+allstate+insurance%2Cunited+support%2C++irish+bar%2C+and+more.';
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();
};

