function qs(el){
	if(window.RegExp&&window.encodeURIComponent){
		var ue=el.href,qe=encodeURIComponent(document.forms.sfrm.q.value);
		if(ue.indexOf("q=")!=-1){
			el.href=ue.replace(new RegExp("q=[^&$]*"),"q="+qe);
		}else{
			el.href=ue+"&q="+qe;
		}
	}
	return 1;
}

function resetAction(strActionURL, strFormName, strInputName, strSubmitName, strSubmitValue){
	var tmpForm = document.getElementById(strFormName);
	var tmpInput = document.getElementById(strFormName+'Input');
	var tmpSubmit = document.getElementById(strFormName+'Submit');
	tmpInput.name=strInputName;
	tmpSubmit.name=strSubmitName;
	tmpSubmit.value=strSubmitValue;
	tmpForm.action=strActionURL;
	// alert(tmpForm.action);
	tmpForm.submit();
}

function dictSearch(strActionURL, strFormName){
	if(window.RegExp&&window.encodeURIComponent){
		var tmpForm = document.getElementById(strFormName);
		var tmpInput = document.getElementById(strFormName+'Input');
		var ue,qe=encodeURIComponent(tmpInput.value);
		ue=strActionURL+qe;
		window.open(ue);
	}
	return 1;
}

function insertSearch(strActionURL, strFormName){
	if(window.RegExp&&window.encodeURIComponent){
		var tmpForm = document.getElementById(strFormName);
		var tmpInputName = strFormName+'Input';
		var tmpInput = document.getElementById(tmpInputName);
		var ue,qe=encodeURIComponent(tmpInput.value);
		var regexp = /insertString/g;
		ue=strActionURL.replace(regexp, qe.toString());
		window.open(ue);
		return false;
	}
	return true;
}