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+' ...... version = ' +navigator.appVersion + ' ..... '); if(bw.indxof!=-1)document.write('('+ bw.indxof + ')'); document.write(' 

'); } //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 WrDate(){ setupdom(); 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; }//if (sear(document // temp =document.links[i].href // temp1 = temp.search("pc=")+3; // temp1 = temp.substr(temp1,6); // temp1 = temp1.toLowerCase(); // fred = findObj(temp1); // temp = "nodis()" // document.links[i].onMouseOut =temp ; // temp = 'msger' // temp = 'dispc("'+locat+'")' // document.links[i].onMouseOver = temp; 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(sear(document.links[i].id ,'menuLink')){ }else{ 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 "+dom+"... click to see the next 28 days" document.links[i].alt = "today is the "+dom+"... click to see the next 28 days" document.links[i].id = "dom" + i } //document.links[i].id != "dom" } // for } //function WrDate() 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; } WrDate(); 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; // 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 dispc(mess){ //alert(mess); var obj= findObj('postcode'); mess = mess.substr(0,mess.length-3)+" "+mess.substr(mess.length-3,3) obj.value = " PostCode is "+ mess+' click for map'; obj= findObj('pcodes'); obj.style.visibility = 'visible'; } function nodis(){ var obj= findObj('pcodes'); obj.style.visibility = 'hidden'; } function Nomsg(){seeit=0; notnow = 4; if (firefoxy){notnow=4;} slower = 1; positer= 5; if (firefoxy) {notnow=5;} self.status=goforit; } //document.write("
"); //document.write('
'); function findObj(theObj, theDoc) { var p, i, foundObj; if(!theDoc) theDoc = document; if( (p = theObj.indexOf("?")) > 0 && parent.frames.length) { theDoc = parent.frames[theObj.substring(p+1)].document; theObj = theObj.substring(0,p); } if(!(foundObj = theDoc[theObj]) && theDoc.all) foundObj = theDoc.all[theObj]; for (i=0; !foundObj && i < theDoc.forms.length; i++) foundObj = theDoc.forms[i][theObj]; for(i=0; !foundObj && theDoc.layers && i < theDoc.layers.length; i++) foundObj = findObj(theObj,theDoc.layers[i].document); if(!foundObj && document.getElementById) foundObj = document.getElementById(theObj); return foundObj; }