	var MENU_INFO = [
		['1', 'The Chosun Ilbo','http://english.chosun.com/site/data/rss/rss.xml', 'ln00.gif', 'ln00_on.gif'],
		['1', 'national','http://218.145.28.33:8010/site/data/rss/national.xml', '', ''],
		['1', 'politics','http://218.145.28.33:8010/site/data/rss/politics.xml', '', ''],
		['1', 'Business','http://218.145.28.33:8010/site/data/rss/business.xml', '', ''],
		['1', 'Sci-tech','http://218.145.28.33:8010/site/data/rss/sci-tech.xml', '', ''],
		['1', 'Sports','http://218.145.28.33:8010/site/data/rss/news3.xml', '', ''],
		['1', 'Art & Ent','http://218.145.28.33:8010/site/data/rss/news4.xml', '', ''],
		['1', 'World','http://218.145.28.33:8010/site/data/rss/news5.xml', '', ''],
		['1', 'Opinion','http://218.145.28.33:8010/site/data/rss/news6.xml', '', ''],
		['1', 'Tip of the day','http://218.145.28.33:8010/site/data/rss/news7.xml', '', ''],
		['1', 'People','http://218.145.28.33:8010/site/data/rss/people.xml', '', ''],
		['2', 'ABC','http://my.abcnews.go.com/rsspublic/fp_rss20.xml', 'ln01.gif', 'ln01_on.gif'],
		['2', 'BBC','http://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml', 'ln02.gif', 'ln02_on.gif'],
		['2', 'Business Week','http://www.businessweek.com/topStories/rss/topStories.rss', 'ln03.gif', 'ln03_on.gif'],
		['2', 'CNN','http://rss.cnn.com/rss/edition.rss', 'ln04.gif', 'ln04_on.gif'],
		['2', 'Fox Sports','http://www.foxnews.com/xmlfeed/rss/0,4313,0,00.rss', 'ln05.gif', 'ln05_on.gif'],
		['2', 'Reuters','http://feeds.reuters.com/reuters/topNews/', 'ln07.gif', 'ln07_on.gif'],
		['2', 'Washington Post','http://www.washingtonpost.com/wp-dyn/rss/print/asection/index.xml', 'ln08.gif', 'ln08_on.gif'],
		['2', 'USA Today','http://rssfeeds.usatoday.com/usatoday-NewsTopStories', 'ln09.gif', 'ln09_on.gif'],
		['2', 'LA Times','http://feeds.latimes.com/latimes/news/nationworld/nation', 'ln06.gif', 'ln06_on.gif']
	];
	
	function showEcoList(menuId) {

		var localData = new Object();

		// 데이터 가져오기
		var dataRequest;
		var url = '/english/php/httpProxy.php';
		if(menuId < 11)
			url = '/english/php/httpProxy1.php';
		if(menuId==null || menuId < -1) menuId = 11;

		var pars = "feedURL="+encodeURIComponent(MENU_INFO[menuId][2]);

		dataRequest = new Ajax.Request(
			url,
			{
				method : 'get',
				parameters : pars,
				onSuccess : displayRSSFeed,
				onFailure : reportError
			}
		)

		function displayRSSFeed(response) {
			$('title_pan').innerHTML = "<strong>" + MENU_INFO[menuId][1] + "</strong>";
			for(i=0; i < MENU_INFO.length; i++){
				var imgobj = document.getElementById("rss_" + i);
				if(imgobj != null){
					if(i == menuId)
						imgobj.src = "http://image.chosun.com/eng/images/" + MENU_INFO[i][4];
					else
						imgobj.src = "http://image.chosun.com/eng/images/" + MENU_INFO[i][3];
				}
			}

			localData.feed = new Feed(response);

			// 하단 목록 처리
			listStr = "";
			var listLen = 30;
			var chk_openul = false;
			if(localData.feed.items.length < listLen) listLen = localData.feed.items.length;
			if(localData.feed.items.length > 1) {
				for (var i=0; i<listLen; i++) {
					if(i%5==0) {
						listStr = listStr + "<ul class=\"arti_group\">";
						chk_openul = true;
					}

					var viewDate = localData.feed.items[i].date;
					viewDate = getDateForm(viewDate, MENU_INFO[menuId][0]);

					//var _title = localData.feed.items[i].title;
					//if(_title.length > 30) _title = _title.substr(0, 20);
					listStr += "<li class=\"arti_tit_list\"><a href=\"" + localData.feed.items[i].link + "\" target='_blank'>" + localData.feed.items[i].title + "</a><span class=\"arti_date\">" + viewDate + "</span></li>";

                        		if(i%5 == 4){
                                		listStr += "</ul>";
                                		chk_openul = false;
                        		}
				}
                		if(chk_openul == true)
                        		listStr += "</ul>";
			}
			$('ecoList').innerHTML = listStr;
		}

		function reportError() {
			$('ecoList').innerHTML = '';
		}

	        function getDateForm(_date, opt){
			if(_date == null || _date.length < 10) return "";

                	var str = "";
			var _y = "";
			var _m = "";
			var _d = "";
			var _h = "";
			var _mi = "";

			if(opt == 1){
                		_y = _date.substr(0,4);
                		_m = eval(_date.substr(5,2));
                		_d = _date.substr(8,2);
                		_h = _date.substr(11,2);
                		_mi = _date.substr(14,2);

                		var month = ["Jan.", "Feb.", "Mar.", "Apr.", "May", "Jun.", "Jul.", "Aug.", "Sep.", "Oct.", "Nov.", "Dec."];
                		var _mon = month[(_m-1)];

			}else if(opt == 2){
				//var tmpDate = _date.split(" ");
				var tmpDate = new Array();
				for(i=0, j=0; i < _date.length; ){
					var ind = _date.indexOf(" ", i);
					if(ind < 0){
						tmpDate[j] = _date.substr(ind);
						break;
					}else{
						var tmp_substr = _date.substr(i, (ind-i));
//alert("" + i + ", " + ind + " *" + tmp_substr + "*");
						i = ind + 1;
						if(tmp_substr == "") continue;
						else{ tmpDate[j] = tmp_substr; j++; }
					}
				}
				_y = tmpDate[3];
				_mon = tmpDate[2];
				if(_mon.length > 3) _mon = _mon.substr(0, 3);
				_d = tmpDate[1];
				_h = tmpDate[4].substr(0,2);
				_mi = tmpDate[4].substr(3,2);
			}

                	str = _mon + " " + _d + ", " + _y + " " + _h + ":" + _mi;

                	return str;
        	}
	}

	function getRollingData(){
		var num = Math.floor(Math.random()*9);
                var localData = new Object();
                var dataRequest;
                var url = '/english/php/httpProxy.php';

                var pars = "feedURL="+encodeURIComponent(MENU_INFO[num+11][2]);
                dataRequest = new Ajax.Request(
                        url,
                        {
                                method : 'get',
                                parameters : pars,
                                onSuccess : resultGetRollingData,
                                onFailure : reportError
                        }
                )

                function resultGetRollingData(response) {
			localData.feed = new Feed(response);

			var listLen = 10;
			if(localData.feed.items.length < listLen) listLen = localData.feed.items.length;
			if(localData.feed.items.length > 1) {
				for (var i=0; i<listLen; i++) {
					pausecontent2[i]="<a href=\"" + localData.feed.items[i].link + " \" target='_blank'>" + localData.feed.items[i].title + "</a>";
				}
			}

			call();
		}

		function reportError() {
		}

	}
