      	var typename = new Array()
//GOES-11&12
    	typename[0]="Visible";
		typename[1]="IR";
		typename[2]="IR-RGBV";
		typename[3]="IR-SAB";
		typename[4]="IR-UPC2";
		typename[5]="IR-GRB";
		typename[6]="WV";
		typename[7]="WV-TPC";
		typename[8]="WV-GREE";
		typename[9]="WV-UPC";
//Tropical
		typename[10]="Visible";
		typename[11]="IR";
		typename[12]="IR-RGBV";
		typename[13]="WV";	
//Gulf/Carib
		typename[14]="Station Plot/Sat";
//Antarctic
		typename[15]="IR";
		typename[16]="IR-RGBV";
		typename[17]="IR-UPC2";
//Midwest Centered
    	typename[18]="Visible";
		typename[19]="IR";
		typename[20]="IR-RGBV";
		typename[21]="IR-SAB";
		typename[22]="IR-UPC2";
		typename[23]="IR-GRB";
		
		
    	var type = new Array()
//GOES-11&12
    	type[0]="/vis";
		type[1]="/ir/ir";
		type[2]="/ir/rgbv";
		type[3]="/ir/sab";
		type[4]="/ir/upc2";
		type[5]="/ir/grb";
		type[6]="/wv/no";
		type[7]="/wv/tpc";
		type[8]="/wv/gree";
		type[9]="/wv/tpc";
//Tropical
		type[10]="/vis";
		type[11]="/ir";
		type[12]="/ir_enh";
		type[13]="/wv";	
//Gulf/Carib
		type[14]="";
//Antarctic
		type[15]="/no";
		type[16]="/rgbv";
		type[17]="/upc2";
//Midwest
		type[18]="/vis";
		type[19]="/ir";
		type[20]="/rgbv";
		type[21]="/sab";
		type[22]="/upc2";
		type[23]="/grb";
		
function changesat(){
	var satselect = document.getElementById("base").value

if (satselect == "archive/sat/GOES-12")
	{
	startindex = 0
	endindex = 9
	}
else if (satselect == "archive/sat/GOES-11")
	{
	startindex = 0
	endindex = 9
	}
else if (satselect == "archive/tropics/atl")
	{
	startindex = 10
	endindex = 13
	}
else if (satselect == "archive/tropics/epac")
	{
	startindex = 10
	endindex = 13
	}
else if (satselect == "archive/tropics/gulf")
	{
	startindex = 14
	endindex = 14
	}
else if (satselect == "archive/tropics/caribbean")
	{
	startindex = 14
	endindex = 14
	}
else if (satselect == "archive/sat/antarctica")
	{
	startindex = 15
	endindex = 17
	}
else
	{
	startindex = 18
	endindex = 23
	}

var x = document.getElementById("hooha");
//Remove Old Elements of Second List
while(x.length > 1)
{
	x.remove(1)
}

//Add New Elements
 
 for(startindex;startindex<=endindex;startindex++)
 {
 y = document.createElement('option');
 y.text=typename[startindex]
 y.value=type[startindex]
 	try	
 	{
 	x.add(y,null);
 	}
 	catch(ex)
 	{
 	x.add(y);
 	}
  }
}



function gotoimage(a)
	{
	b = a.form.id
	document.getElementById(b).submit();
	}
	
function changetext(a)
	{
	b = a.form.id
	document.getElementById(b).submit();
	}
	
function gethelp()
	{
	var findid = document.getElementById("prodlist")
	var z = document.getElementById("tochange")
	z.value=findid.value;
	document.getElementById("gethelp").submit();
	}
	
//Model Animator
      	var modelrun = new Array()
//RUC
		modelrun[1]="00Z";
		modelrun[2]="03Z";
		modelrun[3]="06Z";
		modelrun[4]="12Z";
	    modelrun[5]="15Z";
		modelrun[6]="18Z";
		modelrun[7]="21Z";
//MRF
		modelrun[8]="00Z";
// ETA and NGM
		modelrun[9]="00Z";
		modelrun[10]="12Z";
//AVN and UKMET
		modelrun[11]="00Z";
	    modelrun[12]="06Z";
		modelrun[13]="12Z";
		modelrun[14]="18Z";
		
		
    	var product = new Array()

		
function changemodel(){
	var modselect = document.getElementById("model").value

if (modselect == "ruc")
	{
	startindex = 1
	endindex = 7
	}
else if (modselect == "eta")
	{
	startindex = 9
	endindex = 10
	}
else if (modselect == "mrf")
	{
	startindex = 8
	endindex = 8
	}
else if (modselect == "ngm")
	{
	startindex = 9
	endindex = 10
	}
else if (modselect == "avn")
	{
	startindex = 11
	endindex = 14
	}
else if (modselect == "ukmet")
	{
	startindex = 11
	endindex = 14
	}
else
	{
	startindex = 1
	endindex = 7
	}

var x = document.getElementById("runhour");
//Remove Old Elements of Second List
while(x.length > 1)
{
	x.remove(1)
}

//Add New Elements
 
 for(startindex;startindex<=endindex;startindex++)
 {
 y = document.createElement('option');
 y.text=modelrun[startindex]
 y.value=modelrun[startindex]
 	try	
 	{
 	x.add(y,null);
 	}
 	catch(ex)
 	{
 	x.add(y);
 	}
  }
}


function updateClock ( )
{
  var currentTime = new Date ( );
  
  // Compose the string for display
  var currentTimeString = currentTime.toUTCString();
 
  // Update the time display
  document.getElementById("clock").firstChild.nodeValue = currentTimeString;
}
