/* [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 theSitetree=[ 
	['PAGE','1701',jdecode('Home'),jdecode(''),'/1701.html','true',[],''],
	['PAGE','6501',jdecode('About+Sugar+Snaps'),jdecode(''),'/6501.html','true',[],''],
	['PAGE','36010',jdecode('Sugar+Snaps+Sweeties'),jdecode(''),'/36010.html','true',[],''],
	['PAGE','4601',jdecode('Newborn+Baby+Bows'),jdecode(''),'/4601.html','true',[],''],
	['PAGE','4622',jdecode('Clippies'),jdecode(''),'/4622.html','true',[],''],
	['PAGE','35401',jdecode('Toddler+Bows'),jdecode(''),'/35401.html','true',[],''],
	['PAGE','1752',jdecode('Big+Girl+Bows'),jdecode(''),'/1752.html','true',[],''],
	['PAGE','4643',jdecode('Curly+Cues'),jdecode(''),'/4643.html','true',[],''],
	['PAGE','35464',jdecode('Holiday+Bows'),jdecode(''),'/35464/index.html','true',[ 
		['PAGE','35569',jdecode('Valentine%26%23x27%3Bs+Day'),jdecode(''),'/35464/35569.html','true',[],''],
		['PAGE','35590',jdecode('St.+Patrick%E2%80%99s+Day'),jdecode(''),'/35464/35590.html','true',[],''],
		['PAGE','35611',jdecode('Easter+%26+Spring'),jdecode(''),'/35464/35611.html','true',[],''],
		['PAGE','35632',jdecode('4th+of+July+%26+Summer'),jdecode(''),'/35464/35632.html','true',[],''],
		['PAGE','35527',jdecode('Halloween'),jdecode(''),'/35464/35527.html','true',[],''],
		['PAGE','35485',jdecode('Thanksgiving+%26+Fall'),jdecode(''),'/35464/35485.html','true',[],''],
		['PAGE','35506',jdecode('Christmas+%26+Winter'),jdecode(''),'/35464/35506.html','true',[],''],
		['PAGE','35548',jdecode('New+Years+Eve'),jdecode(''),'/35464/35548.html','false',[],'']
	],''],
	['PAGE','4664',jdecode('Novelty+Bows'),jdecode(''),'/4664/index.html','true',[ 
		['PAGE','35653',jdecode('Animals'),jdecode(''),'/4664/35653.html','true',[],''],
		['PAGE','35674',jdecode('Bugs+%26+Insects'),jdecode(''),'/4664/35674.html','true',[],''],
		['PAGE','35695',jdecode('Flowers'),jdecode(''),'/4664/35695.html','true',[],''],
		['PAGE','48601',jdecode('Other+Fun+Bows'),jdecode(''),'/4664/48601.html','true',[],'']
	],''],
	['PAGE','35716',jdecode('Special+Occasion+Bows'),jdecode(''),'/35716/index.html','true',[ 
		['PAGE','35737',jdecode('Baptism'),jdecode(''),'/35716/35737.html','false',[],''],
		['PAGE','35758',jdecode('Birthday'),jdecode(''),'/35716/35758.html','true',[],''],
		['PAGE','35779',jdecode('Flower+Girl'),jdecode(''),'/35716/35779.html','false',[],''],
		['PAGE','35800',jdecode('Fancy'),jdecode(''),'/35716/35800.html','false',[],'']
	],''],
	['PAGE','35821',jdecode('School+Uniform+Bows'),jdecode(''),'/35821.html','true',[],''],
	['PAGE','35443',jdecode('Sports+%26+Activity+Bows'),jdecode(''),'/35443.html','false',[],''],
	['PAGE','47301',jdecode('Pony+Tail+Holders'),jdecode(''),'/47301.html','true',[],''],
	['PAGE','36601',jdecode('Puppy+Dog+Bows'),jdecode(''),'/36601.html','true',[],''],
	['PAGE','36643',jdecode('Sugar+Snaps+Accessories'),jdecode(''),'/36643/index.html','true',[ 
		['PAGE','36622',jdecode('Hair+Bow+Holders'),jdecode(''),'/36643/36622.html','true',[],''],
		['PAGE','4706',jdecode('Centerpieces+%26+Favors'),jdecode(''),'/36643/4706.html','true',[],'']
	],''],
	['PAGE','36664',jdecode('Special+Services'),jdecode(''),'/36664/index.html','true',[ 
		['PAGE','36685',jdecode('Bow-of-the-Month+Club'),jdecode(''),'/36664/36685.html','true',[],''],
		['PAGE','36706',jdecode('Closet+Analysis'),jdecode(''),'/36664/36706.html','true',[],''],
		['PAGE','35842',jdecode('Event+Planning'),jdecode(''),'/36664/35842.html','true',[],'']
	],''],
	['PAGE','11701',jdecode('Price+%26+Order+Infomation'),jdecode(''),'/11701/index.html','true',[ 
		['PAGE','35905',jdecode('Hairbow+Hardware'),jdecode(''),'/11701/35905.html','false',[],''],
		['PAGE','35926',jdecode('Ribbon+Color+Charts'),jdecode(''),'/11701/35926.html','false',[],''],
		['PAGE','35947',jdecode('Shipping+%26+Handling'),jdecode(''),'/11701/35947.html','false',[],''],
		['PAGE','36727',jdecode('Wholesale'),jdecode(''),'/11701/36727.html','false',[],'']
	],''],
	['PAGE','35968',jdecode('Photo+Galleries'),jdecode(''),'/35968/index.html','true',[ 
		['PAGE','35989',jdecode('Bows+to+Match+Outfits+'),jdecode(''),'/35968/35989.html','true',[],'']
	],'']];
var siteelementCount=45;
theSitetree.topTemplateName='Curve';
theSitetree.paletteFamily='E77070';
theSitetree.keyvisualId='5771';
theSitetree.keyvisualName='kv_5771.jpg';
theSitetree.fontsetId='11088';
theSitetree.graphicsetId='11860';
theSitetree.contentColor='B94949';
theSitetree.contentBGColor='FF9A9A';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Curve',
				paletteFamily: 	'E77070',
				keyvisualId: 	'5771',
				keyvisualName: 	'kv_5771.jpg',
				fontsetId: 		'11088',
				graphicsetId: 	'11860',
				contentColor: 	'B94949',
				contentBGColor: 'FF9A9A',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				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:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1701',
internalId:  '',
customField: '20090405-083412'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1752',
internalId:  '',
customField: '20081223-155315'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1701',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35968',
internalId:  '',
customField: '20081223-143403'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4601',
internalId:  '',
customField: '20081125-193027'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4622',
internalId:  '',
customField: '20090101-200411'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4643',
internalId:  '',
customField: '20090101-201050'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4664',
internalId:  '',
customField: '20090101-201147'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11701',
internalId:  '',
customField: '20081126-120700'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4706',
internalId:  '',
customField: '20081126-111403'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6501',
internalId:  '',
customField: '20090619-154144'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35401',
internalId:  '',
customField: '20090101-200832'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48601',
internalId:  '',
customField: '20081126-111248'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35443',
internalId:  '',
customField: '20081125-222703'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35464',
internalId:  '',
customField: '20090101-170429'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35485',
internalId:  '',
customField: '20081223-152728'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35506',
internalId:  '',
customField: '20081223-152506'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35527',
internalId:  '',
customField: '20090110-205119'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35548',
internalId:  '',
customField: '20081126-105230'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35569',
internalId:  '',
customField: '20090326-195234'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35590',
internalId:  '',
customField: '20090326-194750'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35611',
internalId:  '',
customField: '20090326-200936'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35632',
internalId:  '',
customField: '20081126-105502'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35653',
internalId:  '',
customField: '20081126-111139'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35674',
internalId:  '',
customField: '20081126-111159'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35695',
internalId:  '',
customField: '20081126-111223'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35716',
internalId:  '',
customField: '20090101-201215'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35737',
internalId:  '',
customField: '20081125-215409'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35758',
internalId:  '',
customField: '20090101-165355'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35779',
internalId:  '',
customField: '20081125-215501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35800',
internalId:  '',
customField: '20081125-215533'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35821',
internalId:  '',
customField: '20081125-222427'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35842',
internalId:  '',
customField: '20081126-120133'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36601',
internalId:  '',
customField: '20090101-201305'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35905',
internalId:  '',
customField: '20081125-160633'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35926',
internalId:  '',
customField: '20081125-160633'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35947',
internalId:  '',
customField: '20081125-160633'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35989',
internalId:  '',
customField: '20090111-172954'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36010',
internalId:  '',
customField: '20090619-152206'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36622',
internalId:  '',
customField: '20090101-201412'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36643',
internalId:  '',
customField: '20090101-201340'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36664',
internalId:  '',
customField: '20081126-121140'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36685',
internalId:  '',
customField: '20090101-201625'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36706',
internalId:  '',
customField: '20090101-201702'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36727',
internalId:  '',
customField: '20081125-164052'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47301',
internalId:  '',
customField: '20081125-224412'
};
var canonHostname = 'cmworker01.yourhostingaccount.com';
var accountId     = 'AENDU0IN2E06';
var companyName   = 'Sugar+Snaps+Boutique+-+Custom+Hair+Bows';
var htmlTitle	  = 'Sugar+Snaps+-+Custom+Deisgned+Hairbows';
var metaKeywords  = '';
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();
};
