/* [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','1401',jdecode('Home'),jdecode(''),'/1401.html','true',[],'',''],
	['PAGE','1452',jdecode('About+us'),jdecode(''),'/1452/index.html','true',[ 
		['PAGE','47312',jdecode('Weather'),jdecode(''),'/1452/47312.html','true',[],'','']
	],'',''],
	['PAGE','1473',jdecode('Oil+Skimmers'),jdecode(''),'/1473/index.html','true',[ 
		['PAGE','1578',jdecode('Price+list'),jdecode(''),'/1473/1578.html','true',[],'',''],
		['PAGE','23001',jdecode('Return+of+Investment'),jdecode(''),'/1473/23001.html','true',[],'',''],
		['PAGE','19201',jdecode('FLEXO40.410+Dimension'),jdecode(''),'/1473/19201.html','false',[],'',''],
		['PAGE','19701',jdecode('FLEXO40.810+Dimension'),jdecode(''),'/1473/19701.html','false',[],'',''],
		['PAGE','1557',jdecode('Fact+sheet'),jdecode(''),'/1473/1557.html','false',[],'','']
	],'',''],
	['PAGE','5301',jdecode('Why+Use+Oil+Skimmers'),jdecode(''),'/5301.html','true',[],'',''],
	['PAGE','1494',jdecode('Chain+Skimmer'),jdecode(''),'/1494.html','true',[],'',''],
	['PAGE','1515',jdecode('O-Ring+Skimmer'),jdecode(''),'/1515.html','true',[],'',''],
	['PAGE','1536',jdecode('FAQ%26%23x27%3Bs'),jdecode(''),'/1536.html','true',[],'',''],
	['PAGE','1620',jdecode('Contact+Us'),jdecode(''),'/1620.html','true',[],'',''],
	['PAGE','30801',jdecode('Our+Customers'),jdecode(''),'/30801/index.html','false',[ 
		['PAGE','30901',jdecode('Testimonies++'),jdecode(''),'/30801/30901.html','true',[],'','']
	],'',''],
	['PAGE','1662',jdecode('Request+Product+Info'),jdecode(''),'/1662.html','true',[],'',''],
	['PAGE','27001',jdecode('Info+For+Reps+%26+Distributors'),jdecode(''),'/27001/index.html','true',[ 
		['PAGE','10101',jdecode('Mnf+reps+Inquire'),jdecode(''),'/27001/10101.html','false',[],'','']
	],'',''],
	['PAGE','27601',jdecode('Warranty+Registration'),jdecode(''),'/27601.html','true',[],'','']];
var siteelementCount=20;
theSitetree.topTemplateName='Champagne';
theSitetree.paletteFamily='426388';
theSitetree.keyvisualId='11354';
theSitetree.keyvisualName='kv_11354.jpg';
theSitetree.fontsetId='31943';
theSitetree.graphicsetId='13786';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='426388';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Champagne',
				paletteFamily: 	'426388',
				keyvisualId: 	'11354',
				keyvisualName: 	'kv_11354.jpg',
				fontsetId: 		'31943',
				graphicsetId: 	'13786',
				contentColor: 	'000000',
				contentBGColor: '426388',
				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:     'false'
			  };
var webappMappings = {};
webappMappings['7008']=webappMappings['7008-18326']={
webappId:    '7008',
documentId:  '1662',
internalId:  '18326',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1401',
internalId:  '',
customField: '20101213-142208'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1452',
internalId:  '',
customField: '20090930-202156'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1473',
internalId:  '',
customField: '20090723-120221'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1494',
internalId:  '',
customField: '20090723-120424'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1515',
internalId:  '',
customField: '20090723-120527'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1536',
internalId:  '',
customField: '20090719-121530'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1557',
internalId:  '',
customField: '20090717-150026'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1578',
internalId:  '',
customField: '20090719-121433'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30801',
internalId:  '',
customField: '20090719-100638'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1620',
internalId:  '',
customField: '20090723-120626'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19201',
internalId:  '',
customField: '20090718-121731'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1662',
internalId:  '',
customField: '20090719-121720'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5301',
internalId:  '',
customField: '20090723-120301'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1401',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-19828563']={
webappId:    '1501',
documentId:  '1401',
internalId:  '19828563',
customField: '1501'
};
webappMappings['7008']=webappMappings['7008-18346']={
webappId:    '7008',
documentId:  '10101',
internalId:  '18346',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10101',
internalId:  '',
customField: '20090717-230302'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19701',
internalId:  '',
customField: '20090718-121647'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23001',
internalId:  '',
customField: '20090723-120904'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27001',
internalId:  '',
customField: '20090719-121805'
};
webappMappings['7008']=webappMappings['7008-18771']={
webappId:    '7008',
documentId:  '27601',
internalId:  '18771',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27601',
internalId:  '',
customField: '20090719-121818'
};
webappMappings['7080']=webappMappings['7080-823']={
webappId:    '7080',
documentId:  '47312',
internalId:  '823',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30901',
internalId:  '',
customField: '20090719-101012'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47312',
internalId:  '',
customField: '20100817-161845'
};
var canonHostname = 'cmworker01.yourhostingaccount.com';
var accountId     = 'AENDU0IN32L0';
var companyName   = '';
var htmlTitle	  = 'The+only+oil+skimmer+with+a+chain';
var metaKeywords  = 'Flexo%2C+Oil+Skimmer%2C+Skimmer%2C+Flexo+Oil+Skimmer%2C+Oil-Skimmers%2C+Coolant+Oil+Skimmers%2C+Coolant+Maintenance%2C+Fluid+Maintenance%2C+Part+washer+oil+skimmer%2C++Skimmer+for+part+washer%2C+Chain+skimmer%2C+Chain+type+skimmer%2Coil+skimmer+chain+type%2C+oil+skimmer+o-ring+type';
var metaContents  = 'Oil+Skimmer+with+a+patent+chain%2C+effectively+removes+tramp+oils+from+coolant+tanks%2C+part+washers%2C+and+industrial+process+%2F+cleaning+baths.';
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();
};

