Metoda `document.getElementById()` zwraca `null` mimo tego że taki `Id` istnieje.

0

W funkcji js TreeSelect(Id)
polecenie const OldSel=document.getElementById("TreeText"+SelectedId); zwraca null mimo że podany Id istneje.

Ciekawostka jest w tym że w następnej funkcji TreeExpand(Id)
Polecenia:

  • const Icon=document.getElementById("TreeIcon"+Id);
  • const Line=document.getElementById("TreeLine"+Id);
  • const Sub=document.getElementById("TreeSub"+Id);
    działają bez zarzutu.
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
		<style>
			span.tp { cursor:pointer; font-size:13px; color:black; padding-right:4px; white-space:nowrap; }
			span.tc { cursor:pointer; font-size:13px; color:red; font-weight:bold; background-color:gold; padding-right:4px; white-space:nowrap; }
			span#hover { background-color:lightblue !important; }
			input { padding-right:0px,0px,0px,0px; }
			img.ti { cursor:pointer; }
			div.line { padding:0px,0px,0px,0px; white-space:nowrap; }
			div.error { color:red;background-color:#FFDDDD }
			div.debug { color:blue;background-color:#DDDDFF }
			#grid { display:grid; grid-template-columns: *% *% *% *%; }
		</style>
		<script type="text/javascript">
			const Parents=
			{
				'r2':'tC',
				's15':'r2',
				'k140':'s15',
				's14':'r2',
				'k139':'s14',
				'r1':'tC',
				's1':'r1',
				'k1':'s1',
				's2':'r1',
				'k2':'s2',
				'k3':'s2',
				'k4':'s2',
				'k5':'s2',
				'k6':'s2',
				'k7':'s2',
				'k8':'s2',
				'k9':'s2',
				'k10':'s2',
				'k11':'s2',
				'k12':'s2',
				'k13':'s2',
				'k14':'s2',
				'k15':'s2',
				'k16':'s2',
				'k17':'s2',
				'k18':'s2',
				'k19':'s2',
				's3':'r1',
				'k20':'s3',
				'k21':'s3',
				'k22':'s3',
				's4':'r1',
				'k23':'s4',
				's5':'r1',
				'k24':'s5',
				's6':'r1',
				'k25':'s6',
				's7':'r1',
				'k26':'s7',
				's8':'r1',
				'k27':'s8',
				'k28':'s8',
				'k29':'s8',
				'k30':'s8',
				'k31':'s8',
				'k32':'s8',
				'k33':'s8',
				'k34':'s8',
				'k35':'s8',
				'k36':'s8',
				'k37':'s8',
				'k38':'s8',
				'k39':'s8',
				'k40':'s8',
				'k41':'s8',
				'k42':'s8',
				'k43':'s8',
				'k44':'s8',
				's9':'r1',
				'k45':'s9',
				'k46':'s9',
				'k47':'s9',
				'k48':'s9',
				'k49':'s9',
				'k50':'s9',
				'k51':'s9',
				'k52':'s9',
				'k53':'s9',
				'k54':'s9',
				'k55':'s9',
				'k56':'s9',
				'k57':'s9',
				'k58':'s9',
				'k59':'s9',
				'k60':'s9',
				'k61':'s9',
				'k62':'s9',
				'k63':'s9',
				'k64':'s9',
				'k65':'s9',
				'k66':'s9',
				's10':'r1',
				'k67':'s10',
				'k68':'s10',
				'k69':'s10',
				'k70':'s10',
				'k71':'s10',
				'k72':'s10',
				'k73':'s10',
				'k74':'s10',
				'k75':'s10',
				'k76':'s10',
				'k77':'s10',
				'k78':'s10',
				'k79':'s10',
				'k80':'s10',
				'k81':'s10',
				'k82':'s10',
				'k83':'s10',
				'k84':'s10',
				's11':'r1',
				'k85':'s11',
				'k86':'s11',
				'k87':'s11',
				'k88':'s11',
				'k89':'s11',
				'k90':'s11',
				'k91':'s11',
				'k92':'s11',
				'k93':'s11',
				'k94':'s11',
				'k95':'s11',
				'k96':'s11',
				'k97':'s11',
				'k98':'s11',
				'k99':'s11',
				'k100':'s11',
				'k101':'s11',
				'k102':'s11',
				's12':'r1',
				'k103':'s12',
				'k104':'s12',
				'k105':'s12',
				'k106':'s12',
				'k107':'s12',
				'k108':'s12',
				'k109':'s12',
				'k110':'s12',
				'k111':'s12',
				'k112':'s12',
				'k113':'s12',
				'k114':'s12',
				'k115':'s12',
				'k116':'s12',
				'k117':'s12',
				'k118':'s12',
				'k119':'s12',
				'k120':'s12',
				's13':'r1',
				'k121':'s13',
				'k122':'s13',
				'k123':'s13',
				'k124':'s13',
				'k125':'s13',
				'k126':'s13',
				'k127':'s13',
				'k128':'s13',
				'k129':'s13',
				'k130':'s13',
				'k131':'s13',
				'k132':'s13',
				'k133':'s13',
				'k134':'s13',
				'k135':'s13',
				'k136':'s13',
				'k137':'s13',
				'k138':'s13',
				'r3':'tC',
				's29':'r3',
				'k314':'s29',
				's41':'r3',
				'k466':'s41',
				'k467':'s41',
				'k468':'s41',
				'k469':'s41',
				'k470':'s41',
				'k471':'s41',
				'k472':'s41',
				'k473':'s41',
				'k474':'s41',
				'k475':'s41',
				'k476':'s41',
				'k477':'s41',
				'k478':'s41',
				'k479':'s41',
				'k480':'s41',
				'k481':'s41',
				'k482':'s41',
				'k483':'s41',
				'k484':'s41',
				'k485':'s41',
				'k486':'s41',
				'k487':'s41',
				's42':'r3',
				'k488':'s42',
				's26':'r3',
				'k294':'s26',
				's27':'r3',
				'k295':'s27',
				's28':'r3',
				'k296':'s28',
				'k297':'s28',
				'k298':'s28',
				'k299':'s28',
				'k300':'s28',
				'k301':'s28',
				'k302':'s28',
				'k303':'s28',
				'k304':'s28',
				'k305':'s28',
				'k306':'s28',
				'k307':'s28',
				'k308':'s28',
				'k309':'s28',
				'k310':'s28',
				'k311':'s28',
				'k312':'s28',
				'k313':'s28',
				's31':'r3',
				'k316':'s31',
				'k317':'s31',
				'k318':'s31',
				'k319':'s31',
				'k320':'s31',
				'k321':'s31',
				's16':'r3',
				'k141':'s16',
				'k142':'s16',
				'k143':'s16',
				'k144':'s16',
				'k145':'s16',
				'k146':'s16',
				'k147':'s16',
				'k148':'s16',
				'k149':'s16',
				'k150':'s16',
				'k151':'s16',
				'k152':'s16',
				'k153':'s16',
				'k154':'s16',
				'k155':'s16',
				'k156':'s16',
				'k157':'s16',
				'k158':'s16',
				'k159':'s16',
				'k160':'s16',
				'k161':'s16',
				'k162':'s16',
				's17':'r3',
				'k163':'s17',
				'k164':'s17',
				'k165':'s17',
				'k166':'s17',
				'k167':'s17',
				'k168':'s17',
				'k169':'s17',
				'k170':'s17',
				'k171':'s17',
				'k172':'s17',
				'k173':'s17',
				'k174':'s17',
				'k175':'s17',
				'k176':'s17',
				'k177':'s17',
				'k178':'s17',
				'k179':'s17',
				'k180':'s17',
				'k181':'s17',
				'k182':'s17',
				'k183':'s17',
				'k184':'s17',
				's18':'r3',
				'k185':'s18',
				'k186':'s18',
				'k187':'s18',
				'k188':'s18',
				'k189':'s18',
				'k190':'s18',
				'k191':'s18',
				'k192':'s18',
				'k193':'s18',
				'k194':'s18',
				'k195':'s18',
				'k196':'s18',
				'k197':'s18',
				'k198':'s18',
				'k199':'s18',
				'k200':'s18',
				'k201':'s18',
				'k202':'s18',
				'k203':'s18',
				'k204':'s18',
				'k205':'s18',
				'k206':'s18',
				's19':'r3',
				'k207':'s19',
				'k208':'s19',
				'k209':'s19',
				'k210':'s19',
				'k211':'s19',
				'k212':'s19',
				'k213':'s19',
				'k214':'s19',
				'k215':'s19',
				'k216':'s19',
				'k217':'s19',
				'k218':'s19',
				'k219':'s19',
				'k220':'s19',
				'k221':'s19',
				'k222':'s19',
				'k223':'s19',
				'k224':'s19',
				'k225':'s19',
				'k226':'s19',
				'k227':'s19',
				'k228':'s19',
				's20':'r3',
				'k229':'s20',
				'k230':'s20',
				'k231':'s20',
				'k232':'s20',
				'k233':'s20',
				'k234':'s20',
				'k235':'s20',
				'k236':'s20',
				'k237':'s20',
				'k238':'s20',
				'k239':'s20',
				'k240':'s20',
				'k241':'s20',
				'k242':'s20',
				'k243':'s20',
				'k244':'s20',
				'k245':'s20',
				'k246':'s20',
				'k247':'s20',
				'k248':'s20',
				'k249':'s20',
				'k250':'s20',
				's21':'r3',
				'k251':'s21',
				'k252':'s21',
				'k253':'s21',
				'k254':'s21',
				'k255':'s21',
				'k256':'s21',
				'k257':'s21',
				'k258':'s21',
				'k259':'s21',
				'k260':'s21',
				'k261':'s21',
				'k262':'s21',
				'k263':'s21',
				'k264':'s21',
				'k265':'s21',
				'k266':'s21',
				'k267':'s21',
				'k268':'s21',
				'k269':'s21',
				'k270':'s21',
				'k271':'s21',
				'k272':'s21',
				's22':'r3',
				'k273':'s22',
				's23':'r3',
				'k274':'s23',
				's24':'r3',
				'k275':'s24',
				'k276':'s24',
				'k277':'s24',
				'k278':'s24',
				'k279':'s24',
				'k280':'s24',
				'k281':'s24',
				'k282':'s24',
				'k283':'s24',
				'k284':'s24',
				'k285':'s24',
				'k286':'s24',
				'k287':'s24',
				'k288':'s24',
				'k289':'s24',
				'k290':'s24',
				'k291':'s24',
				'k292':'s24',
				's25':'r3',
				'k293':'s25',
				's30':'r3',
				'k315':'s30',
				's32':'r3',
				'k322':'s32',
				's33':'r3',
				'k323':'s33',
				'k324':'s33',
				'k325':'s33',
				'k326':'s33',
				'k327':'s33',
				'k328':'s33',
				'k329':'s33',
				'k330':'s33',
				'k331':'s33',
				'k332':'s33',
				'k333':'s33',
				'k334':'s33',
				'k335':'s33',
				'k336':'s33',
				'k337':'s33',
				'k338':'s33',
				'k339':'s33',
				'k340':'s33',
				'k341':'s33',
				'k342':'s33',
				'k343':'s33',
				'k344':'s33',
				's34':'r3',
				'k345':'s34',
				'k346':'s34',
				'k347':'s34',
				'k348':'s34',
				'k349':'s34',
				'k350':'s34',
				'k351':'s34',
				'k352':'s34',
				'k353':'s34',
				'k354':'s34',
				'k355':'s34',
				'k356':'s34',
				'k357':'s34',
				'k358':'s34',
				'k359':'s34',
				'k360':'s34',
				'k361':'s34',
				'k362':'s34',
				'k363':'s34',
				'k364':'s34',
				'k365':'s34',
				'k366':'s34',
				's35':'r3',
				'k367':'s35',
				'k368':'s35',
				'k369':'s35',
				'k370':'s35',
				'k371':'s35',
				'k372':'s35',
				'k373':'s35',
				'k374':'s35',
				'k375':'s35',
				'k376':'s35',
				'k377':'s35',
				'k378':'s35',
				'k379':'s35',
				'k380':'s35',
				'k381':'s35',
				'k382':'s35',
				'k383':'s35',
				'k384':'s35',
				'k385':'s35',
				'k386':'s35',
				'k387':'s35',
				'k388':'s35',
				's36':'r3',
				'k389':'s36',
				'k390':'s36',
				'k391':'s36',
				'k392':'s36',
				'k393':'s36',
				'k394':'s36',
				'k395':'s36',
				'k396':'s36',
				'k397':'s36',
				'k398':'s36',
				'k399':'s36',
				'k400':'s36',
				'k401':'s36',
				'k402':'s36',
				'k403':'s36',
				'k404':'s36',
				'k405':'s36',
				'k406':'s36',
				'k407':'s36',
				'k408':'s36',
				'k409':'s36',
				'k410':'s36',
				's37':'r3',
				'k411':'s37',
				's38':'r3',
				'k412':'s38',
				'k413':'s38',
				'k414':'s38',
				'k415':'s38',
				'k416':'s38',
				'k417':'s38',
				'k418':'s38',
				'k419':'s38',
				'k420':'s38',
				'k421':'s38',
				'k422':'s38',
				'k423':'s38',
				'k424':'s38',
				'k425':'s38',
				'k426':'s38',
				'k427':'s38',
				'k428':'s38',
				'k429':'s38',
				's39':'r3',
				'k430':'s39',
				'k431':'s39',
				'k432':'s39',
				'k433':'s39',
				'k434':'s39',
				'k435':'s39',
				'k436':'s39',
				'k437':'s39',
				'k438':'s39',
				'k439':'s39',
				'k440':'s39',
				'k441':'s39',
				'k442':'s39',
				'k443':'s39',
				'k444':'s39',
				'k445':'s39',
				'k446':'s39',
				'k447':'s39',
				's40':'r3',
				'k448':'s40',
				'k449':'s40',
				'k450':'s40',
				'k451':'s40',
				'k452':'s40',
				'k453':'s40',
				'k454':'s40',
				'k455':'s40',
				'k456':'s40',
				'k457':'s40',
				'k458':'s40',
				'k459':'s40',
				'k460':'s40',
				'k461':'s40',
				'k462':'s40',
				'k463':'s40',
				'k464':'s40',
				'k465':'s40',
				'':null
			};
			var ExpandedIdList=",tC,";
			var SelectedId="tC";
			function SetExpandList()
			{
				NodeEdit.ExpandedIdList.value=ExpandedIdList;
				NodeEdit.SelectedId.value=SelectedId;
			}
			function onExpandNode(Id)
			{
				ExpandedIdList=ExpandedIdList+Id+",";
			}
			function onCollapseNode(Id)
			{
				const Del=","+Id+",";
				const Pos=ExpandedIdList.indexOf(Del);
				if(Pos>=0)
				{
					ExpandedIdList=ExpandedIdList.substring(0,Pos+1)+ExpandedIdList.substring(Pos+Del.length,ExpandedIdList.length);
				}
			}
			function TreeSelect(Id)
			{
				const OldSel=document.getElementById("TreeText"+SelectedId); // tu zwraca null
				if(OldSel)
				{
					OldSel.classList.add('tp');
					OldSel.classList.remove('tc');
				}
				SelectedId=Id;
				const NewSel=document.getElementById("TreeText"+SelectedId); // tu zwraca null
				if(NewSel)
				{
					NewSel.classList.add('tc');
					NewSel.classList.remove('tp');
				}
				return true;
			}
			function TreeExpand(Id)
			{
				const Icon=document.getElementById("TreeIcon"+Id);
				const Line=document.getElementById("TreeLine"+Id);
				const Sub=document.getElementById("TreeSub"+Id);
				if(Sub)
				{
					if(Sub.style.display=="none")
					{
						Sub.style.display="";
						if(Icon&&Icon.getAttribute('data-osrc')) Icon.src=Icon.getAttribute('data-osrc');
						if(Line&&Line.getAttribute('data-osrc')) Line.src=Line.getAttribute('data-osrc');
						onExpandNode(Id);
					}
					else
					{
						Sub.style.display="none";
						if(Icon&&Icon.getAttribute('data-csrc')) Icon.src=Icon.getAttribute('data-csrc');
						if(Line&&Line.getAttribute('data-csrc')) Line.src=Line.getAttribute('data-csrc');
						onCollapseNode(Id);
					}
				}
				return true;
			}
			function IsAncestor(Id,Parent)
			{
				const Up=Parents[Id];
				if(Up==null) return false;
				if(Up==Parent) return true;
				return IsAncestor(Up,Parent);
			}
			function TreeChecked(Parent)
			{
				const Checked=document.getElementById("TreeCheck"+Parent).checked;
				for(const Id of Object.keys(Parents))
				{
					if(IsAncestor(Id,Parent))
					{
						document.getElementById("TreeCheck"+Id).checked=Checked;
					}
				}
				return false;
			}
			function ConfirmRemove()
			{
				const Ret=confirm('Czy napewno skasowasować ten rekord?');
				if(Ret)
				{
					SetExpandList(NodeEdit);
					NodeEdit.Action.value='RemoveNode';
				}
				return Ret;
			}
			function InsertSibling()
			{
				SetExpandList(NodeEdit);
				NodeEdit.Action.value='InsertSibling';
				return true;
			}
			function InsertChild()
			{
				SetExpandList(NodeEdit);
				NodeEdit.Action.value='InsertChild';
				return true;
			}
		</script>
	</head>
	<body>
		<div width="100%" class="error"></div>
		<div width="100%" class="debug"></div>
		<div id="grid">
			<div>
				<div class="line">
					<span class="tp" onclick="TreeSelect('tC');">
						<img align="top" border="0" id="TreeIcontC" src="ic_open_book.gif" data-csrc="ic_close_book.gif" data-osrc="ic_open_book.gif" onclick="TreeExpand('tC');">
					</span>
					<span id="TreeTexttC" class="tc" onmouseover="this.id='hover';"; onmouseout="this.id='';"; onclick="TreeSelect('tC');">
						<input type="checkbox" id="TreeChecktC" onclick="TreeChecked('tC');" name="Check[]" value="tC">
						<strong>Wybierz komputery</strong>
					</span>
				</div>
				<div id="TreeSubtC" style="display">
					<div class="line">
						<img id="TreeLiner2" class="ti" onclick="TreeExpand('r2');" align="top" border="0" src="ic_nse_bp.gif" data-csrc="ic_nse_bp.gif" data-osrc="ic_nse_bm.gif">
						<span class="tp" onclick="TreeSelect('r2');">
							<img align="top" border="0" id="TreeIconr2" src="ic_close_book.gif" data-csrc="ic_close_book.gif" data-osrc="ic_open_book.gif" onclick="TreeExpand('r2');">
						</span>
						<span id="TreeTextr2" class="tp" onmouseover="this.id='hover';"; onmouseout="this.id='';"; onclick="TreeSelect('r2');">
							<input type="checkbox" id="TreeCheckr2" onclick="TreeChecked('r2');" name="Check[]" value="r2">
							<strong>subatom</strong>
						</span>
					</div>
					<div id="TreeSubr2" style="display:none">
						<div class="line">
							<img align="top" border="0" src="ic_ns.gif">
							<img id="TreeLines15" class="ti" onclick="TreeExpand('s15');" align="top" border="0" src="ic_nse_bp.gif" data-csrc="ic_nse_bp.gif" data-osrc="ic_nse_bm.gif">
							<span class="tp" onclick="TreeSelect('s15');">
								<img align="top" border="0" id="TreeIcons15" src="ic_close_book.gif" data-csrc="ic_close_book.gif" data-osrc="ic_open_book.gif" onclick="TreeExpand('s15');">
							</span>
							<span id="TreeTexts15" class="tp" onmouseover="this.id='hover';"; onmouseout="this.id='';"; onclick="TreeSelect('s15');">
								<input type="checkbox" id="TreeChecks15" onclick="TreeChecked('s15');" name="Check[]" value="s15">
								<strong>Kaula</strong>
							</span>
						</div>
						<div id="TreeSubs15" style="display:none">
							<div class="line">
								<img align="top" border="0" src="ic_ns.gif">
								<img align="top" border="0" src="ic_ns.gif">
								<img align="top" border="0" src="ic_ne.gif">
								<span class="tp" onclick="TreeSelect('k140');">
									<img align="top" border="0" id="TreeIconk140" src="ic_close_book.gif" data-csrc="ic_close_book.gif" data-osrc="ic_open_book.gif" onclick="TreeExpand('k140');">
								</span>
								<span id="TreeTextk140" class="tp" onmouseover="this.id='hover';"; onmouseout="this.id='';"; onclick="TreeSelect('k140');">
									<input type="checkbox" id="TreeCheckk140" onclick="TreeChecked('k140');" name="Check[]" value="k140">
									<strong>staff38</strong>
								</span>
							</div>
						</div>
						<div class="line">
							<img align="top" border="0" src="ic_ns.gif">
							<img id="TreeLines14" class="ti" onclick="TreeExpand('s14');" align="top" border="0" src="ic_ne_bp.gif" data-csrc="ic_ne_bp.gif" data-osrc="ic_ne_bm.gif">
							<span class="tp" onclick="TreeSelect('s14');">
								<img align="top" border="0" id="TreeIcons14" src="ic_close_book.gif" data-csrc="ic_close_book.gif" data-osrc="ic_open_book.gif" onclick="TreeExpand('s14');">
							</span>
							<span id="TreeTexts14" class="tp" onmouseover="this.id='hover';"; onmouseout="this.id='';"; onclick="TreeSelect('s14');">
								<input type="checkbox" id="TreeChecks14" onclick="TreeChecked('s14');" name="Check[]" value="s14">
								<strong>K123</strong>
							</span>
						</div>
						<div id="TreeSubs14" style="display:none">
							<div class="line">
								<img align="top" border="0" src="ic_ns.gif">
								<img align="top" border="0" src="ic_.gif">
								<img align="top" border="0" src="ic_ne.gif">
								<span class="tp" onclick="TreeSelect('k139');">
									<img align="top" border="0" id="TreeIconk139" src="ic_close_book.gif" data-csrc="ic_close_book.gif" data-osrc="ic_open_book.gif" onclick="TreeExpand('k139');">
								</span>
								<span id="TreeTextk139" class="tp" onmouseover="this.id='hover';"; onmouseout="this.id='';"; onclick="TreeSelect('k139');">
									<input type="checkbox" id="TreeCheckk139" onclick="TreeChecked('k139');" name="Check[]" value="k139">
									<strong>staff43</strong>
								</span>
							</div>
						</div>
					</div>
					<div class="line">
						<img id="TreeLiner1" class="ti" onclick="TreeExpand('r1');" align="top" border="0" src="ic_nse_bp.gif" data-csrc="ic_nse_bp.gif" data-osrc="ic_nse_bm.gif">
						<span class="tp" onclick="TreeSelect('r1');">
							<img align="top" border="0" id="TreeIconr1" src="ic_close_book.gif" data-csrc="ic_close_book.gif" data-osrc="ic_open_book.gif" onclick="TreeExpand('r1');">
						</span>
						<span id="TreeTextr1" class="tp" onmouseover="this.id='hover';"; onmouseout="this.id='';"; onclick="TreeSelect('r1');">
							<input type="checkbox" id="TreeCheckr1" onclick="TreeChecked('r1');" name="Check[]" value="r1">
							<strong>kwark</strong>
						</span>
					</div>
					<div id="TreeSubr1" style="display:none">
						<div class="line">
							<img align="top" border="0" src="ic_ns.gif">
							<img id="TreeLines1" class="ti" onclick="TreeExpand('s1');" align="top" border="0" src="ic_nse_bp.gif" data-csrc="ic_nse_bp.gif" data-osrc="ic_nse_bm.gif">
							<span class="tp" onclick="TreeSelect('s1');">
								<img align="top" border="0" id="TreeIcons1" src="ic_close_book.gif" data-csrc="ic_close_book.gif" data-osrc="ic_open_book.gif" onclick="TreeExpand('s1');">
							</span>
							<span id="TreeTexts1" class="tp" onmouseover="this.id='hover';"; onmouseout="this.id='';"; onclick="TreeSelect('s1');">
								<input type="checkbox" id="TreeChecks1" onclick="TreeChecked('s1');" name="Check[]" value="s1">
								<strong>G003</strong>
							</span>
						</div>
						<div id="TreeSubs1" style="display:none">
							<div class="line">
								<img align="top" border="0" src="ic_ns.gif">
								<img align="top" border="0" src="ic_ns.gif">
								<img align="top" border="0" src="ic_ne.gif">
								<span class="tp" onclick="TreeSelect('k1');">
									<img align="top" border="0" id="TreeIconk1" src="ic_close_book.gif" data-csrc="ic_close_book.gif" data-osrc="ic_open_book.gif" onclick="TreeExpand('k1');">
								</span>
								<span id="TreeTextk1" class="tp" onmouseover="this.id='hover';"; onmouseout="this.id='';"; onclick="TreeSelect('k1');">
									<input type="checkbox" id="TreeCheckk1" onclick="TreeChecked('k1');" name="Check[]" value="k1">
									<strong>staff63</strong>
								</span>
							</div>
						</div>
						<div class="line">
							<img align="top" border="0" src="ic_ns.gif">
							<img id="TreeLines2" class="ti" onclick="TreeExpand('s2');" align="top" border="0" src="ic_nse_bp.gif" data-csrc="ic_nse_bp.gif" data-osrc="ic_nse_bm.gif">
							<span class="tp" onclick="TreeSelect('s2');">
								<img align="top" border="0" id="TreeIcons2" src="ic_close_book.gif" data-csrc="ic_close_book.gif" data-osrc="ic_open_book.gif" onclick="TreeExpand('s2');">
							</span>
							<span id="TreeTexts2" class="tp" onmouseover="this.id='hover';"; onmouseout="this.id='';"; onclick="TreeSelect('s2');">
								<input type="checkbox" id="TreeChecks2" onclick="TreeChecked('s2');" name="Check[]" value="s2">
								<strong>G004</strong>
							</span>
						</div>
						<div id="TreeSubs2" style="display:none">
							<div class="line">
								<img align="top" border="0" src="ic_ns.gif">
								<img align="top" border="0" src="ic_ns.gif">
								<img align="top" border="0" src="ic_nse.gif">
								<span class="tp" onclick="TreeSelect('k2');">
									<img align="top" border="0" id="TreeIconk2" src="ic_close_book.gif" data-csrc="ic_close_book.gif" data-osrc="ic_open_book.gif" onclick="TreeExpand('k2');">
								</span>
								<span id="TreeTextk2" class="tp" onmouseover="this.id='hover';"; onmouseout="this.id='';"; onclick="TreeSelect('k2');">
									<input type="checkbox" id="TreeCheckk2" onclick="TreeChecked('k2');" name="Check[]" value="k2">
									<strong>sz177</strong>
								</span>
							</div>
							<div class="line">
								<img align="top" border="0" src="ic_ns.gif">
								<img align="top" border="0" src="ic_ns.gif">
								<img align="top" border="0" src="ic_nse.gif">
								<span class="tp" onclick="TreeSelect('k3');">
									<img align="top" border="0" id="TreeIconk3" src="ic_close_book.gif" data-csrc="ic_close_book.gif" data-osrc="ic_open_book.gif" onclick="TreeExpand('k3');">
								</span>
								<span id="TreeTextk3" class="tp" onmouseover="this.id='hover';"; onmouseout="this.id='';"; onclick="TreeSelect('k3');">
									<input type="checkbox" id="TreeCheckk3" onclick="TreeChecked('k3');" name="Check[]" value="k3">
									<strong>sz178</strong>
								</span>
							</div>
							<div class="line">
								<img align="top" border="0" src="ic_ns.gif">
								<img align="top" border="0" src="ic_ns.gif">
								<img align="top" border="0" src="ic_nse.gif">
								<span class="tp" onclick="TreeSelect('k4');">
									<img align="top" border="0" id="TreeIconk4" src="ic_close_book.gif" data-csrc="ic_close_book.gif" data-osrc="ic_open_book.gif" onclick="TreeExpand('k4');">
								</span>
								<span id="TreeTextk4" class="tp" onmouseover="this.id='hover';"; onmouseout="this.id='';"; onclick="TreeSelect('k4');">
									<input type="checkbox" id="TreeCheckk4" onclick="TreeChecked('k4');" name="Check[]" value="k4">
									<strong>sz179</strong>
								</span>
							</div>
							<div class="line">
								<img align="top" border="0" src="ic_ns.gif">
								<img align="top" border="0" src="ic_ns.gif">
								<img align="top" border="0" src="ic_ne.gif">
								<span class="tp" onclick="TreeSelect('k19');">
									<img align="top" border="0" id="TreeIconk19" src="ic_close_book.gif" data-csrc="ic_close_book.gif" data-osrc="ic_open_book.gif" onclick="TreeExpand('k19');">
								</span>
								<span id="TreeTextk19" class="tp" onmouseover="this.id='hover';"; onmouseout="this.id='';"; onclick="TreeSelect('k19');">
									<input type="checkbox" id="TreeCheckk19" onclick="TreeChecked('k19');" name="Check[]" value="k19">
									<strong>sz194</strong>
								</span>
							</div>
						</div>
						<div class="line">
							<img align="top" border="0" src="ic_ns.gif">
							<img id="TreeLines3" class="ti" onclick="TreeExpand('s3');" align="top" border="0" src="ic_nse_bp.gif" data-csrc="ic_nse_bp.gif" data-osrc="ic_nse_bm.gif">
							<span class="tp" onclick="TreeSelect('s3');">
								<img align="top" border="0" id="TreeIcons3" src="ic_close_book.gif" data-csrc="ic_close_book.gif" data-osrc="ic_open_book.gif" onclick="TreeExpand('s3');">
							</span>
							<span id="TreeTexts3" class="tp" onmouseover="this.id='hover';"; onmouseout="this.id='';"; onclick="TreeSelect('s3');">
								<input type="checkbox" id="TreeChecks3" onclick="TreeChecked('s3');" name="Check[]" value="s3">
								<strong>G005</strong>
							</span>
						</div>
						<div id="TreeSubs3" style="display:none">
							<div class="line">
								<img align="top" border="0" src="ic_ns.gif">
								<img align="top" border="0" src="ic_ns.gif">
								<img align="top" border="0" src="ic_nse.gif">
								<span class="tp" onclick="TreeSelect('k20');">
									<img align="top" border="0" id="TreeIconk20" src="ic_close_book.gif" data-csrc="ic_close_book.gif" data-osrc="ic_open_book.gif" onclick="TreeExpand('k20');">
								</span>
								<span id="TreeTextk20" class="tp" onmouseover="this.id='hover';"; onmouseout="this.id='';"; onclick="TreeSelect('k20');">
									<input type="checkbox" id="TreeCheckk20" onclick="TreeChecked('k20');" name="Check[]" value="k20">
									<strong>staff62</strong>
								</span>
							</div>
							<div class="line">
								<img align="top" border="0" src="ic_ns.gif">
								<img align="top" border="0" src="ic_ns.gif">
								<img align="top" border="0" src="ic_nse.gif">
								<span class="tp" onclick="TreeSelect('k21');">
									<img align="top" border="0" id="TreeIconk21" src="ic_close_book.gif" data-csrc="ic_close_book.gif" data-osrc="ic_open_book.gif" onclick="TreeExpand('k21');">
								</span>
								<span id="TreeTextk21" class="tp" onmouseover="this.id='hover';"; onmouseout="this.id='';"; onclick="TreeSelect('k21');">
									<input type="checkbox" id="TreeCheckk21" onclick="TreeChecked('k21');" name="Check[]" value="k21">
									<strong>staff82</strong>
								</span>
							</div>
							<div class="line">
								<img align="top" border="0" src="ic_ns.gif">
								<img align="top" border="0" src="ic_ns.gif">
								<img align="top" border="0" src="ic_ne.gif">
								<span class="tp" onclick="TreeSelect('k22');">
									<img align="top" border="0" id="TreeIconk22" src="ic_close_book.gif" data-csrc="ic_close_book.gif" data-osrc="ic_open_book.gif" onclick="TreeExpand('k22');">
								</span>
								<span id="TreeTextk22" class="tp" onmouseover="this.id='hover';"; onmouseout="this.id='';"; onclick="TreeSelect('k22');">
									<input type="checkbox" id="TreeCheckk22" onclick="TreeChecked('k22');" name="Check[]" value="k22">
									<strong>staff83</strong>
								</span>
							</div>
						</div>
						<div class="line">
							<img align="top" border="0" src="ic_ns.gif">
							<img id="TreeLines4" class="ti" onclick="TreeExpand('s4');" align="top" border="0" src="ic_nse_bp.gif" data-csrc="ic_nse_bp.gif" data-osrc="ic_nse_bm.gif">
							<span class="tp" onclick="TreeSelect('s4');">
								<img align="top" border="0" id="TreeIcons4" src="ic_close_book.gif" data-csrc="ic_close_book.gif" data-osrc="ic_open_book.gif" onclick="TreeExpand('s4');">
							</span>
							<span id="TreeTexts4" class="tp" onmouseover="this.id='hover';"; onmouseout="this.id='';"; onclick="TreeSelect('s4');">
								<input type="checkbox" id="TreeChecks4" onclick="TreeChecked('s4');" name="Check[]" value="s4">
								<strong>G006</strong>
							</span>
						</div>
						<div id="TreeSubs4" style="display:none">
							<div class="line">
								<img align="top" border="0" src="ic_ns.gif">
								<img align="top" border="0" src="ic_ns.gif">
								<img align="top" border="0" src="ic_ne.gif">
								<span class="tp" onclick="TreeSelect('k23');">
									<img align="top" border="0" id="TreeIconk23" src="ic_close_book.gif" data-csrc="ic_close_book.gif" data-osrc="ic_open_book.gif" onclick="TreeExpand('k23');">
								</span>
								<span id="TreeTextk23" class="tp" onmouseover="this.id='hover';"; onmouseout="this.id='';"; onclick="TreeSelect('k23');">
									<input type="checkbox" id="TreeCheckk23" onclick="TreeChecked('k23');" name="Check[]" value="k23">
									<strong>staff11</strong>
								</span>
							</div>
						</div>
						<div class="line">
							<img align="top" border="0" src="ic_ns.gif">
							<img id="TreeLines5" class="ti" onclick="TreeExpand('s5');" align="top" border="0" src="ic_nse_bp.gif" data-csrc="ic_nse_bp.gif" data-osrc="ic_nse_bm.gif">
							<span class="tp" onclick="TreeSelect('s5');">
								<img align="top" border="0" id="TreeIcons5" src="ic_close_book.gif" data-csrc="ic_close_book.gif" data-osrc="ic_open_book.gif" onclick="TreeExpand('s5');">
							</span>
							<span id="TreeTexts5" class="tp" onmouseover="this.id='hover';"; onmouseout="this.id='';"; onclick="TreeSelect('s5');">
								<input type="checkbox" id="TreeChecks5" onclick="TreeChecked('s5');" name="Check[]" value="s5">
								<strong>G100</strong>
							</span>
						</div>
						<div id="TreeSubs5" style="display:none">
							<div class="line">
								<img align="top" border="0" src="ic_ns.gif">
								<img align="top" border="0" src="ic_ns.gif">
								<img align="top" border="0" src="ic_ne.gif">
								<span class="tp" onclick="TreeSelect('k24');">
									<img align="top" border="0" id="TreeIconk24" src="ic_close_book.gif" data-csrc="ic_close_book.gif" data-osrc="ic_open_book.gif" onclick="TreeExpand('k24');">
								</span>
								<span id="TreeTextk24" class="tp" onmouseover="this.id='hover';"; onmouseout="this.id='';"; onclick="TreeSelect('k24');">
									<input type="checkbox" id="TreeCheckk24" onclick="TreeChecked('k24');" name="Check[]" value="k24">
									<strong>staff58</strong>
								</span>
							</div>
						</div>
						<div class="line">
							<img align="top" border="0" src="ic_ns.gif">
							<img id="TreeLines6" class="ti" onclick="TreeExpand('s6');" align="top" border="0" src="ic_nse_bp.gif" data-csrc="ic_nse_bp.gif" data-osrc="ic_nse_bm.gif">
							<span class="tp" onclick="TreeSelect('s6');">
								<img align="top" border="0" id="TreeIcons6" src="ic_close_book.gif" data-csrc="ic_close_book.gif" data-osrc="ic_open_book.gif" onclick="TreeExpand('s6');">
							</span>
							<span id="TreeTexts6" class="tp" onmouseover="this.id='hover';"; onmouseout="this.id='';"; onclick="TreeSelect('s6');">
								<input type="checkbox" id="TreeChecks6" onclick="TreeChecked('s6');" name="Check[]" value="s6">
								<strong>G224</strong>
							</span>
						</div>
						<div id="TreeSubs6" style="display:none">
							<div class="line">
								<img align="top" border="0" src="ic_ns.gif">
								<img align="top" border="0" src="ic_ns.gif">
								<img align="top" border="0" src="ic_ne.gif">
								<span class="tp" onclick="TreeSelect('k25');">
									<img align="top" border="0" id="TreeIconk25" src="ic_close_book.gif" data-csrc="ic_close_book.gif" data-osrc="ic_open_book.gif" onclick="TreeExpand('k25');">
								</span>
								<span id="TreeTextk25" class="tp" onmouseover="this.id='hover';"; onmouseout="this.id='';"; onclick="TreeSelect('k25');">
									<input type="checkbox" id="TreeCheckk25" onclick="TreeChecked('k25');" name="Check[]" value="k25">
									<strong>staff44</strong>
								</span>
							</div>
						</div>
						<div class="line">
							<img align="top" border="0" src="ic_ns.gif">
							<img id="TreeLines7" class="ti" onclick="TreeExpand('s7');" align="top" border="0" src="ic_nse_bp.gif" data-csrc="ic_nse_bp.gif" data-osrc="ic_nse_bm.gif">
							<span class="tp" onclick="TreeSelect('s7');">
								<img align="top" border="0" id="TreeIcons7" src="ic_close_book.gif" data-csrc="ic_close_book.gif" data-osrc="ic_open_book.gif" onclick="TreeExpand('s7');">
							</span>
							<span id="TreeTexts7" class="tp" onmouseover="this.id='hover';"; onmouseout="this.id='';"; onclick="TreeSelect('s7');">
								<input type="checkbox" id="TreeChecks7" onclick="TreeChecked('s7');" name="Check[]" value="s7">
								<strong>G225</strong>
							</span>
						</div>
						<div id="TreeSubs7" style="display:none">
							<div class="line">
								<img align="top" border="0" src="ic_ns.gif">
								<img align="top" border="0" src="ic_ns.gif">
								<img align="top" border="0" src="ic_ne.gif">
								<span class="tp" onclick="TreeSelect('k26');">
									<img align="top" border="0" id="TreeIconk26" src="ic_close_book.gif" data-csrc="ic_close_book.gif" data-osrc="ic_open_book.gif" onclick="TreeExpand('k26');">
								</span>
								<span id="TreeTextk26" class="tp" onmouseover="this.id='hover';"; onmouseout="this.id='';"; onclick="TreeSelect('k26');">
									<input type="checkbox" id="TreeCheckk26" onclick="TreeChecked('k26');" name="Check[]" value="k26">
									<strong>staff68</strong>
								</span>
							</div>
						</div>
						<div class="line">
							<img align="top" border="0" src="ic_ns.gif">
							<img id="TreeLines13" class="ti" onclick="TreeExpand('s13');" align="top" border="0" src="ic_ne_bp.gif" data-csrc="ic_ne_bp.gif" data-osrc="ic_ne_bm.gif">
							<span class="tp" onclick="TreeSelect('s13');">
								<img align="top" border="0" id="TreeIcons13" src="ic_close_book.gif" data-csrc="ic_close_book.gif" data-osrc="ic_open_book.gif" onclick="TreeExpand('s13');">
							</span>
							<span id="TreeTexts13" class="tp" onmouseover="this.id='hover';"; onmouseout="this.id='';"; onclick="TreeSelect('s13');">
								<input type="checkbox" id="TreeChecks13" onclick="TreeChecked('s13');" name="Check[]" value="s13">
								<strong>G235</strong>
							</span>
						</div>
						<div id="TreeSubs13" style="display:none">
							<div class="line">
								<img align="top" border="0" src="ic_ns.gif">
								<img align="top" border="0" src="ic_.gif">
								<img align="top" border="0" src="ic_nse.gif">
								<span class="tp" onclick="TreeSelect('k121');">
									<img align="top" border="0" id="TreeIconk121" src="ic_close_book.gif" data-csrc="ic_close_book.gif" data-osrc="ic_open_book.gif" onclick="TreeExpand('k121');">
								</span>
								<span id="TreeTextk121" class="tp" onmouseover="this.id='hover';"; onmouseout="this.id='';"; onclick="TreeSelect('k121');">
									<input type="checkbox" id="TreeCheckk121" onclick="TreeChecked('k121');" name="Check[]" value="k121">
									<strong>sz347</strong>
								</span>
							</div>
							<div class="line">
								<img align="top" border="0" src="ic_ns.gif">
								<img align="top" border="0" src="ic_.gif">
								<img align="top" border="0" src="ic_nse.gif">
								<span class="tp" onclick="TreeSelect('k122');">
									<img align="top" border="0" id="TreeIconk122" src="ic_close_book.gif" data-csrc="ic_close_book.gif" data-osrc="ic_open_book.gif" onclick="TreeExpand('k122');">
								</span>
								<span id="TreeTextk122" class="tp" onmouseover="this.id='hover';"; onmouseout="this.id='';"; onclick="TreeSelect('k122');">
									<input type="checkbox" id="TreeCheckk122" onclick="TreeChecked('k122');" name="Check[]" value="k122">
									<strong>sz348</strong>
								</span>
							</div>
							<div class="line">
								<img align="top" border="0" src="ic_ns.gif">
								<img align="top" border="0" src="ic_.gif">
								<img align="top" border="0" src="ic_ne.gif">
								<span class="tp" onclick="TreeSelect('k138');">
									<img align="top" border="0" id="TreeIconk138" src="ic_close_book.gif" data-csrc="ic_close_book.gif" data-osrc="ic_open_book.gif" onclick="TreeExpand('k138');">
								</span>
								<span id="TreeTextk138" class="tp" onmouseover="this.id='hover';"; onmouseout="this.id='';"; onclick="TreeSelect('k138');">
									<input type="checkbox" id="TreeCheckk138" onclick="TreeChecked('k138');" name="Check[]" value="k138">
									<strong>sz467</strong>
								</span>
							</div>
						</div>
					</div>
					<div class="line">
						<img id="TreeLiner3" class="ti" onclick="TreeExpand('r3');" align="top" border="0" src="ic_ne_bp.gif" data-csrc="ic_ne_bp.gif" data-osrc="ic_ne_bm.gif">
						<span class="tp" onclick="TreeSelect('r3');">
							<img align="top" border="0" id="TreeIconr3" src="ic_close_book.gif" data-csrc="ic_close_book.gif" data-osrc="ic_open_book.gif" onclick="TreeExpand('r3');">
						</span>
						<span id="TreeTextr3" class="tp" onmouseover="this.id='hover';"; onmouseout="this.id='';"; onclick="TreeSelect('r3');">
							<input type="checkbox" id="TreeCheckr3" onclick="TreeChecked('r3');" name="Check[]" value="r3">
							<strong>wibranium</strong>
						</span>
					</div>
					<div id="TreeSubr3" style="display:none">
						<div class="line">
							<img align="top" border="0" src="ic_.gif">
							<img id="TreeLines29" class="ti" onclick="TreeExpand('s29');" align="top" border="0" src="ic_nse_bp.gif" data-csrc="ic_nse_bp.gif" data-osrc="ic_nse_bm.gif">
							<span class="tp" onclick="TreeSelect('s29');">
								<img align="top" border="0" id="TreeIcons29" src="ic_close_book.gif" data-csrc="ic_close_book.gif" data-osrc="ic_open_book.gif" onclick="TreeExpand('s29');">
							</span>
							<span id="TreeTexts29" class="tp" onmouseover="this.id='hover';"; onmouseout="this.id='';"; onclick="TreeSelect('s29');">
								<input type="checkbox" id="TreeChecks29" onclick="TreeChecked('s29');" name="Check[]" value="s29">
								<strong>N2</strong>
							</span>
						</div>
						<div id="TreeSubs29" style="display:none">
							<div class="line">
								<img align="top" border="0" src="ic_.gif">
								<img align="top" border="0" src="ic_ns.gif">
								<img align="top" border="0" src="ic_ne.gif">
								<span class="tp" onclick="TreeSelect('k314');">
									<img align="top" border="0" id="TreeIconk314" src="ic_close_book.gif" data-csrc="ic_close_book.gif" data-osrc="ic_open_book.gif" onclick="TreeExpand('k314');">
								</span>
								<span id="TreeTextk314" class="tp" onmouseover="this.id='hover';"; onmouseout="this.id='';"; onclick="TreeSelect('k314');">
									<input type="checkbox" id="TreeCheckk314" onclick="TreeChecked('k314');" name="Check[]" value="k314">
									<strong>staff66</strong>
								</span>
							</div>
						</div>
						<div class="line">
							<img align="top" border="0" src="ic_.gif">
							<img id="TreeLines41" class="ti" onclick="TreeExpand('s41');" align="top" border="0" src="ic_nse_bp.gif" data-csrc="ic_nse_bp.gif" data-osrc="ic_nse_bm.gif">
							<span class="tp" onclick="TreeSelect('s41');">
								<img align="top" border="0" id="TreeIcons41" src="ic_close_book.gif" data-csrc="ic_close_book.gif" data-osrc="ic_open_book.gif" onclick="TreeExpand('s41');">
							</span>
							<span id="TreeTexts41" class="tp" onmouseover="this.id='hover';"; onmouseout="this.id='';"; onclick="TreeSelect('s41');">
								<input type="checkbox" id="TreeChecks41" onclick="TreeChecked('s41');" name="Check[]" value="s41">
								<strong>N5</strong>
							</span>
						</div>
						<div id="TreeSubs41" style="display:none">
							<div class="line">
								<img align="top" border="0" src="ic_.gif">
								<img align="top" border="0" src="ic_ns.gif">
								<img align="top" border="0" src="ic_nse.gif">
								<span class="tp" onclick="TreeSelect('k466');">
									<img align="top" border="0" id="TreeIconk466" src="ic_close_book.gif" data-csrc="ic_close_book.gif" data-osrc="ic_open_book.gif" onclick="TreeExpand('k466');">
								</span>
								<span id="TreeTextk466" class="tp" onmouseover="this.id='hover';"; onmouseout="this.id='';"; onclick="TreeSelect('k466');">
									<input type="checkbox" id="TreeCheckk466" onclick="TreeChecked('k466');" name="Check[]" value="k466">
									<strong>sz154</strong>
								</span>
							</div>
							<div class="line">
								<img align="top" border="0" src="ic_.gif">
								<img align="top" border="0" src="ic_ns.gif">
								<img align="top" border="0" src="ic_nse.gif">
								<span class="tp" onclick="TreeSelect('k467');">
									<img align="top" border="0" id="TreeIconk467" src="ic_close_book.gif" data-csrc="ic_close_book.gif" data-osrc="ic_open_book.gif" onclick="TreeExpand('k467');">
								</span>
								<span id="TreeTextk467" class="tp" onmouseover="this.id='hover';"; onmouseout="this.id='';"; onclick="TreeSelect('k467');">
									<input type="checkbox" id="TreeCheckk467" onclick="TreeChecked('k467');" name="Check[]" value="k467">
									<strong>sz155</strong>
								</span>
							</div>
							<div class="line">
								<img align="top" border="0" src="ic_.gif">
								<img align="top" border="0" src="ic_ns.gif">
								<img align="top" border="0" src="ic_nse.gif">
								<span class="tp" onclick="TreeSelect('k468');">
									<img align="top" border="0" id="TreeIconk468" src="ic_close_book.gif" data-csrc="ic_close_book.gif" data-osrc="ic_open_book.gif" onclick="TreeExpand('k468');">
								</span>
								<span id="TreeTextk468" class="tp" onmouseover="this.id='hover';"; onmouseout="this.id='';"; onclick="TreeSelect('k468');">
									<input type="checkbox" id="TreeCheckk468" onclick="TreeChecked('k468');" name="Check[]" value="k468">
									<strong>sz156</strong>
								</span>
							</div>
							<div class="line">
								<img align="top" border="0" src="ic_.gif">
								<img align="top" border="0" src="ic_ns.gif">
								<img align="top" border="0" src="ic_ne.gif">
								<span class="tp" onclick="TreeSelect('k487');">
									<img align="top" border="0" id="TreeIconk487" src="ic_close_book.gif" data-csrc="ic_close_book.gif" data-osrc="ic_open_book.gif" onclick="TreeExpand('k487');">
								</span>
								<span id="TreeTextk487" class="tp" onmouseover="this.id='hover';"; onmouseout="this.id='';"; onclick="TreeSelect('k487');">
									<input type="checkbox" id="TreeCheckk487" onclick="TreeChecked('k487');" name="Check[]" value="k487">
									<strong>sz175</strong>
								</span>
							</div>
						</div>
						<div class="line">
							<img align="top" border="0" src="ic_.gif">
							<img id="TreeLines40" class="ti" onclick="TreeExpand('s40');" align="top" border="0" src="ic_ne_bp.gif" data-csrc="ic_ne_bp.gif" data-osrc="ic_ne_bm.gif">
							<span class="tp" onclick="TreeSelect('s40');">
								<img align="top" border="0" id="TreeIcons40" src="ic_close_book.gif" data-csrc="ic_close_book.gif" data-osrc="ic_open_book.gif" onclick="TreeExpand('s40');">
							</span>
							<span id="TreeTexts40" class="tp" onmouseover="this.id='hover';"; onmouseout="this.id='';"; onclick="TreeSelect('s40');">
								<input type="checkbox" id="TreeChecks40" onclick="TreeChecked('s40');" name="Check[]" value="s40">
								<strong>N439</strong>
							</span>
						</div>
						<div id="TreeSubs40" style="display:none">
							<div class="line">
								<img align="top" border="0" src="ic_.gif">
								<img align="top" border="0" src="ic_.gif">
								<img align="top" border="0" src="ic_nse.gif">
								<span class="tp" onclick="TreeSelect('k448');">
									<img align="top" border="0" id="TreeIconk448" src="ic_close_book.gif" data-csrc="ic_close_book.gif" data-osrc="ic_open_book.gif" onclick="TreeExpand('k448');">
								</span>
								<span id="TreeTextk448" class="tp" onmouseover="this.id='hover';"; onmouseout="this.id='';"; onclick="TreeSelect('k448');">
									<input type="checkbox" id="TreeCheckk448" onclick="TreeChecked('k448');" name="Check[]" value="k448">
									<strong>sz242</strong>
								</span>
							</div>
							<div class="line">
								<img align="top" border="0" src="ic_.gif">
								<img align="top" border="0" src="ic_.gif">
								<img align="top" border="0" src="ic_nse.gif">
								<span class="tp" onclick="TreeSelect('k449');">
									<img align="top" border="0" id="TreeIconk449" src="ic_close_book.gif" data-csrc="ic_close_book.gif" data-osrc="ic_open_book.gif" onclick="TreeExpand('k449');">
								</span>
								<span id="TreeTextk449" class="tp" onmouseover="this.id='hover';"; onmouseout="this.id='';"; onclick="TreeSelect('k449');">
									<input type="checkbox" id="TreeCheckk449" onclick="TreeChecked('k449');" name="Check[]" value="k449">
									<strong>sz243</strong>
								</span>
							</div>
							<div class="line">
								<img align="top" border="0" src="ic_.gif">
								<img align="top" border="0" src="ic_.gif">
								<img align="top" border="0" src="ic_nse.gif">
								<span class="tp" onclick="TreeSelect('k450');">
									<img align="top" border="0" id="TreeIconk450" src="ic_close_book.gif" data-csrc="ic_close_book.gif" data-osrc="ic_open_book.gif" onclick="TreeExpand('k450');">
								</span>
								<span id="TreeTextk450" class="tp" onmouseover="this.id='hover';"; onmouseout="this.id='';"; onclick="TreeSelect('k450');">
									<input type="checkbox" id="TreeCheckk450" onclick="TreeChecked('k450');" name="Check[]" value="k450">
									<strong>sz244</strong>
								</span>
							</div>
							<div class="line">
								<img align="top" border="0" src="ic_.gif">
								<img align="top" border="0" src="ic_.gif">
								<img align="top" border="0" src="ic_ne.gif">
								<span class="tp" onclick="TreeSelect('k465');">
									<img align="top" border="0" id="TreeIconk465" src="ic_close_book.gif" data-csrc="ic_close_book.gif" data-osrc="ic_open_book.gif" onclick="TreeExpand('k465');">
								</span>
								<span id="TreeTextk465" class="tp" onmouseover="this.id='hover';"; onmouseout="this.id='';"; onclick="TreeSelect('k465');">
									<input type="checkbox" id="TreeCheckk465" onclick="TreeChecked('k465');" name="Check[]" value="k465">
									<strong>sz259</strong>
								</span>
							</div>
						</div>
					</div>
				</div>
			</div>
			<div>
				<div class="column">Wybierz akcje</div>

				</div>
			<div>
				<div class="column">Podaj dane</div>

			</div>
		</div>
	</body>
</html>
1

Czym jest SelectedId w momencie wywoływania getElementById?
Z jakim dokładnie argumentem jest wywołana ta funkcja?

Swoją drogą strasznie dużo duplikacji masz w kodzie, wyglada to jak wygenerowane przez jakiś automat na podstawie szablonu. Czy tak było?

2

No nie za bardzo istnieje takie ID bo je zmieniasz w momencie najechania myszką:

onmouseover="this.id='hover';"; onmouseout="this.id='';";`

chciałeś pewnie dodać klasę. Ale w ogóle nie musisz nic takiego robić bo istnieje już pseudo-klasa :hover

2

Poza tym zmienna Parents jest zupełnie niepotrzebna. W zasadzie reimplementujesz na nowo DOM w tym momencie, coś co w JS możesz mieć z automatu.
https://developer.mozilla.org/en-US/docs/Web/API/Node/parentNode

wtedy funkcja IsAncestor wyglądałaby tak:

function IsAncestor(Element,Parent)
{
  const Up=Element.parentNode;
  if(Up==null) return false;
  if(Up==Parent) return true;
  return IsAncestor(Up,Parent);
}

Swoją drogą straszny styl pisania kodu, rodem z jakiegoś C# (a nawet gorzej). Po javascriptowemu zmienne i funkcje zaczynałyby się z małej litery (tzn. camelCase), początkowa klamerka w tej samej linii, znak = byłby otoczony spacjami, po przecinku natomiast spacja itp.

0
LukeJL napisał(a):

Czym jest SelectedId w momencie wywoływania getElementById?

554: var SelectedId="tC";
581: SelectedId=Id;
Musi być ostatnio kliknięty

LukeJL napisał(a):

Z jakim dokładnie argumentem jest wywołana ta funkcja?

667: onclick="TreeSelect('r2');
Klikasz na dowolny tekst węzła drzewka.

LukeJL napisał(a):

Swoją drogą strasznie dużo duplikacji masz w kodzie, wyglada to jak wygenerowane przez jakiś automat na podstawie szablonu. Czy tak było?

Wygenerowano przez PHP

1

Aż przekleiłem to do jsbina i faktycznie element jest nullem, ale po wywaleniu wszystkich onmouseover="this.id='hover';"; onmouseout="this.id='';"; działa jak należy.

Nie ma tu żadnej magii - jeśli element o danym id istnieje to go znajdzie, nie ma tu co nie działać. Na pewno odświeżyłeś stronę?

No i tak jak wyżej pisano - strasznie dużo niepotrzebnego kodu, nie musisz trzymać idków, możesz trzymać referencję do ostatnio klikniętego elementu (jeśli to do czegoś potrzebne, bo w sumie to nie wiem po co w prostym drzewku takie kombinacje)

0
obscurity napisał(a):

Aż przekleiłem to do jsbina i faktycznie element jest nullem, ale po wywaleniu wszystkich onmouseover="this.id='hover';"; onmouseout="this.id='';"; działa jak należy.

Bo to właśnie ten sam span co szukam przez Id.

1 użytkowników online, w tym zalogowanych: 0, gości: 1