/* [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','11',jdecode('Home'),jdecode(''),'/11.html','true',[],''],
	['PAGE','22801',jdecode('Basic+Designs'),jdecode(''),'/22801/index.html','true',[ 
		['PAGE','33301',jdecode('Flat'),jdecode(''),'/22801/33301.html','true',[],''],
		['PAGE','33322',jdecode('Concave'),jdecode(''),'/22801/33322.html','true',[],''],
		['PAGE','33343',jdecode('Bell'),jdecode(''),'/22801/33343.html','true',[],'']
	],''],
	['PAGE','1147',jdecode('Photo+Gallery'),jdecode(''),'/1147.html','true',[],''],
	['PAGE','9201',jdecode('Color+Chart'),jdecode(''),'/9201.html','true',[],''],
	['PAGE','1070',jdecode('About+Us'),jdecode(''),'/1070.html','true',[],''],
	['PAGE','1265',jdecode('Contact+Us'),jdecode(''),'/1265.html','true',[],'']];
var siteelementCount=9;
theSitetree.topTemplateName='Akropolis';
theSitetree.paletteFamily='A4A4AC';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10554';
theSitetree.graphicsetId='10451';
theSitetree.contentColor='1d1d20';
theSitetree.contentBGColor='A4A4AC';
var theTemplate={
				name: 			'Akropolis',
				paletteFamily: 	'A4A4AC',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10554',
				graphicsetId: 	'10451',
				contentColor: 	'1d1d20',
				contentBGColor: 'A4A4AC',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'A4A4AC',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1501']=webappMappings['1501-583191']={
webappId:    '1501',
documentId:  '11',
internalId:  '583191',
customField: '1501'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '11',
internalId:  '1006',
customField: '1006'
};
webappMappings['7060']=webappMappings['7060-c31543c5a06df4c92e8da1ea0c17811e']={
webappId:    '7060',
documentId:  '1147',
internalId:  'c31543c5a06df4c92e8da1ea0c17811e',
customField: 'language:en;country:US;'
};
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10IN2J7J';
var companyName   = 'WeldDoneDesign';
var htmlTitle	  = 'WeldDoneDesign.Com+-+Lafayette+and+Acadiana+Copper+Awnings%2C+Metal+Awnings%2C+and+Copper+Hoods%2C+modern+manufacturer';
var metaKeywords  = 'Copper+Awnings%2C+Lafayette+copper+awnings%2C+Acadiana+copper+awnings%2C+Louisiana+copper+awnings.++Metal+awnings%2C+Lafayette+metal+awnings%2C+Acadiana+metal+awnings%2C+Louisiana+metal+awnings%2C+Canvas+Awnings%2C+Lafayette+canvas+anwings%2C+Acadiana+canvas+awnings%2C+Louisiana+canvas+awnings.++Roller+curtains%2C+Sunbrella+fabric%2C+standing+seam+awings%2C+copper+patios%2C+copper+kitchen+hoods%2C+barrel%2C+wedge%2C+marquee%2C+dome%2C+all+shape+awnings.';
var metaContents  = 'Copper+Awnings%2C+Metal+Awnings%2C+and+Copper+Hoods++Lafayettes+newest+copper+and+metal+awning+welding+shop.++We+specialize+in+standing+seam+copper+and+standing+seam+metal+awnings.++Lafayette+area+%28Acadiana%29+most+experienced+awning+welding+shop.+Located+in+Carencro++LA++just+north+of+Lafayette.+Copper+awnings+and+metal+awnings+for+Lake+Charles+area+as+well.';
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();
};
