24
by Timo Jyrinki
news_kokoukset.js - häxor-versio news.js:stä jotta saa foorumin yläreunaan automaattisesti päivittyvän kokousinfon. |
1 |
<!--
|
2 |
//Cross Fading News Ticker - Copyright (
|
|
3 |
// c) 2002, Nick Radford
|
|
4 |
//Use this script as you want... though
|
|
5 |
// give me credit for it!
|
|
6 |
||
7 |
NewsDelay=5000 //Time each story is displayed for |
|
8 |
NewsFadeDelay=0 //Time taken to fade from one story to the next |
|
9 |
NewsFont='sans' //Ticket font family |
|
10 |
NewsFontSize='10px' //Ticket font size |
|
25
by Timo Jyrinki
Väri forum.ubuntu-fi.org:n muiden uutisten mukaiseksi. |
11 |
NewsTextColor=new Array("#5c2e00") |
24
by Timo Jyrinki
news_kokoukset.js - häxor-versio news.js:stä jotta saa foorumin yläreunaan automaattisesti päivittyvän kokousinfon. |
12 |
//NewsTextColor=new Array("#000000","#111111","#222222","#333333","#444444","#555555","#666666","#777777","#888888","#999999","#aaaaaa","#bbbbbb","#cccccc","#dddddd","#eeeeee","#ffffff")
|
13 |
//NewsTextColor=new Array("#0f0e08","#1e1c11","#2e2919","#3d3721","#4c4529","#5b5332","#6a613a","#7a6e42","#897c4a","#988a53","#a7985b","#b6a663","#c6b36b","#d5c174","#e4cf7c")
|
|
14 |
NewsStory=0 //Working Variable |
|
15 |
LastNewsStory=0 //Working Variable |
|
16 |
NewsColor=0 //Working Variable |
|
17 |
||
18 |
function include(url) |
|
19 |
{
|
|
20 |
var head = document.getElementsByTagName('head')[0]; |
|
21 |
script = document.createElement('script'); |
|
22 |
script.src = url; |
|
23 |
script.type = 'text/javascript'; |
|
24 |
head.appendChild(script) |
|
25 |
}
|
|
26 |
||
27 |
include("http://www.vapaasuomi.fi/htdocs/u/kokoukset.php?src=ikalenteri&chan=n&num=6&desc=1&date=n&targ=n&html=n"); |
|
28 |
||
29 |
if (NewsArray = "") NewsArray=new Array(" ", " "); |
|
30 |
||
31 |
function DisplayNews(){ |
|
32 |
if (NewsArray.length < 3) return; |
|
33 |
LastNewsStory=NewsStory |
|
34 |
NewsStory++; if( NewsStory>(Math.floor(NewsArray.length/2)) ){NewsStory=1} |
|
35 |
FadeNews() |
|
36 |
}
|
|
37 |
||
38 |
function FadeNews(){ |
|
39 |
if (NewsColor<(NewsTextColor.length)/2){var NewsLayer=1} |
|
40 |
else {var NewsLayer=2} |
|
41 |
//Old Story
|
|
42 |
||
43 |
if (LastNewsStory>0){ |
|
44 |
var NewsText = '<a style="text-decoration:none;" href="'+ NewsArray[(LastNewsStory-1)*2+1] +'"><font color="'+ NewsTextColor[NewsColor] +'">'+ NewsArray[(LastNewsStory-1)*2] +'</font></a>' |
|
45 |
if(document.layers){ document.eval('newslayer'+(3-NewsLayer)).document.write(NewsText); document.eval('newslayer'+(3-NewsLayer)).document.close() }//NN4 |
|
46 |
if(document.all){ eval('newslayer'+(3-NewsLayer)).innerHTML=NewsText }//IE |
|
47 |
if(!document.all && document.getElementById){ document.getElementById('newslayer'+(3-NewsLayer)).innerHTML=NewsText }//NN6 |
|
48 |
}
|
|
49 |
//New Story
|
|
50 |
var NewsText = '<a style="text-decoration:none;" href="'+ NewsArray[(NewsStory-1)*2+1] +'"><font color="'+ NewsTextColor[(NewsTextColor.length)-NewsColor-1] +'">'+ NewsArray[(NewsStory-1)*2] +'</font></a>' |
|
51 |
if(document.layers){ document.eval('newslayer'+NewsLayer).document.write(NewsText); document.eval('newslayer'+NewsLayer).document.close() }//NN4 |
|
52 |
if(document.all){ eval('newslayer'+NewsLayer).innerHTML=NewsText }//IE |
|
53 |
if(!document.all && document.getElementById){ document.getElementById('newslayer'+NewsLayer).innerHTML=NewsText; }//NN6 |
|
54 |
NewsColor++ |
|
55 |
if (NewsColor>=NewsTextColor.length){ NewsColor=0; setTimeout('DisplayNews()',NewsDelay) } |
|
56 |
else { setTimeout('FadeNews()',NewsFadeDelay/NewsTextColor.length) } |
|
57 |
}
|
|
58 |
||
59 |
//-->
|
|
60 |