/* [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 theSitetree=[ 
	['PAGE','901',jdecode('HOME'),jdecode(''),'/901.html','true',[],''],
	['PAGE','21001',jdecode('KARATE%2FTKD+UNIFORM'),jdecode(''),'/21001.html','true',[],''],
	['PAGE','43622',jdecode('JIU+JITSU+GIS'),jdecode(''),'/43622.html','true',[],''],
	['PAGE','43643',jdecode('JUDO+GIS'),jdecode(''),'/43643.html','true',[],''],
	['PAGE','43664',jdecode('KUNG+FU+UNIFORMS'),jdecode(''),'/43664.html','true',[],''],
	['PAGE','43685',jdecode('RANK+BELT%2FSASHES'),jdecode(''),'/43685.html','true',[],''],
	['PAGE','43706',jdecode('GEAR+BAGS'),jdecode(''),'/43706.html','true',[],''],
	['PAGE','43727',jdecode('SPARRING+GEAR'),jdecode(''),'/43727.html','true',[],''],
	['PAGE','43853',jdecode('BOXING+GLOVES'),jdecode(''),'/43853.html','true',[],''],
	['PAGE','43769',jdecode('BAG+GLOVES'),jdecode(''),'/43769.html','true',[],''],
	['PAGE','43874',jdecode('HEAD+GUARDS'),jdecode(''),'/43874.html','true',[],''],
	['PAGE','76901',jdecode('SPEED+BALL%2FBOXBALL'),jdecode(''),'/76901.html','true',[],''],
	['PAGE','43895',jdecode('BOXING+SHORT%2FJERSEY'),jdecode(''),'/43895.html','true',[],''],
	['PAGE','43748',jdecode('FOCUS+PAD%2FTARGET'),jdecode(''),'/43748.html','true',[],''],
	['PAGE','43790',jdecode('MMA+GLOVES'),jdecode(''),'/43790.html','true',[],''],
	['PAGE','43811',jdecode('PUNCHING+BAGS'),jdecode(''),'/43811.html','true',[],''],
	['PAGE','43832',jdecode('WEIGHT+TRAINING+'),jdecode(''),'/43832.html','true',[],''],
	['PAGE','76922',jdecode('BOXEING+ACCESSORIES'),jdecode(''),'/76922.html','true',[],''],
	['PAGE','76943',jdecode('T-SHIRTS'),jdecode(''),'/76943.html','true',[],'']];
var siteelementCount=19;
theSitetree.topTemplateName='Startup';
theSitetree.paletteFamily='002F2F';
theSitetree.keyvisualId='1387';
theSitetree.keyvisualName='karate.jpg';
theSitetree.fontsetId='234';
theSitetree.graphicsetId='298';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Startup',
				paletteFamily: 	'002F2F',
				keyvisualId: 	'1387',
				keyvisualName: 	'karate.jpg',
				fontsetId: 		'234',
				graphicsetId: 	'298',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'002F2F',
				b_color: 		'666666',
				c_color: 		'000000',
				d_color: 		'FF0000',
				e_color: 		'FF0000',
				f_color: 		'FF0000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '901',
internalId:  '',
customField: '20090305-074644'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21001',
internalId:  '',
customField: '20090306-093756'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '901',
internalId:  '1006',
customField: '1006'
};
webappMappings['7008']=webappMappings['7008-211']={
webappId:    '7008',
documentId:  '901',
internalId:  '211',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43664',
internalId:  '',
customField: '20090306-094129'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43622',
internalId:  '',
customField: '20090306-094003'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43643',
internalId:  '',
customField: '20090306-094050'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43685',
internalId:  '',
customField: '20090306-094208'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43706',
internalId:  '',
customField: '20090304-135729'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43727',
internalId:  '',
customField: '20090306-094418'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43748',
internalId:  '',
customField: '20090304-141133'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43769',
internalId:  '',
customField: '20090306-094656'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43790',
internalId:  '',
customField: '20090324-141638'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43811',
internalId:  '',
customField: '20090304-131029'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43832',
internalId:  '',
customField: '20090305-143718'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43853',
internalId:  '',
customField: '20090306-094556'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43874',
internalId:  '',
customField: '20090304-150105'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43895',
internalId:  '',
customField: '20090305-073732'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '76922',
internalId:  '',
customField: '20090305-151946'
};
webappMappings['1501']=webappMappings['1501-17977719']={
webappId:    '1501',
documentId:  '901',
internalId:  '17977719',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '76901',
internalId:  '',
customField: '20090305-151503'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '76943',
internalId:  '',
customField: '20090305-144016'
};
var canonHostname = 'wscwrk02.ehost-services.com';
var accountId     = 'AEN010INZ0RB';
var companyName   = 'WORLD+SPORTS+VENTURES+';
var htmlTitle	  = 'World+Sports+Ventures';
var metaKeywords  = 'martial+arts+uniformsmartial+artsJudo+uniformsuniformsjiu+jitsu+gisgiskimonoskarate+uniformsTKD+uniformsTaekwondokung+fu+uniformskung+fu+sashessashesrank+beltbeltbelts+++sparring+gear+++boxingboxing+glovesgloves+++head+guardsProtection+equipmenthand+targetshieldarm+padsthai+boxing+glovesthai+padshand+wrap++punching+bags++bags++tshirst++t-shirts++sweat+shirts++mma+mma+glovesfight+shorts++shorts++speed+balls++double+end+ballboxball++focus+padspads++puching+mitts++++';
var metaContents  = 'martial+arts+uniformsmartial+artsJudo+uniformsuniformsjiu+jitsu+gisgiskimonoskarate+uniformsTKD+uniformsTaekwondokung+fu+uniformskung+fu+sashessashesrank+beltbeltbelts+++sparring+gear+++boxingboxing+glovesgloves+++head+guardsProtection+equipmenthand+wrap++punching+bags++bags++tshirst++t-shirts++sweat+shirts++mma+mma+glovesfight+shorts++shorts++speed+balls++double+end+ballboxball++focus+padspads++puching+mitts++Judo+uniforms++jiu+jitsu+gis++karate+uniforms++Taekwondo+uniforms++sparring+gear+++boxing+head+guards++boxing+gloves++hand+wrap++punching+bags++speed+balls++boxball++focus+pads++puching+mitts++pads++';
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();
};
