/* [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','1001',jdecode('Home'),jdecode(''),'/1001.html','true',[],'',''],
	['PAGE','5301',jdecode('About+us'),jdecode(''),'/5301/index.html','true',[ 
		['PAGE','5322',jdecode('The+team'),jdecode(''),'/5301/5322.html','true',[],'','']
	],'',''],
	['PAGE','5343',jdecode('Loan+Products'),jdecode(''),'/5343/index.html','true',[ 
		['PAGE','5364',jdecode('Auto+Title+Loans'),jdecode(''),'/5343/5364.html','true',[],'',''],
		['PAGE','5385',jdecode('Mobile+Home+Loans'),jdecode(''),'/5343/5385.html','true',[],'',''],
		['PAGE','5406',jdecode('Vehicle+Financing'),jdecode(''),'/5343/5406.html','true',[],'','']
	],'',''],
	['PAGE','5427',jdecode('FAQ%26%23x27%3Bs'),jdecode(''),'/5427.html','true',[],'',''],
	['PAGE','5469',jdecode('Contact+Us'),jdecode(''),'/5469/index.html','true',[ 
		['PAGE','18201',jdecode('Contact+Us+%28follow+up+page%29'),jdecode(''),'/5469/18201.html','false',[],'',''],
		['PAGE','5490',jdecode('Adresses'),jdecode(''),'/5469/5490.html','true',[],'','']
	],'',''],
	['PAGE','7179',jdecode('Map'),jdecode(''),'/7179.html','true',[],'',''],
	['PAGE','5532',jdecode('View+My+Account'),jdecode(''),'/5532/index.html','true',[ 
		['PAGE','17901',jdecode('View+My+Account+%28follow+up+page%29'),jdecode(''),'/5532/17901.html','false',[],'','']
	],'',''],
	['PAGE','7086',jdecode('AZ+BBB'),jdecode(''),'/7086.html','true',[],'','']];
var siteelementCount=15;
theSitetree.topTemplateName='Metal';
theSitetree.paletteFamily='64896D';
theSitetree.keyvisualId='771';
theSitetree.keyvisualName='AUTOSCHLUESSEL.JPG';
theSitetree.fontsetId='143';
theSitetree.graphicsetId='157';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='000000';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Metal',
				paletteFamily: 	'64896D',
				keyvisualId: 	'771',
				keyvisualName: 	'AUTOSCHLUESSEL.JPG',
				fontsetId: 		'143',
				graphicsetId: 	'157',
				contentColor: 	'FFFFFF',
				contentBGColor: '000000',
				a_color: 		'64896D',
				b_color: 		'A7E4B6',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1501']=webappMappings['1501-711701']={
webappId:    '1501',
documentId:  '1001',
internalId:  '711701',
customField: '1501'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1001',
internalId:  '1006',
customField: '1006'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '7179',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:false;'
};
webappMappings['7008']=webappMappings['7008-8166']={
webappId:    '7008',
documentId:  '5532',
internalId:  '8166',
customField: 'language:en;country:US;'
};
webappMappings['7008']=webappMappings['7008-8167']={
webappId:    '7008',
documentId:  '5469',
internalId:  '8167',
customField: 'language:en;country:US;'
};
webappMappings['7005']=webappMappings['7005-57']={
webappId:    '7005',
documentId:  '5343',
internalId:  '57',
customField: 'language:en;country:US;'
};
webappMappings['7005']=webappMappings['7005-58']={
webappId:    '7005',
documentId:  '7086',
internalId:  '58',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1001',
internalId:  '',
customField: '20080902-153847'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5301',
internalId:  '',
customField: '20080806-163901'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5322',
internalId:  '',
customField: '20080606-141657'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5343',
internalId:  '',
customField: '20080902-192801'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5364',
internalId:  '',
customField: '20081003-134755'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5385',
internalId:  '',
customField: '20081003-134933'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5406',
internalId:  '',
customField: '20080806-163512'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5427',
internalId:  '',
customField: '20080815-140344'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5469',
internalId:  '',
customField: '20080902-160744'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18201',
internalId:  '',
customField: '20080902-160345'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5490',
internalId:  '',
customField: '20080902-160641'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7179',
internalId:  '',
customField: '20080902-152801'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5532',
internalId:  '',
customField: '20080902-192822'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17901',
internalId:  '',
customField: '20080902-155338'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7086',
internalId:  '',
customField: '20080902-163948'
};
var canonHostname = 'wsc-worker03.chi.us.siteprotect.com';
var accountId     = 'AHW050INEC75';
var companyName   = 'Goldcrest+Financial';
var htmlTitle	  = 'Goldcrest+Financial+%28Auto+Title+Loans%29+Up+to+50%25+Less';
var metaKeywords  = 'Auto+Title+Loan%2C+Car+Title+Loans%2C+Auto+Title+Loans%2C+Phoenix+Title+Loans%2C+Phoenix+Auto+Loans%2C+Glendale+Title+Loans%2C+Scottsdale+Title+Loans%2C+Mesa+Title+Loans%2C+Tempe+Title+Loans%2C+Peoria+Title+Loans%2C+Gilbert+Title+Loans%2C+Mobile+Homes+Loans%2C+Bad+Credit%2C+Auto+Financing%2C+85021%2C+Auto+Sales%2C+Cash+Time+Title+Loans%2C+American+Financial+Title+Loans%2C+Cash+N+Go%2C+One+Stop+Auto+Loans%2C+Fast+Cash+Title+Loans%2C+Presto+Title+Titles%2C+MV+Acceptance';
var metaContents  = 'Goldcrest+Financial.++Save+up+to+50%25.++In+business+since+1987.++Member+of+Arizona+Better+Business+Bureau.++Valley+Wide+Service.+No+Hidden+Fees%21';
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();
};
