/* [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','3801',jdecode('Home'),jdecode(''), jdecode('%2F3801.html'), 'true',[],'',''],
	['PAGE','3852',jdecode('Services'),jdecode(''), jdecode('%2F3852.html'), 'true',[],'',''],
	['PAGE','9801',jdecode('UV+Free+Spray+Tanning'),jdecode(''), jdecode('%2F9801.html'), 'false',[],'',''],
	['PAGE','14501',jdecode('Products'),jdecode(''), jdecode('%2F14501.html'), 'true',[],'',''],
	['PAGE','5101',jdecode('Prices'),jdecode(''), jdecode('%2F5101.html'), 'true',[],'',''],
	['PAGE','13601',jdecode('Coupons+and+Specials'),jdecode(''), jdecode('%2F13601.html'), 'false',[],'',''],
	['PAGE','3873',jdecode('Contact+Us'),jdecode(''), jdecode('%2F3873.html'), 'true',[],'',''],
	['PAGE','3894',jdecode('About+us'),jdecode(''), jdecode('%2F3894.html'), 'true',[],'',''],
	['PAGE','11201',jdecode('Local+Weather'),jdecode(''), jdecode('%2F11201.html'), 'true',[],'','']];
var siteelementCount=9;
theSitetree.topTemplateName='Blog';
theSitetree.paletteFamily='591617';
theSitetree.keyvisualId='11521';
theSitetree.keyvisualName='kv_11521.jpg';
theSitetree.fontsetId='32866';
theSitetree.graphicsetId='13951';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='989696';
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: 			'Blog',
				paletteFamily: 	'591617',
				keyvisualId: 	'11521',
				keyvisualName: 	'kv_11521.jpg',
				fontsetId: 		'32866',
				graphicsetId: 	'13951',
				contentColor: 	'FFFFFF',
				contentBGColor: '989696',
				a_color: 		'FFB434',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3801',
internalId:  '',
customField: '20110516-103044'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3894',
internalId:  '',
customField: '20100624-122841'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3873',
internalId:  '',
customField: '20110516-103250'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3852',
internalId:  '',
customField: '20110516-103137'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5101',
internalId:  '',
customField: '20101031-173952'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '3801',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9801',
internalId:  '',
customField: '20110327-170317'
};
webappMappings['7080']=webappMappings['7080-970']={
webappId:    '7080',
documentId:  '11201',
internalId:  '970',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11201',
internalId:  '',
customField: '20100819-152724'
};
webappMappings['7008']=webappMappings['7008-20601']={
webappId:    '7008',
documentId:  '13601',
internalId:  '20601',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13601',
internalId:  '',
customField: '20101022-113444'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14501',
internalId:  '',
customField: '20110308-082653'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVF340I7CLY2';
var companyName   = 'Soleil+Tanning';
var htmlTitle	  = 'Soleil+Tanning+Wilmington%2C+NC+%22Get+in+touch+with+your+DARK+SIDE%22';
var metaKeywords  = 'Soleil+Tanning%2C+Tanning+Salon%2C+Wilmington+NC%2C+Lotions%2C+Tanning+Packages%2C+Cheap%2C+Lowest+Prices%2C+UNCW%2C+Dark+Side%2C+Peachtree+Ave%2C+Tanning+Beds%2C+Stand+up+Booth%2C+Sun%2C+Soleil%2C+Tan%2C+Bronzer%2C+Impact%2C+spray+tanning%2C+sunless+tanning%2C+uv+free%2C+spray+tan%2C';
var metaContents  = 'Soleil+Tanning+Salon+located++at+4605+Peachtree+Ave.+Wilmington%2C+NC+28403.+%28910%29392-3003+7658-B+Market+St.+%28910%29+686-0106++%22Get+in+touch+with+your+DARK+SIDE.%22+++4+Super+20+min+beds%2F+1+Mega+11+min+bed%2F+1+Stand-up+booth%2F+Great+Tanning+Packages+and+Lotions.+Lowest+Prices+in+Wilmington%2C+NC.+Conveniently+located+on+the+corner+of+College+and+Peachtree+ave.+Minutes+away+from+UNCW.+We+currently+offer+spray+tanning+or+sunless+spray+tanning.';
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();
};

