var nsiof = (navigator.appName.indexOf("Netscape") != -1);; var d = document;; var px = document.layers ? "" : "px";; var dayis = 0 ;; var hhh = 4 ;; var runit = 0 ;; var mm1 = "Map of " ;; var mm2 = "Detail " ;; var mm3 = "the location" ;; var linktxt="2" ;; var fr = window.self.name ;; // do not set alt if in frames var codespresent = true ;; if(fr==""){ document.write('
in case of difficulty  tell Mr Red '); document.write(' & quote -  browser = ' +navigator.appName+' ...... '); document.write(' version = ' +navigator.appVersion + ' ..... (' + bw.msindex + ') 

'); } //if(fr=="") //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 getDomString(num) 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 ; var locat; Dimw = 31; Duffw = new Date(dater); // dater is mS Dmw = Duffw.getMonth() + 1 ; DuffYearw = Duffw.getYear() ; DuffStrw = DuffYearw.toString() ; // alert(dater+" "+DmC+" "+Duffw); 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++){ if (document.links[i].hash == "#today"){document.links[i].href = "#" + WrDateStr;} if (sear(document.links[i].href,"ltimap")) { // alert( i+" . "+document.links[i].href); if (sear(document.links[i].href,"pc=")) { locat = mm1 + getpc(document.links[i].href); } // if (sear(document.links[i].href,"pc=")) else{ locat = mm1 + mm3; } // if (sear(document.links[i].href,"pc=")) if (sear(document.links[i].href,"scale=5")) {locat = "Detail " + locat;} document.links[i].alt = locat ; document.links[i].title = locat ; document.links[i].target = "_blank";; } //sear(document.links[i].href,"ltimap") if (document.links[i].id != "dom") { if ((document.links[i].alt == "")){ document.links[i].alt = document.links[i].href ; if ((document.links[i].title == "")){ document.links[i].title = document.links[i].href; } } //if ((document.links[i].alt == "")) if ((document.links[i].title == "")){ if (navigator.appName != "Opera" ) {document.links[i].title = document.links[i].href;} if ((document.links[i].alt == "")){ document.links[i].alt = document.links[i].href } } // if ((document.links[i].title == "")) } //document.links[i].id != "dom" else { document.links[i].title = "today is the "+DuffDayw +" "+ WrDateStr+"... click to see the next 28 days" document.links[i].alt = "today is the "+DuffDayw +" "+ WrDateStr+"... click to see the next 28 days" document.links[i].id = "dom" + i } //document.links[i].id != "dom" } // for return DuffDayw +" "+ WrDateStr; } //function WrDate(dater,DmC) function getpc(lookat){ var outer = ""; var souter; qq = 0; souter = ""; rr = lookat.length; for(ii=0; ii < lookat.length ; ii++){ if (lookat.charAt(ii) == "="){ qq = ii+1;} if (lookat.charAt(ii) == "&"){ rr = ii-qq; ii=255; } } outer = lookat.substr(qq,rr); // alert (outer+" 1 "+outer.length); for(ii=0; ii < outer.length ; ii++){ if (outer.charAt(ii) == "%"){ souter = outer.substr(0,ii) +"_"+outer.substr(ii+3,outer.length);} if (outer.charAt(ii) == " "){ souter = outer.substr(0,ii) +"_"+outer.substr(ii+1,outer.length);} } if (souter==""){ souter = outer.substr(0,outer.length-3)+"_"+outer.substr(outer.length-3,5);} return souter; } function sear(lookat,forthis){ var same = false ; var nn = 0; var qq = 0; if (lookat.length == 0 ) {return false;} if (forthis.length == 0 ) {return false;} for(ii=0; ii < lookat.length ; ii++){ if (lookat.charAt(ii) == forthis.charAt(0)){ qq = 1; if (lookat.length <= (forthis.length + ii) ) {return false;} for (nn=1; nn < forthis.length ; nn++){ if (lookat.charAt(ii+nn) == forthis.charAt(nn)) { qq = ++qq; } else{ nn = 255; qq = 0; } } if (qq == forthis.length) {return true} } } return false; } theDate = new Date(); var DC = theDate.getMonth() ; DimSec = theDate.getTime() ; var dom = WrDate(DimSec,DC); var slower =1; var delay = 10; 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 temp1 = 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 warner= ".links to Flash sites can be verrrrry slow without broadband"; var goforit = sayit[3]; if (self.name != "mainFrame" ){ document.write("
"); document.write(goforit); document.write("
"); } // alert(sayit[3]); var nss ; var nse; Nomsg; // Start the status bar text cycling StartScrolling() function linkit(){ if(fr==""){ for(i=0; i < document.links.length ; i++){ linkid= document.links[i].id; if (linkid == "flash") { document.links[i].id = "flash"+i; (bw.ie)?document.links[i].title=warner:document.links[i].title=warner; // ie6^ ? } linktxt = document.links[i].text; if (linktxt) { linktxtl = linktxt.length; if (linktxtl >= 2) {linktxtl = linktxt.substring(linktxtl-2,linktxtl);} if (linktxtl == " #") { linktxt = "# flash"; }// if linktxtl } //if linktxt if (linktxt) linktxt=linktxt.substring(0,1); document.links[i].onmouseout = Nomsg; if (linktxt == "#"||linkid=="flash") { document.links[i].onmouseover = Flasher ; } //if (linktxt) else{ if (sear(document.links[i].href,"ltimap")) { document.links[i].onmouseover = pctxt ; codespresent=true; } else{ document.links[i].onmouseover = msger ; } } //else Nomsg; } // for } // if fr == "" } // function linkit() function StartScrolling(){ StopTheClock() DoTheScroll() } function StopTheClock(){ if(timerRunning) clearTimeout(timerID) timerRunning = false } function DoTheScroll(){ if(bw.ie) { if (self.name != "mainFrame" ){ document.all.item('test').filters.alpha.opacity = document.all.item('test').filters.alpha.opacity-hhh; if (document.all.item('test').filters.alpha.opacity <=15) hhh=-4; if (document.all.item('test').filters.alpha.opacity >=90) hhh= 4; } } if(runit++ ==2) { runit = 10; linkit(); } delay = 400; if(temp1 == 4) { self.status= goforit ; } //if(temp1 == 4) notnow = notnow - 1 ; if (notnow<2){ itisin=0; notnow=1; self.status = sayit[positer]; } // if (notnow<2) if (notnow>1){ } //if (notnow>1) positer=positer+1; if(positer>4){positer=0;} if (positer == 1) {delay = 3000;} if (positer == 4) {delay = 4000 + (++slower)*100;} timerRunning = true; temp1=temp1-1; if (temp1 < 0) {temp1=0;} timerID = self.setTimeout("DoTheScroll()", delay); } function Flasher(){ seeit=1; notnow = 30; if (itisin==0) { slower = 1; temp1=10; itisin = 1; } goforit = warner; if (firefoxy) {notnow=15;} } //function function msger(){ seeit=0; if (itisin == 0) { notnow = 20; slower = 1; itisin = 1; } goforit = sayit[3]; if (firefoxy) {notnow=10;} } function pctxt(){ seeit=0; if (itisin == 0) { notnow = 20; slower = 1; itisin = 1; } goforit = sayit[3]; if (firefoxy) {notnow=10;} } function Nomsg(){seeit=0; notnow = 4; if (firefoxy){notnow=4;} slower = 1; positer= 5; if (firefoxy) {notnow=5;} self.status=goforit; }