      	var typename = new Array()
//GOES-15&12
    	typename[0]="Visible";
		typename[1]="IR";
		typename[2]="WV";
//Tropical
//Gulf/Carib
		typename[3]="Station Plot/Sat";

		
		
    	var type = new Array()
//GOES-15&12
    	type[0]="/vis";
		type[1]="/ir";
		type[2]="/wv";

		type[3]="";
		
function changesat(){
	var satselect = document.getElementById("base").value

if (satselect == "archive/sat/GOES-13")
	{
	startindex = 0
	endindex = 2
	}
else if (satselect == "archive/sat/GOES-15")
	{
	startindex = 0
	endindex = 2
	}
else if (satselect == "archive/tropics/atl")
	{
	startindex = 0
	endindex = 2
	}
else if (satselect == "archive/tropics/epac")
	{
	startindex = 3
	endindex = 3
	}
else if (satselect == "archive/tropics/gulf")
	{
	startindex = 3
	endindex = 3
	}
else if (satselect == "archive/tropics/caribbean")
	{
	startindex = 3
	endindex = 3
	}
else
	{
	startindex = 0
	endindex = 2
	}

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;
}

