/* [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','2301',jdecode('HOME'),jdecode(''), jdecode('%2F2301.html'), 'true',[],'',''],
	['PAGE','2373',jdecode('CORPORATE+LOGOS'),jdecode(''), jdecode('%2F2373.html'), 'true',[],'',''],
	['PAGE','13422',jdecode('APPAREL+CATALOG'),jdecode(''), jdecode('%2F13422.html'), 'true',[],'',''],
	['PAGE','13464',jdecode('DESIGNS'),jdecode(''), jdecode('%2F13464.html'), 'true',[],'',''],
	['PAGE','70001',jdecode('PHOTO+GALLERY'),jdecode(''), jdecode('%2F70001.html'), 'true',[],'',''],
	['PAGE','13506',jdecode('DIGITIZING'),jdecode(''), jdecode('%2F13506.html'), 'true',[],'',''],
	['PAGE','2436',jdecode('PRICING'),jdecode(''), jdecode('%2F2436.html'), 'true',[],'',''],
	['PAGE','20401',jdecode('FONTS'),jdecode(''), jdecode('%2F20401.html'), 'true',[],'',''],
	['PAGE','27301',jdecode('SCREEN+PRINTING'),jdecode(''), jdecode('%2F27301.html'), 'true',[],'',''],
	['PAGE','76701',jdecode('%22NEW%22+PRODUCT%21'),jdecode(''), jdecode('%2F76701.html'), 'true',[],'',''],
	['PAGE','2352',jdecode('PRODUCTS'),jdecode(''), jdecode('%2F2352%2Findex.html'), 'true',[ 
		['PAGE','13401',jdecode('MARTIAL+ARTS+ACCESSORIES'),jdecode(''), jdecode('%2F2352%2F13401.html'), 'true',[],'',''],
		['PAGE','2415',jdecode('PET+ACCESSORIES'),jdecode(''), jdecode('%2F2352%2F2415.html'), 'true',[],'',''],
		['PAGE','23527',jdecode('SPECIALTY+ITEMS'),jdecode(''), jdecode('%2F2352%2F23527.html'), 'true',[],'',''],
		['PAGE','23422',jdecode('INFANTS'),jdecode(''), jdecode('%2F2352%2F23422.html'), 'true',[],'',''],
		['PAGE','23443',jdecode('CHILDREN'),jdecode(''), jdecode('%2F2352%2F23443.html'), 'true',[],'',''],
		['PAGE','23464',jdecode('SPORTS'),jdecode(''), jdecode('%2F2352%2F23464.html'), 'true',[],'',''],
		['PAGE','23485',jdecode('HOUSEHOLD+ITEMS'),jdecode(''), jdecode('%2F2352%2F23485.html'), 'true',[],'',''],
		['PAGE','23506',jdecode('HOLIDAYS'),jdecode(''), jdecode('%2F2352%2F23506.html'), 'true',[],'','']
	],'',''],
	['PAGE','2457',jdecode('LINKS'),jdecode(''), jdecode('%2F2457.html'), 'true',[],'',''],
	['PAGE','2478',jdecode('ABOUT+US'),jdecode(''), jdecode('%2F2478.html'), 'true',[],'',''],
	['PAGE','22101',jdecode('FAQ'),jdecode(''), jdecode('%2F22101.html'), 'true',[],'',''],
	['PAGE','2499',jdecode('CONTACT'),jdecode(''), jdecode('%2F2499%2Findex.html'), 'true',[ 
		['PAGE','21601',jdecode('CONTACT+%28follow+up+page%29'),jdecode(''), jdecode('%2F2499%2F21601.html'), 'false',[],'','']
	],'','']];
var siteelementCount=24;
theSitetree.topTemplateName='Business';
theSitetree.paletteFamily='0F0A5C';
theSitetree.keyvisualId='2484';
theSitetree.keyvisualName='schule.jpg';
theSitetree.fontsetId='420';
theSitetree.graphicsetId='466';
theSitetree.contentColor='020E66';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'enom',
  product: 'WSCENOSSSLYTC21T'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Business',
				paletteFamily: 	'0F0A5C',
				keyvisualId: 	'2484',
				keyvisualName: 	'schule.jpg',
				fontsetId: 		'420',
				graphicsetId: 	'466',
				contentColor: 	'020E66',
				contentBGColor: 'FFFFFF',
				a_color: 		'0F0A5C',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1501']=webappMappings['1501-10548839']={
webappId:    '1501',
documentId:  '2301',
internalId:  '10548839',
customField: '1501'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2301',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13422',
internalId:  '',
customField: '20110323-140443'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2373',
internalId:  '',
customField: '20080814-073342'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2301',
internalId:  '',
customField: '20090411-050814'
};
webappMappings['7008']=webappMappings['7008-895']={
webappId:    '7008',
documentId:  '2499',
internalId:  '895',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13464',
internalId:  '',
customField: '20080805-122029'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13506',
internalId:  '',
customField: '20110323-140633'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2436',
internalId:  '',
customField: '20110323-140536'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20401',
internalId:  '',
customField: '20080805-122255'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27301',
internalId:  '',
customField: '20101007-061648'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2352',
internalId:  '',
customField: '20110323-192918'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13401',
internalId:  '',
customField: '20080805-122600'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2415',
internalId:  '',
customField: '20080805-122643'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23527',
internalId:  '',
customField: '20080805-122727'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23422',
internalId:  '',
customField: '20080805-122803'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23443',
internalId:  '',
customField: '20080805-122845'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23464',
internalId:  '',
customField: '20080805-122936'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23485',
internalId:  '',
customField: '20080805-123010'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23506',
internalId:  '',
customField: '20080805-123052'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2457',
internalId:  '',
customField: '20070901-133420'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2478',
internalId:  '',
customField: '20080805-123151'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22101',
internalId:  '',
customField: '20080805-123218'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2499',
internalId:  '',
customField: '20071011-191515'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21601',
internalId:  '',
customField: '20070901-133842'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70001',
internalId:  '',
customField: '20110323-193202'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '76701',
internalId:  '',
customField: '20110625-104854'
};
var webAppHostname = 'wsc.ehost-services.com:80';
var canonHostname = 'wscwrk02.ehost-services.com';
var accountId     = 'AEN010INV0BU';
var companyName   = 'YOU+DREAM+IT+.+.+.+.+WE+STITCH+IT%21';
var htmlTitle	  = 'Embroidery+Plus+-+Corporate+Logos+-+Martial+Arts+Accessories+-+Speciality+Items%21';
var metaKeywords  = 'corporate+logo%2C+martial+arts%2C+embroidery+digitizing%2C+custom+embroidery%2C+embroidery%2C+custom+logos%2C+logos%2C+martial+arts+embroidery%2C+childrens+embroidery%2C+pet+embroidery%2C+pet+accessories%2C+embroidery+designs%2C+Colorado+embroidery%2C+Denver+embroidery%2C+apparel+embroidery%2C+corporate+apparel%2C+hat+embroidery%2C+specialty+embroidery%2C+corporate+identity%2C+shirt+embroidery%2C+scrubs+embroidery%2C+medical+embroidery%2C+custom+designs%2C+wedding+embroidery%2C+pillows%2C+kids%2C+pets%2C+blankets%2C+tote+bags%2Cdog+blankets%2C+cat+blankets%2C+pet+blankets%2C+personalized+embroidery%2C+personalized+backpacks%2C+ring+bearer+pillows%2Cmartial+arts%2C+karate+belt+holders%2C+karate+belt%2C+karate+belt+embroidery%2C+personalized+karate+belts%2C';
var metaContents  = 'Embroidery+Plus+is+a+commercial+embroidery+company.++We+specialize+in+corporate+logos%2C+custom+designs%2C+martial+arts%2C+digitizing%2C+and+specialty+items+for+all+your+embroidery+needs.++We+embroider+on+everything+from+toilet+paper+to+wood%21';
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();
};

