/* [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','32',jdecode('Home'),jdecode(''),'/32.html','true',[],'',''],
	['PAGE','53',jdecode('About+us'),jdecode(''),'/53/index.html','true',[ 
		['PAGE','62',jdecode('The+team'),jdecode(''),'/53/62.html','true',[],'','']
	],'',''],
	['PAGE','4403',jdecode('Gallery+1'),jdecode(''),'/4403.html','true',[],'',''],
	['PAGE','1764',jdecode('Gallery+2'),jdecode(''),'/1764/index.html','true',[ 
		['PAGE','2365',jdecode('Gallery+3'),jdecode(''),'/1764/2365.html','true',[],'',''],
		['PAGE','3485',jdecode('Gallery+4'),jdecode(''),'/1764/3485.html','true',[],'',''],
		['PAGE','3750',jdecode('Gallery+5'),jdecode(''),'/1764/3750.html','true',[],'','']
	],'',''],
	['PAGE','4679',jdecode('Pennsic+Gallery'),jdecode(''),'/4679.html','true',[],'',''],
	['PAGE','80',jdecode('Schedule+of+Events'),jdecode(''),'/80.html','true',[],'',''],
	['PAGE','89',jdecode('Services'),jdecode(''),'/89.html','true',[],'',''],
	['PAGE','3231',jdecode('Charity%2FFundraising+'),jdecode(''),'/3231.html','true',[],'',''],
	['PAGE','107',jdecode('Special+Packages'),jdecode(''),'/107.html','true',[],'',''],
	['PAGE','2179',jdecode('Other+services%2Fadd+ons'),jdecode(''),'/2179.html','true',[],'',''],
	['PAGE','2720',jdecode('What+is+henna%3F'),jdecode(''),'/2720.html','true',[],'',''],
	['PAGE','1392',jdecode('Danger%21+Black+Henna'),jdecode(''),'/1392.html','true',[],'',''],
	['PAGE','371',jdecode('Links'),jdecode(''),'/371.html','true',[],'',''],
	['PAGE','116',jdecode('Contact+Us'),jdecode(''),'/116.html','true',[],'',''],
	['PAGE','2009',jdecode('Classes'),jdecode(''),'/2009.html','true',[],'',''],
	['PAGE','2600',jdecode('The+story+of+a+stain'),jdecode(''),'/2600.html','true',[],'',''],
	['PAGE','2235',jdecode('Products'),jdecode(''),'/2235.html','true',[],'',''],
	['PAGE','3916',jdecode('Guestbook'),jdecode(''),'/3916/index.html','true',[ 
		['PAGE','3915',jdecode('Read+Guestbook'),jdecode(''),'/3916/3915.html','false',[],'','']
	],'','']];
var siteelementCount=23;
theSitetree.topTemplateName='Curve';
theSitetree.paletteFamily='FFE397';
theSitetree.keyvisualId='5773';
theSitetree.keyvisualName='kv_5773.jpg';
theSitetree.fontsetId='11089';
theSitetree.graphicsetId='11856';
theSitetree.contentColor='464646';
theSitetree.contentBGColor='FFD791';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Curve',
				paletteFamily: 	'FFE397',
				keyvisualId: 	'5773',
				keyvisualName: 	'kv_5773.jpg',
				fontsetId: 		'11089',
				graphicsetId: 	'11856',
				contentColor: 	'464646',
				contentBGColor: 'FFD791',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '32',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53',
internalId:  '',
customField: '20100110-205537'
};
webappMappings['1002']=webappMappings['1002-3916AHW050INXS8V']={
webappId:    '1002',
documentId:  '3916',
internalId:  '3916AHW050INXS8V',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32',
internalId:  '',
customField: '20100418-121849'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62',
internalId:  '',
customField: '20100110-211739'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4403',
internalId:  '',
customField: '20071030-005816'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1764',
internalId:  '',
customField: '20100418-115908'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2365',
internalId:  '',
customField: '20100418-115943'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3485',
internalId:  '',
customField: '20070628-232929'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3750',
internalId:  '',
customField: '20100418-120518'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4679',
internalId:  '',
customField: '20070813-180936'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '80',
internalId:  '',
customField: '20100730-144413'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '89',
internalId:  '',
customField: '20080311-180454'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3231',
internalId:  '',
customField: '20080311-180617'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '107',
internalId:  '',
customField: '20080502-134338'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2179',
internalId:  '',
customField: '20080311-181315'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2720',
internalId:  '',
customField: '20090525-145600'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1392',
internalId:  '',
customField: '20070220-000027'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '371',
internalId:  '',
customField: '20070626-211057'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '116',
internalId:  '',
customField: '20090630-195140'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2009',
internalId:  '',
customField: '20071030-010001'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2600',
internalId:  '',
customField: '20080126-010413'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2235',
internalId:  '',
customField: '20070403-022000'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3916',
internalId:  '',
customField: '20080126-010613'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3915',
internalId:  '',
customField: '20070618-212308'
};
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050INXS8V';
var companyName   = 'The+Tipsy+Turtle';
var htmlTitle	  = 'The+Tipsy+Turtle';
var metaKeywords  = 'The+Tipsy+Turtle+Henna+mehendi+mehandi++mylanji+Hair+Braiding+Hair+Wraps+Hair+Braids+Henna+Party+Henna+Cake+Ulster+County+Hudson+Valley+Body+Art+Henna+Tattoo+Henna+Designs+Henna+Body+Art+Tipsy+Turtle+Henna+Bridal+Henna+Birthday+Party++';
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();
};
