//==== SEARCH BOX ====

// EVENT
function addEventToObject(obj,evt,func) {
	var oldhandler = obj[evt];
	obj[evt] = (typeof obj[evt] != 'function') ? func : function(){oldhandler();func();};
}

// here's where we check/change whats in the searchbox
var Searchbox = {
	init : function()
		{
		var sBox = document.getElementById('search-text');
		if (sBox)
			{
			addEventToObject(sBox,'onclick',Searchbox.click);
			addEventToObject(sBox,'onblur',Searchbox.blur);
			}	
		},
	click : function()
		{
		var sBox = document.getElementById('search-text');
		if (sBox.value == 'Search Gatecreepers')
			{
			sBox.value = '';
			}
	  	},
	blur : function()
		{
		var sBox = document.getElementById('search-text');
		if (sBox.value == '' || sBox.value == ' ') {sBox.value = 'Search Gatecreepers';}
		}
	};

// now we load it with the window
addEventToObject(window,'onload',Searchbox.init);

//==== END ====