document.write ("
");
if (screen.height>800){
document.write ("");
}else {
document.write ("");
}
document.write ("
");
var nOffSet = 320;var winwide="on";
var iTotalHeight = screen.height>800 ? 760 : 510;
var frmfly = document.getElementById("frmfly");
frmfly.style.posLeft = document.body.clientWidth-nOffSet;
if(window.attachEvent){
window.attachEvent ("onscroll", HandlePositionChange);
} else if(document.addEventListener || window.addEventListener){
if(document.addEventListener){
document.documentElement.addEventListener("scroll", HandlePositionChange, false);
};
if(window.addEventListener){
window.addEventListener("scroll", HandlePositionChange, false);
};
}
if(document.body.clientWidth > 725){
setTimeout ("frmfly.style.display='';HandlePositionChange();", 500);}
else{var winwide = "off";}
if(document.body.clientWidth > 725){
frmfly.style.visibility = 'visible';HandlePositionChange();
}
var sOldTop = Math.max(document.body.scrollTop,document.documentElement.scrollTop);
function HandlePositionChange () {
var cHeight = document.documentElement.clientHeight;
var sTop = Math.max(document.body.scrollTop,document.documentElement.scrollTop);
var iDirection = sTop - sOldTop;
var iDivTop = frmfly.offsetTop;
sOldTop = sTop;
var bScroll = false;
if (sTop+cHeight < iTotalHeight ) {
bScroll = false;
}
if ((iDirection < 0 && sTop <= iDivTop) || (iDirection > 0 && sTop + cHeight >= iDivTop + iTotalHeight )) {
bScroll = true;
}
if (bScroll) {
with (document.body){
frmfly.style.left = clientWidth - nOffSet;
if (cHeight < iTotalHeight) {
if (iDirection > 0 ){
frmfly.style.top = (sTop - (iTotalHeight-cHeight)) + "px";
} else {
frmfly.style.top = sTop + "px";
}
} else {
frmfly.style.top = sTop + "px";
}
}
}
}