 /*!
 * Name          : weather_miniboard_hum
 * Author        : Michael Reuter
 * Last modified : 28.12.2011
 * Revision      : 0.1
 */
function timedCount_hum()
{
document.getElementById('hum_bg').innerHTML=runde(c_hum, 0)*1;
c_hum = document.getElementById("hum_bg").innerHTML*1;
document.getElementById('hum_bg').style.backgroundColor = '#'+parse_hum_color(c_hum);
if(tval_hum === c_hum)
{
stopCount();
}
else
{
t=setTimeout('timedCount_hum()',10);
}
if(c_hum > tval_hum)
{
c_hum=runde(c_hum, 0)*1-1;

}
else
{
c_hum=runde(c_hum, 0)*1+1;

}
}

function dohum(curhum)
{

if (!timer_is_on)
  {
  document.getElementById("hum_sidebar").innerHTML='akt. Feuchte %';
  c_hum = document.getElementById("hum_bg").innerHTML*1;
  timer_is_on=1;
tval_hum= runde(curhum, 0)*1;
  timedCount_hum();
  }


}

function doMinhum(minhum)
{

if (!timer_is_on)
  {
   document.getElementById("hum_sidebar").innerHTML='min. Feuchte %';
  c_hum = document.getElementById("hum_bg").innerHTML*1;
  timer_is_on=1;
tval_hum= runde(minhum, 0)*1;
  timedCount_hum();
  }
}

function doMaxhum(maxhum)
{

if (!timer_is_on)
  {
   document.getElementById("hum_sidebar").innerHTML='max. Feuchte %';
  c_hum = document.getElementById("hum_bg").innerHTML*1;
  timer_is_on=1;
tval_hum= runde(maxhum, 0)*1;
  timedCount_hum();
  }
}
