/* [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','2147',jdecode('HOME'),jdecode(''),'/2147.html','true',[],''],
	['PAGE','10601',jdecode('MY+VISUAL+TOURS'),jdecode(''),'/10601.html','true',[],''],
	['PAGE','7022',jdecode('SELLER-BUYER+WIN-WIN%21'),jdecode(''),'/7022.html','true',[],''],
	['PAGE','9101',jdecode('FAIR+MARKET+VALUE'),jdecode(''),'/9101.html','true',[],''],
	['PAGE','5901',jdecode('SELLER+ADVANTAGES'),jdecode(''),'/5901.html','true',[],''],
	['PAGE','5922',jdecode('BUYERS+ADVANTAGES'),jdecode(''),'/5922.html','true',[],''],
	['PAGE','5964',jdecode('SHORT+SALE+PROBLEMS'),jdecode(''),'/5964.html','true',[],''],
	['PAGE','2422',jdecode('SHORT+SALE+TIME+LINE'),jdecode(''),'/2422.html','true',[],''],
	['PAGE','2506',jdecode('THE+TRUST+SOLUTION'),jdecode(''),'/2506.html','true',[],''],
	['PAGE','9701',jdecode('%248%2C000+BUYER%2FTAX%2FCREDIT'),jdecode(''),'/9701.html','true',[],''],
	['PAGE','7001',jdecode('OBAMA%26%23x27%3BS+HOUSING+PLAN'),jdecode(''),'/7001.html','true',[],''],
	['PAGE','5943',jdecode('R.E.+%26+LOAN+AGENTS+'),jdecode(''),'/5943.html','true',[],''],
	['PAGE','2221',jdecode('SIGN+IN+HERE'),jdecode(''),'/2221.html','true',[],''],
	['PAGE','2168',jdecode('OUR+EXPERIENCE'),jdecode(''),'/2168.html','true',[],''],
	['PAGE','2242',jdecode('Contact'),jdecode(''),'/2242.html','true',[],''],
	['PAGE','2210',jdecode('My+Blog+-+Your+Story'),jdecode(''),'/2210.html','true',[],''],
	['PAGE','2464',jdecode('EQUITY%2FHOLDING%2FTRUST'),jdecode(''),'/2464.html','true',[],''],
	['PAGE','2401',jdecode('HOME+VALUE+VS+LOANS'),jdecode(''),'/2401.html','true',[],''],
	['PAGE','2189',jdecode('My+Photos'),jdecode(''),'/2189.html','true',[],'']];
var siteelementCount=19;
theSitetree.topTemplateName='Sportfan1';
theSitetree.paletteFamily='CBCBC1';
theSitetree.keyvisualId='10068';
theSitetree.keyvisualName='kv_10068.jpg';
theSitetree.fontsetId='21076';
theSitetree.graphicsetId='13169';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var theTemplate={
				name: 			'Sportfan1',
				paletteFamily: 	'CBCBC1',
				keyvisualId: 	'10068',
				keyvisualName: 	'kv_10068.jpg',
				fontsetId: 		'21076',
				graphicsetId: 	'13169',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				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['7060']=webappMappings['7060-511648b0f1d107b3304af6851559172e']={
webappId:    '7060',
documentId:  '2189',
internalId:  '511648b0f1d107b3304af6851559172e',
customField: 'language:en;country:US;'
};
webappMappings['7050']=webappMappings['7050-576']={
webappId:    '7050',
documentId:  '2210',
internalId:  '576',
customField: 'language:en;country:US;'
};
webappMappings['7002']=webappMappings['7002-227']={
webappId:    '7002',
documentId:  '2221',
internalId:  '227',
customField: 'language:en;country:US;'
};
webappMappings['7008']=webappMappings['7008-1865']={
webappId:    '7008',
documentId:  '2242',
internalId:  '1865',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2147',
internalId:  '',
customField: '20090213-121229'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2168',
internalId:  '',
customField: '20090219-000859'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2189',
internalId:  '',
customField: '20090212-105559'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2210',
internalId:  '',
customField: '20090212-105600'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2221',
internalId:  '',
customField: '20090212-105600'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2242',
internalId:  '',
customField: '20090212-111231'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2147',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2401',
internalId:  '',
customField: '20090212-110758'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2422',
internalId:  '',
customField: '20090219-154621'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7022',
internalId:  '',
customField: '20090219-150126'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2464',
internalId:  '',
customField: '20090212-110758'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7001',
internalId:  '',
customField: '20090219-003742'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2506',
internalId:  '',
customField: '20090219-004033'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9101',
internalId:  '',
customField: '20090219-152422'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5901',
internalId:  '',
customField: '20090213-143947'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5922',
internalId:  '',
customField: '20090213-144254'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5943',
internalId:  '',
customField: '20090219-004324'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5964',
internalId:  '',
customField: '20090213-150058'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9701',
internalId:  '',
customField: '20090219-160324'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10601',
internalId:  '',
customField: '20090316-175646'
};
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050INLKMO';
var companyName   = 'Stop+Short+Sales%2FForeclosures';
var htmlTitle	  = 'No+Short+Sales+or+Foreclosures';
var metaKeywords  = 'financial+planning+for+home+owners%2C+Short+Sales%2C+Foreclosure%2C+landtrust%2C+Equity+Holding+Trust%2C+Credit+Score%2C+Bankrupcy%2C+buying+a+home+with+bad+credit';
var metaContents  = 'Financial+planning+to+help+Home+Owners+understand+the+decreased+value+of+their+homes+and+how+they+are+now+upside+down+in+the+Home+Value+vs+Loans+outstanding+on+their+property.++The+Equity+Holding+Trust+will+help+home+owner+aviod+Short+Sales+and+Foreclosures';
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();
};
