function BxNewsMain(oOptions) {
    this._sSystem = oOptions.sSystem;
    this._sActionsUrl = oOptions.sActionUrl;
    this._sObjName = oOptions.sObjName == undefined ? 'oNewsMain' : oOptions.sObjName;
    this._sAnimationEffect = oOptions.sAnimationEffect == undefined ? 'slide' : oOptions.sAnimationEffect;
    this._iAnimationSpeed = oOptions.iAnimationSpeed == undefined ? 'slow' : oOptions.iAnimationSpeed;
}
BxNewsMain.prototype.changePage = function(iStart, iPerPage, sType) {
    var oDate = new Date();
    var $this = this;

    var sFilterValue = '';
    if($('#news-filter-chb:checked').length > 0 && $('#news-filter-txt').val().length > 0)
    	sFilterValue = $('#news-filter-txt').val();

    $.post(
        this._sActionsUrl + 'act_get_news/' + (sType ? sType + '/' : '') + iStart + '/' + iPerPage + '/' + sFilterValue,
        {
        	filter_value:sFilterValue,
            _t:oDate.getTime()
        },
        function(sData){
            $('.news-view #news-content-' + sType).bx_anim('hide', $this._sAnimationEffect, $this._iAnimationSpeed, function() {
                $(this).replaceWith(sData);
            });            
        },
        'html'
    );
}
BxNewsMain.prototype.deleteNews = function(iId) {
	var $this = this;
	
	$.post(
		this._sActionsUrl + "act_delete/",
		{id:iId},
		function(sData) {
			var iCode = parseInt(sData);
			if(iCode == 1) {
				alert(aDolLang['_news_msg_success_delete']);
				window.location.href = $this._sActionsUrl
			}
			else
				alert(aDolLang['_news_msg_failed_delete']);
		}
	)
}