/* [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.html','true',[],'',''],
	['PAGE','15001',jdecode('Products'),jdecode(''),'/15001/index.html','true',[ 
		['PAGE','15022',jdecode('Audiometers'),jdecode(''),'/15001/15022.html','true',[],'',''],
		['PAGE','15043',jdecode('Tympanometers'),jdecode(''),'/15001/15043.html','true',[],'',''],
		['PAGE','15064',jdecode('OAE%2FABR'),jdecode(''),'/15001/15064.html','true',[],'',''],
		['PAGE','15085',jdecode('ASSEP'),jdecode(''),'/15001/15085.html','true',[],'',''],
		['PAGE','15106',jdecode('VNG%2FENG'),jdecode(''),'/15001/15106.html','true',[],'',''],
		['PAGE','65003',jdecode('Calorics'),jdecode(''),'/15001/65003.html','true',[],'',''],
		['PAGE','15127',jdecode('Real+Ear'),jdecode(''),'/15001/15127.html','true',[],'',''],
		['PAGE','15148',jdecode('Amplification'),jdecode(''),'/15001/15148.html','true',[],'',''],
		['PAGE','15169',jdecode('COR%2FVRA'),jdecode(''),'/15001/15169.html','true',[],'',''],
		['PAGE','65495',jdecode('Video+Otoscope'),jdecode(''),'/15001/65495.html','true',[],'',''],
		['PAGE','15190',jdecode('Sound+Rooms'),jdecode(''),'/15001/15190.html','true',[],'',''],
		['PAGE','15232',jdecode('Used%2FDemo+Equipment'),jdecode(''),'/15001/15232.html','true',[],'','']
	],'',''],
	['PAGE','15211',jdecode('Audiometric+Software'),jdecode(''),'/15211.html','true',[],'',''],
	['PAGE','65605',jdecode('Hearing+Aid+Batteries'),jdecode(''),'/65605.html','true',[],'',''],
	['PAGE','15253',jdecode('Service'),jdecode(''),'/15253/index.html','true',[ 
		['PAGE','15274',jdecode('Calibration'),jdecode(''),'/15253/15274.html','true',[],'',''],
		['PAGE','15295',jdecode('Service+Contracts'),jdecode(''),'/15253/15295.html','true',[],'',''],
		['PAGE','15316',jdecode('Repairs'),jdecode(''),'/15253/15316.html','true',[],'',''],
		['PAGE','53101',jdecode('Remote+Support'),jdecode(''),'/15253/53101.html','true',[],'','']
	],'',''],
	['PAGE','15337',jdecode('Audiometric+Supplies'),jdecode(''),'/15337.html','true',[],'',''],
	['PAGE','15358',jdecode('News+and+Events'),jdecode(''),'/15358.html','true',[],'',''],
	['PAGE','15379',jdecode('Online+Specials'),jdecode(''),'/15379/index.html','true',[ 
		['PAGE','15400',jdecode('Monthly+Special'),jdecode(''),'/15379/15400.html','true',[],'',''],
		['PAGE','15421',jdecode('Used%2FDemo+Equipment'),jdecode(''),'/15379/15421.html','true',[],'','']
	],'',''],
	['PAGE','15442',jdecode('Contact+Us'),jdecode(''),'/15442.html','true',[],'',''],
	['PAGE','65323',jdecode('Reference+Links'),jdecode(''),'/65323/index.html','true',[ 
		['PAGE','65332',jdecode('CPT+Coding'),jdecode(''),'/65323/65332.html','true',[],'',''],
		['PAGE','65341',jdecode('Leasing+Info'),jdecode(''),'/65323/65341.html','true',[],'','']
	],'',''],
	['PAGE','47201',jdecode('Q%26A+Forums'),jdecode(''),'/47201.html','true',[],'','']];
var siteelementCount=31;
theSitetree.topTemplateName='Contrast';
theSitetree.paletteFamily='B42F2F';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='16627';
theSitetree.graphicsetId='12213';
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: 			'Contrast',
				paletteFamily: 	'B42F2F',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'16627',
				graphicsetId: 	'12213',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				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['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '501',
internalId:  '1006',
customField: '1006'
};
webappMappings['1003']=webappMappings['1003-ahw050inx30b11ac503efb4']={
webappId:    '1003',
documentId:  '47201',
internalId:  'ahw050inx30b11ac503efb4',
customField: 'en:US:'
};
webappMappings['1501']=webappMappings['1501-187582']={
webappId:    '1501',
documentId:  '501',
internalId:  '187582',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20100104-125653'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15211',
internalId:  '',
customField: '20100126-141346'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15001',
internalId:  '',
customField: '20100525-122145'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15022',
internalId:  '',
customField: '20100525-120002'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15043',
internalId:  '',
customField: '20100525-120203'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15064',
internalId:  '',
customField: '20100525-120806'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15358',
internalId:  '',
customField: '20100217-154630'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15379',
internalId:  '',
customField: '20080408-202300'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15400',
internalId:  '',
customField: '20100330-094027'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15085',
internalId:  '',
customField: '20100525-120933'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15106',
internalId:  '',
customField: '20100221-173111'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15127',
internalId:  '',
customField: '20080206-160654'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15148',
internalId:  '',
customField: '20080206-160745'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15169',
internalId:  '',
customField: '20080206-160817'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15190',
internalId:  '',
customField: '20080206-160843'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15232',
internalId:  '',
customField: '20100104-151726'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15253',
internalId:  '',
customField: '20080206-160952'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15274',
internalId:  '',
customField: '20080206-161004'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15295',
internalId:  '',
customField: '20080206-161016'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15316',
internalId:  '',
customField: '20080125-233051'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53101',
internalId:  '',
customField: '20090305-112858'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15337',
internalId:  '',
customField: '20080225-132623'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15421',
internalId:  '',
customField: '20090227-075205'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15442',
internalId:  '',
customField: '20100218-155224'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47201',
internalId:  '',
customField: '20080130-215150'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65003',
internalId:  '',
customField: '20100502-190603'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65323',
internalId:  '',
customField: '20100218-154733'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65332',
internalId:  '',
customField: '20100218-153238'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65341',
internalId:  '',
customField: '20100218-155323'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65495',
internalId:  '',
customField: '20100502-192439'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65605',
internalId:  '',
customField: '20100615-105258'
};
var canonHostname = 'wsc-worker01.chi.us.siteprotect.com';
var accountId     = 'AHW050INX30B';
var companyName   = 'Biocoustics+Instruments%2C+Inc.';
var htmlTitle	  = 'Biocoustics+Instruments%2C+Inc.';
var metaKeywords  = 'bioacoustics++biocoustics++audbase++audibase++tympanometers++tymp++audiometers++vng++eng++real+ear++hearing+aid+fitting++oae++abr++audiometric+software++audiometric+reports++61++tympstar++gsi-38++gsi-37++grason+stadler++gsi++audioscan++verifit++rm500++rm500sl++audiology++maryland++virginia++d.c.++sound+rooms++sound+booths++audiometric++realear+real+ear';
var metaContents  = 'audbase++sales+and+service+of+audiometric+equipment++audiometric+equipment++sell+audiometers++sell+tympanometers++hearing+aid+fitting++audiometric+software++audiometric+reports++audiology+service++audbase+demo++audbase++audiology+software++audiobase';
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();
};
