var imgWidth=290;   //图片宽           
var imgHeight=200;   //图片高          
var textFromHeight=25;   //焦点字框高度 (单位为px)      
var textStyle="texttitle";  //焦点字class style (不是连接class)         
var textLinkStyle="texttitle";  //焦点字连接class style
var buttonLineOn="#f60";   //button下划线on的颜色       
var buttonLineOff="#000";  //button下划线off的颜色        
var TimeOut=3000;         //每张图切换时间 (单位毫秒);     
var imgUrl=new Array(); 
var imgLink=new Array();
var imgtext=new Array();
var imgAlt=new Array();
var adNum=0;

//焦点字框高度样式表 开始
document.write('<style type="text/css">');
document.write('#focuseFrom{width:'+(imgWidth+2)+';margin: 0px; padding:0px;height:'+(imgHeight+textFromHeight)+'px; overflow:hidden;}');
document.write('#imgTitle{width:'+imgWidth+';top:-'+(textFromHeight+20)+'px;height:20px}');
document.write('</style>');
document.write('<div id="focuseFrom">');
//焦点字框高度样式表 结束

imgUrl[1]='news/redian/images/20100714_3.jpg';
imgtext[1]='林健总经理出席“慧眼中国环球论坛”'; //字数是有限定的，否则会破坏页面布局
imgLink[1]='news/redian/20100714_2.html';
imgAlt[1]='林健总经理出席“慧眼中国环球论坛”';

imgUrl[2]='news/redian/images/20100714_2.jpg';
imgtext[2]='新疆首家环境能源交易所正式成立'; //字数是有限定的，否则会破坏页面布局
imgLink[2]='news/redian/20100714_1.html';
imgAlt[2]='新疆首家环境能源交易所正式成立';

imgUrl[3]='news/redian/images/20100605_31.jpg';
imgtext[3]='世博自愿碳减排活动登顶世界最高峰'; //字数是有限定的，否则会破坏页面布局
imgLink[3]='news/redian/20100605_3.html';
imgAlt[3]='世博自愿碳减排活动登顶世界最高峰';

imgUrl[4]='news/redian/images/20100605_2.jpg';
imgtext[4]='《“低碳世博”总体方案》今日公布'; //字数是有限定的，否则会破坏页面布局
imgLink[4]='news/redian/20100605_2.html';
imgAlt[4]='《“低碳世博”总体方案》今日公布';

imgUrl[5]='news/redian/images/20100512_3.jpg';
imgtext[5]='我所全体员工为玉树捐款已获红十字会证书'; //字数是有限定的，否则会破坏页面布局
imgLink[5]='news/redian/20100512.html';
imgAlt[5]='我所全体员工为玉树捐款已获红十字会证书';

imgUrl[6]='news/redian/images/20100428.jpg';
imgtext[6]='世博自愿减排网络正式开通'; //字数是有限定的，否则会破坏页面布局
imgLink[6]='news/redian/20100428.html';
imgAlt[6]='世博自愿减排网络正式开通';

imgUrl[7]='news/redian/images/20100505_01.jpg';
imgtext[7]='联合国馆推荐低碳世博平台'; //字数是有限定的，否则会破坏页面布局
imgLink[7]='news/redian/20100505.html';
imgAlt[7]='联合国馆推荐低碳世博平台';

imgUrl[8]='news/redian/images/20100506_01.jpg';
imgtext[8]='联合国馆成首个世博自愿减排国际馆'; //字数是有限定的，否则会破坏页面布局
imgLink[8]='news/redian/20100506.html';
imgAlt[8]='联合国馆成首个世博自愿减排国际馆';

imgUrl[9]='news/redian/images/20100423_2.jpg';
imgtext[9]='中国CDM基金战略发展委员会主席贺邦靖参观我所'; //字数是有限定的，否则会破坏页面布局
imgLink[9]='news/redian/20100423.html';
imgAlt[9]='中国CDM基金战略发展委员会主席贺邦靖参观我所';

function changeimg(n)
{
adNum=n;
window.clearInterval(theTimer);
adNum=adNum-1;
nextAd();
}
function goUrl(){
window.open(imgLink[adNum],'_self');
}
//NetScape开始
if (navigator.appName == "Netscape")
{
document.write('<style type="text/css">');
document.write('.buttonDiv{height:4px;width:21px;}');
document.write('</style>');
function nextAd(){
if(adNum<(imgUrl.length-1))adNum++;
else adNum=1;
theTimer=setTimeout("nextAd()", TimeOut);
document.images.imgInit.src=imgUrl[adNum];
document.images.imgInit.alt=imgAlt[adNum];	
document.getElementById('focustext').innerHTML=imgtext[adNum];
document.getElementById('imgLink').href=imgLink[adNum];
}
document.write('<a id="imgLink" href="'+imgLink[1]+'" target=_self class="p1"><img src="'+imgUrl[1]+'" name="imgInit" width='+imgWidth+' height='+imgHeight+' border=1 alt="'+imgAlt[1]+'" class="imgClass"></a><div id="txtFrom"><span id="focustext" class="'+textStyle+'">'+imgtext[1]+'</span></div>')
document.write('<div id="imgTitle">');
document.write('<div id="imgTitle_down">');
//数字按钮代码开始
for(var i=1;i<imgUrl.length;i++){document.write('<a href="javascript:changeimg('+i+')" class="button" style="cursor:hand" title="'+imgAlt[i]+'">'+i+'</a>');}
//数字按钮代码结束
document.write('</div>');
document.write('</div>');
document.write('</div>');
nextAd();
}
//NetScape结束
//IE开始else
{
var count=0;
for (i=1;i<imgUrl.length;i++) {
if( (imgUrl[i]!="") && (imgLink[i]!="")&&(imgtext[i]!="")&&(imgAlt[i]!="") ) {
count++;
} else {
break;
}
}
function playTran(){
if (document.all)
imgInit.filters.revealTrans.play();		
}
var key=0;
function nextAd(){
if(adNum<count)adNum++ ;
else adNum=1;
if( key==0 ){
key=1;
} else if (document.all){
imgInit.filters.revealTrans.Transition=23;
imgInit.filters.revealTrans.apply();
playTran();
}
document.images.imgInit.src=imgUrl[adNum];
document.images.imgInit.alt=imgAlt[adNum];	
document.getElementById('link'+adNum).style.background=buttonLineOn;
for (var i=1;i<=count;i++)
{
if (i!=adNum){document.getElementById('link'+i).style.background=buttonLineOff;}
}	
focustext.innerHTML=imgtext[adNum];
theTimer=setTimeout("nextAd()", TimeOut);
}
window.onload=nextAd; //用于处理IE7 兼容问题
document.write('<a target=_self href="javascript:goUrl()"><img style="FILTER: revealTrans(duration=1,transition=5);" scr="" width='+imgWidth+' height='+imgHeight+' border=0 vspace="0" name=imgInit class="imgClass"></a><br>');
document.write('<div id="txtFrom"><span id="focustext" class="'+textStyle+'"></span></div>');
document.write('<div id="imgTitle">');
document.write(' <div id="imgTitle_down"> <a class="trans"></a>');
//数字按钮代码开始
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>');
document.write('</div>');
}
//IE结束
