/* [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','7101',jdecode('Home'),jdecode(''), jdecode('%2F7101.html'), 'true',[],'',''],
	['PAGE','7152',jdecode('About+Us'),jdecode(''), jdecode('%2F7152.html'), 'true',[],'',''],
	['PAGE','7173',jdecode('Contact+Us'),jdecode(''), jdecode('%2F7173.html'), 'true',[],'',''],
	['PAGE','7194',jdecode('School+Hours'),jdecode(''), jdecode('%2F7194.html'), 'true',[],'',''],
	['PAGE','7215',jdecode('Payment+Information'),jdecode(''), jdecode('%2F7215.html'), 'true',[],'',''],
	['PAGE','7236',jdecode('Registration+Information'),jdecode(''), jdecode('%2F7236.html'), 'true',[],'',''],
	['PAGE','7257',jdecode('Semester+Information'),jdecode(''), jdecode('%2F7257.html'), 'true',[],'',''],
	['PAGE','7278',jdecode('School+Tuition'),jdecode(''), jdecode('%2F7278.html'), 'true',[],'',''],
	['PAGE','7299',jdecode('Studio+Hours'),jdecode(''), jdecode('%2F7299.html'), 'true',[],'',''],
	['PAGE','56301',jdecode('Apprenticeship+Information'),jdecode(''), jdecode('%2F56301.html'), 'true',[],'',''],
	['PAGE','56322',jdecode('Apprenticeship+Hours'),jdecode(''), jdecode('%2F56322.html'), 'true',[],'',''],
	['PAGE','23601',jdecode('Professional+Artist+%2F+Piercer+Spaces'),jdecode(''), jdecode('%2F23601.html'), 'true',[],'',''],
	['PAGE','80601',jdecode('Gift+Certificates'),jdecode(''), jdecode('%2F80601.html'), 'true',[],'',''],
	['PAGE','7320',jdecode('Walk-In%2FAppt+Info'),jdecode(''), jdecode('%2F7320.html'), 'true',[],'',''],
	['PAGE','37101',jdecode('Happy+Hour'),jdecode(''), jdecode('%2F37101.html'), 'true',[],'',''],
	['PAGE','7362',jdecode('Midnight+Madness'),jdecode(''), jdecode('%2F7362.html'), 'true',[],'',''],
	['PAGE','7383',jdecode('Tattoo+Credits'),jdecode(''), jdecode('%2F7383.html'), 'true',[],'',''],
	['PAGE','7446',jdecode('Jewelry+Specials'),jdecode(''), jdecode('%2F7446.html'), 'true',[],'',''],
	['PAGE','7404',jdecode('Piercing+Prices+%26+Daily+Specials'),jdecode(''), jdecode('%2F7404.html'), 'true',[],'',''],
	['PAGE','7341',jdecode('Tattoo+Prices+%26+Daily+Specials'),jdecode(''), jdecode('%2F7341.html'), 'true',[],'',''],
	['PAGE','55501',jdecode('Permanent+Cosmetic+Procedures+Information'),jdecode(''), jdecode('%2F55501.html'), 'true',[],'',''],
	['PAGE','7488',jdecode('Birthday+Specials'),jdecode(''), jdecode('%2F7488.html'), 'true',[],'',''],
	['PAGE','7509',jdecode('Holiday+Specials'),jdecode(''), jdecode('%2F7509.html'), 'true',[],'',''],
	['PAGE','7530',jdecode('Merchandise'),jdecode(''), jdecode('%2F7530.html'), 'true',[],'',''],
	['PAGE','7551',jdecode('Daily+News'),jdecode(''), jdecode('%2F7551.html'), 'true',[],'','']];
var siteelementCount=25;
theSitetree.topTemplateName='Nature';
theSitetree.paletteFamily='1503FF';
theSitetree.keyvisualId='3636';
theSitetree.keyvisualName='kv_3636.jpg';
theSitetree.fontsetId='10717';
theSitetree.graphicsetId='10879';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'grp35-attweb',
  product: 'WSCSYSSSSLY0X9RC'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Nature',
				paletteFamily: 	'1503FF',
				keyvisualId: 	'3636',
				keyvisualName: 	'kv_3636.jpg',
				fontsetId: 		'10717',
				graphicsetId: 	'10879',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'1503FF',
				e_color: 		'1503FF',
				f_color: 		'1503FF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7101',
internalId:  '',
customField: '20111201-103102'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7152',
internalId:  '',
customField: '20111201-103210'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7173',
internalId:  '',
customField: '20111013-162758'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7194',
internalId:  '',
customField: '20111018-084024'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7215',
internalId:  '',
customField: '20120131-222614'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7236',
internalId:  '',
customField: '20111013-162942'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7257',
internalId:  '',
customField: '20111013-155113'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7278',
internalId:  '',
customField: '20111218-090851'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7299',
internalId:  '',
customField: '20111111-100713'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7320',
internalId:  '',
customField: '20111223-123339'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7341',
internalId:  '',
customField: '20120113-181337'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7362',
internalId:  '',
customField: '20111223-123516'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7383',
internalId:  '',
customField: '20111031-114241'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7404',
internalId:  '',
customField: '20111123-121029'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7446',
internalId:  '',
customField: '20111223-123615'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '80601',
internalId:  '',
customField: '20111223-125154'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7488',
internalId:  '',
customField: '20111223-123817'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7509',
internalId:  '',
customField: '20111013-162123'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7530',
internalId:  '',
customField: '20111223-123910'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7551',
internalId:  '',
customField: '20111031-112822'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23601',
internalId:  '',
customField: '20120201-223502'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37101',
internalId:  '',
customField: '20111030-022212'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55501',
internalId:  '',
customField: '20111123-121213'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56301',
internalId:  '',
customField: '20120131-230016'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56322',
internalId:  '',
customField: '20111018-084959'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVF340I7K7PF';
var companyName   = 'Illustrated+Lady+Tattoo+%26+Piercing+Studio+%26+School';
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();
};

