﻿var adFloat = {
    Options: [],
    imageOption: {
        adImageUrl: "",
        adLink: "#",
        adTitle: "",
        adType: "jpg"
    },
    isStop: false,
    show: function() {
        this.init();
        //alert($(document).height());
        this.offSet();
        $("#myright").show();

    },
    offSet: function() {
        $("#myright").css("top", $(document).scrollTop() + 200);
        $("#myright").css("left", 10);
        if (!this.isStop) {
            setTimeout("adFloat.offSet();", 50);
        }
    },
    init: function() {
        this.extend();
        if (this.imageOption.adType == "swf") {
        } else {
            $("#floatContent").html("<a href=\"" + this.imageOption.adLink + "\" target=\"_blank\" title=\"" + this.imageOption.adTitle + "\"><img src=\"" + this.imageOption.adImageUrl + "\" /></a>");
        }
    },
    extend: function() {
        $.extend(this.imageOption, this.Options);
    },
    close: function() {
        $("#myright").hide();
        this.isStop = true;
    }
};
