/* [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','17501',jdecode('Home'),jdecode(''),'/17501.html','true',[],'',''],
	['PAGE','17552',jdecode('Compliance'),jdecode(''),'/17552/index.html','true',[ 
		['PAGE','148101',jdecode('Chemicals'),jdecode(''),'/17552/148101.html','true',[],'',''],
		['PAGE','17573',jdecode('Food+%26+Drugs'),jdecode(''),'/17552/17573.html','true',[],'','']
	],'',''],
	['PAGE','17699',jdecode('IP'),jdecode(''),'/17699.html','true',[],'',''],
	['PAGE','148122',jdecode('Litigation'),jdecode(''),'/148122.html','true',[],'',''],
	['PAGE','17615',jdecode('Profile'),jdecode(''),'/17615/index.html','true',[ 
		['PAGE','190201',jdecode('Publications'),jdecode(''),'/17615/190201.html','true',[],'','']
	],'',''],
	['PAGE','17594',jdecode('Contact'),jdecode(''),'/17594.html','true',[],'','']];
var siteelementCount=9;
theSitetree.topTemplateName='Seifenblase';
theSitetree.paletteFamily='FF9B5E';
theSitetree.keyvisualId='2353';
theSitetree.keyvisualName='blanko.jpg';
theSitetree.fontsetId='379';
theSitetree.graphicsetId='430';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'grp11-veriow',
  product: 'WSCSYSSSSLYTCPII'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Seifenblase',
				paletteFamily: 	'FF9B5E',
				keyvisualId: 	'2353',
				keyvisualName: 	'blanko.jpg',
				fontsetId: 		'379',
				graphicsetId: 	'430',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'FFFFFF',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'CC3300',
				e_color: 		'FF3300',
				f_color: 		'FF9966',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17501',
internalId:  '',
customField: '20101117-101323'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17552',
internalId:  '',
customField: '20101109-163624'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17573',
internalId:  '',
customField: '20101110-101514'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '148101',
internalId:  '',
customField: '20101110-092847'
};
webappMappings['7008']=webappMappings['7008-16895']={
webappId:    '7008',
documentId:  '17594',
internalId:  '16895',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17699',
internalId:  '',
customField: '20101110-093410'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '148122',
internalId:  '',
customField: '20101109-165459'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17615',
internalId:  '',
customField: '20101110-113021'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17594',
internalId:  '',
customField: '20101117-100028'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '190201',
internalId:  '',
customField: '20101110-100356'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVFL30INHPQE';
var companyName   = 'INTEGRATIVE+BIOSTRATEGIES%2C+LLC';
var htmlTitle	  = 'Integrative+Biostrategies%2C+LLC';
var metaKeywords  = '+%E2%80%8Ebiological+sciences%E2%80%8E%2C+%E2%80%8Epharmacology%E2%80%8E%2C+%E2%80%8Eregulatory+afffairs%E2%80%8E%2C+%E2%80%8Etoxicology%E2%80%8E%2C+%E2%80%8Elitigation+support%E2%80%8E%2C+%E2%80%8Eexpert+testimony%E2%80%8E';
var metaContents  = 'Integrative+Biostrategies%2C+LLC+%28IB%29+works+at+the+interface+of+the+biological+sciences%2C+regulatory+affairs%2C+and+business+decisions+to+provide+its+clients+with+science-based+solutions+to+issues+associated+with+the+successful+development+and+stewardship+of+products+marketed+in+the+therapeutic%2C+diagnostic%2C+biotechnology%2C+food%2C+and+chemical+industry+sectors.+IB%27s+particular+skills+are+centered+in+the+ability+to+effectively+analyze%2C+integrate%2C+and+communicate+complex+scientific+issues+in+business+and+regulatory+contexts+to+allow+for+the+efficient+and+successful+commercialization+of+products.';
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();
};

