
function doBookmark() {
  var agt=navigator.userAgent.toLowerCase();

  var is_win = (agt.indexOf('windows')!=-1);
  var is_mac = (agt.indexOf('mac')!=-1);

  var is_ie     = (agt.indexOf('msie') != -1);
  var is_firefox = (agt.indexOf('firefox') != -1);
  var is_netscape  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('compatible') == -1));
  var is_safari = ((agt.indexOf('safari')!=-1)&&(is_mac));

  if (is_win) {
    if (is_ie && window.external) {
      window.external.AddFavorite(location.href,document.title);
    }
    else {
      if (is_firefox) {
        alert('Please press CTRL + D to bookmark this page.');
      }
      else {
        if (is_netscape) {
          alert('Please press CTRL + D to bookmark this page.');
        }
        else {
          alert('Please press CTRL + D to bookmark this page.');
        }
      }
    }
  }
  else {
    if (is_mac) {
      if (is_ie && window.external) {
        window.external.AddFavorite(location.href,document.title);
      }
      else {
        if (is_safari) {
          alert('Please press Command (Apple) + D to bookmark this page.');
        }
        else {
          alert('Please press UP arrow + Command (Apple) + D to bookmark this page.');
        }
      }
    }
    else {
      alert('Please press CTRL + D to bookmark this page.');
    }
  }
  return false;
}

function stumbleIt() {
	window.open("http://www.stumbleupon.com/submit?url="+location.href);
}

function clearField(field,value) {
	if (value) {
		field.defaultValue = value;
		if (field.value == value) {
			field.value = '';
		}
	} else if (field.value != ""){
		field.defaultValue = field.value;
		field.value = '';
	}
}


