var textStyle="flash";           //焦点字class style (不是连接class)
var textLinkStyle="flash"; //焦点字连接class style
var buttonLineOn="#f60";           //button下划线on的颜色
var buttonLineOff="#000";          //button下划线off的颜色
var TimeOut=5000;              //每张图切换时间 (单位毫秒);
var adNum=1;
//焦点字框高度样式表 开始
document.write('<style type="text/css">');
document.write('#focuseFrom{width:'+(imgWidth+2)+';margin: 0px; padding:0px;height:'+(imgHeight+textFromHeight)+'px; overflow:hidden;}');
document.write('#txtFrom{height:'+textFromHeight+'px;line-height:'+textFromHeight+'px;width:'+imgWidth+'px;overflow:hidden;}');
document.write('#imgTitle{width:'+imgWidth+';top:-'+(textFromHeight+16)+'px;height:16px}');
document.write ('#imgTitle {');
document.write ('	FILTER: ALPHA(opacity=70); LEFT: -16px; OVERFLOW: hidden; POSITION: relative; TEXT-ALIGN: left');
document.write ('}');
document.write ('#imgTitle_up {');
document.write ('	LEFT: 0px; HEIGHT: 1px; TEXT-ALIGN: left');
document.write ('}');
document.write ('#imgTitle_down {');
document.write ('	LEFT: 0px; TEXT-ALIGN: right');
document.write ('}');
document.write ('.imgClass {');
document.write ('	BORDER-RIGHT: #000 0px solid; BORDER-TOP: #000 0px solid; BORDER-LEFT: #000 0px solid; BORDER-BOTTOM: #000 0px solid');
document.write ('}');
document.write ('#txtFrom {');
document.write ('	VERTICAL-ALIGN: middle; TEXT-ALIGN: center');
document.write ('}');
document.write ('.button {');
document.write ('	PADDING-RIGHT: 7px; PADDING-LEFT: 7px; BACKGROUND: #7b7b63; PADDING-BOTTOM: 2px; MARGIN: 0px; FONT: bold 9px sans-serif; BORDER-LEFT: #fff 1px solid; PADDING-TOP: 2px; TEXT-DECORATION: none');
document.write ('}');
document.write ('A.button, A.button:link, A.button:visited {');
document.write ('	COLOR: #ffffff; FONT-FAMILY: sans-serif; BACKGROUND-COLOR: #000000; TEXT-DECORATION: none');
document.write ('}');
document.write ('A.button:hover {');
document.write ('	BACKGROUND: #fff; COLOR: #fff; FONT-FAMILY: sans-serif; TEXT-DECORATION: none');
document.write ('}');
document.write ('.buttonDiv {');
document.write ('	BACKGROUND: #000000; FLOAT: left; VERTICAL-ALIGN: middle; WIDTH: 21px; HEIGHT: 1px; TEXT-ALIGN: center');
document.write ('}');
document.write ('A.flash,A.flash:link,A.flash:visited,A.flash:active {');
document.write ('	padding:0px;font-size:14px;font-weight:bold;color:#707070;text-decoration:none;');
document.write ('}');
document.write ('A.flash:hover {');
document.write ('	padding:0px;font-size:14px;font-weight:bold;color:#ff0000;text-decoration:none;');
document.write ('}');
document.write('</style>');
document.write('<div id="focuseFrom" align=center>');
document.write('<a target=_blank href="'+imgLink[1]+'" id="imgHrefId"><img id="imgId" src="'+imgUrl[1]+'" width='+imgWidth+' height='+imgHeight+' border=1  name="imgInit" class="imgClass" style="FILTER: revealTrans(duration=1,transition=5)"></a>');
document.write('<div id="txtFrom" align=center><span id="focustext" class="'+textStyle+'"></span></div>');
document.write('<div id="imgTitle" align=center>');
document.write('<div id="imgTitle_down" align=center>');
for(var i=1;i<imgUrl.length;i++){
	document.write('<a id="link'+i+'" href="javascript:changeimg('+i+')" class="button" style="cursor:hand" title="'+imgAlt[i]+'" onFocus="this.blur()">'+i+'</a>');
}
document.write('</div>');
document.write('</div>');
document.write('</div>');

function changeimg(n){
	window.clearInterval(theTimer);
	adNum=n;
	nextAd();
}
function nextAd(f){
	if (document.all && f==1)
	{
	var tDay=new Date();
	imgInit.filters.revealTrans.Transition=tDay.getTime()%7;
	imgInit.filters.revealTrans.apply();
	imgInit.filters.revealTrans.play();
	}
	document.getElementById("imgId").src=imgUrl[adNum];
	document.getElementById("imgHrefId").href=imgLink[adNum];
	document.getElementById("focustext").innerHTML="<a href="+imgLink[adNum]+" TARGET=_blank class="+textStyle+">"+imgAlt[adNum]+"</a>";
	document.getElementById('link'+adNum).style.background=buttonLineOn;
	for (var i=1;i<imgUrl.length;i++)
	{
	   if (i!=adNum){document.getElementById('link'+i).style.background=buttonLineOff;}
	}	
	adNum++;
	if (adNum>=imgUrl.length)
		adNum=1;
	theTimer=setTimeout("nextAd(1)", TimeOut);
}
nextAd(0);