function dealsDirectSearch()
{
	searchString = document.getElementById('search_text').value;

	searchString = trim(searchString).toLowerCase();

	if (searchString == "enter keyword" || searchString == "")
	{
		alert("Please enter a search term first :)");
		return false;
	}
}

function trim(strText)
{
	while (strText.substring(0,1) == ' ')
	strText = strText.substring(1, strText.length);

	while (strText.substring(strText.length-1,strText.length) == ' ')
	strText = strText.substring(0, strText.length-1);

	return strText;
}

function doBookmark(url, name) { 
	var ver = navigator.appName;
	var num = parseInt(navigator.appVersion);
	if ((ver == "Microsoft Internet Explorer")&&(num >= 4)) {
		window.external.AddFavorite(url,name);
	}else{
		window.alert("Please use your browser menus to bookmark this page => " + url);
	} 
}

if (typeof(DDSL) == 'undefined') {
    var DDSL = { };
}

if (typeof(DDSL.addLoadEvent) == 'undefined') {
	// courtesy of Simon Willison, http://simonwillison.net/2004/May/26/addLoadEvent/
	DDSL.addLoadEvent = function(func) {
		var oldonload = window.onload;

	  	if (typeof window.onload != 'function') {
	    	window.onload = func;
	  	} else {
	    	window.onload = function() {
	      		if (oldonload) {
	        		oldonload();
	      		}

	      		func();
	    	}
		}
	}
}

