Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

257 lines
5.8 KiB

  1. <html>
  2. <head>
  3. <script>
  4. var vImage = new Array(
  5. %s)
  6. var vThumb = new Array(
  7. %s)
  8. var cImage = %d
  9. var runSlidesFlag = 0
  10. var iImage = 0
  11. var Mode = ""
  12. var isIE = 0
  13. function loadedDoc()
  14. {
  15. if (navigator.appName == "Netscape" || navigator.appName.indexOf("Microsoft") == -1)
  16. {
  17. top.location.href = "viewern.htm"
  18. }
  19. var preload = new Image()
  20. preload.src = vImage[0]
  21. for (i = 0 ; i < vThumb.length ; i++)
  22. {
  23. contact.insertAdjacentHTML("beforeEnd", "<img onclick=filmJump(" + i + ") class=THUMB style=\"padding: 20px\" src=\"" + vThumb[i] + "\">")
  24. }
  25. var filmThumbsText = "<table style=\"overflow-x: scroll\"><tr>"
  26. for (i = 0 ; i < vThumb.length ; i++)
  27. {
  28. filmThumbsText = filmThumbsText + "<td id=filmThumb" + i + "><img onclick=filmSelect(" + i + ") class=THUMB style=\"padding: 20px\" src=\"" + vThumb[i] + "\"></td>"
  29. }
  30. filmThumbsText = filmThumbsText + "</tr></table>"
  31. filmthumbs.innerHTML = filmThumbsText
  32. if (navigator.appName != "Netscape" || navigator.appName.indexOf("Microsoft") != -1)
  33. {
  34. isIE = 1
  35. }
  36. if (isIE)
  37. {
  38. filmmain.style.cursor = "hand"
  39. slidemain.style.cursor = "hand"
  40. controls.style.display = ""
  41. Slideshow()
  42. }
  43. else
  44. {
  45. }
  46. Ticker()
  47. }
  48. function Ticker()
  49. {
  50. setTimeout("Ticker()", 1000)
  51. if (runSlidesFlag == 1) {
  52. if (Mode == "Slideshow") {
  53. nextImage()
  54. }
  55. }
  56. }
  57. function Film()
  58. {
  59. if (isIE)
  60. {
  61. Mode = "Film"
  62. film.style.display = ""
  63. filmthumbs.style.display = ""
  64. contact.style.display = "none"
  65. slideshow.style.display = "none"
  66. slideshowbuttons.style.display="none"
  67. filmSelect(iImage)
  68. doResize()
  69. }
  70. else
  71. {
  72. }
  73. }
  74. function Slideshow()
  75. {
  76. if (isIE)
  77. {
  78. Mode = "Slideshow"
  79. slideshow.style.display = ""
  80. slideshowbuttons.style.display=""
  81. contact.style.display = "none"
  82. film.style.display = "none"
  83. filmthumbs.style.display = "none"
  84. slidemain.src = vImage[iImage]
  85. doResize()
  86. }
  87. else
  88. {
  89. }
  90. }
  91. function Contact()
  92. {
  93. if (isIE)
  94. {
  95. Mode = "Contact"
  96. contact.style.display = ""
  97. slideshow.style.display = "none"
  98. slideshowbuttons.style.display="none"
  99. film.style.display = "none"
  100. filmthumbs.style.display = "none"
  101. }
  102. else
  103. {
  104. }
  105. }
  106. function nextImage()
  107. {
  108. iImage = (iImage + vImage.length + 1) % vImage.length
  109. if (isIE)
  110. {
  111. slidemain.src = vImage[iImage]
  112. }
  113. else
  114. {
  115. }
  116. }
  117. function prevImage()
  118. {
  119. iImage = (iImage + vImage.length - 1) % vImage.length
  120. if (isIE)
  121. {
  122. slidemain.src = vImage[iImage]
  123. }
  124. else
  125. {
  126. }
  127. }
  128. function runSlides()
  129. {
  130. runSlidesFlag = (runSlidesFlag + 1) % 2
  131. if (isIE)
  132. {
  133. if (runSlidesFlag == 1)
  134. {
  135. runButton.value = "Stop"
  136. }
  137. else
  138. {
  139. runButton.value = "Play"
  140. }
  141. }
  142. }
  143. function filmSelect(i)
  144. {
  145. iImage = i;
  146. if (isIE)
  147. {
  148. filmmain.src = vImage[i];
  149. for (var j = 0 ; j < cImage ; j++)
  150. {
  151. document.all["filmThumb"+j].style.background=""
  152. }
  153. document.all["filmThumb"+i].style.background= "blue"
  154. }
  155. else
  156. {
  157. }
  158. }
  159. function filmJump(i)
  160. {
  161. iImage = i;
  162. Film();
  163. }
  164. function nextFilmImage()
  165. {
  166. filmSelect((iImage + vImage.length + 1) % vImage.length)
  167. }
  168. function contactSelect(i)
  169. {
  170. if (isIE)
  171. {
  172. iImage = i
  173. Film()
  174. filmmain.src = vImage[i]
  175. doResize()
  176. }
  177. else
  178. {
  179. }
  180. }
  181. function doResize()
  182. {
  183. if (isIE)
  184. {
  185. filmmain.height = document.body.clientHeight - document.all.controls.offsetHeight - document.all.filmthumbs.offsetHeight - 10
  186. slidemain.height = document.body.clientHeight - document.all.controls.offsetHeight - document.all.slideshowbuttons.offsetHeight - 10
  187. if (document.body.clientWidth < filmmain.width)
  188. {
  189. filmmain.height = document.body.clientWidth * filmmain.height / filmmain.width;
  190. }
  191. if (document.body.clientWidth < slidemain.width)
  192. {
  193. slidemain.height = document.body.clientWidth * slidemain.height / slidemain.width;
  194. }
  195. }
  196. }
  197. </script>
  198. <style>
  199. TD { valign: center }
  200. TR { align: center }
  201. IMG.THUMB { padding: 20px; cursor: hand;}
  202. BODY { margin: 0; }
  203. </style>
  204. <body onLoad="loadedDoc()" onResize="doResize()" link="#03a0fc" vlink="#03a0fc">
  205. <table id=controls style="width: 100%; display:none" cellspacing=0 cellpadding=0>
  206. <tr align=right>
  207. <td><div class=CONTROLS style="cursor: hand; font-size: 12pt; color:#03a0fc; font-family: Trebuchet MS, Arial, sans-serif" onclick="Film()">Film Strip</div>
  208. <tr align=right>
  209. <td><div class=CONTROLS style="cursor: hand; font-size: 12pt; color:#03a0fc; font-family: Trebuchet MS, Arial, sans-serif" onclick="Slideshow()">Slideshow</div>
  210. <tr align=right>
  211. <td><div class=CONTROLS style="cursor: hand; font-size: 12pt; color:#03a0fc; font-family: Trebuchet MS, Arial, sans-serif" onclick="Contact()">Contact Sheet</div>
  212. </tr>
  213. </table>
  214. <div id=contact style="width: 100%; display: none"></div>
  215. <table id=slideshow style="width: 100%; display: none">
  216. <tr align=center>
  217. <td valign=center><img id=slidemain onclick=nextImage() src="">
  218. </table>
  219. <div id=slideshowbuttons>
  220. <input class=SLIDECONTROLS type=button value="Back" onclick="prevImage()">
  221. <input class=SLIDECONTROLS id=runButton type=button value="Play" onclick="runSlides()">
  222. <input class=SLIDECONTROLS type=button value="Forward" onclick="nextImage()">
  223. </div>
  224. <table id=film style="width: 100%; display: none">
  225. <tr align=center><td valign=center><img alt="" onclick=nextFilmImage() id=filmmain src="">
  226. </table>
  227. <div id=filmthumbs style="width: 100%; height: 120; display:none; overflow-y: none; overflow-x:scroll"></div>
  228. </body>
  229. </html>