//don't modify this section! ================================= 
   ad1 = new Image();
   ad2 = new Image();
   ad3 = new Image();
   ad4 = new Image();
   ad5 = new Image();
   ad6 = new Image();
   ad7 = new Image();
   ad8 = new Image();
   ad9 = new Image();
   ad10 = new Image();
   ad11 = new Image();
   ad12 = new Image();
   ad13 = new Image();
   ad14 = new Image();
   ad15 = new Image();
   ad16 = new Image();
   ad17 = new Image();
   ad18 = new Image();
   ad19 = new Image();
   ad20 = new Image();
//============================== modifications start here =================================
//count of available ads
   adscount=16;
 
//Music Subscription  01
   ad1.src = "/images/ads/pcsad_musicsubscription.gif";
   adlink1="/on/wweb/mobile_music.shtml";

//Samsung M620 02
   ad2.src = "/images/ads/pcsad_samsungm620.gif";
   adlink2="/on/pcs/handset_samsung_sph_m620.shtml";
  
//KRAZR 03
   ad3.src = "/images/ads/pcsad_krazr.gif";
   adlink3="/on/pcs/handset_motorola_krzr_k1m.shtml";

//Promises 04 
   ad4.src = "/images/ads/pcsad_promises.gif";
   adlink4="/on/promises/";
 
//Self Service  05
   ad5.src = "/images/ads/pcsad_selfservice.gif";
   adlink5="/on/self_service.shtml";  
   	  
//SPARK  06
   ad6.src = "/images/ads/pcsad_spark.gif";
   adlink6="/on/wweb/index.shtml";

//Games  07
   ad7.src = "/images/ads/pcsad_java_games.gif";
   adlink7="/on/wweb/games.shtml";

//Video Messaging 8
   ad8.src = "/images/ads/pcsad_video_mess.gif";
   adlink8="/on/wweb/picture_messaging.shtml";
  
//Family Plan 9
   ad9.src = "/images/ads/pcsad_family_plan.gif";
   adlink9="/on/plans/pcs/share_plans_home.shtml ";
   
//Msn Messenger 10
  ad10.src = "/images/ads/pcsad_msn.gif";
  adlink10="/on/wweb/instant_messaging.shtml";
  
//XM Radio  11
   ad11.src = "/images/ads/pcsad_xmradio.gif";
   adlink11="/on/wweb/mobile_radio.shtml";

//Navigator  12
   ad12.src = "/images/ads/pcsad_navigator.gif";
   adlink12="/on/wweb/navigator.shtml";   

//Jabra 13
   ad13.src = "/images/ads/pcsad_hbc.gif";
   adlink13="/on/webpromo/";

//Myfaves 14
   ad14.src = "/images/ads/pcsad_fave5.gif";
   adlink14="/on/plans/pcs/myfaves.shtml";

//Fishbowl 15
   ad15.src = "/images/ads/pcsad_fishbowl.gif";
   adlink15="/fishbowl/";
			
//Blank 16
   ad16.src = "/images/ads/pcsad_lg_shine.gif";
   adlink16="/shine/";
			
//Blank 17
   ad17.src = "/images/spacer.gif";
   adlink17="/index.shtml";
			
//Blank 18
   ad18.src = "/images/spacer.gif";
   adlink18="/index.shtml";
			
//Blank 19
   ad19.src = "/images/spacer.gif";
   adlink19="/index.shtml";
			
//Blank 20
   ad20.src = "/images/spacer.gif";
   adlink20="/index.shtml";

//============================== modifications end here =================================
 
//don't modify this section! =================================
 rnd.today=new Date();
 rnd.seed=rnd.today.getTime();

 function rnd() {
         rnd.seed = (rnd.seed*9301+49297) % 233280;
         return rnd.seed/(233280.0);
 };

 function rand(number) {
         return Math.ceil(rnd()*number);
 };

 var step;
 var step2;
 var step3;
 var step4;

 function AdsLoad(){
 //step=rand(adscount);
 step=15;
 step2=rand(adscount); 
 step3=rand(adscount);
 step4=rand(adscount);
 
 while(step2==step){
 	step2=rand(adscount);
 	} 
 while((step3==step) || (step3==step2)){
 	step3=rand(adscount);
 	}
 while((step4==step) || (step4==step2) || (step4==step3)){
 	step4=rand(adscount);
 	}
 
 document.ad1holder.src = eval("ad" + step + ".src");
 document.ad2holder.src = eval("ad" + step2 + ".src");
 document.ad3holder.src = eval("ad" + step3 + ".src");
 document.ad4holder.src = eval("ad" + step4 + ".src");
 }
 
  function RunAds(whichAd) {
	window.location = eval("adlink" + whichAd);
  }
 
