/* [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 theSitetree=[ 
	['PAGE','14301',jdecode('Home'),jdecode(''),'/14301.html','true',[],''],
	['PAGE','20801',jdecode('Design+%26+Development'),jdecode(''),'/20801/index.html','true',[ 
		['PAGE','28401',jdecode('Proprietary+Products'),jdecode(''),'/20801/28401.html','true',[],'']
	],''],
	['PAGE','20822',jdecode('Manufacturing+Services+'),jdecode(''),'/20822/index.html','true',[ 
		['PAGE','28422',jdecode('Cleanroom+Photos'),jdecode(''),'/20822/28422.html','true',[],'']
	],''],
	['PAGE','34301',jdecode('Automation+Services'),jdecode(''),'/34301.html','true',[],''],
	['PAGE','14422',jdecode('Packaging+and+Sterilization+'),jdecode(''),'/14422.html','true',[],''],
	['PAGE','20843',jdecode('Quality+'),jdecode(''),'/20843.html','true',[],''],
	['PAGE','14401',jdecode('Contact+MEM+and+Directions'),jdecode(''),'/14401.html','true',[],'']];
var siteelementCount=9;
theSitetree.topTemplateName='Movement';
theSitetree.paletteFamily='003390';
theSitetree.keyvisualId='1754';
theSitetree.keyvisualName='krankenhaus.jpg';
theSitetree.fontsetId='292';
theSitetree.graphicsetId='353';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='003390';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Movement',
				paletteFamily: 	'003390',
				keyvisualId: 	'1754',
				keyvisualName: 	'krankenhaus.jpg',
				fontsetId: 		'292',
				graphicsetId: 	'353',
				contentColor: 	'FFFFFF',
				contentBGColor: '003390',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'003390',
				b_color: 		'000000',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14301',
internalId:  '',
customField: '20090501-140635'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14401',
internalId:  '',
customField: '20081112-211250'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14422',
internalId:  '',
customField: '20090501-130615'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34301',
internalId:  '',
customField: '20090430-171438'
};
webappMappings['7008']=webappMappings['7008-3378']={
webappId:    '7008',
documentId:  '14401',
internalId:  '3378',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20801',
internalId:  '',
customField: '20090430-191127'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20822',
internalId:  '',
customField: '20090501-124835'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20843',
internalId:  '',
customField: '20090501-135225'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28422',
internalId:  '',
customField: '20090501-125502'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28401',
internalId:  '',
customField: '20090501-124542'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '14301',
internalId:  '1006',
customField: '1006'
};
var canonHostname = 'cmworker02.yourhostingaccount.com';
var accountId     = 'AENDU0IN2525';
var companyName   = 'MEM%2C+Inc.++Medical+Excellence+of+Madison';
var htmlTitle	  = 'http%3A%2F%2Fmedexmadison.com';
var metaKeywords  = 'MEM+INC%2C+MANUFACTURING+MEDICAL+DEVICE%2C+CONTRACT+MANUFACTURING+MEDICAL+DEVICE%2C+SINGLE+USE+MEDICAL+DEVICE%2C+PLASTIC+FORMING%2C+PLASTIC+MOLDING%2C+MEDICAL+DEVICE+DEVELOPMENT%2C+MEDICAL+DEVICE+ENGINEERING%2C+MEDICAL+DEVICE+TESTING%2C+MEDICAL+DEVICE+EVALUATION%2C+MEDICAL+DEVICE+RE+ENGINEERING%2C+MEDICAL+DEVICE+VALUE+ANALYSIS%2C+MEDICAL+DEVICE+PACKAGING%2C+MEDICAL+DEVICE+COST+REDUCTION%2C+MEDICAL+DEVICE++MANUFACTURING+AUTOMATION%2C+MEDICAL+DEVICE+ASSEMBLY+AND+TESTING%2C+PRODUCT+ASSEMBLY+SERVICES%2C+STERILE+PRODUCT%2C+DISPOSABLE+SURGICAL+INSTRUMENTS%2C+DISPOSABLE+MEDICAL+PRODUCTS%2C+FLEXIBLE+WIRE+TUBING%2C+FLEXIBLE+MEDICAL+TUBING%2C+ISO+REGISTERED+FACILITY%2C+FDA+REGISTERED+FACILITY%2C+PRODUCT+DESIGN%2C+SURGICAL+INSTRUMENTS%2C+MEDICAL+PRODUCTS%2C+ISO+CLASS+7+CLEANROOM%2C+CERTIFIED+CLEAN+ROOM+CLASS+10%2C000%2C+ASSEMBLY+MEDICAL+DEVICE%2C+PVC+BLOW+MOLDED+CUFFS%2C+PVC+BLOW+MOLDED+BALLOONS%2C+ACCESS+CANNUJLA%2C+MIMIMALLY+INVASIVE+SURGICAL+DEVICES%2C+VALVE+DETENT+DEVICE%2C+BLOW+MOLDED%2C+CONTRACT+MEDICAL+DEVICE%2C+BALLOONS%2C+DIP+MOLDED%2C+DIP+MOLDED+INFLATION+BALLOONS%2C+WIRE+REINFORCED+TUBES%2C+STERILIZATION+VALIDATION%2C+LAPARASCOPIC%2C+RETENTION+BALLOON%2C+SURGICAL+DISPOSABLE+INSTRUMENTS%2C+FORM+FILL+SEAL+PACKAGING%2C++CONTRACT+PACKAGING%2C+INDUSTRIAL+DESIGN%2C+PROTOTYPING+PROPRIETARY+PRODUCTS%2C+ENDOSCOPIC%2C+ENDOSCOPY%2C+INJECTION+MOLDING%2C+AIRWAYS%2C+STERILE+AIRWAYS%2C+DISPOSABLE+BALLOON+CANNULA+AND+TROCAR%2C+5.5+MM+BALLOON+CANNULA%2C+12.5+MM+BALLOON+CANNULA%2C+CT+CONTRACT+MANUFACTURER%2C+AUTOMATION+SERVICES%2C+OEM+CONTRACT+MANUFACTURER%2C+OEM+MEDICAL+COMPONENT+SUPPLIER';
var metaContents  = 'MEM%2C+Inc+%28Medical+Excellence+of+Madison%29++is+a+full+service+medical+device+contract+manufacturer+of+sterile%2C+single+use+Class+I+and+Class+II+surgical+devices.+We+offer+design+and+development%2C+rapid+prototyping%2C+supply+chain+management%2Cautomation+services%2Cmanufacturing%2C+sterilization+validation%2C+and+packaging+of+medical+devices+used+in+a+wide+variety+of+medical+fields.+We+specialize+in+balloon+catheters%2C+MIS+surgical+devices+and+trocars%2C+and+airway+management+systems.+We+are+a+FDA+registered+contract+manufacturer+and+are+ISO+13485%3A2003+certified.';
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();
};
