var ShowAd = true ;
var advHelper = new AdvertHelper(ShowAd, 5, showAllAdvert);
function showAllAdvert(json) {
if(!json)
return;
advHelper.items = json;
/*
advHelper.setEachImg("left_ad", function(obj) {
return '';
},"
");
advHelper.setEachImg("right_ad", function(obj) {
return '';
},"
");
advHelper.setTxt("toperBaskText", function(obj) {
return '广告:' + obj.title + "";
});
advHelper.setEachImg("mid_ad", function(obj) {
return '';
});
advHelper.setEachImg("logoAd", function(obj) {
return '
';
});
advHelper.setEachImg("logoAd2", function(obj) {
return '
';
});
advHelper.setEachImg("toperAd", function(obj) {
return '
';
});
*/
advHelper.setEachImg("toperAd2", function(obj) {
return '
';
});
advHelper.setEachImg("lqdel", function(obj) {
return '
';
});
advHelper.setEachImg("lqder", function(obj) {
return '
';
});
lqdellmove();
advHelper.setEachImg("lqdel2", function(obj) {
return '
';
});
advHelper.setEachImg("lqder2", function(obj) {
return '
';
});
lqdellmove2();
if (typeof(Advert.supple) === "function") Advert.supple();
}
function Advert(){ //文字广告
//var textAdStr="textAd";
var textAdStr="tr_ad";
var textAd = advHelper.getItem(textAdStr, null);
if (textAd == null) {
Advert.supple = function() {
advHelper.setEachTxt(textAdStr, function(obj, i) {
return showCotent(obj, i % 2 == 0 ? "blue" : "red");
});
}
} else Advert.supple = undefined;
var length = textAd == null ? 7 : textAd.length;
var AdvertObj = this;
this.topIndex = 0;
this.Show = function(num) {
this.topIndex++;
var index = num - 1;
return showAdvert(index);
}
function showAdvert(index) {
var retVal = "";
if (index < length) {
if (textAd !== null) retVal = showCotent(textAd[index], index % 2 == 0 ? "blue" : "red");
return "