// JavaScript Document
function Test(sText)
{
  window.alert('TEST = ' + sText);
}
function OpenWindow(sPage, sParams, sOptions, nWidth, nHeight)
{
  var nLeft = (screen.width - nWidth) / 2;
  var nTop = (screen.height - nHeight) / 2;
  var s = sPage + '?' + sParams;
  //alert(s);
  window.open(s, 'MapWindow', sOptions + 'width=' + nWidth + ',height=' + nHeight + ',top=' + nTop + ',left=' + nLeft);
}
function ValueParams(mode, lon, lat, name)
{
  var v_query;
  v_query = 'mode=' + mode + '&lon=' + lon + '&lat=' + lat + '&name=' + name; 
  return v_query;
}
function VarParams(mode)
{
  var v_lat;
  var v_lon;
  var v_query;
  var v_name;
  v_lat = window.document.getElementById('idLat').value;
  v_lon = window.document.getElementById('idLon').value;
  v_name = window.document.getElementById('idName').value;
  v_query = 'mode=' + mode + '&lon=' + v_lon + '&lat=' + v_lat + '&name=' + v_name;
  return v_query;
}
//
var barva = '';
var barvaNew = '#00C0FF';   // barva pro zvýraznění při pohybu myši nad seznamem 
function SaveColor(element)
{
  barva = element.style.backgroundColor;
  element.style.backgroundColor = barvaNew;
}
function RestoreColor(element)
{
  element.style.backgroundColor = barva;
}
//
function ClearElement(el)
{
 document.getElementById(el).value = '';
}
function RedirectPage(fc_id, fc_name, elFiltr)
{
  var filtr = document.getElementById(elFiltr).value;
  var v = '';
  v = 'RadarsList.php?celkem=NEW&od=1&fc_id=' + fc_id + '&fc_short=' + fc_name + '&filtr=' + filtr;  
  // alert(v);
  location.href = v;
}






