function bookmark(ref)
{
    var pgUrl = window.location.href;
    var pgTitle = document.title;

    if (window.sidebar)
    {
        window.sidebar.addPanel(pgTitle, pgUrl, "");
        return false;
    }
    else if (window.opera)
    {
        ref.href = pgUrl;
        ref.title = pgTitle;
        ref.rel = 'sidebar';
        return true;
    }
    else
    {
        window.external.AddFavorite(pgUrl, pgTitle);
        return false;
    }
}

function validateOptinForm(ref) {
if (ref.Name.value.length == 0) {
    alert('Please enter a value for the "Name" field');
    ref.Name.focus();
    return false;
}
if (ref.Email.value.length == 0) {
    alert('Please enter a value for the "E-Mail" field');
    ref.Email.focus();
    return false;
}

    return true;
}

function trackEvent(category, action, opt_label, opt_value) {

try {
_MONITUS.pageTracker._trackEvent(category, action, opt_label, opt_value);
} catch(e) {}

}

function getPageByIndex(index) {
    switch (index) {
        case 0:  return 'http://www.targettossgames.com';
        case 1:  return 'http://www.targettossgames.com/game-rules.html';
        case 2:  return 'http://www.targettossgames.com/testimonials.html';
        case 3:  return 'http://www.targettossgames.com/links.html';
        case 80: return 'http://www.targettossgames.com/sitemap.xml';
        case 81: return 'http://www.twitter.com/targettossgames';
    }
}

function dl(ref, index, rc) {
    ref.href = getPageByIndex(index);

    if (window.opera && !rc)
        return true;

    return rc;
}