/* [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','10601',jdecode('Home'),jdecode(''),'/10601.html','true',[],''],
	['PAGE','10801',jdecode('What+We+Rent'),jdecode(''),'/10801/index.html','true',[ 
		['PAGE','19701',jdecode('Skid+Steer+Loaders'),jdecode(''),'/10801/19701.html','true',[],''],
		['PAGE','19722',jdecode('Mini+Excavators'),jdecode(''),'/10801/19722.html','true',[],''],
		['PAGE','22401',jdecode('Scissor+Lifts'),jdecode(''),'/10801/22401.html','true',[],'']
	],''],
	['PAGE','10673',jdecode('Our+Team'),jdecode(''),'/10673.html','true',[],''],
	['PAGE','10715',jdecode('Contact'),jdecode(''),'/10715.html','true',[],''],
	['PAGE','16601',jdecode('Used+Equipment'),jdecode(''),'/16601.html','true',[],'']];
var siteelementCount=8;
theSitetree.topTemplateName='Anlage';
theSitetree.paletteFamily='B9BAEE';
theSitetree.keyvisualId='2021';
theSitetree.keyvisualName='zahnrad2.jpg';
theSitetree.fontsetId='331';
theSitetree.graphicsetId='390';
theSitetree.contentColor='00004D';
theSitetree.contentBGColor='B9BAEE';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Anlage',
				paletteFamily: 	'B9BAEE',
				keyvisualId: 	'2021',
				keyvisualName: 	'zahnrad2.jpg',
				fontsetId: 		'331',
				graphicsetId: 	'390',
				contentColor: 	'00004D',
				contentBGColor: 'B9BAEE',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'B9BAEE',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['7008']=webappMappings['7008-20620']={
webappId:    '7008',
documentId:  '10715',
internalId:  '20620',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10601',
internalId:  '',
customField: '20100129-092702'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10801',
internalId:  '',
customField: '20090906-142308'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10715',
internalId:  '',
customField: '20090906-103613'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10673',
internalId:  '',
customField: '20100119-121202'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16601',
internalId:  '',
customField: '20091130-094035'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19701',
internalId:  '',
customField: '20100129-081332'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19722',
internalId:  '',
customField: '20100129-081255'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '10601',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '10801',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '19701',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '19722',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '10673',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '10715',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '16601',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22401',
internalId:  '',
customField: '20100207-074355'
};
var canonHostname = 'cmworker03.yourhostingaccount.com';
var accountId     = 'AENDU0INV086';
var companyName   = 'DURANTE+RENTALS+++718+239-6969';
var htmlTitle	  = 'Construction+Equipment+Rental+Contractor+Rental+Bronx%2C+Queens%2C+Westchester%2C+NYC%2C+NY%2C+Brooklyn';
var metaKeywords  = 'Air+Compressor%2C+arrowboard%2C+bar+bender%2C+rebar+bender%2C+boom+lift%2C+breaker%2C+jack+hammer%2C+buggies%2C+chainsaw%2C+concrete+mixer%2C+demo+saw%2C+demolition+saw%2C+cutoff+saw%2C+excavator%2C+mini+excavator%2C+forklift%2C+rough+terrain+forklift%2C+generator%2C+genset%2C+grinder%2C+hammer+drill%2C+light+tower%2C+masonry+saw%2C+message+board%2C+vms%2C+mortar+mixer%2C+planer%2C+pressure+washer%2C+pump%2C+trash+pump%2C+rebar+cutter%2C+rammer%2C+jumping+jack+tamper%2C+tamper%2C+rock+splitter%2C+roller%2C+vibratory+roller%2C+sand+blaster%2C+scissor+lift%2C+sinker+drill%2C+clay+digger%2C+skid+steer%2C+bobcat%2C+tile+saw%2C+trowel%2C+vibrator%2C+walk+behind+saw%2C+welder%2C+atlas+copco%2C+dynapac%2C+stihl%2C+husqvarna%2C+stone%2C+wacker%2C+multiquip%2C+sullivan%2C+apt%2C+allmand+brothers%2C+genie%2C+jlg%2C++ihi%2C+caterpillar%2C+cat%2C+ingersoll+rand%2C+pelham%2C+mount+vernon%2C+yonkers%2C+white+plains%2C+new+rochelle%2C+eastchester%2C+port+chester%2C+harrison%2C+rye%2C+mamaroneck%2C+purchase%2C+tarrytown%2C+elmsford%2C+larchmont%2C+bronxville%2C+ardsley%2C+valhalla%2C+scarsdale%2C+hartsdale%2C+greenburgh%2C+tuckahoe%2C+thornwood';
var metaContents  = 'Durante+Rentals+-+Construction+Equipment+Rentals+-+Bronx%2C+New+York%2C+Manhattan%2C+Queens%2C+Staten+Island%2C+Brooklyn%2C+NYC%2C+NY%2C+Westchester%2C+Nassau%2C+Suffolk%2C+Long+Island%2C+new+jersey%2C+connecticut%2C+used+construction+equipment+sales%2C+Contractor+Rentals%2C+Tool+Rentals';
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();
};
