﻿function ButtonSubmitOnEnter(e, buttonId)
{
    if (e.keyCode == 13)
    {
        var button = document.getElementById(buttonId);
        if (button)
        {
            button.focus();
        }
    }
}

function SetAsHomePage(element)
{
    try 
    {
        element.style.behavior = 'url(#default#homepage)';
        element.setHomePage(location.href);
    }
    catch (z) 
    {
        alert('Open your Options menu to set this page as your home page.');
    }
    return false; 
}

function AddBookMark(url,title){
  if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) 
  {
    window.external.AddFavorite(location.href,document.title);
  }
  else if (navigator.appName == "Netscape") 
  {
    window.sidebar.addPanel(location.href,document.title,"");
  }
  else 
  {
    alert("Press CTRL-D (Netscape) or CTRL-T (Opera) to bookmark");
  }
}

function SelectAll(id)
{
    document.getElementById(id).focus();
    document.getElementById(id).select();
}
