/* [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','6301',jdecode('Home'),jdecode(''),'/6301.html','true',[],''],
	['PAGE','6601',jdecode('About+Us'),jdecode(''),'/6601.html','true',[],''],
	['PAGE','6643',jdecode('Intimate+Occasions'),jdecode(''),'/6643.html','true',[],''],
	['PAGE','6622',jdecode('Menu+of+Services'),jdecode(''),'/6622.html','true',[],''],
	['PAGE','6664',jdecode('Contact'),jdecode(''),'/6664.html','true',[],''],
	['PAGE','6685',jdecode('Links'),jdecode(''),'/6685.html','true',[],'']];
var siteelementCount=6;
theSitetree.topTemplateName='Curve';
theSitetree.paletteFamily='87A6E8';
theSitetree.keyvisualId='5793';
theSitetree.keyvisualName='kv_5793.jpg';
theSitetree.fontsetId='11085';
theSitetree.graphicsetId='11858';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='9BBBFD';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Curve',
				paletteFamily: 	'87A6E8',
				keyvisualId: 	'5793',
				keyvisualName: 	'kv_5793.jpg',
				fontsetId: 		'11085',
				graphicsetId: 	'11858',
				contentColor: 	'000000',
				contentBGColor: '9BBBFD',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6301',
internalId:  '',
customField: '20100620-183015'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6601',
internalId:  '',
customField: '20090603-150119'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6622',
internalId:  '',
customField: '20091023-202722'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6643',
internalId:  '',
customField: '20091023-194558'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6664',
internalId:  '',
customField: '20090603-145359'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6685',
internalId:  '',
customField: '20100713-112210'
};
webappMappings['1501']=webappMappings['1501-18666446']={
webappId:    '1501',
documentId:  '6301',
internalId:  '18666446',
customField: '1501'
};
webappMappings['1501']=webappMappings['1501-18666912']={
webappId:    '1501',
documentId:  '6301',
internalId:  '18666912',
customField: '1501'
};
var canonHostname = 'cmworker02.yourhostingaccount.com';
var accountId     = 'AENDU0IN3IPX';
var companyName   = 'A+Superior+Massage';
var htmlTitle	  = 'A+mobile+massage+service';
var metaKeywords  = 'Alyssa+Karsten+Massage%2C+Clarkesville+Georgia%2C+Cleveland+Georgia%2C+Dahlonega+Georgia+%2C+Aroma+Therapy+Georgia%2C+Dahlonega+Georgia++B++B%2C+Dahlonega+Georgia+Cabins%2C+Dahlonega+Georgia+Gold+Rush%2C+Dahlonega+Georgia+Massage%2C+Dahlonega+Hot+Stone+Massage%2CGeorgia+Massage+Therapy%2C+Helen+B++B%2CHelen+Bed++Breakfast%2C+Helen+Georgia+Aroma+Therapy%2C+Helen+Georgia+Cabins%2CHelen+Massage%2C+neuromuscular++massage+Helen+Georgia%2C++Hotel+sHelen+Georgia%2C++Massage+Helen+Georgia+%2C+Octoberfest+Helen+Georgia%2C++Resorts+Helen+Georgia%2C++Restaraunts+Helen+Georgia%2C+Spas+Helen+Georgia%2C++Sports+Massage+Helen+Georgia%2C+Theraputic+Massag+eHelen+Georiga%2C+Hot+Stone+Massage+North+Georgia%2C+Licensed+Massage+North+Georgia%2C++Massage+Unicoi+State+Park+Massage%2C+Personal+Chef%2C+In+home+DiningAlyssa+Karsten+MassageClarkesville+Georgia+MassageCleveland+Georgia+MassageDahlonega+Georgia+Aroma+TherapyDahlonega+Georgia+B++BDahlonega+Georgia+CabinsDahlonega+Georgia+Gold+RushDahlonega+Georgia+MassageDahlonega+Hot+Stone+MassageGeorgia+Massage+TherapyHelen+B++BHelen+Bed++BreakfastHelen+Georgia+Aroma+TherapyHelen+Georgia+CabinsHelen+Georgia+HotelsHelen+Georgia+MassageHelen+Georgia+OctoberfestHelen+Georgia+ResortsHelen+Georgia+RestarauntsHelen+Georgia+SpasHelen+Georgia+Sports+MassageHelen+Georgia+Theraputic+MassageHelen+Georiga+Hot+Stone+MassageNorth+Georgia+Licensed+MassageNorth+Georgia+MassageUnicoi+State+Park+Massage';
var metaContents  = 'A+mobile+massage+company+covering+Dahlonega%2C+Helen%2C+Sautee+Nacoochee%2C+Clarkesville%2C+Cleveland%2C+Blairsville%2C+Gainesville++Dawsonville.++Our+service+offers+clients+all+the+benefits+of+massage+plus+the+convenience+of+traveling+to+you';
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();
};
