var delay = 5000;

function start_slides(){
	interval_id = setInterval("slideShow()", delay);	
}

function sec_fadeIn(){
	var fx = new Fx.Styles("adv_search", {duration:300, wait:false});
	fx.start({
		'height': 92,
		'width': 700,
		'left': -0,
		'border-width': 5,
		'opacity': 1
	});
}
		

function sec_fadeOut(){
	var fx = new Fx.Styles("adv_search", {duration:300, wait:false});
	fx.start({
		'height': 0,
		'width': 0,
		'left': 0,
		'border-width': 0,
		'opacity': 0
	});
}

function sec_swapImage(me){
	me.old = me.src;
	me.src = me.src.substr(0, me.src.length-6)+"over.gif";
	me.onmouseout = function(){
		this.src = me.old;
	}
}

function sec_showHide(target){ 
     var elem = document.getElementById(target); 
     if(elem.style.display =="none" || elem.style.display == ""){ 
          elem.style.display="block"; 
     }else{ 
          elem.style.display="none"; 
     } 
}

function slideShow(){
	var rand_count = Math.round(Math.random()*(img_arr.length-1));
	document.getElementById("header_img").src = img_arr[rand_count];
}
