// JavaScript Document
	
	//--- wts development note：滚动图片 --//
	function floatin_img(id){
		var speed=30;
		var works=typeof(id)=='object'?id:document.getElementById(id);
		
		var works1=works.getElementsByTagName('table')[0].getElementsByTagName('td')[0];
		var  works2=works.getElementsByTagName('table')[0].getElementsByTagName('td')[1];
		
		if(works1.getElementsByTagName("IMG").length<5&&arguments[1]!=9){return;}
		
		works2.innerHTML = works1.innerHTML;
		function Marquee(){
			if(works2.offsetWidth- works.scrollLeft<=0){
				works.scrollLeft-=works1.offsetWidth;
			}else{
				works.scrollLeft++;
			}
		}
		var MyMar=setInterval(Marquee,speed);
		works.onmouseover =function(){clearInterval(MyMar)};
		works.onmouseout  =function(){MyMar=setInterval(Marquee,speed)};
	}
	//--- wts development note：自动调整图像到允许的范围 --//
	function autoimgsize(o,maxW,maxH){ 
		var img = document.createElement("img"); 
		img.src = o.src;	
		var w = img.width;h = img.height;wx = w/maxW;hx = h/maxH;
		if( w>maxW || h >maxH){
			if(wx>=hx){	o.width=maxW;o.height=h/wx;
			}else{o.height=maxH;o.width=w/hx;}
		}else{o.height=h;o.width=w;	}
	}