home *** CD-ROM | disk | FTP | other *** search
/ PC User 2005 May / CD / PCU0505CD.iso / software / full / coffecup / files / html2005.exe / %MAINDIR% / Javascript / RandomImageLoad.xml < prev    next >
Encoding:
Text File  |  2005-02-16  |  1.0 KB  |  48 lines

  1. <ccResource>
  2.   <ccTitle>
  3. Random Image Load       
  4.   </ccTitle>
  5.   <ccCategory>
  6. Images
  7.   </ccCategory>
  8.   <ccDescription>
  9.  Replace the image names with your own. You cam also add images by pasting another line of ccPics. Just make sure to keep the numbers sequential.
  10.   </ccDescription>
  11.   <ccInstructions>
  12.  
  13.   </ccInstructions>
  14.   <ccHeadContent>
  15.  
  16.   </ccHeadContent>
  17.   <ccBodyContent>
  18. <SCRIPT LANGUAGE="JavaScript">
  19.  
  20. <!-- Script supplied with CoffeeCup HTML Editor -->
  21. <!--             www.coffeecup.com              -->
  22.  
  23. var ccPics = new Array()
  24.  
  25. ccPics[1] = "alarmclock.bmp"
  26. ccPics[2] = "armytank.jpg"
  27. ccPics[3] = "balloons.jpg"
  28. ccPics[4] = "baby.bmp"
  29.  
  30. var cc = Math.floor(Math.random() * ccPics.length)
  31. if (cc == 0) {
  32.   cc = 1
  33. }
  34. document.write("<img src='"+ccPics[cc]+"' border=0>")
  35.  
  36. </SCRIPT>
  37.   </ccBodyContent>
  38.   <ccElementContent>
  39.   
  40.    <ccElementName></ccElementName>
  41.    <ccElementAction></ccElementAction>
  42.    
  43.   </ccElementContent>
  44.   <ccExtraData>
  45.  
  46.   </ccExtraData>
  47. </ccResource>
  48.