/* [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','5001',jdecode('Home'),jdecode(''),'/5001.html','true',[],''],
	['PAGE','37401',jdecode('About+Us'),jdecode(''),'/37401.html','true',[],''],
	['PAGE','46201',jdecode('Special+Offer'),jdecode(''),'/46201.html','true',[],''],
	['PAGE','39101',jdecode('Place+An+Order'),jdecode(''),'/39101.html','true',[],''],
	['PAGE','63701',jdecode('Diabetic+Products'),jdecode(''),'/63701.html','false',[],''],
	['PAGE','81701',jdecode('Products'),jdecode(''),'/81701.html','true',[],''],
	['PAGE','58101',jdecode('Urological+Products'),jdecode(''),'/58101/index.html','false',[ 
		['PAGE','97301',jdecode('+++++++Catheters'),jdecode(''),'/58101/97301.html','true',[],''],
		['PAGE','97322',jdecode('+++++++Other+Urological'),jdecode(''),'/58101/97322.html','true',[],'']
	],''],
	['PAGE','49101',jdecode('Testimonials'),jdecode(''),'/49101.html','true',[],''],
	['PAGE','49401',jdecode('Healthy+Recipes'),jdecode(''),'/49401.html','true',[],''],
	['PAGE','97201',jdecode('FAQ'),jdecode(''),'/97201.html','true',[],''],
	['PAGE','56001',jdecode('Contact'),jdecode(''),'/56001.html','true',[],''],
	['PAGE','47101',jdecode('Privacy+Policies'),jdecode(''),'/47101.html','true',[],''],
	['PAGE','39601',jdecode('Educational'),jdecode(''),'/39601.html','false',[],''],
	['PAGE','68501',jdecode('Forum'),jdecode(''),'/68501.html','false',[],''],
	['PAGE','50701',jdecode('Our+Mascot'),jdecode(''),'/50701.html','false',[],''],
	['PAGE','59401',jdecode('Other+Links'),jdecode(''),'/59401.html','false',[],''],
	['PAGE','59801',jdecode('New+page'),jdecode(''),'/59801.html','false',[],''],
	['PAGE','115401',jdecode('Urological+Supplies'),jdecode(''),'/115401.html','false',[],'']];
var siteelementCount=20;
theSitetree.topTemplateName='Icon';
theSitetree.paletteFamily='A191AF';
theSitetree.keyvisualId='3427';
theSitetree.keyvisualName='kv_3427.jpg';
theSitetree.fontsetId='10650';
theSitetree.graphicsetId='10746';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='B9AEC3';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Icon',
				paletteFamily: 	'A191AF',
				keyvisualId: 	'3427',
				keyvisualName: 	'kv_3427.jpg',
				fontsetId: 		'10650',
				graphicsetId: 	'10746',
				contentColor: 	'FFFFFF',
				contentBGColor: 'B9AEC3',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				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:  '5001',
internalId:  '',
customField: '20100420-203818'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37401',
internalId:  '',
customField: '20100420-204256'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47101',
internalId:  '',
customField: '20100414-105128'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39101',
internalId:  '',
customField: '20100420-204020'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39601',
internalId:  '',
customField: '20081211-203022'
};
webappMappings['4001']=webappMappings['4001-15907490']={
webappId:    '4001',
documentId:  '81701',
internalId:  '15907490',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46201',
internalId:  '',
customField: '20100420-203907'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49101',
internalId:  '',
customField: '20100414-104559'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49401',
internalId:  '',
customField: '20100414-104810'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50701',
internalId:  '',
customField: '20081211-203114'
};
webappMappings['1003']=webappMappings['1003-aendu0ine42u11e28a91bff']={
webappId:    '1003',
documentId:  '68501',
internalId:  'aendu0ine42u11e28a91bff',
customField: 'en:US'
};
webappMappings['7008']=webappMappings['7008-11290']={
webappId:    '7008',
documentId:  '56001',
internalId:  '11290',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '81701',
internalId:  '',
customField: '20100420-200900'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56001',
internalId:  '',
customField: '20100420-204353'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63701',
internalId:  '',
customField: '20090621-204613'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '115401',
internalId:  '',
customField: '20090621-202951'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '68501',
internalId:  '',
customField: '20081211-194658'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58101',
internalId:  '',
customField: '20090621-223139'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59401',
internalId:  '',
customField: '20081214-172105'
};
webappMappings['7060']=webappMappings['7060-3c68e6e1b17b2426849ecae78d52c8ef']={
webappId:    '7060',
documentId:  '59801',
internalId:  '3c68e6e1b17b2426849ecae78d52c8ef',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59801',
internalId:  '',
customField: '20081207-221056'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '5001',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '97301',
internalId:  '',
customField: '20090411-151522'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '97322',
internalId:  '',
customField: '20090411-151453'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '97201',
internalId:  '',
customField: '20100420-204135'
};
var canonHostname = 'cmworker01.yourhostingaccount.com';
var accountId     = 'AENDU0INE42U';
var companyName   = 'BASKE+MEDICAL+EQUIPMENT+%26+SUPPLY%2C+INC.';
var htmlTitle	  = 'BASKE+MEDICAL';
var metaKeywords  = 'MEDICAL+SUPPLIES%2C+UROLOGICAL%2C+DIABETIC';
var metaContents  = 'UROLOGICAL+AND+DIABETIC+SUPPLIES';
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();
};
