$('#basketProduct').bgiframe();
var persistclose = 0;
var startX = 0;
//set x offset of bar in pixels
var startY = 110; //set y offset of bar in pixels
var verticalpos = "fromtop"; //enter "fromtop" or "frombottom"
function iecompattest() {
    return (document.compatMode && document.compatMode != "BackCompat") ? document.documentElement : document.body;
}
function yOffset(){
    var ns = (navigator.appName.indexOf("Netscape") != -1) || window.opera;
    var pY = ns ? pageYOffset : iecompattest().scrollTop;
    return pY;
}
var bp_interval = 0;
jQuery(document).ready(function (){
    document.getElementById("basketProduct").style.top = startY + yOffset() + "px";
    document.getElementById("basketProduct").style.right = startX + "px";
    document.getElementById("basketProduct").style.visibility = "visible";
    jQuery(window).scroll( function() {
        document.getElementById("basketProduct").style.display = 'none';
        if (bp_interval > 0 ){
            clearInterval(bp_interval);
        }
        bp_interval = setInterval(function(){
            document.getElementById("basketProduct").style.top = startY + yOffset() + "px";
            document.getElementById("basketProduct").style.display = '';
            clearInterval(bp_interval);
        }, 500);
    });
});
