/* [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','1401',jdecode('Home'),jdecode(''),'/1401.html','true',[],'',''],
	['PAGE','93701',jdecode('Gallery'),jdecode(''),'/93701/index.html','true',[ 
		['PAGE','150801',jdecode('Gallery+II'),jdecode(''),'/93701/150801.html','true',[],'','']
	],'',''],
	['PAGE','8164',jdecode('Delivery+%26+Pick+Ups'),jdecode(''),'/8164.html','true',[],'',''],
	['PAGE','3190',jdecode('Contact+Us'),jdecode(''),'/3190/index.html','true',[ 
		['PAGE','80201',jdecode('Blow+It+Up%21+Feedback+%28follow+up+page%29'),jdecode(''),'/3190/80201.html','false',[],'','']
	],'',''],
	['PAGE','76343',jdecode('Links'),jdecode(''),'/76343.html','true',[],'',''],
	['PAGE','17801',jdecode('Comments%2FFeedback'),jdecode(''),'/17801.html','false',[],'','']];
var siteelementCount=8;
theSitetree.topTemplateName='Card';
theSitetree.paletteFamily='669900';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='427';
theSitetree.graphicsetId='482';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Card',
				paletteFamily: 	'669900',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'427',
				graphicsetId: 	'482',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'FFFFFF',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1401',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-907036']={
webappId:    '1501',
documentId:  '1401',
internalId:  '907036',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1401',
internalId:  '',
customField: '20101227-210141'
};
webappMappings['7060']=webappMappings['7060-153bd0278b7996c7e5f3a0ef013028c3']={
webappId:    '7060',
documentId:  '93701',
internalId:  '153bd0278b7996c7e5f3a0ef013028c3',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '93701',
internalId:  '',
customField: '20080308-081419'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '150801',
internalId:  '',
customField: '20080308-081641'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8164',
internalId:  '',
customField: '20101227-205340'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3190',
internalId:  '',
customField: '20101227-205658'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '80201',
internalId:  '',
customField: '20070224-174559'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '76343',
internalId:  '',
customField: '20101227-205926'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17801',
internalId:  '',
customField: '20080122-162848'
};
webappMappings['7060']=webappMappings['7060-c95ec7ae13a24ff80eaed7fd73f5fd3a']={
webappId:    '7060',
documentId:  '150801',
internalId:  'c95ec7ae13a24ff80eaed7fd73f5fd3a',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-62527f2bcf5eeb6463b4fc5dad3af5a0']={
webappId:    '7060',
documentId:  '150801',
internalId:  '62527f2bcf5eeb6463b4fc5dad3af5a0',
customField: 'language:en;country:US;'
};
var canonHostname = 'wsc-worker01.chi.us.siteprotect.com';
var accountId     = 'AHW050INEWVK';
var companyName   = 'Blow+It+Up+Balloons+%26+Gifts';
var htmlTitle	  = 'Blow+It+Up+Balloons+and+Gifts';
var metaKeywords  = 'balloons%2C+centerpieces%2C+candy+bouquets%2C+favors%2C+party+supplies%2C+candy+buffets%2C+Beachwood+Ohio%2C+Cleveland+Ohio%2C+Delivery%2C+Special+Event+Decoration%2C+Gallery%2C+Balloon+Bouquets%2C+Balloons+in+a+box%2C+gifts%2C+invitations%2C+all+occasions%2C+all+budgets%2C+party+needs%2C+birthday%2C+wedding%2C+baby+shower%2C+bridal+shower%2C+prom%2C+graduation%2C+anniversary%2C+retirement%2C+reunion%2C+bar+mitzvah%2C+bat+mitzvah%2C+holidays%2C+chocolate%2C+gift+baskets%2C+custom+decorations%2C+cookies%2C+candy%2C+personalized%2C+';
var metaContents  = '';
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();
};

