/* [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','5001',jdecode('Home'),jdecode(''), jdecode('%2F5001.html'), 'true',[],'',''],
	['PAGE','11912',jdecode('Highway+Letters'),jdecode(''), jdecode('%2F11912%2Findex.html'), 'true',[ 
		['PAGE','34323',jdecode('Sports'),jdecode(''), jdecode('%2F11912%2F34323.html'), 'true',[],'',''],
		['PAGE','52223',jdecode('Food+%26+Drink'),jdecode(''), jdecode('%2F11912%2F52223.html'), 'true',[],'',''],
		['PAGE','108107',jdecode('Potpourri'),jdecode(''), jdecode('%2F11912%2F108107.html'), 'true',[],'',''],
		['PAGE','34344',jdecode('Places'),jdecode(''), jdecode('%2F11912%2F34344.html'), 'true',[],'',''],
		['PAGE','102307',jdecode('Custom+Projects'),jdecode(''), jdecode('%2F11912%2F102307.html'), 'true',[],'','']
	],'',''],
	['PAGE','57223',jdecode('Custom+Designer'),jdecode(''), jdecode('%2F57223%2Findex.html'), 'true',[ 
		['PAGE','72693',jdecode('Sample+A'),jdecode(''), jdecode('%2F57223%2F72693.html'), 'false',[],'',''],
		['PAGE','74193',jdecode('Sample+B'),jdecode(''), jdecode('%2F57223%2F74193.html'), 'false',[],'','']
	],'',''],
	['PAGE','16712',jdecode('LaCrosse+Gallery'),jdecode(''), jdecode('%2F16712%2Findex.html'), 'true',[ 
		['PAGE','16754',jdecode('Around+LaCrosse'),jdecode(''), jdecode('%2F16712%2F16754.html'), 'true',[],'',''],
		['PAGE','172807',jdecode('By+the+River'),jdecode(''), jdecode('%2F16712%2F172807.html'), 'true',[],'',''],
		['PAGE','16775',jdecode('Amish+Country'),jdecode(''), jdecode('%2F16712%2F16775.html'), 'true',[],'',''],
		['PAGE','16733',jdecode('Panoramas'),jdecode(''), jdecode('%2F16712%2F16733.html'), 'true',[],'','']
	],'',''],
	['PAGE','99707',jdecode('Random+Gallery'),jdecode(''), jdecode('%2F99707%2Findex.html'), 'true',[ 
		['PAGE','54423',jdecode('Group+A'),jdecode(''), jdecode('%2F99707%2F54423.html'), 'true',[],'',''],
		['PAGE','181207',jdecode('Group+B'),jdecode(''), jdecode('%2F99707%2F181207.html'), 'true',[],'',''],
		['PAGE','99728',jdecode('Still+Life'),jdecode(''), jdecode('%2F99707%2F99728.html'), 'true',[],'','']
	],'',''],
	['PAGE','5912',jdecode('Transport+Gallery'),jdecode(''), jdecode('%2F5912%2Findex.html'), 'true',[ 
		['PAGE','21312',jdecode('River+Boats'),jdecode(''), jdecode('%2F5912%2F21312.html'), 'true',[],'',''],
		['PAGE','25812',jdecode('Wheel+Related'),jdecode(''), jdecode('%2F5912%2F25812.html'), 'true',[],'',''],
		['PAGE','25833',jdecode('These+Fly'),jdecode(''), jdecode('%2F5912%2F25833.html'), 'true',[],'','']
	],'',''],
	['PAGE','35623',jdecode('L+o+C++Prints'),jdecode(''), jdecode('%2F35623.html'), 'true',[],'',''],
	['PAGE','102328',jdecode('Where+to+Buy'),jdecode(''), jdecode('%2F102328.html'), 'true',[],'',''],
	['PAGE','22412',jdecode('About'),jdecode(''), jdecode('%2F22412%2Findex.html'), 'true',[ 
		['PAGE','58623',jdecode('Artists+Bio'),jdecode(''), jdecode('%2F22412%2F58623.html'), 'true',[],'','']
	],'','']];
var siteelementCount=27;
theSitetree.topTemplateName='Circulation';
theSitetree.paletteFamily='1243CC';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10381';
theSitetree.graphicsetId='10562';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='000000';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'fatcow',
  product: 'WSCSYSSSSLY0XRN4'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Circulation',
				paletteFamily: 	'1243CC',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10381',
				graphicsetId: 	'10562',
				contentColor: 	'FFFFFF',
				contentBGColor: '000000',
				a_color: 		'FFFFFF',
				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:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5001',
internalId:  '',
customField: '20120207-093616'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11912',
internalId:  '',
customField: '20110203-151951'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5912',
internalId:  '',
customField: '20110201-141548'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57223',
internalId:  '',
customField: '20111114-074413'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58623',
internalId:  '',
customField: '20110412-185017'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16712',
internalId:  '',
customField: '20110201-141325'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16733',
internalId:  '',
customField: '20110329-084110'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16754',
internalId:  '',
customField: '20110201-141402'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16775',
internalId:  '',
customField: '20110201-143515'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21312',
internalId:  '',
customField: '20110201-141613'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22412',
internalId:  '',
customField: '20110201-141807'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25812',
internalId:  '',
customField: '20101027-175112'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25833',
internalId:  '',
customField: '20101027-175428'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34323',
internalId:  '',
customField: '20101221-120441'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '5001',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34344',
internalId:  '',
customField: '20101221-140155'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35623',
internalId:  '',
customField: '20110131-194522'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '99728',
internalId:  '',
customField: '20110131-115514'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52223',
internalId:  '',
customField: '20101226-185255'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54423',
internalId:  '',
customField: '20110201-141535'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72693',
internalId:  '',
customField: '20091204-142439'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '74193',
internalId:  '',
customField: '20091204-164819'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '99707',
internalId:  '',
customField: '20110201-141509'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '102307',
internalId:  '',
customField: '20110125-135822'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '102328',
internalId:  '',
customField: '20120111-095457'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '108107',
internalId:  '',
customField: '20101221-141606'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '172807',
internalId:  '',
customField: '20110201-141341'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '181207',
internalId:  '',
customField: '20110216-174752'
};
var webAppHostname = 'cgiwsc.enhancedsitebuilder.com:80';
var canonHostname = 'cmworker03.yourhostingaccount.com';
var accountId     = 'AENDU0IN38AY';
var companyName   = 'New+Vista+Graphics--------------';
var htmlTitle	  = 'New+Vista+Graphics+On-Line+Gallery';
var metaKeywords  = 'Picture+Framing+CTH+Wisconsin+County+Highway+Letters+Gallery+Prints';
var metaContents  = 'New+Vista+Graphics%2C+located+in+La+Crosse%2C+Wisconsin+is+a+high+quality+picture+framing+studio+and+digital+darkroom.+New+Vista+Graphics+is+also+the+home+of+the+famous+Wisconsin+County+Highway+letters+creations.';
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();
};

