function ShowHide(elem){
	el = document.getElementById(elem);
	el.style.display = el.style.display == "block" ? "none" : "block";
}

function update_onairnow(){
	window.setTimeout('make_update_onairnow()',5000);
}

function make_update_onairnow(){
	var xmlhttp = getXmlHttp()
	xmlhttp.open('GET', '/include/body.left.onairnow.php?rnd=' + randomNumber('10000000000000','999999999999999'), true);
	xmlhttp.onreadystatechange = function() {
		if (xmlhttp.readyState == 4) {
			if(xmlhttp.status == 200) {
				var onairElem = document.getElementById('content_on_air_now');
				onairElem.innerHTML = xmlhttp.responseText;
			}
		}
	};
	xmlhttp.send(null);
}

function getXmlHttp(){
  var xmlhttp;
  try {
    xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
  } catch (e) {
    try {
      xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
    } catch (E) {
      xmlhttp = false;
    }
  }
  if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
    xmlhttp = new XMLHttpRequest();
  }
  return xmlhttp;
}

function randomNumber (m,n){
	m = parseInt(m);
	n = parseInt(n);
	return Math.floor( Math.random() * (n - m + 1) ) + m;
}

