<?xml version="1.0" encoding="UTF-8" ?>
<Module>
<ModulePrefs title="AOL TV: Top In2TV Shows" description="Discover In2TV online and watch free television shows, movies and more." author="AOL, LLC" author_email="igmodules@aim.com" title_url="http://television.aol.com/in2tv" height="160" thumbnail="http://cdn.digitalcity.com/channelmodules/thumbnail_aoltelevision.jpg" screenshot="http://cdn.digitalcity.com/channelmodules/screenshot_aoltelevision.png"/>
<Content type="html">
<![CDATA[
<style>	#in2tv__MODULE_ID__.link {
    font-size: 85%;
    color: #B6B631;}
</style>
<script type="text/javascript" src="http://cdn.channel.aol.com/channelmodules/omni.js"></script>
<script>
function update__MODULE_ID__() {

    _IG_FetchContent('http://feeds.aol.com/rss_2.0/entertainment/tv/tv_in2tv_top.rss', 
        function (responseHTML) {
            if (responseHTML == '') {
                _gel('in2tv__MODULE_ID__').innerHTML = "RSS Feed Unavailable";
                return;
            } 
            var newHtml = '<a href="http://television.aol.com/in2tv" target="_blank" style="color:#AB1717;font-family:arial;font-size:12px;text-decoration:none;"><b>Top Shows This Week:</b></a>';
            var htmlTitle;
            var htmlLink;
            var responseArray = responseHTML.split("<item>");
            for(i=1;i<Math.min(responseArray.length,8);i++)
            {
            	var regexp1 = new RegExp('<title>(\.*)<\/title>','');
            	regexp1.exec(responseArray[i]);
           	 	htmlTitle = RegExp.$1;
           	 	formatTitle = htmlTitle.replace(/&apos;/g,'\'');           	 	
            	var regexp2 = new RegExp('<link>(\.*)<\/link>','');
            	regexp2.exec(responseArray[i]);
            	htmlLink = RegExp.$1;
            	if(formatTitle != '' && htmlLink != '')
            	{
			htmlLink = getOmni(htmlLink, "aoltelevision_in2tv");
            		newHtml += '<li><a style="color:#2864B4;font-family:arial;font-size:12px;text-decoration:none;" href="' + htmlLink + '" target="_blank">' + formatTitle + '</a>';
            	}
            }
             // We got data, so display it
             _gel('in2tv__MODULE_ID__').innerHTML = newHtml;
	    for(i=0;i<11;i++){
		var listitem=document.getElementsByTagName('li')[i];
		while (listitem.offsetHeight>27){
		    listitem.innerHTML = listitem.innerHTML.substr(0,listitem.innerHTML.length-7)+'&hellip;</a>';
	   	}
	   }
        }
    );
}
_IG_RegisterOnloadHandler(update__MODULE_ID__);
</script>
<table height="100%" width="100%" cellpadding="0" cellspacing="0">
<!--	<tr>
		<td colspan="1" style="vertical-align:top;height:30px;">
		<div style="background-image:url(http://cdn.digitalcity.com/channelmodules/aoltelevision_header_tile.jpg)"><img src="http://cdn.digitalcity.com/channelmodules/aoltelevision_header.jpg"></div>
		</td>
	</tr> -->
	<tr>
		<td width="100%" style="vertical-align:top;">
		<div id="in2tv__MODULE_ID__" style="margin:3px;">Please wait, loading ...</div>
		</td>
	</tr>
</table>
]]>
</Content>
</Module>