幻灯片问题
<script language="javascript" type="text/javascript">
// 属性设置
var E_strIFaderTransType = 'reveal'; // 'reveal' | 'blend'
var Filter_number = 23; // 滤镜种数
var change_time = 3.000; // 滤镜转换过程为3.0秒延迟
var wait_time = 5000; // 两种滤镜之间为5秒延迟
var obj_Timer;
var count_temp = 0; //记录当前是第几幅图片
var count_front = 0;
var Img_arry = new Array(); //图片数组
var E_ie4 = document.all?true:false;
var E_nn4 = document.layers?true:false;
function Filt_set() //设置滤镜
{
if(!E_ie4 && !E_nn4) return;
if(E_ie4) {
var theImg = document.all['idImgFading'];
if(theImg == null) return;
with(document.all['idImgFading']) {
style.filter = (E_strIFaderTransType == 'reveal')?'revealTrans':'blendTrans';
style.filter.duration = change_time;
style.filter.transition = Filter_number;
}
}
obj_Timer = window.setInterval('use_Filter()',wait_time);
}
function use_Filter() //滤镜的启动
{
this.count_front = this.count_temp;
if(E_ie4) {
with(document.all['idImgFading']) {
if(E_strIFaderTransType == 'reveal') {
filters(0).transition = Filter_number;
}
if(count_temp == (Img_arry.length - 1)) {
count_temp = -1;
}
count_temp++;
title = Img_arry[count_temp].sAlt;
filters(0).apply();
src = Img_arry[count_temp].sImgUrl;
filters(0).play();
}
}
else if(E_nn4) {
if(count_temp == (Img_arry.length - 1)) {
count_temp = -1;
}
count_temp++;
document.images['idImgFading'].src = Img_arry[this.count_temp].sImgUrl;
}
document.getElementById("imglink").href=Img_arry[this.count_temp].command;
document.getElementById("utxt").href=Img_arry[this.count_temp].command;
document.getElementById("utxt").innerText=Img_arry[this.count_temp].sText;
this.itemchanging();
}
function obj_ClearTime() {
window.clearInterval(obj_Timer);
}
window.onunload = obj_ClearTime;//取消计时器,释放系统资源
function Img_obj(sImgUrl,command,sAlt,sTarget,sText)
{
this.sImgUrl = (sImgUrl == null)?'':sImgUrl;
this.command = (command == null || command == '')?'#':command;
this.sAlt = (sAlt == null)?'':sAlt;
this.sTarget = (sTarget == null || sTarget == '')?'_self':sTarget;
this.sText = (sText == null || sText == '')?'无名称':sText;
}
</script>
<script language="javascript" type="text/javascript">
<%for(int k = 0; k < this.DBRows;k++) { %>
Img_arry[<%=k %>] = new Img_obj('<%=this.DBArray[k,1] %>','Content.aspx?xk=<%=this.DBArray[k,0] %>','','_blank','<%=Format_Working.Sub_String(this.DBArray[k,2], 20, "") %>');
<%} %>
//Img_arry[1] = new Img_obj('c003.jpg','#','\n','_self');
</script>
<script language="javascript" type="text/javascript">
function imgclick(num)
{
this.count_front=this.count_temp;
this.count_temp=num;
document.getElementById("num"+this.count_front).style.backgroundColor='#f7900f';
document.getElementById("num"+this.count_front).style.color='#FFFFFF';
document.getElementById("num"+this.count_temp).style.backgroundColor='#FFFFFF';
document.getElementById("num"+this.count_temp).style.color='#000000';
if(this.obj_Timer != null)
{
window.clearInterval(obj_Timer);
}
if(!E_ie4 && !E_nn4) return;
if(E_ie4) {
var theImg = document.all['idImgFading'];
if(theImg == null) return;
with(document.all['idImgFading']) {
style.filter = (E_strIFaderTransType == 'reveal')?'revealTrans':'blendTrans';
style.filter.duration = change_time;
style.filter.transition = Filter_number;
}
}
if(E_ie4) {
with(document.all['idImgFading']) {
if(E_strIFaderTransType == 'reveal') {
filters(0).transition = Filter_number;
}
title = Img_arry[count_temp].sAlt;
filters(0).apply();
src = Img_arry[count_temp].sImgUrl;
filters(0).play();
}
}
else if(E_nn4) {
document.images['idImgFading'].src = Img_arry[this.count_temp].sImgUrl;
}
document.getElementById("imglink").href=Img_arry[this.count_temp].command;
document.getElementById("utxt").href=Img_arry[this.count_temp].command;
document.getElementById("utxt").innerText=Img_arry[this.count_temp].sText;
this.obj_Timer = window.setInterval('use_Filter()',wait_time);
}
function itemchanging()
{
document.getElementById("num"+this.count_front).style.backgroundColor='#f7900f';
document.getElementById("num"+this.count_front).style.color='#FFFFFF';
document.getElementById("num"+this.count_temp).style.backgroundColor='#FFFFFF';
document.getElementById("num"+this.count_temp).style.color='#000000';
}
function bigover()
{
if(this.obj_Timer != null)
{
window.clearInterval(obj_Timer);
}
}
function bigout()
{
if(this.obj_Timer != null)
{
window.clearInterval(obj_Timer);
}
this.obj_Timer = window.setInterval('use_Filter()',wait_time);
}
function onmouseoutmy(cc)
{
if(cc != this.count_temp)
{
document.getElementById("num" + cc).style.backgroundColor='#f7900f';
document.getElementById("num" + cc).style.color='#FFFFFF';
}
}
</script>
<table border="0" cellspacing="0" cellpadding="0" style="border: solid #CCC 1px; background-color:#F4F7F0">
<tr>
<td>
<a href="#" target="_blank" id="imglink">
<img src="c001.jpg" style="width: 350px; height: 249px; border: none" name="idImgFading"alt="幻灯片有关问题" id="idImgFading" onmouseover="javascript:bigover();" onmouseout="javascript:bigout()" /></a>
</td>
<td style="text-align: left" valign="bottom">
<div style="position: absolute">
<div style="position: absolute; left: -<%=26*this.DBRows+5%>px; top: -31px">
<table border="0" cellspacing="0" cellpadding="0" style="line-height: 20px">
<tr>
<%for (int k = 0; k < this.DBRows; k++)
{ %>
<td style="padding-left: 2px; padding-right: 2px">
<table border="0" cellspacing="0" cellpadding="0" style="cursor: pointer; background-color: #f7900f; font-weight: bold; color:#FFF">
<tr>
<td id="num<%=k %>" style="width: 20px; text-align: center;" onmouseover="javascript:this.style.backgroundColor='#FFFFFF';this.style.color='#000000'"
onmouseout="javascript:onmouseoutmy(<%=k %>);" onclick="javascript:imgclick(<%=k %>);">
<%=k+1 %>
</td>
</tr>
</table>
</td>
<%} %>
</tr>
</table>
</div>
</div>
</td>
</tr>
<tr>
<td colspan="2" style="text-align:center; padding-left: 4px; line-height: 25px; font-size:12px" bgcolor="#F4F7F0">
<a href="#" target="_blank" id="utxt"></a>
</td>
</tr>
</table>
<script language="javascript" type="text/javascript">
document.getElementById("idImgFading").src=Img_arry[0].sImgUrl;
document.getElementById("imglink").href=Img_arry[0].command;
document.getElementById("utxt").href=Img_arry[0].command;
document.getElementById("utxt").innerText=Img_arry[0].sText;
Filt_set();
</script>
<%}
else
{%>
暂无信息
<%} %>