/* [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','3301',jdecode('Home'),jdecode(''),'/3301/index.html','true',[ 
		['PAGE','5322',jdecode('Facebook'),jdecode(''),'/3301/5322.html','true',[],'',''],
		['PAGE','36112',jdecode('Quotes'),jdecode(''),'/3301/36112.html','true',[],'','']
	],'',''],
	['PAGE','67123',jdecode('What%26%23x27%3Bs+New%21'),jdecode(''),'/67123.html','true',[],'',''],
	['PAGE','11201',jdecode('Mission'),jdecode(''),'/11201.html','true',[],'',''],
	['PAGE','91445',jdecode('Games%2FQuizzes'),jdecode(''),'/91445.html','true',[],'',''],
	['PAGE','43612',jdecode('Holidays'),jdecode(''),'/43612/index.html','true',[ 
		['PAGE','44712',jdecode('Loveland+Calendar'),jdecode(''),'/43612/44712.html','true',[],'',''],
		['PAGE','62923',jdecode('D%C3%ADas+Festivos'),jdecode(''),'/43612/62923.html','true',[],'','']
	],'',''],
	['PAGE','3352',jdecode('Resources'),jdecode(''),'/3352/index.html','true',[ 
		['PAGE','3901',jdecode('Community+List'),jdecode(''),'/3352/3901.html','true',[],'',''],
		['PAGE','3922',jdecode('Hotlines'),jdecode(''),'/3352/3922.html','true',[],'','']
	],'',''],
	['PAGE','3415',jdecode('Information'),jdecode(''),'/3415/index.html','true',[ 
		['PAGE','3964',jdecode('FACTS'),jdecode(''),'/3415/3964.html','true',[],'',''],
		['PAGE','3985',jdecode('Links'),jdecode(''),'/3415/3985.html','true',[],'',''],
		['PAGE','17701',jdecode('Autism'),jdecode(''),'/3415/17701.html','true',[],'',''],
		['PAGE','22301',jdecode('Divorce'),jdecode(''),'/3415/22301.html','true',[],'',''],
		['PAGE','22322',jdecode('Stepfamilies'),jdecode(''),'/3415/22322.html','true',[],'',''],
		['PAGE','4006',jdecode('Marriage+History'),jdecode(''),'/3415/4006.html','true',[],'','']
	],'',''],
	['PAGE','3373',jdecode('Tips'),jdecode(''),'/3373/index.html','true',[ 
		['PAGE','4048',jdecode('Tips'),jdecode(''),'/3373/4048.html','true',[],'',''],
		['PAGE','4069',jdecode('Time-outs'),jdecode(''),'/3373/4069.html','true',[],'',''],
		['PAGE','4090',jdecode('Say+it+Better'),jdecode(''),'/3373/4090.html','true',[],'',''],
		['PAGE','4111',jdecode('Be+Positive%21'),jdecode(''),'/3373/4111.html','true',[],'',''],
		['PAGE','4153',jdecode('Self-Talk+'),jdecode(''),'/3373/4153.html','true',[],'',''],
		['PAGE','26301',jdecode('Reading+'),jdecode(''),'/3373/26301.html','true',[],'','']
	],'',''],
	['PAGE','3541',jdecode('Blog'),jdecode(''),'/3541/index.html','true',[ 
		['PAGE','65023',jdecode('A+%26+L%26%23x27%3Bs++Blog'),jdecode(''),'/3541/65023.html','true',[],'','']
	],'',''],
	['PAGE','57923',jdecode('Health'),jdecode(''),'/57923.html','true',[],'',''],
	['PAGE','35012',jdecode('Research'),jdecode(''),'/35012/index.html','true',[ 
		['PAGE','34912',jdecode('Healthy+Vs+Unhealty'),jdecode(''),'/35012/34912.html','true',[],'',''],
		['PAGE','38812',jdecode('Research'),jdecode(''),'/35012/38812.html','true',[],'','']
	],'',''],
	['PAGE','4279',jdecode('Share+'),jdecode(''),'/4279.html','true',[],'',''],
	['PAGE','3436',jdecode('About+us'),jdecode(''),'/3436/index.html','true',[ 
		['PAGE','40112',jdecode('Autism+Story'),jdecode(''),'/3436/40112.html','true',[],'','']
	],'',''],
	['PAGE','69823',jdecode('Free+Support'),jdecode(''),'/69823.html','true',[],'',''],
	['PAGE','4300',jdecode('Contact+Us'),jdecode(''),'/4300.html','true',[],'',''],
	['PAGE','4321',jdecode('Store'),jdecode(''),'/4321.html','true',[],'','']];
var siteelementCount=38;
theSitetree.topTemplateName='Capri';
theSitetree.paletteFamily='947333';
theSitetree.keyvisualId='7200';
theSitetree.keyvisualName='kv_7200.jpg';
theSitetree.fontsetId='16409';
theSitetree.graphicsetId='12136';
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: 			'Capri',
				paletteFamily: 	'947333',
				keyvisualId: 	'7200',
				keyvisualName: 	'kv_7200.jpg',
				fontsetId: 		'16409',
				graphicsetId: 	'12136',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['7050']=webappMappings['7050-1563']={
webappId:    '7050',
documentId:  '3541',
internalId:  '1563',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3301',
internalId:  '',
customField: '20100812-203902'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57923',
internalId:  '',
customField: '20100409-020514'
};
webappMappings['1003']=webappMappings['1003-ahw050inl2md123dfaf842b']={
webappId:    '1003',
documentId:  '4279',
internalId:  'ahw050inl2md123dfaf842b',
customField: 'en:US'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5322',
internalId:  '',
customField: '20100505-002428'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '67123',
internalId:  '',
customField: '20100801-233805'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3352',
internalId:  '',
customField: '20100505-002726'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3901',
internalId:  '',
customField: '20100130-011631'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3415',
internalId:  '',
customField: '20100505-011547'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3985',
internalId:  '',
customField: '20100505-003002'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62923',
internalId:  '',
customField: '20100713-205210'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3922',
internalId:  '',
customField: '20100713-200547'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22301',
internalId:  '',
customField: '20091113-235636'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3964',
internalId:  '',
customField: '20100504-231419'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4006',
internalId:  '',
customField: '20091015-164335'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3373',
internalId:  '',
customField: '20100505-010907'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40112',
internalId:  '',
customField: '20100401-041555'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4048',
internalId:  '',
customField: '20100808-231204'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4069',
internalId:  '',
customField: '20100808-231807'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4090',
internalId:  '',
customField: '20100808-231204'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4111',
internalId:  '',
customField: '20091018-010027'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34912',
internalId:  '',
customField: '20100307-013620'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4153',
internalId:  '',
customField: '20091020-001000'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44712',
internalId:  '',
customField: '20100805-140204'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65023',
internalId:  '',
customField: '20100430-030939'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43612',
internalId:  '',
customField: '20100805-141024'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26301',
internalId:  '',
customField: '20100505-003407'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35012',
internalId:  '',
customField: '20100505-011259'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3541',
internalId:  '',
customField: '20100401-035722'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4279',
internalId:  '',
customField: '20100808-232026'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36112',
internalId:  '',
customField: '20100604-142354'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3436',
internalId:  '',
customField: '20100430-025119'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4300',
internalId:  '',
customField: '20100808-231204'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38812',
internalId:  '',
customField: '20100403-200209'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4321',
internalId:  '',
customField: '20091027-021110'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11201',
internalId:  '',
customField: '20100504-211522'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '69823',
internalId:  '',
customField: '20100430-024619'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17701',
internalId:  '',
customField: '20100808-231204'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22322',
internalId:  '',
customField: '20100401-033446'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '91445',
internalId:  '',
customField: '20100805-141130'
};
var canonHostname = 'wsc-worker03.chi.us.siteprotect.com';
var accountId     = 'AHW050INL2MD';
var companyName   = '+Loveland+Relationship';
var htmlTitle	  = 'Loveland+Relationship';
var metaKeywords  = 'Couples+Communication%2C+Relationship+Resources%2C+Teenager+Relationships%2C+Seniors+dating%2C+communication+skills+for+singles%2C+healing+for+those+going+through+a+Divorces%2C+communication+skills+for+stepfamilies%2C+Dating%2C+Engaged%2C+Expecting+Parents%2C+Parents%2C+Families%2C+Children+with+Disabilites%2C+marriage+retreats+in+Orange+County%2C+Marriage+Retreats';
var metaContents  = 'Resources+to+promote+healthy+relationships+for+teenagers%2C+seniors%2C+parents%2C+singles%2C+engaged%2C+singles+again%2C+stepfamilies%2C+parents+of+children+with+autism.+';
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();
};
