var fsOlsLaunch = {
    hideMessageDisplay: function(elmMessage)
    {
        if ( fs.hasClass(elmMessage, 'launch-point-message-show') ) {
            fs.removeClass(elmMessage, 'launch-point-message-show');
            fs.addClass(elmMessage, 'launch-point-message-hide');
        }
    }
    ,
    showMessageDisplay: function(elmMessage)
    {
        if ( fs.hasClass(elmMessage, 'launch-point-message-hide') ) {
            fs.removeClass(elmMessage, 'launch-point-message-hide');
            fs.addClass(elmMessage, 'launch-point-message-show');
        }
    }
    ,
    hideButton: function(elmButton)
    {
        if ( fs.hasClass(elmButton, 'button-show') ) {
            fs.removeClass(elmButton, 'button-show');
            fs.addClass(elmButton, 'button-hide');
        }
    }
    ,
    showButton: function(elmButton)
    {
        if ( fs.hasClass(elmButton, 'button-hide') ) {
            fs.removeClass(elmButton, 'button-hide');
            fs.addClass(elmButton, 'button-show');
        }
    }
    ,
    showBubble: function()
    {
        /* get message string first */
        var bubbleString = '';
        if (document.addEventListener) {
            bubbleString = fsLoccus.getLabel('browser-addon-needed-message-ff');
        } else if (document.attachEvent) {
            bubbleString = fsLoccus.getLabel('browser-addon-needed-message-ie');
        }
        var sLaunchFolderUrl = fs.getContainingFolder();
        /*
        <style>
        .bubble-corner {width:9px;height:9px;display:block;float:left;}
        .bubble-center {width:250px;height:8px;display:block;float:left;background:#FFFDC2;}
        .bubble-left {border-left:1px solid gray;background:#FFFDC2;float:left;width:8px;height:80px;}
        .bubble-right {border-right:1px solid gray;background:#FFFDC2;float:left;width:8px;height:80px;}
        .bubble-content {float:left;width:250px;background:#FFFDC2;height:80px;}
        </style>
        */
        var oDivBubbleContainer = parent.document.createElement('div');
        oDivBubbleContainer.id = "bubble-container";
        var tempBubble = '<div id="bubble-container">\
        <div id ="bubble-pos" style="float:left;position:absolute;left:35px;top:{topscroll}px;z-index:1000;">\
        <div style="position:absolute;top:-31px;left:30px;">\
            <img src="{launchurl}/images/balloon_arrow.gif"/>\
        </div>\
        <div style="clear:both;">\
        <div class="bubble-corner" style="line-height:9px;font-size:9px;width:9px;height:9px;display:block;float:left;"><img src="{launchurl}/images/balloon_top_left.gif"/></div>\
            <div class="bubble-center" style="border-top:1px solid gray;line-height:8px;font-size:8px;width:250px;height:8px;display:block;float:left;background:#FFFDC2;">&nbsp;</div>\
            <div class="bubble-corner" style="line-height:9px;font-size:9px;width:9px;height:9px;display:block;float:left;"><img src="{launchurl}/images/balloon_top_right.gif"/></div>\
        </div>\
        <div style="clear:both;">\
            <div class="bubble-left" style="border-left:1px solid gray;background:#FFFDC2;float:left;width:8px;height:80px;"></div>\
            <div class="bubble-content" style="font:10pt Arial; float:left;width:250px;background:#FFFDC2;height:80px;text-align:left;" id="bubble-content">{bubblecontent}</div>\
            <div class="bubble-right" style="border-right:1px solid gray;background:#FFFDC2;float:left;width:8px;height:80px;"></div>\
        </div>\
        <div style="clear:both">\
            <div class="bubble-corner" style="line-height:9px;font-size:9px;width:9px;height:9px;display:block;float:left;"><img src="{launchurl}/images/balloon_bottom_left.gif"/></div>\
            <div class="bubble-center" style="border-bottom:1px solid gray;line-height:8px;font-size:8px;width:250px;height:8px;display:block;float:left;background:#FFFDC2;"></div>\
            <div class="bubble-corner" style="line-height:9px;font-size:9px;width:9px;height:9px;display:block;float:left;"><img src="{launchurl}/images/balloon_bottom_right.gif"/></div>\
        </div>\
    </div>\
</div>';
var y = parent.document.documentElement.scrollTop;
fs.addEvent(parent.window, 'scroll', function(){
    parent.document.getElementById('bubble-pos').style.top = parent.document.documentElement.scrollTop + 35 + "px";
  });
tempBubble = tempBubble.replace('{topscroll}',y + 35);
tempBubble = tempBubble.replace(/\{launchurl\}/g, sLaunchFolderUrl);
tempBubble = tempBubble.replace('{bubblecontent}', bubbleString);
oDivBubbleContainer.innerHTML = tempBubble;

        parent.document.getElementsByTagName('body')[0].appendChild(oDivBubbleContainer);
    }
    ,
    hideBubble: function()
    {
        if (parent.document.getElementById('bubble-container')) {
            var oDivBubbleContainer = parent.document.getElementById('bubble-container');
            oDivBubbleContainer.parentNode.removeChild(oDivBubbleContainer);
        }
    }
};