<!-- Lists all hares from today and upto the end of the chosen (current) month, no one is listed -->
<!-- from any month before the month of today (current month	--> 

<!-- Godt omskrevet (og forkortet) ift den opprinnelige versjonen, som også var omskrevet og -->
<!-- forkortet ift versjonen fra Internett. Pr okt 2005 ser den ut til å fungere, selv om det -->
<!-- inneholdt en del kode som jeg ikke kunne skjønne skulle fungere. Dette er (delvis) fjernet -->

<!-- Det sjekkes ikke for aktivieteter som strekker seg over flere måneder, slik som i den opprinnelig koden -->
<!-- Scriptet lister kun BH3 aktiviteter både vanlige og spesielle løp, og ikke løp organisert av andre H3 -->

function HaresCheckDate(year,month,dayno,currM){
	var retval = "";
	var done = false;
	var m = month + 1;
	
	for(var app = 0; app < TheRuns.length; app++){
		if (TheRuns[app][iYear]==year){
			if (TheRuns[app][iH3Club]=="BH3"){
				if (TheRuns[app][iFromMonth]==m && m >= currM){
					if (dayno >= TheRuns[app][iFromDay] && dayno <= TheRuns[app][iToDay]){
						retval = "<tr><td>" + dayno + "&nbsp;";
						
						var anyString = months[month];
						retval += anyString.charAt(0) + anyString.charAt(1) + anyString.charAt(2);
						
						retval += "</td>" + "<td>#" + TheRuns[app][iRunNo] + "&nbsp;</td>" + "<td align='left'>" + TheRuns[app][iHares] + "</td></tr>"; 
						document.write(retval);
						done = true;
					}
				}
			}
		}
	}
	return done;
}


function AllHares(){
	var today = new Date();
	var thisMonth = (today.getMonth());   <!-- Current month -->
	var day = today.getDate();
	var foundIt = false;

<!-- The Next two lines were added as the original 'var currY = today.getYear();' only functioned with IE	-->
	var now = new Date ;
	var currY = now.getFullYear() ;

	for (month = 0; month <= 11; month++){
		if (month > thisMonth){
			day = 0;
		}
		for (var j = day ; j < (daycounts[month] + 1) ; j++){
			foundIt = HaresCheckDate(currY,month,j,thisMonth+1);
		}
	}
	
<!-- Displays Hares for the first months of the following year	-->	
	if (thisMonth >= 10){
		currY ++ ;
		month = 0 ;
	
		for (month = 0; month <= 1; month++){
			day = 0;
			for (var j = day ; j < (daycounts[month] + 1) ; j++){
				foundIt = HaresCheckDate(currY,month,j,0);
			}
		}
	}
}