home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 December / PCWELT_12_2006.ISO / pcwsoft / HTMLSlideShowSetup.exe / HTMLSlideShow.msi / Data1.cab / htmlgen.exe1 / HTML / 300 next >
Encoding:
Text File  |  2004-07-15  |  13.3 KB  |  544 lines

  1. <html>
  2. <head>
  3. <title>%s</title>
  4. <script>
  5.  
  6. var vImage = new Array(%s)
  7. var cxImage = new Array(%s)
  8. var cyImage = new Array(%s)
  9. var vThumb = new Array(%s)
  10. var cImage = %d
  11. var controlsDisplay = "%s"
  12. var useTransitions = "yes"
  13.  
  14. var imagePath = "%s"+"images"
  15. var prevPath = imagePath + "/prev.gif" 
  16. var nextPath = imagePath + "/next.gif" 
  17. var playPath = imagePath + "/play.gif" 
  18. var pausePath = imagePath + "/pause.gif" 
  19. var stopPath = imagePath + "/stop.gif" 
  20. var blankPath = imagePath + "/blank.gif" 
  21. var brandingPath = imagePath + "/branding.gif" 
  22.  
  23. var runSlidesFlag = 0
  24. var iImage = 0
  25. var Mode = "Welcome"
  26. var controlsEnabled = 1
  27. var buttonsEnabled = 1
  28. var fullscreen = (window.parent != window)
  29. var timeoutid
  30.  
  31. function loadedDoc()
  32. {
  33.     if (!(navigator.appName == "Netscape" || navigator.appName.indexOf("Microsoft") == -1))
  34.     {
  35.        var preload = new Image
  36.        preload.src = vImage[0]
  37.  
  38.        if (controlsDisplay)
  39.        {
  40.            var contactText = "<center><table style=\"overflow-y: auto\">"
  41.            for (i = 0 ; i < cImage / 5; i++)
  42.            {
  43.               contactText = contactText + "<tr>"
  44.               for (j = 0; j < 5 ; j++)
  45.               {
  46.                  var x = (i * 5 + j)
  47.                  if (x < cImage)
  48.                  {
  49.                     contactText = contactText + "<td height=120 width=120><img onclick=filmJump(" + x + ") style=\"cursor:hand; padding: 20px\" src=\"" + vThumb[x] + "\"></td>"
  50.                  }
  51.               }
  52.               contactText = contactText + "</tr>"
  53.            }
  54.            contactText = contactText + "</table></center>"
  55.            contact.innerHTML = contactText
  56.  
  57.            var filmThumbsText = "<table style=\"width: %d; overflow-x: scroll\"><tr height=120>"
  58.            for (i = 0 ; i < vThumb.length ; i++)
  59.            {
  60.               filmThumbsText = filmThumbsText + "<td align=center width=120 id=filmThumb" + i + "><div id=filmThumbCell" + i + " style = \"padding: 5px; border: solid 0 #00b; border-width:2px\"><img onclick=filmSelect(" + i + ") class=THUMB style=\"cursor:hand; padding: 20px\" src=\"" + vThumb[i] + "\"></div></td>"
  61.            }
  62.            filmThumbsText = filmThumbsText + "</tr></table>"
  63.            filmthumbs.innerHTML = filmThumbsText
  64.        }
  65.  
  66.        filmmain.style.cursor = "hand"
  67.        slidemain.style.cursor = "hand"
  68.  
  69.        welcome.style.display = "none"
  70.        forwButton.src=nextPath
  71.        runButton.src=playPath
  72.        prevButton.src=prevPath
  73.        stopButton.src=stopPath
  74.  
  75.        if (fullscreen)
  76.        {
  77.            Slideshow('launch')
  78.        }
  79.        else
  80.        {
  81.            welcome2.style.display = ""
  82.        }
  83.     }
  84. }
  85.  
  86. function Ticker()
  87. {
  88.     if (runSlidesFlag == 1 && Mode == "Slideshow") 
  89.     {
  90.         nextImage()
  91.         timeoutid = setTimeout("Ticker()", 5000)
  92.     }
  93. }
  94.  
  95. function ShowControls(x)
  96. {
  97.     if (controlsDisplay)
  98.     {
  99.         if (x=="Slideshow")
  100.         {
  101.            advcontrols1.style.color = "#ffffff"
  102.            advcontrols2.style.color = "#03a0fc"
  103.            advcontrols3.style.color = "#03a0fc"
  104.         }
  105.         else if (x=="Film")
  106.         {
  107.            advcontrols1.style.color = "#03a0fc"
  108.            advcontrols2.style.color = "#ffffff"
  109.            advcontrols3.style.color = "#03a0fc"
  110.         }
  111.         else if (x=="Contact")
  112.         {
  113.            advcontrols1.style.color = "#03a0fc"
  114.            advcontrols2.style.color = "#03a0fc"
  115.            advcontrols3.style.color = "#ffffff"
  116.         }
  117.     }
  118.     else
  119.     {
  120.         advcontrols.style.visibility = "hidden"
  121.     }
  122. }
  123.  
  124. function ShowStopButton()
  125. {
  126.     if (fullscreen)
  127.     {
  128.        stopButton.width = 32;
  129.        stopButton.style.cursor = "hand"
  130.        stopButton.style.visibility = ""
  131.     }
  132.     else
  133.     {
  134.        stopButton.width = 0;
  135.        stopButton.style.cursor = ""
  136.        stopButton.style.visibility = "hidden"
  137.     }
  138.  
  139. }
  140.  
  141. function ShowButtons(f)
  142. {
  143.     ShowStopButton();
  144.     forwButton.filters[0].Apply();
  145.     runButton.filters[0].Apply();
  146.     prevButton.filters[0].Apply();
  147.     stopButton.filters[0].Apply();
  148.     if (f)
  149.     {
  150.         buttonsEnabled = 1
  151.         forwButton.filters[0].transition = 3;
  152.         runButton.filters[0].transition = 3;
  153.         prevButton.filters[0].transition = 3;
  154.         forwButton.src=nextPath
  155.         runButton.src=playPath
  156.         prevButton.src=prevPath
  157.         forwButton.style.cursor="hand"
  158.         runButton.style.cursor="hand"
  159.         prevButton.style.cursor="hand"
  160.     }
  161.     else
  162.     {
  163.         buttonsEnabled = 0
  164.         forwButton.filters[0].transition = 2;
  165.         runButton.filters[0].transition = 2;
  166.         prevButton.filters[0].transition = 2;
  167.         prevButton.src=blankPath
  168.         forwButton.src=blankPath
  169.         runButton.src=blankPath
  170.         forwButton.style.cursor=""
  171.         runButton.style.cursor=""
  172.         prevButton.style.cursor=""
  173.     }
  174.     forwButton.filters[0].Play();
  175.     runButton.filters[0].Play();
  176.     prevButton.filters[0].Play();
  177.     stopButton.filters[0].Play();
  178. }
  179.  
  180. function Film()
  181. {
  182.     if (controlsEnabled)
  183.     {
  184.         ShowControls('Film')
  185.         Mode = "Film"
  186.         runSlidesFlag = 0
  187.         welcome.style.display = "none"
  188.         welcome2.style.display = "none"
  189.         controls.style.display = ""
  190.     if ((document.body.clientHeight - 220) > 0)
  191.         {
  192.             film.height = document.body.clientHeight - 220
  193.         }
  194.         film.style.display = ""
  195.         filmthumbs.style.display = ""
  196.         contact.style.display = "none"
  197.         slideshow.style.display = "none"
  198.         ShowButtons(0)
  199.         filmSelect(iImage)
  200.         doResize()
  201.     }
  202. }
  203.  
  204. function Slideshow(x)
  205. {
  206.     if (controlsEnabled)
  207.     {
  208.         ShowControls('Slideshow')
  209.         Mode = "Slideshow"
  210.         welcome.style.display = "none"
  211.         welcome2.style.display = "none"
  212.         controls.style.display = ""
  213.         slideshow.style.display = ""
  214.         if (x == "launch")
  215.         {
  216.             ShowStopButton()
  217.         }
  218.         else
  219.         {
  220.             ShowButtons(1)
  221.         }
  222.         contact.style.display = "none"
  223.         film.style.display = "none"
  224.         filmthumbs.style.display = "none"
  225.         slidemain.src = vImage[iImage]
  226.         doResize()
  227.     }
  228. }
  229.  
  230. function Contact()
  231. {
  232.     if (controlsEnabled)
  233.     {
  234.         ShowControls('Contact')
  235.         Mode = "Contact"
  236.         runSlidesFlag = 0
  237.         welcome.style.display = "none"
  238.         welcome2.style.display = "none"
  239.         controls.style.display = ""
  240.         contact.style.display = ""
  241.         slideshow.style.display = "none"
  242.         ShowButtons(0)
  243.         film.style.display = "none"
  244.         filmthumbs.style.display = "none"
  245.     }
  246. }
  247.  
  248. function changeImage(x,y)
  249. {
  250.     iImage = (iImage + vImage.length + x) %% vImage.length
  251.     if (y == "notrans" || useTransitions != "yes")
  252.     {
  253.         slidemain.src = vImage[iImage]
  254.     }
  255.     else
  256.     {
  257.         slidemain.filters[0].Apply();
  258.         slidemain.filters[0].transition = 17
  259.         slidemain.src = vImage[iImage]
  260.         slidemain.filters[0].Play();
  261.     }
  262.     doResize()
  263. }
  264.  
  265. function prevImage(x)
  266. {
  267.     changeImage(-1,x)
  268. }
  269. function nextImage(x)
  270. {
  271.     changeImage(+1,x)
  272. }
  273.  
  274. function slideClick()
  275. {
  276.    if (runSlidesFlag == 1)
  277.    {
  278.       runSlides()
  279.    }
  280.    nextImage("notrans")
  281. }
  282.  
  283. function nextImageButton()
  284. {
  285.     if (buttonsEnabled)
  286.     {
  287.         if (runSlidesFlag == 1)
  288.         {
  289.            runSlides()
  290.         }
  291.         nextImage("notrans")
  292.     }
  293. }
  294.  
  295. function runSlidesButton()
  296. {
  297.     if (buttonsEnabled)
  298.     {
  299.         if (runSlidesFlag == 0)
  300.         {
  301.        nextImage()
  302.         }
  303.         runSlides()
  304.     }
  305. }
  306.  
  307. function prevImageButton()
  308. {
  309.     if (buttonsEnabled)
  310.     {
  311.         if (runSlidesFlag == 1)
  312.         {
  313.            runSlides()
  314.         }
  315.         prevImage("notrans")
  316.     }
  317. }
  318.  
  319. function exitButton()
  320. {
  321.     window.parent.close()
  322. }
  323.  
  324. function runSlides()
  325. {
  326.     runSlidesFlag = (runSlidesFlag + 1) %% 2
  327.     if (runSlidesFlag == 1)
  328.     {
  329.         runButton.src = pausePath
  330.         timeoutid = setTimeout("Ticker()", 5000)
  331.     }
  332.     else
  333.     {
  334.         clearTimeout(timeoutid)
  335.         runButton.src = playPath
  336.     }
  337. }
  338.  
  339. function filmSelect(i)
  340. {
  341.     iImage = i;
  342.     filmmain.src = vImage[i];
  343.     for (var j = 0 ; j < cImage ; j++)
  344.     {
  345.         document.all["filmThumbCell"+j].style.border=""
  346.     }
  347.     document.all["filmThumbCell"+i].style.border="#00b 2px solid"
  348.     doResize()
  349. }
  350.  
  351. function filmJump(i)
  352. {
  353.     iImage = i;
  354.     Film();
  355. }
  356.  
  357. function changeFilmImage(x)
  358. {
  359.     filmSelect((iImage + vImage.length + x) %% vImage.length)
  360. }
  361.  
  362. function prevFilmImage()
  363. {
  364.     changeFilmImage(-1)
  365. }
  366.  
  367. function nextFilmImage()
  368. {
  369.     changeFilmImage(+1)
  370. }
  371.  
  372. function contactSelect(i)
  373. {
  374.     iImage = i
  375.     Film()
  376.     filmmain.src = vImage[i]
  377.     doResize()
  378. }
  379.  
  380. document.onkeydown = keyDown
  381.  
  382. function keyDown()    
  383. {
  384.    if (27 == event.keyCode)
  385.    {         
  386.      if (fullscreen == 1)
  387.      {
  388.     exiteButton()
  389.      }
  390.    }
  391.    else if (Mode != "Welcome")
  392.    {
  393.       if (37 == event.keyCode)
  394.       {
  395.          if (Mode == "Slideshow")
  396.          {
  397.             prevImageButton()
  398.          }
  399.          else if (Mode == "Film")
  400.          {
  401.              prevFilmImage()
  402.          }
  403.       }
  404.       else if (39 == event.keyCode)
  405.       {
  406.          if (Mode == "Slideshow")
  407.          {
  408.              nextImageButton()
  409.          }
  410.          else if (Mode == "Film")
  411.          {
  412.              nextFilmImage()
  413.          }
  414.       }
  415.       else if (32 == event.keyCode)
  416.       {
  417.          if (Mode == "Slideshow")
  418.          {
  419.             runSlidesButton()
  420.          }
  421.          else
  422.          {
  423.             Slideshow()
  424.          }
  425.       }
  426.    }
  427. }
  428.  
  429. function doResize()
  430. {
  431.     var clientWidth = (document.body.clientWidth - 40)
  432.     var clientHeight = (document.body.clientHeight - document.all.controls.offsetHeight - 40)
  433.  
  434.     if (Mode == "Film")
  435.     {
  436.         clientHeight -= document.all.filmthumbs.offsetHeight
  437.     }
  438.  
  439.     var cx = cxImage[iImage]
  440.     var cy = cyImage[iImage]
  441.  
  442.     if (clientWidth < cx)
  443.     {
  444.         cy = cy * clientWidth / cx;
  445.         cx = clientWidth
  446.     }
  447.     if (clientHeight < cy)
  448.     {
  449.         cx = cx * clientHeight / cy;
  450.         cy = clientHeight
  451.     }
  452.  
  453.     if (Mode == "Film")
  454.     {
  455.         filmmain.width = cx;
  456.         filmmain.height = cy;
  457.     }
  458.     else
  459.     {
  460.         slidemain.width = cx;
  461.         slidemain.height = cy;
  462.     }
  463. }
  464.  
  465. </script>
  466. <body onLoad="loadedDoc()" onResize="doResize()" text="#ffffff" bgcolor="#000000" link="#03a0fc" vlink="#03a0fc">
  467.  
  468. <div id=welcome>
  469. <table style="height: 85%%; width: 100%%">
  470. <tr valign=center>
  471. <td align=center>
  472. <div style="font-family: Trebuchet MS, Arial, sans-serif">
  473. <h1>%s</h1>
  474. %s    
  475. <h2>Click <a href="html/0.htm">here</a> to watch the slideshow.</h2>
  476. </div>
  477. <td/>
  478. </tr>
  479. </table>
  480. <table style="height: 50; width: 100%%">
  481. <tr valign=top>
  482. <td align=right>
  483. <a href="http://go.microsoft.com/fwlink/?LinkId=4448"><img border=0 src="%s"></a>
  484. </td>
  485. </tr>
  486. </table>
  487. </div>
  488.  
  489. <div id=welcome2 style="display:none">
  490. <table style="height: 85%%; width: 100%%">
  491. <tr valign=center>
  492. <td align=center>
  493. <div style="font-family: Trebuchet MS, Arial, sans-serif">
  494. <h1>%s</h1>
  495. %s    
  496. <h2><div style="font-family: Trebuchet MS, Arial, sans-serif; cursor: hand; color:#03a0fc"; onclick="Slideshow('launch')">Click here</div> to watch the slideshow.</h2>
  497. </div>
  498. </td>
  499. </tr>
  500. </table>
  501. <table style="height: 50; width: 100%%">
  502. <tr valign=top>
  503. <td align=right>
  504. <a href="http://go.microsoft.com/fwlink/?LinkId=4448"><img border=0 src="%s"></a>
  505. </td>
  506. </tr>
  507. </table>
  508. </div>
  509.  
  510. <table id=controls style="height: 50; width: 100%%; display:none" cellspacing=0 cellpadding=0>
  511. <tr>
  512. <td width="20"> </td>
  513. <td>
  514. <table id=advcontrols style="cursor: hand; font-size: 12pt; color:#03a0fc; font-family: Trebuchet MS, Arial, sans-serif">
  515. <td width=100 id=advcontrols1 style='color:#03a0fc' onclick='Slideshow()'>Slide Show</td>
  516. <td width=100 id=advcontrols2 style='color:#03a0fc' onclick='Film()'>Filmstrip</td>
  517. <td width=100 id=advcontrols3 style='color:#03a0fc' onclick='Contact()'>Previews</td>
  518. </table>
  519. </td>
  520.  
  521. <td width="32%%" id=slideshowbuttons>
  522. <p align="center">
  523. <img id=stopButton type=button style="visibility:hidden; Filter:revealTrans(duration=1)" onclick="exitButton()" width="0" height="32" align="right">
  524. <img id=forwButton type=button style="cursor: hand; Filter:revealTrans(duration=1)" value="Forward" onclick="nextImageButton()" width="32" height="32" align="right">
  525. <img id=runButton type=button style="cursor: hand; Filter:revealTrans(duration=1)" value="Play" onclick="runSlidesButton()" width="32" height="32" align="right">
  526. <img id=prevButton type=button style="cursor: hand; Filter:revealTrans(duration=1)" value = "Back" onclick="prevImageButton()" width="32" height="32" align="right">
  527. </td>
  528. </table>
  529.  
  530. <div id=contact style="width: 100%%; display: none"></div>
  531.  
  532. <table id=slideshow style="height:85%%; width: 100%%; display: none">
  533. <tr align=center>
  534. <td valign=center><img id=slidemain style="Filter:revealTrans(duration=1)" onclick=slideClick() src="">
  535. </table>
  536.  
  537. <table id=film style="width: 100%%; display: none">
  538. <tr align=center><td valign=center><img alt="" onclick=nextFilmImage() id=filmmain src="">
  539. </table>
  540.  
  541. <div id=filmthumbs style="width: 100%%; height: 150; display:none; overflow-y: none; overflow-x:scroll"></div>
  542.  
  543. </body>
  544. </html>