/* [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','1801',jdecode('Home'),jdecode(''),'/1801.html','true',[],'',''],
	['PAGE','81323',jdecode('About+us'),jdecode(''),'/81323.html','true',[],'',''],
	['PAGE','1978',jdecode('Contact'),jdecode(''),'/1978/index.html','true',[ 
		['PAGE','18822',jdecode('How+to+find+us'),jdecode(''),'/1978/18822.html','true',[],'','']
	],'',''],
	['PAGE','28012',jdecode('Guestbook'),jdecode(''),'/28012.html','true',[],'',''],
	['PAGE','28612',jdecode('Email+sign+up+'),jdecode(''),'/28612.html','true',[],'',''],
	['PAGE','29912',jdecode('Blog'),jdecode(''),'/29912.html','true',[],'',''],
	['PAGE','75912',jdecode('FRENDZ+OF+TRENDZ'),jdecode(''),'/75912.html','true',[],'',''],
	['PAGE','18101',jdecode('Terms+'),jdecode(''),'/18101.html','true',[],'','']];
var siteelementCount=9;
theSitetree.topTemplateName='Billy';
theSitetree.paletteFamily='8D7C50';
theSitetree.keyvisualId='7101';
theSitetree.keyvisualName='kv_7101.jpg';
theSitetree.fontsetId='16390';
theSitetree.graphicsetId='12126';
theSitetree.contentColor='534625';
theSitetree.contentBGColor='8D7C50';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Billy',
				paletteFamily: 	'8D7C50',
				keyvisualId: 	'7101',
				keyvisualName: 	'kv_7101.jpg',
				fontsetId: 		'16390',
				graphicsetId: 	'12126',
				contentColor: 	'534625',
				contentBGColor: '8D7C50',
				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:  '1801',
internalId:  '',
customField: '20100831-190052'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '81323',
internalId:  '',
customField: '20100501-160328'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18101',
internalId:  '',
customField: '20100721-190135'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '18822',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:true;'
};
webappMappings['7008']=webappMappings['7008-4886']={
webappId:    '7008',
documentId:  '28612',
internalId:  '4886',
customField: 'language:en;country:US;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1801',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28012',
internalId:  '',
customField: '20090920-174618'
};
webappMappings['1002']=webappMappings['1002-28012ahw050inl8ek']={
webappId:    '1002',
documentId:  '28012',
internalId:  '28012ahw050inl8ek',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1978',
internalId:  '',
customField: '20100501-160730'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18822',
internalId:  '',
customField: '20090822-012515'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '75912',
internalId:  '',
customField: '20100831-190336'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28612',
internalId:  '',
customField: '20090920-174804'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29912',
internalId:  '',
customField: '20100831-184055'
};
var canonHostname = 'wsc-worker01.chi.us.siteprotect.com';
var accountId     = 'AHW050INL8EK';
var companyName   = 'TRENDZ+FASHION+BOUTIQUE';
var htmlTitle	  = 'Trendz+Fashion+Boutique-hottest+clothes+at+the+best+prices';
var metaKeywords  = 'arizona+fashion+boutique%2Cyellow+box+shoes%2Ccowgirl+fashion+clothing%2Crhinestone+bling%2Ccross+purse%2Cskin+brand+clothing%2Cadiktd+clothing%2Csilver+jeans%2Cno+fear%2Cso+cal%2C+sun+dresses%2C+flip+flops%2Cyellow+box+flip+flops%2Cwestern+jewelry%2Cleather+rings%2Ctoe+rings%2Cearrings%2Ccowgirl+up%2C+cowgirl+tuff%2Cwomens+tops%2Cironhorse+jeans%2Cjeans%2Cworn+pants%2CKut%2CSee+Thru+Soul%2CDickies+Girl%2Cburnout%2Csublimation%2Ccrochet%2Capplique%2Ctunics%2Cmisses%2Cplaid%2Cpurses%2Ccrosses%2Cjewelry%2Cfashions%2Ctrendz%2Ctrends%2Ctrendy%2Cstyles%2Cclothes%2Cjackets%2Cboots%2Cblouses';
var metaContents  = 'At+TRENDZ+FASHION+BOUTIQUE+youll+find+the+latest+styles+and+most+popular+brands+at+the+best+prices.+We+carry+a+wide+variety+of+the+lastest+fashion+forward+trends.+Whether+youre+a+flashy+cowgirl+who+loves+her+bling%2C+a+more+conservative+type+who+goes+for+the+classic+look%2C+or+the+fashionista+looking+for+the+hottest+celeb+styles%2C+youre+sure+to+find+what+youre+looking+for+at+TRENDZ+FASHION+BOUTIQUE.';
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();
};
