if ( typeof(TlabSearch) == 'undefined' ) TlabSearch = function() {};

TlabSearch.search = function (formId, keywordId, catageoryId) {
	this.formId = formId;
	this.keywordId = keywordId;
	this.catageoryId = catageoryId;
	this.orgCharset = document.charset;
	return this;
}
TlabSearch.search.prototype.submitForm = function () {
	var tmpKeyword = document.getElementById(this.keywordId).value;
	if(tmpKeyword.length > 65){
		tmpKeyword = tmpKeyword.substr(0,65);
	}
	document.getElementById(this.keywordId).value = tmpKeyword;
	
	document.charset = 'UTF-8';
	document.getElementById(this.formId).submit();
	this.undoCharset();
}
TlabSearch.search.prototype.undoCharset = function () {
	document.charset = this.orgCharset;
}
