/* [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','43',jdecode('Home'),jdecode(''),'/43.html','true',[],'',''],
	['PAGE','64',jdecode('About+us'),jdecode(''),'/64/index.html','true',[ 
		['PAGE','82',jdecode('Upcoming+Shows'),jdecode(''),'/64/82.html','true',[],'',''],
		['PAGE','91',jdecode('TV+%2F+Print'),jdecode(''),'/64/91.html','true',[],'','']
	],'',''],
	['PAGE','100',jdecode('Collection+Highlights'),jdecode(''),'/100/index.html','true',[ 
		['PAGE','109',jdecode('Batman+%28TV%29'),jdecode(''),'/100/109.html','true',[],'',''],
		['PAGE','118',jdecode('Lost+in+Space+TV'),jdecode(''),'/100/118.html','true',[],'',''],
		['PAGE','127',jdecode('Star+Trek%3A+The+Original+Series+%281960s%29+and+movies'),jdecode(''),'/100/127.html','true',[],'','']
	],'',''],
	['PAGE','653',jdecode('Photo+Gallery'),jdecode(''),'/653/index.html','true',[ 
		['PAGE','8801',jdecode('Photo+Gallery+2+%2F+New+Additions'),jdecode(''),'/653/8801.html','true',[],'',''],
		['PAGE','1349',jdecode('Batman+TV+Photo+Album'),jdecode(''),'/653/1349.html','true',[],'',''],
		['PAGE','1412',jdecode('Lost+in+Space+TV+Photo+Album'),jdecode(''),'/653/1412.html','true',[],'',''],
		['PAGE','1484',jdecode('Star+Trek+Photo+Album'),jdecode(''),'/653/1484.html','true',[],'','']
	],'',''],
	['PAGE','1679',jdecode('Links'),jdecode(''),'/1679.html','true',[],'',''],
	['PAGE','136',jdecode('Contact+Us'),jdecode(''),'/136.html','true',[],'','']];
var siteelementCount=15;
theSitetree.topTemplateName='Cinema';
theSitetree.paletteFamily='2F952F';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='16613';
theSitetree.graphicsetId='12210';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='2F952F';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Cinema',
				paletteFamily: 	'2F952F',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'16613',
				graphicsetId: 	'12210',
				contentColor: 	'000000',
				contentBGColor: '2F952F',
				a_color: 		'000000',
				b_color: 		'59AA59',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '43',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-1776325']={
webappId:    '1501',
documentId:  '43',
internalId:  '1776325',
customField: '1501'
};
webappMappings['7060']=webappMappings['7060-cd403486aa8abd94a14983de7f0f6050']={
webappId:    '7060',
documentId:  '653',
internalId:  'cd403486aa8abd94a14983de7f0f6050',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-82cbbe6bd28aecc0399eec0392eba63b']={
webappId:    '7060',
documentId:  '1349',
internalId:  '82cbbe6bd28aecc0399eec0392eba63b',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-d15b85314a7916d9b74235154727c0ca']={
webappId:    '7060',
documentId:  '1412',
internalId:  'd15b85314a7916d9b74235154727c0ca',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-a395daf0250eab087e5c3253f8bb36dc']={
webappId:    '7060',
documentId:  '1484',
internalId:  'a395daf0250eab087e5c3253f8bb36dc',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43',
internalId:  '',
customField: '20100619-114156'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '653',
internalId:  '',
customField: '20100124-140227'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8801',
internalId:  '',
customField: '20100124-140112'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64',
internalId:  '',
customField: '20100511-130423'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82',
internalId:  '',
customField: '20100619-122919'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '91',
internalId:  '',
customField: '20080511-200436'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '100',
internalId:  '',
customField: '20100124-140612'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '109',
internalId:  '',
customField: '20091012-135208'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '118',
internalId:  '',
customField: '20091012-135423'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '127',
internalId:  '',
customField: '20091012-135558'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1349',
internalId:  '',
customField: '20100201-095202'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1412',
internalId:  '',
customField: '20070115-151942'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1484',
internalId:  '',
customField: '20071125-232842'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1679',
internalId:  '',
customField: '20100124-121518'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '136',
internalId:  '',
customField: '20080523-234210'
};
webappMappings['7060']=webappMappings['7060-85c9cf688fb6c578a4ec0be5fbcdef23']={
webappId:    '7060',
documentId:  '8801',
internalId:  '85c9cf688fb6c578a4ec0be5fbcdef23',
customField: 'language:en;country:US;'
};
var canonHostname = 'wsc-worker01.chi.us.siteprotect.com';
var accountId     = 'AHW050IN3G49';
var companyName   = 'THE+AZARIAN+COLLECTION++++++++THE+AZARIAN+COLLECTION';
var htmlTitle	  = 'THE+AZARIAN+COLLECTION';
var metaKeywords  = 'Batman++++Bewitched++++Lost+in+Space++++Star+Trek++++Superman+++Supergirl++++Grease++++Get+Smart++++I+Dream+of+Jeannie++++Original+props++++Original+Wardrobe++++Original+Costumes+++Wonder+Woman+++George+Reeves+++Christoper+Reeve+++Adam+West+++Burt+Ward+++Azarian++Azarian+Collection++The+Azarian+Collection++Comisar++Comisar+Collection++Lynda+Carter++Barbara+Eden++Elizabeth+Montgomery++Joker++Penguin++Mr.+Freeze++Catwoman++Batgirl++Yvonne+Craig+Star+Trek+Star+Trek+TOS+Star+Trek+Original+Props+Shatner+Spock+Kirk+Nimoy+Uhura+Scotty+Sulu+Checkov';
var metaContents  = 'Original+Props++++Original+Wardrobe++++Original+Costumes++++Television+Collection++++Batman++++Lost+in+Space++++Star+Trek++++Star+Wars++++Get+Smart++++I+Dream+of+Jeannie++++Bewitched++++Grease++++Superman++++Supergirl++Azarian++Azarian+Collection++The+Azarian+Collection++Comisar++Comisar+Collection++television++tv++Superheroes++Sci+Fi++Science+Fiction+Star+Trek+Original+props+Star+Trek+Original+Wardrobe+Shatner+Kirk+Spock+Robin+Uhura+Scotty+Checkov+Sulu+Will+Robinson+Irwin+Allen+';
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();
};
