/* [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','2101',jdecode('Home'),jdecode(''),'/2101.html','true',[],'',''],
	['PAGE','2152',jdecode('About+us'),jdecode(''),'/2152/index.html','true',[ 
		['PAGE','11201',jdecode('The+team'),jdecode(''),'/2152/11201.html','true',[],'','']
	],'',''],
	['PAGE','2194',jdecode('Services'),jdecode(''),'/2194/index.html','true',[ 
		['PAGE','2215',jdecode('Balloon+Decorations'),jdecode(''),'/2194/2215.html','true',[],'',''],
		['PAGE','2236',jdecode('Balloon+Bouquets'),jdecode(''),'/2194/2236.html','true',[],'',''],
		['PAGE','2257',jdecode('Other+Event+Services'),jdecode(''),'/2194/2257.html','true',[],'','']
	],'',''],
	['PAGE','2341',jdecode('Clients'),jdecode(''),'/2341.html','true',[],'',''],
	['PAGE','5801',jdecode('Accolades'),jdecode(''),'/5801.html','true',[],'',''],
	['PAGE','2278',jdecode('Contact'),jdecode(''),'/2278/index.html','true',[ 
		['PAGE','25616',jdecode('Contact+%28follow+up+page%29'),jdecode(''),'/2278/25616.html','true',[],'','']
	],'',''],
	['PAGE','23901',jdecode('Photo+Gallery'),jdecode(''),'/23901.html','true',[],'',''],
	['PAGE','26630',jdecode('Party+pictures'),jdecode(''),'/26630/index.html','false',[ 
		['PAGE','26639',jdecode('Party+1'),jdecode(''),'/26630/26639.html','true',[],'',''],
		['PAGE','26648',jdecode('Party+2'),jdecode(''),'/26630/26648.html','true',[],'',''],
		['PAGE','26657',jdecode('Party+3'),jdecode(''),'/26630/26657.html','true',[],'','']
	],'','']];
var siteelementCount=16;
theSitetree.topTemplateName='Court';
theSitetree.paletteFamily='B572C9';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='16443';
theSitetree.graphicsetId='12149';
theSitetree.contentColor='5D2F6A';
theSitetree.contentBGColor='F1C5FF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Court',
				paletteFamily: 	'B572C9',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'16443',
				graphicsetId: 	'12149',
				contentColor: 	'5D2F6A',
				contentBGColor: 'F1C5FF',
				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:     'true'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2101',
internalId:  '1006',
customField: '1006'
};
webappMappings['7060']=webappMappings['7060-821b07d12e35958c92d1a33495931d3d']={
webappId:    '7060',
documentId:  '23901',
internalId:  '821b07d12e35958c92d1a33495931d3d',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2101',
internalId:  '',
customField: '20100520-031031'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2152',
internalId:  '',
customField: '20091117-134927'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11201',
internalId:  '',
customField: '20091117-135032'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2194',
internalId:  '',
customField: '20091117-134910'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2215',
internalId:  '',
customField: '20091117-134753'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2236',
internalId:  '',
customField: '20091117-133439'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2257',
internalId:  '',
customField: '20091117-134252'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2341',
internalId:  '',
customField: '20091117-134854'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5801',
internalId:  '',
customField: '20091117-135117'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2278',
internalId:  '',
customField: '20091117-125340'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25616',
internalId:  '',
customField: '20081015-015339'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23901',
internalId:  '',
customField: '20091117-140436'
};
webappMappings['1501']=webappMappings['1501-2830734']={
webappId:    '1501',
documentId:  '2101',
internalId:  '2830734',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26630',
internalId:  '',
customField: '20090331-232257'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26639',
internalId:  '',
customField: '20090331-232257'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26648',
internalId:  '',
customField: '20090331-232257'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26657',
internalId:  '',
customField: '20090331-232257'
};
webappMappings['7008']=webappMappings['7008-8221']={
webappId:    '7008',
documentId:  '2278',
internalId:  '8221',
customField: 'language:en;country:US;'
};
var canonHostname = 'wsc-worker01.chi.us.siteprotect.com';
var accountId     = 'AHW050INE7ZS';
var companyName   = 'Creative+Event+Decor+%26+Deliveries';
var htmlTitle	  = 'BALLOONMANIA';
var metaKeywords  = 'balloon%2C+party%2C+birthdays%2C+bouquets%2C+decorations%2C+events%2C+weddings%2C+quinceaneras%2C+thanks%2C+holiday+parties%2C+advertising%2C+set+decorations%2C+kids%2C+arches%2C+centerpieces%2C+baby+showers%2C+christmas%2C+new+years%2C+dance+floor%2C+entrance%2C+stage%2C+corporate%2C+outdoor%2C+colums%2C+foils%2C+latex%2C+proms%2C+banquets';
var metaContents  = 'Party+and+event+decorations.++Balloons.++Birthday+parties.++Wedding+decor.+';
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();
};
