/* [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','501',jdecode('Home'),jdecode(''),'/501/index.html','true',[ 
		['PAGE','17601',jdecode('Home+%28follow+up+page%29'),jdecode(''),'/501/17601.html','false',[],'','']
	],'',''],
	['PAGE','552',jdecode('Expertise'),jdecode(''),'/552/index.html','true',[ 
		['PAGE','27701',jdecode('Applications'),jdecode(''),'/552/27701.html','true',[],'',''],
		['PAGE','5701',jdecode('Technologies'),jdecode(''),'/552/5701.html','true',[],'',''],
		['PAGE','5722',jdecode('Industries'),jdecode(''),'/552/5722.html','true',[],'','']
	],'',''],
	['PAGE','5401',jdecode('Gallery'),jdecode(''),'/5401.html','true',[],'',''],
	['PAGE','573',jdecode('Services'),jdecode(''),'/573/index.html','true',[ 
		['PAGE','5743',jdecode('Consulting'),jdecode(''),'/573/5743.html','true',[],'',''],
		['PAGE','5764',jdecode('Project+Mgt'),jdecode(''),'/573/5764.html','true',[],'','']
	],'',''],
	['PAGE','615',jdecode('About+us'),jdecode(''),'/615.html','true',[],'',''],
	['PAGE','113701',jdecode('Contact'),jdecode(''),'/113701.html','true',[],'','']];
var siteelementCount=12;
theSitetree.topTemplateName='Filofax';
theSitetree.paletteFamily='003366';
theSitetree.keyvisualId='520';
theSitetree.keyvisualName='zeitlos.jpg';
theSitetree.fontsetId='66';
theSitetree.graphicsetId='62';
theSitetree.contentColor='666666';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'aplus',
  product: 'WSCSYSSSSLYTCPLI'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Filofax',
				paletteFamily: 	'003366',
				keyvisualId: 	'520',
				keyvisualName: 	'zeitlos.jpg',
				fontsetId: 		'66',
				graphicsetId: 	'62',
				contentColor: 	'666666',
				contentBGColor: 'FFFFFF',
				a_color: 		'003366',
				b_color: 		'66CCFF',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '501',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17601',
internalId:  '',
customField: '20070618-100750'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20110106-153054'
};
webappMappings['7008']=webappMappings['7008-395']={
webappId:    '7008',
documentId:  '501',
internalId:  '395',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '552',
internalId:  '',
customField: '20110106-152610'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27701',
internalId:  '',
customField: '20110106-151821'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5701',
internalId:  '',
customField: '20110106-151832'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5722',
internalId:  '',
customField: '20110106-151844'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5401',
internalId:  '',
customField: '20110111-071612'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '573',
internalId:  '',
customField: '20110106-152549'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5743',
internalId:  '',
customField: '20110106-151905'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5764',
internalId:  '',
customField: '20110106-151921'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '615',
internalId:  '',
customField: '20110106-152537'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '113701',
internalId:  '',
customField: '20110106-152453'
};
var webAppHostname = 'cm4all.aplus.net:80';
var canonHostname = 'cm4all01.carrierzone.com';
var accountId     = 'AAPLU0INL1Z2';
var companyName   = 'INDUSTRIAL+EYE';
var htmlTitle	  = 'INDUSTRIAL+EYE+MACHINE+VISION+INTEGRATION';
var metaKeywords  = 'cognex++DVT++PPT++Acuity++Keyence++Banner++system+integrator++automation++Insight++VisionPro++Intellect++Camera++Inspection++Guidance++Gauging+Identification+datamatrix+barcode+Checker+Dataman+thomas+register+Automotive+power+train+Food+and+beverage++++++++Munitions++++++++Appliance++house+wares++++++++Packaging+++++++Candy+and+confectionary++Print+and+mail+sortation++Medical+and+pharma++++++Electrical+connectors++3-D+True+position+measurement++++++++Robotic+pick+and+place+++Defect+picking+on+conveyor++++++++Hi-speed+orientation+checking++Surface+inspection+on+pills+and+seals++Print+inspection+on+critical+devices++Document+sorting+and+inspection++Code+verification+and+routing++++Hi-Mag+Gauging+of+precision+components++++++++';
var metaContents  = 'Machine+vision+integration++Factory+automation++Vision-enabled+robotics++Sorting++Guidance++Inspection++Gauging++Identification++Turnkey+implementation';
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();
};

