
/*-- ------ #MCommon ------ --*/
function MCommon(){}
//-- #Parameters --
//#AJAX
MCommon.prototype.sAjax_0=new netsSingleAjax();

MCommon.prototype.sSearchKeywordDefault="";
MCommon.prototype.sSearchURL="";


//-- #Methods --
//#Discuss
MCommon.prototype.OnDiscussInput=function(pControlName,pType){
	if(pType==0){
		document.getElementById(pControlName).style.height=80+tmpCommon.sysPx;
	}else{
		document.getElementById(pControlName).style.height=40+tmpCommon.sysPx;
	}

	return 0;
}
//#Search
MCommon.prototype.OnSearchFocus=function(pControl,pType){
	if(pType==0){
		if(pControl.value==this.sSearchKeywordDefault){
			pControl.value="";
		}
		pControl.className="Sort_0_2_A";
	}else{
		if(pControl.value==this.sSearchKeywordDefault || pControl.value==""){
			pControl.value=this.sSearchKeywordDefault;
			pControl.className="Sort_0_2";
		}else{
			pControl.className="Sort_0_2_A";
		}
	}

	return 0;
}
MCommon.prototype.showType=function(pType){
	if(pType==0){
		document.getElementById("typeBox").className="Sort_1_35";
	}else {
		document.getElementById("typeBox").className=tmpCommon.sysHidden;
	}
	
	return 0;
}
MCommon.prototype.chooseType=function(pText,pValue){
	document.getElementById("typeLabel").innerHTML=pText;
	document.getElementById("typeTxt").value=pValue;
	
	return 0;
}
MCommon.prototype.OnSearch=function(){
	tmpKeyword=document.getElementById("keywordTxt").value;
	if(tmpKeyword==this.sSearchKeywordDefault){
		tmpKeyword="";
	}
	tmpKeyword=tmpCommon.encodeURL(tmpKeyword);
	tmpType=tmpCommon.encodeURL(document.getElementById("typeTxt").value);
	
	window.location=this.sSearchURL+"?DSearch="+
		tmpKeyword+tmpCommon.sysSPLIT1+
		tmpType+tmpCommon.sysSPLIT1+
		"ID,0";
	return 0;
}



//-- ------ #Instanct ------ --
tmpMCommon=new MCommon();


