/* [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','2601',jdecode('Home'),jdecode(''), jdecode('%2F2601%2Findex.html'), 'true',[ 
		['PAGE','2652',jdecode('Drawings'),jdecode(''), jdecode('%2F2601%2F2652.html'), 'true',[],'',''],
		['PAGE','7901',jdecode('Chalk+Models+and+Design'),jdecode(''), jdecode('%2F2601%2F7901.html'), 'true',[],'',''],
		['PAGE','2673',jdecode('Design+for+living'),jdecode(''), jdecode('%2F2601%2F2673.html'), 'true',[],'',''],
		['PAGE','2694',jdecode('Renovations'),jdecode(''), jdecode('%2F2601%2F2694.html'), 'true',[],'',''],
		['PAGE','18201',jdecode('More+Examples'),jdecode(''), jdecode('%2F2601%2F18201.html'), 'true',[],'',''],
		['PAGE','6201',jdecode('3D+rendering'),jdecode(''), jdecode('%2F2601%2F6201.html'), 'true',[],'','']
	],'',''],
	['PAGE','12001',jdecode('Concepts'),jdecode(''), jdecode('%2F12001.html'), 'true',[],'',''],
	['PAGE','15701',jdecode('Concept+to+Build'),jdecode(''), jdecode('%2F15701.html'), 'true',[],'',''],
	['PAGE','2715',jdecode('Gallery'),jdecode(''), jdecode('%2F2715.html'), 'true',[],'',''],
	['PAGE','2736',jdecode('List+of+links'),jdecode(''), jdecode('%2F2736.html'), 'true',[],'',''],
	['PAGE','2757',jdecode('Contact'),jdecode(''), jdecode('%2F2757.html'), 'true',[],'','']];
var siteelementCount=12;
theSitetree.topTemplateName='View';
theSitetree.paletteFamily='ACC0FF';
theSitetree.keyvisualId='11131';
theSitetree.keyvisualName='kv_11131.jpg';
theSitetree.fontsetId='32029';
theSitetree.graphicsetId='13852';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='ACC0FF';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'grp32-tnz',
  product: 'WSCSYSSSSLYTC22A'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'View',
				paletteFamily: 	'ACC0FF',
				keyvisualId: 	'11131',
				keyvisualName: 	'kv_11131.jpg',
				fontsetId: 		'32029',
				graphicsetId: 	'13852',
				contentColor: 	'FFFFFF',
				contentBGColor: 'ACC0FF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['7060']=webappMappings['7060-4f267841027bf478a8d63dff6064e38b']={
webappId:    '7060',
documentId:  '2715',
internalId:  '4f267841027bf478a8d63dff6064e38b',
customField: 'language:en;country:US;'
};
webappMappings['7008']=webappMappings['7008-10015']={
webappId:    '7008',
documentId:  '2757',
internalId:  '10015',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2601',
internalId:  '',
customField: '20120112-000005'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2652',
internalId:  '',
customField: '20100521-230004'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2673',
internalId:  '',
customField: '20090809-225709'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2694',
internalId:  '',
customField: '20100521-224924'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2715',
internalId:  '',
customField: '20090809-221439'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2736',
internalId:  '',
customField: '20100103-163253'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2757',
internalId:  '',
customField: '20100103-162223'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6201',
internalId:  '',
customField: '20120111-233021'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7901',
internalId:  '',
customField: '20110304-174049'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15701',
internalId:  '',
customField: '20100604-171120'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12001',
internalId:  '',
customField: '20100604-170935'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2601',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18201',
internalId:  '',
customField: '20111126-234333'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVFL30INH6CV';
var companyName   = 'ADSTUDIO';
var htmlTitle	  = 'Residetial+House+plans+and+drafting+services';
var metaKeywords  = 'architect%2C+architectural+designer%2Cplanner%2C+designer%2C3d+rendering%2C+3d+concepts%2C+concepts%2Cbuilding+consent%2Cresource+consent%2Cplanning%2Csubdivision%2Calterations%2Calteration%2Crenovation%2Cresidential%2Cdesign%2Chouse%2Chome%2Cextension%2Crendered%2Csketch%2Csustainable';
var metaContents  = 'architectural+designs%2C+3d+concepts%2C+planning%2C+building+consent%2C+resource+consents%2C+obtaining+building+permissions%2C+subdivisions%2C+daylight+strategies%2C+eco+designs%2C+code+compliance%2Chouse+plans';
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();
};

