/* [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','2101',jdecode('Home'),jdecode(''),'/2101.html','true',[],'',''],
	['PAGE','4501',jdecode('All+Categories'),jdecode(''),'/4501.html','false',[],'',''],
	['PAGE','2152',jdecode('Men%26%23x27%3Bs+Fashion'),jdecode(''),'/2152/index.html','true',[ 
		['PAGE','70437',jdecode('Bottom'),jdecode(''),'/2152/70437.html','true',[],'',''],
		['PAGE','70458',jdecode('Top'),jdecode(''),'/2152/70458.html','true',[],'','']
	],'',''],
	['PAGE','2173',jdecode('Missy+Fashion'),jdecode(''),'/2173/index.html','true',[ 
		['PAGE','70479',jdecode('Bottoms'),jdecode(''),'/2173/70479.html','true',[],'',''],
		['PAGE','70737',jdecode('Dresses'),jdecode(''),'/2173/70737.html','true',[],'',''],
		['PAGE','70500',jdecode('Tops'),jdecode(''),'/2173/70500.html','true',[],'',''],
		['PAGE','70758',jdecode('Sets'),jdecode(''),'/2173/70758.html','true',[],'','']
	],'',''],
	['PAGE','2194',jdecode('Junior+Fashion'),jdecode(''),'/2194/index.html','true',[ 
		['PAGE','70521',jdecode('Bottoms'),jdecode(''),'/2194/70521.html','true',[],'',''],
		['PAGE','70779',jdecode('Dresses'),jdecode(''),'/2194/70779.html','true',[],'',''],
		['PAGE','70542',jdecode('Tops'),jdecode(''),'/2194/70542.html','true',[],'',''],
		['PAGE','70800',jdecode('Sets'),jdecode(''),'/2194/70800.html','true',[],'','']
	],'',''],
	['PAGE','2215',jdecode('Children%26%23x27%3Bs+Fashion'),jdecode(''),'/2215/index.html','true',[ 
		['PAGE','12243',jdecode('Boys'),jdecode(''),'/2215/12243.html','true',[],'',''],
		['PAGE','12264',jdecode('Girls'),jdecode(''),'/2215/12264.html','true',[],'',''],
		['PAGE','65439',jdecode('Infants+and+Toddler'),jdecode(''),'/2215/65439.html','true',[],'','']
	],'',''],
	['PAGE','24479',jdecode('Maternity'),jdecode(''),'/24479.html','true',[],'',''],
	['PAGE','2278',jdecode('Plus+Fashion'),jdecode(''),'/2278/index.html','true',[ 
		['PAGE','70821',jdecode('Bottoms'),jdecode(''),'/2278/70821.html','true',[],'',''],
		['PAGE','70842',jdecode('Tops'),jdecode(''),'/2278/70842.html','true',[],'','']
	],'',''],
	['PAGE','2299',jdecode('Sleepwear'),jdecode(''),'/2299.html','true',[],'',''],
	['PAGE','2320',jdecode('Contact+Us'),jdecode(''),'/2320.html','true',[],'',''],
	['PAGE','2341',jdecode('About+us'),jdecode(''),'/2341/index.html','true',[ 
		['PAGE','2362',jdecode('How+to+find+us'),jdecode(''),'/2341/2362.html','false',[],'','']
	],'',''],
	['PAGE','2383',jdecode('Our+team'),jdecode(''),'/2383.html','true',[],'','']];
var siteelementCount=28;
theSitetree.topTemplateName='Logg';
theSitetree.paletteFamily='3D4B78';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='421';
theSitetree.graphicsetId='467';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='3D4B78';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Logg',
				paletteFamily: 	'3D4B78',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'421',
				graphicsetId: 	'467',
				contentColor: 	'FFFFFF',
				contentBGColor: '3D4B78',
				a_color: 		'3D4B78',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2101',
internalId:  '',
customField: '20100618-133948'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2152',
internalId:  '',
customField: '20100503-175314'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2173',
internalId:  '',
customField: '20100430-201141'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2194',
internalId:  '',
customField: '20100430-202425'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2215',
internalId:  '',
customField: '20091014-201846'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70437',
internalId:  '',
customField: '20100430-194302'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65439',
internalId:  '',
customField: '20100128-152321'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2278',
internalId:  '',
customField: '20100128-180848'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2299',
internalId:  '',
customField: '20100128-164402'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2320',
internalId:  '',
customField: '20100503-175006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2341',
internalId:  '',
customField: '20090727-203211'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2362',
internalId:  '',
customField: '20090707-184245'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2383',
internalId:  '',
customField: '20090721-023047'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4501',
internalId:  '',
customField: '20091026-193116'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2101',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70479',
internalId:  '',
customField: '20091028-192054'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24479',
internalId:  '',
customField: '20090723-191417'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12243',
internalId:  '',
customField: '20091014-181206'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12264',
internalId:  '',
customField: '20100128-161217'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70458',
internalId:  '',
customField: '20100430-200513'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70737',
internalId:  '',
customField: '20091028-192520'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70500',
internalId:  '',
customField: '20091028-195931'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70758',
internalId:  '',
customField: '20091028-202053'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70521',
internalId:  '',
customField: '20091104-144820'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70779',
internalId:  '',
customField: '20091104-145059'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70542',
internalId:  '',
customField: '20091104-174428'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70800',
internalId:  '',
customField: '20091104-174830'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70821',
internalId:  '',
customField: '20091021-161424'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70842',
internalId:  '',
customField: '20091021-161424'
};
webappMappings['7008']=webappMappings['7008-16825']={
webappId:    '7008',
documentId:  '2320',
internalId:  '16825',
customField: 'language:en;country:US;'
};
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVFL30INHYLM';
var companyName   = 'JONATHAN+K+APPAREL';
var htmlTitle	  = 'JONATHAN+K+APPAREL';
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();
};
