/* [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','2820',jdecode('Home'),jdecode(''),'/2820.html','true',[],'',''],
	['PAGE','2871',jdecode('Freehand+Engraving'),jdecode(''),'/2871.html','true',[],'',''],
	['PAGE','2892',jdecode('Airbrushing'),jdecode(''),'/2892.html','true',[],'',''],
	['PAGE','3320',jdecode('Chirts+4+Chairs'),jdecode(''),'/3320.html','true',[],'',''],
	['PAGE','2913',jdecode('Events+and+Options'),jdecode(''),'/2913.html','true',[],'',''],
	['PAGE','2934',jdecode('Calendar+of+Events'),jdecode(''),'/2934.html','true',[],'',''],
	['PAGE','2955',jdecode('Gallery+of+Work'),jdecode(''),'/2955.html','true',[],'',''],
	['PAGE','2976',jdecode('Ideas'),jdecode(''),'/2976/index.html','true',[ 
		['PAGE','3483',jdecode('Engraving+Event+Ideas'),jdecode(''),'/2976/3483.html','true',[],'',''],
		['PAGE','3504',jdecode('Airbrush+Event+Ideas'),jdecode(''),'/2976/3504.html','true',[],'',''],
		['PAGE','3525',jdecode('Message+Ideas'),jdecode(''),'/2976/3525.html','true',[],'',''],
		['PAGE','3546',jdecode('Gift+Ideas'),jdecode(''),'/2976/3546.html','true',[],'',''],
		['PAGE','3567',jdecode('Engagement+Ideas'),jdecode(''),'/2976/3567.html','true',[],'','']
	],'',''],
	['PAGE','2997',jdecode('About+us'),jdecode(''),'/2997/index.html','true',[ 
		['PAGE','3018',jdecode('How+to+find+us'),jdecode(''),'/2997/3018.html','true',[],'',''],
		['PAGE','3039',jdecode('Our+team'),jdecode(''),'/2997/3039.html','true',[],'',''],
		['PAGE','3060',jdecode('The+practice'),jdecode(''),'/2997/3060.html','true',[],'','']
	],'',''],
	['PAGE','3081',jdecode('Prices'),jdecode(''),'/3081.html','true',[],'',''],
	['PAGE','3102',jdecode('Contact'),jdecode(''),'/3102.html','true',[],'',''],
	['PAGE','19200',jdecode('Airstyleart+RSS'),jdecode(''),'/19200.html','true',[],'','']];
var siteelementCount=20;
theSitetree.topTemplateName='Logg';
theSitetree.paletteFamily='2A7871';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='424';
theSitetree.graphicsetId='473';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='2A7871';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Logg',
				paletteFamily: 	'2A7871',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'424',
				graphicsetId: 	'473',
				contentColor: 	'FFFFFF',
				contentBGColor: '2A7871',
				a_color: 		'2A7871',
				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['7060']=webappMappings['7060-3ba25e6af7edc1358fb0cacb8830d5b2']={
webappId:    '7060',
documentId:  '2955',
internalId:  '3ba25e6af7edc1358fb0cacb8830d5b2',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2820',
internalId:  '',
customField: '20100207-231404'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2871',
internalId:  '',
customField: '20100103-004610'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2892',
internalId:  '',
customField: '20100207-232732'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3320',
internalId:  '',
customField: '20100103-222306'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2913',
internalId:  '',
customField: '20100103-222325'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2976',
internalId:  '',
customField: '20100103-222539'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3483',
internalId:  '',
customField: '20100103-221820'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3504',
internalId:  '',
customField: '20100103-221801'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3525',
internalId:  '',
customField: '20100103-221854'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3546',
internalId:  '',
customField: '20100103-221918'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3567',
internalId:  '',
customField: '20100103-221955'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2997',
internalId:  '',
customField: '20100207-233725'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3018',
internalId:  '',
customField: '20100103-222031'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3039',
internalId:  '',
customField: '20100103-222050'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3060',
internalId:  '',
customField: '20100103-222114'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3081',
internalId:  '',
customField: '20100103-222132'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3102',
internalId:  '',
customField: '20100207-233820'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19200',
internalId:  '',
customField: '20100208-003229'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2934',
internalId:  '',
customField: '20100207-233228'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2955',
internalId:  '',
customField: '20100103-222519'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2820',
internalId:  '1006',
customField: '1006'
};
webappMappings['7060']=webappMappings['7060-9fa763bd104e15a64a84e454f9f865d7']={
webappId:    '7060',
documentId:  '2871',
internalId:  '9fa763bd104e15a64a84e454f9f865d7',
customField: 'language:en;country:US;'
};
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVF340I7CW6E';
var companyName   = 'Air+Style+Art';
var htmlTitle	  = '';
var metaKeywords  = '';
var metaContents  = '';
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();
};
