﻿document.write("<div id=\"adDiv\" style=\"left: 4px; width: 108px; position: absolute; z-index: 3; top: 255px; height: 29px;\">"+
    "<span id=\"adSpan\">"+
     "</span>"+
"</div>");
var mediaVertex_adZone = adSpan;
var p = $(mediaVertex_player);
        var offset = p.offset();
        //alert(offset.top);
        //$(adDiv).css('left',offset.left);
        ///$(adDiv).css('left',8);
        ///$(adDiv).css('top',6+$(mediaVertex_player).height()-67);
        //$(adDiv).css('top',offset.top);//For Top
        //$(adDiv).css('top',offset.top+$(mediaVertex_player).height()-67);
        ///$(adDiv).width($(mediaVertex_player).width());
        ///$(adDiv).height(67);
        //alert($(mediaVertex_player).width())
        //
        var playerControlHight = 30;
        if(mediaVertex_player.uimode == "none")
            var playerControlHight = 0;
        //alert(playerControlHight);    
        if (typeof(mediaVertex_adZoneWidth)=='undefined')
            $(adDiv).width(404);
        else
            $(adDiv).width(mediaVertex_adZoneWidth);
        if (typeof(mediaVertex_adZoneHeight)=='undefined')
            $(adDiv).height(67);
        else
            $(adDiv).height(mediaVertex_adZoneHeight);
        if (typeof(mediaVertex_adZoneLeft)=='undefined')
            $(adDiv).css('left',8);
        else
            $(adDiv).css('left',mediaVertex_adZoneLeft);
        if (typeof(mediaVertex_adZoneTop)=='undefined')
            $(adDiv).css('top',242-playerControlHight);
            else
            $(adDiv).css('top',mediaVertex_adZoneTop);
        
$(mediaVertex_adZone).hide();
$(mediaVertex_adZone).animate({opacity: "0.0"},0);
var videoAdProvider = new VideoAdProvider(mediaVertex_player);


