var dayis = 0; var firstin = true; var once = false; var wotshit; var uk2 = String.fromCharCode(99,111,110,116,97,99,116,64,99,104,101,108,116,101,110,104,97,109,46,111,114,103,46,117,107); var waiter = String.fromCharCode(99,111,110,116,97,99,116,64,99,104,101,108,116,101,110,104,97,109,46,111,114,103,46,117,107); goaway = "!NG$HJ"; document.myform.warn.value = "dont forget the e-mail address ?" ; // put a warning document.write('
in case of difficulty  let me know '); document.write('  & quote -  browser = ' +navigator.appName+' ...... '); document.write(' version = ' +navigator.userAgent + ' .....  

'); var wotsit =document.myform.recipient.value; var wot10 = "uk2net"; // document.write(" version = " +navigator.appVersion+" ..... ("+bw.shit+")
"); // emailclear() // if no javascript then no button message // status text scrolling program with halt on mouse move - //This script calculates the which days of the month a given day of the week is // programmer is Mr Red of cresby.com fame. He can be contacted from his website with a webmail form. function getDomString(num) { var dow; //Create a local variable to hold the string. dow="5th"; if (num < 8) dow="1st"; else if (num < 15) dow="2nd"; else if (num < 22) dow="3rd"; else if (num < 29) dow="4th"; return dow; } function WrDate(dater,DmC) { var Dmw ; var Dimw ; var Duffw ; var DufStrw = new String('') ; var DuffYearw ; var DuffDayw = new String('') ; var DimSecw = 1 ; var Colw = new String('#F0F0FF'); var WrDateStr ; var WrMonthStr ; var na ; Dimw = 31; Duffw = new Date(dater); // dater is mS Dmw = Duffw.getMonth() + 1 ; DuffYearw = Duffw.getYear() ; DuffStrw = DuffYearw.toString() ; if (Dmw << 12) { Duffw = new Date(DuffYearw.toString(),Dmw.toString(),'1','4','0','0','0') ; DimSecw = Duffw.getTime() - 86400000; // No of mS in a day Duffw = new Date(DimSecw) ; Dimw = Duffw.getDate() ; } Duffw = new Date(dater) ; DuffDayw = getDomString(Duffw.getDate()) ; DimSecw = Dimw-Duffw.getDate; if ( (Dimw-Duffw.getDate()) < 7) DuffDayw = DuffDayw + ' & Last'; DuffStrw = Duffw.toString() ; WrDateStr = DuffStrw.substr(0,3) ; na = Duffw.getDate() ; for(i=0; i < document.links.length ; i++){ //alert(document.links[i].id ) if (document.links[i].id == "email") { document.links[i].alt = "email me"; document.links[i].title = "email me"; document.links[i].id = "dom" + i; } if (document.links[i].id == "dom") { document.links[i].title = "today is the "+DuffDayw +" "+ WrDateStr+"... click to see the next 28 days"; document.links[i].id = "dom" + i } if (document.links[i].title == ""){ document.links[i].alt = document.links[i].href ; document.links[i].title = document.links[i].href ; } } return DuffDayw +" "+ WrDateStr } theDate = new Date(); var DC = theDate.getMonth() ; DimSec = theDate.getTime() ; var dom = WrDate(DimSec,DC); var slower =1; var delay = 0; var startPos = 100; var ns=(document.layers); var ie=(document.all); var firefoxy=!(ns||ie); var timerID = null; var timerRunning = false; var positer = 2; var notnow = 3 ;// hold-off var shit = 0; var itisin = 0; sayit = new Array(); sayit[0] = "cresby.com"; sayit[1] = " "; sayit[2] = " "+dom; sayit[3] = "today is the "+dom+" of this month"; sayit[4] = " "; sayit[5] = " "; var goforit = sayit[3]; var nss ; var nse; // Crank it up! StartScrolling() var wot5 ; var wot3; var wotS = 3; wot10 = wotsit.substr(0,7) ; function StartScrolling(){ StopTheClock() DoTheScroll() } function StopTheClock(){ if(timerRunning) clearTimeout(timerID) timerRunning = false } function DoTheScroll(){ if (delay !=0){ if (wot5 != "waitrose"){ wot3 = wotsit.substr(8); if (wot10 = wotsit.substr(0,7) ) { wot5 = "waitrose"; wotshit = wot10 + "1" + wot3; } } delay = 400; } if(shit == 4) { self.status= goforit ; } //if(shit == 4) notnow = notnow - 1 ; if (notnow<2){ itisin=0; notnow=1; self.status = sayit[positer]; } // if (notnow<2) if (notnow>1){ } //if (notnow>1) if (-1 == --wotS) { if (document.myform.fool.value == "getlost@cresby.com") wotshit = waiter; if (document.myform.fool.value != "getlost@cresby.com") wotshit = uk2; document.myform.recipient.value = wotshit; } positer=positer+1; if(positer>4){positer=0;} if (positer == 1) { delay = 3000; } if (positer == 4) { delay = 4000 + (++slower)*100; theDate = new Date(); if (firstin){ emailclear(); firstin = false ; } document.myform.dateis.value = theDate.toString() ; } if ((document.myform.email.value != "no_reply@none.com") && (emailCheck(goaway))){ document.myform.changer.value = "..." ; document.myform.submit.value = "click here to send"; } if (emailCheck(goaway) == true) { document.myform.warn.value = " "; document.myform.submit.value = "click here to send"; } if (emailCheck(goaway) == false) {document.myform.warn.value = "is the e-mail a valid address ?"; } timerRunning = true; shit=shit-1; if (shit < 0) {shit=0;} timerID = self.setTimeout("DoTheScroll()", delay); } /* 1.1.3: Amended error messages and allowed script to deal with new TLDs 1.1.2: Fixed a bug where trailing . in e-mail address was passing (the bug is actually in the weak regexp engine of the browser; I simplified the regexps to make it work). 1.1.1: Removed restriction that countries must be preceded by a domain, so abc@host.uk is now legal. 1.1: Rewrote most of the function to conform more closely to RFC 822. 1.0: Original */ function emailclear(){ document.myform.changer.value = "click to ignore e-mail addr (= no reply)"; document.myform.email.value = "youremail@your_isp.com"; document.myform.about.value = "subject of message"; document.myform.realname.value = " "; document.myform.message.value = "Dear Mr Red Just wanted to say..... "; } function emailanon() { document.myform.email.value = "no_reply@none.com"; document.myform.changer.value = "*** email address valid ***"; // document.myform.submit.value = "Send Message"; } function emailChecked () {once = false;} function emailCheck (emailStr) { nolook = false; justch = false; if (emailStr == "!NG$HJ") { justch = true; emailStr = document.myform.email.value ; } // emailStr == once = true ; lenf = document.myform.email.value.length ; if ("youremail@your_isp.com" != document.myform.email.value){ for(i=0; i < lenf ; i++){ if (i == 1){nolook = true; } if (document.myform.email.value.substring(i,i+1) == "@"){nolook = false;} if (document.myform.email.value.substring(i,i+1) == " "){ if (nolook == false){ emailStr = emailStr.substring(0,i) + emailStr.substring(i+1); document.myform.email.value = emailStr ; } // nolook == true } // == " " } //for(i=0; } // "youremail@your_isp.com" != if (document.myform.email.value == ""){ if (justch == false){ alert("no email address yet")} return false; } if (document.myform.email.value == "youremail@your_isp.com"){ if (justch == false){ crlf = unescape("%0A") + unescape("%09") ; crlf = crlf ; document.myform.submit.value = " email doesn't" + crlf +"look valid " + crlf + "but click here to send"+ crlf + "if you wish"; // fred = prompt("please give an e-mail address - even if it is billgates@msn.com." + crlf + " type anon to be - er - anonymous ", "e-mail?") // if( fred == "e-mail?" ) { fred="youremail@your_isp.com";} // if( fred == null ) { fred="youremail@your_isp.com";} // document.myform.email.value = fred ; // if( fred == "anon" ) { emailanon() } // document.myform.submit.value = "Send Message"; // no_reply@none.com } return false; } if (document.myform.email.value == "no_reply@none.com"){ document.myform.changer.value="" ; document.myform.submit.value = "Send Message"; return true; } /* The following pattern is used to check if the entered e-mail address fits the user@domain format. It also is used to separate the username from the domain. */ var emailPat=/^(.+)@(.+)$/ /* The following string represents the pattern for matching all special characters. We don't want to allow special characters in the address. These characters include ( ) < @ , ; : \ " . [ ] */ var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]"; /* The following string represents the range of characters allowed in a username or domainname. It really states which chars aren't allowed. */ var validChars="\[^\\s" + specialChars + "\]"; /* The following pattern applies if the "user" is a quoted string (in which case, there are no rules about which characters are allowed and which aren't; anything goes). E.g. "jiminy cricket"@disney.com is a legal e-mail address. */ var quotedUser="(\"[^\"]*\")" /* The following pattern applies for domains that are IP addresses, rather than symbolic names. E.g. joe@[123.124.233.4] is a legal e-mail address. NOTE: The square brackets are required. */ var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/ /* The following string represents an atom (basically a series of non-special characters.) */ var atom=validChars + '+'; /* The following string represents one word in the typical username. For example, in john.doe@somewhere.com, john and doe are words. Basically, a word is either an atom or quoted string. */ var word="(" + atom + "|" + quotedUser + ")"; // The following pattern describes the structure of the user var userPat=new RegExp("^" + word + "(\\." + word + ")*$"); /* The following pattern describes the structure of a normal symbolic domain, as opposed to ipDomainPat, shown above. */ var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$"); /* Finally, let's start trying to figure out if the supplied address is valid. */ /* Begin with the coarse pattern to simply break up user@domain into different pieces that are easy to analyze. */ var matchArray=emailStr.match(emailPat) if (matchArray==null) { /* Too many/few @'s or something; basically, this address doesn't even fit the general mould of a valid e-mail address. */ if (justch == false){ alert("Email address seems incorrect (check @ and .'s)")} return false; } var user=matchArray[1] var domain=matchArray[2] // See if "user" is valid if (user.match(userPat)==null) { // user is not valid if (justch == false){ alert("The part of your email address before the '@' doesn't seem to be valid.")} return false; } /* if the e-mail address is at an IP address (as opposed to a symbolic host name) make sure the IP address is valid. */ var IPArray=domain.match(ipDomainPat) if (IPArray!=null) { // this is an IP address for (var i=1;i<=4;i++) { if (IPArray[i]>255) { if (justch == false){ alert("Destination IP address is invalid!")} return false; } } return true } // Domain is symbolic name var domainArray=domain.match(domainPat) if (domainArray==null) { if (justch == false){ alert("Part of your email address after the '@' doesn't seem to be valid")} return false; } /* domain name seems valid, but now make sure that it ends in a three-letter word (like com, edu, gov) or a two-letter word, representing country (uk, nl), and that there's a hostname preceding the domain or country. */ /* Now we need to break up the domain to get a count of how many atoms it consists of. */ var atomPat=new RegExp(atom,"g"); var domArr=domain.match(atomPat); var len=domArr.length; if (domArr[domArr.length-1].length<2 || domArr[domArr.length-1].length>6) { // the address must end in a two letter or other TLD including museum if (justch == false){ alert("The address must end in a top level domain (e.g. .com), or two letter country.")} return false; } // Make sure there's a host name preceding the domain. if (len<2) { var errStr="This address is missing a hostname!"; if (justch == false){ alert(errStr)} return false ; } // If we've got this far, everything's valid! return true; } // End -->