function keywordok(theform)
{
if (trim(theform.key_word.value)=="")
  {
    alert("Keyword is required!");
    theform.key_word.focus();
    return (false);
  }
	var str = theform.key_word.value
	var reg = /\s{2,}/g;
	var arr = str.replace(reg," ");
	theform.key_word.value=arr;
	return(true);
}
//&#21435;&#24038;&#31354;&#26684;; 
function ltrim(s){ 
return s.replace( /^\s*/, ""); 
} 
//&#21435;&#21491;&#31354;&#26684;; 
function rtrim(s){ 
return s.replace( /\s*$/, ""); 
} 
//&#21435;&#24038;&#21491;&#31354;&#26684;; 
function trim(s){ 
return rtrim(ltrim(s)); 
} 

