/////////////////////////////////////////////////////////////////////////////////////////
//////////////////// Update Annunciator Function for Cobalt//////////////////////////////
//////////////////// Copyright (c) 2009-2010 Tropper Technologies, Inc. /////////////////
//////////////////// www.troppertech.com ////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////

function updateAnnunciatorView() {


if (parseFloat (Speed)< 10)
{
document.images.speedcurrentannuciator.src="RedLight-105x105.png";
}
else if  (parseFloat (Speed)< 20)
{
document.images.speedcurrentannuciator.src="YellowLight-105x105.png";
}
else
{
document.images.speedcurrentannuciator.src="GreenLight-105x105.png";
}



if (parseFloat (speedAverage)< 10)
{
document.images.speedaverageannuciator.src="RedLight-105x105.png";
}
else if  (parseFloat (speedAverage)< 20)
{
document.images.speedaverageannuciator.src="YellowLight-105x105.png";
}
else
{
document.images.speedaverageannuciator.src="GreenLight-105x105.png";
}




if (parseFloat (DownloadDataRateFile)< 50)
{
document.images.dataratecurrentannuciator.src="RedLight-105x105.png";
}
else if  (parseFloat (DownloadDataRateFile)< 150)
{
document.images.dataratecurrentannuciator.src="YellowLight-105x105.png";
}
else
{
document.images.dataratecurrentannuciator.src="GreenLight-105x105.png";
}

if (parseFloat (DownloadDataRateAvg)< 50)
{
document.images.datarateaverageannuciator.src="RedLight-105x105.png";
}
else if  (parseFloat (DownloadDataRateAvg)< 150)
{
document.images.datarateaverageannuciator.src="YellowLight-105x105.png";
}
else
{
document.images.datarateaverageannuciator.src="GreenLight-105x105.png";
}




if (parseFloat (UploadDataRateFile)< 50)
{
document.images.uplinkcurrentannuciator.src="RedLight-105x105.png";
}
else if  (parseFloat (UploadDataRateFile)< 150)
{
document.images.uplinkcurrentannuciator.src="YellowLight-105x105.png";
}
else
{
document.images.uplinkcurrentannuciator.src="GreenLight-105x105.png";
}

if (parseFloat (UploadDataRateAvg)< 50)
{
document.images.uplinkaverageannuciator.src="RedLight-105x105.png";
}
else if  (parseFloat (UploadDataRateAvg)< 150)
{
document.images.uplinkaverageannuciator.src="YellowLight-105x105.png";
}
else
{
document.images.uplinkaverageannuciator.src="GreenLight-105x105.png";
}






if (parseFloat (LatencyDataRateFile)< 150)
{
document.images.latencycurrentannuciator.src="GreenLight-105x105.png";
}
else if  (parseFloat (LatencyDataRateFile)< 250)
{
document.images.latencycurrentannuciator.src="YellowLight-105x105.png";
}
else
{
document.images.latencycurrentannuciator.src="RedLight-105x105.png";
}


if (parseFloat (LatencyDataRateAvg)< 150)
{
document.images.latencyaverageannuciator.src="GreenLight-105x105.png";
}
else if  (parseFloat (LatencyDataRateAvg)< 250)
{
document.images.latencyaverageannuciator.src="YellowLight-105x105.png";
}
else
{
document.images.latencyaverageannuciator.src="RedLight-105x105.png";
}




if (parseFloat (Latency_Ping_DataRateFile)< 150)
{
document.images.latency_ping_currentannuciator.src="GreenLight-105x105.png";
}
else if  (parseFloat (Latency_Ping_DataRateFile)< 250)
{
document.images.latency_ping_currentannuciator.src="YellowLight-105x105.png";
}
else
{
document.images.latency_ping_currentannuciator.src="RedLight-105x105.png";
}


if (parseFloat (Latency_Ping_DataRateAvg)< 150)
{
document.images.latency_ping_averageannuciator.src="GreenLight-105x105.png";
}
else if  (parseFloat (Latency_Ping_DataRateAvg)< 250)
{
document.images.latency_ping_averageannuciator.src="YellowLight-105x105.png";
}
else
{
document.images.latency_ping_averageannuciator.src="RedLight-105x105.png";
}





if (parseFloat (Power)< -95)
{
document.images.powercurrentannuciator.src="RedLight-105x105.png";
}
else if  (parseFloat (Power)< -85)
{
document.images.powercurrentannuciator.src="YellowLight-105x105.png";
}
else
{
document.images.powercurrentannuciator.src="GreenLight-105x105.png";
}


if (parseFloat (powerAverage)< -95)
{
document.images.poweraverageannuciator.src="RedLight-105x105.png";
}
else if  (parseFloat (powerAverage)< -85)
{
document.images.poweraverageannuciator.src="YellowLight-105x105.png";
}
else
{
document.images.poweraverageannuciator.src="GreenLight-105x105.png";
}




document.getElementById('SpeedCurrentAnnunciatorValue_DivID').innerHTML = Math.round(parseFloat(Speed)); 
document.getElementById('SpeedAverageAnnunciatorValue_DivID').innerHTML = Math.round(parseFloat(speedAverage)); 

document.getElementById('DataRateCurrentAnnunciatorValue_DivID').innerHTML = Math.round(parseFloat(DownloadDataRateFile)); 
document.getElementById('DataRateAverageAnnunciatorValue_DivID').innerHTML = Math.round(parseFloat(DownloadDataRateAvg)); 


document.getElementById('UplinkCurrentAnnunciatorValue_DivID').innerHTML = Math.round(parseFloat(UploadDataRateFile)); 
document.getElementById('UplinkAverageAnnunciatorValue_DivID').innerHTML = Math.round(parseFloat(UploadDataRateAvg)); 



document.getElementById('DataPushLatencyPacketAnnunciatorValue_DivID').innerHTML = Math.round(parseFloat(LatencyDataRateFile)); 
document.getElementById('DataPushLatencyAverageAnnunciatorValue_DivID').innerHTML =Math.round(parseFloat(LatencyDataRateAvg)); 


document.getElementById('DataPushLatency_Ping_PacketAnnunciatorValue_DivID').innerHTML = Math.round(parseFloat(Latency_Ping_DataRateFile)); 
document.getElementById('DataPushLatency_Ping_AverageAnnunciatorValue_DivID').innerHTML =Math.round(parseFloat(Latency_Ping_DataRateAvg)); 

document.getElementById('PowerCurrentAnnunciatorValue_DivID').innerHTML = Math.round(parseFloat(Power));
document.getElementById('PowerAverageAnnunciatorValue_DivID').innerHTML = Math.round(parseFloat(powerAverage));



		
}
