/* [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','201',jdecode('Home'),jdecode(''),'/201.html','true',[],'',''],
	['PAGE','5001',jdecode('Networking+Meetings'),jdecode(''),'/5001/index.html','true',[ 
		['PAGE','25722',jdecode('Register++Fix+%26+Flip'),jdecode(''),'/5001/25722.html','true',[],'',''],
		['PAGE','26401',jdecode('Survey+%28follow+up+page%29'),jdecode(''),'/5001/26401.html','false',[],'',''],
		['PAGE','25101',jdecode('Map'),jdecode(''),'/5001/25101.html','true',[],'','']
	],'',''],
	['PAGE','5006',jdecode('About+U+Fixem'),jdecode(''),'/5006.html','true',[],'',''],
	['PAGE','47301',jdecode('Consultation'),jdecode(''),'/47301.html','true',[],'',''],
	['PAGE','26601',jdecode('About+the+Market'),jdecode(''),'/26601.html','true',[],'',''],
	['PAGE','41901',jdecode('VACATION+RENTALS'),jdecode(''),'/41901.html','true',[],'','']];
var siteelementCount=9;
theSitetree.topTemplateName='NewYork';
theSitetree.paletteFamily='660000';
theSitetree.keyvisualId='976';
theSitetree.keyvisualName='beratung.jpg';
theSitetree.fontsetId='168';
theSitetree.graphicsetId='197';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'NewYork',
				paletteFamily: 	'660000',
				keyvisualId: 	'976',
				keyvisualName: 	'beratung.jpg',
				fontsetId: 		'168',
				graphicsetId: 	'197',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'660000',
				c_color: 		'000000',
				d_color: 		'990000',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1501']=webappMappings['1501-11797355']={
webappId:    '1501',
documentId:  '201',
internalId:  '11797355',
customField: '1501'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '201',
internalId:  '1006',
customField: '1006'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '25101',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:false;'
};
webappMappings['7008']=webappMappings['7008-968']={
webappId:    '7008',
documentId:  '25722',
internalId:  '968',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41901',
internalId:  '',
customField: '20090423-001642'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '201',
internalId:  '',
customField: '20080816-162406'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5001',
internalId:  '',
customField: '20100611-062555'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25722',
internalId:  '',
customField: '20080201-125859'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26401',
internalId:  '',
customField: '20080124-145533'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25101',
internalId:  '',
customField: '20080118-100859'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5006',
internalId:  '',
customField: '20080126-094124'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26601',
internalId:  '',
customField: '20080125-071353'
};
webappMappings['4001']=webappMappings['4001-22279068']={
webappId:    '4001',
documentId:  '47301',
internalId:  '22279068',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47301',
internalId:  '',
customField: '20091020-212642'
};
var canonHostname = 'wscwrk02.ehost-services.com';
var accountId     = 'AEN010INXPGH';
var companyName   = '';
var htmlTitle	  = 'U+Fixem+Properties';
var metaKeywords  = 'Real+Estate+Arizona+Foreclosure+pre-foreclosure';
var metaContents  = 'OUR+PHILOSOPHY++We+take+time+to+find+investment+properties+that+will+provide+a+respectable+annualized+rate+of+return+for+the+dollars+invested.+We+make+every+effort+to+assist+the+investor+by+providing+as+much+help+and+knowledge+as+possible.++1.+We+offer+consulting+advice+through+the+rehab+of+your+property.+We+feel+that+if+we+help+you+through+this+process+and+you+have+success%2C+you+will+continue+to+acquire+investment+properties+from+us.++2.+We+offer+you+the+list+we+use+of+handymen%2C+plumbers%2C+electricians%2C+and+others+that+will+offer+you+a+reasonable+price+for+the+work+to+be+done.++3.+We+assist+you+in+evaluating+property+values+and+pricing+for+your+property.+We+then+offer+you+reduced+rates+to+list+your+property+in+the+real+estate+Multiple+Listing+Service.++';
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();
};
