/* [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','116',jdecode('Home'),jdecode(''),'/116.html','true',[],'',''],
	['PAGE','1880',jdecode('i3+Services'),jdecode(''),'/1880.html','true',[],'',''],
	['PAGE','3127',jdecode('i3+Sample+Projects'),jdecode(''),'/3127.html','true',[],'',''],
	['PAGE','1898',jdecode('i3+Reports'),jdecode(''),'/1898.html','true',[],'',''],
	['PAGE','1907',jdecode('Contact%2FRequest+Form'),jdecode(''),'/1907/index.html','true',[ 
		['PAGE','2156',jdecode('Order%2FSubscribe+%28follow+up+page%29'),jdecode(''),'/1907/2156.html','false',[],'','']
	],'','']];
var siteelementCount=6;
theSitetree.topTemplateName='Aeskulap';
theSitetree.paletteFamily='C00405';
theSitetree.keyvisualId='2496';
theSitetree.keyvisualName='labor.jpg';
theSitetree.fontsetId='435';
theSitetree.graphicsetId='487';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Aeskulap',
				paletteFamily: 	'C00405',
				keyvisualId: 	'2496',
				keyvisualName: 	'labor.jpg',
				fontsetId: 		'435',
				graphicsetId: 	'487',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'FFFFFF',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '116',
internalId:  '1006',
customField: '1006'
};
webappMappings['5003']=webappMappings['5003-tid:1;pid:WSCSYSSSSLYTCPXC']={
webappId:    '5003',
documentId:  '116',
internalId:  'tid:1;pid:WSCSYSSSSLYTCPXC',
customField: 'en:US:'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '116',
internalId:  '',
customField: '20100426-132158'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1880',
internalId:  '',
customField: '20100426-132219'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3127',
internalId:  '',
customField: '20100426-132237'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1898',
internalId:  '',
customField: '20100426-132251'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1907',
internalId:  '',
customField: '20100426-132501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2156',
internalId:  '',
customField: '20060819-124559'
};
webappMappings['7008']=webappMappings['7008-7813']={
webappId:    '7008',
documentId:  '1907',
internalId:  '7813',
customField: 'language:en;country:US;'
};
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050IN3154';
var companyName   = 'i3+Consult+-+Integrating+Healthcare';
var htmlTitle	  = 'i3+Consult+-+Integrated+Intelligence+for+Healthcare+Industries';
var metaKeywords  = 'strategic+marketing%2C+financial+management%2C+operational+management+solutions%2C+healthcare%2C+pharmaceutical%2C+life+science+companies+Strategic+Marketing+Services+Value+Chain+Analysis+Life+Cycle+Analysis+i3+Framework+Approach+Financial+Management+Services+R++D+Manufacturing+Consultancy+Benchmarking+Customised+Reports';
var metaContents  = 'i3+Consult+is+an+information-based+consulting%2C+integration+and+IT+outsourcing++service+entity+committed+to+providing+premium+strategic+marketing%2C+financial+and+operational+management+solutions+for+healthcare%2C+pharmaceutical+and+other+life+science+companies.++i3+Consult+is+well+poised+to+offer+consultancy+solutions+for+companies+wanting+to+gain+leverage%2C+growth+and+sustainability+for+their+healthcare+products+in+Europe%2C+Japan+and+North+America.++';
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();
};
