<!--

function trim(sInString)
{
	sInString = sInString.replace( /^\s+/g, "" );// strip leading

	return sInString.replace( /\s+$/g, "" );// strip trailing
}

function clearsrcfield(field)
{
	var field = field.value;
	
	if(field == "Product Search")
	{
		document.searchform.srcstr.value = "";
	}
}

function validateSrcStr(theform)
{
	var msNoiseWords = new Array("0","1","2","3","4","5","6","7","8","9","$","a","about","after","all","also","an","and","another","any","are","as","at","b","be","because","been","before","being","between","both","but","by","c","came","can","come","could","d","did","do","does","e","each","else","f","for","from","g","get","got","h","had","has","have","he","her","here","him","himself","his","how","i","if","in","into","is","it","its","j","just","k","l","like","m","make","many","me","might","more","most","much","must","my","n","never","now","o","of","on","only","or","other","our","out","over","p","q","r","re","s","said","same","see","should","since","so","some","still","such","t","take","Test","than","that","the","their","them","then","there","these","they","this","those","through","to","too","u","under","up","use","v","very","w","want","was","way","we","well","were","what","when","where","which","while","who","will","with","would","x","y","you","your","z","@","%","!","|");
	
	var str = trim(theform.srcstr.value);
	
	if(theform.name == "advsearchform")
	{
		var brand = trim(theform.srcbrand.value);
		var cat = trim(theform.srccat.value);
		
		if(str == "" && brand == "" && cat == "")
		{
			alert("Please choose a search critera.");
			return false;
		}
	}
	
	if(str.length > 0)
	{
		var searchWords = str.split(" ");

		var i = 0;
		var j = 0;
		var noiseWordCount = 0;

		while(j < msNoiseWords.length)
		{
			word = msNoiseWords[j];

			while (i < searchWords.length)
			{
				sword = trim(searchWords[i]);

				if(word == sword)
					noiseWordCount++;

				i++;
			}

			j++;
			i=0;
		}

		//alert(noiseWordCount);
		//alert(searchWords.length);

		if(noiseWordCount >= searchWords.length)
		{
			var err = "Your search critera contains only ignored words or illegal characters.\nPlease adjust your search and try again."
			alert(err);
			return false;
		}
	}
	
	return true;
}

-->