PageSourceSearch

http://oswestry-history.co.uk/obhag-meetings.js

js oswestry-history.co.uk collected 2026-10-02 14:22:28 UTC 4,642 bytes, 103 lines download raw bytes

1/***********************************************
2* Fading Scroller- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
3* This notice MUST stay intact for legal use
4* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
5***********************************************/
6
7var delay = 6000; //set delay between message change (in miliseconds)
8var maxsteps=30; // number of steps to take to change from start color to endcolor
9var stepdelay=40; // time in miliseconds of a single step
10//**Note: maxsteps*stepdelay will be total time in miliseconds of fading effect
11var startcolor= new Array(255,255,255); // start color (red, green, blue)
12var endcolor=new Array(0,0,0); // end color (red, green, blue)
13
14var fcontent=new Array();
15begintag='<div style="font: normal 14px Arial; padding: 5px; background: yellow; vertical-align: middle;text-align: center;">'; //set opening tag, such as font declarations
16fcontent[0]="<a href='http://www.pastcaring.com/obhag'><img style='vertical-align:middle' src='thumbs/obhag-tiny-th.jpeg' width='60' height='35' alt='Click to visit' title='Oswestry &amp; Border History &amp; Archaeology Group - Click to visit'></a><b>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; COMING SOON !! &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </b><img style='vertical-align:middle' src='thumbs/obhag-tiny-th.jpeg' width='60' height='35' alt=''>";
17fcontent[1]="<a href='http://www.pastcaring.com/obhag'><img style='vertical-align:middle' src='thumbs/obhag-tiny-th.jpeg' width='60' height='35' alt='Click to visit' title='Oswestry &amp; Border History &amp; Archaeology Group - Click to visit'></a>&nbsp;Fri 17th Jun OBHAG Evening Talk - <a href='http://oswestry-history.co.uk/posters/OBHAG-2022-Programme-19-5-2022.pdf'>Buried in the Borderlands</a>";
18fcontent[2]="&nbsp;Every Monday &amp; Friday - <a href='http://www.shropshire.gov.uk/library.nsf/open/FFAD4D758B3AAB2E80256CD2004AD81C'>Oswestry Library</a> <br><a href='http://www.pastcaring.com/obhag/family-history-poster/index.htm'>Weekly Family &amp; Local History Sessions</a>";
19closetag='</div>';
20
21var fwidth='510px'; //set scroller width
22var fheight='45px'; //set scroller height
23
24var fadelinks=1;  //should links inside scroller content also fade like text? 0 for no, 1 for yes.
25
26///No need to edit below this line/////////////////
27
28
29var ie4=document.all&&!document.getElementById;
30var DOM2=document.getElementById;
31var faderdelay=0;
32var index=0;
33
34
35/*Rafael Raposo edited function*/
36//function to change content
37function changecontent(){
38  if (index>=fcontent.length)
39    index=0
40  if (DOM2){
41    document.getElementById("fscroller").style.color="rgb("+startcolor[0]+", "+startcolor[1]+", "+startcolor[2]+")"
42    document.getElementById("fscroller").innerHTML=begintag+fcontent[index]+closetag
43    if (fadelinks)
44      linkcolorchange(1);
45    colorfade(1, 15);
46  }
47  else if (ie4)
48    document.all.fscroller.innerHTML=begintag+fcontent[index]+closetag;
49  index++
50}
51
52// colorfade() partially by Marcio Galli for Netscape Communications.  ////////////
53// Modified by Dynamicdrive.com
54
55function linkcolorchange(step){
56  var obj=document.getElementById("fscroller").getElementsByTagName("A");
57  if (obj.length>0){
58    for (i=0;i<obj.length;i++)
59      obj[i].style.color=getstepcolor(step);
60  }
61}
62
63/*Rafael Raposo edited function*/
64var fadecounter;
65function colorfade(step) {
66  if(step<=maxsteps) {	
67    document.getElementById("fscroller").style.color=getstepcolor(step);
68    if (fadelinks)
69      linkcolorchange(step);
70    step++;
71    fadecounter=setTimeout("colorfade("+step+")",stepdelay);
72  }else{
73    clearTimeout(fadecounter);
74    document.getElementById("fscroller").style.color="rgb("+endcolor[0]+", "+endcolor[1]+", "+endcolor[2]+")";
75    setTimeout("changecontent()", delay);
76	
77  }   
78}
79
80/*Rafael Raposo's new function*/
81function getstepcolor(step) {
82  var diff
83  var newcolor=new Array(3);
84  for(var i=0;i<3;i++) {
85    diff = (startcolor[i]-endcolor[i]);
86    if(diff > 0) {
87      newcolor[i] = startcolor[i]-(Math.round((diff/maxsteps))*step);
88    } else {
89      newcolor[i] = startcolor[i]+(Math.round((Math.abs(diff)/maxsteps))*step);
90    }
91  }
92  return ("rgb(" + newcolor[0] + ", " + newcolor[1] + ", " + newcolor[2] + ")");
93}
94
95if (ie4||DOM2)
96  document.write('<div id="fscroller" style="border:1px solid black;width:'+fwidth+';height:'+fheight+'"></div>');
97
98if (window.addEventListener)
99window.addEventListener("load", changecontent, false)
100else if (window.attachEvent)
101window.attachEvent("onload", changecontent)
102else if (document.getElementById)
103window.onload=changecontent

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.