/* [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','1301',jdecode('Home'),jdecode(''),'/1301.html','true',[],''],
	['PAGE','16901',jdecode('Our+Services'),jdecode(''),'/16901.html','true',[],''],
	['PAGE','1352',jdecode('What+is+the+Law%3F'),jdecode(''),'/1352.html','true',[],''],
	['PAGE','1373',jdecode('Compliance+Risks'),jdecode(''),'/1373.html','true',[],''],
	['PAGE','1394',jdecode('Solutions'),jdecode(''),'/1394.html','true',[],''],
	['PAGE','1415',jdecode('About+Us'),jdecode(''),'/1415.html','true',[],''],
	['PAGE','1457',jdecode('Contact'),jdecode(''),'/1457.html','true',[],''],
	['PAGE','1478',jdecode('Articles'),jdecode(''),'/1478.html','true',[],''],
	['PAGE','1499',jdecode('UP+Books+%26+News'),jdecode(''),'/1499.html','true',[],''],
	['PAGE','1436',jdecode('Helpful+Links'),jdecode(''),'/1436.html','true',[],''],
	['PAGE','9601',jdecode('Upcoming+Events'),jdecode(''),'/9601.html','true',[],''],
	['PAGE','9622',jdecode('UP+Tool+Store'),jdecode(''),'/9622.html','true',[],''],
	['PAGE','12801',jdecode('UP+Blog'),jdecode(''),'/12801.html','true',[],'']];
var siteelementCount=13;
theSitetree.topTemplateName='Sportsplace';
theSitetree.paletteFamily='1D2D7E';
theSitetree.keyvisualId='2654';
theSitetree.keyvisualName='versicherung.jpg';
theSitetree.fontsetId='343';
theSitetree.graphicsetId='402';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Sportsplace',
				paletteFamily: 	'1D2D7E',
				keyvisualId: 	'2654',
				keyvisualName: 	'versicherung.jpg',
				fontsetId: 		'343',
				graphicsetId: 	'402',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'1D2D7E',
				b_color: 		'788EC9',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1301',
internalId:  '',
customField: '20100625-173550'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1352',
internalId:  '',
customField: '20080627-171412'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1373',
internalId:  '',
customField: '20080421-135319'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1394',
internalId:  '',
customField: '20090429-214331'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1415',
internalId:  '',
customField: '20100628-132026'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1436',
internalId:  '',
customField: '20100714-135638'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1457',
internalId:  '',
customField: '20080724-163453'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1478',
internalId:  '',
customField: '20090316-143450'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1499',
internalId:  '',
customField: '20090429-215430'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1301',
internalId:  '1006',
customField: '1006'
};
webappMappings['4001']=webappMappings['4001-10177784']={
webappId:    '4001',
documentId:  '9622',
internalId:  '10177784',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9601',
internalId:  '',
customField: '20100714-072944'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9622',
internalId:  '',
customField: '20080710-092524'
};
webappMappings['7050']=webappMappings['7050-4015']={
webappId:    '7050',
documentId:  '12801',
internalId:  '4015',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12801',
internalId:  '',
customField: '20090429-214420'
};
webappMappings['1501']=webappMappings['1501-11909939']={
webappId:    '1501',
documentId:  '1301',
internalId:  '11909939',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16901',
internalId:  '',
customField: '20090429-213157'
};
var canonHostname = 'cmworker03.yourhostingaccount.com';
var accountId     = 'AENDU0IN280W';
var companyName   = 'Reid+Unclaimed+Property+Services%2C+LLC';
var htmlTitle	  = 'Unclaimed+Property+News+%26+Discussion';
var metaKeywords  = 'unclaimed+property%2C+unclaimed%2C+property%2C+escheat%2C+escheat+law%2C+escheat+tax%2C+abandoned+property%2C+abandoned%2C+tracey+reid%2C+reid+unclaimed+property+services%2C+escheat+audit%2C+unclaimed+property+audit%2C+abandoned+property+audit%2C+voluntary+disclosure%2C+vda%2C+tracey+l+reid%2C+audit+defense%2C+compliance%2C+due+diligence%2C+escheat+audit%2C+rups%2C+rups+llc%2C+unclaimed+property+tax';
var metaContents  = 'Reid+Unclaimed+Property+Services++has+been+helping+businesses+of+all+sizes+become+compliant+with+state+unclaimed+property+laws+since+2002.++Our+goal+is+to+make+Unclaimed+Property+LESS+TAXING+for+you+and+your+organization.+';
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();
};
