/* [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','4401',jdecode('Creative+Windows'),jdecode(''),'/4401.html','true',[],''],
	['PAGE','4701',jdecode('Design+solutions+'),jdecode(''),'/4701.html','true',[],''],
	['PAGE','4722',jdecode('Services+%26+Products'),jdecode(''),'/4722.html','true',[],''],
	['PAGE','4743',jdecode('Contact+Info'),jdecode(''),'/4743.html','true',[],''],
	['PAGE','4764',jdecode('Email+us%21'),jdecode(''),'/4764.html','true',[],''],
	['PAGE','7101',jdecode('Specials'),jdecode(''),'/7101.html','true',[],'']];
var siteelementCount=6;
theSitetree.topTemplateName='Antique';
theSitetree.paletteFamily='E58F12';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='11061';
theSitetree.graphicsetId='11833';
theSitetree.contentColor='D1C3A6';
theSitetree.contentBGColor='856A3B';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Antique',
				paletteFamily: 	'E58F12',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'11061',
				graphicsetId: 	'11833',
				contentColor: 	'D1C3A6',
				contentBGColor: '856A3B',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'664F23',
				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['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4401',
internalId:  '',
customField: '20090918-122427'
};
webappMappings['7008']=webappMappings['7008-14768']={
webappId:    '7008',
documentId:  '4764',
internalId:  '14768',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4701',
internalId:  '',
customField: '20090512-145211'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4722',
internalId:  '',
customField: '20100222-113810'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4743',
internalId:  '',
customField: '20100222-113732'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4764',
internalId:  '',
customField: '20090318-165434'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7101',
internalId:  '',
customField: '20100222-113418'
};
webappMappings['1501']=webappMappings['1501-22525920']={
webappId:    '1501',
documentId:  '4401',
internalId:  '22525920',
customField: '1501'
};
var canonHostname = 'cmworker02.yourhostingaccount.com';
var accountId     = 'AENDU0IN3W2D';
var companyName   = 'Plaza+Shade+%26+Drapery';
var htmlTitle	  = 'Plaza+Shade+%26+Drapery';
var metaKeywords  = 'shades%2C+draperies%2C+fabrics%2C+blinds%2C+verticals%2C+roman+shades%2C+flat+roman+shade%2C+panels%2C+pinch+pleated+panels%2C+goblet+pleated+panels%2C+lined+panels%2C+lined+valances%2C+balloon+shades%2C+woven+wood%2Cbamboo+shades%2C++venetian+blinds%2C+silhouette%2C+vignette%2C+duette%2C+honeycomb+shades%2C+pirouettte+shades%2C++sheers%2C+luminette%2C+swags%2C+jabots%2C+valances%2C+box+pleated+valance%2C+cornice%2C+cornices%2C+pole+with+panels%2C+swags+on+poles%2C+headboards%2C+table+pads%2C+decorative+pillows%2C+pillows%2C+tassels%2C+trimmings%2C+brush+fringe%2C+wood+poles%2C+finials%2C+metal+poles%2C+kids+fabrics%2C+kravet%2C+robert+allen%2C+duralee%2C+rmcoco%2C+kasmir+fabrics%2C+shutters%2C+interior+shutters%2C+bedding%2C+dust+ruffle%2C+comforters%2C+bedspreads%2C+pillow+shams%2C+couture+fabrics%2C+silks%2C+linen+fabrics%2C+cotton+fabrics%2C+eco-friendly+fabrics%2C+panels%2C+grommet+panels%2C+pinch+pleat+drapes%2C+sunbursts%2C+upholstery+fabrics%2C+re-upholstery%2C+interior+designer%2C+window+film%2C+custom+drapery+stores+nj%2C+shades+nj%2C+shutters+nj%2Clondon+shades%2C+austrian+shades%2C+grommet+panels%2C+tab+top+panels%2Cpinch+pleat+panels%2C+brackets%2C+fabric+trim%2C+silk+fabric%2C';
var metaContents  = 'Custom+Drapery%2C+Blinds%2C+Shades%2C+Shutters%2C+Bedding+Ensembles%2C+Hardware%2C+Trimmings+and+much+more%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();
};
