/* [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','32',jdecode('Home'),jdecode(''),'/32.html','true',[],'',''],
	['PAGE','1406',jdecode('Link+To+Find+Your+Tartan'),jdecode(''),'/1406.html','true',[],'',''],
	['PAGE','1793',jdecode('Contact+Us'),jdecode(''),'/1793.html','true',[],'',''],
	['PAGE','1415',jdecode('Order+Forms'),jdecode(''),'/1415.html','true',[],'',''],
	['PAGE','1089',jdecode('Kilts+%26+Tartan+Pages%3A'),jdecode(''),'/1089/index.html','true',[ 
		['PAGE','1207',jdecode('Confederate+Memorial+Tartan+Kilts'),jdecode(''),'/1089/1207.html','true',[],'',''],
		['PAGE','1216',jdecode('Irish+Tartans+%26+Kilts'),jdecode(''),'/1089/1216.html','true',[],'',''],
		['PAGE','1225',jdecode('%24+saving+%22Hillwalker+Kilts'),jdecode(''),'/1089/1225.html','true',[],'',''],
		['PAGE','1098',jdecode('US+Military+Tartans'),jdecode(''),'/1089/1098.html','true',[],'',''],
		['PAGE','1107',jdecode('Wedding+Kilts'),jdecode(''),'/1089/1107.html','true',[],'',''],
		['PAGE','1116',jdecode('Wild+Kilts'),jdecode(''),'/1089/1116.html','true',[],'',''],
		['PAGE','1234',jdecode('Welsh+Kilts+%26+Accessories'),jdecode(''),'/1089/1234.html','true',[],'',''],
		['PAGE','6417',jdecode('Welsh+Tartans'),jdecode(''),'/1089/6417.html','true',[],'','']
	],'',''],
	['PAGE','1279',jdecode('Infant+%26+Childrens+Kilts'),jdecode(''),'/1279.html','true',[],'',''],
	['PAGE','1252',jdecode('The+Lassies+Pages%3A'),jdecode(''),'/1252/index.html','true',[ 
		['PAGE','2593',jdecode('Measurements+%26+Order+Forms'),jdecode(''),'/1252/2593.html','true',[],'',''],
		['PAGE','1880',jdecode('Ladies+Accessories'),jdecode(''),'/1252/1880.html','true',[],'',''],
		['PAGE','1261',jdecode('Kilted+%26+Tartan+Skirts'),jdecode(''),'/1252/1261.html','true',[],'','']
	],'',''],
	['PAGE','1288',jdecode('Sgian+Dubhs+%26+Dirks'),jdecode(''),'/1288.html','true',[],'',''],
	['PAGE','1442',jdecode('Bonnets%2FHats'),jdecode(''),'/1442.html','true',[],'',''],
	['PAGE','1297',jdecode('Brooches'),jdecode(''),'/1297.html','true',[],'',''],
	['PAGE','1306',jdecode('Sporran+Pages%3A'),jdecode(''),'/1306/index.html','true',[ 
		['PAGE','1315',jdecode('Leather'),jdecode(''),'/1306/1315.html','true',[],'',''],
		['PAGE','1324',jdecode('Semi-Dress+%28Fur+%26+Leather%29'),jdecode(''),'/1306/1324.html','true',[],'',''],
		['PAGE','1333',jdecode('Dress+%28+Fur%29'),jdecode(''),'/1306/1333.html','true',[],'',''],
		['PAGE','1342',jdecode('US+Military%2CWelsh+%26+Irish+'),jdecode(''),'/1306/1342.html','true',[],'','']
	],'',''],
	['PAGE','1424',jdecode('Footwear'),jdecode(''),'/1424.html','true',[],'',''],
	['PAGE','1351',jdecode('Kilt+%26+Tartan+Accessories'),jdecode(''),'/1351.html','true',[],'',''],
	['PAGE','1487',jdecode('Plaids%2C+Scarves+%26+Rosettes'),jdecode(''),'/1487.html','true',[],'',''],
	['PAGE','1505',jdecode('Ties%2C+Vests+%26+Cummerbunds'),jdecode(''),'/1505.html','true',[],'',''],
	['PAGE','1451',jdecode('Belts%2C+Buckles%2C+%26+Pins%3A'),jdecode(''),'/1451/index.html','true',[ 
		['PAGE','1460',jdecode('Scottish+Clan+'),jdecode(''),'/1451/1460.html','true',[],'',''],
		['PAGE','2735',jdecode('Irish+Clan'),jdecode(''),'/1451/2735.html','true',[],'',''],
		['PAGE','1469',jdecode('US+Military'),jdecode(''),'/1451/1469.html','true',[],'','']
	],'',''],
	['PAGE','1478',jdecode('Clan+Flags+%26+Banners'),jdecode(''),'/1478.html','true',[],'',''],
	['PAGE','1496',jdecode('Slax%2C+Trews+%26+Vests'),jdecode(''),'/1496.html','true',[],'',''],
	['PAGE','1523',jdecode('Kilt+Jackets'),jdecode(''),'/1523.html','true',[],'',''],
	['PAGE','1532',jdecode('The+Piper%26%23x27%3Bs+Page'),jdecode(''),'/1532.html','true',[],'',''],
	['PAGE','1541',jdecode('2011+Piping+Scholarship%2FApply%21'),jdecode(''),'/1541.html','true',[],'',''],
	['PAGE','1550',jdecode('2010+Piping+Schlship+Winners'),jdecode(''),'/1550.html','true',[],'','']];
var siteelementCount=40;
theSitetree.topTemplateName='Activate';
theSitetree.paletteFamily='455339';
theSitetree.keyvisualId='2026';
theSitetree.keyvisualName='blanko.jpg';
theSitetree.fontsetId='339';
theSitetree.graphicsetId='392';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='455339';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Activate',
				paletteFamily: 	'455339',
				keyvisualId: 	'2026',
				keyvisualName: 	'blanko.jpg',
				fontsetId: 		'339',
				graphicsetId: 	'392',
				contentColor: 	'FFFFFF',
				contentBGColor: '455339',
				a_color: 		'455339',
				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['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '32',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32',
internalId:  '',
customField: '20090309-092010'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1442',
internalId:  '',
customField: '20100610-104707'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1089',
internalId:  '',
customField: '20090228-112957'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1207',
internalId:  '',
customField: '20090228-114713'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1451',
internalId:  '',
customField: '20090228-115355'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2735',
internalId:  '',
customField: '20080420-225752'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1469',
internalId:  '',
customField: '20090228-122201'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1406',
internalId:  '',
customField: '20080328-140947'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1793',
internalId:  '',
customField: '20080420-231553'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1415',
internalId:  '',
customField: '20090309-091538'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1216',
internalId:  '',
customField: '20100610-103347'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1225',
internalId:  '',
customField: '20080707-111728'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1098',
internalId:  '',
customField: '20080424-103623'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1107',
internalId:  '',
customField: '20080420-215051'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1116',
internalId:  '',
customField: '20080420-215100'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1234',
internalId:  '',
customField: '20080425-171914'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6417',
internalId:  '',
customField: '20080424-122206'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1279',
internalId:  '',
customField: '20091007-065312'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1252',
internalId:  '',
customField: '20100611-062735'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2593',
internalId:  '',
customField: '20090309-092444'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1880',
internalId:  '',
customField: '20100611-064850'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1261',
internalId:  '',
customField: '20100610-104543'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1288',
internalId:  '',
customField: '20080420-221358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1297',
internalId:  '',
customField: '20080420-221513'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1306',
internalId:  '',
customField: '20080420-221543'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1315',
internalId:  '',
customField: '20080420-221619'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1324',
internalId:  '',
customField: '20080420-221647'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1333',
internalId:  '',
customField: '20080420-221714'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1342',
internalId:  '',
customField: '20080424-124740'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1424',
internalId:  '',
customField: '20080420-225306'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1351',
internalId:  '',
customField: '20080420-225409'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1487',
internalId:  '',
customField: '20100611-065119'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1505',
internalId:  '',
customField: '20100610-110225'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1460',
internalId:  '',
customField: '20080420-225720'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1478',
internalId:  '',
customField: '20080424-112937'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1496',
internalId:  '',
customField: '20100610-110348'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1523',
internalId:  '',
customField: '20080425-171001'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1532',
internalId:  '',
customField: '20080716-102312'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1541',
internalId:  '',
customField: '20100630-065708'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1550',
internalId:  '',
customField: '20100630-073107'
};
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050INXX0D';
var companyName   = 'ALEXIS+MALCOLM+KILTS';
var htmlTitle	  = 'ALEXIS+MALCOLM+KILTS';
var metaKeywords  = 'US+Kiltmaker%2Chandmade+Kilts%2C+5+yard+Hillwalker+Kilt%2CKilt+Shirts%2C+Ladies+Kilted+Tartan+skirts%2CTartan+Rosettes%2CBridal+garters%2CFly+Plaids%2C+best+buy+Argyll+and+Prince+Charlie+Jackets%2C+Scottish+Clan+Tartans+Irish+Tartans%2CWelsh+Tartans%2CAmerican+Military+Tartans%2C+US+Army+Tartan%2CUS+Marines+Tartan%2C+US+Navy+Tartan%2C+US+Air+Force+Tartan%2C+US+Merchant+Marine+Tartan%2CWest+Point+Tartan%2CPolaris+Submariners+Tartan%2C+US+Coast+Guard+Tartan%2C+Confederate+Memorial+Tartans%2C+Tartan+Vests%2C+Tartan+Trousers%2CSlax%2C+Trews%2CBlankets%2CScarves%2CShawls%2C+Tartan+Cummerbunds%2CYouth+and+Childrens+Kilts%2CBaby+and+Infant+Kilts%2CTams%2C+Childrens+Sporrans%2CChildrens+Kilt+Shirts%2CDancers+Kilts%2C+Sporrans%2CCeltic+Brooches%2CIrish+and+Scottish+Kiltpins%2CCap+Badges%2CBuckles%2CUSMC+Cap+Badge%2CUS+Military+Kilt+pins%2C+Buckles%2CBelts%2CClan+Tartan+Banners%2CFlags%2CSgian+Dubh+Knives%2CIrish+Sporrans%2CIrish+Buckle%2CKiltpin%2C+Confederate+Kilt+Pins%2CUSN+Kilt+Pin%2CUSMC+Kilt+Pin%2CUS+Army+Kilt+Pin%2C+USCG+Kilt+Pin%2CUSAF+Kilt+Pin%2C+Offering+a+Bagpiping+Scholarship';
var metaContents  = 'Handmade+Kilts%2C+Kilt+Skirts%2C+Fly+Plaids+and+infant+kilts+in+your+Scottish%2C+Irish%2C+Welsh%2C+Confederate+Memorial+or+American+Military+Tartans%2C+US+Army%2CUS+Navy+Tartan%2CUS+Marine+Corps+Tartan%2CUS+Coast+Guard+Tartan%2CUS+Air+Force+Tartan%2C+US+Merchant+Marine+Tartan+by+your+own+American+Kiltmaker+that+you+can+talk+to.+A+best+buy+on+Prince+Charlie+Jacket+and+Vest+sets.+We+also+offer+a+Bagpiping+Scholarship.';
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();
};
