/**************************************************
 * 文件名：Cms.js
 * 文件相对路径：Phenix.Cms\Js\
 * Version：1.0
 **************************************************/
/*********************************************************************
 * 打开代码、引用树公用函数
 * 创建人：凌明照
 * 创建日期：2005/03/24
 * 参数说明：TextId—显示文本框ID，ValueId—值文本框ID
 * DictId—代码,CodeType—代码类型,Navigation—导航字段,Filter—过滤条件
 *********************************************************************/
function OpenCodeModalDialog(TextId,ValueId,FilePath,DictId,CodeType,Navigation,Filter,ReturnField){
	var width = 233;
	var height = 372;
	var left = (screen.width-width)/2;
	var top = (screen.height-height)/2;
	var params = "status:no;center:no;dialogTop:"+top+";dialogLeft:"+left+";help:no;minimize:no;"
		+"maximize:no;dialogWidth:"+width+"px;scroll=no;dialogHeight:"+height+"px;border:think";
	var url = FilePath+"UserControl/Phenix.Cms/CommonPage/CMS_CodeTree.aspx?DictId="+DictId+"&CodeType="+CodeType
		+"&Navigation="+Navigation+"&Filter="+Filter+"&ReturnField="+ReturnField+"&Value="+document.all[ValueId].value;
	var res = window.showModalDialog(url,null,params);
	if(res!=null && res!=''){
		document.all[TextId].value = res.split('|')[1];
		document.all[ValueId].value = res.split('|')[0];
	}
}

/*********************************************************************
 * 打开意见填写页面公用函数
 * 创建人：凌明照
 * 创建日期：2005/04/08
 * 参数说明：TextId—隐藏文本框ID
 *********************************************************************/
function OpenOpinionModalDialog(TextId){
	var width = 289;
	var height = 240;
	var left = (screen.width-width)/2;
	var top = (screen.height-height)/2;
	var params = "status:no;center:no;dialogTop:"+top+";dialogLeft:"+left+";help:no;minimize:no;"
		+"maximize:no;dialogWidth:"+width+"px;scroll=no;dialogHeight:"+height+"px;border:think";
	var url = "UserControl/Phenix.Cms/CommonPage/AddOpinion.htm";
	var res = window.showModalDialog(url,null,params);
	if(res!=null && res!='@#$%&*'){
		document.all[TextId].value = res;
		return true;
	}
	else{
		return false;
	}
}


