var myMainList = new Array(
 "images/home1.jpg",
 "images/home2.jpg",
 "images/home3.jpg",
 "images/home4.jpg",
 "images/home5.jpg",
 "images/home6.jpg",
 "images/home7.jpg",
 "images/home8.jpg",
 "images/home9.jpg",
 "images/home11.jpg",
 "images/home13.jpg",
 "images/home14.jpg",
 "images/home15.jpg",
 "images/home16.jpg",
 "images/home17.jpg",
 "images/home18.jpg",
 "images/home19.jpg",
 "images/home20.jpg") ;
 
 var myMainListSp = new Array(
 "images/home1sp.jpg",
 "images/home2sp.jpg",
 "images/home3sp.jpg",
 "images/home4sp.jpg",
 "images/home5sp.jpg",
 "images/home6sp.jpg",
 "images/home7sp.jpg",
 "images/home8sp.jpg",
 "images/home9sp.jpg",
 "images/home11sp.jpg",
 "images/home13sp.jpg",
 "images/home14sp.jpg",
 "images/home15sp.jpg",
 "images/home16sp.jpg",
 "images/home17sp.jpg",
 "images/home18sp.jpg",
 "images/home19sp.jpg") ;

var myLowerList = new Array(
 "/images/lower1.jpg",
 "/images/lower2.jpg",
 "/images/lower3.jpg",
 "/images/lower4.jpg",
 "/images/lower5.jpg",
 "/images/lower6.jpg",
 "/images/lower7.jpg",
 "/images/lower8.jpg",
 "/images/lower9.jpg",
 "/images/lower11.jpg") ;

function chooseMainImg()
{
 randNum = Math.floor(Math.random()*myMainList.length) ;
 url = myMainList.slice(randNum,randNum+1) ;
 return url ;
}

function chooseMainImgSp()
{
 randNum = Math.floor(Math.random()*myMainListSp.length) ;
 url = myMainListSp.slice(randNum,randNum+1) ;
 return url ;
}

function chooseLowerImg()
{
 randNum = Math.floor(Math.random()*myLowerList.length) ;
 url = myLowerList.slice(randNum,randNum+1) ;
 return url ;
}

function placeRandomImg(ImgType,Sp)
{
 pick = 1 ;
 for (i=0 ; i <= pick-1 ; i++ ) {
   if (ImgType == 1) { 
   	if (Sp == 1) { 
	      var img = chooseMainImgSp() ;
	} else {
	      var img = chooseMainImg() ;
	}
   } else { 
      var img = chooseLowerImg() ;
   } 
   document.write('<img src="'+img+'" border="0">');
 }
}
