/* [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(''), jdecode('%2F2101%2Findex.html'), 'true',[ 
		['PAGE','4501',jdecode('All+Categories'),jdecode(''), jdecode('%2F2101%2F4501.html'), 'false',[],'','']
	],'',''],
	['PAGE','2152',jdecode('Men%26%23x27%3Bs+Fashion'),jdecode(''), jdecode('%2F2152%2Findex.html'), 'true',[ 
		['PAGE','70437',jdecode('Bottom'),jdecode(''), jdecode('%2F2152%2F70437.html'), 'true',[],'',''],
		['PAGE','160265',jdecode('Tops'),jdecode(''), jdecode('%2F2152%2F160265.html'), 'true',[],'',''],
		['PAGE','162576',jdecode('Sets'),jdecode(''), jdecode('%2F2152%2F162576.html'), 'true',[],'','']
	],'',''],
	['PAGE','2173',jdecode('Missy+Fashion'),jdecode(''), jdecode('%2F2173%2Findex.html'), 'true',[ 
		['PAGE','70479',jdecode('Bottoms'),jdecode(''), jdecode('%2F2173%2F70479.html'), 'true',[],'',''],
		['PAGE','70737',jdecode('Dresses'),jdecode(''), jdecode('%2F2173%2F70737.html'), 'true',[],'',''],
		['PAGE','70500',jdecode('Tops'),jdecode(''), jdecode('%2F2173%2F70500.html'), 'true',[],'',''],
		['PAGE','70758',jdecode('Sets'),jdecode(''), jdecode('%2F2173%2F70758.html'), 'true',[],'',''],
		['PAGE','154743',jdecode('Sleepwear'),jdecode(''), jdecode('%2F2173%2F154743.html'), 'true',[],'',''],
		['PAGE','173187',jdecode('Swimwear'),jdecode(''), jdecode('%2F2173%2F173187.html'), 'true',[],'','']
	],'',''],
	['PAGE','2194',jdecode('Junior+Fashion'),jdecode(''), jdecode('%2F2194%2Findex.html'), 'true',[ 
		['PAGE','70521',jdecode('Bottoms'),jdecode(''), jdecode('%2F2194%2F70521.html'), 'true',[],'',''],
		['PAGE','70779',jdecode('Dresses'),jdecode(''), jdecode('%2F2194%2F70779.html'), 'true',[],'',''],
		['PAGE','70542',jdecode('Tops'),jdecode(''), jdecode('%2F2194%2F70542.html'), 'true',[],'',''],
		['PAGE','70800',jdecode('Swimwear'),jdecode(''), jdecode('%2F2194%2F70800.html'), 'true',[],'',''],
		['PAGE','150099',jdecode('Sweaters'),jdecode(''), jdecode('%2F2194%2F150099.html'), 'true',[],'','']
	],'',''],
	['PAGE','2215',jdecode('Kid%26%23x27%3Bs+Fashion'),jdecode(''), jdecode('%2F2215%2Findex.html'), 'true',[ 
		['PAGE','12243',jdecode('Boys'),jdecode(''), jdecode('%2F2215%2F12243.html'), 'true',[],'',''],
		['PAGE','12264',jdecode('Girls'),jdecode(''), jdecode('%2F2215%2F12264.html'), 'true',[],'',''],
		['PAGE','65439',jdecode('Infants+and+Toddler'),jdecode(''), jdecode('%2F2215%2F65439.html'), 'true',[],'',''],
		['PAGE','154764',jdecode('Sleepwear'),jdecode(''), jdecode('%2F2215%2F154764.html'), 'true',[],'','']
	],'',''],
	['PAGE','179787',jdecode('Plus+Size+%2F+Maternity+'),jdecode(''), jdecode('%2F179787%2Findex.html'), 'true',[ 
		['PAGE','181187',jdecode('Bottoms'),jdecode(''), jdecode('%2F179787%2F181187.html'), 'true',[],'',''],
		['PAGE','181208',jdecode('Tops'),jdecode(''), jdecode('%2F179787%2F181208.html'), 'true',[],'',''],
		['PAGE','181229',jdecode('Swimwear'),jdecode(''), jdecode('%2F179787%2F181229.html'), 'true',[],'','']
	],'',''],
	['PAGE','191987',jdecode('Accessories'),jdecode(''), jdecode('%2F191987.html'), 'true',[],'',''],
	['PAGE','2320',jdecode('Contact+Us'),jdecode(''), jdecode('%2F2320.html'), 'true',[],'',''],
	['PAGE','2341',jdecode('About+us'),jdecode(''), jdecode('%2F2341%2Findex.html'), 'true',[ 
		['PAGE','2362',jdecode('How+to+find+us'),jdecode(''), jdecode('%2F2341%2F2362.html'), 'false',[],'','']
	],'',''],
	['PAGE','2383',jdecode('Our+team'),jdecode(''), jdecode('%2F2383.html'), 'true',[],'','']];
var siteelementCount=33;
theSitetree.topTemplateName='Handy';
theSitetree.paletteFamily='CF21FF';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='91';
theSitetree.graphicsetId='108';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'grp35-attweb',
  product: 'WSCSYSSSSLY0X9RC'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Handy',
				paletteFamily: 	'CF21FF',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'91',
				graphicsetId: 	'108',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'CF21FF',
				b_color: 		'FFED33',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2101',
internalId:  '',
customField: '20110518-175628'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2152',
internalId:  '',
customField: '20111110-192554'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2173',
internalId:  '',
customField: '20111207-153401'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2194',
internalId:  '',
customField: '20111110-200129'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2215',
internalId:  '',
customField: '20111110-200853'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70437',
internalId:  '',
customField: '20111117-200309'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65439',
internalId:  '',
customField: '20111103-153434'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '150099',
internalId:  '',
customField: '20111103-190019'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2320',
internalId:  '',
customField: '20110518-181314'
};
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:  '154743',
internalId:  '',
customField: '20110902-163103'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4501',
internalId:  '',
customField: '20091026-193116'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '181187',
internalId:  '',
customField: '20111101-134248'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70479',
internalId:  '',
customField: '20111110-195811'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '181208',
internalId:  '',
customField: '20111101-161532'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12243',
internalId:  '',
customField: '20111212-201754'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12264',
internalId:  '',
customField: '20111110-201115'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '160265',
internalId:  '',
customField: '20111207-145420'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70737',
internalId:  '',
customField: '20111104-175234'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70500',
internalId:  '',
customField: '20111207-151732'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70758',
internalId:  '',
customField: '20111207-152021'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70521',
internalId:  '',
customField: '20111103-174950'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70779',
internalId:  '',
customField: '20111103-175444'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70542',
internalId:  '',
customField: '20111110-200447'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70800',
internalId:  '',
customField: '20111103-184000'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '181229',
internalId:  '',
customField: '20111101-134248'
};
webappMappings['7008']=webappMappings['7008-16825']={
webappId:    '7008',
documentId:  '2320',
internalId:  '16825',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '154764',
internalId:  '',
customField: '20111103-161652'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '191987',
internalId:  '',
customField: '20111117-191001'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '162576',
internalId:  '',
customField: '20111110-194950'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '173187',
internalId:  '',
customField: '20111104-183353'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '179787',
internalId:  '',
customField: '20111108-185053'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2101',
internalId:  '1006',
customField: '1006'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
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();
};

