//
// Improved Netscape integration script
// 
// This JavaScript will include a Netscape button on your page if the user has been to netscape before.
// Not showing the netscape button to non-netscape users will keep you from confusing non-netscape-savy 
// users and help keep them on your site.
//
// Before using this script, you will have to include the URL of the article like this:
// <script type="text/javascript">
// int2e_url = 'http://example.com/my-article.html';
// </script>
//
// more details are available at http://int2e.com/blog/
//
// This script is (c) int2e LLC 2007
// mail@int2e.com  http://int2e.com
//
// Portions, such as idGet() and some history-checking, are based on code by 
// Henrik Gemal from http://gemal.dk/browserspy/css.html
// Used with permission from Henrik Gemal.

function idGet(id) {
    if (typeof(document.getElementById) != "undefined") {
        return document.getElementById(id);
    } else {
        return document.all[id];
    }
}

document.writeln('<a id="netscapelink" href="http://www.netscape.com"></a>');

document.writeln('<style type="text/css">');
//to make the #... plural, tack on new ones with ', ' between them
document.write('#netscapelink { position: absolute; top: 0; }');
document.write('#netscapelink:visited { top: 100px; color: #660001; }');
document.writeln("</style>");

var lnk=idGet("netscapelink");

if (lnk) {
    var visited=0; // zero means netscape not visisted
    if (lnk && 'offsetTop' in lnk)
        if (lnk.offsetTop == 100)
            visited=1; //found link visited
    if (lnk && 'currentStyle' in lnk && 'color' in lnk.currentStyle)
	if (lnk.currentStyle.color == '#660001')
	    visited=2; //found link visited
    if (visited) { //if non-zero, then netscape visited
	document.writeln("<script type=\"text/javascript\" src=\"http://www.netscape.com/widgets/med_vote_if/" + int2e_url + "\"></script>");
    }
}
