<!-- // BannerAD           

   var bannerAD=new Array();
   var bannerADlink=new Array();
   var adNum=0;

   var adPath="http://www.hkdiscovery.com/Assets/ad/banner/banner_top/";

   bannerAD[0]=adPath + "canon_2.jpg";
   bannerADlink[0]="http://www.canon.com.hk/ixus300hs/index.html?source=CanonHome";
   bannerAD[1]=adPath + "osprey.gif";
   bannerADlink[1]="http://www.ospreypacks.com";
   bannerAD[2]=adPath + "reecho.gif";
   bannerADlink[2]="http://www.reecho.hk";
   bannerAD[3]=adPath + "canon_1.jpg";
   bannerADlink[3]="http://www.canon.com.hk/en/Corporate/Home/Default.aspx#";
   bannerAD[4]=adPath + "cahk_ghkg.jpg";
   bannerADlink[4]="http://www.cahk.org.hk/ghkg_hotspot.htm";


   var preloadedimages=new Array();
   for (i=1;i<bannerAD.length;i++){
      preloadedimages[i]=new Image();
      preloadedimages[i].src=bannerAD[i];
	adNum= Math.floor(Math.random()*5);
   }

function setTransition(){
   if (document.all){
      bannerADrotator.filters.revealTrans.Transition=Math.floor(Math.random()*5);
      bannerADrotator.filters.revealTrans.apply();
   }
}

function playTransition(){
   if (document.all)
      bannerADrotator.filters.revealTrans.play()
}

function nextAd(){
   if(adNum<bannerAD.length-1)adNum++ ;
      else adNum=0;
   setTransition();
   document.images.bannerADrotator.src=bannerAD[adNum];
   playTransition();
   theTimer=setTimeout("nextAd()", 4000);
}

function jump2url(){
   jumpUrl=bannerADlink[adNum];
   jumpTarget='_blank';
   if (jumpUrl != ''){
      if (jumpTarget != '')window.open(jumpUrl,jumpTarget);
      else location.href=jumpUrl;
   }
}
function displayStatusMsg() { 
   status=bannerADlink[adNum];
   document.returnValue = true;
}

//-->