// Copyright 2009 Google Inc.  All Rights Reserved.

/**
 * @fileoverview Global functions used to change languages and search
 * on all pages.
 * @author Michael Rigoli
 */

/**
 * Changes language directory based on form input.
 * @param {string} lang Variable supplied by the language dropdown menu.
  */
function changeLanguage(lang) {
  location.href = lang.options[lang.selectedIndex].value +
      window.location.href.split('/').pop();
}

/**
 * Sends search query to search page in pound '#' format.
 * @param {object} formObj Object supplied using 'this' in the search form.
  */
function searchQuery() {
  window.location.href = 'search.html#q=' + document.getElementById('q').value;
}

