function Inint_AJAX()
{
  try
  {
    return new ActiveXObject( "Msxml2.XMLHTTP" ); //IE
  }
  catch( e )
  {
  }
  try
  {
    return new ActiveXObject( "Microsoft.XMLHTTP" ); //IE
  }
  catch( e )
  {
  }
  try
  {
    return new XMLHttpRequest(); //Native Javascript
  }
  catch( e )
  {
  }
  alert( "XMLHttpRequest not supported" );
  return null;
};
function loadcalendar( query )
{
  var req = Inint_AJAX();
  req.open( "POST" , "calendar.php" , true );
  req.onreadystatechange = function()
  {
    if ( req.readyState == 4 )
    {
     if ( req.status == 200 )
     {
       document.getElementById( 'calendar' ).innerHTML = req.responseText;
     };
    };
  };
  req.setRequestHeader( "Content-Type", "application/x-www-form-urlencoded" );
  req.send( query );
};

var xmlHttp;

function createXMLHttpRequest() {
    if (window.ActiveXObject) {
        xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
    } 
    else if (window.XMLHttpRequest) {
        xmlHttp = new XMLHttpRequest();
    }
}

function show(option) {

	
	var rand = Math.random();
    var url = option+".php?"+rand ;
	
    createXMLHttpRequest();
    xmlHttp.onreadystatechange =function () {
    if(xmlHttp.readyState == 4) {
        if(xmlHttp.status == 200) {
            document.getElementById("artist").innerHTML  = xmlHttp.responseText;
           
			
        }
    }
};
	
    xmlHttp.open("GET", url, true);
	xmlHttp.setRequestHeader( "Content-Type", "application/x-www-form-urlencoded" );
    xmlHttp.send(null);
}
function show_clip(option) {
	
    var url = option+".html" ;
	
    createXMLHttpRequest();
    xmlHttp.onreadystatechange =function () {
    if(xmlHttp.readyState == 4) {
        if(xmlHttp.status == 200) {
            document.getElementById("clipping").innerHTML  = xmlHttp.responseText;
          
			
        }else{
			document.getElementById("clipping").innerHTML  = '<div align="center"><img src="images/loader.gif"></div>';
		}
    }
};
	
    xmlHttp.open("GET", url, true);
	xmlHttp.setRequestHeader( "Content-Type", "application/x-www-form-urlencoded" );
    xmlHttp.send(null);
}
