/* [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','121731',jdecode('Important++Update'),jdecode(''), jdecode('%2F121731.html'), 'true',[],'',''],
	['PAGE','501',jdecode('Magnificent+Variety'),jdecode(''), jdecode('%2F501.html'), 'true',[],'',''],
	['PAGE','121752',jdecode('Talya++Photos+'),jdecode(''), jdecode('%2F121752.html'), 'true',[],'',''],
	['PAGE','12701',jdecode('Gospel'),jdecode(''), jdecode('%2F12701.html'), 'true',[],'',''],
	['PAGE','229131',jdecode('Talya+Pg+2'),jdecode(''), jdecode('%2F229131.html'), 'true',[],'',''],
	['PAGE','262931',jdecode('Touring+Dates+'),jdecode(''), jdecode('%2F262931.html'), 'true',[],'',''],
	['PAGE','157931',jdecode('We+Can+Duet'),jdecode(''), jdecode('%2F157931.html'), 'true',[],'',''],
	['PAGE','185531',jdecode('REVIEWS'),jdecode(''), jdecode('%2F185531.html'), 'true',[],'',''],
	['PAGE','573',jdecode('Short+Bios+'),jdecode(''), jdecode('%2F573.html'), 'true',[],'',''],
	['PAGE','615',jdecode('Joe+Movies'),jdecode(''), jdecode('%2F615.html'), 'true',[],'',''],
	['PAGE','594',jdecode('Joe+and+Stars'),jdecode(''), jdecode('%2F594.html'), 'true',[],'',''],
	['PAGE','274352',jdecode(''),jdecode(''), jdecode('%2F274352.html'), 'false',[],'',''],
	['PAGE','6406',jdecode('Guestbook'),jdecode(''), jdecode('%2F6406.html'), 'true',[],'',''],
	['PAGE','333331',jdecode('Charitible+Events+'),jdecode(''), jdecode('%2F333331.html'), 'true',[],'','']];
var siteelementCount=14;
theSitetree.topTemplateName='Citylights';
theSitetree.paletteFamily='333366';
theSitetree.keyvisualId='10438';
theSitetree.keyvisualName='kv_10438.jpg';
theSitetree.fontsetId='26570';
theSitetree.graphicsetId='13392';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='333366';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'bizland',
  product: 'WSCSYSSSSLY0XRN4'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Citylights',
				paletteFamily: 	'333366',
				keyvisualId: 	'10438',
				keyvisualName: 	'kv_10438.jpg',
				fontsetId: 		'26570',
				graphicsetId: 	'13392',
				contentColor: 	'FFFFFF',
				contentBGColor: '333366',
				a_color: 		'3E3535',
				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:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '121731',
internalId:  '',
customField: '20120130-184902'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20111117-023911'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '121752',
internalId:  '',
customField: '20110215-163103'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '573',
internalId:  '',
customField: '20110215-012723'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12701',
internalId:  '',
customField: '20110215-161305'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '615',
internalId:  '',
customField: '20110215-011922'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '594',
internalId:  '',
customField: '20110215-011742'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6406',
internalId:  '',
customField: '20110215-010539'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '501',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '573',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '12701',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '615',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '594',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '229131',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '6406',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['1501']=webappMappings['1501-1501']={
webappId:    '1501',
documentId:  '121731',
internalId:  '1501',
customField: '1501'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '121731',
internalId:  '1006',
customField: '1006'
};
webappMappings['7050']=webappMappings['7050-8525']={
webappId:    '7050',
documentId:  '573',
internalId:  '8525',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '121731',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '121752',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '262931',
internalId:  '',
customField: '20101228-152006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '229131',
internalId:  '',
customField: '20110213-104143'
};
webappMappings['1501']=webappMappings['1501-1019805']={
webappId:    '1501',
documentId:  '121731',
internalId:  '1019805',
customField: '1501'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '157931',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '185531',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '185531',
internalId:  '',
customField: '20110215-013209'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '157931',
internalId:  '',
customField: '20101005-144137'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '333331',
internalId:  '',
customField: '20110215-010242'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '274352',
internalId:  '',
customField: '20100830-165114'
};
webappMappings['1002']=webappMappings['1002-6406aendu0inxeg2']={
webappId:    '1002',
documentId:  '6406',
internalId:  '6406aendu0inxeg2',
customField: 'icq=false'
};
var webAppHostname = 'cgiwsc.enhancedsitebuilder.com:80';
var canonHostname = 'cmworker02.yourhostingaccount.com';
var accountId     = 'AENDU0INXEG2';
var companyName   = 'TINOCO+FAMILY++NOW+JOINING+THE+OSMONDS+FAMILY+SHOW';
var htmlTitle	  = 'PRODUCTIONS+BY+JOE+TINOCO+';
var metaKeywords  = 'Joe+Tinoco+Award+Winning%2C+Show+Biz+..+Off+Broadway%2C+Country+Music%2C+Jazz%2C+Big+Band%2C+Swing%2C+Patriotic%2C+Gosple%2C+Comedy%2C+Songwriting%2C+Dancing%2C+Christmas+Shows%2C+Spanish+Productions%2C+Aruroa+Awards%2C+The+Magnificent+Variety+Show.+Funny+Girl%2C+West+Side+Story%2C+Thriller%2C+Phantom+Of+The+Opera%2C+';
var metaContents  = 'Joe+Tinoco+Award+Winning%2C+Show+Biz+..+Off+Broadway%2C+Country+Music%2C+Jazz%2C+Big+Band%2C+Swing%2C+Patriotic%2C+Gosple%2C+Comedy%2C+Songwriting%2C+Dancing%2C+Christmas+Shows%2C+Spanish+Productions%2C+Aruroa+Awards%2C+The+Magnificent+Variety+Show.+Funny+Girl%2C+West+Side+Story%2C+Thriller%2C+Phantom+Of+The+Opera%2C+';
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();
};

