var isIE = (document.all) ? true : false;var $ = function (id) {return "string" == typeof id ? document.getElementById(id) : id;};var Class = {create: function() {return function() { this.initialize.apply(this, arguments); }}}var Extend = function(destination, source) {for (var property in source) {destination[property] = source[property];}}var Bind = function(object, fun) {return function() {return fun.apply(object, arguments);}}var Each = function(list, fun){for (var i = 0, len = list.length; ilen; i++) { fun(list[i], i); }};//ie onlyvar RevealTrans = Class.create();RevealTrans.prototype = {initialize: function(container, options) {this._img = document.createElement("img");this._a = document.createElement("a");this._timer = null;//计时器this.Index = 0;//显示索引this._onIndex = -1;//当前索引this.SetOptions(options);this.Auto = !!this.options.Auto;this.Pause = Math.abs(this.options.Pause);this.Duration = Math.abs(this.options.Duration);this.Transition = parseInt(this.options.Transition);this.List = this.options.List;this.onShow = this.options.onShow;//初始化显示区域this._img.style.visibility = "hidden";//第一次变换时不显示红x图this._img.style.width = this._img.style.height = "100%"; this._img.style.border = 0;this._img.onmouseover = Bind(this, this.Stop);this._img.onmouseout = Bind(this, this.Start);isIE && (this._img.style.filter = "revealTrans()");this._a.target = "_blank";$(container).appendChild(this._a).appendChild(this._img);},//设置默认属性SetOptions: function(options) {this.options = {//默认值Auto:true,//是否自动切换Pause:5000,//停顿时间(微妙)Duration: 1,//变换持续时间(秒)Transition: 23,//变换效果(23为随机)List:[],//数据集合,如果这里不设置可以用Add方法添加onShow:function(){}//变换时执行};Extend(this.options, options || {});},Start: function() {clearTimeout(this._timer);//如果没有数据就返回if(!this.List.length) return;//修正Indexif(this.Index0 || this.Index = this.List.length){ this.Index = 0; }//如果当前索引不是显示索引就设置显示if(this._onIndex != this.Index){ this._onIndex = this.Index; this.Show(this.List[this.Index]); }//如果要自动切换if(this.Auto){this._timer = setTimeout(Bind(this, function(){ this.Index++; this.Start(); }), this.Duration * 1000 +this.Pause);}},//显示Show: function(list) {if(isIE){//设置变换参数with(this._img.filters.revealTrans){Transition = this.Transition; Duration = this.Duration; apply(); play();}}this._img.style.visibility = "";//设置图片属性this._img.src = list.img; this._img.alt = list.text;//设置链接!!list["url"] ? (this._a.href = list["url"]) : this._a.removeAttribute("href");//附加函数this.onShow();},//添加变换对象Add: function(sIimg, sText, sUrl) {this.List.push({ img: sIimg, text: sText, url: sUrl });},//停止Stop: function() {clearTimeout(this._timer);}};.container{width:980px;height:80px;border:0;position:relative;overflow:hidden;}var r = new RevealTrans("idShow");//添加变换对象r.Add(/mediafile/201005/17/F201005170803181194618522.jpg,,http://en.ynta.gov.cn/default.aspx);r.Start();Set as Homepage|Register|Sign InChinese|Big 5|French|Russian|Spanish|Japanese|Arabic|KoreanSpecial Coverage|PD Online DatabaseSina MicroblogTencent MicroblogFeedbackRSS   NewsOpinionsChina MilitaryForeign AffairsLearn ChineseChina StudyForumLatest News:  Shaolin kungfu star enlisted in the army
China-U.S. trade up 17% in first ten months: commerce minister
Mainland to adopt measures to optimize financing for Taiwanese enterprises
Winter Naadam festival celebrated in Hulun Buir
GM to recall 993 vehicles in China
Growth of Chinas non-manufacturing sector slows further in November
U.S. to continue AD, CVD probes against Chinese PV products
Secondhand Beijing housing prices hit 15-month low
HK insurance gross premiums increase 12.6 pct
Tibet braces for another mild winterBeijing   Cloudy/Overcast    0 / 5   City ForecastPeoples Daily OnlineScienceUnidentified fireball crosses sky over Beijing(Peoples Daily Online)13:34, December 02, 2011The fireball may finally fall in Beijing.On the evening of Nov. 30, a golden unidentified flying object appeared and moved fast across the sky, which has been sighted by many people in Tianjin, Beijing, Hebei and other cities. According to the astronomy expert, the object may be a fireball meteor.One amateur astronomer who witnessed the fireball in Tianjin said that the huge flying object appeared at about a quarter past 5 pm. in the northeastern region. And then it moved westward with shining color, which was brighter than the moon. And the fireball disappeared in two seconds. According to the astronaut, a fireball is a brighter-than-usual meteor of which the brightness is more than magnitude -4. It is about the same magnitude of the planet Venus in the morning.【1】 【2】 【3】 【4】 【5】Email|Print|Comments(Editor:王莉莉)Increases the bookmarktwitterfacebookSina MicroblogdiggGoogleDeliciousbuzzfriendfeedLinkedindiigoredditstumbleuponQzoneQQ MicroblogRelated ReadingBeijing Capital Airport quells UFO flight delay rumorNewly-found exoplanet could support life: scientistsUFO sighted in many Chinese citiesAlien spaceship gives Shanghai a surpriseWaiting for contactSuspected UFOs photographed over TokyoLeave your comment0 commentsName  Selections for youMedvedev, Putin meet supporters in Moscow
Oh deer, I think I love you
Beijing experiences its 1st snow this winter
Black-headed gulls migrate from Siberia to Chinas KunmingMost PopularWhy is Chinas financial sector going g…China assists Africa with food securityChina, US lay groundwork for fair compe…Second-hand Beijing house prices fall t…China publishes low-carbon economy repo…Facing hard times, group buy sites get …China calls for cool heads in KosovoHIV mostly spreads through sex in ChinaChinas securities watchdog sacks high …Cross-strait exchange to be further exp…OpinionsWhy is Chinas financial sector going global?
World needs safety net against euro crisis
US-Pakistan anti-terrorism coalition close to collapse
Chinas schools on the way up
What is to be done with Syria?
UK mass strike shows steep learning curve
China-Myanmar ties challenged by US moves
China and India mustnt go for the throat
Germany needs wisdom to save euro
Egypts chaos: No end in sightWhats happening in ChinaFull of the joys of life in prisonBeijing revising housing rules
Hospital head dismissed over baby scandal
Injured in stable condition after blast kills two
Yachting sector surfing a wave of high interest
6 schoolchildren hurt in minibus rollover accidentPD Online DataThe lion dance in Guangzhou
The flower fair in Guangzhou
Lion dances pay New Year calls in Guilin
Jiangsu´s special New Year traditions
Hakka traditions in Spring Festival12345678910111213141516171819202122232425262728293031JanFebMarAprMayJunJulAugSepOctNovDec2007年2008年2009年2010年2011年{resetselect()}About Us| Contact Us| Site Map| Advertise on siteCopyright by Peoples Daily Online, All Rights ReservedBingCW.Init({AppID:"http://english.peopledaily.com.cn/",ContentArea:"p_content,p_title",MachineTranslation:true,WebDefinition:true})

Leave a Reply

Your email address will not be published. Required fields are marked *

four × 1 =