<?xml version="1.0" encoding="UTF-8" ?>
<Module>
<ModulePrefs title="Dallas News"
author="David Pascual"
author_email="david@yourstreet.com"
author_affiliation="YourStreet Inc."
author_location="San Francisco, CA"
screenshot="http://hosting.gmodules.com/ig/gadgets/file/100026491092382400168/widget-screenshot.jpg"
thumbnail="http://hosting.gmodules.com/ig/gadgets/file/100026491092382400168/yourstreet-thumbnail.png"
category="news"
description="Local news for Dallas, TX updated every hour - powered by YourStreet.com"
render_inline="optional" width="212" height="325" scaling="false">
<Require feature="analytics"/>
</ModulePrefs>
<Content type="html">
<![CDATA[
<script>
_IG_Analytics("UA-1478650-3", "/widget-dallas");
</script>

<style type="text/css">

a, a:hover, a:visited { font-family: Arial; color:#444; line-height: 20px; }
tr { vertical-align: top; }
img { border:0px; }

.fill { width: 100%; }
.float-left { float: left; }
.float-right { float: right; }
.location { padding-bottom:15px; padding-top:10px; background: #ecf2f5; font-family: Arial; font-size: 16px; font-weight: bold; color: #116fa0; background: #ecf2f5; line-height: 8px; text-align: center; }
.prev-next-div { font-size:12px; text-align:center; margin-bottom: 10px; }
.no-prev-next { text-decoration: none; color: #999; }
.prev-next-link { color: #277bb7; }
.prev-next-tab { color: #000; }
.main { font-family: Arial; font-size: 12px; height: 9px; background: #ecf2f5; }
.content_div { height: 210px; }
.headline { color: #444; weight: bold; }
.detail { color:#666; font-size:11px; }

.TopLeft { width: 10px; height: 10px; background: url('/ig/gadgets/file/100026491092382400168/TopLeft.png') no-repeat; }
.Top { height:10px; background: url('/ig/gadgets/file/100026491092382400168/Top.png') repeat-x; }
.TopRight { width: 10px; height: 10px; background: url('/ig/gadgets/file/100026491092382400168/TopRight.png') no-repeat; }
.Left { width: 10px; background: url('/ig/gadgets/file/100026491092382400168/Left.png') repeat-y; }
.Right { width: 10px; background: url('/ig/gadgets/file/100026491092382400168/Right.png') repeat-y; }
.BottomLeft { width: 10px; height: 10px; background: url('/ig/gadgets/file/100026491092382400168/BottomLeft.png') no-repeat; }
.Bottom { height: 10px; background: url('/ig/gadgets/file/100026491092382400168/Bottom.png') repeat-x; }
.BottomRight { width: 10px; height: 10px; background: url('/ig/gadgets/file/100026491092382400168/BottomRight.png') no-repeat; }
</style>

<script type="text/javascript">
var status = null;
var statusi = null;
var page=1;
var pages=13;

function show(bloq,bloqi) {
obj = document.getElementById(bloq);
obj.style.display = (obj==status) ? 'none' : 'block';

if (status != null)
status.style.display = 'none';
status = (obj==status) ? null : obj;

obj = document.getElementById(bloqi);
obj.src = (obj==statusi) ? '/ig/gadgets/file/100026491092382400168/more.gif' : '/ig/gadgets/file/100026491092382400168/more-over.gif';

if (statusi != null)
statusi.src = '/ig/gadgets/file/100026491092382400168/more.gif';
statusi = (obj==statusi) ? null : obj;

}

function nextPage() {
if (page<pages) {
obj = document.getElementById("page"+page);
obj.style.display = (obj==status) ? 'none' : 'block';
if (status != null)
status.style.display = 'none';
status = (obj==status) ? null : obj;

page++;

obj = document.getElementById("page"+page);
obj.style.display = (obj==status) ? 'none' : 'block';
if (status != null)
status.style.display = 'none';
status = (obj==status) ? null : obj;

obj_link = document.getElementById("prev");
obj_link.style.color='#277bb7';
obj_link.style.textDecoration='underline';
}

if (page==pages) {
obj_link = document.getElementById("next");
obj_link.style.color='#999999';
obj_link.style.textDecoration='none';
}

status=null;
}

function prevPage() {
if (page>1) {
obj = document.getElementById("page"+page);
obj.style.display = (obj==status) ? 'none' : 'block';
if (status != null)
status.style.display = 'none';
status = (obj==status) ? null : obj;

page--;

obj = document.getElementById("page"+page);
obj.style.display = (obj==status) ? 'none' : 'block';
if (status != null)
status.style.display = 'none';
status = (obj==status) ? null : obj;

obj_link = document.getElementById("next");
obj_link.style.color='#277bb7';
obj_link.style.textDecoration='underline';
}

if (page==1) {
obj_link = document.getElementById("prev");
obj_link.style.color='#999999';
obj_link.style.textDecoration='none';
}
status = null;
}

</script>

<table width="212" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="TopLeft"></td>
<td class="Top"></td>
<td class="TopRight"></td>
</tr>

<tr>
<td class="Left"></td>
<td class="Center">
<div class="location">Dallas News</div>
</td>
<td class="Right"></td>
</tr>

<tr>
<td class="Left"></td>
<td class="main">
<!-- CONTENT OF THE WIDGET -->
<div id="content_div" class="content_div"></div>
<script type="text/javascript">
function RSSfeed() {
var url= "http://www.yourstreet.com/dallas-tx/rss";

_IG_FetchXmlContent(url, function (response) {
if (response == null || typeof(response) != "object" || response.firstChild == null) {
_gel("content_div").innerHTML = "<i>Invalid data.</i>";
return;
}

var html = "";

var itemList = response.getElementsByTagName("item");
var txt_display="block";
var p=0;

html += "<div id='fake'>";
for (var i = 0; i < itemList.length ; i++) {
var nodeList = itemList.item(i).childNodes;
if ((i % 4)==0)
{
p++;
if (p>1) txt_display="none";
html += "</div>";
html += "<div id='page" + p + "' style='display:" + txt_display + "'>";
}
for (var j = 0; j < nodeList.length ; j++) {
var node = nodeList.item(j);
if (node.nodeName == "title") {
var title = node.firstChild.nodeValue;
}
if (node.nodeName == "description") {
var description = node.firstChild.nodeValue;
}
if (node.nodeName == "link") {
var link = node.firstChild.nodeValue;
}

}

ttitle = title;
if (title.length > 50)
{
ttitle = title.substring(0,50) + "...";
}
html += "<div id='headline" + i + "' class='headline'><a href='#' onclick='show(\"detail" + i + "\",\"more" + i + "\"); return false' onmouseover='document.more" + i +".src=\"/ig/gadgets/file/100026491092382400168/more-over.gif\"' onmouseout='document.more" + i +".src=\"/ig/gadgets/file/100026491092382400168/more.gif\"'><img src='/ig/gadgets/file/100026491092382400168/more.gif' id='more" + i + "'></a> <a href=" + link + " target='_blank'>" + ttitle + "</a></div>";
html += "<div id='detail" + i + "' class='detail' style='display:none'>" + description.substring(0,100) + "...</div>";
}
html += "</div>";
_gel('content_div').innerHTML = html;
});
}

_IG_RegisterOnloadHandler(RSSfeed);
</script>

<div id="prev-next" class="prev-next-div">
<a href="#" onclick="prevPage(); return false" id="prev" style="text-decoration:none; color:#999999">&lt;Prev</a> <span class="prev-next-tab">|</span> <a href="#" onclick="nextPage(); return false" id="next" style="text-decoration:underline; color:#277bb7">Next></a><br>
</div>
<!-- END OF CONTENT -->
</td>
<td class="Right"></td>
</tr>

<tr>
<td class="Left"></td>
<td class="Center">
<div id="footer" style="background: #ecf2f5; text-align:center"><a href="http://www.yourstreet.com/" target="_blank"><img onMouseOver="document.getwidget.src='/ig/gadgets/file/100026491092382400168/yourstreet-more-news-over.png'; return true" onMouseOut="javascript:document.getwidget.src='/ig/gadgets/file/100026491092382400168/yourstreet-more-news.png'; return true" src="/ig/gadgets/file/100026491092382400168/yourstreet-more-news.png" id="getwidget" onclick="_IG_Analytics('UA-1478650-3', '/widget-dallas/click')"></a></div>
</td>
<td class="Right"></td>
</tr>

<tr>
<td class="BottomLeft"></td>
<td class="Bottom"></td>
<td class="BottomRight"></td>
</tr>
</table>
</div>


]]></Content>
</Module>

