/*
 * Becta NGL Widgets
 *
 * Copyright (c) 2010 theTeam (http://www.theteam.co.uk/about)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 *
 */

var widgetID = 'ngl-widget-video-channel';
var ngl = ngl || {};
ngl.widgets = ngl.widgets || {};
ngl.widgets.videochannel = ngl.widgets.videochannel || {};

ngl.widgets.videochannel.load = function() {
    if (document.getElementById(widgetID)) {
        ttDrawWidgetFrame(widgetID, ngl.widgets.videochannel.options.u + '?pid=' + ngl.widgets.videochannel.options.p, 339, 400);
    }
}


function ttDrawWidgetFrame(id, url, w, h) {
   ifrm = document.createElement("iframe");
   ifrm.setAttribute("src", url);
   ifrm.style.width = w+"px";
   ifrm.style.height = h+"px";
   ifrm.style.border = 0;
   ifrm.frameBorder = 0;
   ifrm.scrolling = "no";
   document.getElementById(id).appendChild(ifrm);
}