document.writeln('<table border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="blue" style="border-bottom: 1px solid #000000"><tr><td align="center" colspan="3"><i><font size="+1" color="#FFFFFF"><div id="status" align="center"></div></font></i></td><td>');

document.writeln('<table border="0" cellspacing="0" cellpadding="5" align="right"><tr><td><font face="arial" color="#FFFFFF">Search for videos and websites: </font></td><td width="300"><input type="text" id="searchbox" placeholder="What are you looking for today?" class="searchInputText01"></td><td align="center"><input type="button" id="searchbutton" value="Search" onclick="myFunction()" class="buttonSearch"></td><td><font size="-1" face="arial" color="#FFFFFF">(Powered by: <a href="https://www.keyboard.fyi" class="searchEngineLink" TARGET="_blank">keyboard.fyi</a>)</font></td></tr></table>');

var input = document.getElementById("searchbox");
input.addEventListener("keypress", function(event) { if (event.key === "Enter") {event.preventDefault(); document.getElementById("searchbutton").click();} });

function myFunction() {

var searchStartSuccess=true;

var mySearch=document.getElementById("searchbox").value;
//var baseSearchTerm=document.getElementById("searchbox").value;

mySearch=mySearch.toLowerCase();
mySearch= mySearch.replace(/[^0-9^a-z^ ]/g,"");

if (mySearch=="") {searchStartSuccess=false;}
if (mySearch.length<=2) {searchStartSuccess=false;}

if (searchStartSuccess==false)
	{
document.getElementById("status").innerHTML = "Invalid Search. Try again.";
	}
else if (searchStartSuccess==true)
	{
	//document.title = "Searching...";
	//document.getElementById("status").innerHTML = "Searching...";
	document.getElementById("status").innerHTML = "";
	window.open("https://www.keyboard.fyi/search/s.php?search=" + mySearch,"_blank");
	}
}

document.writeln('</td></tr></table>');