<!--

function makeWinnerBarAward(y,sA,id,num) {
	var l = sA.length;
	var i = num;
	//for (var i = num; i < l; i++) {
		var txt = '';
		//alert(y);
		var Aw = sA[num];		
		txt += '<table width="474" border="0" cellpadding="0" cellspacing="0">';
		txt += '<tr><td height="25" valign="top" class="historyTitle" colspan="3">';
		var tempTXT = y + " - " + awardNameA[id];
		txt += tempTXT;
		txt += '</td></tr>';
		txt += '<tr><td>';
		var artisan = false;
		//this is the red name bar
		var tempTXT = Aw[5];
		var tempTXT2 = Aw[3];
		//if(tempTXT != ""){
		txt += '<tr><td colspan="3" height="2"><img src="content/images/shim.gif" width="1" height="2"></td></tr>';
		txt += '<tr>';
		txt += '<td class="historyWinnerAward" width="405" >';
		//alert(tempTXT2);
		if (tempTXT != "") {
			txt += '<strong>' + tempTXT + '</strong> for -<BR>';
		}
		txt += '<strong>' + tempTXT2 + '</strong>';
		//check if there is an album
		var tempTXT = Aw[4];
		if (tempTXT != "") {
			txt += ' - ' + tempTXT;
		}
		//now finish off the red bar
		txt += '</td><td width="3"><img src="content/images/shim.gif" width="3" height="1"></td>';
		txt += '<td valign="top" bgcolor="#FD0004"><img src="content/images/titles/history/byyear/red_winner.gif" width="66" height="18"></td>';
		txt += '</tr>';
		txt += '<tr><td colspan="3" height="2"><img src="content/images/shim.gif" width="1" height="3"></td></tr>';
		//check next array if it has a nominee if not then skip the nomiee bit
		
		var nextA = sA[i + 1];
		//alert(i);
		
		if (nextA[2] == '0') {
			//ok there is a nominee
			//this bit is the nomineee bar
			txt += '<tr><td class="nominessBG">';
			//now loop trough for every nomiee there.
			for (var ii = 0; ii < 10; ii++) {
				var cred = nextA[5];
				if (cred != "") {
					txt += '<b>' + nextA[5] + '</b> for ';
				}
				txt += '<b>' + nextA[3] + '</b> -  ' + nextA[4] + '<br>';
				//end nominee bar
				i++;
				var nextA = sA[i + 1];
				//if next one is also a nominee then contine
				//otherwise break
				if (nextA[2] == '0') {
				} else {
					ii = 99;
				}
			}
			//now add the little bit at the end of the nominee panel
			txt += '</td><td></td><td bgcolor="#E4E5E9" valign="top"><img src="content/images/titles/history/byyear/grey_other_noms.gif" width="66" height="26"></td></tr>';
			txt += '<tr><td colspan="3" height="2"><img src="content/images/shim.gif" width="1" height="3"></td></tr>';
			txt += '</tr>';
		}
		
		txt += '</table>';
		document.write(txt);
		
	//}
}
//----------------------------------
function searchforAward(id) {		
	for (var y = yend; y > ystart-1; y--) {
		var searchA = eval("A_" + y);
		//alert(searchA);
		//alert('ash ' + y);
		var l = searchA.length;
		for (var i = 0; i < l; i++) {
			var aw = searchA[i][1];
			var awin = searchA[i][2];	
			if (aw == id && awin == 1) {			    
				//alert(aw);
				makeWinnerBarAward(y,searchA,id,i);
				//i = 999;
			}			
		}
		//alert("y now "+y);
	}
	//end search for artist
}

function searchforAward_old(id) {
	for (var y = ystart; y < yend + 1; y++) {
		var searchA = eval("A_" + y);
		//alert(searchA);
		var l = searchA.length;
		
		for (var i = 0; i < l; i++) {
			var aw = searchA[i][1];
			if (aw == id) {
			//alert(y);
				makeWinnerBarAward(y,searchA,id,i);
				//i = 999;
			}
		}
	}
	//end search for artist
}


//----------------------------------
//----------------------------------
function addToList(list, t) {
//alert(list.sel);

with (list.sel){ 

	options[length] = new Option(t,''); // must do it this way for NS4
	//length++;
}
   //
	
}
//----------------------------------
function clearList(list)
{

	list.selectedIndex = 0;
	list.length = 1;
}
//----------------------------------

function populateAwardsList()
{
//alert("award list");
var list = document.forms['award'];
//alert(list);
var a = awardNameA;
//alert(a);
	//if (!list) return;
	//clearList(list.sel);
	for (i = 0; i < a.length; i++)
	{
	//alert(i);
	   addToList(list, a[i]);
	}
	list.sel.options[0] = new Option('Select an award');
list.sel.options[0].selected = true;
}
//----------------------------------

function chooseAward(i){
var tr = window.location.pathname;
location.href = tr + '?awardID=' + (i-1);

}


//-->