/* [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','1501',jdecode('Home'),jdecode(''), jdecode('%2F1501.html'), 'true',[],'',''],
	['PAGE','11401',jdecode('SHOP+BUY%21+ON+LINE'),jdecode(''), jdecode('%2F11401.html'), 'true',[],'',''],
	['PAGE','158001',jdecode('Spanish+Version+Gat+Tea'),jdecode(''), jdecode('%2F158001.html'), 'true',[],'',''],
	['PAGE','158301',jdecode('E-+Mail+GatTea+Ask+%3F'),jdecode(''), jdecode('%2F158301.html'), 'true',[],'',''],
	['PAGE','140501',jdecode('Gat+Tea+blogs'),jdecode(''), jdecode('%2F140501.html'), 'true',[],'',''],
	['PAGE','9606',jdecode('Guestbook+testimony+'),jdecode(''), jdecode('%2F9606.html'), 'true',[],'',''],
	['PAGE','9601',jdecode('Read+testimonys'),jdecode(''), jdecode('%2F9601.html'), 'false',[],'',''],
	['PAGE','1804',jdecode('Acid+Reflux'),jdecode(''), jdecode('%2F1804.html'), 'true',[],'',''],
	['PAGE','1573',jdecode('Infant%26%23x27%3Bs+Colic%2CReflux'),jdecode(''), jdecode('%2F1573.html'), 'true',[],'',''],
	['PAGE','1636',jdecode('Stress+Testimonies'),jdecode(''), jdecode('%2F1636.html'), 'true',[],'',''],
	['PAGE','71401',jdecode('+fundraiser'),jdecode(''), jdecode('%2F71401.html'), 'true',[],'',''],
	['PAGE','1552',jdecode('School+Nutrition'),jdecode(''), jdecode('%2F1552.html'), 'true',[],'',''],
	['PAGE','120101',jdecode('+Live+Testimonies'),jdecode(''), jdecode('%2F120101.html'), 'true',[],'',''],
	['PAGE','52701',jdecode('Snackman%2FGat+Pics'),jdecode(''), jdecode('%2F52701.html'), 'true',[],'',''],
	['PAGE','158801',jdecode('Search+'),jdecode(''), jdecode('%2F158801.html'), 'true',[],'',''],
	['PAGE','140522',jdecode('+Live+feed+to+Gat+Tea'),jdecode(''), jdecode('%2F140522.html'), 'true',[],'',''],
	['PAGE','1699',jdecode('Gat+Tea+Jingle'),jdecode(''), jdecode('%2F1699%2Findex.html'), 'true',[ 
		['PAGE','1720',jdecode('Links'),jdecode(''), jdecode('%2F1699%2F1720.html'), 'true',[],'','']
	],'',''],
	['PAGE','1783',jdecode('Contact'),jdecode(''), jdecode('%2F1783.html'), 'true',[],'',''],
	['PAGE','160401',jdecode('Gatlin+Production+Coupon'),jdecode(''), jdecode('%2F160401.html'), 'true',[],'','']];
var siteelementCount=20;
theSitetree.topTemplateName='Restaurant';
theSitetree.paletteFamily='39562A';
theSitetree.keyvisualId='11904';
theSitetree.keyvisualName='kv_11904.jpg';
theSitetree.fontsetId='33190';
theSitetree.graphicsetId='14095';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'enom',
  product: 'WSCENOSSSLYTC210'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Restaurant',
				paletteFamily: 	'39562A',
				keyvisualId: 	'11904',
				keyvisualName: 	'kv_11904.jpg',
				fontsetId: 		'33190',
				graphicsetId: 	'14095',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1501',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-2699457']={
webappId:    '1501',
documentId:  '1501',
internalId:  '2699457',
customField: '1501'
};
webappMappings['1002']=webappMappings['1002-9606aen020in23hc']={
webappId:    '1002',
documentId:  '9606',
internalId:  '9606aen020in23hc',
customField: 'icq=false'
};
webappMappings['4001']=webappMappings['4001-2710507']={
webappId:    '4001',
documentId:  '11401',
internalId:  '2710507',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-78f9820757a7e4b28deb19ff8e43ad5a']={
webappId:    '7060',
documentId:  '52701',
internalId:  '78f9820757a7e4b28deb19ff8e43ad5a',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1501',
internalId:  '',
customField: '20120125-050048'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9606',
internalId:  '',
customField: '20060713-083339'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9601',
internalId:  '',
customField: '20060604-134412'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1804',
internalId:  '',
customField: '20111214-063319'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1573',
internalId:  '',
customField: '20070925-065010'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1552',
internalId:  '',
customField: '20110516-054829'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1636',
internalId:  '',
customField: '20091022-084510'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '71401',
internalId:  '',
customField: '20090107-235328'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1699',
internalId:  '',
customField: '20070801-211311'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1720',
internalId:  '',
customField: '20061130-152350'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52701',
internalId:  '',
customField: '20070801-211040'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '158001',
internalId:  '',
customField: '20091023-094601'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1783',
internalId:  '',
customField: '20070925-065358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11401',
internalId:  '',
customField: '20100115-081826'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '120101',
internalId:  '',
customField: '20080124-124700'
};
webappMappings['7050']=webappMappings['7050-142']={
webappId:    '7050',
documentId:  '140501',
internalId:  '142',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '140522',
internalId:  '',
customField: '20091215-061936'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '140501',
internalId:  '',
customField: '20091023-105420'
};
webappMappings['7008']=webappMappings['7008-2616']={
webappId:    '7008',
documentId:  '158301',
internalId:  '2616',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '158301',
internalId:  '',
customField: '20091023-094950'
};
webappMappings['8002']=webappMappings['8002-search']={
webappId:    '8002',
documentId:  '158801',
internalId:  'search',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '158801',
internalId:  '',
customField: '20091023-100624'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '160401',
internalId:  '',
customField: '20091026-170413'
};
webappMappings['8010']=webappMappings['8010-587']={
webappId:    '8010',
documentId:  '1501',
internalId:  '587',
customField: 'language:en;country:US;'
};
var webAppHostname = 'wsc.ehost-services.com:80';
var canonHostname = 'wscwrk01.ehost-services.com';
var accountId     = 'AEN020IN23HC';
var companyName   = 'Gat+Tea%2F+The+Stress+Reliever';
var htmlTitle	  = 'Stress%2C+Weight+Loss%2C+Acid+Reflux%2C+Bloating%2C+Stress%2CWeight+loss%2C+Bloating%2Cdepression';
var metaKeywords  = '+Weight+Loss%2C+I.B.S.%2C+Gastrologist%2C++stress%2C+bloating%2C+Weight+Gain%2C++Acid+Reflux%2Cconstipation%2C+bowel+disease%2C+stool+softeners%2C+tumors%2Cfibroids%2C+high+blood+pressure%2C+dietbetic%2C%2Cdepression%2Cmood+swings%2Cmental+disorders%2C+depression%2Cachne%2CTea%2Cstress+Tea';
var metaContents  = '++Herbal+Tea%2C+Acid+Reflux%2CWeight+Loss%2C+I.B.S.%2C++stress%2C+bloating%2C+Weight+Gain%2C++Acid+Reflux%2Cconstipation%2C+bowel+disease%2C+stool+softeners%2C+tumors%2Cfibroids%2C+high+blood+pressure%2C+dietbetic%2C%2Cdepression%2Cmood+swings%2Cmental+disorders%2C+depression%2Cachne%2CTea%2Cstress+Tea';
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();
};

