home *** CD-ROM | disk | FTP | other *** search
- <ccResource>
- <ccTitle>
- Random Ad Space
- </ccTitle>
- <ccCategory>
- Images
- </ccCategory>
- <ccDescription>
- Produces a randomly generated graphic to use as ad or cool effect.
- </ccDescription>
- <ccInstructions>
-
- </ccInstructions>
- <ccHeadContent>
-
- </ccHeadContent>
- <ccBodyContent>
- <CENTER>
- <Script Language ="JavaScript">
- //Modified by Coffeecup Software
-
- //produces a randomly generated graphic to use as ad or cool effect
-
- function RandomNumber()
- {
- var today = new Date();
- var num= Math.abs(Math.sin(today.getTime()/1000));
- return num;
- }
-
- function RandomGraphics()
- {
- var x = RandomNumber();
-
- if (x > .77)
- {document.write("<A HREF='URL'><img src='image here' align=center hspace=10></a>"); return;
- }
- if (x > .66)
- {document.write("<A HREF='URL'><img src='image here' align=center hspace=10></a>"); return;
- }
- if (x > .55)
- {document.write("<A HREF='URL'><img src='image here' align=center hspace=10></a>"); return;
- }
- if (x > .44)
- {document.write("<A HREF='URL'><img src='image here' align=center hspace=10></a>"); return;
- }
- if (x > .33)
- {document.write("<A HREF='URL'><img src='image here' align=center hspace=10></a>"); return;
- }
- if (x > .22)
- {document.write("<A HREF='URL'><img src='image here' align=center hspace=10></a>"); return;
- }
- if (x > .11)
- {document.write("<A HREF='URL'><img src='image here' align=center hspace=10></a>"); return;
- }
- if (x > 0)
- {document.write("<A HREF='URL'><img src='image here' align=center hspace=10></a>"); return;
- }
- }
-
- RandomGraphics();
-
- //End Script
-
- </SCRIPT>
- </CENTER>
- </ccBodyContent>
- <ccElementContent>
-
- <ccElementName></ccElementName>
- <ccElementAction></ccElementAction>
-
- </ccElementContent>
- <ccExtraData>
-
- </ccExtraData>
- </ccResource>