function clsArticle(htmlFrag, articleid, objectname,articletype) { 
	this.asynchronous = new Asynchronous(); //defined in asynchronous.js
	this.fragment = htmlFrag;		
	this.articleid = articleid; 
	this.objectname = objectname;
	this.articletype = articletype;
}


function Article_getRecentNews(){
	var instance = this;
	instance.asynchronous.loading = function(){
		try{
			instance.fragment.innerHTML = "<center><i class=font>loading...</i></center>";
		}catch(e){
			//alert(e);
		}
	}
	instance.asynchronous.complete = function(status, statusText, responseText, responseXML) {
	    //load into an xml doc and read the text of the first childnode
	    try{
	        resp = responseXML.documentElement;	    
	        var shtml = new String();
	        shtml = resp.childNodes[0].nodeValue;
	        instance.fragment.innerHTML = shtml;			
	    }catch(e){
		  //  alert(e);
	    }
	}
	instance.asynchronous.call("/webservice/clsArticleWebService.asmx/GetRecentNews");	

}

function Article_getArticleById(id){
	var instance = this;
	instance.asynchronous.loading = function(){
		try{
			instance.fragment.innerHTML = "<center><i class=font>loading...</i></center>";
		}catch(e){
			//alert(e);
		}
	}
	instance.asynchronous.complete = function(status, statusText, responseText, responseXML) {
	    //load into an xml doc and read the text of the first childnode
	    try{
	        resp = responseXML.documentElement;
	        var shtml = new String();
	        shtml = resp.childNodes[0].nodeValue;
	        shtml=shtml.replace(/&#38;/g,"&");
	        instance.fragment.innerHTML = shtml;				 
	        instance.articleid = resp.getAttribute("id");
	    }catch(e){
		   // alert(e);
	    }
	}
	instance.asynchronous.call("/webservice/clsArticleWebService.asmx/GetArticleById?ArticleID=" + id);	
}
	
clsArticle.prototype.getarticlebyid = Article_getArticleById;	
clsArticle.prototype.getrecentnews = Article_getRecentNews;

	
	