
function WhatsOn(hour, min, ampm, channel)
{
//alert(hour + " " + min + " " + ampm + " " + channel);

var CurrentHour = hour;
var CurrentMin = min;
var DayorNight = ampm;
var RequestedChannel = channel;

switch (RequestedChannel){
	
	case 1:{					//Channel 1 News Channel
	switch (DayorNight){
	case "AM":{			//AM
	switch (CurrentHour){	//Sort by Hour
		case 12:{switch (CurrentMin){case 0:{return "PRG1.GIF";break;}case 30:{return "PRG1.GIF";break;}}break;}
		case 1:{switch (CurrentMin){case 0:{return "PRG1.GIF";break;}case 30:{return "PRG1.GIF";break;}}break;}
		case 2:{switch (CurrentMin){case 0:{return "PRG2.JPG";break;}case 30:{return "PRG2.JPG";break;}}break;}
		case 3:{switch (CurrentMin){case 0:{return "PRG3.GIF";break;}case 30:{return "PRG3.GIF";break;}}break;}
		case 4:{switch (CurrentMin){case 0:{return "PRG3.GIF";break;}case 30:{return "PRG3.GIF";break;}}break;}
		case 5:{switch (CurrentMin){case 0:{return "PRG2.JPG";break;}case 30:{return "PRG2.JPG";break;}}break;}
		case 6:{switch (CurrentMin){case 0:{return "PRG1.GIF";break;}case 30:{return "PRG1.GIF";break;}}break;}
		case 7:{switch (CurrentMin){case 0:{return "PRG2.JPG";break;}case 30:{return "PRG3.GIF";break;}}break;}
		case 8:{switch (CurrentMin){case 0:{return "PRG4.GIF";break;}case 30:{return "PRG4.GIF";break;}}break;}
		case 9:{switch (CurrentMin){case 0:{return "PRG2.JPG";break;}case 30:{return "PRG4.GIF";break;}}break;}
		case 10:{switch (CurrentMin){case 0:{return "PRG1.GIF";break;}case 30:{return "PRG1.GIF";break;}}break;}
		case 11:{switch (CurrentMin){case 0:{return "PRG1.GIF";break;}case 30:{return "PRG1.GIF";break;}}break;}
		}break;}}
	}
	
	case 2:{					//Channel 2 SPORT
	switch (DayorNight){
	case "AM":{			//AM
	switch (CurrentHour){	//Sort by Hour
		case 12:{switch (CurrentMin){case 0:{return "PRG1.GIF";break;}case 30:{return "PRG1.GIF";break;}}break;}
		case 1:{switch (CurrentMin){case 0:{return "PRG1.GIF";break;}case 30:{return "PRG1.GIF";break;}}break;}
		case 2:{switch (CurrentMin){case 0:{return "PRG2.JPG";break;}case 30:{return "PRG2.JPG";break;}}break;}
		case 3:{switch (CurrentMin){case 0:{return "PRG3.JPG";break;}case 30:{return "PRG3.JPG";break;}}break;}
		case 4:{switch (CurrentMin){case 0:{return "PRG3.JPG";break;}case 30:{return "PRG3.JPG";break;}}break;}
		case 5:{switch (CurrentMin){case 0:{return "PRG2.JPG";break;}case 30:{return "PRG2.JPG";break;}}break;}
		case 6:{switch (CurrentMin){case 0:{return "PRG1.JPG";break;}case 30:{return "PRG1.JPG";break;}}break;}
		case 7:{switch (CurrentMin){case 0:{return "PRG1.JPG";break;}case 30:{return "PRG2.GIF";break;}}break;}
		case 8:{switch (CurrentMin){case 0:{return "PRG3.GIF";break;}case 30:{return "PRG3.GIF";break;}}break;}
		case 9:{switch (CurrentMin){case 0:{return "PRG4.GIF";break;}case 30:{return "PRG4.GIF";break;}}break;}
		case 10:{switch (CurrentMin){case 0:{return "PRG1.GIF";break;}case 30:{return "PRG1.GIF";break;}}break;}
		case 11:{switch (CurrentMin){case 0:{return "PRG1.GIF";break;}case 30:{return "PRG1.GIF";break;}}break;}
		}break;}}
	}
	
	case 3:{					//Channel 3 MOVIES
	switch (DayorNight){
	case "AM":{			//AM
	switch (CurrentHour){	//Sort by Hour
		case 12:{switch (CurrentMin){case 0:{return "PRG1.GIF";break;}case 30:{return "PRG1.GIF";break;}}break;}
		case 1:{switch (CurrentMin){case 0:{return "PRG1.GIF";break;}case 30:{return "PRG1.GIF";break;}}break;}
		case 2:{switch (CurrentMin){case 0:{return "PRG2.JPG";break;}case 30:{return "PRG2.JPG";break;}}break;}
		case 3:{switch (CurrentMin){case 0:{return "PRG3.JPG";break;}case 30:{return "PRG3.JPG";break;}}break;}
		case 4:{switch (CurrentMin){case 0:{return "PRG3.JPG";break;}case 30:{return "PRG3.JPG";break;}}break;}
		case 5:{switch (CurrentMin){case 0:{return "PRG2.JPG";break;}case 30:{return "PRG2.JPG";break;}}break;}
		case 6:{switch (CurrentMin){case 0:{return "PRG1.JPG";break;}case 30:{return "PRG1.JPG";break;}}break;}
		case 7:{switch (CurrentMin){case 0:{return "PRG2.JPG";break;}case 30:{return "PRG2.JPG";break;}}break;}
		case 8:{switch (CurrentMin){case 0:{return "PRG3.JPG";break;}case 30:{return "PRG3.JPG";break;}}break;}
		case 9:{switch (CurrentMin){case 0:{return "PRG4.JPG";break;}case 30:{return "PRG4.JPG";break;}}break;}
		case 10:{switch (CurrentMin){case 0:{return "PRG1.GIF";break;}case 30:{return "PRG1.GIF";break;}}break;}
		case 11:{switch (CurrentMin){case 0:{return "PRG1.GIF";break;}case 30:{return "PRG1.GIF";break;}}break;}
		}break;}}
	}
	
	case 4:{					//Channel 4 FASHION
	switch (DayorNight){
	case "AM":{			//AM
	switch (CurrentHour){	//Sort by Hour
		case 12:{switch (CurrentMin){case 0:{return "PRG1.GIF";break;}case 30:{return "PRG1.GIF";break;}}break;}
		case 1:{switch (CurrentMin){case 0:{return "PRG1.GIF";break;}case 30:{return "PRG1.GIF";break;}}break;}
		case 2:{switch (CurrentMin){case 0:{return "PRG2.JPG";break;}case 30:{return "PRG2.JPG";break;}}break;}
		case 3:{switch (CurrentMin){case 0:{return "PRG3.JPG";break;}case 30:{return "PRG3.JPG";break;}}break;}
		case 4:{switch (CurrentMin){case 0:{return "PRG3.JPG";break;}case 30:{return "PRG3.JPG";break;}}break;}
		case 5:{switch (CurrentMin){case 0:{return "PRG2.JPG";break;}case 30:{return "PRG2.JPG";break;}}break;}
		case 6:{switch (CurrentMin){case 0:{return "PRG1.JPG";break;}case 30:{return "PRG1.JPG";break;}}break;}
		case 7:{switch (CurrentMin){case 0:{return "PRG2.JPG";break;}case 30:{return "PRG3.GIF";break;}}break;}
		case 8:{switch (CurrentMin){case 0:{return "PRG3.GIF";break;}case 30:{return "PRG3.GIF";break;}}break;}
		case 9:{switch (CurrentMin){case 0:{return "PRG4.GIF";break;}case 30:{return "PRG4.GIF";break;}}break;}
		case 10:{switch (CurrentMin){case 0:{return "PRG1.GIF";break;}case 30:{return "PRG1.GIF";break;}}break;}
		case 11:{switch (CurrentMin){case 0:{return "PRG1.GIF";break;}case 30:{return "PRG1.GIF";break;}}break;}
		}break;}}
	}
	
	case 5:{					//Channel 5 Science Channel
	switch (DayorNight){
	case "AM":{			//AM
	switch (CurrentHour){	//Sort by Hour
		case 12:{switch (CurrentMin){case 0:{return "PRG1.GIF";break;}case 30:{return "PRG1.GIF";break;}}break;}
		case 1:{switch (CurrentMin){case 0:{return "PRG1.GIF";break;}case 30:{return "PRG1.GIF";break;}}break;}
		case 2:{switch (CurrentMin){case 0:{return "PRG2.JPG";break;}case 30:{return "PRG2.JPG";break;}}break;}
		case 3:{switch (CurrentMin){case 0:{return "PRG3.JPG";break;}case 30:{return "PRG3.JPG";break;}}break;}
		case 4:{switch (CurrentMin){case 0:{return "PRG3.JPG";break;}case 30:{return "PRG3.JPG";break;}}break;}
		case 5:{switch (CurrentMin){case 0:{return "PRG2.JPG";break;}case 30:{return "PRG2.JPG";break;}}break;}
		case 6:{switch (CurrentMin){case 0:{return "PRG1.JPG";break;}case 30:{return "PRG1.JPG";break;}}break;}
		case 7:{switch (CurrentMin){case 0:{return "PRG1.JPG";break;}case 30:{return "PRG2.JPG";break;}}break;}
		case 8:{switch (CurrentMin){case 0:{return "PRG2.JPG";break;}case 30:{return "PRG3.GIF";break;}}break;}
		case 9:{switch (CurrentMin){case 0:{return "PRG3.GIF";break;}case 30:{return "PRG3.GIF";break;}}break;}
		case 10:{switch (CurrentMin){case 0:{return "PRG1.GIF";break;}case 30:{return "PRG1.GIF";break;}}break;}
		case 11:{switch (CurrentMin){case 0:{return "PRG1.GIF";break;}case 30:{return "PRG1.GIF";break;}}break;}
		}break;}}
	}
	
	case 6:{					//Channel 6 GAMING
	switch (DayorNight){
	case "AM":{			//AM
	switch (CurrentHour){	//Sort by Hour
		case 12:{switch (CurrentMin){case 0:{return "PRG1.GIF";break;}case 30:{return "PRG1.GIF";break;}}break;}
		case 1:{switch (CurrentMin){case 0:{return "PRG1.GIF";break;}case 30:{return "PRG1.GIF";break;}}break;}
		case 2:{switch (CurrentMin){case 0:{return "PRG2.JPG";break;}case 30:{return "PRG2.JPG";break;}}break;}
		case 3:{switch (CurrentMin){case 0:{return "PRG3.JPG";break;}case 30:{return "PRG3.JPG";break;}}break;}
		case 4:{switch (CurrentMin){case 0:{return "PRG3.JPG";break;}case 30:{return "PRG3.JPG";break;}}break;}
		case 5:{switch (CurrentMin){case 0:{return "PRG2.JPG";break;}case 30:{return "PRG2.JPG";break;}}break;}
		case 6:{switch (CurrentMin){case 0:{return "PRG1.JPG";break;}case 30:{return "PRG1.JPG";break;}}break;}
		case 7:{switch (CurrentMin){case 0:{return "PRG2.JPG";break;}case 30:{return "PRG3.GIF";break;}}break;}
		case 8:{switch (CurrentMin){case 0:{return "PRG3.GIF";break;}case 30:{return "PRG4.GIF";break;}}break;}
		case 9:{switch (CurrentMin){case 0:{return "PRG5.JPG";break;}case 30:{return "PRG5.JPG";break;}}break;}
		case 10:{switch (CurrentMin){case 0:{return "PRG1.GIF";break;}case 30:{return "PRG1.GIF";break;}}break;}
		case 11:{switch (CurrentMin){case 0:{return "PRG1.GIF";break;}case 30:{return "PRG1.GIF";break;}}break;}
		}break;}}
	}
	
	case 7:{					//Channel 7 MUSIC
	switch (DayorNight){
	case "AM":{			//AM
	switch (CurrentHour){	//Sort by Hour
		case 12:{switch (CurrentMin){case 0:{return "PRG1.GIF";break;}case 30:{return "PRG1.GIF";break;}}break;}
		case 1:{switch (CurrentMin){case 0:{return "PRG1.GIF";break;}case 30:{return "PRG1.GIF";break;}}break;}
		case 2:{switch (CurrentMin){case 0:{return "PRG2.JPG";break;}case 30:{return "PRG2.JPG";break;}}break;}
		case 3:{switch (CurrentMin){case 0:{return "PRG3.JPG";break;}case 30:{return "PRG3.JPG";break;}}break;}
		case 4:{switch (CurrentMin){case 0:{return "PRG3.JPG";break;}case 30:{return "PRG3.JPG";break;}}break;}
		case 5:{switch (CurrentMin){case 0:{return "PRG2.JPG";break;}case 30:{return "PRG2.JPG";break;}}break;}
		case 6:{switch (CurrentMin){case 0:{return "PRG1.GIF";break;}case 30:{return "PRG1.GIF";break;}}break;}
		case 7:{switch (CurrentMin){case 0:{return "PRG1.GIF";break;}case 30:{return "PRG2.GIF";break;}}break;}
		case 8:{switch (CurrentMin){case 0:{return "PRG3.GIF";break;}case 30:{return "PRG3.GIF";break;}}break;}
		case 9:{switch (CurrentMin){case 0:{return "PRG4.GIF";break;}case 30:{return "PRG4.GIF";break;}}break;}
		case 10:{switch (CurrentMin){case 0:{return "PRG1.GIF";break;}case 30:{return "PRG1.GIF";break;}}break;}
		case 11:{switch (CurrentMin){case 0:{return "PRG1.GIF";break;}case 30:{return "PRG1.GIF";break;}}break;}
		}break;}}
	}
	
	case 8:{					//Channel 8 LIFESTYLE
	switch (DayorNight){
	case "AM":{			//AM
	switch (CurrentHour){	//Sort by Hour
		case 12:{switch (CurrentMin){case 0:{return "PRG1.GIF";break;}case 30:{return "PRG1.GIF";break;}}break;}
		case 1:{switch (CurrentMin){case 0:{return "PRG1.GIF";break;}case 30:{return "PRG1.GIF";break;}}break;}
		case 2:{switch (CurrentMin){case 0:{return "PRG2.JPG";break;}case 30:{return "PRG2.JPG";break;}}break;}
		case 3:{switch (CurrentMin){case 0:{return "PRG3.JPG";break;}case 30:{return "PRG3.JPG";break;}}break;}
		case 4:{switch (CurrentMin){case 0:{return "PRG3.JPG";break;}case 30:{return "PRG3.JPG";break;}}break;}
		case 5:{switch (CurrentMin){case 0:{return "PRG2.JPG";break;}case 30:{return "PRG2.JPG";break;}}break;}
		case 6:{switch (CurrentMin){case 0:{return "PRG1.JPG";break;}case 30:{return "PRG1.JPG";break;}}break;}
		case 7:{switch (CurrentMin){case 0:{return "PRG2.JPG";break;}case 30:{return "PRG2.JPG";break;}}break;}
		case 8:{switch (CurrentMin){case 0:{return "PRG3.GIF";break;}case 30:{return "PRG4.GIF";break;}}break;}
		case 9:{switch (CurrentMin){case 0:{return "PRG4.GIF";break;}case 30:{return "PRG4.GIF";break;}}break;}
		case 10:{switch (CurrentMin){case 0:{return "PRG1.GIF";break;}case 30:{return "PRG1.GIF";break;}}break;}
		case 11:{switch (CurrentMin){case 0:{return "PRG1.GIF";break;}case 30:{return "PRG1.GIF";break;}}break;}
		}break;}}
	}
	
	

}
}	