/* [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','21188',jdecode('Sheridan+Productions+DJ+Service'),jdecode(''), jdecode('%2F21188%2Findex.html'), 'true',[ 
		['PAGE','50135',jdecode('DJ+Pricing'),jdecode(''), jdecode('%2F21188%2F50135.html'), 'true',[],'',''],
		['PAGE','50535',jdecode('DJ+Contract'),jdecode(''), jdecode('%2F21188%2F50535.html'), 'true',[],'',''],
		['PAGE','52135',jdecode('Additional+Terms+%26+Conditions'),jdecode(''), jdecode('%2F21188%2F52135.html'), 'true',[],'',''],
		['PAGE','49856',jdecode('Information+Worksheet'),jdecode(''), jdecode('%2F21188%2F49856.html'), 'true',[],'',''],
		['PAGE','50035',jdecode('Ceremony+Worksheet'),jdecode(''), jdecode('%2F21188%2F50035.html'), 'true',[],'','']
	],'',''],
	['PAGE','86059',jdecode('Fletcher+Goodman+Band'),jdecode(''), jdecode('%2F86059.html'), 'true',[],'',''],
	['PAGE','25544',jdecode('Wedding+Minister'),jdecode(''), jdecode('%2F25544.html'), 'true',[],'',''],
	['PAGE','49835',jdecode('Client+Comments'),jdecode(''), jdecode('%2F49835%2Findex.html'), 'true',[ 
		['PAGE','59135',jdecode('Magazine+Articles'),jdecode(''), jdecode('%2F49835%2F59135.html'), 'true',[],'','']
	],'',''],
	['PAGE','49456',jdecode('Contact'),jdecode(''), jdecode('%2F49456.html'), 'true',[],'',''],
	['PAGE','58435',jdecode('Favorite+Links'),jdecode(''), jdecode('%2F58435.html'), 'true',[],'','']];
var siteelementCount=12;
theSitetree.topTemplateName='Kreis';
theSitetree.paletteFamily='4D4CD2';
theSitetree.keyvisualId='589';
theSitetree.keyvisualName='collage.jpg';
theSitetree.fontsetId='124';
theSitetree.graphicsetId='140';
theSitetree.contentColor='7794FB';
theSitetree.contentBGColor='000000';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'endurance',
  product: 'WSCSYSSSSLY0XRNU'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Kreis',
				paletteFamily: 	'4D4CD2',
				keyvisualId: 	'589',
				keyvisualName: 	'collage.jpg',
				fontsetId: 		'124',
				graphicsetId: 	'140',
				contentColor: 	'7794FB',
				contentBGColor: '000000',
				a_color: 		'4D4CD2',
				b_color: 		'7794F8',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21188',
internalId:  '',
customField: '20110820-160852'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '86059',
internalId:  '',
customField: '20111214-121050'
};
webappMappings['7008']=webappMappings['7008-20758']={
webappId:    '7008',
documentId:  '21188',
internalId:  '20758',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25544',
internalId:  '',
customField: '20110820-160946'
};
webappMappings['7008']=webappMappings['7008-20764']={
webappId:    '7008',
documentId:  '25544',
internalId:  '20764',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58435',
internalId:  '',
customField: '20110916-142236'
};
webappMappings['7080']=webappMappings['7080-598']={
webappId:    '7080',
documentId:  '49456',
internalId:  '598',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49456',
internalId:  '',
customField: '20110628-183220'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49835',
internalId:  '',
customField: '20110820-161006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49856',
internalId:  '',
customField: '20090911-112708'
};
webappMappings['7008']=webappMappings['7008-20774']={
webappId:    '7008',
documentId:  '49856',
internalId:  '20774',
customField: 'language:en;country:US;'
};
webappMappings['7008']=webappMappings['7008-20775']={
webappId:    '7008',
documentId:  '50035',
internalId:  '20775',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50035',
internalId:  '',
customField: '20090911-112736'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50135',
internalId:  '',
customField: '20100610-145134'
};
webappMappings['7008']=webappMappings['7008-20777']={
webappId:    '7008',
documentId:  '50535',
internalId:  '20777',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50535',
internalId:  '',
customField: '20110628-115742'
};
webappMappings['7008']=webappMappings['7008-20799']={
webappId:    '7008',
documentId:  '52135',
internalId:  '20799',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52135',
internalId:  '',
customField: '20090911-215225'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59135',
internalId:  '',
customField: '20091001-103517'
};
var webAppHostname = 'cgiwsc.enhancedsitebuilder.com:80';
var canonHostname = 'cmworker01.yourhostingaccount.com';
var accountId     = 'AENDU0IN3URL';
var companyName   = 'Sheridan+Productions';
var htmlTitle	  = 'Sheridan+Productions';
var metaKeywords  = 'San+Antonio+Bands%2C+San+Antonio+Disc+Jockeys%2C+San+Antonio+DJs%2C+San+Antonio+Cover+Bands%2C+San+Antonio+Variety+Bands%2C+San+Antonio+Western+Bands%2C+San+Antonio+Country+Bands%2C+San+Antonio+Jazz+Bands%2C+San+Antonio+Latin+Bands%2C+Texas+Variety+Bands%2C+Texas+DJs%2C+mariachi%2C+strings%2C+guitarists%2C+pianists%2C+dancers%2C+casino%2C+San+Antonio+Casino%2C+Fred+Sheridan%2C+Kathleen+Sheridan%2C+harpists%2C+violinists%2C+San+Antonio+string+ensembles%2C+string+quartets%2C+impersonators%2C+clowns%2C+Singers%2C+showgirls%2C+line+dance+instructors%2C+German+Bands%2C+jewelry%2C+wedding+entertainment%2C+wedding+bands%2C+wedding+djs%2C+';
var metaContents  = 'Sheridan+Productions+%28formerly+Kathleen+Sheridan+Productions%29+is+a+full+service+entertainment+agency+located+in+San+Antonio%2C+Texas.+';
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();
};

