/* [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','601',jdecode('Home'),jdecode(''),'/601.html','true',[],'',''],
	['PAGE','2101',jdecode('About+us'),jdecode(''),'/2101/index.html','true',[ 
		['PAGE','2122',jdecode('The+team'),jdecode(''),'/2101/2122.html','true',[],'','']
	],'',''],
	['PAGE','2143',jdecode('Cookie+Mixes'),jdecode(''),'/2143/index.html','true',[ 
		['PAGE','2164',jdecode('Collegiate+Cookies'),jdecode(''),'/2143/2164.html','true',[],'',''],
		['PAGE','2185',jdecode('Custom+Product'),jdecode(''),'/2143/2185.html','true',[],'',''],
		['PAGE','2206',jdecode('Garden+Collection'),jdecode(''),'/2143/2206.html','true',[],'',''],
		['PAGE','2227',jdecode('Northwest+Originals'),jdecode(''),'/2143/2227.html','true',[],'',''],
		['PAGE','2248',jdecode('Seattle+Themes'),jdecode(''),'/2143/2248.html','true',[],'',''],
		['PAGE','2269',jdecode('At+the+Beach'),jdecode(''),'/2143/2269.html','true',[],'',''],
		['PAGE','2290',jdecode('Holidays+and+Special+Occasions'),jdecode(''),'/2143/2290.html','true',[],'',''],
		['PAGE','2311',jdecode('Wildlife'),jdecode(''),'/2143/2311.html','true',[],'',''],
		['PAGE','2332',jdecode('States+and+Cities'),jdecode(''),'/2143/2332.html','true',[],'',''],
		['PAGE','2353',jdecode('Childrens+Assortment'),jdecode(''),'/2143/2353.html','true',[],'',''],
		['PAGE','2374',jdecode('Christmas+and+Winter'),jdecode(''),'/2143/2374.html','true',[],'',''],
		['PAGE','2395',jdecode('Animal+Lovers'),jdecode(''),'/2143/2395.html','true',[],'',''],
		['PAGE','2416',jdecode('Western+Themes'),jdecode(''),'/2143/2416.html','true',[],'',''],
		['PAGE','2437',jdecode('Down+South'),jdecode(''),'/2143/2437.html','true',[],'',''],
		['PAGE','2479',jdecode('Sports+and+Games'),jdecode(''),'/2143/2479.html','true',[],'','']
	],'',''],
	['PAGE','7437',jdecode('Personalized+Product'),jdecode(''),'/7437.html','true',[],'',''],
	['PAGE','2500',jdecode('Order+Product'),jdecode(''),'/2500.html','true',[],'',''],
	['PAGE','2521',jdecode('Contact'),jdecode(''),'/2521/index.html','true',[ 
		['PAGE','2542',jdecode('Adresses'),jdecode(''),'/2521/2542.html','true',[],'',''],
		['PAGE','2563',jdecode('How+to+find+us'),jdecode(''),'/2521/2563.html','true',[],'','']
	],'',''],
	['PAGE','2584',jdecode('Tips+%26+Tricks'),jdecode(''),'/2584.html','true',[],'',''],
	['PAGE','2605',jdecode('new'),jdecode(''),'/2605.html','true',[],'',''],
	['PAGE','7141',jdecode('Guestbook'),jdecode(''),'/7141/index.html','true',[ 
		['PAGE','7140',jdecode('Read+Guestbook'),jdecode(''),'/7141/7140.html','false',[],'','']
	],'','']];
var siteelementCount=28;
theSitetree.topTemplateName='Bombay';
theSitetree.paletteFamily='8B0B22';
theSitetree.keyvisualId='7533';
theSitetree.keyvisualName='kv_7533.jpg';
theSitetree.fontsetId='16584';
theSitetree.graphicsetId='12199';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='AEC6B8';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Bombay',
				paletteFamily: 	'8B0B22',
				keyvisualId: 	'7533',
				keyvisualName: 	'kv_7533.jpg',
				fontsetId: 		'16584',
				graphicsetId: 	'12199',
				contentColor: 	'000000',
				contentBGColor: 'AEC6B8',
				a_color: 		'8B0B22',
				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['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '601',
internalId:  '1006',
customField: '1006'
};
webappMappings['1002']=webappMappings['1002-7141ahw050in24a5']={
webappId:    '1002',
documentId:  '7141',
internalId:  '7141ahw050in24a5',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '601',
internalId:  '',
customField: '20091130-102319'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2143',
internalId:  '',
customField: '20091130-102409'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2164',
internalId:  '',
customField: '20081130-114441'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2185',
internalId:  '',
customField: '20090102-211241'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7437',
internalId:  '',
customField: '20091130-102509'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2206',
internalId:  '',
customField: '20090102-211407'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2227',
internalId:  '',
customField: '20090102-211449'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2248',
internalId:  '',
customField: '20090102-211648'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2269',
internalId:  '',
customField: '20090102-211812'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2101',
internalId:  '',
customField: '20090102-211153'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2122',
internalId:  '',
customField: '20090102-211212'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2584',
internalId:  '',
customField: '20080520-111017'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2521',
internalId:  '',
customField: '20090102-212440'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2500',
internalId:  '',
customField: '20090102-212327'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2290',
internalId:  '',
customField: '20081130-120032'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2311',
internalId:  '',
customField: '20081130-120151'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2332',
internalId:  '',
customField: '20081130-120406'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2353',
internalId:  '',
customField: '20081130-120527'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2374',
internalId:  '',
customField: '20090102-212042'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2395',
internalId:  '',
customField: '20090102-212108'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2416',
internalId:  '',
customField: '20081130-000553'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2437',
internalId:  '',
customField: '20081130-121918'
};
webappMappings['7008']=webappMappings['7008-675']={
webappId:    '7008',
documentId:  '2500',
internalId:  '675',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2479',
internalId:  '',
customField: '20081130-122811'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2542',
internalId:  '',
customField: '20080520-111017'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2563',
internalId:  '',
customField: '20081130-210027'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2605',
internalId:  '',
customField: '20080520-111017'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7141',
internalId:  '',
customField: '20080925-101801'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7140',
internalId:  '',
customField: '20080925-101801'
};
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050IN24A5';
var companyName   = 'Lets+Make+Cookies';
var htmlTitle	  = 'Lets+Make+Cookies';
var metaKeywords  = 'collegiate%2C+unique+gift%2C+cookie+mix%2C+cookie+cutters%2C+dog+treat+mix%2C+personalized+product%2C+custom+product%2C+promotional+product%2C+';
var metaContents  = 'Fun+Cookie+Mixes';
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();
};
