// bigin fly bar
var bIsCatchFlyBar = false;
var dragClickX = 0;
var dragClickY = 0;
function HideFlyBar(){
document.getElementById("divFlyBar").style.visibility = "hidden";
//myFlyBarRestorButton.style.display = '';
}

function openFlyBar(id){
//alert(document.getElementById("runid").src);
document.getElementById("runid").src='./images/img'+id+'.htm';
document.getElementById("divFlyBar").style.display = "";
myload_flybar();
document.getElementById("divFlyBar").style.visibility = "visible";
//myFlyBarRestorButton.style.display = "none";
}
function catchFlyBar(e){
bIsCatchFlyBar = true;
var x=event.x+document.body.scrollLeft;
var y=event.y+document.documentElement.scrollTop;
dragClickX=x-document.getElementById("divFlyBar").style.pixelLeft;
dragClickY=y-document.getElementById("divFlyBar").style.pixelTop;
document.getElementById("divFlyBar").setCapture();
document.onmousemove = moveFlyBar;
}
function releaseFlyBar(e){
bIsCatchFlyBar = false;
document.getElementById("divFlyBar").releaseCapture();
document.onmousemove = null;
}
function moveFlyBar(e){
if(bIsCatchFlyBar){
document.getElementById("divFlyBar").style.left = event.x+document.body.scrollLeft-dragClickX;
document.getElementById("divFlyBar").style.top = event.y+document.documentElement.scrollTop-dragClickY;
}
}
function myload_flybar(){
//	alert(document.documentElement.scrollTop);
document.getElementById("divFlyBar").style.top=document.documentElement.scrollTop;
//document.getElementById("divFlyBar").style.left=window.screen.width/7;
//document.getElementById("divFlyBar").style.left=window.screen.availWidth;
//document.getElementById("divFlyBar").style.left=document.body.offsetWidth-document.getElementById("divFlyBar").clientWidth-150+document.body.scrollLeft;
}

window.onresize = myload_flybar;
window.onscroll = myload_flybar;
//window.onload = openFlyBar;
// end fly bar