String.prototype.trim = function() { return this.replace(/^\s+|\s+$/, ''); };

function searchDomain(domain){
	d = domain.trim();
	l = d.length;
	if (d.length>0  && d != "Domain Name Here") {
		document.location = "http://qeoz.com/" + domain;
	} else {
		alert("You must type a domain name");
	}
	return false;
}

function searchDomainDefaultText(searchBox, focusState) {
	//focusState: 0 lost focus - 1 got focus
	d = searchBox.value.trim();
	l = d.length;
	if (focusState==0 && d.length==0) {
		searchBox.value = "Domain Name Here";
	} else if (focusState==1 && searchBox.value == "Domain Name Here") {
		searchBox.value="";
	}
}
