/* [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','7106',jdecode('REPAIR+SPECIAL%21'),jdecode(''),'/7106.html','true',[],'',''],
	['PAGE','7001',jdecode('JANOME+SALE%21'),jdecode(''),'/7001.html','true',[],'',''],
	['PAGE','91412',jdecode('PFAFF+SALE+'),jdecode(''),'/91412.html','true',[],'',''],
	['PAGE','129112',jdecode('NECCHI+SALE'),jdecode(''),'/129112.html','true',[],'',''],
	['PAGE','155612',jdecode('SINGER+SALE%21'),jdecode(''),'/155612.html','true',[],'',''],
	['PAGE','321412',jdecode('+Mail+LIST-Classes'),jdecode(''),'/321412.html','true',[],'',''],
	['PAGE','340012',jdecode('F%2FA%2FQ'),jdecode(''),'/340012.html','true',[],'',''],
	['PAGE','629959',jdecode('Nice+Trade-ins'),jdecode(''),'/629959.html','true',[],'','']];
var siteelementCount=9;
theSitetree.topTemplateName='Popart';
theSitetree.paletteFamily='2F0882';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10345';
theSitetree.graphicsetId='10452';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Popart',
				paletteFamily: 	'2F0882',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10345',
				graphicsetId: 	'10452',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				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:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1301',
internalId:  '1006',
customField: '1006'
};
webappMappings['7008']=webappMappings['7008-989']={
webappId:    '7008',
documentId:  '1301',
internalId:  '989',
customField: 'language:en;country:US;'
};
webappMappings['7008']=webappMappings['7008-990']={
webappId:    '7008',
documentId:  '321412',
internalId:  '990',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1301',
internalId:  '',
customField: '20100902-132334'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7001',
internalId:  '',
customField: '20100825-152621'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '91412',
internalId:  '',
customField: '20100628-170631'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '129112',
internalId:  '',
customField: '20100617-152631'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '155612',
internalId:  '',
customField: '20100115-162502'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7106',
internalId:  '',
customField: '20100818-152223'
};
webappMappings['1501']=webappMappings['1501-2684864']={
webappId:    '1501',
documentId:  '1301',
internalId:  '2684864',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '321412',
internalId:  '',
customField: '20100626-141654'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '340012',
internalId:  '',
customField: '20091204-112420'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '629959',
internalId:  '',
customField: '20100816-151425'
};
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10IN31OZ';
var companyName   = 'A-1+Sewing+Machine+Co.+3983+Lavista+Rd+%40+I+285+%28Northlake+Festival%29++%28770%29+493-1229+';
var htmlTitle	  = '';
var metaKeywords  = '+SEWING+MACHINES+Atlanta%2Call+of+Ga.Discont+sales+SERGERS+ATLANTA+SALES+REPAIRS%2CPARTS+SERVICE%2C+One+OF+Atlantas+oldest+and+most+trusted..++AUTHORIZED+JANOME-SINGER-NECCHI-PFAFF++FULL-SERVICE++your+atlanta+sewing+machine+headquarters+Sewing+Machines+++serving+all+of+metro+Atlanta.+Family-owned+since+1951+++Janome%2CSinger%2CWhite%2CRiccar%2CBernina%2CNew+Home%2CNecchi%2C+Pfaff%2C+Elna++sewing+machine+Clearance+Juki%2CKenmore%2CElna%2CSewing+machine%2Csewing+best+deals+specials-prices+points+on+Atlanta+ga+machines%2Csergers%2Ccabinets%2Crepairs+needs+sales-repairs%2Call+brands%2Call+makes%2C++New+and+used+best+brand%2C+discount+prices%2C++janome+HORIZON+ATLANTA+RATED+%231+BY+MANY.11000.6600%2C9500%2C9700.10001%2C760%2Cgem+gold2++Singer+6000%2C5000%2Cce100+ce+200+Atlanta%2C+Ga+We+offer+for+the+dressmaker%2Cquilter%2Cembroidery+fashion+designer+the+dream+machine+by+Janome+%2CNecchi+and+Singer.+When+Atlanta%2C+thinks+sewing+machines+sales+repairs%2Cparts%2C+lessons+with+sale%2Cthey+think+%28A-1+SEWING+MACHINE+CO.%29+NORTHLAKE+FESTIVAL+770-493-1229++yes%2CAtlanta+sewing+machines+see+a-1+sewing+.com+ATLANTA%2CGA+BEST+Serving+all+metro+Atlanta+area+Decatur%2CGa.+Tucker%2CGa++Marietta%2CGa+Norcross%2CGa+Woodstock%2CGa+Duluth.Ga.Buford%2CGa.+Kennesaw%2CGa+Conyers%2CGa++Riverdale+Ga+Gainesville+Ga+Peachtree+City+Ga+Stone+Mountain%2CGa.Douglasville%2Cga.Gwinnett.ga+Lawrenceville.ga+Macon%2Cga+Sewing+machines+cheap+prices+Jasper%2CGa.Canton%2CGA.Roswell%2CGa.Lithonia%2CGa.Dunwoody%2CGa.Stockbridge%2CGa.+Jonesboro%2CGA.+Blue+Ridge+Ga.Buford%2CGa+Union+City+GA.+S.E.Atlanta+N.E.+ATLANTA++30450+31794+31001+30101+30103+30101-102+31620+30340+30333+30347+30332+30354+30345+30358+30002+30340+30341+30082+30278+30084++30088++sale+prices+Christmas+sale+are+the+best%2Clowest+discounts+of+any+other+dealership..ie+the+best+Atlanta+Ga+sewing+machine+dealership.all+the+top+brands+names+such+as+Janome-Necchi+two+of+the+most+respected+sewing+machine+makes.IN+Atlanta+metro-';
var metaContents  = 'A-1+SEWING+MACHINE+CO.+Atlanta++all+of+Ga+Discount+sales+.Atlanta%27s+finest+Sewing+machines%2Csergers%2Ccabinets%2Csales%2Cparts+repairs%2Call+makes+and+models++AUTHORIZED+JANOME-PFAFF-NECCHI-SINGER+FULL+SERVICE+SALES+REPAIRS+ALL+MAKES+AND+MODELS%21+People+who+sew+in+Ga+trust+and+know+us%2C+Atlanta+Ga+we+serve+all+of+the+Atlanta+metro+area+Tucker%2CNorcross%2CConyers%2CMarietta%2CCanton%2C+Duluth%2CGa.Roswell%2CGA+Forest+Park%2CGa+Doraville%2CGa.+Newnan%2CGa+Suwanee%2CGa+Athens%2CGa+Roswell+ga+Alpharetta%2CGa+Woodstock%2CGa.Douglasville%2C+Ga.Decatur%2CGa+Buford%2CGa.++Gainesville%2CGa+Riverdale%2CGa+Lithia+Springs+GaNewton%2CGa.Stone+Mt.Ga.Lawrenceville%2CGa.Roswell%2CGa.Stockbridge%2CGa.Lilburn%2CGA.Lithonia%2CGa.Dunwoody%2CGa.Chamblee%2CGa.+One+of+Atlanta+best+and++most+trusted+dealership.+A-1+Sewing++Machine+Co.%28Since+1951%29+Sewing+Machines%2C+Sergers%2C+Embroidery+Machines%2CQuilting+Machines+and+Cabinets.%28Discount+prices%29+Sales%2CRepairs%2CParts%2Cmost+all+makes+and+models.++Best+price%2Cwith+local+personal+services+have+always+made+A-1+Sewing+at+Northlake+Festival+hard+to+beat.+We+are+a+Authorized+dealership+for++Janome%2CNew+Home%2CSinger%2CWhite%2CNecchi%2CRiccar%2CJuki.+We+promise+to+always+offer+the+very+best+in+personal+services%2Cwith+the+lowest+possible+prices%21+We+serve+metro-Atlanta+and+all+of+Ga.+++See+us+today+at+our+retail+store%3AA-1+SEWING+MACHINE+CO.++3983+LAVISTA+RD.BLG+188+NORTHLAKE+FESTIVAL+SHOPPING+CENTER++CALL+US+NOW+%40770-493-1229+When+a+dressmaker%2Cquilter%2Cembroidery+fashion+designer%2Chome+sewer+thinks+sewing+machines...in+Atlanta+they+think+of+%28A-1+SEWING+MACHINE+CO%29FOR+ALL+their+sewing+machine++sales+parts+repairs+needs.';
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();
};
