//--------------------------------------------------------------------------
var arr = new Array();

arr[arr.length] = new Array("Google", "http://www.google.com/search?q=");

arr[arr.length] = new Array("bing", "http://www.bing.com/search?q=");

arr[arr.length] = new Array("Wikipedia (English)", "http://en.wikipedia.org/wiki/Special:Search?search=");

arr[arr.length] = new Array("Google Scholar", "http://www.scholar.google.com/scholar?q=");

arr[arr.length] = new Array("IMDB (movies)", "http://us.imdb.com/find?q=");

arr[arr.length] = new Array("Yahoo", "http://search.yahoo.com/search?p=");

arr[arr.length] = new Array("OED (dictionary)", "http://dictionary.oed.com/cgi/findword?query_type=word&queryword=");

arr[arr.length] = new Array("Dictionary.com", "http://www.dictionary.com/cgi-bin/dict.pl?term=");

arr[arr.length] = new Array("Weather", "http://www.wunderground.com/cgi-bin/findweather/getForecast?query=");

//--------------------------------------------------------------------------
function add_opts() { // add options
  var sel = document.search_f.site;

  for(var i = 0; i < arr.length; i++) {
    sel.options[i] = new Option(arr[i][0], i); 
} } // add_opts
   
//--------------------------------------------------------------------------
function find_it() { // Get url for search engine
  searchString = document.search_f.q.value; 
  if(searchString != "") {
    var searchEngine = document.search_f.site.selectedIndex;
    var finalSearchString =arr[searchEngine][1] + searchString;
    location.href = finalSearchString;
  }
  return false;
}

//--------------------------------------------------------------------------
function checkKey() { // Check if enter key pressed
  if(window.event.keyCode == '13') {
    return find_it();
  }
  else return true;
}

//--------------------------------------------------------------------------
function formHandler(form) {
var URL = document.form.site.options[document.form.site.selectedIndex].value;
window.location.href = URL;
}

//--------------------------------------------------------------------------
function expandDiv(tlll) {
  what  = eval(tlll + "_menu");
  if (what.style.display == "none") {
    what.style.display = "";
  } else
    what.style.display = "none";
}

var oldc = new Array;

//--------------------------------------------------------------------------
function cCell(r,m) {
  if(!document.all) return;
  if(m) {
    for(i=0;i<r.cells.length;i++){
    oldc[i]=r.cells[i].bgColor;
    r.cells[i].bgColor='D3D3D3';
  }
  } else {
      for(i=0;i<r.cells.length;i++){
      r.cells[i].bgColor=oldc[i];
} } }


function jump() { // Jump to a page
  parent.location =
    document.links.url.options[document.links.url.selectedIndex].value;
}

//--------------------------------------------------------------------------
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr;
  for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

//--------------------------------------------------------------------------
function MM_preloadImages() { //v3.0
  var d=document;
  if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments;
    for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];
} } }

//--------------------------------------------------------------------------
function MM_findObj(n, d) { //v4.0

  var p,i,x;
  if(!d) d=document;
  if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);
  }
  if(!(x=d[n])&&d.all) x=d.all[n];
  for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++)
    x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n);
  return x;
}

//--------------------------------------------------------------------------
function MM_swapImage() { //v3.0

var i,j=0,x,a=MM_swapImage.arguments;
document.MM_sr=new Array;
for(i=0;i<(a.length-2);i+=3)
  if ((x=MM_findObj(a[i]))!=null) {
    document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];
} }

