
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_2.jpg';
ToUrl0[1] = 'http://www.xn--hds84jvzfwzdf2d.tw';
Picture0[2]  = '/uno/fileupload/adimg/ad_50.gif';
ToUrl0[2] = 'http://www.工業廠房.tw/';
Picture0[3]  = '/uno/fileupload/adimg/hpgad_625.gif';
ToUrl0[3] = 'http://www.xn--hdsqcu4yz2ak9i47kx5b.tw';
Picture1[1]  = '/uno/fileupload/adimg/ad_70.gif';
ToUrl1[1] = 'http://www.houseweb.com.tw/needbuda.php';
Picture1[2]  = '/uno/fileupload/adimg/ad_287.gif';
ToUrl1[2] = 'http://www.houseweb.com.tw/seo/seorate.php';
Picture1[3]  = '/uno/fileupload/adimg/ad_391.gif';
ToUrl1[3] = 'http://www.houseweb.com.tw/2.php';
Picture2[1]  = '/uno/fileupload/adimg/ad_390.gif';
ToUrl2[1] = 'http://www.xn--fiqqsf0w3hn51bx83b.tw';
Picture2[2]  = '/uno/fileupload/adimg/ad_536.gif';
ToUrl2[2] = 'http://www.桃園房地網.tw';
Picture2[3]  = '/uno/fileupload/adimg/hpgad_761.gif';
ToUrl2[3] = 'http://www.桃園房屋網.tw';
Picture3[1]  = '/uno/fileupload/adimg/smallDef.gif';
ToUrl3[1] = 'http://www.houseweb.com.tw/2.php';
Picture4[1]  = '/uno/fileupload/adimg/ad_558.gif';
ToUrl4[1] = 'http://www.1cc.com.tw';
Picture4[2]  = '/uno/fileupload/adimg/ad_745.gif';
ToUrl4[2] = 'http://www.台中租屋.tw';
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]+"'");
}

