function bookmark(url,title){
  if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) {
  window.external.AddFavorite(url,title);
  } else if (navigator.appName == "Netscape") {
    window.sidebar.addPanel(title,url,"");
  } else {
    alert("Press CTRL-D (Netscape) or CTRL-T (Opera) to bookmark");
  }
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function onSearchEnter( evt, frm ) {
  var keyCode = null;

  if( evt.which ) {
  keyCode = evt.which;
  } else if( evt.keyCode ) {
  keyCode = evt.keyCode;
  }
  if( 13 == keyCode ) {
  window.location='/search/search-results.aspx?zoom_query=' + document.getElementById('zoom_query').value;
  return false;
  }
  return true;
}

function cleanSearchQuery( query ) {
	var cleaned = query.replace(/^\s+|\s+$/g, ''); //trims the string
	cleaned = cleaned.replace(/ /g, '-');
	cleaned = cleaned.replace(/</g, '');
	cleaned = cleaned.replace(/>/g, '');
	cleaned = cleaned.replace(/&/g, 'and');
	cleaned = cleaned.replace(/<script/g, '');	
	cleaned = cleaned.replace(/<\/script>/g, '');
	cleaned = cleaned.replace(/^-+|-+$/g, '', ''); //trims again for dashes
	cleaned = escape(cleaned);
	cleaned = cleaned.replace(/\*/, '%2A'); //encodes asterisks the string
	return cleaned;
}

var _gaq = _gaq || []; 
_gaq.push(['_setAccount', 'UA-10097865-1']); 
_gaq.push(['_trackPageview']); 

(function() { 
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; 
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; 
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ga); 
})(); 