/* [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','3501',jdecode('Home'),jdecode(''), jdecode('%2F3501.html'), 'true',[],'',''],
	['PAGE','3552',jdecode('Our+Products'),jdecode(''), jdecode('%2F3552%2Findex.html'), 'true',[ 
		['PAGE','20312',jdecode('MightyMind'),jdecode(''), jdecode('%2F3552%2F20312.html'), 'true',[],'',''],
		['PAGE','20333',jdecode('SuperMind'),jdecode(''), jdecode('%2F3552%2F20333.html'), 'true',[],'',''],
		['PAGE','20712',jdecode('Aquarium+Adventure'),jdecode(''), jdecode('%2F3552%2F20712.html'), 'true',[],'',''],
		['PAGE','20796',jdecode('Magnetic+MightyMind'),jdecode(''), jdecode('%2F3552%2F20796.html'), 'true',[],'',''],
		['PAGE','20817',jdecode('Magnetic+SuperMind'),jdecode(''), jdecode('%2F3552%2F20817.html'), 'true',[],'',''],
		['PAGE','20838',jdecode('Magnetic+Sea+Explorer'),jdecode(''), jdecode('%2F3552%2F20838.html'), 'true',[],'',''],
		['PAGE','20775',jdecode('MAGNETIZE+YOUR+DESIGN+TILES'),jdecode(''), jdecode('%2F3552%2F20775.html'), 'true',[],'',''],
		['PAGE','20733',jdecode('Mini+MightyMind'),jdecode(''), jdecode('%2F3552%2F20733.html'), 'true',[],'',''],
		['PAGE','20754',jdecode('Super+Challenger'),jdecode(''), jdecode('%2F3552%2F20754.html'), 'true',[],'',''],
		['PAGE','32112',jdecode('Add-On+Design+Books'),jdecode(''), jdecode('%2F3552%2F32112.html'), 'true',[],'',''],
		['PAGE','28612',jdecode('Design+Tiles'),jdecode(''), jdecode('%2F3552%2F28612.html'), 'true',[],'',''],
		['PAGE','76344',jdecode('MightyMind+School+Box'),jdecode(''), jdecode('%2F3552%2F76344.html'), 'true',[],'',''],
		['PAGE','28633',jdecode('Little+Planner'),jdecode(''), jdecode('%2F3552%2F28633.html'), 'true',[],'',''],
		['PAGE','33512',jdecode('Smarty+Farm'),jdecode(''), jdecode('%2F3552%2F33512.html'), 'true',[],'',''],
		['PAGE','28654',jdecode('Think-Its+Math+Mats'),jdecode(''), jdecode('%2F3552%2F28654.html'), 'true',[],'',''],
		['PAGE','70222',jdecode('MightyMind+T-Shirts'),jdecode(''), jdecode('%2F3552%2F70222.html'), 'true',[],'','']
	],'',''],
	['ITEM','63400',jdecode('Magnetic+MightyMind+Items'),jdecode(''), jdecode('http%3A%2F%2Fwww.mightymindkids.com%2FMagnetic_Products.html'), 'true',[],'','_blank'],
	['PAGE','34012',jdecode('Instructions'),jdecode(''), jdecode('%2F34012%2Findex.html'), 'true',[ 
		['PAGE','69622',jdecode('Solutions'),jdecode(''), jdecode('%2F34012%2F69622.html'), 'true',[],'',''],
		['PAGE','34033',jdecode('English'),jdecode(''), jdecode('%2F34012%2F34033.html'), 'true',[],'',''],
		['PAGE','36923',jdecode('Arabic'),jdecode(''), jdecode('%2F34012%2F36923.html'), 'true',[],'',''],
		['PAGE','37523',jdecode('Chinese'),jdecode(''), jdecode('%2F34012%2F37523.html'), 'true',[],'',''],
		['PAGE','38123',jdecode('Danish'),jdecode(''), jdecode('%2F34012%2F38123.html'), 'true',[],'',''],
		['PAGE','39523',jdecode('Dutch'),jdecode(''), jdecode('%2F34012%2F39523.html'), 'true',[],'',''],
		['PAGE','39544',jdecode('French'),jdecode(''), jdecode('%2F34012%2F39544.html'), 'true',[],'',''],
		['PAGE','39923',jdecode('German'),jdecode(''), jdecode('%2F34012%2F39923.html'), 'true',[],'',''],
		['PAGE','39944',jdecode('Hebrew'),jdecode(''), jdecode('%2F34012%2F39944.html'), 'true',[],'',''],
		['PAGE','39965',jdecode('Italian'),jdecode(''), jdecode('%2F34012%2F39965.html'), 'true',[],'',''],
		['PAGE','40323',jdecode('Japanese'),jdecode(''), jdecode('%2F34012%2F40323.html'), 'true',[],'',''],
		['PAGE','40523',jdecode('Korean'),jdecode(''), jdecode('%2F34012%2F40523.html'), 'true',[],'',''],
		['PAGE','40723',jdecode('Norwegian'),jdecode(''), jdecode('%2F34012%2F40723.html'), 'true',[],'',''],
		['PAGE','40923',jdecode('Russian'),jdecode(''), jdecode('%2F34012%2F40923.html'), 'true',[],'',''],
		['PAGE','41123',jdecode('Spanish'),jdecode(''), jdecode('%2F34012%2F41123.html'), 'true',[],'',''],
		['PAGE','42523',jdecode('Swedish'),jdecode(''), jdecode('%2F34012%2F42523.html'), 'true',[],'','']
	],'',''],
	['ITEM','9664',jdecode('FIND+A+STORE'),jdecode(''), jdecode('http%3A%2F%2Fwww.mightymindkids.com'), 'true',[],'','_blank'],
	['ITEM','78544',jdecode('MIGHTYMIND+ON+RADIO'),jdecode(''), jdecode('http%3A%2F%2Fwww.mightymindkids.com%2FMightyMind_Commercial.html'), 'true',[],'','_blank'],
	['PAGE','43523',jdecode('BUY+ONLINE%21'),jdecode(''), jdecode('%2F43523.html'), 'true',[],'',''],
	['PAGE','78044',jdecode('Redeem+Coupons'),jdecode(''), jdecode('%2F78044.html'), 'true',[],'',''],
	['PAGE','52656',jdecode('Lost+or+Missing+Parts'),jdecode(''), jdecode('%2F52656.html'), 'true',[],'',''],
	['ITEM','47434',jdecode('Find+us+on+Facebook%21'),jdecode(''), jdecode('http%3A%2F%2Fwww.facebook.com%2Fpages%2FMightyMind%2F205833869441588'), 'true',[],'','_blank'],
	['ITEM','37123',jdecode('Reviews'),jdecode(''), jdecode('http%3A%2F%2Fwww.mightymindkids.com%2FReviews.html'), 'true',[],'',''],
	['PAGE','54056',jdecode('About+Us'),jdecode(''), jdecode('%2F54056.html'), 'true',[ 
		['ITEM','54856',jdecode('How+We+Started'),jdecode(''), jdecode('http%3A%2F%2Fwww.mightymindkids.com%2FHowWeStarted.html'), 'true',[],'',''],
		['ITEM','54857',jdecode('National+Recognition'),jdecode(''), jdecode('http%3A%2F%2Fwww.mightymindkids.com%2FNationalRecognition.html'), 'true',[],'',''],
		['ITEM','54858',jdecode('Unique+Award+Winning+Toys'),jdecode(''), jdecode('http%3A%2F%2Fwww.mightymindkids.com%2FAwardWinningToys.html'), 'true',[],'','']
	],'',''],
	['PAGE','28675',jdecode('Contact+Us'),jdecode(''), jdecode('%2F28675.html'), 'true',[],'',''],
	['ITEM','77644',jdecode('Press+Box'),jdecode(''), jdecode('http%3A%2F%2Fwww.mightymindkids.com%2FProduct_Images_PressBox.html'), 'true',[],'','_blank'],
	['PAGE','58178',jdecode('Retail+Stores+Only'),jdecode(''), jdecode('%2F58178%2Findex.html'), 'true',[ 
		['PAGE','58578',jdecode('New+Retailers'),jdecode(''), jdecode('%2F58178%2F58578.html'), 'false',[],'','']
	],'','']];
var siteelementCount=51;
theSitetree.topTemplateName='Valiant';
theSitetree.paletteFamily='5252B6';
theSitetree.keyvisualId='9836';
theSitetree.keyvisualName='kv_9836.jpg';
theSitetree.fontsetId='17626';
theSitetree.graphicsetId='13032';
theSitetree.contentColor='646464';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'grp35-attweb',
  product: 'WSCSYSSSSLY0X9RC'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Valiant',
				paletteFamily: 	'5252B6',
				keyvisualId: 	'9836',
				keyvisualName: 	'kv_9836.jpg',
				fontsetId: 		'17626',
				graphicsetId: 	'13032',
				contentColor: 	'646464',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				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:  '3501',
internalId:  '',
customField: '20110927-115749'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3552',
internalId:  '',
customField: '20110429-162149'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '69622',
internalId:  '',
customField: '20110727-140943'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20775',
internalId:  '',
customField: '20110504-121750'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20754',
internalId:  '',
customField: '20110809-115646'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20712',
internalId:  '',
customField: '20110808-170409'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20733',
internalId:  '',
customField: '20110808-174858'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20312',
internalId:  '',
customField: '20110927-115842'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20333',
internalId:  '',
customField: '20110927-130215'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '3501',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20796',
internalId:  '',
customField: '20110808-172053'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20817',
internalId:  '',
customField: '20110808-174004'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20838',
internalId:  '',
customField: '20110808-174430'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28612',
internalId:  '',
customField: '20110315-134619'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28633',
internalId:  '',
customField: '20110527-144152'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28654',
internalId:  '',
customField: '20110527-144305'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28675',
internalId:  '',
customField: '20110316-101850'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32112',
internalId:  '',
customField: '20110414-141103'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33512',
internalId:  '',
customField: '20110315-173710'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34012',
internalId:  '',
customField: '20110927-130316'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34033',
internalId:  '',
customField: '20110810-102844'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36923',
internalId:  '',
customField: '20110401-105445'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37523',
internalId:  '',
customField: '20110404-120236'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38123',
internalId:  '',
customField: '20110331-103017'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39523',
internalId:  '',
customField: '20110419-152318'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39544',
internalId:  '',
customField: '20110331-103622'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39923',
internalId:  '',
customField: '20110404-113322'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39944',
internalId:  '',
customField: '20110401-105329'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39965',
internalId:  '',
customField: '20110419-152206'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40323',
internalId:  '',
customField: '20110331-113751'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40523',
internalId:  '',
customField: '20110331-114241'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40723',
internalId:  '',
customField: '20110808-103754'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40923',
internalId:  '',
customField: '20110331-122206'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41123',
internalId:  '',
customField: '20110401-104652'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42523',
internalId:  '',
customField: '20110808-102241'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52656',
internalId:  '',
customField: '20110719-103843'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43523',
internalId:  '',
customField: '20110809-145535'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54056',
internalId:  '',
customField: '20110425-153736'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58178',
internalId:  '',
customField: '20110512-153115'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58578',
internalId:  '',
customField: '20110512-160525'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70222',
internalId:  '',
customField: '20110729-154446'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '76344',
internalId:  '',
customField: '20110916-164134'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '78044',
internalId:  '',
customField: '20111203-130223'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVF340I7KQ6W';
var companyName   = 'Available+at+the+best+retailers+in+26+countries%21';
var htmlTitle	  = 'MightyMind%C2%AE+Makes+Kids+Smarter%21';
var metaKeywords  = '';
var metaContents  = '';
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();
};

