/* [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','33',jdecode('Home'),jdecode(''),'/33.html','true',[],''],
	['PAGE','396',jdecode('About+us'),jdecode(''),'/396.html','true',[],''],
	['PAGE','414',jdecode('Our+Services'),jdecode(''),'/414.html','true',[],''],
	['PAGE','468',jdecode('Contact'),jdecode(''),'/468.html','true',[],''],
	['PAGE','495',jdecode('Tips+%26+Tricks'),jdecode(''),'/495.html','false',[],''],
	['PAGE','2669',jdecode('Guestbook'),jdecode(''),'/2669/index.html','true',[ 
		['PAGE','2668',jdecode('Read+Guestbook'),jdecode(''),'/2669/2668.html','false',[],'']
	],'']];
var siteelementCount=7;
theSitetree.topTemplateName='Clearline';
theSitetree.paletteFamily='B71602';
theSitetree.keyvisualId='3288';
theSitetree.keyvisualName='kv_3288.jpg';
theSitetree.fontsetId='10589';
theSitetree.graphicsetId='10715';
theSitetree.contentColor='B71602';
theSitetree.contentBGColor='FFFFFF';
var theTemplate={
				name: 			'Clearline',
				paletteFamily: 	'B71602',
				keyvisualId: 	'3288',
				keyvisualName: 	'kv_3288.jpg',
				fontsetId: 		'10589',
				graphicsetId: 	'10715',
				contentColor: 	'B71602',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'B71602',
				e_color: 		'989696',
				f_color: 		'989696',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '33',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '414',
internalId:  '',
customField: '20080221-162059'
};
webappMappings['1002']=webappMappings['1002-2669AHW050INX33G']={
webappId:    '1002',
documentId:  '2669',
internalId:  '2669AHW050INX33G',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33',
internalId:  '',
customField: '20080304-185547'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2669',
internalId:  '',
customField: '20070315-163347'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '396',
internalId:  '',
customField: '20080630-133412'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '468',
internalId:  '',
customField: '20080218-211119'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '495',
internalId:  '',
customField: '20070315-035848'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2668',
internalId:  '',
customField: '20070315-163347'
};
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050INX33G';
var companyName   = 'FIRE+RIDES+INCORPORATED';
var htmlTitle	  = 'Fire+Rides+Inc.';
var metaKeywords  = 'Fire%2C+engine%2C+rental%2C+birthday%2C+party%2C+fire+truck%2C+unique%2C+celebration%2C+entertainment%2C++function%2C+reception%2C+tailgate%2C+new+york%2C';
var metaContents  = 'fire+rides+inc%2C+fire+engine%2C+rental+fire+truck%2C+birthday%2C+party%2C+unique%2C+celebration%2C+entertainment%2C++function%2C+reception%2C+tailgate%2C+new+york%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();
};
