<?xml version="1.0" encoding="UTF-8" ?>
<Module>
<ModulePrefs title="Bollywood News (Bollysite.com)" description="All bollywood sites (aggregated and hourly updated) news, gossips, previews, reviews at one place." author="Bollysite" author_email="bollysite@gmail.com" screenshot="http://news.bollysite.com/opensocial_ss.gif" thumbnail="http://news.bollysite.com/opensocial_ss_th.gif" >

    <Require feature="opensocial-0.7"/>
  </ModulePrefs>
  <Content type="html">
  <![CDATA[

  <style type="text/css">

a.bs{color:#02679c;text-decoration:none;font-family:Verdana;font-size:10pt;}
a.bs:hover{color:#00344f;text-decoration: underline;font-family:Verdana;font-size:10pt;}
td.non_sel{
background-image:url('http://www.orkut.com/img/castro/tabnotsel_l.gif');
width:5px;
}
td.non_sel_t{
background-image:url('http://www.orkut.com/img/castro/tabnotsel_r.gif');
width:140px;
font-family:Verdana;
font-size:10pt;
font-weight:bold;
background-position:100% 0%;
height:23px;
text-align:center;
}
td.non_sel_t a{
color:#02679c;
text-decoration:none;
cursor: pointer; cursor: hand;
}
td.non_sel_t a:hover{
color:#00344f;
text-decoration:underline;
cursor: pointer; cursor: hand;
}
td.sel{
background-image:url('http://www.orkut.com/img/castro/tabsel_l.gif');
width:5px;
background-color:#86A1C5;
}
td.sel_t{
background-image:url('http://www.orkut.com/img/castro/tabsel_r.gif');
width:140px;
font-family:Verdana;
font-size:10pt;
font-weight:bold;
background-position:100% 0%;
height:23px;
text-align:center;
background-color:#86A1C5;

}
td.sel_t a{
color:#FFFFFF;
text-decoration:none;
cursor: pointer; cursor: hand;
}
td.sel_t a:hover{
color:#FFFFFF;
text-decoration:underline;
cursor: pointer; cursor: hand;
}
  </style>
<div id="container">
<table width="100%">
<tr>
<td>
<a href="http://news.bollysite.com"><img src="http://news.bollysite.com/images/bollysite.gif" alt="Bollywood News" border="0" target="_blank"></a>
</td>
</tr>
</table>
<table cellspacing="0" cellpadding="0"  >
<tr >
<td id="latest_l" class="sel"></td>
<td id="latest" class="sel_t"><a here="JavaScript:void(0)" onclick="JavaScript:fetchLatestNews();">Latest News</a></td>
<td>&nbsp;</td>
<td id="popular_l" class="non_sel"></td>
<td id="popular" class="non_sel_t"><a here="JavaScript:void(0)" onclick="JavaScript:fetchPopularNews();">Popular News</a></td>
<td>&nbsp;</td>
<td id="discussed_l" class="non_sel"></td>
<td id="discussed" class="non_sel_t"><a here="JavaScript:void(0)" onclick="JavaScript:fetchDiscussedNews();">Discussed News</a></td>
<td>&nbsp;</td>
</tr>
</table>

   <div id="loader"><img src="http://www.orkut.com/img/progress-loader.gif">&nbsp;Loading...&nbsp;&nbsp;please wait...</div>
   <div id="content_div" style="border-top:1px solid #86A1C4"></div>
</div>
    <script type="text/javascript">
	
	function setActiveTabTo(atab,itab1,itab2){
	tablstr1 = atab + "_l";
	tabstr1 = atab;
	tablstr2 = itab1 + "_l";
	tabstr2 = itab1;
	tablstr3 = itab2 + "_l";
	tabstr3 = itab2;
	document.getElementById(tablstr1).className = 'sel';
	document.getElementById(tabstr1).className = 'sel_t';
	document.getElementById(tablstr2).className = 'non_sel';
	document.getElementById(tabstr2).className = 'non_sel_t';
	document.getElementById(tablstr3).className = 'non_sel';
	document.getElementById(tabstr3).className = 'non_sel_t';
	}

  	function fetchLatestNews(){   
	  document.getElementById('loader').style.display = "";
      var params = {};
      params[gadgets.io.RequestParameters.CONTENT_TYPE] = gadgets.io.ContentType.JSON;
      var url = "http://news.bollysite.com/lastest_news_json.php";
	  setActiveTabTo('latest','popular','discussed');
      gadgets.io.makeRequest(url, response, params);
    };

	function fetchPopularNews(){    
	document.getElementById('loader').style.display = "";
      var params = {};
      params[gadgets.io.RequestParameters.CONTENT_TYPE] = gadgets.io.ContentType.JSON;
      var url = "http://news.bollysite.com/popular_news_json.php";
	  setActiveTabTo('popular','latest','discussed');
      gadgets.io.makeRequest(url, response, params);
    };

	function fetchDiscussedNews(){   
	document.getElementById('loader').style.display = "";
      var params = {};
      params[gadgets.io.RequestParameters.CONTENT_TYPE] = gadgets.io.ContentType.JSON;
      var url = "http://news.bollysite.com/discussed_news_json.php";
	  setActiveTabTo('discussed','popular','latest');
      gadgets.io.makeRequest(url, response, params);
    };

    function response(obj){
	var jsondata = obj.data;
	  html = "";
	  c = 0;
      for (var key in jsondata) {    
  	  ++c;
	  if(c % 2 == 0){
	  color = "#DEEEFF;";
	  }else{
	  color = "#EFF7FF;";
	  }
       var title = jsondata[key].title;
        var desc = jsondata[key].description;
        var link = jsondata[key].page_url;
		html += "<div style='padding-right:20px;padding-left:20px;line-height:23px;background:"+color+"'><a href='"+link+"' class='bs' target='_blank' >"+title+"</a></div>";
      }	   	    
      document.getElementById('content_div').innerHTML = html;
	  document.getElementById('loader').style.display = "none";
     };


     fetchLatestNews();

     </script>
  ]]>
  </Content>
</Module>