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("