/* [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','15601',jdecode('Home'),jdecode(''), jdecode('%2F15601.html'), 'true',[],'',''],
	['PAGE','17001',jdecode('Baby+Gift+Baskets'),jdecode(''), jdecode('%2F17001.html'), 'true',[],'',''],
	['PAGE','15652',jdecode('Birthday+Gift+Baskets'),jdecode(''), jdecode('%2F15652.html'), 'true',[],'',''],
	['PAGE','15673',jdecode('Chocolate%2FSweet+Baskets'),jdecode(''), jdecode('%2F15673.html'), 'true',[],'',''],
	['PAGE','15694',jdecode('Coffee+%26+Tea+Baskets'),jdecode(''), jdecode('%2F15694.html'), 'true',[],'',''],
	['PAGE','15715',jdecode('Custom+Gift+Baskets'),jdecode(''), jdecode('%2F15715.html'), 'true',[],'',''],
	['PAGE','15736',jdecode('For+The+Guys+Gift+Baskets'),jdecode(''), jdecode('%2F15736.html'), 'true',[],'',''],
	['PAGE','15757',jdecode('Fruit%2FHealthy+Gift+Baskets'),jdecode(''), jdecode('%2F15757.html'), 'true',[],'',''],
	['PAGE','15778',jdecode('Get+Well+Gift+Baskets'),jdecode(''), jdecode('%2F15778.html'), 'true',[],'',''],
	['PAGE','15799',jdecode('Gourmet+Gift+Baskets'),jdecode(''), jdecode('%2F15799.html'), 'true',[],'',''],
	['PAGE','15820',jdecode('Holiday%2FSeasonal+Baskets'),jdecode(''), jdecode('%2F15820.html'), 'true',[],'',''],
	['PAGE','15841',jdecode('Housewarming+Baskets'),jdecode(''), jdecode('%2F15841.html'), 'true',[],'',''],
	['PAGE','15862',jdecode('Kids+Gift+Baskets'),jdecode(''), jdecode('%2F15862.html'), 'true',[],'',''],
	['PAGE','15883',jdecode('Montana+Gift+Baskets'),jdecode(''), jdecode('%2F15883.html'), 'true',[],'',''],
	['PAGE','15904',jdecode('Snacks+%26+Fun+Gift+Baskets'),jdecode(''), jdecode('%2F15904.html'), 'true',[],'',''],
	['PAGE','23401',jdecode('About+us'),jdecode(''), jdecode('%2F23401.html'), 'true',[],'',''],
	['PAGE','15967',jdecode('Contact+Us'),jdecode(''), jdecode('%2F15967.html'), 'true',[],'',''],
	['PAGE','15946',jdecode('Delivery+service'),jdecode(''), jdecode('%2F15946.html'), 'true',[],'',''],
	['PAGE','16030',jdecode('Door+Prizes%2FAuction+Items'),jdecode(''), jdecode('%2F16030.html'), 'true',[],'',''],
	['PAGE','16072',jdecode('FAQs'),jdecode(''), jdecode('%2F16072.html'), 'true',[],'',''],
	['PAGE','16009',jdecode('Links'),jdecode(''), jdecode('%2F16009.html'), 'true',[],'',''],
	['PAGE','15925',jdecode('Ordering+Information'),jdecode(''), jdecode('%2F15925.html'), 'true',[],'',''],
	['PAGE','15988',jdecode('Specialty+Services'),jdecode(''), jdecode('%2F15988.html'), 'true',[],'',''],
	['PAGE','16051',jdecode('Testimonials'),jdecode(''), jdecode('%2F16051.html'), 'true',[],'','']];
var siteelementCount=24;
theSitetree.topTemplateName='Blossom';
theSitetree.paletteFamily='AC2E53';
theSitetree.keyvisualId='7136';
theSitetree.keyvisualName='kv_7136.jpg';
theSitetree.fontsetId='16395';
theSitetree.graphicsetId='12128';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='E5E2E2';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'hostway_generic',
  product: 'WSCSYSSSSLYTC245'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Blossom',
				paletteFamily: 	'AC2E53',
				keyvisualId: 	'7136',
				keyvisualName: 	'kv_7136.jpg',
				fontsetId: 		'16395',
				graphicsetId: 	'12128',
				contentColor: 	'000000',
				contentBGColor: 'E5E2E2',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15601',
internalId:  '',
customField: '20120219-133332'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15673',
internalId:  '',
customField: '20111224-171746'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17001',
internalId:  '',
customField: '20111224-171552'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15652',
internalId:  '',
customField: '20111224-171659'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15694',
internalId:  '',
customField: '20120130-183920'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15715',
internalId:  '',
customField: '20120219-142020'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15736',
internalId:  '',
customField: '20120117-103015'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15757',
internalId:  '',
customField: '20111224-172458'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15778',
internalId:  '',
customField: '20111224-172705'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15799',
internalId:  '',
customField: '20111224-172849'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15820',
internalId:  '',
customField: '20120219-135009'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15841',
internalId:  '',
customField: '20111224-173350'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15862',
internalId:  '',
customField: '20111224-173511'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15883',
internalId:  '',
customField: '20120203-184107'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15904',
internalId:  '',
customField: '20111224-184025'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15925',
internalId:  '',
customField: '20120123-110520'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15946',
internalId:  '',
customField: '20120219-135750'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15967',
internalId:  '',
customField: '20111224-184535'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15988',
internalId:  '',
customField: '20110901-195245'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16009',
internalId:  '',
customField: '20120219-142901'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16030',
internalId:  '',
customField: '20101230-235438'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16051',
internalId:  '',
customField: '20120105-174416'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16072',
internalId:  '',
customField: '20111224-171428'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23401',
internalId:  '',
customField: '20120219-142459'
};
var webAppHostname = 'cgi-wsc.chi.us.siteprotect.com:80';
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050INZHCU';
var companyName   = 'Garden+City+Gift+Baskets';
var htmlTitle	  = 'Garden+City+Gift+Baskets+of+Missoula%2C+Montana';
var metaKeywords  = 'Montana+gift+baskets%0D%0A%0D%0AMissoula+gift+baskets%0D%0A%0D%0AMissoula+delivery%0D%0A%0D%0ACommunity+Medical+Center+gift+delivery%0D%0A%0D%0ASt.+Patrick+Hospital+gift+delivery%0D%0A%0D%0ACustom+gift+baskets%0D%0A%0D%0A';
var metaContents  = 'Specializing+in+custom+gift+baskets+made+in+Missoula%2C+Montana.++We+take+wonderful+gourmet+food+products+and+combine+them+with+eye-catching+enhancements+to+make+fabulous+gift+baskets+that+work+as+personal+and+business+gifts+for+any+time+of+the+year.';
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();
};

