/* [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 theSitetree=[ 
	['PAGE','801',jdecode('Home'),jdecode(''),'/801.html','true',[],''],
	['PAGE','57801',jdecode('About+us'),jdecode(''),'/57801.html','true',[],''],
	['PAGE','8227',jdecode('Directions'),jdecode(''),'/8227.html','true',[],''],
	['PAGE','30601',jdecode('Apparel+Catalogs'),jdecode(''),'/30601.html','true',[],''],
	['PAGE','34301',jdecode('Cloggers+Products'),jdecode(''),'/34301.html','true',[],''],
	['PAGE','66001',jdecode('Craig%26%23x27%3Bs+List'),jdecode(''),'/66001.html','true',[],''],
	['PAGE','80901',jdecode('Gymnastics'),jdecode(''),'/80901.html','true',[],''],
	['PAGE','51317',jdecode('McGee%26%23x27%3Bs+Sports'),jdecode(''),'/51317.html','true',[],''],
	['PAGE','88001',jdecode('Cad-Cut+Vinyl+Lettering'),jdecode(''),'/88001.html','true',[],''],
	['PAGE','88022',jdecode('Digital+Printed+Signs'),jdecode(''),'/88022.html','true',[],''],
	['PAGE','93401',jdecode('Promotional+Products'),jdecode(''),'/93401.html','true',[],'']];
var siteelementCount=11;
theSitetree.topTemplateName='Round';
theSitetree.paletteFamily='CC3333';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='439';
theSitetree.graphicsetId='495';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='e47272';
var theTemplate={
				name: 			'Round',
				paletteFamily: 	'CC3333',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'439',
				graphicsetId: 	'495',
				contentColor: 	'FFFFFF',
				contentBGColor: 'e47272',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'e47272',
				b_color: 		'CC3333',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30601',
internalId:  '',
customField: '20100106-153943'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '801',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57801',
internalId:  '',
customField: '20100106-153455'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '801',
internalId:  '',
customField: '20100106-160924'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34301',
internalId:  '',
customField: '20100106-154015'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51317',
internalId:  '',
customField: '20100106-163005'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '88022',
internalId:  '',
customField: '20091210-102906'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '88001',
internalId:  '',
customField: '20091210-102906'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8227',
internalId:  '',
customField: '20100106-153913'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '93401',
internalId:  '',
customField: '20100106-161300'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '80901',
internalId:  '',
customField: '20090804-132843'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66001',
internalId:  '',
customField: '20090803-142445'
};
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050INXSU1';
var companyName   = 'Precision+Screen+Print+%26+Monograms';
var htmlTitle	  = 'clog.com';
var metaKeywords  = 'clog%2C+clogger%2C+clogging%2C+cloggers%2C+clogging+shoes%2C+clogging+shirts%2C+clogging+taps%2C+clogging+events%2C+ACHF%2C+screen+printing%2C+screenprinting%2C+silkscreening%2C+silk+screening%2C+monograms%2C+monogramming%2C+embroidery%2C+digital+printing%2C+vinyl+lettering%2C+clogging+supplies%2C+clogging+apparel%2C+clogging+t-shirt%2C+c.l.o.g.%2C+clogging+bags%2C+clogging+sweatshirt%2C+promotional+products%2C+advertising+specialties%2C+WakeMed%2C+Precision+Screen+Print%2C+Precision+Monograms%2C+Precision+Screen+Print++Monograms%2C+promos%2C+ad+specialties%2C+imprinted+merchandise%2C+catalogs%2C+awards%2C+gifts%2C+cloggers+catalog%2C+catalog%2C+Sports+Apparel%2C+Sports+Team+Apparel%2C+911%2C+Fire++Rescue%2C';
var metaContents  = 'Creative+Logos+On+Garments%2C+Screenprinted%2C+Embroidered%2C+Sublimated+and+Heat+Pressed+Designs.+Cloggers+apparel%2C+clogging+supplies%2C+and+promotional+products.+Digital+printing%2C+Vinyl+lettering+and+signage.+Quality+is+our+Specialty.';
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();
};
