/* [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','6301',jdecode('Home'),jdecode(''),'/6301.html','true',[],'',''],
	['PAGE','6352',jdecode('About+Us'),jdecode(''),'/6352.html','true',[],'',''],
	['PAGE','6373',jdecode('Products'),jdecode(''),'/6373.html','true',[],'',''],
	['PAGE','6394',jdecode('Documentation'),jdecode(''),'/6394.html','true',[],'',''],
	['PAGE','6415',jdecode('Contact+Us'),jdecode(''),'/6415.html','true',[],'',''],
	['PAGE','15501',jdecode('Visit+Us'),jdecode(''),'/15501.html','true',[],'',''],
	['PAGE','22801',jdecode('Affiliates'),jdecode(''),'/22801.html','true',[],'',''],
	['PAGE','6436',jdecode('Officers'),jdecode(''),'/6436.html','true',[],'','']];
var siteelementCount=8;
theSitetree.topTemplateName='Padma';
theSitetree.paletteFamily='006699';
theSitetree.keyvisualId='1041';
theSitetree.keyvisualName='mediflasche.jpg';
theSitetree.fontsetId='178';
theSitetree.graphicsetId='217';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='9E9D90';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Padma',
				paletteFamily: 	'006699',
				keyvisualId: 	'1041',
				keyvisualName: 	'mediflasche.jpg',
				fontsetId: 		'178',
				graphicsetId: 	'217',
				contentColor: 	'FFFFFF',
				contentBGColor: '9E9D90',
				a_color: 		'006699',
				b_color: 		'003366',
				c_color: 		'000000',
				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:  '6301',
internalId:  '',
customField: '20110331-210118'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6352',
internalId:  '',
customField: '20111001-131001'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6373',
internalId:  '',
customField: '20100723-125112'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6394',
internalId:  '',
customField: '20110718-163411'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6415',
internalId:  '',
customField: '20100131-202718'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6436',
internalId:  '',
customField: '20111001-124846'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22801',
internalId:  '',
customField: '20110807-121150'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15501',
internalId:  '',
customField: '20110720-123705'
};
var canonHostname = 'cmworker01.yourhostingaccount.com';
var accountId     = 'AENDU0INVAUZ';
var companyName   = 'Sensor+%26+Decontamination%2C+Inc.';
var htmlTitle	  = 'SDI+Environmental+%26+Safety+Products';
var metaKeywords  = 'acid%2C+kit%2C+spill%2C+oil+spill%2C+base%2C+mercury%2C+chemical%2C+pH%2C+safety%2C+toxic%2C+bicarbonate%2C+hazard%2C+cleanup%2C+disposal%2C+nothing+toxic%2C+biohazard%2C+health+and+safety%2C+hazmat%2C+sulfuric+acid%2C+keratin+treatment%2C+battery+acid%2C+hydrochloric+acid%2C+waste+disposal%2C+formaldehyde%2C+acid+base%2C+flash+point%2C+acetic+acid%2C+flammable%2C+hazardous+waste%2C+mercury+insurance%2C+spill+cleanup%2C+soda+caustic%2C+aldehyde%2C+decon%2C+emergency+management%2C+soda+ash%2C+caustic%2C+caustic+soda%2C+embalming+fluid%2C+fire+safety%2C+janitorial+supplies%2C+formalin%2C+encapsulation%2C+personal+protective+equipment%2C+sorbent%2C+acrolein%2C+oil+cleanup%2C+health+hazard%2C+chromic+acid%2C+safety+equipment%2C+neutralizing%2C+web+store%2C+chemical+spill%2C+spill+kit%2C+spill+clean%2C+neutralize%2C+hazardous+waste+disposal%2C+decontamination%2C+vapor+intrusion%2C+chemical+laboratory%2C+mercury+spill%2C+basic+solution%2C+clinical+analysis%2C+analytical+laboratory%2C+ignitable%2C+mercury+spill+kit%2C+encapsulate%2C+formaldehyde+exposure%2C+formaldehyde+treatment%2C+blood+spill+kit%2C+chemical+spill+kit%2C+toxic+vapor%2C+neutralizing+agent%2C+waste+encapsulation';
var metaContents  = 'Sensor++Decontamination%2C+Inc.+%28SDI%29+developed+SpillKleen%C2%AE+hazardous+materials+cleanup+and+decontamination+products+from+high+sorbency%2C+nano-structured+materials.++PetroZorb+sorbents+feature+vapor+suppression+and+flammability+hazard+elimination+with+8-12+mesh+beads%2C+irregular+granules%2C+and+pillows+in+a+variety+of+container+sizes+from+three+to+three+hundred+pounds.++SDI+recently+marketed+the+first+broad-spectrum+chemical+spill+kit+for+analytical%2C+research%2C+and+teaching+laboratories.Sensor++Decontamination%2C+Inc.+assembles+and+distributes+chemical+laboratory+spill+kits+for+neutralizing%2C+absorbing%2C+stabilizing%2C+and+disposing+of+typical+laboratory+spills.++Spills+addressed+include+acids%2C+bases+%28caustics%29%2C+mercury%2C+flammable%2C+aldehyde+%28formaldehyde++gluteraldehyde%29%2C+and+biohazards.++Designed+with+the+emergency%2C+health%2C+and+safety+officer+in+mind+for+the+enforcement+of+the+maintenance+of+spill+kit+contents+with+convenient+re-order+service.';
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();
};

