function init()
{
    // Nothing happens here this time
}

function makeARequest( requestType )
{
    // create a new request object, now you have an object to make remote calls with
    var req = new XMLHttpRequest();

    // declare a callback, look ma closures again!
    function callBack()
	{
	   // console.log( req.readyState );

	    // if the request is complete
	    if( req.readyState == 4 )
		{
		    // make sure the request was made successfully
		   if( req.status == 200 )
			{
			    // sucess call the handler
			    myHandler( req.responseText );
			}
		    else
			{
			    alert( req.statusText );
			}
		}
	}

    // set the callback function
    req.onreadystatechange = callBack;
    
    // make an asynchronous call
    req.open( "GET", "http://officialbufanda.com/video/videoBlack.php?type=" + requestType, true);
    req.send( "" );
}

function myHandler( responseText )
{
    // we going to dynamically update a portion of the page
    
    // get a reference to the dynamic div
    var dynamic = document.getElementById( "dynamic" );
    
    // set the innerHTML property to the reponseText
    dynamic.innerHTML = responseText;
}

//AJAX START
        // create a new request object
        if (window.XMLHttpRequest) { // Mozilla, Safari,...
                         var req = new XMLHttpRequest();
                         if (req.overrideMimeType) {
                             // set type accordingly to anticipated content type

                            req.overrideMimeType('text/html');
                         }
                      } else if (window.ActiveXObject) { // IE this should fix problems on PC
                         try {
                            req = new ActiveXObject("Msxml2.XMLHTTP ");
                         } catch (e) {
                            try {
                               req = new ActiveXObject("Microsoft.XMLHTTP");
                            } catch (e) {}
                         }
                  }
