/* [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','16723',jdecode('Home'),jdecode(''), jdecode('%2F16723.html'), 'true',[],'',''],
	['PAGE','1601',jdecode('About+Us'),jdecode(''), jdecode('%2F1601.html'), 'true',[],'',''],
	['PAGE','2001',jdecode('Store'),jdecode(''), jdecode('%2F2001.html'), 'true',[],'',''],
	['PAGE','29823',jdecode('Policies'),jdecode(''), jdecode('%2F29823%2Findex.html'), 'true',[ 
		['PAGE','31223',jdecode('Privacy'),jdecode(''), jdecode('%2F29823%2F31223.html'), 'true',[],'',''],
		['PAGE','31623',jdecode('Shipping'),jdecode(''), jdecode('%2F29823%2F31623.html'), 'true',[],'',''],
		['PAGE','32023',jdecode('Returns'),jdecode(''), jdecode('%2F29823%2F32023.html'), 'true',[],'','']
	],'',''],
	['PAGE','2022',jdecode('Contact+Us'),jdecode(''), jdecode('%2F2022.html'), 'true',[],'',''],
	['PAGE','19923',jdecode('Scholarship'),jdecode(''), jdecode('%2F19923.html'), 'true',[],'','']];
var siteelementCount=9;
theSitetree.topTemplateName='Multimedia';
theSitetree.paletteFamily='98B4CA';
theSitetree.keyvisualId='11111';
theSitetree.keyvisualName='kv_11111.jpg';
theSitetree.fontsetId='32006';
theSitetree.graphicsetId='13832';
theSitetree.contentColor='262E36';
theSitetree.contentBGColor='98B4CA';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'endurance',
  product: 'WSCSYSSSSLY0XRNC'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Multimedia',
				paletteFamily: 	'98B4CA',
				keyvisualId: 	'11111',
				keyvisualName: 	'kv_11111.jpg',
				fontsetId: 		'32006',
				graphicsetId: 	'13832',
				contentColor: 	'262E36',
				contentBGColor: '98B4CA',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1601',
internalId:  '',
customField: '20110321-180106'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2001',
internalId:  '',
customField: '20091025-140754'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2022',
internalId:  '',
customField: '20120205-204851'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19923',
internalId:  '',
customField: '20120205-204923'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16723',
internalId:  '',
customField: '20120205-204425'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29823',
internalId:  '',
customField: '20110311-144548'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31223',
internalId:  '',
customField: '20110311-144521'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31623',
internalId:  '',
customField: '20120205-204659'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32023',
internalId:  '',
customField: '20120205-204615'
};
var webAppHostname = 'cgiwsc.enhancedsitebuilder.com:80';
var canonHostname = 'cmworker01.yourhostingaccount.com';
var accountId     = 'AENDU0IN3U99';
var companyName   = '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Med+In+Stock%2C+LLC%2C++Toll+Free%3A+%28888%29+887-5028';
var htmlTitle	  = 'Med+In+Stock%2C+LLC';
var metaKeywords  = 'Med+In+Stock%2C+Med+In+Stock+LLC%2C+Medical+Supplies%2C+Surgical+Products%2C+Discount+Medical+Supplies%2C+Discount+Surgical+Products%2C+Wholesale+Medical+Supplies%2C+Wholesale+Surgical+Products%2C+Abdominal+Pads%2C+Instrument+Trays%2C+Amonia+Inhalants%2C+Invalid+Rings%2C+Aspirators%2C+Irrigator+Sets%2C+Blood+Pressure+Monitors%2C+Bandages%2C+Knives%2C+Bed+Pans%2C+Medicine+Cups%2C+Blades%2C+Oral+Airways%2C+Blood+Collection+Tubes%2C+Packing+Strips%2C+Blood+Lancets%2C+Prep+Pads%2C+Buckets%2C+Catheters%2C+Scalpels%2C+Sharps+Containers%2C+Dressing+Trolleys%2C+Douches%2C+Stitch+Cutters%2C+Surgical+Tapes%2C+Emesis+Basins%2C+Kidney+Trays%2C+Syringes%2C+Needles%2C+Face+Masks%2C+Thermometer+Jars%2C+Quantum+BIA+Analyzers%2C+Forcep+Jars%2C+Tourniquets%2C+Gallipots%2C+Urinals%2C+Gauze%2C+Urinary+Leg+Bags%2C+Gloves%2C+Urine+Collection+Cups%2C+Hot+Water+Bottles%2C+Urine+Specimen+Collectors%2C++Stethoscopes%2C+Stool+Specimen+Collectors%2C+Hot+Packs%2C+Cold+Packs%2C+Vaccine+Carriers%2C+Ice+Packs%2C+Wash+Basins%2C+Drapes%2C+Operating+Room+Caps%2C+Shoe+Covers%2C+Suture+Removal+Kits%2C+Inflators%2C+buy+medical+supplies+for+Haiti%2C+Haiti+Relief';
var metaContents  = 'Med+In+Stock%2C+LLC+has+established+relationships+with+major+manufacturers+in+order+to+provide+the+lowest+priced+high+quality+surgical+products%2C+medical+supplies+and+equipment+to+medical+practitioners%2C+hospitals%2C+surgery+centers%2C+clinics%2C+pharmacies%2C+laboratory+testing+facilities%2C+and+other+medical+organizations+worldwide.+Med+In+Stocks+prices+and+customer+service+are+unbeatable.+Seeing+is+believing%3B+so+visit+Med+In+Stocks+website+at+www.medinstock.com.+If+you+have+additional+needs+such+as+a+special+product+request%2C+contact+Med+In+Stock.+Med+In+Stock+will+work+quickly+to+assist+you.';
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();
};

