/* [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','3801',jdecode('Home'),jdecode(''),'/3801.html','true',[],''],
	['PAGE','3852',jdecode('About+us'),jdecode(''),'/3852.html','true',[],''],
	['PAGE','6601',jdecode('+Professional+Pest+Control'),jdecode(''),'/6601.html','true',[],''],
	['PAGE','35601',jdecode('Mosquito+Control'),jdecode(''),'/35601.html','true',[],''],
	['PAGE','36401',jdecode('Ionic+Air+Purifier'),jdecode(''),'/36401.html','true',[],''],
	['PAGE','6701',jdecode('Therma+Fridge'),jdecode(''),'/6701.html','true',[],''],
	['PAGE','6622',jdecode('Housewares'),jdecode(''),'/6622.html','true',[],''],
	['PAGE','35622',jdecode('Questions+%26+Answers'),jdecode(''),'/35622.html','true',[],''],
	['PAGE','35643',jdecode('Special+Events'),jdecode(''),'/35643.html','true',[],''],
	['PAGE','36422',jdecode('Testimonies'),jdecode(''),'/36422.html','true',[],''],
	['PAGE','3894',jdecode('Contact+us'),jdecode(''),'/3894.html','true',[],''],
	['PAGE','3957',jdecode('Members+Login'),jdecode(''),'/3957.html','true',[],''],
	['PAGE','3915',jdecode('Dealers+Near+You'),jdecode(''),'/3915.html','true',[],'']];
var siteelementCount=13;
theSitetree.topTemplateName='Georgia';
theSitetree.paletteFamily='6080D3';
theSitetree.keyvisualId='5990';
theSitetree.keyvisualName='kv_5990.jpg';
theSitetree.fontsetId='11121';
theSitetree.graphicsetId='11911';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='6080D3';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Georgia',
				paletteFamily: 	'6080D3',
				keyvisualId: 	'5990',
				keyvisualName: 	'kv_5990.jpg',
				fontsetId: 		'11121',
				graphicsetId: 	'11911',
				contentColor: 	'FFFFFF',
				contentBGColor: '6080D3',
				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: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['7008']=webappMappings['7008-17200']={
webappId:    '7008',
documentId:  '3894',
internalId:  '17200',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3801',
internalId:  '',
customField: '20100414-204625'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3852',
internalId:  '',
customField: '20100414-205115'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6701',
internalId:  '',
customField: '20100304-175053'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3894',
internalId:  '',
customField: '20100213-224845'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3915',
internalId:  '',
customField: '20100426-175010'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36401',
internalId:  '',
customField: '20100213-232114'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3957',
internalId:  '',
customField: '20100213-231545'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '3801',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '3852',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6601',
internalId:  '',
customField: '20100211-145822'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '3894',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '3915',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35601',
internalId:  '',
customField: '20100213-074202'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '3957',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '3801',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-18549336']={
webappId:    '1501',
documentId:  '3801',
internalId:  '18549336',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6622',
internalId:  '',
customField: '20100227-144908'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35622',
internalId:  '',
customField: '20100213-181336'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35643',
internalId:  '',
customField: '20100213-231235'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36422',
internalId:  '',
customField: '20100302-161331'
};
webappMappings['1002']=webappMappings['1002-36422aendu0in3t4s']={
webappId:    '1002',
documentId:  '36422',
internalId:  '36422aendu0in3t4s',
customField: 'icq=false'
};
var canonHostname = 'cmworker01.yourhostingaccount.com';
var accountId     = 'AENDU0IN3T4S';
var companyName   = 'SMATEK+CONSUMER+ELECTRONICS';
var htmlTitle	  = 'Africa%27s+%231+Professional+Pest+%26+Mosquito+Control.++Therma+Fridge.++Air+Purifiers.++Housewares+....';
var metaKeywords  = 'Smatek+Pest+Control%2C+Professional+pest+Control%2C+Mosquito+Control%2C+Pest+Control+Products+in+Africa%2C+Mosquito+Control+Products+in+Africa%2C+Leading+Professional+Pest+Control+Products+in+Nigeria%2C+Leading+Mosquito+Control+Products+in+Nigeria%2C+Best+Air+Purifiers%2C+Smatek+Therma+Fridge%2C+Smatek++Air+Purifiers%2C+Nigerias+%231+Consumer+Electronics+Manufacturing+Company.+First+Science++Research+Electronics+Company+in+Africa%2C+Best+valued+Mosquito+control+device.+The+most+effective+Professional++Mosquito+Control+Device+in+Africa%2C+The+First++Only+Professional+Pest++Mosquito+Control+Device+Researched+and+Develop+for+African+Pests.+';
var metaContents  = 'Africas+%231+Professional+Pest++Mosquito+Control+Products.++Pest++Mosquito+Control+Device+Researched+and+Develop+for+African+Pests.+Smatek+Pest+Control%2C+Professional+pest+Control%2C+Mosquito+Control%2C+Pest+Control+Products+in+Africa%2C+Mosquito+Control+Products+in+Africa%2C+Leading+Professional+Pest+Control+Products+in+Nigeria%2C+Leading+Mosquito+Control+Products+in+Nigeria%2C+Best+Air+Purifiers%2C+Smatek+Therma+Fridge%2C+Smatek++Air+Purifiers%2C+Nigerias+%231+Consumer+Electronics+Manufacturing+Company.+First+Science++Research+Electronics+Company+in+Africa%2C+Best+valued+Mosquito+control+device.+The+most+effective+Professional++Mosquito+Control+Device+in+Africa%2C+The+First++Only+Professional+Pest++Mosquito+Control+Device+Researched+and+Develop+for+African+Pests.+';
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();
};
