			var largeImage = false;
			var largeImageFlag = 0;	
			var randomNumber = 0;
			var isVisible = new Array(3);
			 isVisible[0]=false;
			 isVisible[1]=false;
			 isVisible[2]=false;
			var theImage=new Array(3);
			 theImage[0]="uses_banner11";
			 theImage[1]="uses_banner22";
			 theImage[2]="uses_banner33";
			//checks if all the images have switched atleast onec before th enext loop
			hasSwitched = new Array(3);
			hasSwitched[0]=false;
			hasSwitched[1]=false;
			hasSwitched[2]=false;
			
			function activateBanner (mainImg){
			   if (mainImg == "1") {
				   document.getElementById('uses_banner1').style.display="block";
				   document.getElementById('uses_banner2').style.display="block";
				   document.getElementById('uses_banner3').style.display="block";
				   setInterval('pickAtRandom()',4000);
			   } else {  
			       largeImage = true;
			       setTimeout('secondOption()',3000);
			   }   
			}
			
			function secondOption (){
			   setInterval('pickAtRandom()',4000);  
			}
			
			function enableUnderLayer () {
			     largeImageFlag=1;
			     document.getElementById('uses_banner1').style.display="block";
				 document.getElementById('uses_banner2').style.display="block";
				 document.getElementById('uses_banner3').style.display="block";
			}
			
			function pickAtRandom ()  {
			 loopAgain = true;
			 while (loopAgain) {
				 randomNumber = Math.floor(Math.random()*5);
				 
				  if (randomNumber <3) {
				      if (!hasSwitched[randomNumber]) {
						  if (isVisible[randomNumber]) {
							  $('#'+theImage[randomNumber]).fadeOut('slow');
							  isVisible[randomNumber]= false;
						  }	 else {
							  $('#'+theImage[randomNumber]).fadeIn('slow');
							  isVisible[randomNumber]= true;
						  } 
					   hasSwitched[randomNumber]=true; 	
						   //recet switcher if all 3 have switched atleast once
						   if   ( hasSwitched[0] &&  hasSwitched[1] &&  hasSwitched[2]) {
							 if (largeImage == true && largeImageFlag ==0)  {
								 setTimeout('enableUnderLayer()',3000);
							 }
							 hasSwitched[0]=false; hasSwitched[1]=false; hasSwitched[2]=false;
						   }
					   loopAgain = false;	   
					  } 
				  }
			  } //while
			}
			
			
			
			///Wide - triple////////////////////////////////////////////////////////////////////////////////////
			////////////////////////////////////////////////////////////////////////////////////////////////////
			function activateBannerTwo (mainImg){  
				 setTimeout('pickAtRandomTwo()',4000);
			}	
			function pickAtRandomTwo ()  {
			     setTimeout('flipIt(0)',1000);
				 setTimeout('flipIt(1)',2000);
				 setTimeout('flipIt(2)',3000);
			}
			function flipIt(theNumber) {
			    $('#'+theImage[theNumber]).fadeIn('slow');
				if (theNumber==2) {
				setTimeout('recetIt()',7000);
				}
			}
			function recetIt() {
			    $('#'+theImage[0]).fadeOut('slow');
			    $('#'+theImage[1]).fadeOut('slow');
			    $('#'+theImage[2]).fadeOut('slow');
				setTimeout('pickAtRandomTwo()',4000);
			}

			//TWO ROW ////////////////////////////////////////////////////////////////////////////////////////////
			//////////////////////////////////////////////////////////////////////////////////////////////////////
			var imgPositions=new Array(9);
			  imgPositions[0]="0px 0px";
			  imgPositions[1]="0px -88px";
			  imgPositions[2]="0px -176px";
			  imgPositions[3]="0px -264px";
			  imgPositions[4]="0px -352px";
			  imgPositions[5]="0px -440px";
			  imgPositions[6]="0px -528px";
			  imgPositions[7]="0px -616px";
			  imgPositions[8]="0px -704px";
			  imgPositions[9]="0px -792px";
			
			var imgPositions2=new Array(9);
			  imgPositions2[0]="-348px 0px";
			  imgPositions2[1]="-348px -88px";
			  imgPositions2[2]="-348px -176px";
			  imgPositions2[3]="-348px -264px";
			  imgPositions2[4]="-348px -352px";
			  imgPositions2[5]="-348px -440px";
			  imgPositions2[6]="-348px -528px";
			  imgPositions2[7]="-348px -616px";
			  imgPositions2[8]="-348px -704px";
			  imgPositions2[9]="-348px -792px";  
			
			var loopCount = 0;  
			var imgCount =0; 

			function activateDouble (theURL, theCount)  {
			     imgURL=theURL;
				 imgCount=theCount;
			     setInterval('pickNext()',5000);
			}

			function pickNext ()  {
			    if (document.getElementById("uses_banner_leftTwo").style.display== "none") {
					theID = "uses_banner_leftTwo";
					theID2 = "uses_banner_rightTwo";
				} else {
					theID = "uses_banner_leftOne";
					theID2 = "uses_banner_rightOne";
				}
				//////if last img then recet loop////
				if (loopCount>=imgCount-1) {
					loopCount=0;
				} else {
					loopCount++; 
				}
				/////////////////////////////////
				document.getElementById(theID).style.background= "url("+imagePath+"/uses/"+imgURL+".jpg) no-repeat "+ imgPositions[loopCount];
				document.getElementById(theID2).style.background= "url("+imagePath+"/uses/"+imgURL+".jpg) no-repeat "+ imgPositions2[loopCount];
				
				if (document.getElementById("uses_banner_leftTwo").style.display== "none") {
					$('#uses_banner_leftTwo').fadeIn('slow');
					$('#uses_banner_rightTwo').fadeIn('slow');
				} else {
					$('#uses_banner_leftTwo').fadeOut('slow');
					$('#uses_banner_rightTwo').fadeOut('slow');
				}
			
			}
			//-------------or Bottom row-------------------
			
			var imgURLBottom =0;
			
			function activateDoubleBottom (theURL, theCount)  {
			     imgURLBottom=theURL;
			     setTimeout('delayBottom()',500);
				 
			}
			
			
			function delayBottom () {
			setInterval('pickNextBottom()',5000);
			}
			
			function pickNextBottom ()  {
			    if (document.getElementById("uses_banner_leftBottomTwo").style.display== "none") {
					theID = "uses_banner_leftBottomTwo";
					theID2 = "uses_banner_rightBottomTwo";
				} else {
					theID = "uses_banner_leftBottomOne";
					theID2 = "uses_banner_rightBottomOne";
					
				}

				////////////if last img then recet loop////
				if (loopCount>=imgCount-1) {
					loopCount=0;
				} else {
					loopCount++; 
				}
				/////////////////////////////////////
				document.getElementById(theID).style.background= "url("+imagePath+"/uses/"+imgURLBottom+".jpg) no-repeat "+ imgPositions[loopCount];
				document.getElementById(theID2).style.background= "url("+imagePath+"/uses/"+imgURLBottom+".jpg) no-repeat "+ imgPositions2[loopCount];
				
				if (document.getElementById("uses_banner_leftBottomTwo").style.display== "none") {
					$('#uses_banner_leftBottomTwo').fadeIn('slow');
					$('#uses_banner_rightBottomTwo').fadeIn('slow');
				} else {
					$('#uses_banner_leftBottomTwo').fadeOut('slow');
					$('#uses_banner_rightBottomTwo').fadeOut('slow');
				}
			
			}
			
			
			/////ACTIVATE WIDE///////////////////////////////////////////////////////////////////////////////
			/////////////////////////////////////////////////////////////////////////////////////////////////
			function activateWide (theURL, theCount) {
			   imgURL=theURL;
		       imgCount=theCount;
			   setInterval('pickNextWide()',7000);
			}
			
			function pickNextWide ()  {
			    if (document.getElementById("uses_banner_WideTwo").style.display== "none") {
					theID = "uses_banner_WideTwo";
				} else {
					theID = "uses_banner_WideOne";
				}
				//////if last img then recet loop////
				if (loopCount>=imgCount-1) {
					loopCount=0;
				} else {
					loopCount++; 
				}
				/////////////////////////////////
				document.getElementById(theID).style.background= "url("+imagePath+"/uses/"+imgURL+".jpg) no-repeat "+ imgPositions[loopCount];
				
				if (document.getElementById("uses_banner_WideTwo").style.display== "none") {
					$('#uses_banner_WideTwo').fadeIn('slow');
				} else {
					$('#uses_banner_WideTwo').fadeOut('slow');
				}
			}
