/*document.write('<div id="ads" style="width:950px;height:280px;margin:0 auto;text-align:center;overflow:hidden; display:none;"><a href="/topic/ljsxhzt/" target="_blank"><img src="/images/51topgg.jpg" width="950" height="280" /></a></div>');*/
document.write('<div id="boaitopad" style="height:140px">¼ÓÔØÖÐ...</div>');
var imgsrc=['/images/top_banner/tooth_topbanner.jpg','/images/top_banner/doudou_topbanner.jpg','/images/top_banner/shanqi_topbanner.jpg']; 
var imgalt=['','','','','']; //
var imgurl=['http://www.jt91.com/Teeth/news/20105/10012894.html','http://www.jt91.com/doudou/news/20105/10012896.html','http://www.jt91.com/surgery/xesq/'];//
var imgmap=['','','',''];

var stoptime=4000;//Í£ÁôÊ±¼ä
var m=1;
var timer=null;
function hidetopad() {
		for(var j=1;j<=imgsrc.length;j++){
			var imgobj = "sgtopimg_"+j;			
			if(m==j)
			{	
			    document.getElementById(imgobj).style.display="block";
			}else{
			
			    document.getElementById(imgobj).style.display="none";
			}	
		}	
		if(m>=imgsrc.length){
			m=1;
		}else{
			m=m+1;
		}		
		window.setTimeout(hidetopad,stoptime);
		
}
function showtopad() {

	hidetopad();
			
}
function minwin(time)
{
	var wp = document.getElementById('boaitopad');
	var anim = function(){
		n += 10;
		if(n >= time){
			wp.style.marginTop = '0px';
			window.clearInterval(tt);
		}else{
			wp.style.marginTop = "-"+n+"px";
		}
	},n=0;
	var tt = window.setInterval(anim,10);

}
function inittopad() {
	
	var wp = document.getElementById('boaitopad');
	
	var html = '';
	for(var j=0;j<imgsrc.length;j++){
		var _map = '';
		html+='<div id="sgtopimg_'+(j+1)+'" align="center" class="topad" style="display:none">';
		
		if(imgmap[j]=='') html+='<a href="'+imgurl[j]+'" target="_blank">';		
		else _map = ' usemap="'+imgmap[j]+'"';
		
		html+='<img id="imgads" width="950" height=140  border="0" src="'+imgsrc[j]+'" alt="'+imgalt[j]+'" '+_map+' />';
		
		if(imgmap[j]=='') html+='</a>';
		html+='</div>';
	}	
		
wp.innerHTML=html;
	showtopad();
}

inittopad();
