home *** CD-ROM | disk | FTP | other *** search
- <ccResource>
- <ccTitle>
- Display Time
- </ccTitle>
- <ccCategory>
- Clocks
- </ccCategory>
- <ccDescription>
- Displays the current system time to the visitor of your site.
- </ccDescription>
- <ccInstructions>
-
- </ccInstructions>
- <ccHeadContent>
- <script language="JavaScript">
- <!--
- var Temp;
- setClock();
- function setClock() {
- CC_Time = "";
- now = new Date();
- var CurHour = now.getHours();
- var CurMinute = now.getMinutes();
- now = null;
- if( CurHour > 12 ) {
- CurHour = CurHour - 12;
- ampm = 1;
- }
- else
- ampm = 0;
- if( CurHour == 0 )
- CurHour = 12;
- if( CurMinute < 10 )
- CurMinute = "0" + CurMinute;
- CurHour = "<FONT SIZE=2><B>" + CurHour + ":" + CurMinute + "</B>";
- if( ampm == 1 )
- CurHour = CurHour + " P.M.";
- else
- CurHour = CurHour + " A.M.";
- Temp = CurHour;
- }
- function pathOnly (InString) {
- LastSlash=InString.lastIndexOf ('/', InString.length-1)
- OutString=InString.substring (0, LastSlash+1)
- return (OutString);
- }
- // -->
- </script>
- </ccHeadContent>
- <ccBodyContent>
- <script>
- document.write( Temp );
- </script>
- </ccBodyContent>
- <ccElementContent>
-
- <ccElementName></ccElementName>
- <ccElementAction></ccElementAction>
-
- </ccElementContent>
- <ccExtraData>
-
- </ccExtraData>
- </ccResource>