var nowY=0;
var stepY=1;
var stepX=1;
var positionX=0;
var positionY=0;
var w=window.screen.width-100;
var scrollPos;

function floatMove(){
	
	if(typeof window.pageYOffset != 'undefined'){ 
	   scrollPos = window.pageYOffset; 
	}else if(typeof document.compatMode != 'undefined' && document.compatMode != 'BackCompat'){ 
	   scrollPos = document.documentElement.scrollTop; 
	}else if(typeof document.body != 'undefined'){ 
	   scrollPos = document.body.scrollTop; 
	}

targetY=scrollPos+74;
diffY=targetY-nowY;
moveY=diffY/4;
nowY+=moveY;

document.getElementById('content_small').style.top=nowY + "px";
document.getElementById('content_big').style.top=nowY + "px";
document.getElementById('content_r_big').style.top=nowY + "px";
document.getElementById('content_r_small').style.top=nowY + "px";
}
function floatStart(){
	setInterval("floatMove()",100);
}

/*关闭*/
function closeShowDiv(){
	document.getElementById('Forklift_B').style.display = 'none';
	document.getElementById('Forklift_S').style.display = 'block';
}
//window.setTimeout("closeShowDiv()",15000);//15秒
/*隐藏*/
function hideContent(){
	document.getElementById("Forklift_B").style.display = 'none';
	document.getElementById("Forklift_S").style.display = 'block';
}
/*显示*/
function showContent(){
	document.getElementById("Forklift_S").style.display = 'none';
	document.getElementById("Forklift_B").style.display = 'block';
	//window.setTimeout("closeShowDiv()",15000);//10秒
}
/*样式*/
document.write('<style>');
document.write('.dl_main img{display:block;border:0;} ');
document.write('#content_small,#content_big{position:absolute;left:0; top:20px;}');
document.write('#content_r_small,#content_r_big{position:absolute;right:0; top:20px;}');
document.write('#content_small .con_coles, #content_r_small .con_coles{width:15px; height:16px; font-size:12px; background:#ddd; text-align:center; cursor:pointer; line-height:16px; }');
document.write('#content_big .con_coles,#content_r_big .con_coles {width:100px; height:16px; font-size:12px; background:#ddd; text-align:left; text-indent:5px; line-height:16px; cursor:pointer; }');
document.write('</style>');
/*大广告*/
document.write('<div id="Forklift_B">');
document.write('<div id="content_big">');//左边大广告
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="100" height="200">');
document.write('<param name="movie" value="indexlogo/flash/kaopu.swf">');
document.write('<param name="quality" value="high">');
document.write('<param name="wmode" value="opaque">');
document.write('<embed src="indexlogo/flash/kaopu.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="100" height="200"></embed>');
document.write('</object>');
document.write('<div class="con_coles" onclick=hideContent()>关闭</div></div>');
document.write('<div id="content_r_big">');//右边大广告
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="100" height="200">');
document.write('<param name="movie" value="indexlogo/flash/kaopu.swf">');
document.write('<param name="quality" value="high">');
document.write('<param name="wmode" value="opaque">');
document.write('<embed src="indexlogo/flash/kaopu.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="100" height="200"></embed>');
document.write('</object>');
document.write('<div class="con_coles" onclick=hideContent()>关闭</div></div>');
document.write('</div>');
/*缩略小广告*/
document.write('<div id="Forklift_S" style="display:none">');
document.write('<div id="content_small"><a href="http://www.kaup.com.cn/" target="_blank"><img src="indexlogo/flash/kaopu.jpg"  width="15" height="200" border="0"/></a><div class="con_coles" onclick=showContent()>展</div></div>');//左边小广告
document.write('<div id="content_r_small"><a href="http://www.kaup.com.cn/"><img src="indexlogo/flash/kaopu.jpg"  width="15" height="200" border="0"/></a><div class="con_coles" onclick=showContent()>展</div></div>');//右边小广告
document.write('</div>');
/*上下移动*/
floatStart();
