/* [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('Welcome'),jdecode(''), jdecode('%2F2101.html'), 'true',[],'',''],
	['PAGE','8101',jdecode('Special+Offers'),jdecode(''), jdecode('%2F8101.html'), 'true',[],'',''],
	['PAGE','2801',jdecode('Menu+of+Modalities'),jdecode(''), jdecode('%2F2801.html'), 'true',[],'',''],
	['PAGE','72701',jdecode('Classes+%26+Workshops'),jdecode(''), jdecode('%2F72701.html'), 'true',[],'',''],
	['PAGE','4601',jdecode('Calendar+of+Events'),jdecode(''), jdecode('%2F4601.html'), 'true',[],'',''],
	['PAGE','34701',jdecode('What+to+Expect+%2F+FAQ'),jdecode(''), jdecode('%2F34701.html'), 'true',[],'',''],
	['PAGE','2864',jdecode('Office+Info+%2F+Policy'),jdecode(''), jdecode('%2F2864.html'), 'true',[],'','']];
var siteelementCount=7;
theSitetree.topTemplateName='Easylife';
theSitetree.paletteFamily='B650B7';
theSitetree.keyvisualId='5820';
theSitetree.keyvisualName='kv_5820.jpg';
theSitetree.fontsetId='11098';
theSitetree.graphicsetId='11870';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'qwest',
  product: 'WSCSYSSSSLYTCPH7'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Easylife',
				paletteFamily: 	'B650B7',
				keyvisualId: 	'5820',
				keyvisualName: 	'kv_5820.jpg',
				fontsetId: 		'11098',
				graphicsetId: 	'11870',
				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:     'false'
			  };
var webappMappings = {};
webappMappings['1002']=webappMappings['1002-2101ahw050inzokt']={
webappId:    '1002',
documentId:  '2101',
internalId:  '2101ahw050inzokt',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2101',
internalId:  '',
customField: '20120206-225518'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2101',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72701',
internalId:  '',
customField: '20120203-182829'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2801',
internalId:  '',
customField: '20120203-184222'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4601',
internalId:  '',
customField: '20120206-213526'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2864',
internalId:  '',
customField: '20120206-224553'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8101',
internalId:  '',
customField: '20120131-113354'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34701',
internalId:  '',
customField: '20111224-150802'
};
var webAppHostname = 'cgi-wsc.chi.us.siteprotect.com:80';
var canonHostname = 'wsc-worker01.chi.us.siteprotect.com';
var accountId     = 'AHW050INZOKT';
var companyName   = 'Healing+Arts+Therapeutic+Massage';
var htmlTitle	  = 'Healing+Arts+Therapeutic+Massage+-+563.652.4880+-+Feel+the+difference.';
var metaKeywords  = 'massage+maquoketa+massage+therapy+maquoketa+massage+iowa+massage+in+maquoketa%2C+IA+maquoketa+massage+therapy+reiki+therapy+steam+ear+coning+ear+candling+prenatal+pregnancy+licensed+therapist+therapies+holistic+holism+natural+naturally+relax+relaxation+relaxing+peaceful+sports+sport+athlete+athletes+athletic+athletics+rehabilitation+rehabilitate+rehabilitative+help+helpful+stress+stress-free+stressful+AMTA+American+Massage+Therapy+Association+Dubuque+Maquoketa+Iowa+QC+Quad+Cities+Davenport+Bettendorf+Preston+Miles+Bellevue+La+Motte+Andrew+Fulton+Zwingle+Otter+Creek+Springbrook+Spragueville+Sabula+Savanna+IL+Galena+IL+Cascade+Facebook+Healing+Arts+Therapeutic+Massage+HealingArtsMaq.com+www.HealingArtsMaq.com+HealingArtsMaq+HealingArts+healingartsmaq%40qwestoffice.net+visa%2Fmastercard+visa+mastercard+master+card+credit+card+debit+card+gift+certificates+thai+massage+table+thai+massage+thai+on+the+table+massage+traditional+thai+massage+thailand+massage+lazy+man%27s+yoga+assisted+yoga+hatha+yoga+thai+yoga+massage+traditional+thai+yoga+massage+dr.+jivaka+traditional+thai+massage+medicine+traditional+thai+massage+mat+traditional+thai+massage+floor+thai+massage+maquoketa+ancient+thai+massage+healing+yoga+class+yoga+classes+yoga+studio+traditional+thai+massage+thai+yoga+massage+massage+discounts+jackson+county+massage+jackson+county+iowa+massage+eastern+iowa+massage+iowa+massage+Reiki+class+reiki+classes+learn+reiki+reiki+practitioner+reiki+therapy+reiki+therapist+reiki+training+reiki+certification+Margie+Donatsch+reiki+instructor+usui+reiki+training+level+one+usui+reiki+training+level+1+usui+reiki+training+level+1+usui+reiki+training+reiki+instructor+energy+therapy+energy+therapies+reiki+training+class+reiki+training+classes+reiki+certification+reiki+certificate+register+for+reiki+class+upcoming+reiki+class+upcoming+reiki+classes+massage+quad+cities+affordable+massage+quad+cities+massage+deals+quad+cities+massage+deals+davenport+massage+affordable+massage+davenport+davenport+affordable+massage+massage+QC+massage+QC+area+massage+gift+certificates+excellent+gift+idea+excellent+gift+certificates+valentines+day+gift+idea+valentine%27s+day+gift+certificates+valentines+day+gift+certificates+valentine%27s+day+gift+idea+mother%27s+day+gift+idea+mother%27s+day+gift+certificate+mothers+day+gift+idea+mothers+day+gift+certificate+midwest+massage+massage+midwest+massage+getaway+massage+specials+massage+deals+fathers+day+gift+certificates+fathers+day+gift+idea+father%27s+day+gift+certificate+father%27s+day+gift+idea+boss+day+gift+idea+boss+bosses+day+gift+idea+boss%27s+day+gift+idea+boss+day+massage+bosses+day+massage+boss%27s+day+massage+boss+day+deals+boss+day+offers+boss+day+special+boss+day+specials+bosses+day+deals+bosses+day+offers+bosses+day+special+bosses+day+specials+boss%27s+day+deals+boss%27+day+offers+boss%27s+day+special+boss%27s+day+specials+boss+day+on-site+massage+boss+day+chair+massage+bosses+day+on-site+massage+bosses+day+chair+massage+boss%27s+day+on-site+massage+boss%27s+day+chair+massage+christmas+gift+ideas+christmas+gift+certificates+christmas+massage+certificates+holiday+gift+ideas+holiday+gift+certificates+holiday+massage+certificates+best+massage+in+maquoketa+best+massage+in+jackson+county+best+massage+in+jackson+county+iowa+best+massage+in+eastern+iowa+best+massage+in+the+midwest+best+massage+at+affordable+prices+four+hour+massage+4+hour+massage+four-hour+massage+4-hour+massage+three+hour+massage+three-hour+massage+3+hour+massage+3-hour+massage+two+hour+massage+2+hour+massage+two-hour+massage+2-hour+massage+90+minute+massage+ninety+minute+massage+ninety-minute+massage+90-minute+massage+massage+discounts+massage+deals+massage+specials+massage+special+offers+massage+therapy+massage+clinic+massage+studio+massage+office+massage+therapy+office+massage+therapy+studio+therapeutic+massage+office+therapeutic+massage+studio+therapeutic+massage+clinic+professional+massage+office+professional+massage+clinic+professional+massage+therapy+professional+massage+studio+RELAY+IOWA+RElay%2C+IA+Relay+IA+Relay%2C+IOWa+Relay+Iowa+2012+Relay%2C+Iowa+2012+Relay+IA+2012+Relay%2C+IA+2012';
var metaContents  = 'Healing+Arts+Therapeutic+Massage+-+You%27re+in+good+hands.+%3A%29';
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();
};

