/* [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','5001',jdecode('Home'),jdecode(''),'/5001.html','true',[],''],
	['PAGE','5073',jdecode('Service'),jdecode(''),'/5073/index.html','true',[ 
		['PAGE','5094',jdecode('Pension+analysis'),jdecode(''),'/5073/5094.html','true',[],''],
		['PAGE','5115',jdecode('Health+insurance'),jdecode(''),'/5073/5115.html','true',[],''],
		['PAGE','5136',jdecode('Insurance'),jdecode(''),'/5073/5136.html','true',[],''],
		['PAGE','19512',jdecode('Mortgages'),jdecode(''),'/5073/19512.html','true',[],''],
		['PAGE','5157',jdecode('Investment+consulting'),jdecode(''),'/5073/5157.html','true',[],'']
	],''],
	['PAGE','5178',jdecode('Contact'),jdecode(''),'/5178.html','true',[],''],
	['PAGE','5220',jdecode('About+us'),jdecode(''),'/5220.html','true',[],''],
	['PAGE','5283',jdecode('Money'),jdecode(''),'/5283.html','true',[],''],
	['PAGE','15601',jdecode('Appliances'),jdecode(''),'/15601.html','true',[],''],
	['PAGE','16022',jdecode('Automotive+%26+Tool'),jdecode(''),'/16022.html','true',[],''],
	['PAGE','5052',jdecode('Babies+%26+Kids'),jdecode(''),'/5052.html','true',[],''],
	['PAGE','5241',jdecode('Computer+%26+Laptop'),jdecode(''),'/5241.html','true',[],''],
	['PAGE','18801',jdecode('Electronics'),jdecode(''),'/18801.html','true',[],''],
	['PAGE','17801',jdecode('Gift%2C+Craft+%26+Hobby'),jdecode(''),'/17801.html','true',[],''],
	['PAGE','5199',jdecode('Health'),jdecode(''),'/5199.html','true',[],''],
	['PAGE','22523',jdecode('Home+%26+Garden'),jdecode(''),'/22523.html','true',[],''],
	['PAGE','18001',jdecode('Jewelry+%26+Watches'),jdecode(''),'/18001.html','true',[],''],
	['PAGE','5262',jdecode('Toys+%26+Collectibles'),jdecode(''),'/5262.html','true',[],'']];
var siteelementCount=20;
theSitetree.topTemplateName='Commander';
theSitetree.paletteFamily='CB3000';
theSitetree.keyvisualId='2380';
theSitetree.keyvisualName='computerchips.jpg';
theSitetree.fontsetId='391';
theSitetree.graphicsetId='441';
theSitetree.contentColor='6E1A00';
theSitetree.contentBGColor='E0E0E0';
var theTemplate={
				name: 			'Commander',
				paletteFamily: 	'CB3000',
				keyvisualId: 	'2380',
				keyvisualName: 	'computerchips.jpg',
				fontsetId: 		'391',
				graphicsetId: 	'441',
				contentColor: 	'6E1A00',
				contentBGColor: 'E0E0E0',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'E0E0E0',
				b_color: 		'6E1A00',
				c_color: 		'B74C29',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5001',
internalId:  '',
customField: '20090728-203025'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5052',
internalId:  '',
customField: '20090602-033136'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5073',
internalId:  '',
customField: '20090606-095925'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5094',
internalId:  '',
customField: '20090606-093653'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5115',
internalId:  '',
customField: '20090606-094456'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5136',
internalId:  '',
customField: '20090606-094411'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5157',
internalId:  '',
customField: '20090606-094316'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5178',
internalId:  '',
customField: '20090603-103316'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5199',
internalId:  '',
customField: '20090602-033136'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5220',
internalId:  '',
customField: '20090616-115243'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5241',
internalId:  '',
customField: '20090602-033136'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5262',
internalId:  '',
customField: '20090611-151141'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5283',
internalId:  '',
customField: '20090611-151331'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '5001',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15601',
internalId:  '',
customField: '20090611-144444'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22523',
internalId:  '',
customField: '20090612-145301'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16022',
internalId:  '',
customField: '20090611-150837'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17801',
internalId:  '',
customField: '20090611-150922'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18001',
internalId:  '',
customField: '20090608-052202'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18801',
internalId:  '',
customField: '20090612-144928'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19512',
internalId:  '',
customField: '20090608-210622'
};
var canonHostname = 'wsc-worker01.chi.us.siteprotect.com';
var accountId     = 'AHW050INLRNL';
var companyName   = 'LoveWithGold.com';
var htmlTitle	  = 'www.LoveWithGold.com+Free+Buy%2FSell+signals+to+trade+Gold+Futures%2C+ETFs%2C+Bars+%26+Coins';
var metaKeywords  = 'Gold%2C+Stocks%2C+ETF%2C+Bonds%2C+Currencies%2C+Commodities%2C+Bullion%2C+Futures%2C+Options%2C+Forex%2C+Trade%2C+Invest%2C+Online+trading%2C+fx%2C+currency+trading%2C+forex+trading+signal%2C+foreign+exchange+trading%2C+invest+in+stock%2C+investing+in+stock%2C+forex+day+trading+system%2C+forex+education%2C+stock+option+trading%2C+currency+online+forex+trading%2C+foreign+currency+trade%2C+future+trader%2Cday+trade%2C+Trading+System+Signals+Publishing+Service%2C+Pension+Analysis%2C+Health+Insurance%2C+Life+insurance%2C+Mortgages+and+Investment+Consulting';
var metaContents  = 'www.LoveWithGold.com+is+a+Financial+Services+company+specializing+in+Trading+System+Signals+Publishing+Service%2C+Pension+Analysis%2C+Health+Insurance%2C+Life+insurance%2C+Mortgages+and+Investment+Consulting.++Our+paid+service+TheRootofAllGoodisMoney.com+offers+the+quickest+and+most+efficient+way+to+find+new+investment+opportunities+daily.+Youll+benefit+from+being+a+part+of+the+Webs+ONLY+site+fully+dedicated+to+finding+new+Financial+Market+Research+opportunities+covering+a+wide+range+of+markets+from+the+Stocks%2FETFs%2C+Forex%2C+Options+and+Futures+markets%2C+all+with+just+one+subscription%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();
};
