<!--
function cleanword(obj){
	obj.value = "";
}
function isSpecial(ch) { 
	var special = new Array("\\","%","?","{","}",":",";","|","[","]","'","\"",",","(",")","/","@","=",">","<","!","&","*","^","-","+");
	for(i=0;i<special.length;i++) {	if(ch == special[i]) {	return true;}} return false;
}

function CheckRes(s1) { 
	var res = new Array("to","bt","nt","pt","uf","ab","rt","le","allbt","allnt","st","at","between","beyond","exact","include","amb","all","range","lower","upper","tochinese","toascii","case");
	for(i=0;i<res.length;i++) {
		s2 = new RegExp("\\b"+res[i]+"\\b", "gi");
		s3 = "\\" + res[i];
		s1=s1.replace(s2, s3);
	}
	return s1;
}
function do_search(frmSearch) {
var strInput = frmSearch.sw.value;
var strReplaced = "";
	strInput = strInput.replace(/^ +| +$/g,"");
	strInput = strInput.replace(/^. +| +.$/g,"");
	strInput = strInput.replace(/ +. +/g," ");
    if (strInput == "") {
          alert("Please input your words!");
	      return false;
    }
	for(var j=0;j<strInput.length;j++) {  
		if (isSpecial(strInput.charAt(j)))
		 	strReplaced += '\\' + strInput.charAt(j) ;
		else
			 strReplaced += strInput.charAt(j);
	}
	strReplaced = CheckRes(strReplaced);
	frmSearch.searchword.value = "(" + strReplaced.replace(/ +/g,"*") + ")";
	return true;
}
//-->
