// JavaScript Document
<!--
var roll_over_control = number;
var roll_over_control_store = number;
var auto = 1;
var timer = 0;
function roll_over(num)
   {
	   
   //remove blue surround
   		theid = "p"+roll_over_control_store;
   theElement = document.getElementById(theid);
  	theElement.style.backgroundImage = "";
	theElement.style.backgroundColor = "";
   
   for(x = 1; x < (number+1); x++){
   theid = "card"+x;
   theElement = document.getElementById(theid);
  	theElement.style.zIndex = x;
   
   
   }
   
	theid = "card"+num;
   theElement = document.getElementById(theid);
  	theElement.style.zIndex = (number+1);
	

	
		theid = "p"+num;
   theElement = document.getElementById(theid);
  	theElement.style.backgroundImage = "none";
	theElement.style.backgroundColor = "#000099";
    roll_over_control = num;
	
	//save number
	roll_over_control_store = num;  
	
	//turn off auto
	auto=0;
	
	
	             
	
   }
   
   
   function roll_over1(num)
   {
//say as above but called from auto
   
   for(x = 1; x < (number+1); x++){
	
   theid = "card"+x;

   theElement = document.getElementById(theid);

  
  	theElement.style.zIndex = x;
   
   
   }
   
	theid = "card"+num;
   theElement = document.getElementById(theid);
  	theElement.style.zIndex = (number+1);
	

	
		theid = "p"+num;
   theElement = document.getElementById(theid);
  	theElement.style.backgroundImage = "none";
	theElement.style.backgroundColor = "#000099";

	              
	
   }
   
   
  
   function set_num(num)
   {   
     
  	//turn on auto
	auto = 1;    
   
   }
   
      
   function roll_out()
   {
	
	

	
	 //turn on
	   auto = 1;
	
	
   }
   
   
   
   
   function roll_out1(num)
   {
	
	
		theid = "p"+num;
   theElement = document.getElementById(theid);
  	theElement.style.backgroundImage = "";
	theElement.style.backgroundColor = "";
	

	
	
   }
   
function contoler(){ 
  if (auto){
 	
 	  //get rid of blue 
   	  roll_out1(roll_over_control);
  
      //move to next
      roll_over_control++;
      if (roll_over_control == (number+1)){
         roll_over_control = 1;
        }

 
      // emulate a roll-over
      roll_over1(roll_over_control);
      roll_over_control_store = roll_over_control;
 
    }
    setTimeout("contoler();",10000);
}
   

	window.onload = function(){ contoler(); }

//-->