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

  1. <ccResource>
  2.   <ccTitle>
  3. Random Title
  4.   </ccTitle>
  5.   <ccCategory>
  6. Browser
  7.   </ccCategory>
  8.   <ccDescription>
  9. Changes the Browser's Title randomly.
  10.   </ccDescription>
  11.   <ccInstructions>
  12. You can add more titles by copying the code below. Just make sure the numbers are sequential.
  13.   </ccInstructions>
  14.   <ccHeadContent>
  15.   <SCRIPT LANGUAGE="JavaScript">
  16.  
  17. <!-- Script supplied with CoffeeCup HTML Editor -->
  18. <!--             www.coffeecup.com              -->
  19.  
  20. <!-- You can add more titles by copying the code below --->
  21. <!-- Just make sure the numbers are sequential --->
  22.  
  23. var CoffeeTitles = new Array()
  24.  
  25. CoffeeTitles[1] = "Visit CoffeeCup Software for the best HTML Editor on the Planet"
  26. CoffeeTitles[2] = "MMMMMMM... Caffeine!"
  27. CoffeeTitles[3] = "Brewing software one cup at a time."
  28.  
  29. var ccrn = Math.floor(Math.random() * CoffeeTitles.length)
  30. if (ccrn == 0) {
  31.   ccrn = 1
  32. }
  33.  
  34. document.title = CoffeeTitles[ccrn]
  35.  
  36. </SCRIPT>
  37.   </ccHeadContent>
  38.   <ccBodyContent>
  39.  
  40.   </ccBodyContent>
  41.   <ccElementContent>
  42.   
  43.    <ccElementName></ccElementName>
  44.    <ccElementAction></ccElementAction>
  45.    
  46.   </ccElementContent>
  47.   <ccExtraData>
  48.  
  49.   </ccExtraData>
  50. </ccResource>