//---------------------------------------------------------------------------
// Function used by TopBar.jsp to control form elements
//---------------------------------------------------------------------------
function Search(formname) {
	// Get search property and term values from form elements
	var terms 	= formname.st1.value;
	/* Added the escape function to perform the encoding for ENH-42*/
	/* Commented the below line for BUG-377*/
	//location.href = "search?st1="+escape(terms);
	formname.st1.value=encodeURIComponent(terms);
	formname.action="search";
	return true;
}
/* Added to fix BUG-377*/
function OnClickPictSearch(SearchTerm) {
	// Get search property and term values from form elements
	var terms 	= SearchTerm;
	var encodedterm = encodeURIComponent(terms);
	location.href = "search?st1="+encodeURIComponent(encodedterm)+"&mt=pc";
	return false;
}
function OnClickSearch(formname) {
	// Get search property and term values from form elements
	var terms 	= formname.st1.value;
	var encodedterm = encodeURIComponent(terms); 
	location.href = "search?st1="+encodeURIComponent(encodedterm);
	return false;
}
function PictSearch() {
	// Get search property and term values from form elements
	var terms 	= document.pict_search_terms.st1.value;
	/* Added the escape function to perform the encoding for ENH-42*/
	/* Commented the below line for BUG-377*/
	//location.href = "search?st1="+escape(terms)+"&mt=pc";
	document.pict_search_terms.st1.value=encodeURIComponent(terms);
	document.pict_search_terms.action="search";
	return true;
}