var Years = 						[00000,00000,	[2,0,0,0, , , ],	[2,0,0,1, , , ],	[2,0,0,2, , , ],	[2,0,0,3, , , ],	[2,0,0,4, , , ],	[2,0,0,5, , , ],	[2,0,0,6, , , ],	[2,0,0,7, , , ],	[2,0,0,8, , , ],	[2,0,0,9, , , ],	[2,0,1,0, , , ]];
var Windsor_Downtown = 	[12008,,			[1,1,1,1,1,1,0],	[1,1,1,1,1,1,0],	[1,1,1,1,1,1,0],	[1,1,1,1,0,1,1],	[1,1,1,1,1,1,1],	[1,1,1,1,1,1,1],	[1,1,1,1,1,1,1],	[1,1,1,1,1,1,1],	[1,1,1,1,1,1,1],	[1,1,1,1,1,1,1],	[1,1,1,1,1,1,1]];
var Windsor_West = 		  [12016,,			[1,1,1,1,0,1,0],	[1,1,1,1,0,1,0],	[1,1,1,1,0,1,0],	[1,1,1,1,0,1,1],	[1,1,1,1,0,1,1],	[1,1,1,1,0,1,1],	[1,1,1,1,0,1,1],	[1,1,1,1,0,1,1],	[1,1,1,1,0,1,1],	[1,1,1,1,0,1,1],	[1,1,1,1,0,1,1]]; 
var Chatham=						[13001,,			[0,0,0,0,0,0,0],	[0,0,0,0,0,0,0],	[0,0,0,0,0,0,0],	[0,0,0,0,0,0,0],	[0,0,0,0,0,0,0],	[1,1,1,1,1,1,1],	[1,1,1,1,1,1,1],	[1,1,1,1,1,1,1],	[1,1,1,1,1,1,1],	[1,1,1,1,0,1,1],	[1,1,1,1,0,1,1]];
var Merlin = 						[13021,,			[0,0,0,0,0,1,0],	[0,0,0,0,0,1,0],	[0,0,0,0,0,1,0],	[0,0,0,0,0,1,1],	[0,0,0,0,0,1,1],	[0,0,0,0,0,0,0],	[0,0,0,0,0,0,0],	[0,0,0,0,0,0,0],	[0,0,0,0,0,0,0],	[0,0,0,0,0,0,0],	[0,0,0,0,0,0,0]]; 
var Sarnia = 						[14064,,			[1,1,1,1,1,1,0],	[1,1,1,1,1,1,0],	[1,1,1,1,0,1,0],	[1,1,1,1,0,1,1],	[1,1,1,1,0,1,1],	[1,1,1,1,0,1,1],	[1,1,1,1,0,1,1],	[1,1,1,1,0,1,1],	[1,1,1,1,0,1,1],	[1,1,1,1,0,1,1],	[1,1,1,1,0,1,1]]; 
var Grand_Bend = 				[15020,,			[0,0,0,0,0,1,0],	[0,0,0,0,0,1,0],	[0,0,0,0,0,1,0],	[0,0,0,0,0,1,1],	[0,0,0,0,0,1,1],	[0,0,0,0,0,1,1],	[0,0,0,0,0,1,1],	[0,0,0,0,0,1,1],	[0,0,0,0,0,1,1],	[0,0,0,0,0,1,1],	[0,0,0,0,0,1,1]]; 
var London = 						[15025,,			[1,1,1,1,1,1,0],	[1,1,1,1,1,1,0],	[1,1,1,1,1,1,0],	[0,1,1,1,0,1,1],	[1,1,1,1,1,1,1],	[1,1,1,1,1,1,1],	[1,1,1,1,1,1,1],	[1,1,1,1,1,1,1],	[1,1,1,1,1,1,1],	[1,1,1,1,1,1,1],	[1,1,1,1,1,1,1]]; 
var Port_Stanley = 			[16015,,			[0,0,0,0,0,0,0],	[0,0,0,0,0,0,0],	[0,0,0,0,0,1,0],	[0,0,0,0,0,1,1],	[0,0,0,0,0,1,1],	[0,0,0,0,0,1,1],	[0,0,0,0,0,1,1],	[0,0,0,0,0,1,1],	[0,0,0,0,0,1,1],	[0,0,0,0,0,1,1],	[0,0,0,0,0,1,1]]; 
var Tiverton = 					[18007,,			[0,0,0,0,0,1,0],	[0,0,0,0,0,1,0],	[0,0,0,0,0,1,0],	[0,0,0,0,0,1,1],	[0,0,0,0,0,1,1],	[0,0,0,0,0,1,1],	[0,0,0,0,0,1,1],	[1,1,1,1,0,1,1],	[1,1,1,1,0,1,1],	[1,1,1,1,0,1,1],	[1,1,1,1,0,1,1]]; 
var Brantford = 				[21005,,			[0,0,0,0,0,0,0],	[0,0,0,0,0,0,0],	[0,0,0,0,0,0,0],	[0,0,0,0,0,0,0],	[1,1,1,1,1,1,1],	[1,1,1,1,0,1,1],	[1,1,1,1,0,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1]]; 
var Simcoe = 						[22071,,			[1,1,1,1,0,1,0],	[1,1,1,1,0,1,0],	[1,1,1,1,0,1,0],	[0,0,0,0,0,1,1],	[0,0,0,0,0,0,0],	[0,0,0,0,0,0,0],	[0,0,0,0,0,0,0],	[0,0,0,0,0,0,0],	[0,0,0,0,0,0,0],	[0,0,0,0,0,0,0],	[0,0,0,0,0,0,0]]; 
var Kitchener = 				[26060,,			[1,1,1,1,1,1,0],	[1,1,1,1,1,1,0],	[1,1,1,1,1,1,0],	[1,0,0,0,1,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1],	[1,1,1,1,0,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1]]; 
var St_Catharines = 		[27067,,			[1,1,1,1,0,1,0],	[1,0,0,0,1,1,0],	[1,1,1,1,1,1,0],	[0,0,0,0,0,1,1],	[0,0,0,0,0,1,1],	[0,1,1,1,0,1,1],	[1,1,1,1,0,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1]]; 
var Guelph = 						[28028,,			[0,0,0,0,0,1,0],	[0,1,1,1,0,1,0],	[0,1,1,1,0,1,0],	[0,0,0,0,0,1,1],	[0,0,0,0,0,1,1],	[0,0,0,0,0,1,1],	[0,0,0,0,0,1,1],	[0,0,0,0,0,1,1],	[0,0,0,0,0,1,1],	[0,0,0,0,0,1,1],	[0,0,0,0,0,1,1]]; 
var Hamilton_Downtown = [29000,,			[1,1,1,1,1,1,0],	[1,1,1,1,0,1,0],	[1,1,1,1,1,1,0],	[1,1,1,1,0,1,1],	[1,1,1,1,1,1,1],	[1,1,1,1,1,1,1],	[1,1,1,1,1,1,1],	[1,1,1,1,1,1,1],	[1,1,1,1,1,1,1],	[1,1,1,1,1,1,1],	[1,1,1,1,1,1,1]]; 
var Hamilton_Mountain = [29114,,			[1,0,0,0,0,1,0],	[1,1,1,1,0,1,0],	[1,1,1,1,0,1,0],	[1,1,1,1,0,1,1],	[0,0,0,0,0,1,1],	[0,0,0,0,0,1,1],	[1,1,1,1,0,1,1],	[1,1,1,1,0,1,1],	[1,1,1,1,0,1,1],	[1,1,1,1,0,1,1],	[1,1,1,1,0,1,1]]; 
var Hamilton_West = 		[29118,,			[1,1,1,1,1,1,0],	[1,1,1,1,1,1,0],	[1,1,1,1,1,1,0],	[0,1,1,1,1,1,1],	[0,0,0,0,0,1,1],	[0,0,0,0,0,1,1],	[0,0,0,0,0,1,1],	[0,0,0,0,0,1,1],	[0,0,0,0,0,1,1],	[0,0,0,0,0,1,1],	[0,0,0,0,0,1,1]]; 
var Toronto_Downtown = 	[31103,,			[0,1,1,1,0,1,0],	[0,1,1,1,0,1,0],	[0,1,1,1,0,1,0],	[1,1,1,1,1,1,1],	[1,1,1,1,1,1,1],	[1,1,1,1,1,1,1],	[1,1,1,1,1,1,1],	[1,1,1,1,1,1,1],	[1,1,1,1,1,1,1],	[1,1,1,1,1,1,1],	[1,1,1,1,1,1,1]]; 
var Toronto_East = 			[33003,,			[0,1,1,1,0,1,0],	[0,1,1,1,0,1,0],	[0,1,1,1,0,1,0],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1]]; 
var Toronto_North = 		[34020,,			[0,1,1,1,0,1,0],	[0,1,1,1,0,1,0],	[0,1,1,1,0,1,0],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1]]; 
var Toronto_West = 			[35003,35125, [1,1,1,1,0,1,0],	[1,1,1,1,0,1,0],	[0,1,1,1,0,1,0],	[1,1,1,1,1,1,1],	[1,1,1,1,1,1,1],	[1,1,1,1,1,1,1],	[1,1,1,1,1,1,1],	[1,1,1,1,1,1,1],	[1,1,1,1,1,1,1],	[1,1,1,1,1,1,1],	[1,1,1,1,1,1,1]]; 
var Burlington = 				[44008,,			[0,1,1,1,0,1,0],	[0,1,1,1,1,1,0],	[0,1,1,1,0,1,0],	[1,1,1,1,1,1,1],	[1,1,1,1,1,1,1],	[1,1,1,1,0,1,1],	[1,1,1,1,0,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1]]; 
var Oakville = 	   			[44015,44017, [0,1,1,1,0,1,0],	[1,1,1,1,1,1,0],	[1,1,1,1,1,1,0],	[1,1,1,1,1,1,1],	[1,1,1,1,1,1,1],	[1,1,1,1,0,1,1],	[1,1,1,1,0,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1]]; 
var Oshawa = 	   				[45026,45025, [0,1,1,1,0,1,0],	[0,1,1,1,0,1,0],	[0,1,1,1,0,1,0],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1]]; 
var Brampton = 					[46089,,			[1,1,1,1,0,1,0],	[1,1,1,1,0,1,0],	[1,1,1,1,0,1,0],	[1,1,1,1,1,1,1],	[1,1,1,1,1,1,1],	[1,1,1,1,0,1,1],	[1,1,1,1,0,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1]]; 
var Mississauga = 			[46109,46110, [0,1,1,1,0,1,0],	[0,1,1,1,0,1,0],	[0,1,1,1,0,1,0],	[1,1,1,1,0,1,1],	[1,0,0,0,1,1,1],	[1,0,0,0,0,1,1],	[1,0,0,0,0,1,1],	[0,0,0,0,0,1,1],	[0,0,0,0,0,1,1],	[0,0,0,0,0,1,1],	[0,0,0,0,0,1,1]]; 
var Mississauga2 = 			[46108,46109, [0,1,1,1,0,1,0],	[0,1,1,1,0,1,0],	[0,1,1,1,0,1,0],	[1,1,1,1,0,1,1],	[1,0,0,0,1,1,1],	[1,0,0,0,0,1,1],	[1,0,0,0,0,1,1],	[0,0,0,0,0,1,1],	[1,1,1,1,0,1,1],	[1,1,1,1,0,1,1],	[1,1,1,1,0,1,1]]; 
//var Barrie = 					[47045,,			[0,0,0,0,0,0,0],	[0,0,0,0,0,0,0],	[0,1,1,1,0,1,0],	[1,1,1,1,1,1,1],	[1,1,1,1,1,1,1],	[1,1,1,1,0,1,1],	[1,1,1,1,0,1,1],	[1,1,1,1,0,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1]]; 
var Barrie = 						[47045,,			[0,0,0,0,0,0,0],	[0,0,0,0,0,0,0],	[0,1,1,1,0,1,0],	[1,1,1,1,1,1,1],	[1,1,1,1,1,1,1],	[1,1,1,1,0,1,1],	[1,1,1,1,0,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1]]; 
var Stouffville = 			[48002,,			[0,1,1,1,0,1,0],	[0,1,1,1,0,1,0],	[0,0,0,0,0,0,0],	[0,0,0,0,0,0,0],	[0,0,0,0,0,0,0],	[0,0,0,0,0,0,0],	[0,0,0,0,0,0,0],	[0,0,0,0,0,0,0],	[0,0,0,0,0,0,0],	[0,0,0,0,0,0,0],	[0,0,0,0,0,0,0]]; 
var Newmarket = 				[48006,,			[0,0,0,0,0,0,0],	[0,0,0,0,0,0,0],	[1,1,1,1,1,1,0],	[1,1,1,1,1,1,1],	[0,1,1,1,1,1,1],	[0,1,1,1,0,1,1],	[1,1,1,1,0,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1]]; 
var Parry_Sound = 			[49005,,			[0,0,0,0,0,0,0],	[0,0,0,0,0,1,0],	[0,0,0,0,0,1,0],	[0,0,0,0,0,1,1],	[0,0,0,0,0,1,1],	[0,0,0,0,0,1,1],	[0,0,0,0,0,1,1],	[0,0,0,0,0,1,1],	[0,0,0,0,0,1,1],	[0,0,0,0,0,1,1],	[0,0,0,0,0,1,1]]; 
var Dorset = 						[49010,,			[0,1,1,1,0,1,0],	[0,1,1,1,0,1,0],	[0,0,0,0,0,1,0],	[0,0,0,0,0,1,1],	[0,0,0,0,0,1,1],	[0,0,0,0,0,1,1],	[0,0,0,0,0,1,1],	[0,0,0,0,0,1,1],	[0,0,0,0,0,1,1],	[0,0,0,0,0,1,1],	[0,0,0,0,0,1,1]]; 
var Ottawa = 						[51001,,			[0,1,1,1,0,1,0],	[1,1,1,1,1,1,0],	[0,1,1,1,0,1,0],	[1,1,1,1,1,1,1],	[1,1,1,1,1,1,1],	[1,1,1,1,1,1,1],	[1,1,1,1,1,1,1],	[1,1,1,1,1,1,1],	[1,1,1,1,1,1,1],	[1,1,1,1,1,1,1],	[1,1,1,1,1,1,1]]; 
var Ottawa_Central = 		[51002,,			[0,0,0,0,0,0,0],	[0,0,0,0,0,0,0],	[0,0,0,0,0,0,0],	[0,0,0,0,0,0,0],	[0,0,0,0,0,0,0],	[0,0,0,0,0,0,0],	[0,0,0,0,0,0,0],	[1,1,1,1,1,1,1],	[1,1,1,1,1,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1]]; 
var Petawawa = 					[51010,,			[0,0,0,0,0,0,0],	[0,0,0,0,0,0,0],	[0,0,0,0,0,0,0],	[0,0,0,0,0,0,0],	[0,0,0,0,0,0,0],	[0,0,0,0,0,0,0],	[0,0,0,0,0,0,0],	[0,0,0,0,0,1,1],	[0,0,0,0,0,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1]];
var Kingston = 	   			[52020,52022, [0,0,0,0,0,1,0],	[0,0,0,0,0,1,0],	[0,0,0,0,0,1,0],	[0,0,0,0,0,1,1],	[0,0,0,0,0,1,1],	[0,0,0,0,0,1,0],	[0,0,0,0,0,1,1],	[1,1,1,1,1,1,1],	[1,1,1,1,1,1,1],	[1,1,1,1,1,1,1],	[1,1,1,1,1,1,1]]; 
var Belleville = 				[54012,,			[0,0,0,0,0,0,0],	[0,0,0,0,0,0,0],	[0,0,0,0,0,0,0],	[1,1,1,1,1,1,1],	[1,1,1,1,1,1,1],	[1,1,1,1,0,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1]]; 
var Morrisburg=					[56010,,			[0,0,0,0,0,0,0],	[0,0,0,0,0,0,0],	[0,0,0,0,0,0,0],	[0,0,0,0,0,0,0],	[0,0,0,0,0,0,0],	[0,0,0,0,0,1,1],	[0,0,0,0,0,1,1],	[0,0,0,0,0,1,1],	[0,0,0,0,0,1,1],	[0,0,0,0,0,1,1],	[0,0,0,0,0,1,1]];
var Cornwall = 					[56051,,			[0,0,0,0,0,1,0],	[1,0,0,0,0,1,0],	[0,0,0,0,0,1,0],	[0,0,0,0,0,1,1],	[0,0,0,0,0,1,1],	[0,0,0,0,0,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1]]; 
var Peterborough = 			[59006,,			[1,1,1,1,0,1,0],	[1,1,1,1,0,1,0],	[1,1,1,1,1,1,0],	[1,1,1,1,1,1,1],	[0,0,0,0,0,1,1],	[0,0,0,0,0,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1]]; 
var Thunder_Bay =  			[63200,63203, [1,1,1,1,0,1,0],	[1,1,1,1,0,1,0],	[1,1,1,1,1,1,0],	[1,1,1,1,1,1,1],	[0,0,0,0,0,1,1],	[0,0,0,0,0,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1]]; 
var Sault_Ste_Marie = 	[71068,71078, [0,1,1,1,0,1,0],	[1,1,1,1,0,1,0],	[1,1,1,1,0,1,0],	[0,1,1,1,0,1,1],	[1,0,0,0,1,1,1],	[1,1,1,1,1,1,1],	[1,1,1,1,1,1,1],	[1,1,1,1,1,1,1],	[1,1,1,1,1,1,1],	[1,1,1,1,0,1,1],	[1,1,1,1,0,1,1]]; 
var North_Bay = 				[75010,,			[0,0,0,0,0,1,0],	[0,1,1,1,0,1,0],	[0,1,1,1,0,1,0],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1],	[1,1,1,1,0,1,1],	[0,1,1,1,0,1,1],	[1,1,1,1,0,1,1],	[0,1,1,1,0,1,1],	[0,1,1,1,0,1,1]]; 
var Sudbury = 	 				[77203,77219, [1,0,0,0,0,1,0],	[1,1,1,1,0,1,0],	[1,1,1,1,1,1,0],	[1,1,1,1,1,1,0],	[1,0,0,0,0,1,1],	[1,0,0,0,0,1,1],	[1,0,0,0,0,1,1],	[1,0,0,0,0,1,1],	[1,0,0,0,0,1,1],	[1,0,0,0,0,1,1],	[1,0,0,0,0,1,1]]; 
var p_focus=0;
var m_focus=0;
function checkPurpose(){
	if (document.all || document.getElementById) { 
		if (document.aqi_search.c.value=='') {
			myPurpose=0;
		} else {
			myPurpose=1; 
		}
	checkMonths();
	}
}
function checkStations(){
	if (document.all || document.getElementById) {
	var myNote="";
	if ((document.aqi_search.s.value!='') && (document.aqi_search.y.value!='')) {
if (document.aqi_search.s.value == 47045) {
checkPollutants(Barrie);
myNote=specialNote("Barrie");
} else if (document.aqi_search.s.value ==54012) {
checkPollutants(Belleville);
myNote=specialNote("Belleville");
} else if (document.aqi_search.s.value ==46089) {
checkPollutants(Brampton);
} else if (document.aqi_search.s.value ==21005) {
checkPollutants(Brantford);
myNote=specialNote("Brantford"); 
} else if (document.aqi_search.s.value ==44008) {
checkPollutants(Burlington);
} else if (document.aqi_search.s.value ==13001) {
checkPollutants(Chatham);
myNote=specialNote("Chatham");
} else if (document.aqi_search.s.value ==56051) {
checkPollutants(Cornwall);
} else if (document.aqi_search.s.value ==49010) {
checkPollutants(Dorset);
} else if (document.aqi_search.s.value ==28028) {
checkPollutants(Guelph);
} else if (document.aqi_search.s.value ==15020) {
checkPollutants(Grand_Bend);
} else if (document.aqi_search.s.value ==29000) {
checkPollutants(Hamilton_Downtown);
} else if (document.aqi_search.s.value ==29114) {
checkPollutants(Hamilton_Mountain);
} else if (document.aqi_search.s.value ==29118) {
checkPollutants(Hamilton_West);
} else if (document.aqi_search.s.value ==52022) {
checkPollutants(Kingston);
myNote=specialNote("Kingston");
} else if (document.aqi_search.s.value ==26060) {
checkPollutants(Kitchener);
} else if (document.aqi_search.s.value ==15025) {
checkPollutants(London);
} else if (document.aqi_search.s.value ==13021) {
checkPollutants(Merlin);
myNote=specialNote("Merlin"); 
} else if (document.aqi_search.s.value ==49005) {
checkPollutants(Parry_Sound);
myNote=specialNote("Parry Sound");
} else if (document.aqi_search.s.value ==16015) {
checkPollutants(Port_Stanley);  
myNote=specialNote("Port Stanley"); 
} else if (document.aqi_search.s.value ==46108) {
	if (document.aqi_search.y.value > 2007) {
		checkPollutants(Mississauga2);
	} else {
		checkPollutants(Mississauga);
	}
myNote=specialNote("Mississauga");
} else if (document.aqi_search.s.value ==56010) {
checkPollutants(Morrisburg);
myNote=specialNote("Morrisburg");
} else if (document.aqi_search.s.value ==22071) {
checkPollutants(Simcoe);
myNote=specialNote("Simcoe");
} else if (document.aqi_search.s.value ==48002) {
checkPollutants(Stouffville);
myNote=specialNote("Stouffville");
} else if (document.aqi_search.s.value ==48006) {
checkPollutants(Newmarket);
myNote=specialNote("Newmarket");
} else if (document.aqi_search.s.value ==75010) {
checkPollutants(North_Bay);
} else if (document.aqi_search.s.value ==44017) {
checkPollutants(Oakville);
myNote=specialNote("Oakville");
} else if (document.aqi_search.s.value ==45026) {
checkPollutants(Oshawa);
myNote=specialNote("Oshawa");
} else if (document.aqi_search.s.value ==51001) {
checkPollutants(Ottawa);
} else if (document.aqi_search.s.value ==51002) {
checkPollutants(Ottawa_Central);
myNote=specialNote("Ottawa Central");
} else if (document.aqi_search.s.value ==51010) {
checkPollutants(Petawawa);
myNote=specialNote("Petawawa");
} else if (document.aqi_search.s.value ==59006) {
checkPollutants(Peterborough);
} else if (document.aqi_search.s.value ==14064) {
checkPollutants(Sarnia);
} else if (document.aqi_search.s.value ==71078) {
checkPollutants(Sault_Ste_Marie);
myNote=specialNote("Sault Ste Marie");
} else if (document.aqi_search.s.value ==27067) {
checkPollutants(St_Catharines);
} else if (document.aqi_search.s.value ==77219) {
checkPollutants(Sudbury);
myNote=specialNote("Sudbury");
} else if (document.aqi_search.s.value ==63203) {
checkPollutants(Thunder_Bay);
myNote=specialNote("Thunder Bay");
} else if (document.aqi_search.s.value ==18007) {
checkPollutants(Tiverton);
} else if (document.aqi_search.s.value ==31103) {
checkPollutants(Toronto_Downtown);
} else if (document.aqi_search.s.value ==33003) {
checkPollutants(Toronto_East);
} else if (document.aqi_search.s.value ==34020) {
checkPollutants(Toronto_North);
} else if (document.aqi_search.s.value ==35125) {
checkPollutants(Toronto_West);
myNote=specialNote("Toronto West");
} else if (document.aqi_search.s.value ==12008) {
checkPollutants(Windsor_Downtown);
} else if (document.aqi_search.s.value ==12016) {
checkPollutants(Windsor_West);
} 
} else {
document.aqi_search.p.options[0].disabled=false;
document.aqi_search.p.options[0].style.color = "menutext";
document.aqi_search.p.options[0].selected=true;
for (var pol=1; pol<=7; pol++) {
document.aqi_search.p.options[pol].disabled=true;
document.aqi_search.p.options[pol].style.color = "graytext";
}
document.aqi_search.m.disabled=true;
document.aqi_search.e.disabled=true;
document.aqi_search.t.disabled=true;
document.aqi_search.submitter.disabled=true;
}
writeNote(myNote,"Note");
}
}
function checkPollutants(my_station_pollutants) {          
var yearIndex=document.aqi_search.y.value - 1998; //converts year into array position 2000 -> 2, 2001 -->3, etc
document.aqi_search.p.options[0].disabled=false;
document.aqi_search.p.options[0].selected=true;
document.aqi_search.m.disabled=true;
document.aqi_search.e.disabled=true;
document.aqi_search.t.disabled=true;
//alert ("my_station_pollutants: '" + my_station_pollutants+"'");
for (var pol=0; pol<=6; pol++) { //loop though pollutants
var mySelection=pol+1;
if (my_station_pollutants[yearIndex][pol]==1) {
document.aqi_search.p.options[mySelection].disabled=false;
document.aqi_search.p.options[mySelection].style.color = "menutext";
} else {
document.aqi_search.p.options[mySelection].disabled=true;
document.aqi_search.p.options[mySelection].style.color = "graytext";
}
}
}
function checkMonths(){  
if (document.aqi_search.p.value!= 0){
document.aqi_search.m.disabled=false;
document.aqi_search.e.disabled=false;
document.aqi_search.t.disabled=false;
if (myPurpose ==1) {
document.aqi_search.submitter.disabled=false;
} else {
document.aqi_search.submitter.disabled=true;
}
} else {
document.aqi_search.m.disabled=true;
document.aqi_search.e.disabled=true;
document.aqi_search.t.disabled=true;
document.aqi_search.submitter.disabled=true;  
}
}
function checkEndMonth(){  
var start=document.aqi_search.m.value-1;
if (start > document.aqi_search.e.value) {
document.aqi_search.e.options[0].selected=true;
}
for (var mon=1; mon<=12; mon++) {
if (start < document.aqi_search.e.options[mon].value){
document.aqi_search.e.options[mon].disabled=false;
document.aqi_search.e.options[mon].style.color = "menutext"
} else {
document.aqi_search.e.options[mon].disabled=true;
document.aqi_search.e.options[mon].style.color = "graytext";
}
}
}
var browser="none";
function loadStations() {
var browserName=navigator.appName; 
var browserVer=parseInt(navigator.appVersion);
if ((browserName=="Microsoft Internet Explorer") && (browserVer<7)) { 
browser="ie6"; 
} else {
browser="other"; 
}
checkStations();
document.aqi_search.m.options[0].selected=true;
document.aqi_search.e.options[0].selected=true;
}
function focus_ie() {
p_focus = document.aqi_search.p.selectedIndex;
//alert ("focus: '" + p_focus+ "' again");
}
function restore_ie(e) {
if (browser == "ie6") {
if (document.aqi_search.p.options[document.aqi_search.p.selectedIndex].disabled) {
document.aqi_search.p.selectedIndex=p_focus;
document.aqi_search.m.disabled=true;
document.aqi_search.e.disabled=true;
document.aqi_search.t.disabled=true;
document.aqi_search.submitter.disabled=true; 
}
}
}
function focus_endMonth() {
m_focus = document.aqi_search.e.selectedIndex;
//alert ("focus: '" + p_focus+ "' again");
}
function restore_endMonth() {
if (browser == "ie6") {
if (document.aqi_search.e.options[document.aqi_search.e.selectedIndex].disabled) {
document.aqi_search.e.selectedIndex=m_focus;
}
}
}
function specialNote(stationName) {
var myYear=document.aqi_search.y.value;
var thisNote="";
if ((stationName == "Stouffville") && (myYear >2001)) {
thisNote="<p><strong>Note:</strong> There are no records for Stouffville in " + myYear  +". Newmarket replaced Stouffville as the AQI site in York Region in 2002.</p>";
} else if ((stationName == "Newmarket") && (myYear <2002)) {
thisNote="<p><strong>Note:</strong> There are no records for Newmarket in " + myYear  +". Newmarket began monitoring in 2002 at which time it replaced Stouffville as the AQI site in York Region.</p>";
} else if ((stationName == "Simcoe") && (myYear >2003)) {
thisNote="<p><strong>Note:</strong> There are no records for Simcoe in " + myYear  +".</p>";
} else if ((stationName == "Brantford") && (myYear < 2004)) {
thisNote="<p><strong>Note:</strong> Brantford began monitoring in 2004.</p>";
} else if ((stationName == "Belleville") && (myYear < 2003)) {
thisNote="<p><strong>Note:</strong> Belleville began monitoring in 2003.</p>";
} else if ((stationName == "Oakville") && (myYear ==2003)) {
thisNote="<p><strong>Note:</strong> Station 44017 replaced station 44015 as the Oakville AQI site in 2003.</p>";
} else if ((stationName == "Oshawa") && (myYear ==2005)) {
thisNote="<p><strong>Note:</strong> Station 45026 replaced station 45025 as the Oshawa AQI site in 2005.</p>";
} else if ((stationName == "Mississauga") && (myYear ==2004)) {
thisNote="<p><strong>Note:</strong> Station 46109 replaced station 46110 as the Mississauga AQI site in 2004.</p>";
} else if ((stationName == "Mississauga") && (myYear ==2008)) {
thisNote="<p><strong>Note:</strong> Station 46108 replaced station 46109 as the Mississauga AQI site in 2008.</p>";
} else if ((stationName == "Sudbury") && (myYear ==2004)) {
thisNote="<p><strong>Note:</strong> Station 77219 replaced station 77203 as the Sudbury AQI site in 2004.</p>";
} else if ((stationName == "Toronto West") && (myYear ==2003)) {
thisNote="<p><strong>Note:</strong> Station 35125 replaced station 35003 as the Toronto West AQI site in 2003.</p>";
} else if ((stationName == "Thunder Bay") && (myYear ==2004)) {
thisNote="<p><strong>Note:</strong> Station 63203 replaced station 63200 as the Thunder Bay AQI site in 2004.</p>";
} else if ((stationName == "Sault Ste Marie") && (myYear ==2004)) {
thisNote="<p><strong>Note:</strong> Station 71078 replaced station 71068 as the Sault Ste Marie AQI site in 2004.</p>";
} else if ((stationName == "Parry Sound") && (myYear ==2000)) {
thisNote="<p><strong>Note:</strong> Parry Sound began monitoring in 2001.</p>";
} else if ((stationName == "Port Stanley") && (myYear < 2002)) {
thisNote="<p><strong>Note:</strong> Port Stanley began monitoring in 2002.</p>";
} else if ((stationName == "Barrie") && (myYear < 2002)) {
thisNote="<p><strong>Note:</strong> Barrie began monitoring in 2002.</p>";
} else if ((stationName == "Chatham") && (myYear < 2005)) {
thisNote="<p><strong>Note:</strong> Chatham began monitoring in 2005.</p>";
}else if ((stationName == "Morrisburg") && (myYear < 2005)) {
thisNote="<p><strong>Note:</strong> Morrisburg began monitoring in 2005.</p>";
}else if ((stationName == "Merlin") && (myYear >= 2005)) {
thisNote="<p><strong>Note:</strong> There are no records for Merlin in " + myYear  + ".</p>";
}else if ((stationName == "Kingston") && (myYear >= 2007)) {
thisNote="<p><strong>Note:</strong> Station 52022 replaced station 52020 as the Kingston AQI site in 2007.</p>";
}else if ((stationName == "Ottawa Central") && (myYear < 2007)) {
thisNote="<p><strong>Note:</strong> Ottawa Central began monitoring in 2007.</p>";
}else if ((stationName == "Petawawa") && (myYear < 2007)) {
thisNote="<p><strong>Note:</strong> Petawawa began monitoring in 2007.</p>";
}
return thisNote;
}
function writeNote(myNote,id)  {
if (document.getElementById)
{
x = document.getElementById(id);
x.innerHTML = '';
x.innerHTML = myNote;
}
else if (document.all)
{
x = document.all[id];
x.innerHTML = myNote;
}
else if (document.layers)
{
x = document.layers[id];
text2 = '<P CLASS="testclass">' + myNote + '</P>';
x.document.open();
x.document.write(text2);
x.document.close();
}
}