function getChannel(channelUrl)
{
    AjaxRequest.get(
      {
        'onSuccess':function (req) { document.getElementById("maincontentarea").innerHTML = req.responseText; },
        'onLoading':function (req) { document.getElementById("maincontentarea").innerHTML = "<b>Loading...</b>"; },
        'onError':function (req) {alert("There was an error processing your request." )},
        'url' : "maincontentarea.php",
        'async' : true,
        'pid' : channelUrl
      }
    );

	AjaxRequest.get(
      {
        'onSuccess':function (req) { document.getElementById("rightbarwidget1").innerHTML = req.responseText; },
        'onLoading':function (req) { document.getElementById("rightbarwidget1").innerHTML = "<b>Loading...</b>"; },
        'onError':function (req) {alert("There was an error processing your request." )},
        'url' : "rightbarwidget1.php",
        'async' : true,
        'pid' : channelUrl
      }
    );

	AjaxRequest.get(
      {
        'onSuccess':function (req) { document.getElementById("rightbarwidget2").innerHTML = req.responseText; },
        'onLoading':function (req) { document.getElementById("rightbarwidget2").innerHTML = "<b>Loading...</b>"; },
        'onError':function (req) {alert("There was an error processing your request." )},
        'url' : "rightbarwidget2.php",
        'async' : true,
        'pid' : channelUrl
      }
    );
 }

function getVideo(videoUrl, channelUrl)
{
    AjaxRequest.get(
      {
        'onSuccess':function (req) { document.getElementById("maincontentarea").innerHTML = req.responseText; },
        'onLoading':function (req) { document.getElementById("maincontentarea").innerHTML = "<b>Loading...</b>"; },
        'onError':function (req) {alert("There was an error processing your request." )},
        'url' : "maincontentarea.php",
        'async' : true,
        'vid' : videoUrl,
        'pid' : channelUrl
      }
    );

	AjaxRequest.get(
      {
        'onSuccess':function (req) { document.getElementById("rightbarwidget1").innerHTML = req.responseText; },
        'onLoading':function (req) { document.getElementById("rightbarwidget1").innerHTML = "<b>Loading...</b>"; },
        'onError':function (req) {alert("There was an error processing your request." )},
        'url' : "rightbarwidget1.php",
        'async' : true,
        'vid' : videoUrl,
        'pid' : channelUrl
      }
    );

	AjaxRequest.get(
      {
        'onSuccess':function (req) { document.getElementById("rightbarwidget2").innerHTML = req.responseText; },
        'onLoading':function (req) { document.getElementById("rightbarwidget2").innerHTML = "<b>Loading...</b>"; },
        'onError':function (req) {alert("There was an error processing your request." )},
        'url' : "rightbarwidget2.php",
        'async' : true,
        'vid' : videoUrl,
        'pid' : channelUrl
      }
    );
}
