document.write('<div id=boaitopad></div>');
var imgsrc=['http://www.boai.com/images2010/topad/eye/fm.jpg']; ////Images/topAd/091117/950_136.jpg'/Images2010/topAd/1212/eyetop.gif'
var imgalt=['','','']; //
var imgurl=['http://www.boai.com/html/tmb/20060701212215.html'];//
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="136"  border="0" src="'+imgsrc[j]+'" alt="'+imgalt[j]+'" '+_map+' />';
		
		if(imgmap[j]=='') html+='</a>';
		html+='</div>';
	}	
	html +='<map name="eyetopMap" id="eyetopMap"><area shape="rect" coords="708,3,946,133" href="http://www.boai.com/baoming/boai/index.aspx?source=a" target="_blank" /><area shape="rect" coords="2,3,704,135" href="http://www.boai.com/eye/01/index.aspx" target="_blank" /></map>';	
	wp.innerHTML=html;
	showtopad();
}

inittopad();
