var previous_date_options = null;
function selectDate(i,two_dates)
{
	if (previous_date_options) previous_date_options.innerHTML = "";
	var date_options = document.getElementById('dateOptions'+i);
	var radioObj = document.getElementById('radio'+i);
	radioObj.checked = "checked";
	if (!two_dates) date_options.innerHTML = document.getElementById('date-options').innerHTML;
	else date_options.innerHTML = document.getElementById('date-options2').innerHTML;
	previous_date_options = date_options;
}

function getIEVersion()
// Returns the version of Internet Explorer or a -1
// (indicating the use of another browser).
{
  var rv = -1; // Return value assumes failure.
  if (navigator.appName == 'Microsoft Internet Explorer')
  {
    var ua = navigator.userAgent;
    var re  = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
    if (re.exec(ua) != null)
      rv = parseFloat( RegExp.$1 );
  }
  return rv;
}

function compatibility()
{
	var ie_version = getIEVersion();
	if (ie_version != -1 && ie_version < 7) {
		location.replace('incompatible');
	}
}

var infoTimeout = null;

function info(txt, img)
{
	clearInterval(infoTimeout);
	var infoObj = document.getElementById('info');
	if (!txt) {
		infoObj.innerHTML = '';
	} else {
		infoTimeout = setTimeout("showInfo('"+img+"')",1000);
	}
}

function showInfo(img)
{
	var infoObj = document.getElementById('info');
	infoObj.innerHTML = '<img src="http://24.244.69.76:8081/reflex/thumbnails/'+img+'.jpg">';
}
