/* [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','701',jdecode('Home'),jdecode(''),'/701.html','true',[],'',''],
	['PAGE','14501',jdecode('Expertise'),jdecode(''),'/14501.html','true',[],'',''],
	['PAGE','10701',jdecode('Projects'),jdecode(''),'/10701/index.html','false',[ 
		['PAGE','8664',jdecode('Electrosurgery'),jdecode(''),'/10701/8664.html','true',[],'',''],
		['PAGE','15201',jdecode('Ophthalmology'),jdecode(''),'/10701/15201.html','true',[],'',''],
		['PAGE','8643',jdecode('Respiratory+Care+%26+Ventilation'),jdecode(''),'/10701/8643.html','true',[],'',''],
		['PAGE','8622',jdecode('Neurosurgery+%26+Monitoring'),jdecode(''),'/10701/8622.html','true',[],'',''],
		['PAGE','10722',jdecode('Chiropractic+'),jdecode(''),'/10701/10722.html','true',[],'','']
	],'',''],
	['PAGE','8685',jdecode('The+Team'),jdecode(''),'/8685/index.html','true',[ 
		['PAGE','15222',jdecode('Business+Development'),jdecode(''),'/8685/15222.html','false',[],'',''],
		['PAGE','15243',jdecode('Business+Management+%26+Turn-around'),jdecode(''),'/8685/15243.html','false',[],'',''],
		['PAGE','15264',jdecode('Regulatory+Affairs'),jdecode(''),'/8685/15264.html','false',[],'',''],
		['PAGE','15285',jdecode('Engineering'),jdecode(''),'/8685/15285.html','false',[],'',''],
		['PAGE','15306',jdecode('Intellectual+Property'),jdecode(''),'/8685/15306.html','false',[],'','']
	],'',''],
	['PAGE','14522',jdecode('Clients'),jdecode(''),'/14522.html','true',[],'',''],
	['PAGE','10743',jdecode('Capabilities'),jdecode(''),'/10743.html','false',[],'',''],
	['PAGE','6601',jdecode('Contacts+%2F+Resources'),jdecode(''),'/6601/index.html','true',[ 
		['PAGE','6622',jdecode('Address'),jdecode(''),'/6601/6622.html','true',[],'',''],
		['PAGE','23101',jdecode('Map'),jdecode(''),'/6601/23101.html','true',[],'','']
	],'','']];
var siteelementCount=19;
theSitetree.topTemplateName='Medium';
theSitetree.paletteFamily='000000';
theSitetree.keyvisualId='2170';
theSitetree.keyvisualName='medizin.jpg';
theSitetree.fontsetId='357';
theSitetree.graphicsetId='408';
theSitetree.contentColor='DDDDDD';
theSitetree.contentBGColor='000000';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Medium',
				paletteFamily: 	'000000',
				keyvisualId: 	'2170',
				keyvisualName: 	'medizin.jpg',
				fontsetId: 		'357',
				graphicsetId: 	'408',
				contentColor: 	'DDDDDD',
				contentBGColor: '000000',
				a_color: 		'000000',
				b_color: 		'8EBFC6',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '23101',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:false;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '701',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '701',
internalId:  '',
customField: '20100120-214940'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14501',
internalId:  '',
customField: '20100211-121505'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10701',
internalId:  '',
customField: '20100211-121716'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8664',
internalId:  '',
customField: '20100211-121743'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15201',
internalId:  '',
customField: '20070223-193139'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8643',
internalId:  '',
customField: '20100211-122010'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8622',
internalId:  '',
customField: '20100211-122309'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10722',
internalId:  '',
customField: '20061114-034552'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8685',
internalId:  '',
customField: '20061213-161531'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15222',
internalId:  '',
customField: '20070223-193139'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15243',
internalId:  '',
customField: '20070223-193139'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15264',
internalId:  '',
customField: '20070223-193139'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15285',
internalId:  '',
customField: '20070223-193139'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15306',
internalId:  '',
customField: '20070223-193139'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14522',
internalId:  '',
customField: '20080407-020909'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10743',
internalId:  '',
customField: '20061114-034552'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6601',
internalId:  '',
customField: '20080730-104519'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6622',
internalId:  '',
customField: '20080730-104737'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23101',
internalId:  '',
customField: '20100211-123042'
};
var canonHostname = 'wsc-worker01.chi.us.siteprotect.com';
var accountId     = 'AHW050IN2HBZ';
var companyName   = 'Xinetix+MPD';
var htmlTitle	  = 'Xinetix+Medical+Product+Development';
var metaKeywords  = 'Medical%2C+Product+development%2C+ophthalmology%2C+electrosurgery%2C+electrosurgical%2C+medical+equipment%2C+expert+witness%2C+product+liability%2C+product+failure+analysis%2C+engineering%2C+software+development%2C+business+development%2C+business+turn-around%2C+interim+management%2C+medical+dispoasables%2C+fluidics%2C+ultrasound%2C+patent+infringement%2C+respiratory+care';
var metaContents  = 'Xinetix+specializes+in+medical+product+development+and+business+development+for+startup+to+mid-sized+medical+device+and+healthcare+companies.';
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();
};

