imgwidth=250
imgheight=150
imgPauseTime=8000
imgSpeed=30
chgLoop=0
imgCount=0
doChg=true
imgId=new Array()
imgSrc=new Array()
imgURL=new Array()
imgId[0]="/index_m.php?ptype=adview&id=58"
imgSrc[0]="/images/advpics/a_2015062526.jpg"
imgURL[0]="由最專業的物流公司配貨.今天訂貨.明天取貨"
imgArray=new Array()
for (x=0;x<=imgSrc.length-1;x++) {
imgArray[x]=new Image()
imgArray[x].src=imgSrc[x]
}
function imgIni() {
doChg=true
imgCount++
if (imgCount>=imgSrc.length){
imgCount=0
}
imgStretch()
}
function imgStretch() {
if(doChg){
if (chgLoop<=100) {
if (document.all) {
imgArea.innerHTML="
"+imgURL[imgCount]+""
}
chgLoop+=10
timer=setTimeout("imgStretch()",imgSpeed)
} else {
chgLoop=100
clearTimeout(timer)
imgArea.innerHTML="
"+imgURL[imgCount]+""
timer=setTimeout("imgShirk()",imgPauseTime)
}
}
}
function imgShirk() {
if(doChg){
if (chgLoop>=0) {
if (document.all) {
imgArea.innerHTML=""
}
chgLoop-=10
timer=setTimeout("imgShirk()",imgSpeed)
} else {
chgLoop=0
clearTimeout(timer)
imgIni()
}
}
}
function mouse_in() {
document.myPic.style.filter="Alpha(Opacity=100)"
doChg=false
}
function mouse_out() {
document.myPic.style.filter="Alpha(Opacity=100)"
doChg=true
clearTimeout(timer)
imgStretch()
}