/* [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','3643',jdecode('Home'),jdecode(''),'/3643.html','true',[],'',''],
	['PAGE','4743',jdecode('About+Us'),jdecode(''),'/4743.html','true',[],'',''],
	['PAGE','3946',jdecode('Events'),jdecode(''),'/3946/index.html','true',[ 
		['PAGE','3988',jdecode('Herb+Fair+%2F+Artisans+Fest'),jdecode(''),'/3946/3988.html','true',[],'','']
	],'',''],
	['PAGE','3694',jdecode('Gowns+%26+Dresses'),jdecode(''),'/3694/index.html','true',[ 
		['PAGE','3715',jdecode('Bridal+%26+Mother+of+the+Bride'),jdecode(''),'/3694/3715.html','true',[],'',''],
		['PAGE','18043',jdecode('Bridesmaid'),jdecode(''),'/3694/18043.html','true',[],'',''],
		['PAGE','3736',jdecode('Prom+%26+Homecoming'),jdecode(''),'/3694/3736.html','true',[],'',''],
		['PAGE','3757',jdecode('Pageant'),jdecode(''),'/3694/3757.html','true',[],'',''],
		['PAGE','3778',jdecode('Consignment+Gowns'),jdecode(''),'/3694/3778.html','true',[],'','']
	],'',''],
	['PAGE','3799',jdecode('Accessories'),jdecode(''),'/3799/index.html','true',[ 
		['PAGE','3820',jdecode('Hilltop%26%23x27%3Bs+Flowers'),jdecode(''),'/3799/3820.html','true',[],'',''],
		['PAGE','3841',jdecode('Personalized+Garters'),jdecode(''),'/3799/3841.html','true',[],'',''],
		['PAGE','12543',jdecode('Shoes+%26+Jewelry'),jdecode(''),'/3799/12543.html','true',[],'','']
	],'',''],
	['PAGE','3862',jdecode('Tux+Rentals'),jdecode(''),'/3862.html','true',[],'',''],
	['PAGE','3883',jdecode('Reception+Hall'),jdecode(''),'/3883.html','true',[],'',''],
	['PAGE','3925',jdecode('Event+Planning'),jdecode(''),'/3925.html','true',[],'',''],
	['PAGE','4030',jdecode('Vendors'),jdecode(''),'/4030.html','true',[],'',''],
	['PAGE','4051',jdecode('Store+Policies'),jdecode(''),'/4051.html','true',[],'',''],
	['PAGE','4072',jdecode('Directions'),jdecode(''),'/4072.html','true',[],'',''],
	['PAGE','4443',jdecode('Contact+Us'),jdecode(''),'/4443.html','true',[],'','']];
var siteelementCount=21;
theSitetree.topTemplateName='Phase';
theSitetree.paletteFamily='CBDD6C';
theSitetree.keyvisualId='12151';
theSitetree.keyvisualName='kv_12151.jpg';
theSitetree.fontsetId='33327';
theSitetree.graphicsetId='14199';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='888888';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Phase',
				paletteFamily: 	'CBDD6C',
				keyvisualId: 	'12151',
				keyvisualName: 	'kv_12151.jpg',
				fontsetId: 		'33327',
				graphicsetId: 	'14199',
				contentColor: 	'FFFFFF',
				contentBGColor: '888888',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Palatino Linotype, Book Antiqua, Palatino, serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3643',
internalId:  '',
customField: '20100628-141541'
};
webappMappings['7008']=webappMappings['7008-10616']={
webappId:    '7008',
documentId:  '4443',
internalId:  '10616',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4030',
internalId:  '',
customField: '20100628-123921'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3799',
internalId:  '',
customField: '20090924-155857'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4743',
internalId:  '',
customField: '20100628-122928'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3694',
internalId:  '',
customField: '20100628-123043'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3946',
internalId:  '',
customField: '20100628-135931'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3988',
internalId:  '',
customField: '20100628-143247'
};
webappMappings['7008']=webappMappings['7008-10663']={
webappId:    '7008',
documentId:  '3988',
internalId:  '10663',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3862',
internalId:  '',
customField: '20091014-145244'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3925',
internalId:  '',
customField: '20090909-194406'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4051',
internalId:  '',
customField: '20100628-123755'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3883',
internalId:  '',
customField: '20100628-130143'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4072',
internalId:  '',
customField: '20090909-194433'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4443',
internalId:  '',
customField: '20100628-124025'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '3643',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-14229456']={
webappId:    '1501',
documentId:  '3643',
internalId:  '14229456',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3715',
internalId:  '',
customField: '20091008-154834'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18043',
internalId:  '',
customField: '20100628-123226'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3736',
internalId:  '',
customField: '20091202-122103'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3757',
internalId:  '',
customField: '20100628-123340'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3778',
internalId:  '',
customField: '20091112-105621'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3820',
internalId:  '',
customField: '20090924-141839'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3841',
internalId:  '',
customField: '20090924-164404'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12543',
internalId:  '',
customField: '20091001-114552'
};
webappMappings['7008']=webappMappings['7008-11406']={
webappId:    '7008',
documentId:  '3841',
internalId:  '11406',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-d0ef543c811c72fac609b667da380855']={
webappId:    '7060',
documentId:  '3736',
internalId:  'd0ef543c811c72fac609b667da380855',
customField: 'language:en;country:US;'
};
webappMappings['8002']=webappMappings['8002-search']={
webappId:    '8002',
documentId:  '4743',
internalId:  'search',
customField: 'language:en;country:US;'
};
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVFL30INHXUB';
var companyName   = 'Hilltop+Designs+%26+Receptions';
var htmlTitle	  = 'Hilltop+Designs+-+Prom%2C+homecoming%2C+bridal%2C+pageant%2C+tuxes%2C+reception+hall%2C+tiffany+dresses';
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();
};
