
	function createxmlrq()
	{
		var xmlHttpReq = false;
			
		// Mozilla/Safari
		if (window.XMLHttpRequest) 
		{
			xmlHttpReq = new XMLHttpRequest();
		} else {
			if (window.ActiveXObject) 
			{
				// IE
				xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
			}
		}
		return xmlHttpReq;
	}

  function escapeHTML(s)
  {
    return s.replace(
      /[&<>"]/g,
      function(m)
      {
        var map = {
          "&": "amp",
          "<": "lt",
          ">": "gt",
          '"': "quot"
        };

        return "&" + map[m] + ";";
      });
  }

  function unescapeHTML()
  {
    return s.replace(
      /&(amp|[lg]t|quot);/g,
      function(m, p1)
      {
        var map = {
          amp:  "&",
          lt:   "<",
          gt:   ">",
          quot: '"'
        };

        return map[p1];
      });
  } 


	function fejover(st, i)
	{
		document.getElementById("fbtn1").src="img/hb_"+st+"1"+i+"-o.gif";
		document.getElementById("fbtn2").src="img/hb_"+st+"2"+i+"-o.gif";
		document.getElementById("fbtn3").src="img/hb_"+st+"3"+i+"-o.gif";
	}


	function loadSong()
	{
		var xmlHttpReq=createxmlrq();
		xmlHttpReq.open('GET', "onair/currentsong.txt?random="+Math.random(), true);
		xmlHttpReq.onreadystatechange = function()
		{
			if (xmlHttpReq.readyState==4)
			{
				if (document.getElementById("aquasong"))      { document.getElementById("aquasong").innerHTML=escapeHTML(xmlHttpReq.responseText); }
				if (document.getElementById("aquasonglarge")) { document.getElementById("aquasonglarge").innerHTML=escapeHTML(xmlHttpReq.responseText); }
				setTimeout("loadSong();", 10000);
			}
		}
		xmlHttpReq.send();
	}

	function checkenter(e)
	{
		var keynum;
		if (window.event) // IE
		{
			keynum = e.keyCode;
		} else {
			if(e.which) // Netscape/Firefox/Opera
			{
				keynum = e.which;
			}
		}
		keychar=String.fromCharCode(keynum);

		if (keynum==13) 
		{
			vsearch();
			return false;
		}
		return true;
	}

