/* 
	FileName: 	ProductSearch.js
	Comment:	Include this javascript file when using Search Catalog function in your code. 
	Location: 	<root>/_js	
	Developer: 	A. Varma
	
	Date created: 7th July 2007
	
	Modification History goes here...	
	
	ModificationID	Date Modified	By		  	Comment
	==============	=============	================	=============================================================
	M001								
	
*/

function DoSearch() {
	with (document.SearchForm) {
		if(txtSearchText.value != "") {
			//validate text

		} else {
			alert("Please enter a value for Search Text.");
			txtSearchText.focus();
			return false;
		}

		if(selSearchCategory.selectedIndex > 0) {

		} else {
			alert("Please select a Search Category.");
			selSearchCategory.focus();
			return false;
		}

		var nextPage = "ProductSearchResults.php?scat=" + selSearchCategory.options[selSearchCategory.selectedIndex].value;
		nextPage += "&stxt=" + txtSearchText.value;

		window.location = nextPage;
		//submit();
	}
}