﻿var ImageToAd = function(ClassName,List)
{
    this.ClassName = ClassName;
    this.List = List;
    
    document.write(this.ImageTopToAd());
    
    setTimeout(""+this.ClassName+".ShowImage();",2000);
}
ImageToAd.prototype.ImageTopToAd = function()
{
    var strTopAd="";
    var topFlash="<div style=\"width:960px;margin:0px;padding:0px;\"><a href=\""+this.List[4]+"\" target=_blank><img title=\""+this.List[5]+"\" src=\""+this.List[3]+"\" style=\"border:0px;width:960px;\" /></a></div>";

    strTopAd="<div id=adimage style=\"width:960px;margin:0px auto;padding:0px;\">"+
                "<div id=adBig><a href=\""+this.List[1]+"\" " + 
                "target=_blank><img title=\""+this.List[2]+"\" "+
                "src=\""+this.List[0]+"\" " +
                "border=0 style=\"width:960px;\"></A></div>"+
                "<div id=adSmall style=\"display: none\">";
    strTopAd+=  topFlash;     
    strTopAd+=  "</div></div>";

    strTopAd+="<div style=\"height:5px;font-size:0px;line-height:0px;clear:both;overflow:hidden\"></div>";
    return strTopAd;
}

ImageToAd.prototype.ShowImage = function()
{
    $("#adBig").slideUp(1000,function(){$("#adSmall").slideDown(1000);});
}



