/* [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 theSitetree=[ 
	['PAGE','1001',jdecode('Home'),jdecode(''),'/1001.html','true',[],''],
	['PAGE','5901',jdecode('About+us'),jdecode(''),'/5901.html','true',[],''],
	['PAGE','5922',jdecode('Service'),jdecode(''),'/5922.html','true',[],''],
	['PAGE','5985',jdecode('Contact'),jdecode(''),'/5985.html','true',[],''],
	['PAGE','42781',jdecode('Gift+Certificates'),jdecode(''),'/42781.html','true',[],''],
	['PAGE','5943',jdecode('Benefits+of+Massage'),jdecode(''),'/5943.html','true',[],''],
	['PAGE','43479',jdecode('Testimonials'),jdecode(''),'/43479.html','true',[],''],
	['PAGE','12106',jdecode('Range+of+Practice'),jdecode(''),'/12106/index.html','true',[ 
		['PAGE','12127',jdecode('Massage+'),jdecode(''),'/12106/12127.html','true',[],''],
		['PAGE','39501',jdecode('Spa+'),jdecode(''),'/12106/39501.html','true',[],''],
		['PAGE','12148',jdecode('House+Calls'),jdecode(''),'/12106/12148.html','true',[],'']
	],''],
	['PAGE','12169',jdecode('Opening+hours'),jdecode(''),'/12169.html','true',[],''],
	['PAGE','13401',jdecode('Pregnancy%26Massage'),jdecode(''),'/13401.html','true',[],''],
	['PAGE','12085',jdecode('The+BodyCushion'),jdecode(''),'/12085.html','true',[],''],
	['PAGE','42453',jdecode('Photos'),jdecode(''),'/42453.html','true',[],''],
	['PAGE','12190',jdecode('Interesting+links'),jdecode(''),'/12190.html','true',[],'']];
var siteelementCount=16;
theSitetree.topTemplateName='Enjoy';
theSitetree.paletteFamily='93A6CC';
theSitetree.keyvisualId='2246';
theSitetree.keyvisualName='reisebueros1.jpg';
theSitetree.fontsetId='366';
theSitetree.graphicsetId='415';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='93A6CC';
var theTemplate={
				name: 			'Enjoy',
				paletteFamily: 	'93A6CC',
				keyvisualId: 	'2246',
				keyvisualName: 	'reisebueros1.jpg',
				fontsetId: 		'366',
				graphicsetId: 	'415',
				contentColor: 	'000000',
				contentBGColor: '93A6CC',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'93A6CC',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1001',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-1164795']={
webappId:    '1501',
documentId:  '1001',
internalId:  '1164795',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1001',
internalId:  '',
customField: '20090221-080716'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5901',
internalId:  '',
customField: '20090221-081433'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5922',
internalId:  '',
customField: '20090221-081646'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5985',
internalId:  '',
customField: '20080708-101651'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12169',
internalId:  '',
customField: '20090221-081814'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12106',
internalId:  '',
customField: '20090221-081853'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12127',
internalId:  '',
customField: '20080709-074908'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39501',
internalId:  '',
customField: '20080709-075025'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12148',
internalId:  '',
customField: '20080709-075101'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5943',
internalId:  '',
customField: '20090221-082059'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12085',
internalId:  '',
customField: '20090221-082940'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13401',
internalId:  '',
customField: '20090221-083604'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43479',
internalId:  '',
customField: '20090221-091801'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42781',
internalId:  '',
customField: '20090221-083808'
};
webappMappings['1002']=webappMappings['1002-43479ahw050inensm']={
webappId:    '1002',
documentId:  '43479',
internalId:  '43479ahw050inensm',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42453',
internalId:  '',
customField: '20090221-092228'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12190',
internalId:  '',
customField: '20090221-084019'
};
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050INENSM';
var companyName   = 'Mobile+Mommy+Massage+Spa+954-632-7432';
var htmlTitle	  = 'MASSAGE+FOR+WOMEN';
var metaKeywords  = 'MOBILE+MASSAGE%2CPREGNANCY%2CWOMENS+WELLNESS%2C+INSURANCE%2CWEDDINGS%2C+PRE-POST+OPERATIVE%2CBODY+CUSHION%2CSTRETCHING%2CTHAI%2CBRIDES%2C+BRIDES+MAID%2CMOTHER%2CBABY+SHOWER%2CBRIDAL+SHOWER%2C+';
var metaContents  = 'MOBILE+MASSAGE+FOR+WOMEN';
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();
};
