function KSTSearch() {
	var Query = document.SearchForm.Query.value.replace(/[^a-zA-Z0-9\s]/ig, "");
	var NewQuery = Query.replace(/ /ig, "-");
	
	if (document.SearchForm.Query.value == 'Enter Keywords') {
		alert('You must enter a keyword.');
		return false;
	}
	
	else if (document.SearchForm.Query.value == '') {
		alert('You must enter a keyword.');
		return false;
	}
	
	else {
		window.location.href = "/search/"+ NewQuery;
	}
}

function GetKeywords() {
	var wordArray = new Array();
	wordArray[0] = "Animals";
	wordArray[1] = "Cat";
	wordArray[2] = "Dog";
	wordArray[3] = "Owned";
	wordArray[4] = "Fail";
	wordArray[5] = "Ouch";
	wordArray[6] = "Fight";
	wordArray[7] = "Beer";
	wordArray[8] = "Drunk";
	wordArray[9] = "Alcohol";
	wordArray[10] = "Girls";
	wordArray[11] = "Hot";
	wordArray[12] = "Dance";
	wordArray[13] = "Crash";
	wordArray[14] = "Motorcycle";
	wordArray[15] = "Sports";
	wordArray[16] = "Arcade";
	wordArray[17] = "Puzzle";
	wordArray[18] = "Audio";
	wordArray[19] = "Soundboard";
	wordArray[20] = "illusion";
	wordArray[21] = "action";
	wordArray[22] = "dirty";
	wordArray[23] = "blonde";
	wordArray[24] = "sex";
	
	document.SearchForm.Query.readOnly = false;
	document.SearchForm.Query.style.color="#000000";
	document.SearchForm.Query.value = wordArray[Math.floor(Math.random()*wordArray.length)];
}

function ClearText() {
	document.SearchForm.Query.readOnly = false;
	document.SearchForm.Query.value = "";
	document.SearchForm.Query.style.color="#000000";
}