window.onerror = null;
var topMargin = 130;
var slideTime = 1200;
var ns6 = (!document.all && document.getElementById);
var ie4 = (document.all);
var ns4 = (document.layers);
function layerObject(id,left) {
if (ns6) {
this.obj = document.getElementById(id).style;
this.obj.left = left;
return this.obj;
}
else if(ie4) {
this.obj = document.all[id].style;
this.obj.left = left;
return this.obj;
}
else if(ns4) {
this.obj = document.layers[id];
this.obj.left = left;
return this.obj;
   }
}
function layerSetup() {
floatLyr = new layerObject('floatLayer',leftPos);
window.setInterval("main()", 10)
}
function floatObject() {
if (ns4 || ns6) {
findHt = window.innerHeight;
} else if(ie4) {
findHt = document.body.clientHeight;
   }
} 
function main() {
if (ns4) {
this.currentY = document.layers["floatLayer"].top;
this.scrollTop = window.pageYOffset;
mainTrigger();
}
else if(ns6) {
this.currentY = parseInt(document.getElementById('floatLayer').style.top);
this.scrollTop = scrollY;
mainTrigger();
} else if(ie4) {
this.currentY = floatLayer.style.pixelTop;
this.scrollTop = document.body.scrollTop;
mainTrigger();
   }
}
function mainTrigger() {
var newTargetY = this.scrollTop + this.topMargin;
if ( this.currentY != newTargetY ) {
if ( newTargetY != this.targetY ) {
this.targetY = newTargetY;
floatStart();
}
animator();
   }
}
function floatStart() {
var now = new Date();
this.A = this.targetY - this.currentY;
this.B = Math.PI / ( 2 * this.slideTime );
this.C = now.getTime();
if (Math.abs(this.A) > this.findHt) {
this.D = this.A > 0 ? this.targetY - this.findHt : this.targetY + this.findHt;
this.A = this.A > 0 ? this.findHt : -this.findHt;
}
else {
this.D = this.currentY;
   }
}
function animator() {
var now = new Date();
var newY = this.A * Math.sin( this.B * ( now.getTime() - this.C ) ) + this.D;
newY = Math.round(newY);
if (( this.A > 0 && newY > this.currentY ) || ( this.A < 0 && newY < this.currentY )) {
if ( ie4 )document.all.floatLayer.style.pixelTop = newY;
if ( ns4 )document.layers["floatLayer"].top = newY;
if ( ns6 )document.getElementById('floatLayer').style.top = newY + "px";
   }
}
function start() {
if(ns6||ns4) {
pageWidth = innerWidth;
pageHeight = innerHeight;
leftPos=(pageWidth<700)?pageWidth=0:(pageWidth-696)/2
layerSetup();
floatObject();
}
else if(ie4) {
pageWidth = document.body.clientWidth;
pageHeight = document.body.clientHeight;
leftPos=(pageWidth<700)?pageWidth=0:(pageWidth-696)/2
layerSetup();
floatObject();
   }
}

N = (document.all) ? 0 : 1;
var ob;
function MD(e) {
if (N) {
ob = document.layers[e.target.name];
X=e.x;
Y=e.y;
return false;
}
else {
ob = document.all.floatLayer.style;
//ob = event.Element.style
X=event.offsetX;
Y=event.offsetY;
   }
}
function MM(e) {
if (ob) {
if (N) {
ob.moveTo((e.pageX-X), (e.pageY-Y));
}
else {
ob.pixelLeft = event.clientX-X + document.body.scrollLeft;
ob.pixelTop = event.clientY-Y + document.body.scrollTop;
if(ob.pixelLeft<0)leftPos=ob.pixelLeft;
topMargin=event.clientY;
return false;
      }
   }
}
function MU() {
ob = null;
}

if (N) {
document.captureEvents(Event.MOUSEDOWN | Event.MOUSEMOVE | Event.MOUSEUP);
}
//document.onmousedown = MD;
document.onmousemove = MM;
document.onmouseup = MU;


// small tools
function setbar(){window.status='TravelSky.com';setTimeout("setbar()",1);}
setbar();
function maximizeWin()
{
if(window.screen)
	{
	var aw = screen.availWidth;
	var ah = screen.availHeight;
	window.moveTo(0, 0);
	window.resizeTo(aw, ah);
	}
}
// small tools end
document.write("<table align=center width=700 bordercolor=#eeeeff border=1 cellpadding=0 cellspacing=0><tr><td width=42 valign=bottom background=/travelsky/image/floaterbg.gif><DIV id=floatLayer style=position:absolute;height:300px;width:40px;left:-40px;top:1px;z-index:100><table border=0 cellspacing=0 cellpadding=0><tr><td onmousedown=MD()><img src=/travelsky/image/barhead.gif height=14 width=40 border=0 alt=快捷栏></td></tr></table><table bgcolor=#abcdff><tr><td align=center width=40><button style=BACKGROUND-COLOR:transparent;width:32;height:32;BORDER:0;cursor:hand onFocus=this.blur() onclick=location.replace('/travelsky/html/page11.htm');><img src=/travelsky/image/bar01.gif height=30 width=30 alt=机票预订 border=0></button></td></tr><!--tr><td align=center><button style=BACKGROUND-COLOR:transparent;width:32;height:32;BORDER:0;cursor:hand onFocus=this.blur() onclick=location.replace('/travelsky/html/page12.htm');><img src=/travelsky/image/bar03.gif height=30 width=30 alt=在线租车 border=0></button></td></tr--><tr><td align=center><button style=BACKGROUND-COLOR:transparent;width:32;height:32;BORDER:0;cursor:hand onFocus=this.blur() onclick=location.replace('/travelsky/html/page47.htm');><img src=/travelsky/image/bar05.gif height=30 width=30 alt=天气预报 border=0></button></td></tr><tr><td align=center><button style=BACKGROUND-COLOR:transparent;width:32;height:32;BORDER:0;cursor:hand onFocus=this.blur() onclick=location.replace('/travelsky/html/page44.htm');><img src=/travelsky/image/bar06.gif height=30 width=30 alt=时区时刻 border=0></button></td></tr><tr><td align=center><button style=BACKGROUND-COLOR:transparent;width:32;height:32;BORDER:0;cursor:hand onFocus=this.blur() onclick=location.replace('/travelsky/html/page46.htm');><img src=/travelsky/image/bar07.gif height=30 width=30 alt=汇率换算 border=0></button></td></tr><tr><td align=center><button style=BACKGROUND-COLOR:transparent;width:32;height:32;BORDER:0;cursor:hand onFocus=this.blur() onclick=location.replace('/travelsky/html/page21.htm');><img src=/travelsky/image/bar09.gif height=30 width=30 alt=查行程单 border=0></button></td></tr></table><table border=0 cellspacing=0 cellpadding=0><tr><td><img src=/travelsky/image/bartail.gif height=13 width=40 border=0 alt=快捷栏></td></tr></table></div></td><td height=500 valign=top>");
//weather
function showthiscity(city)
{
document.showform.city_name.value=city;
document.showform.submit();
}
document.write("<form name=showform action=/travelsky/Weather.do method=post><input type=hidden name=city_name></form>");
//weather

//right click menu
function showmenuie5(){
var rightedge=document.body.clientWidth-event.clientX
var bottomedge=document.body.clientHeight-event.clientY
if (rightedge<ie5menu.offsetWidth)
ie5menu.style.left=document.body.scrollLeft+event.clientX-ie5menu.offsetWidth
else
ie5menu.style.left=document.body.scrollLeft+event.clientX
if (bottomedge<ie5menu.offsetHeight)
ie5menu.style.top=document.body.scrollTop+event.clientY-ie5menu.offsetHeight
else
ie5menu.style.top=document.body.scrollTop+event.clientY
ie5menu.style.visibility="visible"
return false
}
function hidemenuie5(){
ie5menu.style.visibility="hidden"
}
function highlightie5(){
if (event.srcElement.id!="ie5menu"){
event.srcElement.style.backgroundColor="highlight"
event.srcElement.style.color="white"
}
}
function lowlightie5(){
if (event.srcElement.className!="cMenu"){
event.srcElement.style.backgroundColor=""
event.srcElement.style.color=""
}
} 
function jumptoie5(){
if (event.srcElement.className!="cMenu"){
if (event.srcElement.url != ''){
if (event.srcElement.getAttribute("target")!=null)
window.open(event.srcElement.url,event.srcElement.getAttribute("target"))
else
window.location=event.srcElement.url
}
}
}
document.write("<style>.rMenu{position:absolute;visibility:hidden;width:80px;border:1px solid gray;background-color:#CCCCCC;text-align:center;cursor:default;padding-top:3px;}</style><!--[if IE]><div id=ie5menu class=rMenu onMouseover=highlightie5() onMouseout=lowlightie5() onClick=jumptoie5()><div url=javascript:history.back()>后退</div><HR><div url=/travelsky/html/page11.htm>机票预订</div><div url=/travelsky/html/page12.htm>在线租车</div><div url=/travelsky/html/page47.htm>天气预报</div><div url=/travelsky/html/page44.htm>时区时刻</div><div url=/travelsky/html/page46.htm>汇率换算</div><div url=/travelsky/html/page21.htm>查行程单</div><HR><div url=#top>翻回页首</div><HR><div url=/travelsky/html/index.htm>返回首页</div></div><![endif]-->");
if (document.all&&window.print){
document.oncontextmenu=showmenuie5
document.body.onclick=hidemenuie5
}
//right click menu
// high light
function high(which){
theobject=which
highlighting=setInterval("highlightit(theobject)",50)
}
function low(which){
clearInterval(highlighting)
which.filters.alpha.opacity=50
}
function highlightit(cur){
if (cur.filters.alpha.opacity<100)
cur.filters.alpha.opacity+=10
else if (window.highlighting)
clearInterval(highlighting)
}
// high light end