/* [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','1201',jdecode('Home'),jdecode(''),'/1201.html','true',[],'',''],
	['PAGE','8601',jdecode('Products'),jdecode(''),'/8601/index.html','true',[ 
		['PAGE','8622',jdecode('Snugglebags'),jdecode(''),'/8601/8622.html','true',[],'',''],
		['PAGE','8643',jdecode('Support+Rolls'),jdecode(''),'/8601/8643.html','true',[],'',''],
		['PAGE','8664',jdecode('Front+Pack+Carrier+Covers'),jdecode(''),'/8601/8664.html','true',[],'',''],
		['PAGE','22699',jdecode('Terrycloth+bibs'),jdecode(''),'/8601/22699.html','true',[],'',''],
		['PAGE','24252',jdecode('Sleep+Sacs'),jdecode(''),'/8601/24252.html','true',[],'',''],
		['PAGE','22708',jdecode('Snack+traps+and+Sprout+Spouts'),jdecode(''),'/8601/22708.html','true',[],'',''],
		['PAGE','8685',jdecode('Fleece+dog+coats'),jdecode(''),'/8601/8685.html','true',[],'',''],
		['PAGE','8706',jdecode('Quick%26%23x27%3Bn+Brite'),jdecode(''),'/8601/8706.html','true',[],'',''],
		['PAGE','25052',jdecode('Micro+Fiber'),jdecode(''),'/8601/25052.html','true',[],'',''],
		['PAGE','25073',jdecode('As+Seen+on+TV+Products'),jdecode(''),'/8601/25073.html','true',[],'',''],
		['PAGE','25094',jdecode('Natural+Pet+Shampoo'),jdecode(''),'/8601/25094.html','true',[],'','']
	],'',''],
	['PAGE','8769',jdecode('Clearance'),jdecode(''),'/8769.html','true',[],'',''],
	['PAGE','24552',jdecode('Guestbook'),jdecode(''),'/24552.html','true',[],'',''],
	['PAGE','8727',jdecode('About+Us'),jdecode(''),'/8727/index.html','true',[ 
		['PAGE','8748',jdecode('The+team'),jdecode(''),'/8727/8748.html','true',[],'','']
	],'',''],
	['PAGE','8790',jdecode('Contact'),jdecode(''),'/8790.html','true',[],'','']];
var siteelementCount=18;
theSitetree.topTemplateName='Blowout';
theSitetree.paletteFamily='ABFDFE';
theSitetree.keyvisualId='3786';
theSitetree.keyvisualName='kv_3786.jpg';
theSitetree.fontsetId='10567';
theSitetree.graphicsetId='10977';
theSitetree.contentColor='0000AF';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Blowout',
				paletteFamily: 	'ABFDFE',
				keyvisualId: 	'3786',
				keyvisualName: 	'kv_3786.jpg',
				fontsetId: 		'10567',
				graphicsetId: 	'10977',
				contentColor: 	'0000AF',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'F30E0E',
				e_color: 		'F30E0E',
				f_color: 		'F30E0E',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1201',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1201',
internalId:  '',
customField: '20101117-014205'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8601',
internalId:  '',
customField: '20101117-013856'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8685',
internalId:  '',
customField: '20101117-020717'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8622',
internalId:  '',
customField: '20101117-015702'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8643',
internalId:  '',
customField: '20101117-013236'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8664',
internalId:  '',
customField: '20101117-015957'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8706',
internalId:  '',
customField: '20110215-190829'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8727',
internalId:  '',
customField: '20090209-164933'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8748',
internalId:  '',
customField: '20101114-225452'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8769',
internalId:  '',
customField: '20101117-021500'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8790',
internalId:  '',
customField: '20080527-185916'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24252',
internalId:  '',
customField: '20101117-012706'
};
webappMappings['1002']=webappMappings['1002-24552ahw050inx2yb']={
webappId:    '1002',
documentId:  '24552',
internalId:  '24552ahw050inx2yb',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22708',
internalId:  '',
customField: '20101117-020116'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22699',
internalId:  '',
customField: '20101117-015840'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24552',
internalId:  '',
customField: '20101114-233156'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25094',
internalId:  '',
customField: '20101117-021120'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25052',
internalId:  '',
customField: '20101117-012255'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25073',
internalId:  '',
customField: '20101117-011901'
};
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050INX2YB';
var companyName   = 'Allwin+ProducTs%2C+LLC';
var htmlTitle	  = 'http%3A%2F%2Fallwinproducts.com';
var metaKeywords  = '';
var metaContents  = '';
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();
};

