﻿
var pw=document.body.scrollWidth,cw=document.documentElement.clientWidth;
if(pw<cw)
	pw=cw;

var pintWidth=cw;

lastScrollY=0;

function DlScroll()
{
	var diffY=document.body.scrollTop,pintPreTop=parseInt(__('sidebar').style.top);
	percent=.1*(diffY-lastScrollY);
	percent=percent>0?Math.ceil(percent):percent=Math.floor(percent);
	__('sidebar').style.top=pintPreTop+percent;
	__('sidebar2').style.top=pintPreTop+percent;
	lastScrollY+=percent;
}

function InsertCouplet(strPic1,strPic2)
{
	if(pintWidth>980)
	{
		if(window.navigator.userAgent.toLowerCase().indexOf('msie 6.0')>0)
		{
			document.write('<div id=sidebar style=left:3px;position:absolute;top:50;visibility:hidden;z-index:50 width=98>'
				+'<div class=h_5></div><div>'+strPic1+'</div><a class=a_norm title=关闭 href=# onclick=__("sidebar").style.visibility=\'hidden\'><img border=0 src=/img/X.jpg></a>'
				+'</div>'
				+'<div id=sidebar2 style=left:'+String(pintWidth-140)+'px;position:absolute;top:50;visibility:hidden width=98>'
				+'<div class=h_5></div><div>'+strPic2+'</div><a class=a_norm title=关闭 href=# onclick=__("sidebar2").style.visibility=\'hidden\'><img border=0 src=/img/X.jpg></a>'
				+'</div>');
	//		__('sidebar').style.visibility='visible',__('sidebar2').style.visibility='visible',
			//__('sidebar').innerHTML='<br><br><br>'+strPic1+'<a class=a_norm title=关闭 href=# onclick=__("sidebar").style.visibility=\'hidden\'><img border=0 src=/img/X.jpg></a>',
			//__('sidebar2').innerHTML='<br><br><br>'+strPic2+'<a class=a_norm title=关闭 href=# onclick=__("sidebar2").style.visibility=\'hidden\'><img border=0 src=/img/X.jpg></a>';

			//ie6.0
			//uWin.style.cssText='position:absolute;left:expression(offsetParent.scrollLeft+(offsetParent.clientWidth-'+String(intWidth)
			//	+')/2);top:expression(offsetParent.scrollTop+(offsetParent.clientHeight-'+String(intHeight)+')/2);';
		}
		else
		{
			document.write('<div id=sidebar style=left:3px;position:fixed;top:50;visibility:hidden;z-index:50 width=98>'
				+'<div class=h_5></div><div>'+strPic1+'</div><a class=a_norm title=关闭 href=# onclick=__("sidebar").style.visibility=\'hidden\'><img border=0 src=/img/X.jpg></a>'
				+'</div>'
				+'<div id=sidebar2 style=left:'+String(pintWidth-140)+'px;position:fixed;top:50;visibility:hidden width=98>'
				+'<div class=h_5></div><div>'+strPic2+'</div><a class=a_norm title=关闭 href=# onclick=__("sidebar2").style.visibility=\'hidden\'><img border=0 src=/img/X.jpg></a>'
				+'</div>');
		//	__('sidebar').style.visibility='visible',__('sidebar2').style.visibility='visible',
			//__('sidebar').innerHTML='<br><br><br>'+strPic1+'<a class=a_norm title=关闭 href=# onclick=__("sidebar").style.visibility=\'hidden\'><img border=0 src=/img/X.jpg></a>',
			//__('sidebar2').innerHTML='<br><br><br>'+strPic2+'<a class=a_norm title=关闭 href=# onclick=__("sidebar2").style.visibility=\'hidden\'><img border=0 src=/img/X.jpg></a>';
		}
		window.setInterval('DlScroll',100);
	}
}

//InsertCouplet();




	
