/*
Up down slideshow Script
By Dynamic Drive (www.dynamicdrive.com)
For full source code, terms of use, and 100's more scripts, visit http://www.dynamicdrive.com
*/
///////configure the below four variables to change the style of the slider///////
//set the scrollerwidth and scrollerheight to the width/height of the LARGEST image in your slideshow!
var scrollerwidth='100%'
var scrollerheight='55px'
//3000 miliseconds=3 seconds
var pausebetweenimages=3000
//configure the below variable to change the images used in the slideshow. If you wish the images to be clickable, simply wrap the images with the appropriate tag
var slideimages=new Array()
//extend this list
slideimages[0]='
 | 基隆北海岸 | Keelung |
25 | 22 |
'
slideimages[1]=' | 台北縣 | Taipei County |
25 | 22 |
'
slideimages[2]=' | 台北市 | Taipei City |
25 | 23 |
'
slideimages[3]=' | 桃園縣市 | Taoyuan |
26 | 23 |
'
slideimages[4]=' | 新竹縣市 | Hsinchu |
26 | 23 |
'
slideimages[5]=' | 苗栗縣市 | Miaoli |
24 | 21 |
'
slideimages[6]=' | 宜蘭縣市 | Ilan |
25 | 22 |
'
slideimages[7]=' | 花蓮縣市 | Hualien County |
26 | 23 |
'
slideimages[8]=' | 台東縣市 | Taitung |
27 | 23 |
'
slideimages[9]=' | 台中縣市 | Taichung |
29 | 24 |
'
slideimages[10]=' | 彰化縣市 | Changhua |
29 | 24 |
'
slideimages[11]=' | 南投縣市 | Nantou |
28 | 23 |
'
slideimages[12]=' | 雲林縣市 | Yunlin |
29 | 23 |
'
slideimages[13]=' | 嘉義縣市 | Chiayi |
29 | 23 |
'
slideimages[14]=' | 台南縣市 | Tainan |
29 | 24 |
'
slideimages[15]=' | 高雄縣 | Kaohsiung |
29 | 25 |
'
slideimages[16]=' | 高雄市 | Kaohsiung City |
29 | 25 |
'
slideimages[17]=' | 屏東縣市 | Pingtung |
29 | 25 |
'
slideimages[18]=' | 恆春半島 | Hengchun |
29 | 25 |
'
slideimages[19]=' | 澎湖 | Penghu |
27 | 24 |
'
slideimages[20]=' | 金門 | Kinmen |
26 | 22 |
'
slideimages[21]=' | 馬祖 | Matsu |
24 | 21 |
'
///////Do not edit pass this line///////////////////////
var ie=document.all
var dom=document.getElementById
if (slideimages.length>2)
iWeather=2
else
iWeather=0
function move1(whichlayer){
tlayer=eval(whichlayer)
if (tlayer.top>0&&tlayer.top<=5){
tlayer.top=0
setTimeout("move1(tlayer)",pausebetweenimages)
setTimeout("move2(document.main.document.second)",pausebetweenimages)
return
}
if (tlayer.top>=tlayer.document.height*-1){
tlayer.top-=5
setTimeout("move1(tlayer)",50)
}
else{
tlayer.top=parseInt(scrollerheight)
tlayer.document.write(slideimages[iWeather])
tlayer.document.close()
if (iWeather==slideimages.length-1)
iWeather=0
else
iWeather++
}
}
function move2(whichlayer){
tlayer2=eval(whichlayer)
if (tlayer2.top>0&&tlayer2.top<=5){
tlayer2.top=0
setTimeout("move2(tlayer2)",pausebetweenimages)
setTimeout("move1(document.main.document.first)",pausebetweenimages)
return
}
if (tlayer2.top>=tlayer2.document.height*-1){
tlayer2.top-=5
setTimeout("move2(tlayer2)",50)
}
else{
tlayer2.top=parseInt(scrollerheight)
tlayer2.document.write(slideimages[iWeather])
tlayer2.document.close()
if (iWeather==slideimages.length-1)
iWeather=0
else
iWeather++
}
}
function move3(whichdiv){
tdiv=eval(whichdiv)
//2個都輪播完時
if (parseInt(tdiv.style.top)>0&&parseInt(tdiv.style.top)<=5){
tdiv.style.top=0+"px"
setTimeout("move3(tdiv)",pausebetweenimages)
setTimeout("move4(second2_obj)",pausebetweenimages)
//alert('return');
return
}
if (parseInt(tdiv.style.top)>=tdiv.offsetHeight*-1){
tdiv.style.top=parseInt(tdiv.style.top)-5+"px"
setTimeout("move3(tdiv)",50)
}else{
//alert('i++,i='+i)
tdiv.style.top=scrollerheight
tdiv.innerHTML=slideimages[iWeather]
if (iWeather==slideimages.length-1)
iWeather=0
else
iWeather++
}
}
function move4(whichdiv){
tdiv2=eval(whichdiv)
if (parseInt(tdiv2.style.top)>0&&parseInt(tdiv2.style.top)<=5){
tdiv2.style.top=0+"px"
setTimeout("move4(tdiv2)",pausebetweenimages)
setTimeout("move3(first2_obj)",pausebetweenimages)
return
}
if (parseInt(tdiv2.style.top)>=tdiv2.offsetHeight*-1){
tdiv2.style.top=parseInt(tdiv2.style.top)-5+"px"
setTimeout("move4(second2_obj)",50)
}else{
tdiv2.style.top=scrollerheight
tdiv2.innerHTML=slideimages[iWeather]
if (iWeather==slideimages.length-1)
iWeather=0
else
iWeather++
}
}
function startscroll(){
//alert("startscroll")
if (ie||dom){
//alert('move3')
first2_obj=ie? first2 : document.getElementById("first2")
second2_obj=ie? second2 : document.getElementById("second2")
move3(first2_obj)
second2_obj.style.top=scrollerheight
second2_obj.style.visibility='visible'
}else if (document.layers){
//alert('move1')
document.main.visibility='show'
move1(document.main.document.first)
document.main.document.second.top=parseInt(scrollerheight)+5
document.main.document.second.visibility='show'
}
}
//window.onload=startscroll