/* [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','901',jdecode('Home'),jdecode(''),'/901.html','true',[],'',''],
	['PAGE','952',jdecode('About+us'),jdecode(''),'/952.html','true',[],'',''],
	['PAGE','63109',jdecode('2010+Auctions'),jdecode(''),'/63109.html','true',[],'',''],
	['PAGE','63365',jdecode('May+15%2C+2010'),jdecode(''),'/63365.html','true',[],'',''],
	['PAGE','63091',jdecode('May+21%2C+2010'),jdecode(''),'/63091.html','true',[],'',''],
	['PAGE','63570',jdecode('June+12%2C+2010'),jdecode(''),'/63570.html','true',[],'',''],
	['PAGE','61899',jdecode('Charity+Auctions'),jdecode(''),'/61899.html','true',[],'',''],
	['PAGE','43112',jdecode('Testimonials'),jdecode(''),'/43112.html','true',[],'',''],
	['PAGE','63100',jdecode('History+of+Auctions'),jdecode(''),'/63100.html','true',[],'',''],
	['PAGE','62139',jdecode('Appraisals'),jdecode(''),'/62139.html','true',[],'',''],
	['PAGE','62768',jdecode('Auction+Pics'),jdecode(''),'/62768.html','true',[],'',''],
	['PAGE','61848',jdecode('Virtual+Tour'),jdecode(''),'/61848.html','true',[],'',''],
	['PAGE','62080',jdecode('E-mail+Us'),jdecode(''),'/62080.html','true',[],'','']];
var siteelementCount=13;
theSitetree.topTemplateName='Akropolis';
theSitetree.paletteFamily='4A587F';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10553';
theSitetree.graphicsetId='10449';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='4A587F';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Akropolis',
				paletteFamily: 	'4A587F',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10553',
				graphicsetId: 	'10449',
				contentColor: 	'FFFFFF',
				contentBGColor: '4A587F',
				a_color: 		'4A587F',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '901',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '901',
internalId:  '',
customField: '20100329-171006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63091',
internalId:  '',
customField: '20100328-190040'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61899',
internalId:  '',
customField: '20100319-190506'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63109',
internalId:  '',
customField: '20100411-192005'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62768',
internalId:  '',
customField: '20100210-140438'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62139',
internalId:  '',
customField: '20100320-194312'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63100',
internalId:  '',
customField: '20100320-191623'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '952',
internalId:  '',
customField: '20100211-162504'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43112',
internalId:  '',
customField: '20091213-153941'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63365',
internalId:  '',
customField: '20100502-170358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61848',
internalId:  '',
customField: '20090111-155754'
};
webappMappings['7008']=webappMappings['7008-2666']={
webappId:    '7008',
documentId:  '62080',
internalId:  '2666',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62080',
internalId:  '',
customField: '20090329-163409'
};
webappMappings['1501']=webappMappings['1501-844676']={
webappId:    '1501',
documentId:  '901',
internalId:  '844676',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63570',
internalId:  '',
customField: '20100523-161639'
};
var canonHostname = 'wsc-worker03.chi.us.siteprotect.com';
var accountId     = 'AHW050INEQ76';
var companyName   = 'Dudley-Short+Auctions%2C+LLC';
var htmlTitle	  = 'Dudley-Short+Auctions+For+All+Your+Auction+Needs';
var metaKeywords  = 'auctioneer+++auction++dudley-short';
var metaContents  = 'auctioneer+specializing+in+on-site+auctions';
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();
};
