(function($){
    $.fn.eselCorner = function(url,small,big,fsmall,fbig,width,height,fwidth,fheight)
    {
        var esel = new Object();

        esel.ad_url = escape(url);
        esel.small_path = fsmall;
        esel.small_image = escape(small);
        esel.big_path = fbig;
        esel.big_image = escape(big);

        esel.small_width = width;
        esel.small_height = height;
        esel.small_params = 'ico=' + esel.small_image;
        esel.big_width = fwidth;
        esel.big_height = fheight;
        esel.big_params = 'big=' + esel.big_image + '&ad_url=' + esel.ad_url;

        var placetAdv =function () {

            $("body").append('<div id="eselcornerSmall" style="position:absolute;width:'+ esel.small_width +'px;height:'+ esel.small_height +'px;z-index:9999;right:0px;top:0px;">'
                +'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'
                +'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0"'
                +'id="eselcornerSmallObject" width="'+esel.small_width+'" height="'+esel.small_height+'">'
                +'<param name="allowScriptAccess" value="always"/> '
                +'<param name="movie" value="'+ esel.small_path +'?'+ esel.small_params +'"/>'
                +'<param name="wmode" value="transparent" />'
                +'<param name="quality" value="high" /> '
                +'<param name="FlashVars" value="'+esel.small_params+'"/>'
                +'<embed src="'+ esel.small_path + '?' + esel.small_params +'" name="eselcornerSmallObject" wmode="transparent" quality="high" width="'+ esel.small_width +'" height="'+ esel.small_height +'" flashvars="'+ esel.small_params +'" allowscriptaccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>'
                +'</object></div></script>'
                +'<div id="eselcornerBig" style="position:absolute;width:'+ esel.big_width +'px;height:'+ esel.big_height +'px;z-index:9999;right:0px;top:0px;">'
                +'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'
                +'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0"'
                +' id="eselcornerBigObject" width="'+ esel.big_width +'" height="'+ esel.big_height +'">'
                +' <param name="allowScriptAccess" value="always"/> '
                +' <param name="movie" value="'+ esel.big_path +'?'+ esel.big_params +'"/>'
                +' <param name="wmode" value="transparent"/>'
                +'<param name="quality" value="high" /> '
                +'<param name="FlashVars" value="'+ esel.big_params +'"/>'
                +'<embed src="'+ esel.big_path + '?' + esel.big_params +'" id="eselcornerBigEmbed" name="eselcornerBigObject" wmode="transparent" quality="high" width="'+ esel.big_width +'" height="'+ esel.big_height +'" flashvars="'+ esel.big_params +'" swliveconnect="true" allowscriptaccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>'
                +'</object></div>');
            setTimeout(function(){
                $("#eselcornerBig").css("top","-1000px");
            },1000);
        }
        placetAdv();
    }
})(jQuery);

function sizeup987(){
    $('#eselcornerBig').css("top","0px");
    $('#eselcornerSmall').css("top","-1000px");
}
function sizedown987(){
    $("#eselcornerSmall").css("top","0px");
    $("#eselcornerBig").css("top","-1000px");
}
