/* [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','701',jdecode('Home'),jdecode(''),'/701.html','true',[],''],
	['PAGE','752',jdecode('About+us'),jdecode(''),'/752/index.html','true',[ 
		['PAGE','773',jdecode('The+team'),jdecode(''),'/752/773/index.html','true',[ 
			['PAGE','12701',jdecode('The+team+%28follow+up+page%29'),jdecode(''),'/752/773/12701.html','false',[],'']
		],'']
	],''],
	['PAGE','15501',jdecode('Products'),jdecode(''),'/15501/index.html','true',[ 
		['PAGE','857',jdecode('Railings+%26+Gates'),jdecode(''),'/15501/857.html','true',[],''],
		['PAGE','794',jdecode('Copper+Work'),jdecode(''),'/15501/794.html','true',[],''],
		['PAGE','815',jdecode('Custom+Furnishings'),jdecode(''),'/15501/815/index.html','true',[ 
			['PAGE','13101',jdecode('First+Product+%28follow+up+page%29'),jdecode(''),'/15501/815/13101.html','false',[],'']
		],''],
		['PAGE','836',jdecode('Lawn+%26+Garden'),jdecode(''),'/15501/836.html','true',[],''],
		['PAGE','15522',jdecode('Construction+'),jdecode(''),'/15501/15522.html','true',[],''],
		['PAGE','17401',jdecode('Signs'),jdecode(''),'/15501/17401.html','true',[],''],
		['PAGE','18001',jdecode('Farm+%26+Ranch'),jdecode(''),'/15501/18001.html','true',[],'']
	],''],
	['PAGE','899',jdecode('Jobs'),jdecode(''),'/899.html','true',[],''],
	['PAGE','920',jdecode('Contact'),jdecode(''),'/920/index.html','true',[ 
		['PAGE','941',jdecode('Adresses'),jdecode(''),'/920/941.html','true',[],'']
	],''],
	['PAGE','5806',jdecode('Guestbook'),jdecode(''),'/5806/index.html','true',[ 
		['PAGE','5801',jdecode('Read+Guestbook'),jdecode(''),'/5806/5801.html','false',[],'']
	],'']];
var siteelementCount=18;
theSitetree.topTemplateName='Akropolis';
theSitetree.paletteFamily='5E5E5E';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10553';
theSitetree.graphicsetId='10448';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='5e5e5e';
var theTemplate={
				name: 			'Akropolis',
				paletteFamily: 	'5E5E5E',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10553',
				graphicsetId: 	'10448',
				contentColor: 	'FFFFFF',
				contentBGColor: '5e5e5e',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'5E5E5E',
				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:  '701',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15501',
internalId:  '',
customField: '20071228-232705'
};
webappMappings['1002']=webappMappings['1002-5806AHW050INEQS5']={
webappId:    '1002',
documentId:  '5806',
internalId:  '5806AHW050INEQS5',
customField: 'icq=false'
};
webappMappings['1001']=webappMappings['1001-ahw050ineqs5bf653f843b677d7b']={
webappId:    '1001',
documentId:  '773',
internalId:  'ahw050ineqs5bf653f843b677d7b',
customField: ''
};
webappMappings['1001']=webappMappings['1001-ahw050ineqs5bf653f843b677d7b']={
webappId:    '1001',
documentId:  '12701',
internalId:  'ahw050ineqs5bf653f843b677d7b',
customField: 'followUp'
};
webappMappings['1001']=webappMappings['1001-ahw050ineqs57d5d9f42d9a01e25']={
webappId:    '1001',
documentId:  '815',
internalId:  'ahw050ineqs57d5d9f42d9a01e25',
customField: ''
};
webappMappings['1001']=webappMappings['1001-ahw050ineqs57d5d9f42d9a01e25']={
webappId:    '1001',
documentId:  '13101',
internalId:  'ahw050ineqs57d5d9f42d9a01e25',
customField: 'followUp'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '701',
internalId:  '',
customField: '20091119-230701'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '815',
internalId:  '',
customField: '20091119-233146'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '752',
internalId:  '',
customField: '20070912-011614'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '773',
internalId:  '',
customField: '20071228-230216'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12701',
internalId:  '',
customField: '20070912-012318'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '857',
internalId:  '',
customField: '20071229-001943'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '794',
internalId:  '',
customField: '20071207-230040'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13101',
internalId:  '',
customField: '20070912-012728'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '836',
internalId:  '',
customField: '20071005-125115'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15522',
internalId:  '',
customField: '20071229-002652'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17401',
internalId:  '',
customField: '20071228-233240'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18001',
internalId:  '',
customField: '20071228-234024'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '899',
internalId:  '',
customField: '20070305-003958'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '920',
internalId:  '',
customField: '20071207-231248'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '941',
internalId:  '',
customField: '20070304-010328'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5806',
internalId:  '',
customField: '20070304-213207'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5801',
internalId:  '',
customField: '20070304-213207'
};
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050INEQS5';
var companyName   = 'Mark+Siron+Custom+Iron+Works';
var htmlTitle	  = '';
var metaKeywords  = 'custom+kitchen+hoods%2C+granite+tables%2C+copper+work%2C+gazeboe%2C+wrought+iron%2C+ornamental+iron+for+lawn+and+garden%2C+iron+work+furnishings%2C+custom+metal+work%2C+wrought+iron+tables%2C+custom+iron+fences+and+gates%2C+Hermiston%2C+Oregon+ornamental+iron%2C+copper%2C+decorative+metal+work%2C+metal+art+work%2C+metal+sculpture%2C+weathervanes%2C+stainless+steel+railings%2C+stainless+steel+gates%2C+Metal+work+for+Hermiston+Oregon+and+surrounding+areas';
var metaContents  = 'Custom+Ornamental+Metal+Works.++Custom+Iron+Works%2C+Metal+Sculpture%2C+Brass+Works%2CCustom++Kitchen+Hoods%2C+Granite+Specialty+Tables%2C+Iron+Gates';
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();
};
