    var gbIsSampling = false;
    function setStatus(color, str) {
        document.getElementById('status-text').innerHTML = str;
        document.getElementById('status-icon').style.backgroundColor = color;
    }

    function onMouseMove(color, statusStr) {
        if (!gbIsSampling) return;

        setStatus(color, statusStr);
    }

    function toggleSampling(bShoudBeSampling) {
        if (typeof bShoudBeSampling == 'undefined') {
            bShoudBeSampling = !gbIsSampling;
        }

        if (bShoudBeSampling) {
            document.getElementsByTagName('body')[0].className = 'sampling';
        } else {
            document.getElementsByTagName('body')[0].className = '';
        }
        gbIsSampling = bShoudBeSampling;
    }

    function onLoad() {
        toggleSampling(true);
    }

    var gBookmarkSites = {
			'delicious' : {
				'name' : 'del.icio.us',
				'url' : 'http://del.icio.us/post?url={url}&title={title}'
			},
			'google' : {
				'name' : 'Google Bookmarks',
				'url' : '  http://www.google.com/bookmarks/mark?op=edit&bkmk={url}&title={title}'
			},
			'digg' : {
				'name' : 'Digg',
				'url' : 'http://digg.com/submit?phase=2&url={url}&title={title}'
			},
			'stumbleupon' : {
				'name' : 'StumbleUpon',
				'url' : 'http://www.stumbleupon.com/submit?url={url}&title={title}'
			},
			'facebook' : {
				'name' : 'Facebook',
				'url' : 'http://www.facebook.com/sharer.php?u={url}&t={title}'
			},
			'furl' : {
				'name' : 'Furl',
				'url' : 'http://www.furl.net/savedialog.jsp?p=1&u={url}&t={title}&r=&v=1&c='
			},
			'netscape' : {
				'name' : 'Netscape',
				'url' : ' http://www.netscape.com/submit/?U={url}&T={title}'
			},
			'yahoo' : {
				'name' : 'Yahoo! MyWeb',
				'url' : 'http://myweb2.search.yahoo.com/myresults/bookmarklet?u={url}&t={title}'
			},
			'technorati' : {
				'name' : 'Technorati',
				'url' : 'http://www.technorati.com/faves?add={url}'
			},
			'newsvine' : {
				'name' : 'Newsvine',
				'url' : 'http://www.newsvine.com/_wine/save?u={url}&h={title}'
			},
			'blinklist' : {
				'name' : 'BlinkList',
				'url' : 'http://blinklist.com/index.php?Action=Blink/addblink.php&Url={url}&Title={title}'
			},
			'reddit' : {
				'name' : 'reddit',
				'url' : 'http://reddit.com/submit?url={url}&title={title}'
			},
			'blogmarks' : {
				'name' : 'Blogmarks',
				'url' : 'http://blogmarks.net/my/new.php?mini=1&url={url}&title={title}'
			},
			'magnolia' : {
				'name' : 'ma.gnolia',
				'url' : 'http://ma.gnolia.com/bookmarklet/add?url={url}&title={title}'
			},
			'windows_live' : {
				'name' : 'Live',
				'url' : 'https://favorites.live.com/quickadd.aspx?marklet=1&mkt=en-us&url={url}&title={title}&top=1'
			}, 
			'tailrank' : {
				'name' : 'Tailrank',
				'url' : 'http://tailrank.com/share/?link_href={url}&title={title}'
			}
		}

        function getBookmarkURL(name, url, title) {
            if (typeof gBookmarkSites[name] == 'undefined') return '#';
            var bookmarkUrl = gBookmarkSites[name].url;
            bookmarkUrl = bookmarkUrl.replace(/{url}/, encodeURIComponent(url));
            bookmarkUrl = bookmarkUrl.replace(/{title}/, encodeURIComponent(title));
            return bookmarkUrl;
        }

        function getBookmarksHTML(url, title) {
            var html = '';
            html += '<table width="97%">';
            var i=0;

            for (var bookmarkName in gBookmarkSites) {
                if (i % 2 == 0) {
                    if (i != 0) {
                        html += '</tr>';
                        html += '<tr><td colspan="2"><div style="font-size:0.3em">&nbsp;</div></td></tr>';
                    }
                    html += '<tr>';
                }
                var bookmarkUrl = getBookmarkURL(bookmarkName, url, title);
                var linkCode = '<a class="navigation-link" href="' + bookmarkUrl + '" target="_blank" bookmark-name="' + bookmarkName + '" title="Post to ' + gBookmarkSites[bookmarkName].name + '">';
                html += '<td width="30" align="center" width="18">' + linkCode + '<img alt="" src="' + 

                            gDataRoot + '/images/favicons/' + bookmarkName + '.gif">' + '</a></td>';

                html += '<td align="left">' + linkCode + gBookmarkSites[bookmarkName].name.toLowerCase() + '</a></td>';
                i++;
            }
            html += '</tr></table>';
            return html;
        }
        
