/* [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','1401',jdecode('Home'),jdecode(''),'/1401.html','true',[],'',''],
	['PAGE','1452',jdecode('Home+%26+Office+Cleaning'),jdecode(''),'/1452.html','true',[],'',''],
	['PAGE','1473',jdecode('Window+Cleaning'),jdecode(''),'/1473.html','true',[],'',''],
	['PAGE','1494',jdecode('Carpet+Cleaning'),jdecode(''),'/1494/index.html','true',[ 
		['PAGE','1515',jdecode('Upholstery+Cleaning'),jdecode(''),'/1494/1515.html','true',[],'','']
	],'',''],
	['PAGE','16001',jdecode('Power+Washing'),jdecode(''),'/16001.html','true',[],'',''],
	['PAGE','1599',jdecode('Client+Testimonials'),jdecode(''),'/1599.html','true',[],'',''],
	['PAGE','22901',jdecode('Abracadabra+Celebrates'),jdecode(''),'/22901.html','true',[],'',''],
	['PAGE','1578',jdecode('Contact+Us'),jdecode(''),'/1578.html','true',[],'','']];
var siteelementCount=9;
theSitetree.topTemplateName='Antigua';
theSitetree.paletteFamily='617F92';
theSitetree.keyvisualId='6905';
theSitetree.keyvisualName='kv_6905.jpg';
theSitetree.fontsetId='11214';
theSitetree.graphicsetId='12036';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='809DAF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Antigua',
				paletteFamily: 	'617F92',
				keyvisualId: 	'6905',
				keyvisualName: 	'kv_6905.jpg',
				fontsetId: 		'11214',
				graphicsetId: 	'12036',
				contentColor: 	'FFFFFF',
				contentBGColor: '809DAF',
				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['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1401',
internalId:  '',
customField: '20110627-154854'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1494',
internalId:  '',
customField: '20100607-093902'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1599',
internalId:  '',
customField: '20091103-133810'
};
webappMappings['1501']=webappMappings['1501-7157241']={
webappId:    '1501',
documentId:  '1401',
internalId:  '7157241',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1452',
internalId:  '',
customField: '20100409-164439'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1473',
internalId:  '',
customField: '20100408-094920'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1515',
internalId:  '',
customField: '20091103-133713'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1401',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16001',
internalId:  '',
customField: '20091103-133741'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1578',
internalId:  '',
customField: '20091103-133855'
};
webappMappings['1002']=webappMappings['1002-1599aendu0in2r45']={
webappId:    '1002',
documentId:  '1599',
internalId:  '1599aendu0in2r45',
customField: 'icq=false'
};
webappMappings['7008']=webappMappings['7008-2132']={
webappId:    '7008',
documentId:  '1578',
internalId:  '2132',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22901',
internalId:  '',
customField: '20110627-154522'
};
var canonHostname = 'cmworker02.yourhostingaccount.com';
var accountId     = 'AENDU0IN2R45';
var companyName   = 'It%27s+Like+Magic%21';
var htmlTitle	  = 'Abracadabra+Cleaning%2C+LLC';
var metaKeywords  = 'cleaning%2C+house+cleaning%2C+office+cleaning%2C+rental+cleaning%2C+carpet+cleaning%2C+upholstery+cleaning%2C+window+cleaning%2C+rotovac+carpet+restoration%2C+cleaning+with+magic%2C+clean-ups%2C+clean+ups%2C+clean+house%2C+cleaner%2C+cleaning+service%2C+janitorial%2C+commercial+cleaning%2C+housecleaner%2C+housekeeper%2C+maid+service%2C+custodial+cleaning%2C+residential+cleaning%2C+residential+window+cleaning%2C+residential+carpet+cleaning%2C+commercial+window+cleaning%2C+commercial+carpet+cleaning%2C+stain+remover%2C+stain+removal%2C+carpet+stain%2C+streaky+windows%2C+tough+to+remove+stains%2C+wine+stains%2C+coffee+stains%2C+blood+stains%2C+furniture+cleaning%2C+couch+cleaning%2C+recliner+cleaning%2C+abracadabra%2C+abracadabra+cleaning%2C+ocean+county%2C+bayville%2C+toms+river%2C+barnegat%2C+forked+river%2C+pine+beach%2C+beachwood%2C+bricktown%2C+pt.+pleasant%2C+ocean+gate%2C+monmouth+county%2C+howell%2C+freehold%2C+lacey%2C+lanoka+harbor%2C+seaside+heights%2C+seaside+park%2C+lavallette%2C+ortley+beach%2C+abracadabra+cleaning+llc%2C+abracadabra+llc%2C+storefront+cleaning%2C+store+front+cleaning%2C+store+front%2C+fully+insured%2C+gift+certificates%2C+christmas+gift%2C+birthday+gift%2C+practical+gift%2C+easy+gift%2C+christmas+present%2C+birthday+present%2C+practical+present%2C+easy+present%2C+mothers+day%2C+grandparents+day%2C+mothers+day%2C+grandparents+day%2C+fathers+day%2C+fathers+day%2C+surprise%2C+spotless%2C+kitchen+cleaning%2C+floor+cleaning%2C+state+approved%2C+state+registered%2C+reliable%2C+thorough%2C+honest%2C+insured+and+bonded+service%2C+rental+turnovers%2C+real+estate%2C+move+in+cleaning%2C+move+out+cleaning%2C+spring+cleaning%2C+fall+cleaning%2C+powerwashing%2C+power+washing%2C+holiday+gifts%2C+08721%2C+08753%2C+abracadabra+cleaning%2C+';
var metaContents  = '*Cleaning+Service*+Quality%2C+Detailed+and+Customized+Cleaning%2C+offering+Home+and+Office+Cleaning+and+Window+Cleaning%2C+As+well+as+Carpet++and+Upholstery+Cleaning+with+the+ROTOVAC+Restoration+System.+We+also+offer+power+washing+for+your+home%2C+walkway%2C+driveway%2C+decks+and+patios+and+much+much+more.+Reliable+Service+-+Satisfaction+Guaranteed.';
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();
};

