/* [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','6901',jdecode('Home'),jdecode(''),'/6901.html','true',[],''],
	['PAGE','22101',jdecode('SALE'),jdecode(''),'/22101.html','true',[],''],
	['PAGE','6973',jdecode('Mobile+Filter+Units'),jdecode(''),'/6973/index.html','true',[ 
		['PAGE','8801',jdecode('Handycart'),jdecode(''),'/6973/8801.html','true',[],''],
		['PAGE','8101',jdecode('Caremaster'),jdecode(''),'/6973/8101.html','true',[],''],
		['PAGE','8122',jdecode('Cleanmaster'),jdecode(''),'/6973/8122.html','true',[],''],
		['PAGE','8143',jdecode('Strongmaster'),jdecode(''),'/6973/8143.html','true',[],'']
	],''],
	['PAGE','6994',jdecode('Central+Filter+Units'),jdecode(''),'/6994/index.html','true',[ 
		['PAGE','8822',jdecode('Filtercube+2H'),jdecode(''),'/6994/8822.html','true',[],''],
		['PAGE','8843',jdecode('Filtercube+4N+%2F+4H'),jdecode(''),'/6994/8843.html','true',[],''],
		['PAGE','8864',jdecode('ZPF+6H'),jdecode(''),'/6994/8864.html','true',[],''],
		['PAGE','8885',jdecode('Airtech'),jdecode(''),'/6994/8885.html','true',[],'']
	],''],
	['PAGE','6952',jdecode('Suction+Arms'),jdecode(''),'/6952.html','true',[],''],
	['PAGE','7015',jdecode('About+Us'),jdecode(''),'/7015.html','true',[],''],
	['PAGE','7036',jdecode('Contact+Us'),jdecode(''),'/7036.html','true',[],'']];
var siteelementCount=15;
theSitetree.topTemplateName='Office';
theSitetree.paletteFamily='727D9C';
theSitetree.keyvisualId='11165';
theSitetree.keyvisualName='kv_11165.jpg';
theSitetree.fontsetId='32062';
theSitetree.graphicsetId='13879';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Office',
				paletteFamily: 	'727D9C',
				keyvisualId: 	'11165',
				keyvisualName: 	'kv_11165.jpg',
				fontsetId: 		'32062',
				graphicsetId: 	'13879',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				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:     'false'
			  };
var webappMappings = {};
webappMappings['7008']=webappMappings['7008-12983']={
webappId:    '7008',
documentId:  '7036',
internalId:  '12983',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6901',
internalId:  '',
customField: '20090223-114529'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6973',
internalId:  '',
customField: '20090714-145604'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6994',
internalId:  '',
customField: '20090714-145808'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8822',
internalId:  '',
customField: '20090309-135757'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7036',
internalId:  '',
customField: '20090223-124758'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8801',
internalId:  '',
customField: '20090223-114837'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8101',
internalId:  '',
customField: '20090223-115041'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8122',
internalId:  '',
customField: '20090223-115128'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8143',
internalId:  '',
customField: '20090223-115358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8843',
internalId:  '',
customField: '20090223-115853'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8864',
internalId:  '',
customField: '20090223-120155'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8885',
internalId:  '',
customField: '20090223-120447'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6952',
internalId:  '',
customField: '20090223-124604'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7015',
internalId:  '',
customField: '20090222-132400'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22101',
internalId:  '',
customField: '20090908-144651'
};
var canonHostname = 'cmworker03.yourhostingaccount.com';
var accountId     = 'AENDU0INEZPQ';
var companyName   = 'aero+filter+systems+';
var htmlTitle	  = 'aero+filter+systems++-+welding+fume+extraction';
var metaKeywords  = 'weld+fume+extraction%2C+TEKA%2C+welding+supply%2C+weld+smoke+filter%2C+weld+smoke%2C+weld+filter%2C+smoke+extraction';
var metaContents  = 'aero+filter+systems+is+a+leading+supplier+of+weld+fume+extraction+systems.+Our+systems+are+manufactured+by+TEKA+in+Germany.';
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();
};
