/* [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','4920',jdecode('Home'),jdecode(''),'/4920.html','true',[],'',''],
	['PAGE','4971',jdecode('New+Construction'),jdecode(''),'/4971.html','true',[],'',''],
	['PAGE','5013',jdecode('Service'),jdecode(''),'/5013/index.html','true',[ 
		['PAGE','5034',jdecode('Drain+Cleaning'),jdecode(''),'/5013/5034.html','true',[],'',''],
		['PAGE','5055',jdecode('Water+Heaters'),jdecode(''),'/5013/5055.html','true',[],'','']
	],'',''],
	['PAGE','5076',jdecode('Sewer+%26+Water'),jdecode(''),'/5076.html','true',[],'',''],
	['PAGE','5220',jdecode('Email+Us'),jdecode(''),'/5220.html','true',[],'','']];
var siteelementCount=7;
theSitetree.topTemplateName='Startup';
theSitetree.paletteFamily='978561';
theSitetree.keyvisualId='1369';
theSitetree.keyvisualName='rohrzange.jpg';
theSitetree.fontsetId='232';
theSitetree.graphicsetId='290';
theSitetree.contentColor='002F2F';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Startup',
				paletteFamily: 	'978561',
				keyvisualId: 	'1369',
				keyvisualName: 	'rohrzange.jpg',
				fontsetId: 		'232',
				graphicsetId: 	'290',
				contentColor: 	'002F2F',
				contentBGColor: 'FFFFFF',
				a_color: 		'978561',
				b_color: 		'333333',
				c_color: 		'000000',
				d_color: 		'FF0000',
				e_color: 		'FF0000',
				f_color: 		'FF0000',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['7008']=webappMappings['7008-15520']={
webappId:    '7008',
documentId:  '5220',
internalId:  '15520',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4920',
internalId:  '',
customField: '20100315-112045'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4971',
internalId:  '',
customField: '20100315-112300'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5013',
internalId:  '',
customField: '20100315-112421'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5034',
internalId:  '',
customField: '20100315-112452'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5055',
internalId:  '',
customField: '20100315-110527'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5076',
internalId:  '',
customField: '20100315-111510'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5220',
internalId:  '',
customField: '20100311-135724'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4920',
internalId:  '1006',
customField: '1006'
};
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVF340I7CGRZ';
var companyName   = 'Todds+Plumbing+Inc.';
var htmlTitle	  = '';
var metaKeywords  = 'sewer+sump+pump%2C+water+heater+pipes%2C+faucet+water+heater%2C+toilet+sump+pump%2C+plumber+plumbing%2C+plumbers+plumbing%2C+repair+sump+pump%2C+water+heater+drain+pipe%2C+water+lines+garbage+disposals%2C+drain+a+water+heater%2C+garbage+disposals%2C+plumbing+garbage+disposals%2C+master+plumber+water+heater%2C+grease+build+up%2C+cleaning+a+clogged+drain%2C+your+plumbing+problems%2C+drain+and+sewer+plumber%2C+residential+plumbing+system%2C+sewer+drain+service%2C+water+lines%2C+drain+lines%2C+plumbing+service+companies%2C+all+service+plumbing%2C+emergency+plumbing+service%2C+jetting+service%2C+hydro+jetting%2C+jetting+drains%2C+service+request%2C+drain+cleaning+service%2C+plumbing+tankless+water%2C+repair+water+heater%2C+sewer+cleaning%2C+plumbing+faucet+repair%2C+clogged+toilet%2C+stopped+up+toilet%2C+clogged+drain%2C+stopped+up+drain%2C+leaking+faucet%2C+leaking+drain%2C+dripping+drain%2C+slow+drain%2C+fayetteville+plumber%2C+newnan+plumber%2C+coweta+plumber%2C+peachtree+city+plumber%2C+griffin+plumber%2C+henry+county+plumber%2C+pike+county+plumber%2C+plumbing+leak%2C+green+plumbing%2C+going+green+in+new+homes%2C+';
var metaContents  = 'Todd%27s+Plumbing+Inc.+%28TPI%29+specializes+in+residential+new+home+plumbing.+Our+residential+plumbing+division+installs+plumbing+in+an+average+of+400+new+homes+a+year.+These+beautiful+homes+have+between+2+and+10+bathrooms+of+plumbing+including+several+green+homes+that+are+friendly+to+the+environment+with+such+features+as+tankless+water+heaters%2C+fixtures+that+use+less+water+than+the+government+standard+and+super+low+consumption+toilets.+TPI+also+sets+the+standard+in+Residential+Remodel+and+Commercial+Remodel+plumbing.+TPI%27s+Remodel+division+takes+on+all+projects+ranging+from+changing+1+fixture+to+a+full+basement+job+to+large+commercial+remodels.+Todd%27s+Plumbing+is+at+the+forefront+of+service+plumbing.+Our+first-rate+service+technicians+take+great+pride+in+the+quality+and+care+of+their+work+and+your+property.+TPI+strives+to+provide+it%27s+clients+with+the+most+knowledgeable+technicians.+All+of+our+staff+are+Georgia+state+licensed+plumbers+and+are+active+in+continuing+their+plumbing+education+with+a+minimum+of+4+hours+of+C.E.+credits+a+year.+Todd%27s+Plumbing+Inc.+has+been+servicing+Fayetteville%2C+Peachtree+City%2C+Newnan%2C+Coweta%2C+Pike%2C+Spaulding%2C+Henry+and+Clayton+County+since+1995.';
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();
};

