/* [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','601',jdecode('Home'),jdecode(''), jdecode('%2F601.html'), 'true',[],'',''],
	['PAGE','5401',jdecode('Our+Team'),jdecode(''), jdecode('%2F5401%2Findex.html'), 'true',[ 
		['PAGE','17501',jdecode('Factory+Cat'),jdecode(''), jdecode('%2F5401%2F17501.html'), 'true',[],'','']
	],'',''],
	['PAGE','5464',jdecode('Sweepers+'),jdecode(''), jdecode('%2F5464.html'), 'true',[],'',''],
	['PAGE','5485',jdecode('Scrubbers+'),jdecode(''), jdecode('%2F5485.html'), 'true',[],'',''],
	['PAGE','5506',jdecode('Burnishers+'),jdecode(''), jdecode('%2F5506.html'), 'true',[],'',''],
	['PAGE','26301',jdecode('Product+Manuals'),jdecode(''), jdecode('%2F26301.html'), 'true',[],'',''],
	['PAGE','32701',jdecode('Parts+List'),jdecode(''), jdecode('%2F32701.html'), 'true',[],'',''],
	['PAGE','5527',jdecode('Rental+Div.'),jdecode(''), jdecode('%2F5527.html'), 'true',[],'',''],
	['PAGE','10122',jdecode('Auto+Div.'),jdecode(''), jdecode('%2F10122.html'), 'true',[],'',''],
	['PAGE','19301',jdecode('Refurbished+Equip'),jdecode(''), jdecode('%2F19301.html'), 'true',[],'',''],
	['PAGE','10501',jdecode('Soap+Solutions'),jdecode(''), jdecode('%2F10501.html'), 'true',[],'',''],
	['PAGE','43901',jdecode('Leasing+Options'),jdecode(''), jdecode('%2F43901.html'), 'true',[],'',''],
	['PAGE','46501',jdecode('Email+Comments'),jdecode(''), jdecode('%2F46501%2Findex.html'), 'true',[ 
		['PAGE','46901',jdecode('Email+Comments+%28follow+up+page%29'),jdecode(''), jdecode('%2F46501%2F46901.html'), 'false',[],'','']
	],'','']];
var siteelementCount=15;
theSitetree.topTemplateName='Akropolis';
theSitetree.paletteFamily='5E5E5E';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10553';
theSitetree.graphicsetId='10448';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='5e5e5e';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'valueweb',
  product: 'WSCSYSSSSLYTCR7V'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Akropolis',
				paletteFamily: 	'5E5E5E',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10553',
				graphicsetId: 	'10448',
				contentColor: 	'FFFFFF',
				contentBGColor: '5e5e5e',
				a_color: 		'5E5E5E',
				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['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '601',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '601',
internalId:  '',
customField: '20110112-164642'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5401',
internalId:  '',
customField: '20110112-165136'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17501',
internalId:  '',
customField: '20091104-112838'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5464',
internalId:  '',
customField: '20110112-165434'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5485',
internalId:  '',
customField: '20110112-165633'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5506',
internalId:  '',
customField: '20081024-121356'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26301',
internalId:  '',
customField: '20091005-181220'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32701',
internalId:  '',
customField: '20110112-165754'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5527',
internalId:  '',
customField: '20110112-170015'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10122',
internalId:  '',
customField: '20110112-170059'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19301',
internalId:  '',
customField: '20110914-113002'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10501',
internalId:  '',
customField: '20091104-113810'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43901',
internalId:  '',
customField: '20110112-171129'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46501',
internalId:  '',
customField: '20070613-210109'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46901',
internalId:  '',
customField: '20070613-210858'
};
webappMappings['7008']=webappMappings['7008-10476']={
webappId:    '7008',
documentId:  '46501',
internalId:  '10476',
customField: 'language:en;country:US;'
};
var webAppHostname = 'cgi-wsc.chi.us.siteprotect.com:80';
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050INENG7';
var companyName   = 'Factory+Cat+Industrial+Sweepers+%26+Scrubbers';
var htmlTitle	  = 'Floor+Sweepers+%26+Scrubbers+from+Factory+Cat+-+Seattle%2C+Portland%2C+Oregon+and+Washington+%3A%3A+Hager+Enterprises';
var metaKeywords  = 'Industrial+sweepers%2C+scrubbers%2C+maintenance+equipment%2C+factory+cat%2C+floor%2C+Commercial%2C++rentals%2C+floor+care%2C+cleaning+equipment%2C+Advance%2C+tennant%2C++minute+Man%2C+Soap%2C+Model+390%2C+Model+250%2C+Model+290%2C+Tom+Cat%2C+Vancouver%2C+Seattle%2C+Tacoma%2C+Everett%2C+Kent%2C+Auburn%2C+Olympia%2C+%2C+Spokane%2C+Oregon%2C+Portland%2C+Salem%2C+The+Dalles%2C+Hood+River%2C+Eugene%2C++Bend%2C+Washington';
var metaContents  = 'Distributing+Factory+Cat+Floor+Sweepers+and+Scrubbers%2C+Hager+Enterprises+specializes+in+the+Sales+and+Service+of+sweepers+and+scrubbers+in+Washington+%28Vancouver%2C+Seattle%2C+Tacoma%2C+Everett%2C+Kent%2C+Auburn%2C+Olympia%2C+and+Spokane%29+and+Oregon+%28Portland%2C+Salem%2C+The+Dalles%2C+Hood+River%2C+Eugene%2C+and+Bend%29+including+Advance%2C+Tennant%2C+Minute+Man%2C+Soap%2C+Model+390%2C+Model+250%2C+Model+290+and+Tom+Cat.';
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();
};

