/**
* Add a new event to the window.onload
*
* @param function func	The new function to add to the loading
*/
function addLoadEvent(func)
{
	var oldonload = window.onload;
	if (typeof window.onload != 'function') {
		window.onload = func;
	}
	else {
		window.onload = function() {
			oldonload();
			func();
		}
	}
}

Event.observe(window, 'load', function(event) {
    var form = $('search');
    var input = form['SearchSite'];
    var quote = 'Search this site...';

    function removeQuote() {
        if (Form.Element.getValue(input) == quote) {
            $(input).value = '';
        }
    }

    $('SearchSite').observe('focus', removeQuote);
    $('SearchSite').observe('click', removeQuote);

    $('SearchSite').observe('blur', function(event) {
        if (Form.Element.getValue(input) == '') {
            $(input).value = quote;
        };
    });
});

function submitform(formName) {
	document.forms[formName].submit();
}
