var topBannerAd = new Class({
    options : {
        closePic : 'close1.gif' ,
        width : 980 ,
        height : 50
    } ,
    initialize : function(href , pic , title , options) {
        this.setOptions(options) ;
        this.href = href ;
        this.pic = pic ;
        this.title = title ;
        var ele = new Element('div' , {'id':'topBannerBao'}).setHTML('<div id="topBanner"><a target="_blank" href="' + this.href + '"><img width="' + this.options.width + '" height="' + this.options.height + '"  src="' + this.pic + '" title="' + this.title + '" /></a><span style="background: url(' + this.options.closePic + ');"></span></div>').injectTop(document.body) ;
        this.myslide = new Fx.Slide($('topBanner')).hide();
        $('topBanner').getElementsByTagName('span')[0].onclick = this.display.bind(this , 0) ;
        new Image().src = pic ;
    } ,
    display : function(type) {
        if(type) {
            if($('topBannerBao'))
                this.myslide.slideIn() ;
        }
        else {
            this.myslide.slideOut() ;
        }
    }
}) ;
topBannerAd.implement(new Events, new Options);