/* [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','901',jdecode('Home'),jdecode(''),'/901.html','true',[],'',''],
	['PAGE','952',jdecode('About+us'),jdecode(''),'/952/index.html','true',[ 
		['PAGE','973',jdecode('Our+team'),jdecode(''),'/952/973.html','true',[],'',''],
		['PAGE','994',jdecode('new'),jdecode(''),'/952/994.html','true',[],'','']
	],'',''],
	['PAGE','1015',jdecode('Products'),jdecode(''),'/1015/index.html','true',[ 
		['PAGE','1036',jdecode('First+Product+Special'),jdecode(''),'/1015/1036.html','true',[],'',''],
		['PAGE','1057',jdecode('Second+Product+Special'),jdecode(''),'/1015/1057.html','true',[],'',''],
		['PAGE','1078',jdecode('Third+Product+Special'),jdecode(''),'/1015/1078.html','true',[],'','']
	],'',''],
	['PAGE','1099',jdecode('Special+Offers'),jdecode(''),'/1099.html','true',[],'',''],
	['PAGE','1120',jdecode('Contact+Us%21'),jdecode(''),'/1120/index.html','true',[ 
		['PAGE','9401',jdecode('Contact+%28follow+up+page%29'),jdecode(''),'/1120/9401.html','false',[],'',''],
		['PAGE','1141',jdecode('Adresses'),jdecode(''),'/1120/1141.html','true',[],'',''],
		['PAGE','1162',jdecode('How+to+find+us'),jdecode(''),'/1120/1162.html','true',[],'','']
	],'',''],
	['PAGE','1183',jdecode('Current+offers'),jdecode(''),'/1183.html','true',[],'',''],
	['PAGE','26636',jdecode('Jobs'),jdecode(''),'/26636.html','true',[],'',''],
	['PAGE','1204',jdecode('Weddings'),jdecode(''),'/1204.html','true',[],'',''],
	['PAGE','1225',jdecode('VIP+Parties'),jdecode(''),'/1225.html','true',[],'','']];
var siteelementCount=17;
theSitetree.topTemplateName='Commander';
theSitetree.paletteFamily='87700';
theSitetree.keyvisualId='2390';
theSitetree.keyvisualName='mobiltelefon3.jpg';
theSitetree.fontsetId='391';
theSitetree.graphicsetId='440';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='E0E0E0';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Commander',
				paletteFamily: 	'87700',
				keyvisualId: 	'2390',
				keyvisualName: 	'mobiltelefon3.jpg',
				fontsetId: 		'391',
				graphicsetId: 	'440',
				contentColor: 	'000000',
				contentBGColor: 'E0E0E0',
				a_color: 		'E0E0E0',
				b_color: 		'54601',
				c_color: 		'43A53C',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '901',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '901',
internalId:  '',
customField: '20100610-201129'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '952',
internalId:  '',
customField: '20100608-153023'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1099',
internalId:  '',
customField: '20091102-003206'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26636',
internalId:  '',
customField: '20090206-004959'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1204',
internalId:  '',
customField: '20061111-121009'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1225',
internalId:  '',
customField: '20090206-005116'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1015',
internalId:  '',
customField: '20091102-012919'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1036',
internalId:  '',
customField: '20061110-152624'
};
webappMappings['1501']=webappMappings['1501-3719051']={
webappId:    '1501',
documentId:  '901',
internalId:  '3719051',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '973',
internalId:  '',
customField: '20061110-152624'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '994',
internalId:  '',
customField: '20061110-152624'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1057',
internalId:  '',
customField: '20061110-152624'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1078',
internalId:  '',
customField: '20061110-152624'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1120',
internalId:  '',
customField: '20100610-201957'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9401',
internalId:  '',
customField: '20061110-172538'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1141',
internalId:  '',
customField: '20100608-152418'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1162',
internalId:  '',
customField: '20100608-152918'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1183',
internalId:  '',
customField: '20090206-004809'
};
webappMappings['7008']=webappMappings['7008-8487']={
webappId:    '7008',
documentId:  '1120',
internalId:  '8487',
customField: 'language:en;country:US;'
};
var canonHostname = 'wsc-worker01.chi.us.siteprotect.com';
var accountId     = 'AHW050INE1ON';
var companyName   = 'Altered+Images+Salon+';
var htmlTitle	  = 'Altered+Images+Salon';
var metaKeywords  = 'Peoria+arizona+hair+salon%2C+Glendale+Arizona+Hair%2C+Phoenix%2C+Arizona+Hair%2C+Arizona+salons%2C+arizona+spas%2C+arizonas+best+salon%2C+Arizona+salon%2C+valley+of+the+sun+salon%2C+Salon%2Chair%2C+nails%2C+weddings%2C+haircolor%2C+redken%2C+pureology%2C+Sebastian%2C+hairstyle%2C+hair+cuts%2C+hair+color+correction%2C+skincare%2C+makeup%2CMoroccanoil%2C+Moroccan+oil%2C++Bioelements%2C+Paul+Mitchell%2C+American+Crew%2C+Hair+curling%2C+Perm%2C+Perms%2C+hair+extensions%2C+hair+straightning%2C+thermal+relaxer%2C+pedicure%2C+pedicures%2C+natural+nail+care%2C+Aquage%2C+Matrix%2C+Biolage%2C+Artec%2C+Updos%2C+prom+hair%2C+hair+on+location%2C+short+hair%2C+long+hair%2C+waxing%2C+leg+waxing%2C+chin+waxing%2C+lip+waxing%2C+Camo+color%2C+Biosilk%2C+hair+stylist%2C+best+hair%2C+best+stylist%2C+platform+artist%2C+Sebastion+hair+products%2C+sebastian+hairspray%2C+Creative+nail%2C+OPI%2C+Redken+color%2C+Hair+color+correction%2C+hair+design%2C+hair+designs%2C+artistic+hair%2C+wild+hair+designs%2C+hair+specialist%2C+Artec+color%2C+redken+color%2C+redken+hair+color+products%2C+color+fusions%2C+color+gels%2C+shadeseq%2C+blonde+hair+color%2C+brunette+hair+color%2C+red+hair+color%2C+Body+waves%2C+deep+conditioning%2C+relaxers%2C+waxing%2C+cool+hair%2C+punk+hair%2C+hair+gel%2C+hair+spray%2C+hair+advice%2C%2C+hair+questions%2C+hair+products%2C+hair+ideas%2C+hair+dos%2C+hair+don%3Bts%2C+all+about+hair%2C+hair+style%2C+waxing%2C+sexy+hair%2C+color+correction%2C+redken%2C+Makeovers%2C+Phoenix+wedding+services%2C+wedding+hair%2C+prom+hair%2C+updo%27s%2C+hair+extensions%2C+hair+art%2C+';
var metaContents  = '+Hair+Salon%2C+Peoria+arizona+hair+salon%2C+Glendale+Arizona+Hair+salon%2C+Phoenix%2C+Arizona+Hair+salon%2C+arizona+spa%2C+Arizona+salons%2C+arizona+spas%2C+arizonas+best+salon%2C+Arizona+salon%2C+valley+of+the+sun+salon%2C+Salon%2Chair%2C+nails%2C+weddings%2C+haircolor%2CMoroccanoil%2C+Moroccan+oil%2C+redken%2C+pureology%2C+Sebastian%2C+hairstyle%2C+hair+cuts%2C+hair+color+correction%2C+skincare%2C+makeup%2C+Bioelements%2C+Paul+Mitchell%2C+American+Crew%2C+Hair+curling%2C+Perm%2C+Perms%2C+hair+extensions%2C+hair+straightning%2C+thermal+relaxer%2C+pedicure%2C+pedicures%2C+natural+nail+care%2C+Aquage%2C+Matrix%2C+Biolage%2C+Artec%2C+Updos%2C+prom+hair%2C+hair+on+location%2C+short+hair%2C+long+hair%2C+waxing%2C+leg+waxing%2C+chin+waxing%2C+lip+waxing%2C+Camo+color%2C+Biosilk%2C+hair+stylist%2C+best+hair%2C+best+stylist%2C+platform+artist%2C+Sebastion+hair+products%2C+sebastian+hairspray%2C+Creative+nail%2C+OPI%2C+Redken+color%2C+Hair+color+correction%2C+hair+design%2C+hair+designs%2C+artistic+hair%2C+wild+hair+designs%2C+hair+specialist%2C+Artec+color%2C+redken+color%2C+redken+hair+color+products%2C+color+fusions%2C+color+gels%2C+shadeseq%2C+blonde+hair+color%2C+brunette+hair+color%2C+red+hair+color%2C+Body+waves%2C+deep+conditioning%2C+relaxers%2C+waxing%2C+cool+hair%2C+punk+hair%2C+hair+gel%2C+hair+spray%2C+hair+advice%2C%2C+hair+questions%2C+hair+products%2C+hair+ideas%2C+hair+dos%2C+hair+don%3Bts%2C+all+about+hair%2C+hair+style%2C+sexy+hair%2C+color+correction%2C+waxing';
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();
};
