       var adDiv = document.createElement('DIV');

       function onLinkMouseOver () {
          showAd ();

          //var adDivv = document.createElement('DIV');

       }

       function onLinkMouseOut () {
          adDiv.innerHTML = "";
       }

       function showAd () {
         
         var scrollTop;
         var scrollLeft;
         var winWidth;
         var winHeight;
         var adWidth = 538;
         var adHeight = 414;
         var adLink = document.getElementById("PSAdLink");
         var adSrc = "/adunitexample/ps.swf";
         var srcGame = "/adunitexample/games.swf";

         if (self.innerWidth) {
            scrollTop = self.pageYOffset;
            scrollLeft = self.pageXOffset;
            // Don't include scrollbar height/width.
            winWidth = Math.min(self.innerWidth, document.documentElement.clientWidth);
            winHeight = Math.min(self.innerHeight, document.documentElement.clientHeight);
         } else if (document.documentElement && document.documentElement.clientWidth) {
            // IE Strict Mode
            scrollTop = document.documentElement.scrollTop;
            scrollLeft = document.documentElement.scrollLeft;
            winWidth = document.documentElement.clientWidth;
            winHeight = document.documentElement.clientHeight;
         } else if (document.body) {
            // IE quirks mode
            scrollTop = document.body.scrollTop;
            scrollLeft = document.body.scrollLeft;
            winWidth = document.body.clientWidth;
            winHeight = document.body.clientHeight;
         }
         // Very old browsers.
         else return;

         if (adWidth > (winWidth + 20) || adHeight > (winHeight + 10))
            return;

         var left = absoluteLeft(adLink);
         var margin = (winWidth + scrollLeft) - (left + adWidth);

         if (margin < 10) {
            left += margin;
         }

         var top = absoluteTop(adLink) + 27;
         margin = (winHeight + scrollTop) - (top + adHeight);

         if (margin < 10) {
            top = absoluteTop(adLink) - (adHeight);
         }

         adDiv.style.left = (left > scrollLeft ? left : scrollLeft) +"px";
         adDiv.style.top = (top > scrollTop ? top : scrollTop) +"px";

         adDiv.style.visibility = "visible";
         adDiv.style.position   = "absolute";

         var PSFLsource = "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' \n\
            codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' \n\
            width='" + adWidth + "' height='" + adHeight + "'>\n\
               <param name='movie' value='" + adSrc + "' />\n\
               <param name='quality' value='high' />\n\
               <param name='wmode' value='transparent'>\n\
               <param name='allowScriptAccess' value='always'>\n\
               <param name='FlashVars' value=\n\
               'adType=" +      3 +
               "&adTitle=" +    "zeljko" +
               "&adContent=" +  "neki fazon i to" +
               "&adImgSrc=" +   "http://www.gamevance.com/banners/box1.jpg" +
               "&adLink=" +     "link" +
               "&adLinkUrl=" +  "url" +
               "&adSettings=" + "1111111000000111111000000111" +
               "&gameSrc=" +    srcGame + "' /> <embed width='" + adWidth + "' height='" + adHeight + "'\n\
			   type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' quality='high' src='" + adSrc + "' wmode='transparent' flashvars='adType=" +  "3" +
               "&adTitle=" +    "zeljko" +
               "&adContent=" +  "neki fazon i to" +
               "&adImgSrc=" +   "http://www.gamevance.com/banners/box1.jpg" +
               "&adLink=" +     "link" +
               "&adLinkUrl=" +  "url" +
               "&adSettings=" + "1111111000000111111000000111" +
               "&gameSrc=" +    srcGame + "'/> </object>";

         //PSFixActive(PS.adDiv, PSFLsource);
         adDiv.innerHTML = PSFLsource;
         //adDiv.style.border = "solid 1px #cccccc";

         document.body.appendChild(adDiv);
         

      }

      function absoluteLeft (element) {
         var left = 0;
         while (element) {
            left += element.offsetLeft;
            element = element.offsetParent
         }
         return left;
      }
      
      function absoluteTop (element) {
         var top = 0;
         while (element) {
            top += element.offsetTop;
            element = element.offsetParent
         }
         return top;
      }
