<?xml version="1.0" encoding="UTF-8"?>
<Module>
<ModulePrefs title="Businessweek Videos" height="320" width="305"
             author="Jinu George"
             author_email="jgeorge.feedback+bwvid@googlemail.com"
             author_link="http://raakshaseeyam.blogspot.com" 
             description="Watch Businessweek videos on your iGoogle homepage"
             screenshot="http://jinuvgeorge.googlepages.com/bw.png"
             thumbnail="http://jinuvgeorge.googlepages.com/bw.png"> 
</ModulePrefs>
<Content type="html"><![CDATA[
<script>
  var entries = 20;
  var k =0;
  
  function init() {
  if (k<0)
  k=0;
  var url ="http://public-xml.feedroom.com/public_rss/bizweektv_rss.xml";
 _IG_FetchXmlContent(url, function (response) {
         if (response == null || typeof(response) != "object" || response.firstChild == null) {
           _gel("content_div").innerHTML = "<i>Invalid data.</i>";
           return;
        }	

     var objNodeList = response.getElementsByTagName("item"); 
 
var items =[];     
for (var i = 0; i < 100; ++i) {
       var xmlItem = objNodeList.item(i);
       if (!xmlItem)
       break;
       var item = {};
       var added = false;
       for (var j = 0; j < xmlItem.childNodes.length; ++j) {
         var child = xmlItem.childNodes.item(j);
         if (child.childNodes.length > 0) { // (4) pull out the text for the children of the main tag
           var name = child.nodeName;
           var value = child.childNodes[0].nodeValue;
           item[name] = value;
           
              }
}

items.push(item);

}
  var id= items[k]["link"].split("=");
         var html = "<iframe src='http://feedroom.businessweek.com/linking/index.jsp?skin=oneclip&fr_story="+id[1]+"&hl=true' width=302 height=263 scrolling='no' frameborder=0 marginwidth=0 marginheight=0></iframe>";
          _gel("video").innerHTML = html;
       
       
   
  
       
       //http://api.flickr.com/services/feeds/photos_public.gne?tags=shahrukh,khan

     // The rest of the function parameters, which are optional: the number
     // of entries to return, and whether to return summaries.
     }); 
  }


  function back () {
  k -= 1;
  init ();
  }
  
  function next () {
  k += 1;
  init ();
  }
  
 _IG_RegisterOnloadHandler (init);
</script>
<script>
  _IG_Analytics("UA-2560293-5", "/BWVid");
</script>

<div id="head" align="center" style="font-size:12px;background-color:#EE0000;color:white;margin-left:40px;margin-right:40px"><b>BusinessWeek Videos</b></div>
<div id="video" align="center"></div>
<div id="control" style="float:left"><font size='2'><a href='javascript:back()' style="text-decoration:none;color:#006699">Previous</a></font></div>
<div id="control1" style="float:right"><font size='2'><a href='javascript:next()' style="text-decoration:none;color:#006699"">Next</a></font></div>
<div id="ad" align="center" style="clear:both">
<script type="text/javascript"><!--
google_ad_client = "pub-7199283646323733";
/* 234x60, created 6/4/08 */
google_ad_slot = "4488888752";
google_ad_width = 234;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
]]></Content>
</Module>
