/* [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','801',jdecode('Home'),jdecode(''),'/801.html','true',[],''],
	['PAGE','852',jdecode('Adresses'),jdecode(''),'/852.html','true',[],''],
	['PAGE','894',jdecode('Contact'),jdecode(''),'/894.html','true',[],''],
	['PAGE','915',jdecode('About+us'),jdecode(''),'/915/index.html','true',[ 
		['PAGE','936',jdecode('Our+Team'),jdecode(''),'/915/936.html','true',[],'']
	],''],
	['PAGE','22501',jdecode('Links'),jdecode(''),'/22501.html','true',[],''],
	['PAGE','32067',jdecode('Motorcycle+Towing'),jdecode(''),'/32067.html','true',[],''],
	['PAGE','17401',jdecode('Pictures'),jdecode(''),'/17401/index.html','true',[ 
		['PAGE','1041',jdecode('Pictures+II'),jdecode(''),'/17401/1041.html','true',[],''],
		['PAGE','11001',jdecode('Pictures+III'),jdecode(''),'/17401/11001.html','true',[],''],
		['PAGE','11022',jdecode('Pictures+IV'),jdecode(''),'/17401/11022.html','true',[],'']
	],''],
	['PAGE','32076',jdecode('Junk+Cars'),jdecode(''),'/32076.html','true',[],''],
	['PAGE','9301',jdecode('Stuff+For+Sale'),jdecode(''),'/9301/index.html','true',[ 
		['PAGE','9322',jdecode('Used+Vehicles+For+Sale'),jdecode(''),'/9301/9322.html','true',[],'']
	],''],
	['PAGE','29101',jdecode('Gas+Prices'),jdecode(''),'/29101.html','true',[],''],
	['PAGE','16901',jdecode('Customer+Comments'),jdecode(''),'/16901/index.html','true',[ 
		['PAGE','17301',jdecode('Customer+Comments+%28follow+up+page%29'),jdecode(''),'/16901/17301.html','false',[],'']
	],''],
	['PAGE','6106',jdecode('Guestbook'),jdecode(''),'/6106/index.html','true',[ 
		['PAGE','6101',jdecode('Read+Guestbook'),jdecode(''),'/6106/6101.html','false',[],'']
	],'']];
var siteelementCount=19;
theSitetree.topTemplateName='Cable';
theSitetree.paletteFamily='D30303';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10367';
theSitetree.graphicsetId='10527';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='000000';
var theTemplate={
				name: 			'Cable',
				paletteFamily: 	'D30303',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10367',
				graphicsetId: 	'10527',
				contentColor: 	'FFFFFF',
				contentBGColor: '000000',
				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: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '801',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '852',
internalId:  '',
customField: '20080718-120921'
};
webappMappings['1002']=webappMappings['1002-6106AHW050INEITN']={
webappId:    '1002',
documentId:  '6106',
internalId:  '6106AHW050INEITN',
customField: 'icq=false'
};
webappMappings['1001']=webappMappings['1001-ahw050ineitn5aa4b3865f04e24b']={
webappId:    '1001',
documentId:  '16901',
internalId:  'ahw050ineitn5aa4b3865f04e24b',
customField: ''
};
webappMappings['1001']=webappMappings['1001-ahw050ineitn5aa4b3865f04e24b']={
webappId:    '1001',
documentId:  '17301',
internalId:  'ahw050ineitn5aa4b3865f04e24b',
customField: 'followUp'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '801',
internalId:  '',
customField: '20081230-115552'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '894',
internalId:  '',
customField: '20081111-135020'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '915',
internalId:  '',
customField: '20080718-121038'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '936',
internalId:  '',
customField: '20080419-110610'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22501',
internalId:  '',
customField: '20081213-130534'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32067',
internalId:  '',
customField: '20090103-150444'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17401',
internalId:  '',
customField: '20090103-150609'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1041',
internalId:  '',
customField: '20081230-121158'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11001',
internalId:  '',
customField: '20081230-122228'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11022',
internalId:  '',
customField: '20081230-122642'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32076',
internalId:  '',
customField: '20080820-173104'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9301',
internalId:  '',
customField: '20080419-104722'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9322',
internalId:  '',
customField: '20090103-152053'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29101',
internalId:  '',
customField: '20080718-115648'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16901',
internalId:  '',
customField: '20070904-221839'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17301',
internalId:  '',
customField: '20070823-025902'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6106',
internalId:  '',
customField: '20080419-104613'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6101',
internalId:  '',
customField: '20070904-221931'
};
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050INEITN';
var companyName   = 'Duffy%27s+24hr+Towing+%26+Road+Service';
var htmlTitle	  = '24+Hour+Towing';
var metaKeywords  = 'towing%2C+towing+service%2C+roadservice%2C+service%2C+tire%2C+battery%2C+gas%2C+fuel%2C+car%2C+truck%2C+van%2C+winch%2C+winch+service%2C+winching%2C+jumpstart%2C+flat+tire%2C+impound%2C+storage%2C+uhaul%2C+uhaul+trucks%2C+trailer%2C+uhaul+trailers%2C+pinellas%2C+pinellas+county%2C+yellowpages%2C+flatbed%2C+flatbed+service%2C+rollback%2C+rollback+service%2C+repair%2C+repair+service%2C+transmission%2C+transmission+service%2C+auto%2C+automotive%2C+auto+parts%2C+auto+repair%2C+brakes%2C+hotrod%2C+speed%2C+map%2C+24hour%2C+24+hour+towing%2C+24hr%2C+duffy+duffys+towing%2C+duffys24hrtowing%2C+727%2C+custom%2C+custom+cars%2C+classic%2C+classic+cars%2C+for+sale%2C+cars+for+sale%2C+used+cars%2C+used+cars+for+sale%2C+motorcycle%2C+motorcycle+towing%2C+scooter%2C+jetski%2C+chopper%2C';
var metaContents  = 'towing%2C+towing+service%2C+roadservice%2C+service%2C+tire%2C+battery%2C+gas%2C+fuel%2C+car%2C+truck%2C+van%2C+winch%2C+winchservice%2C+winching%2C+jumpstart%2C+flattire%2C+impound%2C+storage%2C+uhaul%2C+trucks%2C+trailer%2C+trailers%2C+pinellas%2C+pinellas+county%2C+yellowpages%2C+flatbed%2C+flatbed+service%2C+rollback%2C+rollback+service%2C+repair%2C+repairservice%2C+transmisson%2C+transmisson+service%2C+auto%2C+automotive%2C+auto+parts%2C+auto+repair%2C+brakes%2C+hotrod%2C+speed%2C+map%2C+24+hour%2C+24+hour+towing%2C+24hr%2C+duffy%2C+duffys+towing%2C+duffys24hrtowing%2C+727%2C+custom%2C+custom+cars%2C+classic%2C+classic+cars%2C+for+sale%2C+cars+for+sale%2C+used+cars%2C+used+cars+for+sale%2C+motorcycle%2C+motorcycle+Towing%2C+Scooter%2C+Jetski%2C+chopper%2C';
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();
};
