Warning: Cannot modify header information - headers already sent by (output started at /home/wwwfran/public_html/wp-settings.php:1) in /home/wwwfran/public_html/wp-content/themes/tarski/library/js/tarski-js.php on line 5
// tarski.js - external JS for Tarski
// Default search box text
//-----------------------------------
// event handler
function addEventToObject(obj,evt,func) {
var oldhandler = obj[evt];
obj[evt] = (typeof obj[evt] != 'function') ? func : function(){oldhandler();func();};
}
// search box stuff
var Searchbox = {
init : function()
{
var sBox = document.getElementById('s');
if (sBox)
{
addEventToObject(sBox,'onclick',Searchbox.click);
addEventToObject(sBox,'onblur',Searchbox.blur);
}
},
click : function()
{
var sBox = document.getElementById('s');
if (sBox.value == 'Search this site')
{
sBox.value = '';
}
},
blur : function()
{
var sBox = document.getElementById('s');
if (sBox.value == '' || sBox.value == ' ') {sBox.value = 'Search this site';}
}
};
// add event onload
addEventToObject(window,'onload',Searchbox.init);