$(document).ready(function () {

			 
			 showing = $('#focusImageSet div.focusImage:first'); // Initiate the showing variable as the first rotating_item
			 showing.siblings().hide(); // Hide all other rotating_items
			 setInterval("show_next_rotating_item(showing)", 5000); // Set the rotate time to 5 seconds
});
			 
			 
			 
			// Below is the code that picks an item at random to display
			jQuery.jQueryRandom = 0;  
			jQuery.extend(jQuery.expr[":"],  
			{  
			    random: function(a, i, m, r) {  
			        if (i == 0) {  
			            jQuery.jQueryRandom = Math.floor(Math.random() * r.length);  
			        };  
			        return i == jQuery.jQueryRandom;  
			    }  
			
			});
			
			
			
			// The below function repeatedly gets called, to do the rotating of the focus images
			function show_next_rotating_item(t){
			 jQuery(t).fadeOut('slow');
			 
			 var next_rotating_item = jQuery(t).siblings('.focusImage:random');
			 if(!next_rotating_item.attr('class')){
			  next_rotating_item = jQuery('#focusImageSet div.focusImage:first');
			 }
			 next_rotating_item.fadeIn('slow');
			 
			 showing = next_rotating_item; 
			}
			
					
			
			
			function blah(num) {alert("Blah" + num);}
			
			/*
			function onLoadScripts(func,param) { 
				  var oldonload = window.onload; 
				  if (typeof window.onload != 'function') { 
				    window.onload = func; 
				  } else { 
				    window.onload = function() { 
				      if (oldonload) { 
				        oldonload(); 
				      } 
				      func(param); 
				    } 
				  } 
				} 
				 
			
			
			
			onLoadScript(blah,2); 		
			onLoadScript(P7_initPM,(1,3,1,-20,10));	 
			*/
			
			
			function onloadFunc(func) {
			
				func  = 'P7_initPM(1,3,1,-20,10); blah(2);';	
				
				return func;
				
				reload();
			
			/*
				var keepCalls = document.onload.value;
					alert(keepCalls);
			
				keepCalls = keepCalls.replace('onloadFunc(); ', '');
				
				alert(keepCalls.value);
			*/
				
				
				
			}

