/* [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','6701',jdecode('Home'),jdecode(''), jdecode('%2F6701.html'), 'true',[],'',''],
	['PAGE','6752',jdecode('Weddings'),jdecode(''), jdecode('%2F6752%2Findex.html'), 'true',[ 
		['PAGE','6773',jdecode('Modest+Wedding+Gowns'),jdecode(''), jdecode('%2F6752%2F6773.html'), 'true',[],'',''],
		['PAGE','6794',jdecode('Contemporary+Wedding+Gowns'),jdecode(''), jdecode('%2F6752%2F6794.html'), 'true',[],'',''],
		['PAGE','6815',jdecode('Custom+Wedding+Gowns'),jdecode(''), jdecode('%2F6752%2F6815.html'), 'true',[],'',''],
		['PAGE','6836',jdecode('Head+to+Toe'),jdecode(''), jdecode('%2F6752%2F6836.html'), 'true',[],'',''],
		['PAGE','9101',jdecode('Bridesmaid+Dresses'),jdecode(''), jdecode('%2F6752%2F9101.html'), 'true',[],'',''],
		['PAGE','7046',jdecode('Real+Brides+and+Grooms'),jdecode(''), jdecode('%2F6752%2F7046.html'), 'true',[],'',''],
		['PAGE','13401',jdecode('Dressing+Parents'),jdecode(''), jdecode('%2F6752%2F13401.html'), 'true',[],'',''],
		['PAGE','15501',jdecode('Gown+Preservation'),jdecode(''), jdecode('%2F6752%2F15501.html'), 'true',[],'','']
	],'',''],
	['PAGE','31112',jdecode('Designer+Resource'),jdecode(''), jdecode('%2F31112.html'), 'true',[],'',''],
	['PAGE','6857',jdecode('Tuxedos'),jdecode(''), jdecode('%2F6857%2Findex.html'), 'true',[ 
		['PAGE','6878',jdecode('Wedding+Tuxedos'),jdecode(''), jdecode('%2F6857%2F6878.html'), 'true',[],'',''],
		['PAGE','6899',jdecode('Quinceanera+Tuxedos'),jdecode(''), jdecode('%2F6857%2F6899.html'), 'true',[],'',''],
		['PAGE','6920',jdecode('Prom+Tuxedos'),jdecode(''), jdecode('%2F6857%2F6920.html'), 'true',[],'','']
	],'',''],
	['PAGE','6941',jdecode('Quinceanera'),jdecode(''), jdecode('%2F6941%2Findex.html'), 'true',[ 
		['PAGE','6962',jdecode('Quinceanera+Packages'),jdecode(''), jdecode('%2F6941%2F6962.html'), 'true',[],'','']
	],'',''],
	['PAGE','7151',jdecode('Prom'),jdecode(''), jdecode('%2F7151%2Findex.html'), 'true',[ 
		['PAGE','6983',jdecode('Prom+Dresses'),jdecode(''), jdecode('%2F7151%2F6983.html'), 'true',[],'',''],
		['PAGE','7067',jdecode('Real+Prom+Customers'),jdecode(''), jdecode('%2F7151%2F7067.html'), 'true',[],'',''],
		['PAGE','16801',jdecode('Modest+Prom%2FCotillion'),jdecode(''), jdecode('%2F7151%2F16801.html'), 'true',[],'',''],
		['PAGE','16822',jdecode('Contemporary+Prom%2FCotillion'),jdecode(''), jdecode('%2F7151%2F16822.html'), 'true',[],'',''],
		['PAGE','7109',jdecode(''),jdecode(''), jdecode('%2F7151%2F7109.html'), 'true',[],'','']
	],'',''],
	['PAGE','7088',jdecode('Our+Store+and+Hours'),jdecode(''), jdecode('%2F7088.html'), 'true',[],'',''],
	['PAGE','8301',jdecode('Alterations'),jdecode(''), jdecode('%2F8301.html'), 'true',[],'',''],
	['PAGE','13201',jdecode('About+us'),jdecode(''), jdecode('%2F13201%2Findex.html'), 'true',[ 
		['PAGE','13243',jdecode('Our+team'),jdecode(''), jdecode('%2F13201%2F13243.html'), 'true',[],'','']
	],'',''],
	['PAGE','9301',jdecode('Contact+Us'),jdecode(''), jdecode('%2F9301.html'), 'true',[],'',''],
	['PAGE','7004',jdecode('Our+Guestbook'),jdecode(''), jdecode('%2F7004.html'), 'true',[],'',''],
	['PAGE','7130',jdecode('Our+Blog'),jdecode(''), jdecode('%2F7130.html'), 'true',[],'',''],
	['PAGE','7025',jdecode('Customer+Experience'),jdecode(''), jdecode('%2F7025.html'), 'true',[],'',''],
	['PAGE','29412',jdecode('Formality+Descriptions'),jdecode(''), jdecode('%2F29412.html'), 'true',[],'',''],
	['PAGE','10501',jdecode('F.A.Q.'),jdecode(''), jdecode('%2F10501.html'), 'true',[],'',''],
	['PAGE','27712',jdecode('Appointment+Info'),jdecode(''), jdecode('%2F27712.html'), 'true',[],'',''],
	['PAGE','13264',jdecode('Special+Deals'),jdecode(''), jdecode('%2F13264.html'), 'true',[],'',''],
	['PAGE','13901',jdecode('Site+Photography'),jdecode(''), jdecode('%2F13901.html'), 'true',[],'','']];
var siteelementCount=36;
theSitetree.topTemplateName='Nebula';
theSitetree.paletteFamily='A83D3D';
theSitetree.keyvisualId='8801';
theSitetree.keyvisualName='kv_8801.jpg';
theSitetree.fontsetId='17192';
theSitetree.graphicsetId='12479';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='E86F6F';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'wsc-whgeneric',
  product: 'WSCSYSSSSLY0XFAC'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Nebula',
				paletteFamily: 	'A83D3D',
				keyvisualId: 	'8801',
				keyvisualName: 	'kv_8801.jpg',
				fontsetId: 		'17192',
				graphicsetId: 	'12479',
				contentColor: 	'000000',
				contentBGColor: 'E86F6F',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1002']=webappMappings['1002-7004awh340in2yi5']={
webappId:    '1002',
documentId:  '7004',
internalId:  '7004awh340in2yi5',
customField: 'icq=false'
};
webappMappings['2002']=webappMappings['2002-routing']={
webappId:    '2002',
documentId:  '7088',
internalId:  'routing',
customField: 'en_US'
};
webappMappings['7050']=webappMappings['7050-108']={
webappId:    '7050',
documentId:  '7130',
internalId:  '108',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6701',
internalId:  '',
customField: '20120130-205201'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6752',
internalId:  '',
customField: '20111126-201858'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7004',
internalId:  '',
customField: '20110614-000850'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6773',
internalId:  '',
customField: '20111126-202934'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7130',
internalId:  '',
customField: '20111024-212941'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6794',
internalId:  '',
customField: '20111104-210302'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6815',
internalId:  '',
customField: '20111127-175446'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6836',
internalId:  '',
customField: '20110320-134654'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6983',
internalId:  '',
customField: '20110327-174913'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7025',
internalId:  '',
customField: '20111116-214123'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7046',
internalId:  '',
customField: '20110614-000108'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13901',
internalId:  '',
customField: '20110924-193401'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9101',
internalId:  '',
customField: '20110320-135858'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13401',
internalId:  '',
customField: '20110320-141908'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15501',
internalId:  '',
customField: '20110320-143342'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7151',
internalId:  '',
customField: '20110327-173229'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7088',
internalId:  '',
customField: '20120130-212134'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8301',
internalId:  '',
customField: '20110613-234710'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6857',
internalId:  '',
customField: '20110331-170841'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7067',
internalId:  '',
customField: '20110320-181405'
};
webappMappings['7060']=webappMappings['7060-b5fd2083ed59da2bd432e0fa2a276bae']={
webappId:    '7060',
documentId:  '7067',
internalId:  'b5fd2083ed59da2bd432e0fa2a276bae',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16801',
internalId:  '',
customField: '20110320-182756'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16822',
internalId:  '',
customField: '20110320-183409'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6878',
internalId:  '',
customField: '20110320-190742'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6899',
internalId:  '',
customField: '20110320-191455'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6920',
internalId:  '',
customField: '20110320-191748'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6941',
internalId:  '',
customField: '20110331-191112'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6962',
internalId:  '',
customField: '20110320-194106'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27712',
internalId:  '',
customField: '20120130-211139'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13201',
internalId:  '',
customField: '20110613-234759'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13243',
internalId:  '',
customField: '20110613-234930'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9301',
internalId:  '',
customField: '20120130-212559'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10501',
internalId:  '',
customField: '20110924-210914'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13264',
internalId:  '',
customField: '20120205-165225'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29412',
internalId:  '',
customField: '20111125-212649'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '6701',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7109',
internalId:  '',
customField: '20110212-214400'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31112',
internalId:  '',
customField: '20111212-172428'
};
var webAppHostname = 'cgicm4all.west-datacenter.net:80';
var canonHostname = 'cm4all01.west-datacenter.net';
var accountId     = 'AWH340IN2YI5';
var companyName   = 'Most+Trusted+Bridal+and+Formal+Wear+for+3+Generations';
var htmlTitle	  = 'Gallery+by+Lynette+Bridal+Prom+Tux+Utah+';
var metaKeywords  = 'Ogden+Utah%2C+Modest+wedding+gown%2C+modest+prom%2C+Tuxedo+Rental%2C+Mormon%2C+Temple%2C+LDS%2C+Temple+Ready%2C+Salt+Lake+City+Utah%2C+Weber+County%2C+Davis+County%2C+Logan+Utah%2C+White+wedding%2C+Utah+wedding%2C+Beautifully+Modest%2C+Totally+Modest%2C+Kate+Middleton%2C+Prom+Dress+Ogden+Utah%2C+Prom+dress+Utah%2C+Wedding+Utah%2C+Modest+Utah%2C';
var metaContents  = 'Utah+Bridal%2C+Formal+Wear+and+Tuxedos+at+The+Gallery+by+Lynette+provides+everything+you+could+ever+need.++Budget+Wedding+to+Custom+Wedding+gowns%2C+The+Best+Prom+Dresses+in+Utah';
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();
};

