-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathside-5ele.html
executable file
·683 lines (644 loc) · 20 KB
/
side-5ele.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="style1.css">
<style>
/* Media response */
@media screen and (min-width: 850px) {
#main{ margin-left:250px;}
#ham{ display: none;}
#close{ display: none;}
#title{display:none}
}
@media screen and (max-width: 850px) {
#main{margin-left:0}
.column1{width:100%}
.column2{width:100%}
#title{font-size:1.4em}
.tableText{font-size: 0.8em;}
}
@media screen and (max-width: 500px) {
#imgsc{ width:100%; height:100%;}
}
@media screen and (min-width: 1200px) {
#main{padding-left:75px;padding-right:75px;}
}
@media screen and (min-width: 500px) {
#imgsc{ width:75%; height:75%;}
}
</style>
</head>
<body>
<!-- ##### NAVIGATION ##### -->
<div id="mySidenav" class="sidenav">
<span><a href="side-intro.html"><b>Feng Shui </b>& Geomancy</a></span>
<a id="close" ahref="javascript:void(0)" class="closebtn" onclick="closeNav()">×</a>
<a id="menu" href="side-intro.html" >INTRO</a>
<a href="side-qi.html" id="menu">THEORY</a>
<a id="submenu" href="side-qi.html">- Qi & Taoism</a>
<a id="submenu" href="side-yy.html">- Yin & Yang</a>
<a id="submenu" href="side-5ele.html" class="active">- 5 Elements</a>
<a id="submenu" href="side-8dir.html">- 8 Directions</a>
<a href="#" id="menu">PRACTICE</a>
<a id="submenu" href="#">- Siting/Landscape</a>
<a id="submenu" href="#">- interior</a>
<a id="submenu" href="#">- Spaces/Portents</a>
<a id="submenu" href="#">- Horoscope</a>
<a href="#" id="menu">Thoughts</a>
<a id="submenu" href="#">- Advanced</a>
<a id="submenu" href="#">- Personal Practice</a>
<a id="submenu" href="#">- Reading List</a>
<a href="#">@contact</a>
</div>
<div id="main">
<!-- ###### TOP ^ UP BUTTON ###### -->
<button onclick="topFunction()" id="myBtn" title="Go to top">Top</button>
<span id="ham" style="font-size:2em;cursor:pointer" onclick="openNav()">☰</span><span id="title";><b>Feng Shui </b>& Geomancy</span>
<!-- ##### Sections ##### -->
<!-- ##### THE FIVE ELEMENTS ##### -->
<div class="row">
<h2>The 5 Elements</h2>
<div class="column1">
<p><i>Nb. Symbology used to express complex characteristics and interactions.</i></p>
<p>
Five general types of energy were identified.
</p>
<h3> <span style="color:yellow;"> EARTH</span> <span style="color:#000;">METAL</span><span style="color:blue"> WATER</span> <span style="color:lightgreen">WOOD </span><span style="color:red">FIRE</span></h3>
<p>These <b>Elements</b> are used to describe the quality of five general types of energy(Qi). The 5 Element Cycles were developed to explain their interactions with each other.
<br>
<br>
Everything (physical and immaterial) can be described as having the general quality of one element. Although made up of all the other elements, to a lesser extent, it is the main characteristic.<br>
<i>Nb. A more refined description of quality is obtained by calculating the amount of other elements present. (see advanced section).</i>
</p>
<p>
Their qualities and interactions is the key to understanding all Feng Shui and all Taoist practices.
</p>
</div>
<div class="column2">
<p style="text-align:center">
<img src="imgs/5elecycle.jpg">
</p>
</div>
</div>
<!-- ##### ORIGIN ##### -->
<div class="row">
<h2>Origin</h2>
<div class="column1">
<p>
Taoists identified a supreme original force/energy they called <b>Wu Qi</b> from which everything is created.
</p>
<p>
<i>
Nb. Taoist writings (I am aware of) shed no light on explaining Wu Qi in a scientific way. I have include my own flawed take on the subject. It is probably sound to assume that "something from nothing" implies that "nothing" must be "something", and that the "nothing" must be a very powerful and creative force.
</i>
</p>
<h3>Wu Qi</h3>
<p>
Wu Qi is singularity rather than a duality. It is the source, creative energy, of everything "known".
</p>
<i>All things in the Spiritual realm are unified, all things in the physical world are dualities.</i>
</p>
<p>
<i>
There have been various "cross-over" theories to explain this <b>Original force</b> in Scientific speak.
One theory is that the "nothingness" is what Physicists describe as "Dark Matter" or subtle sub
atomic entities. Dark Matter, is currently believed, to make up approximately 90% of everything. The remaining 10% being the physical universe, or what we generally think of as real ( planets, atmosphere, people,stuff).</i>
<p>Please see the "advanced" section for more deliberation.
</p>
<p>The diagram opposite shows the transformation of energy from subtle to physical. It explains
everything. From unity (Wu Qi), perfect harmony (Tai Qi), splitting into (Yin and Yang(duality)) and then (dependent on
the quality and proportions) forming the variety of our world (5 Elements to 64 hexagrams and beyond).
</p>
</div>
<div class="column2">
<p style="text-align:center">
<img src="imgs/origin.jpg">
</p>
</div>
</div>
<!-- ###### YIN YANG TO % ELEMENTS ##### -->
<div class="row">
<h3>Yin And Yang to 5 Elements</h3>
<div class="column1">
<p>
The transition of Wu Qi into the physical can be thought of as Tai Qi or a state of perfect (imperfect) balance.
( rather like, the kernel of creation spaws an instance of perfect duality to enable the formation of unlimited possible variations ).
</p>
<p>
The instantaneous (spark of life) formation of yin and yang from a Tai Qi state is the point of physical manifestation.
</p>
The proportion of Yin and Yang present in anything characterizes it.
</p>
<p>
The Chinese used a binary system to describe the quality of energy.
<br/>
Yang (+'ve, male) is a solid line and
Yin (-'ve, female) is a broken line.
(please refer to the Yin & Yang section for an explanation).
</p>
<p>
Think of Man as a model of the integration of Yin and Yang.
<br/>
Physical energy is manifested as the body and Subtle energy manifested as the mind and spirit.
</p>
<p>
Modern Science is aware of the 4 main forces, <b>strong nuclear, weak nuclear, gravity and electromagnetism</b>. The Taoists included a 5th harmonizing force (Earth). The natural way is for the 4 forces (Fire, Metal, Water and Wood) to be in conflict and the Earth element as harmonizer.
</p>
</div>
<div class="column2">
<p style="text-align:center">
<img src="imgs/yang.gif"><br>
Yang<br><br>
<img src="imgs/yin.gif"><br>
Yin<br><br>
<img src="imgs/yin_yang.jpg"><br>
Tai Qi<br><i>(balanced mixture of yin & yang)</i>
</p>
</div>
</div>
<div class="row">
<div class="column1">
<p>
<b>Fire</b>=spirit / mental energy.<br>
<br/>
<b>Earth</b>= the uniting, harmonising and neutral force.<br>
<br/>
<b>Metal</b>=characterised by gravity.<br>
<br/>
<b>Water</b>=aggregation, contraction, collection, condensation.<br>
<br/>
<b>Wood</b>=explosion, disaggregate, dispersion, dissipation.
</p>
</div>
<div class="column2" style="text-align:center;">
<img alt="" src="imgs/fire.jpg"/>
<br/>
<br/>
<img alt="" src="imgs/earth.jpg"/>
<br/>
<br/>
<img alt="" src="imgs/metal.jpg"/>
<br/>
<br/>
<img alt="" src="imgs/water.jpg"/>
<br/>
<br/>
<img alt="" src="imgs/wood.jpg"/>
<br/>
<br/>
</div>
</div>
<!-- ##### THE FIVE ELEMENT CYCLE ##### -->
<div class="row">
<h2>The 5 Element Cycle</h2>
<div>
<p>
The five element cycle is the key to understanding energy exchange.
There are regular and abnormal cycles which are described below.
</P>
</div>
<div class="column1">
<p>
<br/>
<br/>
<b>Normal and regular (generative)</b> cycle of energy flow.
<br/>
<br/>
<b>Fire</b> feeds earth ( ash / nutrients ).
<br/>
<b>Earth</b> feeds metal ( minerals ).
<br/>
<b>Metal</b> feeds water ( metal sweats ).
<br/>
<b>Water</b> feeds wood.
<br/>
<b>Wood</b> feeds fire.
<br/>
<b>Earth</b> is at the centre, <i>with it's harmonising influence.</i>
<br/>
<br/>
</div>
<div class="column2">
<br/>
<p style="text-align:center">
<img alt="" src="imgs/5ele_gen_cycle.jpg"/>
</p>
</div>
</div>
<div class="row">
<div class="column1">
<p>
<b>Abnormal (control) cycle</b> of energy flow.
<br/>
<br/>
<b>Fire</b> controls metal ( melts ).
<br/>
<b>Metal</b> controls wood ( chops ).
<br/>
<b>Wood</b> controls earth ( extracts ).
<br/>
<b>Earth</b> controls water ( contains ).
<br/>
<b>Water</b> controls fire ( extinguishes
<br/>
Nb. There are further levels to these exchanges. e.g.. Big fire combined with small water creates steam which is very auspicious.
</p>
</div>
<div class="column2">
<p style="text-align:center">
<img src="imgs/5ele_control_cycle.jpg">
</p>
</div>
</div>
<div class="row">
<h2>Elemental Clock</h2>
<p>
Each element is more active during certain months, years and times of the day. (see horoscope section for months and years information).
<br/>
<br/>
The clock diagram opposite shows which organ of the body is more active at what time. You will see below <i>(attributes table)</i> that there are yin and yang organs.
<br/><br/>
<b>Yin organs</b> produce, transform and store qi. <br/>
<b>Yang organs</b> separate the impure and expel waste.
</p>
</div>
<div class="row">
<p style="text-align:center">
<img id="imgsc" src="imgs/clock1.jpg">
</p>
<p style="text-align:center;">24 hour clock</p>
</div>
<div class="row">
<h2>The 5 Element Attributes</h2>
<p>
The table below describes the common attributes of the five elements.
</p>
</div>
<div class="row">
<table bordercolorlight="#444444" style="font-size: 12pt; line-height: 110%; font-family: Arial,Helvetica,sans-serif; margin-top: 0px; width: 965px; background-color: rgb(218, 218, 218); margin:10px;" border="0" cellpadding="2" cellspacing="0">
<tbody>
<tr style="background-color: rgb(204, 204, 204);">
<td style="color: rgb(0, 0, 102); width: 104px;">
<b>element</b>
</td>
<td style="color: rgb(0, 153, 0); width: 108px;">
<b>WOOD</b>
</td>
<td style="width: 163px;">
<font color="red"><b>FIRE</b></font>
</td>
<td style="width: 155px;">
<font color="yellow"><b>EARTH</b></font>
</td>
<td style="width: 154px;">
<font color="white"><b>METAL</b></font>
</td>
<td style="width: 139px;">
<b>WATER</b>
</td>
</tr>
<tr>
<td style="border-color: rgb(83, 83, 83); border-right-style: none; border-left-style: none; color: rgb(0, 0, 102); background-color: white; width: 134px;">
<b>shape
/ form</b>
</td>
<td style="background-color: white; width: 148px;">
<font color="lime"><img style="border: 0px solid ; width: 15px; height: 43px;" alt="wood" src="imgs/wood.jpg"></font>
</td>
<td style="background-color: white; width: 163px;">
<font color="red"><img style="border: 0px solid ; width: 39px; height: 37px;" alt="fire" src="imgs/fire.jpg"></font>
</td>
<td style="background-color: white; width: 155px;">
<font color="yellow"><img style="border: 0px solid ; width: 70px; height: 18px;" alt="earth" src="imgs/earth.jpg"></font>
</td>
<td style="background-color: white; width: 154px;">
<font color="white"><img style="border: 0px solid ; width: 63px; height: 29px;" alt="metal" src="imgs/metal.jpg"></font>
</td>
<td style="background-color: white; width: 139px;">
<img style="border: 0px solid ; width: 92px; height: 40px;" alt="water" src="imgs/water.jpg">
</td>
</tr>
<tr style="background-color: rgb(204, 204, 204);">
<td style="color: rgb(0, 0, 102); width: 104px;">
<b>direction</b>
</td>
<td style="color: rgb(0, 153, 0); width: 148px;">
E(big)
SE(small)
</td>
<td style="width: 163px;">
<font color="red">S</font>
</td>
<td style="width: 155px;">
<font color="yellow">SW(big)
NE(small)</font>
</td>
<td style="width: 154px;">
<font color="white">W(small)
NW(big)</font>
</td>
<td style="color: rgb(51, 51, 255); width: 139px;">
N
</td>
</tr>
<tr>
<td style="color: rgb(0, 0, 102); width: 134px;">
<b>season</b>
</td>
<td style="color: rgb(0, 153, 0); width: 148px;">
spring
</td>
<td style="width: 163px;">
<font color="red">summer</font>
</td>
<td style="width: 155px;">
<font color="yellow">late
summer</font>
</td>
<td style="width: 154px;">
<font color="white">autumn</font>
</td>
<td style="color: rgb(51, 51, 255); width: 139px;">
winter
</td>
</tr>
<tr>
<td style="color: rgb(0, 0, 102); width: 134px;">
<b>planet</b>
</td>
<td style="color: rgb(0, 153, 0); width: 148px;">
Jupiter
</td>
<td style="width: 163px;">
<font color="red">Mars</font>
</td>
<td style="width: 155px;">
<font color="yellow">Saturn</font>
</td>
<td style="width: 154px;">
<font color="white">Venus</font>
</td>
<td style="color: rgb(51, 51, 255); width: 139px;">
Mercury
</td>
</tr>
<tr>
<td style="background-color: rgb(204, 204, 204); color: rgb(0, 0, 102); width: 134px;" bordercolordark="#444444" bgcolor="#444444" height="16">
<b>archetype</b>
</td>
<td style="background-color: rgb(204, 204, 204); color: rgb(0, 153, 0); width: 148px;" bordercolordark="#444444" bgcolor="#444444" height="16">
Pioneer
</td>
<td style="background-color: rgb(204, 204, 204); width: 163px;" bordercolordark="#444444" bgcolor="#444444" height="16">
<font color="red">Wizard</font>
</td>
<td style="background-color: rgb(204, 204, 204); width: 155px;" bordercolordark="#444444" bgcolor="#444444" height="16">
<font color="yellow">Peacemaker</font>
</td>
<td style="background-color: rgb(204, 204, 204); width: 154px;" bordercolordark="#444444" bgcolor="#444444" height="16">
<font color="white">Alchemist</font>
</td>
<td style="background-color: rgb(204, 204, 204); color: rgb(51, 51, 255); width: 139px;" bordercolordark="#444444" bgcolor="#444444" height="16">
Philosopher
</td>
</tr>
<tr>
<td style="color: rgb(0, 0, 102); width: 134px;">
<b>power</b>
</td>
<td style="color: rgb(0, 153, 0); width: 148px;">
expansion
</td>
<td style="width: 163px;">
<font color="red">fusion</font>
</td>
<td style="width: 155px;">
<font color="yellow">moderation</font>
</td>
<td style="width: 154px;">
<font color="white">contraction</font>
</td>
<td style="color: rgb(51, 51, 255); width: 139px;">
consolidation
</td>
</tr>
<tr>
<td style="background-color: rgb(204, 204, 204); color: rgb(0, 0, 102); width: 134px;" bgcolor="#444444">
<b>time</b>
</td>
<td style="background-color: rgb(204, 204, 204); color: rgb(0, 153, 0); width: 148px;" bgcolor="#444444">
11pm
- 3am
</td>
<td style="background-color: rgb(204, 204, 204); width: 163px;" bgcolor="#444444">
<font color="red">11am-3pm,
7-11pm</font>
</td>
<td style="background-color: rgb(204, 204, 204); width: 155px;" bgcolor="#444444">
<font color="yellow">7
- 11am</font>
</td>
<td style="background-color: rgb(204, 204, 204); width: 154px;" bgcolor="#444444">
<font color="white">3
- 7 am</font>
</td>
<td style="background-color: rgb(204, 204, 204); color: rgb(51, 51, 255); width: 139px;" bgcolor="#444444">
3
- 7 pm
</td>
</tr>
<tr>
<td style="color: rgb(0, 0, 102); width: 134px;">
<b>yin
organs</b>
</td>
<td style="color: rgb(0, 153, 0); width: 148px;">
liver
</td>
<td style="width: 163px;">
<font color="red">heart</font>
</td>
<td style="width: 155px;">
<font color="yellow">spleen</font>
</td>
<td style="width: 154px;">
<font color="white">lungs</font>
</td>
<td style="color: rgb(51, 51, 255); width: 139px;">
kidneys
</td>
</tr>
<tr>
<td style="background-color: rgb(204, 204, 204); color: rgb(0, 0, 102); width: 134px;" bgcolor="#444444">
<b>yang
organs</b>
</td>
<td style="background-color: rgb(204, 204, 204); color: rgb(0, 153, 0); width: 148px;" bgcolor="#444444">
gall
bladder
</td>
<td style="background-color: rgb(204, 204, 204); width: 163px;" bgcolor="#444444">
<font color="red">small
intestine</font>
</td>
<td style="background-color: rgb(204, 204, 204); width: 155px;" bgcolor="#444444">
<font color="yellow">stomach</font>
</td>
<td style="background-color: rgb(204, 204, 204); width: 154px;" bgcolor="#444444">
<font color="white">colon</font>
</td>
<td style="background-color: rgb(204, 204, 204); color: rgb(51, 51, 255); width: 139px;" bgcolor="#444444">
bladder
</td>
</tr>
<tr>
<td style="color: rgb(0, 0, 102); width: 134px;">
<b>taste</b>
</td>
<td style="color: rgb(0, 153, 0); width: 148px;">
sour
</td>
<td style="width: 163px;">
<font color="red">bitter</font>
</td>
<td style="width: 155px;">
<font color="yellow">sweet</font>
</td>
<td style="width: 154px;">
<font color="white">spicy</font>
</td>
<td style="color: rgb(51, 51, 255); width: 139px;">
salty
</td>
</tr>
<tr>
<td style="background-color: rgb(204, 204, 204); color: rgb(0, 0, 102); width: 134px;" bgcolor="#444444">
<b>smell</b>
</td>
<td style="background-color: rgb(204, 204, 204); color: rgb(0, 153, 0); width: 148px;" bgcolor="#444444">
rancid
</td>
<td style="background-color: rgb(204, 204, 204); width: 163px;" bgcolor="#444444">
<font color="red">scorched</font>
</td>
<td style="background-color: rgb(204, 204, 204); width: 155px;" bgcolor="#444444">
<font color="yellow">fragrant</font>
</td>
<td style="background-color: rgb(204, 204, 204); width: 154px;" bgcolor="#444444">
<font color="white">rotten</font>
</td>
<td style="background-color: rgb(204, 204, 204); color: rgb(51, 51, 255); width: 139px;" bgcolor="#444444">
putrid
</td>
</tr>
<tr>
<td style="color: rgb(0, 0, 102); width: 134px;">
<b>opening</b>
</td>
<td style="color: rgb(0, 153, 0); width: 148px;">
eyes
</td>
<td style="width: 163px;">
<font color="red">tongue</font>
</td>
<td style="width: 155px;">
<font color="yellow">mouth</font>
</td>
<td style="width: 154px;">
<font color="white">nose</font>
</td>
<td style="color: rgb(51, 51, 255); width: 139px;">
ears
</td>
</tr>
<tr>
<td style="background-color: rgb(204, 204, 204); color: rgb(0, 0, 102); width: 134px;" bgcolor="#444444">
<b>emotion</b>
</td>
<td style="background-color: rgb(204, 204, 204); color: rgb(0, 153, 0); width: 148px;" bgcolor="#444444">
anger
</td>
<td style="background-color: rgb(204, 204, 204); width: 163px;" bgcolor="#444444">
<font color="red">joy</font>
</td>
<td style="background-color: rgb(204, 204, 204); width: 155px;" bgcolor="#444444">
<font color="yellow">pensive</font>
</td>
<td style="background-color: rgb(204, 204, 204); width: 154px;" bgcolor="#444444">
<font color="white">grief</font>
</td>
<td style="background-color: rgb(204, 204, 204); color: rgb(51, 51, 255); width: 139px;" bgcolor="#444444">
fear
</td>
</tr>
<tr>
<td style="color: rgb(0, 0, 102); width: 134px;">
<b>animal</b>
</td>
<td style="color: rgb(0, 153, 0); width: 148px;">
Green
Dragon
</td>
<td style="width: 163px;">
<font color="red">Red
Phoenix</font>
</td>
<td style="width: 155px;">
<font color="yellow">Yellow
Pheasant</font>
</td>
<td style="width: 154px;">
<font color="white">White
Tiger</font>
</td>
<td style="color: rgb(51, 51, 255); width: 139px;">
Turtle
</td>
</tr>
</tbody>
</table>
</div>
<!-- ##### SCRIPTS ##### -->
<script>
function openNav() {
document.getElementById("mySidenav").style.width = "250px";
document.getElementById("main").style.marginLeft = "250px";
}
function closeNav() {
document.getElementById("mySidenav").style.width = "0";
document.getElementById("main").style.marginLeft= "0";
}
</script>
<script>
function myFunction(x) {
if (x.matches) { // If media query matches
document.getElementById("mySidenav").style.width = "0";
} else {
document.getElementById("mySidenav").style.width = "250px";
}
}
var x = window.matchMedia("(max-width: 850px)")
myFunction(x) // Call listener function at run time
x.addListener(myFunction) // Attach listener function on state changes
</script>
<script>
//Get the button
var mybutton = document.getElementById("myBtn");
// When the user scrolls down 20px from the top of the document, show the button
window.onscroll = function() {scrollFunction()};
function scrollFunction() {
if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {
mybutton.style.display = "block";
} else {
mybutton.style.display = "none";
}
}
// When the user clicks on the button, scroll to the top of the document
function topFunction() {
document.body.scrollTop = 0;
document.documentElement.scrollTop = 0;
}
</script>
</body>
</html>