<!--
// home.js - spolem.net - copyright Jake Laack - ekaj@spolem.net
// Requires javascript.js

function switchtab(showme)
{
  var switches = ["Links", "RSS", "Weather", "Tools"];
  for(i = 0; i < switches.length; i++) {
	  if(showme != switches[i]) {
      hidethis(switches[i]);
		} else {
    	showthis(showme);
		}//end if
	}//end for
  
  var today = new Date();
  var expires = new Date();
  expires.setTime(today.getTime() + 86400000);
  setCookie("HomeTab", showme, expires); 
}//end function

function switchcategory(showme)
{
//  var switches = ["News", "Politics", "Gaming", "Tech", "Science", "Entertain", "Funny", "Shop", "Misc"];
  var switches = ["News", "Politics", "Gaming", "Tech", "Entertain", "Funny", "Sports", "Shop", "Misc"];
  for(i = 0; i < switches.length; i++) {
	  if(showme != switches[i]) {
      hidethis(switches[i]);
		} else {
    	showthis(showme);
		}//end if
	}//end for

  var today = new Date();
  var expires = new Date();
  expires.setTime(today.getTime() + 86400000);
  setCookie("NewsCategory", showme, expires); 
}//end function

function GoogleGo(s, q)
//Executes the Google search from the front page.
{
  switch(s) {
    case "web":
  		window.location = 'http://www.google.com/search?q=' + q;
      break;
    case "images":
  		window.location = 'http://images.google.com/images?q=' + q;
      break;
    case "spolem":
      window.location = 'http://www.google.com/search?q=site:www.spolem.net+' + q;
      break;
    case "maps":
      window.location = 'http://maps.google.com/maps?q=' + q;
      break;
    case "videos":
      window.location = 'http://video.google.com/videosearch?q=' + q;
      break;
    case "groups":
      window.location = 'http://groups.google.com/groups?q=' + q;
      break;
  }//end switch

  return false;
}//end function

-->
