﻿function CreateFloat(){
    var obj =  document.createElement("div");
	obj.id="ad_Swf";
	obj.style.overflow = "hidden";
    obj.style.width="400px";
    obj.style.height="300px";
    obj.style.position = "absolute";  
   
    obj.innerHTML='\
      <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="400" height="295">\
      <param name="movie" value="../banner_web.swf"/>\
      <param name="quality" value="best" />\
      <param name="wmode" value="transparent" />\
      <embed src="../banner_web.swf"   quality="best" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="400" height="295"></embed>\
      </object>';
    obj.style.opacity=0;
    obj.style.left = (kg.Page.getWindowScrollLeft()+(kg.Page.getWindowClientWidth()-400)/2)+"px";
    obj.style.top = (kg.Page.getWindowScrollTop()+(kg.Page.getWindowClientHeight()-400)/2)+"px";
    document.body.appendChild(obj);
    var cookie = new Cookie();
    cookie.set("kugouAD","isSee=1",7);
    setTimeout(Close_Swf,10000);
}
function Close_Swf()
{
    if($("ad_Swf")){
        document.body.removeChild($("ad_Swf"));
    }
}