/* [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','5401',jdecode('Home'),jdecode(''),'/5401.html','true',[],'',''],
	['PAGE','5746',jdecode('ONLINE+APPOINTMENTS'),jdecode(''),'/5746.html','true',[],'',''],
	['PAGE','6101',jdecode('GIFT+CERTIFICATE+PURCHASE'),jdecode(''),'/6101.html','true',[],'',''],
	['PAGE','20815',jdecode('OUR+SPECIAL+OFFERS'),jdecode(''),'/20815.html','true',[],'',''],
	['PAGE','5452',jdecode('HAIR+SERVICES'),jdecode(''),'/5452.html','true',[],'',''],
	['PAGE','5473',jdecode('HAIR+TEXTURE+SERVICE'),jdecode(''),'/5473.html','true',[],'',''],
	['PAGE','5683',jdecode('HAIR+COLOR'),jdecode(''),'/5683.html','true',[],'',''],
	['PAGE','5515',jdecode('ORGANIC+HAIR+REMOVAL'),jdecode(''),'/5515.html','true',[],'',''],
	['PAGE','5536',jdecode('NAIL+SERVICES'),jdecode(''),'/5536.html','true',[],'',''],
	['PAGE','5557',jdecode('PERSONAL+AIRBRUSH+TAN'),jdecode(''),'/5557.html','true',[],'',''],
	['PAGE','5578',jdecode('MAKEUP+SERVICE'),jdecode(''),'/5578.html','true',[],'',''],
	['PAGE','5599',jdecode('SKIN+CARE+%2F+FACIALS'),jdecode(''),'/5599.html','true',[],'',''],
	['PAGE','5620',jdecode('BODY+WORK+%2F+MASSAGE'),jdecode(''),'/5620.html','true',[],'',''],
	['PAGE','5641',jdecode('ABOUT+US'),jdecode(''),'/5641.html','true',[],'',''],
	['PAGE','5662',jdecode('IMPORTANT+INFORMATION'),jdecode(''),'/5662.html','true',[],'',''],
	['PAGE','21515',jdecode('BUSINESS+HOURS'),jdecode(''),'/21515.html','true',[],'',''],
	['PAGE','5704',jdecode('OUR+STYLIST+TEAM'),jdecode(''),'/5704.html','true',[],'',''],
	['PAGE','61167',jdecode('OUR+SPA+TEAM'),jdecode(''),'/61167.html','true',[],'',''],
	['PAGE','5725',jdecode('BETTER+BUSINESS+BUREAU'),jdecode(''),'/5725.html','true',[],'',''],
	['PAGE','5788',jdecode('LINKS'),jdecode(''),'/5788.html','true',[],'','']];
var siteelementCount=20;
theSitetree.topTemplateName='Movement';
theSitetree.paletteFamily='333F65';
theSitetree.keyvisualId='1744';
theSitetree.keyvisualName='entspannung.jpg';
theSitetree.fontsetId='289';
theSitetree.graphicsetId='355';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='333F65';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Movement',
				paletteFamily: 	'333F65',
				keyvisualId: 	'1744',
				keyvisualName: 	'entspannung.jpg',
				fontsetId: 		'289',
				graphicsetId: 	'355',
				contentColor: 	'FFFFFF',
				contentBGColor: '333F65',
				a_color: 		'333F65',
				b_color: 		'040507',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5401',
internalId:  '',
customField: '20100813-113209'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '5401',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5452',
internalId:  '',
customField: '20091101-194431'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5473',
internalId:  '',
customField: '20091023-082317'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21515',
internalId:  '',
customField: '20091211-093917'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5515',
internalId:  '',
customField: '20100729-175654'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5536',
internalId:  '',
customField: '20100104-200018'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5557',
internalId:  '',
customField: '20100516-195408'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5578',
internalId:  '',
customField: '20091023-083446'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5599',
internalId:  '',
customField: '20100724-194351'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5620',
internalId:  '',
customField: '20100715-223148'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5641',
internalId:  '',
customField: '20100813-113716'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5662',
internalId:  '',
customField: '20100123-160003'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5683',
internalId:  '',
customField: '20091016-074119'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5704',
internalId:  '',
customField: '20100808-171327'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5725',
internalId:  '',
customField: '20091016-224426'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5746',
internalId:  '',
customField: '20100311-171922'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6101',
internalId:  '',
customField: '20100211-144849'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5788',
internalId:  '',
customField: '20100813-113538'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20815',
internalId:  '',
customField: '20100808-174238'
};
webappMappings['7060']=webappMappings['7060-adad6d73359180ca91407f97d5478d92']={
webappId:    '7060',
documentId:  '5401',
internalId:  'adad6d73359180ca91407f97d5478d92',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-17597f239b221525b3983adce3e547be']={
webappId:    '7060',
documentId:  '5641',
internalId:  '17597f239b221525b3983adce3e547be',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61167',
internalId:  '',
customField: '20100808-173154'
};
var canonHostname = 'cmworker02.yourhostingaccount.com';
var accountId     = 'AENDU0INVJUO';
var companyName   = '19th+St.+Salon+%26+Spa';
var htmlTitle	  = '19thstsalonspa.com';
var metaKeywords  = 'Online+appointments+scheduling%2C+online+gift+certificate+purchases%2C+at+www.19thstsalonspa.com%2C+Better+Business+Bureau+accredited%2C+Salon%2C+Spa%2C+Aveda%2C+Topeka%2C+Kansas%2C+3915+SW+19th+St.%2C+full+service%2C+accredited%2C+BBB+seal%2C+www.19thstsalonspa.com%2C+trained%2C+experienced%2C+hair%2C+massage%2C+facials%2C+manicures%2C+pedicure%2C+color%2C+highlights%2C+lowlights%2C+organic%2C+hair+removal%2C+spray+tan%2C+secure%2C+confidential%2C+online+appointments%2C+online+gift+certificate+purchase';
var metaContents  = '19th+St.+Salonspa+is+an+Aveda+Concept+Salon+located+at+3915+SW+19th+St.%2C+Topeka%2C+Kansas%2C+66604.++19th+St.+Salonspa+has+served+the+Topeka%2C+Kansas+area+since+1997.++Our+phone+number+is+785-272-9977.++We+are+a+full+service+salon+and+spa.++We+are+accredited+by+the+Better+Business+Bureau.++You+will+find+the+BBB+Start+With+Trust+seal+on+our+website.++Our+website+address+is+www.19thstsalonspa.com+and+our+email+address+is+kress%4019thst.kscoxmail.com.++Our+staff+is+highly+trained+and+professional.++Our+salonspa+has+over+3000+square+foot+of+beautiful%2C+luxurious+space.++We+have+a+exclusive+2nd+floor+spa+area.++We+use+only+Aveda+products+which+are+derived+from+plants+and+flower+essences.++We+sale+only+Aveda+hair%2C+skin%2C+and+makeup+products.++Our+website+is+safe+and+secure.++Your+information+is+always+confidential.';
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();
};
