function adRotator() {};
adRotator.initialize=function(o)
{
// script by blueDestiny
this._t = new Array();
this._l = new Array();
this._p = new Array();
this._i = new Image();
this._c = 0;
this._f = false;
this._o = o;
this._timeout = null;
this._html = "";
// configration.
// @ image width
// @ image height
// @ rotator speed
// @ filter type
this._w = 160;
this._h = 95;
this._s = 4;
this._x = 30;
return this;
};
adRotator.add=function(p,t,l) { with (this)
{
_p.push(p);
_t.push(t);
_l.push(l);
}};
adRotator.load=function() { with (adRotator)
{
if( _i.readyState=='complete' )
{
if(_p.length-1==_c)
{
_f = true;
_c = 0;
window.clearTimeout(_timeout);
//getRef("AdRotator").innerHTML="complete";
adRotator.play();
}
else
{
_c++;
getRef(_o).innerHTML="正在读取酒店图片...";
_timeout=window.setTimeout(adRotator.load,10)
}
}
else
{
getRef(_o).innerHTML="正在读取酒店图片...";
_timeout=window.setTimeout(adRotator.load,10)
}
}};
adRotator.play=function() { with (adRotator)
{
if( _f )
{
_html = "";
_html += '
";
getRef(_o).innerHTML = _html;
getRef("rotatorPic").filters[0].Apply();
getRef("rotatorPic").filters[0].Play();
next();
}
else
{
_i.src = _p[_c];
adRotator.load();
}
}};
adRotator.next=function() { with (this)
{
(_p.length-1==_c) ? _c=0 : _c++;
_timeout=window.setTimeout(adRotator.play,_s*1000);
}};
adRotator.select=function(i) { with (this)
{
window.clearTimeout(_timeout);
_c=i;
adRotator.play();
}};
adRotator.set=function(second) { with (this)
{
window.clearTimeout(_timeout);
if((/\d+/).test(second)==true)
{
_s=second;
adRotator.play();
}
else
{
alert("must be digit!")
adRotator.play();
}
}};
function getRef(id)
{
return (document.all?document.all(id):document.getElementById(id));
}
adRotator.initialize("AdRotator");
adRotator.add("images/up/Spec/20088111541794877.jpg","上海国际机场宾馆","hotel/show.asp?id=295");
adRotator.add("images/up/Spec/200872516155390367.jpg","上海东方航空宾馆","hotel/show.asp?id=294");
adRotator.add("images/up/Spec/200881912452382736.jpg","陕西航空大酒店 ","hotel/show.asp?id=286");
adRotator.add("images/up/Spec/200872516193968146.jpg","东航之星 · 南京宾馆","hotel/show.asp?id=288");
adRotator.add("images/up/Spec/200872516201550622.jpg","东航之星 · 兰州店","hotel/show.asp?id=338");
adRotator.add("images/up/Spec/200881913184987035.jpg","上海长城饭店 ","hotel/show.asp?id=293");
adRotator.add("images/up/Spec/200872516213246007.jpg","北京东航商务首都机场酒店","hotel/show.asp?id=289");
adRotator.add("images/up/Spec/200881816221436644.jpg","东航之星 · 北京鼓楼店","hotel/show.asp?id=345");
adRotator.add("images/up/Spec/200872516241211861.jpg","张家界东航观光酒店","hotel/show.asp?id=278");
adRotator.add("images/up/Spec/20088181619664386.jpg","青岛东航大厦 ","hotel/show.asp?id=291");
adRotator.add("images/up/Spec/20081016138111477.jpg","上海诺宝中心酒店","hotel/show.asp?id=346");
adRotator.add("images/up/Spec/20088221614196739.jpg","上海东航观光景悦度假村","hotel/show.asp?id=310");
adRotator.add("images/up/Spec/200882216323341037.jpg","上海东航之星景悦大酒店","hotel/show.asp?id=309");
adRotator.add("images/up/Spec/20088191542180700.jpg","上海东航商务鑫港酒店","hotel/show.asp?id=344");
adRotator.add("images/up/Spec/200882210384846853.jpg","上海东航之星谷翠商务酒店","hotel/show.asp?id=328");
adRotator.add("images/up/Spec/200872516291575420.jpg","常熟恒隆东航国际酒店","hotel/show.asp?id=321");
adRotator.add("images/up/Spec/2008122910261843436.jpg","东航商务太仓鎏渊大酒店","hotel/show.asp?id=347");
adRotator.add("images/up/Spec/20088221593427465.jpg","上海东航之星红门假日酒店","hotel/show.asp?id=339");
adRotator.add("images/up/Spec/200882211173279197.jpg","上海东航商务汉姆逊酒店","hotel/show.asp?id=341");
adRotator.add("images/up/Spec/200872516372025598.jpg","上海东航商务和景酒店","hotel/show.asp?id=334");
adRotator.add("images/up/Spec/200892716115089743.jpg","上海东航之星田园风光酒店","hotel/show.asp?id=343");
adRotator.add("images/up/Spec/200882215191624719.jpg","上海东航之星松江店 ","hotel/show.asp?id=340");
adRotator.play();