function igGetNews(url, id) {

		url = escape(url);
		// url = 'http://www.investorguide.com/proxy/proxy.php?url=' + url;
		url = 'http://' + window.location.host + '/proxy/proxy.php?url=' + url;
		

    jQuery.getFeed({
        url: url,
        success: function(feed) {
            var html = '';
            for(var i = 0; i < feed.items.length && i < 5; i++) {
            
                var item = feed.items[i];
                
                html += '<p>'
                + '<strong>' 
                + '<a href="'
                + item.link
                + '", target=_blank>'
                + item.title
                + '</a>'
                + '</strong>';
                
                html += '&mdash; <span class="author">'
                + item.author
                + '</span><br>';
                
                html += ''
                + item.description
                + '</p>';
            }
            
            jQuery(id).append(html);
        }    
    });
}


function igGetFeaturedArticles(url, id) {

		url = escape(url);
		// url = 'http://www.investorguide.com/proxy/proxy.php?url=' + url;
		url = 'http://' + window.location.host + '/proxy/proxy.php?url=' + url;
		jQuery.getFeed({
        url: url,
        success: function(feed) {
            var html = '<div id="FeaturedArticle" class="block-content bodycopy" style="overflow:hidden">';
			
			var item = feed.items[0];
                
                html += '<div style="width:300px; padding-right:10px; float:left;"><h3>'
                + '<a href="'
                + item.link
                + '">'
                + item.title
                + '</a>'
                + '</h3>';
                               
                html += ''
                + item.description
				+ '</div><div style="width:275px; float:left;">';
			
            for(var i = 1; i < feed.items.length && i < 6; i++) {
            
                var item = feed.items[i];
                
                html += '<div style="float:left;width:12px;">&bull;</div><div style="float:left; width:260px;">'
                + '<a href="'
                + item.link
                + '">'
                + item.title
                + '</a></div>';
               
                
                
            }
             html += '</div><div style="clear:both"></div><div><a href ="http://www.investorguide.com/article"><b>More arket Commentary and Articles ></b></a> </div>';
            jQuery(id).replaceWith(html);
        }    
    });
}





function igGetNewsT(url, id) {

		url = escape(url);
		 url = 'http://www.investorguide.com/proxy/proxy.php?url=' + url;
		//url = 'http://' + window.location.host + '/proxy/proxy.php?url=' + url;
		

    jQuery.getFeed({
        url: url,
        success: function(feed) {
            /*
            jQuery(id).append('<h2>'
            + '<a href="'
            + feed.link
            + '">'
            + feed.title
            + '</a>'
            + '</h2>');
            */
            var html = '';
            
            for(var i = 0; i < feed.items.length && i < 5; i++) {
            
                var item = feed.items[i];
                
                html += '<p>'
                + '<strong>' 
                + '<a href="'
                + item.link
                + '", target=_blank>'
                + item.title
                + '</a>'
                + '</strong>';
                
                html += '&mdash; <span class="author">'
                + item.author
                + '</span><br>';
                
                html += ''
                + item.description
                + '</p>';
            }
            
            jQuery(id).append(html);
        }    
    });
}












function igGetNews_one(url, id) {

		url = escape(url);
		url = 'http://' + window.location.host + '/proxy/proxy.php?url=' + url;

    jQuery.getFeed({
        url: url,
        success: function(feed) {
            var html = '';
            
            for(var i = 0; i < feed.items.length && i < 5; i++) {
            
                var item = feed.items[i];
                
                html += '<p>'
                + '<strong>' 
                + '<a href="'
                + item.link
                + '" target=_blank>'
				
                + item.title
                + '</a>'
				+ ' - '
				
                + '</strong>';
                
              // html += ''
              //  + item.description
                + '</p>';
            }
            
            jQuery(id).append(html);
        }    
    });
}

function igGetNews_forex(url, id) {

		url = escape(url);
		url = 'http://' + window.location.host + '/proxy/proxy.php?url=' + url;

    jQuery.getFeed({
        url: url,
        success: function(feed) {

            var html = '';
            
            for(var i = 0; i < feed.items.length && i < 5; i++) {
            
                var item = feed.items[i];
                
                html += '<p>'
                + '<strong>' 
                + '<a href="'
                + item.link
                + '" target=_blank>'
                + item.title
                + '</a>'
                + '</strong>';
                
                html += '<span class="author">'
                + item.author
                + '</span><br>';
                
                html += ''
                + item.description
                + '</p>';
            }
            
            jQuery(id).append(html);
        }    
    });
}


function igGetNews_forexTweets(url, id) {

		url = escape(url);
		url = 'http://' + window.location.host + '/proxy/proxy.php?url=' + url;

    jQuery.getFeed({
        url: url,
        success: function(feed) {
            var html = '';

			if (feed.items)
			{
	            for(var i = 0; i < feed.items.length && i < 10; i++) {
            
    	            var item = feed.items[i];
					var date = item.updated;
                
        	        html += '<p>'
              //  + '<a class="gs-title" href="'
               // + item.link
               // + '", target=_blank>'
				
                + item.title
              //  + '</a>';
                 
				html += '<br />Posted on&nbsp;<span style="font:bold 10px Verdana;color:#9f9f9f;">'
				+ date
				+'</span>';
				
                html += '&nbsp;by<span class="author" >'
				+ '<a style="text-decoration:none;"href=http://www.twitter.com/'+ item.author +' target=_blank>'
		        + item.author
				+ '</a>'
                + '</span><br>';
                
            
				+ '</p>';
	            }
            }
            
            jQuery(id).append(html);
        }    
    });
}

function igGetNews_forexMain(url, id) {

		url = escape(url);
		url = 'http://' + window.location.host + '/proxy/proxy.php?url=' + url;

    jQuery.getFeed({
        url: url,
        success: function(feed) {
            var html = '';
            
            for(var i = 0; i < feed.items.length && i < 5; i++) {
            
                var item = feed.items[i];
                
                html += '<p>'
                + '<strong>' 
                + '<a href="'
                + item.link
                + '" target=_blank>'
				
                + item.title
                + '</a>'
				//+ ' - '
				
                + '</strong>';
                
              // html += ''
              //  + item.description
              //  + '</p>';
            }
            
            jQuery(id).append(html);
        }    
    });
}


function igGetNews_igrTweetstest(url, id) 
{
	url = escape(url);
	url = 'http://' + window.location.host + '/proxy/proxy.php?url=' + url;
	//alert(url);

    jQuery.getFeed({
        url: url,
        success: function(feed) {
			var html = '';
			if (feed != null && feed.items != null)
			{
				for(var i = 0; i < feed.items.length && i < 6; i++) 
				{
					var item = feed.items[i];
					
					html += '<p>'
					html += item.title+ '</p>';
				}
			}
			else
			{
				html = 'No tweets found';
			}
            
            jQuery(id).append(html);
		}
    });
}

function igGetNews_igrTweets(url, id) 
{
	url = escape(url);
	url = 'http://' + window.location.host + '/proxy/proxy.php?url=' + url;
	//alert(url);

    jQuery.getFeed({
        url: url,
        success: function(feed) {
			var html = '';
			if (feed != null && feed.items != null)
			{
				for(var i = 0; i < feed.items.length && i < 6; i++) 
				{
					var item = feed.items[i];
					
				html += '<p>'
               // + '<a class="gs-title" href="'
              // + item.link
               // + '", target=_blank>'
				
                + item.title;
               // + '</a>';
                 
				html += '<br />Posted on&nbsp;<span style="font:bold 10px Verdana;color:#9f9f9f;">'
				+ item.updated
				+'</span>';
				
                html += '&nbsp;by <span class="author" >'
				+ '<a style="text-decoration:none;"href=http://www.twitter.com/'+ item.author_name +' target=_blank>'
		        + item.author_name
				+ '</a>'
                + '</span><br>';
                
            
				+ '</p>';
				}
			}
			else
			{
				html = 'No tweets found';
			}
            
            jQuery(id).append(html);
		}
    });
}


function igGetNews_yahoo(url, id) 
{
	url = escape(url);
	url = 'http://' + window.location.host + '/proxy/proxy.php?url=' + url;
	//alert(url);

    jQuery.getFeed({
        url: url,
        success: function(feed) {
			var html = '';
			if (feed != null && feed.items != null)
			{
				for(var i = 0; i < feed.items.length && i < 8; i++) 
				{
				var item = feed.items[i];
				 var m_names = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
				var d = new Date(item.updated);
				var curr_date = d.getDate();
				var curr_month = d.getMonth();
				var curr_year = d.getFullYear();
				//document.write(curr_date + "-" + m_names[curr_month] + "-" + curr_year);
               
				html += '<div style="float:left;font:8px normal Verdana;color:#9f9f9f;">'
				+ item.updated
				+'</div>';
				
					html += '<div style="float:left;font-family: Verdana,Tahoma,Arial;font-size: 10px;color: #000099;line-height: 18px;margin-bottom: 1.3em;">'
				+ '<a class="gs-title" href="'
                + item.link
                + '", target=_blank>'
				+ item.title
				 + '</a>'
				+'</div>';
				
				html += '<div style="clear:both;">'
				+'</div>';
				
				html += '<div style="font:8px normal Verdana;color:#9f9f9f;">'
				+ item.content
				+'</div>';
				
				}
			}
			else
			{
				html = 'No tweets found';
			}
            
            jQuery(id).append(html);
		}
    });
}


function igGetNews_video(url, id) {

		url = escape(url);
		// url = 'http://www.investorguide.com/proxy/proxy.php?url=' + url;
		url = 'http://' + window.location.host + '/proxy/proxy.php?url=' + url;
		

    jQuery.getFeed({
        url: url,
        success: function(feed) {
            var html = '';
            
            for(var i = 0; i < feed.items.length && i < 5; i++) {
            
                var item = feed.items[i];
                
                html += '<p class="bodycopy">'
                + '<strong>' 
                + '<a href="'
                + item.link
                + '", target=_blank>'
                + '<span style="font-size:11px;">' + item.title + '</span>'
                + '</a>'
                + '</strong><br>'
				+ '</p>';
                
               // html += '&mdash; <span class="author">'
              // + item.author
               // + '</span><br>';
                
               html += '<p class="bodycopy" style="margin-bottom:-5px;">'
               + '<a href="'
                + item.link
                + '", target=_blank style="text-decoration:none;">'
				+ '<span style="font-size:11px;line-height:18px;cursor:pointer;color:#000000;">' + item.description + '</span>'
				+ '</a>'
               + '</p>';
            }
            
            jQuery(id).append(html);
        }    
    });
}
