var tss;
var iss;
var SlideShowSpeed = 4000; //切換時間(毫秒)
var CrossFadeDuration = 0; //淡入淡出時間(秒)

var Picture0 = new Array(); 
var ToUrl0 = new Array(); 
var Note0 = new Array();
var Picture1 = new Array(); 
var ToUrl1 = new Array(); 
var Note1 = new Array();
var Picture2 = new Array(); 
var ToUrl2 = new Array(); 
var Note2 = new Array();
var Picture3 = new Array(); 
var ToUrl3 = new Array(); 
var Note3 = new Array();
var Picture4 = new Array(); 
var ToUrl4 = new Array(); 
var Note4 = new Array();
Picture0[1]  = '/uno/fileupload/adimg/ad_50.gif';
ToUrl0[1] = 'http://www.xn--esttv34f93j.tw';
Picture0[2]  = '/uno/fileupload/adimg/ad_625.gif';
ToUrl0[2] = 'http://www.xn--hdsqcu4yz2ak9i47kx5b.tw';
Picture0[3]  = '/uno/fileupload/adimg/hpgad_899.gif';
ToUrl0[3] = 'http://www.xn--vuq18ohrp0o5buecz4j.tw';
Picture1[1]  = '/uno/fileupload/adimg/ad_70.gif';
ToUrl1[1] = 'http://www.4919998.tw';
Picture1[2]  = '/uno/fileupload/adimg/ad_391.jpg';
ToUrl1[2] = 'http://www.houseweb.com.tw/pro/edm/cloud_edm.html';
Picture1[3]  = '/uno/fileupload/adimg/ad_803.gif';
ToUrl1[3] = 'http://www.xn--fiqp7j1ropujm4at6w.tw';
Picture2[1]  = '/uno/fileupload/adimg/ad_807.jpg';
ToUrl2[1] = 'http://www.xn--hds84jvzfwzdf2d.tw';
Picture2[2]  = '/uno/fileupload/adimg/ad_826.jpg';
ToUrl2[2] = 'http://www.xn--ihq79i24j2nj2tt.tw';
Picture3[1]  = '/uno/fileupload/adimg/ad_38.gif';
ToUrl3[1] = 'http://www.xn--1qqp12ajnd.tw/';
Picture3[2]  = '/uno/fileupload/adimg/ad_798.gif';
ToUrl3[2] = 'http://www.xn--3kr69fgd963e29p6l1c.tw';
Picture3[3]  = '/uno/fileupload/adimg/ad_846.gif';
ToUrl3[3] = 'http://www.蕭耀南.tw';
Picture4[1]  = '/uno/fileupload/adimg/ad_558.gif';
ToUrl4[1] = 'http://www.houseweb.com.tw/pro/news.php';
Picture4[2]  = '/uno/fileupload/adimg/ad_745.jpg';
ToUrl4[2] = 'http://xfuture.org/contract_groups?tag=0ea0c34d-7231-412e-87b7-a097c889a4b9';
r0=Math.round(Math.random()*(Picture0.length-2))+1;
var jss0 = r0;
var pss0 = Picture0.length-1;
r1=Math.round(Math.random()*(Picture1.length-2))+1;
var jss1 = r1;
var pss1 = Picture1.length-1;
r2=Math.round(Math.random()*(Picture2.length-2))+1;
var jss2 = r2;
var pss2 = Picture2.length-1;
r3=Math.round(Math.random()*(Picture3.length-2))+1;
var jss3 = r3;
var pss3 = Picture3.length-1;
r4=Math.round(Math.random()*(Picture4.length-2))+1;
var jss4 = r4;
var pss4 = Picture4.length-1;
var preLoad0 = new Array();
for (iss = 1; iss < pss0+1; iss++){
preLoad0[iss] = new Image();
preLoad0[iss].src = Picture0[iss];
}
var preLoad1 = new Array();
for (iss = 1; iss < pss1+1; iss++){
preLoad1[iss] = new Image();
preLoad1[iss].src = Picture1[iss];
}
var preLoad2 = new Array();
for (iss = 1; iss < pss2+1; iss++){
preLoad2[iss] = new Image();
preLoad2[iss].src = Picture2[iss];
}
var preLoad3 = new Array();
for (iss = 1; iss < pss3+1; iss++){
preLoad3[iss] = new Image();
preLoad3[iss].src = Picture3[iss];
}
var preLoad4 = new Array();
for (iss = 1; iss < pss4+1; iss++){
preLoad4[iss] = new Image();
preLoad4[iss].src = Picture4[iss];
}

function runSlideShow(){
jss0 = jss0 + 1;
 if (jss0 > (pss0)) jss0=1;
jss1 = jss1 + 1;
 if (jss1 > (pss1)) jss1=1;
jss2 = jss2 + 1;
 if (jss2 > (pss2)) jss2=1;
jss3 = jss3 + 1;
 if (jss3 > (pss3)) jss3=1;
jss4 = jss4 + 1;
 if (jss4 > (pss4)) jss4=1;
if (document.all){
document.images.PictureBox0.style.filter="blendTrans(duration=2)";
 document.images.PictureBox0.style.filter="blendTrans(duration=CrossFadeDuration)";
 document.images.PictureBox0.filters.blendTrans.Apply();
document.images.PictureBox1.style.filter="blendTrans(duration=2)";
 document.images.PictureBox1.style.filter="blendTrans(duration=CrossFadeDuration)";
 document.images.PictureBox1.filters.blendTrans.Apply();
document.images.PictureBox2.style.filter="blendTrans(duration=2)";
 document.images.PictureBox2.style.filter="blendTrans(duration=CrossFadeDuration)";
 document.images.PictureBox2.filters.blendTrans.Apply();
document.images.PictureBox3.style.filter="blendTrans(duration=2)";
 document.images.PictureBox3.style.filter="blendTrans(duration=CrossFadeDuration)";
 document.images.PictureBox3.filters.blendTrans.Apply();
document.images.PictureBox4.style.filter="blendTrans(duration=2)";
 document.images.PictureBox4.style.filter="blendTrans(duration=CrossFadeDuration)";
 document.images.PictureBox4.filters.blendTrans.Apply();
}
document.images.PictureBox0.src = preLoad0[jss0].src;
 if (document.all) document.images.PictureBox0.filters.blendTrans.Play();
document.images.PictureBox1.src = preLoad1[jss1].src;
 if (document.all) document.images.PictureBox1.filters.blendTrans.Play();
document.images.PictureBox2.src = preLoad2[jss2].src;
 if (document.all) document.images.PictureBox2.filters.blendTrans.Play();
document.images.PictureBox3.src = preLoad3[jss3].src;
 if (document.all) document.images.PictureBox3.filters.blendTrans.Play();
document.images.PictureBox4.src = preLoad4[jss4].src;
 if (document.all) document.images.PictureBox4.filters.blendTrans.Play();

tss = setTimeout('runSlideShow()', SlideShowSpeed);
}
function clickBanner0(){
	window.location=ToUrl0[jss0]
}
function clickBanner1(){
	window.location=ToUrl1[jss1]
}
function clickBanner2(){
	window.location=ToUrl2[jss2]
}
function clickBanner3(){
	window.location=ToUrl3[jss3]
}
function clickBanner4(){
	window.location=ToUrl4[jss4]
}
function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}


