function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function bassSeasonCountdown() {
	now = new Date();
	
	if ((now.getMonth() > 5 || (now.getMonth() == 5 && now.getDate() >= 28) ) && 
		(now.getMonth() < 10 || (now.getMonth() == 10 && now.getDate() <= 30) ) ) {			
		countdown(11, 30, 'until Bass Season ends');
	} else {
		countdown(6, 28, 'until Bass Season');
	}
}
	    
function countdown(month, day, text) {
	now = new Date();
	// javascript uses 0 for janurary..., but 1 for the first day of the month
	// braindamage anyone?
	month--; 

	/* if we've already pass the day this year, we must be counting down
	 * until next year's date
	 */
	if (now.getMonth() > month || 
		(now.getMonth() == month && now.getDate() > day) )
	{
		is_next_year = true;
	} else {
		is_next_year = false;
	}
	
	if (is_next_year) {
		year = now.getFullYear() + 1;
	} else {
		year = now.getFullYear();
	}
	
	next_date = new Date(year, month, day, 0, 0, 0);

	now_ms = now.getTime();
	next_date_ms = next_date.getTime();

	//Find their difference, and convert that into seconds.                  
	diff_s = Math.round((next_date_ms - now_ms) / 1000);
	
	if (diff_s < 0)
		diff_s = 0;  // we'll show 0 on the day
		
	displayCountdown = document.getElementById('countdown');

	if (displayCountdown) {
		//More datailed.
		days = Math.floor(diff_s / (60 * 60 * 24));
		diff_s %= (60 * 60 * 24);
		hours = Math.floor(diff_s / (60 * 60));
		diff_s %= (60 * 60);
		minutes = Math.floor(diff_s / 60);
		diff_s %= 60;
		seconds = diff_s;
		
		displayCountdown.innerHTML = days + 'd ';
		displayCountdown.innerHTML += hours + 'h ';
		displayCountdown.innerHTML += minutes + 'm ';
		displayCountdown.innerHTML += seconds + 's ';
		displayCountdown.innerHTML += text;
	}
	
	setTimeout('bassSeasonCountdown();', 1000);
}