/* [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','9301',jdecode('About+us'),jdecode(''),'/9301.html','true',[],'',''],
	['PAGE','9352',jdecode('Ionizer+%26+History+'),jdecode(''),'/9352.html','true',[],'',''],
	['PAGE','9394',jdecode('Buyers+Guide'),jdecode(''),'/9394.html','true',[],'',''],
	['PAGE','9415',jdecode('ORP+vs+pH+'),jdecode(''),'/9415.html','true',[],'',''],
	['PAGE','9373',jdecode('Products+'),jdecode(''),'/9373.html','true',[],'',''],
	['PAGE','9478',jdecode('Know+How+'),jdecode(''),'/9478.html','true',[],'',''],
	['PAGE','9457',jdecode('Patents+%26+Certificates'),jdecode(''),'/9457.html','true',[],'',''],
	['PAGE','9499',jdecode('EP+OEM+models'),jdecode(''),'/9499.html','true',[],'',''],
	['PAGE','12601',jdecode('Contact+us'),jdecode(''),'/12601.html','true',[],'','']];
var siteelementCount=9;
theSitetree.topTemplateName='Transluszent';
theSitetree.paletteFamily='6699CC';
theSitetree.keyvisualId='9240';
theSitetree.keyvisualName='kv2.swf';
theSitetree.fontsetId='17360';
theSitetree.graphicsetId='12764';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'true',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'true',
				hasCompanyname: 'false',
				name: 			'Transluszent',
				paletteFamily: 	'6699CC',
				keyvisualId: 	'9240',
				keyvisualName: 	'kv2.swf',
				fontsetId: 		'17360',
				graphicsetId: 	'12764',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'FFFFFF',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9301',
internalId:  '',
customField: '20101203-182329'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9352',
internalId:  '',
customField: '20100328-152718'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9373',
internalId:  '',
customField: '20110214-175851'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9415',
internalId:  '',
customField: '20080411-003503'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9478',
internalId:  '',
customField: '20091015-145246'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9394',
internalId:  '',
customField: '20100205-164211'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9457',
internalId:  '',
customField: '20090706-184341'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9499',
internalId:  '',
customField: '20100205-170217'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12601',
internalId:  '',
customField: '20110214-175706'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '9301',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-7221776']={
webappId:    '1501',
documentId:  '9301',
internalId:  '7221776',
customField: '1501'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '9301',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '9352',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '9394',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '9415',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '9373',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '9478',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '9457',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '9499',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '12601',
internalId:  '',
customField: 'language:en;country:US;'
};
var canonHostname = 'cmworker01.yourhostingaccount.com';
var accountId     = 'AENDU0INXFEZ';
var companyName   = 'Water+Ionizer+by+E-Power+';
var htmlTitle	  = 'water+ionizer+professional++manufacturer+create+alkaline+water+at+your+tap';
var metaKeywords  = '+water+ionizers%2C+alkaline+water%2Cwater+ionizer+manufacturer%2Cwater+ionizer+high+quality+and+low+price%2C+acf+water+filter+systems%2C+antioxidant+water+with+ORP+negative%2C+alkaline+water+is+small+cluster+water%2C+constant+control+pH+and+ORP%2C+Oxidation+Reduction+Potential+vs+pH%2Calkaline+water+is+reduce+water%2C+wholesaler+and+importer+of+water+ionizers%2C+manufacturer+of+water+ionizer%2CEP-9000%2CEP-1400%2CEP-250%2CEP1400SP%2C+SP-900%2CSP-1400%2CE-Power%2C+Vidalite%2C+water+ionizer+for+your+lifetime%2C+acidic+water%2C+Dr.Hidemitsu+Hayashi%2C+Dr.Robert+Young%2C+Dr.whong%2C+history+of+water+ionizer%2C+what+is+a+water+ionizer%2C+daily+use+of+water%2C+water+medication%2C+water+treatment%2C+KYK%2C+Enagic%2C+Jupiters%2C+Ionfarm%2C+water+for+you%2C+Yi+Shan%2C+Life+Ionizer%2CTyen%2CKangen+water%2C+Toyo%2C';
var metaContents  = 'We+produced+high+quality+water+ionizers+since+1989%2C+one+of+largest+manufacturer+in+world.Our+unique+leading+high+techs+of+Constant+Control+of+ORP++PH%2C+SMPS+system%2C+large+color+LCD+displays+%28WYSIWYG%29accurate+ORP+and+pH+level%2C+non-seal+electrode+cell%2C+replaceable+and+refurbish+able+Platinum+Titanium+plates%2C+large+water+output+up+to+6+L%2Fmin.+ACF+filter+system.Our+products+are+certificated+by+CE%2C+SGS%2C+ISO9001%2CNSF.UL...etc+also+patents+registered+in+USA%2CW.Germany%2CTaiwan%2C+China%2CJapan.+We+offer+the+best+quality+and+lowest+price+with+5+years+warranty+of+Electrode+cell.+Contact+us+for+wholesaler%2Clabeling+and+OEM+details.';
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();
};

