		var qs = location;
		
		 //var str=location.search.substr(1).split("&")
var myRequest = null;
function CreateXmlHttpReq(handler) {
  var agt = navigator.userAgent.toLowerCase();
  var is_ie5 = (agt.indexOf('msie 5') != -1);

  var is_ie7 = (agt.indexOf('msie 7') != -1);
    var is_ie8 = (agt.indexOf('msie 8') != -1);
var xmlhttp = null;
  try {
    xmlhttp = new XMLHttpRequest();
    try {
        // Fix for some version of Mozilla browser.
        http_request.overrideMimeType('text/xml');
    } catch(e) { }
    xmlhttp.onload = handler;
    xmlhttp.onerror = handler;
  } catch(e) {
    var control = (is_ie5) ? "Microsoft.XMLHTTP" : "Msxml2.XMLHTTP";

    xmlhttp = new ActiveXObject(control);
    xmlhttp.onreadystatechange = handler;
  }
  if(is_ie7)  { xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = handler;}
    if(is_ie8)  { xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = handler;}
  return xmlhttp;
}

function myHandler2() {
if (myRequest.readyState == 4 && myRequest.status == 200) {
        e = document.getElementById("pagina");
		e.innerHTML = myRequest.responseText;
    }  
	
}

function vai(tipo) {
	
    var r = Math.random();
    myRequest = CreateXmlHttpReq(myHandler2);	
	

	myRequest.open("GET","libro.php?op=canto&c="+tipo+"&rand="+escape(r));

myRequest.send(null);
	
}





