/*
|	News manager
|
|	Manages functions for outputting news
|	Requires: core.js,connection.js

*/

		//News function
		{hp.newss=function(){
			return {
				rsss:function(){
					return {
						gsmas:function(){
							var oRs=hp.http.conn(),oT=hp.utils.get('mbb_news');
							hp.http.loading(oT);
							oRs.open("get","http://www.mobileworldlive.com/get/news/gsma/",true);
							oRs.onreadystatechange=function() {
								if(oRs.readyState==4){
									if (oRs.status==200) {
										oResponse=oRs.responseText;
										try {
											oXML=(new DOMParser()).parseFromString(oResponse,"text/xml");
											oXML=oXML.getElementsByTagName('channel')[0].getElementsByTagName('item');
											nLength=oXML.length;
											vListBody='';
											(nLength>20)?nLength=20:null;
											if(nLength>0){
												vListBody+='<ul class="mbb_news">';
												for(var i=0;i<nLength;i++){
													vListBody+='<div class="promo_content_title"><a href="'+oXML[i].childNodes[1].firstChild.data+'" target="_blank" class="rssnewslink">'+oXML[i].childNodes[3].firstChild.data.trim()+'</a></div><div class="promo_content_title_date">'+oXML[i].childNodes[6].firstChild.data+'</div>';
												};
												vListBody+='</ul>';
											} else {
												vListBody+='<ul><li class="grey"><em>No news stories found!</em></li></ul>';
											}
											oT.innerHTML=vListBody;
										} catch(o) {
											oT.innerHTML='<div class="title">ssGSMA News</div><div class="list_body"><ul><li>Sorry, GSMA News feed currently unavailable</li></ul></div>';
										}
									} else {
										oT.innerHTML='<div class="title">GSMA News</div><div class="list_body"><ul><lia>aaSorry, GSMA News feed currently unavailable</li></ul></div>'
									}
								}
							
							
							
							}
							oRs.send(null);
						}
						
					}
				}()
			}
		}()};