/* [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','1301',jdecode('Home'),jdecode(''),'/1301.html','true',[],'',''],
	['PAGE','1415',jdecode('About+us'),jdecode(''),'/1415/index.html','true',[ 
		['PAGE','6901',jdecode('The+team'),jdecode(''),'/1415/6901.html','true',[],'','']
	],'',''],
	['PAGE','6922',jdecode('Specials'),jdecode(''),'/6922.html','true',[],'',''],
	['PAGE','1352',jdecode('Contact'),jdecode(''),'/1352/index.html','true',[ 
		['PAGE','1373',jdecode('Adresses'),jdecode(''),'/1352/1373.html','true',[],'',''],
		['PAGE','1394',jdecode('How+to+find+us'),jdecode(''),'/1352/1394.html','true',[],'','']
	],'',''],
	['PAGE','1436',jdecode('Pickup+%26+Delivery'),jdecode(''),'/1436.html','true',[],'',''],
	['PAGE','9701',jdecode('Delivery+sign+up'),jdecode(''),'/9701/index.html','true',[ 
		['PAGE','15801',jdecode('Delivery+Form+%28follow+up+page%29'),jdecode(''),'/9701/15801.html','false',[],'','']
	],'',''],
	['PAGE','6943',jdecode('Price+List'),jdecode(''),'/6943.html','true',[],'',''],
	['PAGE','6964',jdecode('Our+Services'),jdecode(''),'/6964.html','true',[],'',''],
	['PAGE','6985',jdecode('Tips+%26+Tricks'),jdecode(''),'/6985.html','true',[],'',''],
	['PAGE','7606',jdecode('Guestbook'),jdecode(''),'/7606/index.html','true',[ 
		['PAGE','7601',jdecode('Leave+a+message'),jdecode(''),'/7606/7601.html','false',[],'','']
	],'',''],
	['PAGE','9101',jdecode('Locations'),jdecode(''),'/9101.html','true',[],'',''],
	['PAGE','14001',jdecode('E-Mail+sign+up'),jdecode(''),'/14001/index.html','true',[ 
		['PAGE','15601',jdecode('E-Special+sign+up+%28follow+up+page%29'),jdecode(''),'/14001/15601.html','false',[],'','']
	],'','']];
var siteelementCount=18;
theSitetree.topTemplateName='Architekt';
theSitetree.paletteFamily='8CBBD8';
theSitetree.keyvisualId='1710';
theSitetree.keyvisualName='meeting.jpg';
theSitetree.fontsetId='281';
theSitetree.graphicsetId='348';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='8CBBD8';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'aplus',
  product: 'WSCSYSSSSLYTCPLI'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Architekt',
				paletteFamily: 	'8CBBD8',
				keyvisualId: 	'1710',
				keyvisualName: 	'meeting.jpg',
				fontsetId: 		'281',
				graphicsetId: 	'348',
				contentColor: 	'000000',
				contentBGColor: '8CBBD8',
				a_color: 		'8CBBD8',
				b_color: 		'338299',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1002']=webappMappings['1002-7606aaplu0inel88']={
webappId:    '1002',
documentId:  '7606',
internalId:  '7606aaplu0inel88',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1301',
internalId:  '',
customField: '20110407-121133'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '9101',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:false;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1301',
internalId:  '1006',
customField: '1006'
};
webappMappings['7008']=webappMappings['7008-420']={
webappId:    '7008',
documentId:  '9701',
internalId:  '420',
customField: 'language:en;country:US;'
};
webappMappings['1501']=webappMappings['1501-5968818']={
webappId:    '1501',
documentId:  '1301',
internalId:  '5968818',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1415',
internalId:  '',
customField: '20100730-132340'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6901',
internalId:  '',
customField: '20060908-131516'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6922',
internalId:  '',
customField: '20100730-132144'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1352',
internalId:  '',
customField: '20070724-031750'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1373',
internalId:  '',
customField: '20110407-123118'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1394',
internalId:  '',
customField: '20110407-123016'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1436',
internalId:  '',
customField: '20110407-122618'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9701',
internalId:  '',
customField: '20070610-163512'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15801',
internalId:  '',
customField: '20070123-132633'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6943',
internalId:  '',
customField: '20110308-155455'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6964',
internalId:  '',
customField: '20110407-121645'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6985',
internalId:  '',
customField: '20060908-131516'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7606',
internalId:  '',
customField: '20060908-144626'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7601',
internalId:  '',
customField: '20060908-144626'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9101',
internalId:  '',
customField: '20110407-123219'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14001',
internalId:  '',
customField: '20090305-140435'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15601',
internalId:  '',
customField: '20070123-132424'
};
webappMappings['7008']=webappMappings['7008-419']={
webappId:    '7008',
documentId:  '14001',
internalId:  '419',
customField: 'language:en;country:US;'
};
var webAppHostname = 'cm4all.aplus.net:80';
var canonHostname = 'cm4all01.carrierzone.com';
var accountId     = 'AAPLU0INEL88';
var companyName   = 'Fresh+Look+Cleaners';
var htmlTitle	  = 'FRESH+LOOK+CLEANERS';
var metaKeywords  = 'Cleaners%2Cdry+cleaning%2C+shirt+laundry%2C+suede+and+leather+cleaning%2C+alterations%2C+free+pickup+and+delivery%2C+free+garment+storage%2C+wedding+gown+cleaning+and+preservation%2C+shoe+repair%2C+south+portland%2C+maine%2Ccape+elizabeth%2Cportland%2Cscarborough%2CFREE+pickup+and+delivery+%2Chousehold%2C04106%2C04101%2C04103%2C04104%2C04107+Obama';
var metaContents  = 'Dry+Cleaning%2C+shirt+laundry%2C+free+pickup+and+delivery%2CMaine%2C+Portland%2CSouth+Portland%2CCape+Elizabeth%2C+Scarborough%2C+Dry+Cleaners+';
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();
};

