// JavaScript Document
function WirteFlashBlock(strURL,nWidth,nHeight,strBkColor,strID,strAlignMode,strQuality,strFlashVars)
{
var embedTxt;
embedTxt = "<embed";
if (strURL==null)
{
return;
}
embedTxt += ' src="'+strURL+'"';
document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"');
if (nHeight)
{
document.write(' height="'+nHeight+'"');
embedTxt += ' height="'+nHeight+'"';
}
if (nWidth)
{
document.write(' width="'+nWidth+'"');
embedTxt += ' width="'+nWidth+'"';
}
if (strID)
{ 
document.write(' id="'+strID+'"');
embedTxt += ' name="'+strID+'"';
}
if (strAlignMode)
{
document.write(' align="'+strAlignMode+'"');
embedTxt += ' align="'+strAlignMode+'"';
} 
document.write('>');
document.writeln('<param name="menu" value="false">');
document.writeln('<param name="WMode" value="Transparent">');
document.writeln('<param name="WMode" value="opaque">'); 
embedTxt += ' menu="false"';
document.writeln('<param name="allowScriptAccess" value="always" />');
embedTxt += ' allowScriptAccess="always"';
if (strFlashVars)
{
document.writeln('<PARAM NAME=FlashVars VALUE="'+strFlashVars+'">');
embedTxt += ' FlashVars="'+strFlashVars+'"';
} 
document.writeln('<param name="movie" value="'+strURL+'" />');
if (strQuality)
{
document.writeln('<param name="quality" value="'+strQuality+'" />');
embedTxt += ' quality="'+strQuality+'"';
}
else
{
document.writeln('<param name="quality" value="High" />');
embedTxt += ' quality="High"';
}
if (strBkColor)
{
document.writeln('<param name="bgcolor" value="'+strBkColor+'" />');
embedTxt += ' bgcolor="'+strBkColor+'"';
}
embedTxt += ' type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" swLiveConnect="true" ></embed>';
document.writeln(embedTxt);
document.writeln('</object>');
}

var time = 500;
    var h = 0;
    function addCount()
    {
        if(time>0)
        {
            time--;
            h = h+5;
        }
        else
        {
            return;
        }
        if(h>408)  //高度
        {
            return;
        }
        document.getElementById("ads").style.display = "";
        document.getElementById("ads").style.height = h+"px";
        setTimeout("addCount()",10); 
    }
    
    window.onload = function showAds()
    {
        addCount();
        setTimeout("noneAds()",18000); //停留时间自己适当调整
    }
    var T = 500;
    var N = 408; //高度
    function noneAds()
    {
        if(T>0)
        {
            T--;
            N = N-5;
        }
        else
        {
            return;
        }
        if(N<0)
        {
            document.getElementById("ads").style.display = "none";
            return;
        }
        
        document.getElementById("ads").style.height = N+"px";
        setTimeout("noneAds()",10); 
    }

function online()//客服
{	
	changeURL('news', 'http://kf.zsjmyy.com');
}
function freecall()//免费电话
{	
	changeURL('news', 'http://tel.kuaishang.cn/call.php?sid=2010091149&did=492');
}
function qq()//免费电话
{	
	changeURL('news', 'http://wpa.qq.com/msgrd?v=3&uin=133832299&site=qq&menu=yes');
}
function changeURL(winName, newURL) 
{win = window.open("", winName);
win.location.href = newURL;
}
