/* [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','4701',jdecode('Home'),jdecode(''),'/4701.html','true',[],'',''],
	['PAGE','13997',jdecode('Dresses+for+girls'),jdecode(''),'/13997.html','true',[],'',''],
	['PAGE','18709',jdecode('Baby+items'),jdecode(''),'/18709.html','true',[],'',''],
	['PAGE','15197',jdecode('Women%26%23x27%3Bs+resortwear'),jdecode(''),'/15197.html','true',[],'',''],
	['PAGE','14018',jdecode('More+pictures'),jdecode(''),'/14018.html','true',[],'',''],
	['PAGE','20609',jdecode('Photo+album'),jdecode(''),'/20609.html','true',[],'',''],
	['PAGE','14997',jdecode('Order+Now+%21'),jdecode(''),'/14997.html','true',[],'',''],
	['PAGE','20809',jdecode('Contact+us+now+%21'),jdecode(''),'/20809.html','true',[],'','']];
var siteelementCount=8;
theSitetree.topTemplateName='Beach';
theSitetree.paletteFamily='E7D795';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10469';
theSitetree.graphicsetId='10929';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='E7D794';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Beach',
				paletteFamily: 	'E7D795',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10469',
				graphicsetId: 	'10929',
				contentColor: 	'000000',
				contentBGColor: 'E7D794',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'FF503F',
				e_color: 		'FF503F',
				f_color: 		'FF503F',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4701',
internalId:  '',
customField: '20090707-014426'
};
webappMappings['7060']=webappMappings['7060-9422c74b041f0fe6b75c7d3b12a62463']={
webappId:    '7060',
documentId:  '14018',
internalId:  '9422c74b041f0fe6b75c7d3b12a62463',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13997',
internalId:  '',
customField: '20090704-215911'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14018',
internalId:  '',
customField: '20090707-025216'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14997',
internalId:  '',
customField: '20090707-025458'
};
webappMappings['7060']=webappMappings['7060-123fd8e57c81da937ae6e2d9f29ce194']={
webappId:    '7060',
documentId:  '20609',
internalId:  '123fd8e57c81da937ae6e2d9f29ce194',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15197',
internalId:  '',
customField: '20090707-014914'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18709',
internalId:  '',
customField: '20090704-184159'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20609',
internalId:  '',
customField: '20090704-222627'
};
webappMappings['7008']=webappMappings['7008-3942']={
webappId:    '7008',
documentId:  '20809',
internalId:  '3942',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20809',
internalId:  '',
customField: '20110713-211925'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4701',
internalId:  '1006',
customField: '1006'
};
var canonHostname = 'wsc-worker01.chi.us.siteprotect.com';
var accountId     = 'AHW050INLYMZ';
var companyName   = 'Moved+to+Maui';
var htmlTitle	  = 'Moved+to+Maui';
var metaKeywords  = 'Moved+to+Maui+clothing+Hawaii+baby+infant+clothing+girls+dresses+adult+t-shirts+ladies+dress+girl+dress+boy+shirt+lady+shirt+blouse+turtle+flower+Hawaiian+Honu+craft+show+swap+meet+hand+painted+hand+made+aloha+wear+bubble+romper+socks+bib+hat+Move+glow+in+the+dark+paint+coverup+dolphin+Lahaina+Civic+Center+bamboo++resort+wear+sea+life++handpainted+tank+top+Movd+zintgraff++angel+fish+humpback+whale+plumeria+mermaid+lei+lokelani+rose+Zintgraff+Jeri+and+Bob+';
var metaContents  = 'Moved+to+Maui+hand+painted+clothing+for+women+and+children+from+Hawaii';
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();
};

