/* [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','118',jdecode('Skyview+Apartments'),jdecode(''),'/118/index.html','true',[ 
		['PAGE','21518',jdecode('Property+Manangement'),jdecode(''),'/118/21518.html','true',[],'']
	],''],
	['PAGE','30730',jdecode('Contact+Us'),jdecode(''),'/30730/index.html','true',[ 
		['PAGE','30970',jdecode('Contact+Us+%28follow+up+page%29'),jdecode(''),'/30730/30970.html','false',[],'']
	],''],
	['PAGE','7021',jdecode('Features+at+Skyview'),jdecode(''),'/7021.html','true',[],''],
	['PAGE','7438',jdecode('Floor+Plan+at+Skyview'),jdecode(''),'/7438.html','true',[],''],
	['PAGE','8358',jdecode('Photos+of+Skyview'),jdecode(''),'/8358.html','true',[],''],
	['PAGE','7930',jdecode('Rental+Rate+at+Skyview'),jdecode(''),'/7930.html','true',[],''],
	['PAGE','20118',jdecode('Internet+Special'),jdecode(''),'/20118.html','true',[],''],
	['PAGE','20718',jdecode('Pflugerville+City'),jdecode(''),'/20718.html','true',[],''],
	['PAGE','22018',jdecode('Schools'),jdecode(''),'/22018.html','true',[],''],
	['PAGE','6060',jdecode('Directions+to+Skyview'),jdecode(''),'/6060.html','true',[],''],
	['PAGE','21118',jdecode('Millionaire%3F'),jdecode(''),'/21118.html','true',[],''],
	['PAGE','27218',jdecode('Featured+Links'),jdecode(''),'/27218.html','true',[],''],
	['PAGE','29618',jdecode('Fact+About+Skyview'),jdecode(''),'/29618.html','true',[],'']];
var siteelementCount=15;
theSitetree.topTemplateName='Solid';
theSitetree.paletteFamily='8396BA';
theSitetree.keyvisualId='4356';
theSitetree.keyvisualName='kv_4356.jpg';
theSitetree.fontsetId='10800';
theSitetree.graphicsetId='11232';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='8396BA';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Solid',
				paletteFamily: 	'8396BA',
				keyvisualId: 	'4356',
				keyvisualName: 	'kv_4356.jpg',
				fontsetId: 		'10800',
				graphicsetId: 	'11232',
				contentColor: 	'FFFFFF',
				contentBGColor: '8396BA',
				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['1501']=webappMappings['1501-513733']={
webappId:    '1501',
documentId:  '118',
internalId:  '513733',
customField: '1501'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '6060',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:false;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '118',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '118',
internalId:  '',
customField: '20080124-131733'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21518',
internalId:  '',
customField: '20050926-104134'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30730',
internalId:  '',
customField: '20051002-094310'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30970',
internalId:  '',
customField: '20051002-094423'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7021',
internalId:  '',
customField: '20060307-135928'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7438',
internalId:  '',
customField: '20051002-103811'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8358',
internalId:  '',
customField: '20080124-131948'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7930',
internalId:  '',
customField: '20080609-100748'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20118',
internalId:  '',
customField: '20080124-132607'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20718',
internalId:  '',
customField: '20051002-100734'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22018',
internalId:  '',
customField: '20051002-100805'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6060',
internalId:  '',
customField: '20080124-131426'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21118',
internalId:  '',
customField: '20051002-102125'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27218',
internalId:  '',
customField: '20080228-152658'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29618',
internalId:  '',
customField: '20080620-093745'
};
webappMappings['7008']=webappMappings['7008-1258']={
webappId:    '7008',
documentId:  '30730',
internalId:  '1258',
customField: 'language:en;country:US;'
};
var canonHostname = 'wscwrk02.ehost-services.com';
var accountId     = 'AEN010INX39B';
var companyName   = 'Skyview+Apartments+-+Pflugerville%2C+Texas';
var htmlTitle	  = 'Skyview+Apartments%2C+Pflugerville%2C+Texas%2C+TX';
var metaKeywords  = 'Apartments%2C+Pflugerville%2C+TX%2C+rent%2C+lease%2C+apartment%2C+rental%2C+rentals%2C+renters%2C+2%2C+bedroom%2C+bedrooms%2C+Austin%2C+Round+Rock%2C+roommate%2C+texas%2C+student%2C+university%2C+retirement%2C+affordable%2C+apt%2C+apts%2C+cheap%2C+nice';
var metaContents  = 'Apartments%2C+Pflugerville%2C+TX.+Skyview+Apartments%2C+Pflugerville%2C+Texas+78660.+Renters+find+2+bedroom+apartments.+Apartments+Feature%3A+Gas+cooking+and+heating%2C+fireplaces%2C+patios%2Fbalconies%2C+washer%2Fdryer+hookups%2C+fenced+playground%2C+picnic+area%2C+extra+parking%2C++convinient+to+IH-35.+Affordable+apartments.+Photos%2C+Rental+Rates+and+floor+Plans+available+online.';
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();
};
