home *** CD-ROM | disk | FTP | other *** search
- <ccResource>
- <ccTitle>
- Site Alert
- </ccTitle>
- <ccCategory>
- Browser
- </ccCategory>
- <ccDescription>
- A simple login and password script
- </ccDescription>
- <ccInstructions>
- The code goes only inside the BODY tags. You can change the items below to suit your needs.
- </ccInstructions>
- <ccHeadContent>
-
- </ccHeadContent>
- <ccBodyContent>
- <script>
-
- var alertmessage="Welcome to CoffeeCup! \n http://www.coffeecup.com"
-
- ///No editing required beyond here/////
-
- //Alert only once per browser session (0=no, 1=yes)
- var once_per_session=1
-
-
- function get_cookie(Name) {
- var search = Name + "="
- var returnvalue = "";
- if (document.cookie.length > 0) {
- offset = document.cookie.indexOf(search)
- if (offset != -1) { // if cookie exists
- offset += search.length
- // set index of beginning of value
- end = document.cookie.indexOf(";", offset);
- // set index of end of cookie value
- if (end == -1)
- end = document.cookie.length;
- returnvalue=unescape(document.cookie.substring(offset, end))
- }
- }
- return returnvalue;
- }
-
- function alertornot(){
- if (get_cookie('alerted')==''){
- loadalert()
- document.cookie="alerted=yes"
- }
- }
-
- function loadalert(){
- alert(alertmessage)
- }
-
- if (once_per_session==0)
- loadalert()
- else
- alertornot()
-
- </script>
-
- </ccBodyContent>
- <ccElementContent>
-
- <ccElementName></ccElementName>
- <ccElementAction></ccElementAction>
-
- </ccElementContent>
- <ccExtraData>
-
- </ccExtraData>
- </ccResource>
-