/* [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','2201',jdecode('Home'),jdecode(''),'/2201.html','true',[],'',''],
	['PAGE','2252',jdecode('Press'),jdecode(''),'/2252.html','true',[],'',''],
	['PAGE','2273',jdecode('Contact'),jdecode(''),'/2273.html','true',[],'','']];
var siteelementCount=3;
theSitetree.topTemplateName='Champagne';
theSitetree.paletteFamily='52504D';
theSitetree.keyvisualId='11062';
theSitetree.keyvisualName='kv_11062.jpg';
theSitetree.fontsetId='31943';
theSitetree.graphicsetId='13784';
theSitetree.contentColor='958671';
theSitetree.contentBGColor='52504D';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Champagne',
				paletteFamily: 	'52504D',
				keyvisualId: 	'11062',
				keyvisualName: 	'kv_11062.jpg',
				fontsetId: 		'31943',
				graphicsetId: 	'13784',
				contentColor: 	'958671',
				contentBGColor: '52504D',
				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['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2201',
internalId:  '',
customField: '20101210-014417'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2252',
internalId:  '',
customField: '20101210-014225'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2273',
internalId:  '',
customField: '20101210-013951'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2201',
internalId:  '1006',
customField: '1006'
};
var canonHostname = 'localhost';
var accountId     = 'ANFI20IN275A';
var companyName   = 'NeatCo.asia';
var htmlTitle	  = 'NeatCo.asia';
var metaKeywords  = 'NeatCo.asia%2C+NeatCo%2C+The+Neat+Company%2C+NeatDesk%2C+NeatReceipts%2C+NeatWorks%2C+scanners%2C+capture%2C+scanner+software%2C+software%2C+Neat+Company+Affiliate+Program%2C+Reseller%2C+info%40neatco.asia%2C+www.NeatCo.asia%2C+transform%2C+receipts%2C+business+cards%2C+cards%2C+documents%2C+into+information%2C+information+that+works+for+you%2C+Learn%2C+Business%2C+Scan%2C+organize%2C+clutter';
var metaContents  = 'This+site+was+formerly+owned+and+leveraged+by+the+Asian+division+of+The+Neat+Company%3B+makers+of+NeatReceipts%2C+NeatDesk+Scanners%2C+and+the+NeatWorks+Scanner+Software.++This+site+was+one+Of+72575+Expiring+Domains+Found+For+Sale+On+2010-09-05.++With+such+a+rich+history+we+could+not+allow+this+site+to+fade+into+oblivion.%0D%0A%0D%0A++%0D%0A%0D%0AThe+intended+purpose+of+this+site+is%3A%0D%0A%0D%0A-++To+create+an+outlet+for+the+new+site+administrators+to+review+products+by+The+Neat+Company%0D%0A%0D%0A-++To+create+a+venue+for+current+and+prior+customers+to+discuss+current+software+packages%0D%0A%0D%0A-++To+create+a+venue+for+current+and+prior+customers+to+discuss+retired+%5C+unavailable+software+packages+%0D%0A%0D%0A-++To+create+a+venue+for+current+and+prior+customers+to+discuss+scanner+hardware%0D%0A%0D%0A-++To+create+a+venue+to+discuss+new+products+which+The+Neat+Company+have+under+development%0D%0A%0D%0A-++And+to+sell+The+Neat+Company+products+as+permitted+through+the+authorized+reseller+program%2C+%E2%80%9CThe+Neat+Company+Affiliate+Program%E2%80%9D%0D%0A%0D%0A%0D%0A%0D%0AFor+anyone+not+familiar+with+the+prior+owners+theme+is+%22At+The+Neat+Company%2C+our+scanners+and+scanner+software+transform+your+receipts%2C+business+cards%2C+and+documents+into+information+that+works+for+you.+Learn+more+about+our+NeatDesk+and+NeatReceipts+scanners+and+NeatWorks+scanner+software.%22%0D%0A%0D%0A%0D%0A%0D%0AAt+present%2C+our+web+site+is+still+under+re-construction.+We+are+making+an+effort+to+present+you+with+our+entire+spectrum+of+offers+as+soon+as+possible.+At+this+point+we+can+provide+you+with+the+information+that+NeatCo.asia+will+be+back+shortly+and+better+than+ever.+Check+this+site+later%2C+please.%0D%0A%0D%0A%0D%0A%0D%0AIn+the+meantime+you+can+contact+us+at+our+e-mail+address%3A+info%40neatco.asia.+We+are+looking+forward+to+hearing+from+you.%0D%0A%0D%0A';
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();
};

