function flayout(dd)
{
var mhref;
mhref="setup.jsp?mbm=010104&tablename="+dd;
document.location.href=mhref;

}
function fhelp(id)
{
var myopen;
var mhref='help.jsp?mbm='+id;
myopen=window.open(mhref,'在线帮助','width=700,height=600,resizable=yes,toolbar=no,status=no,scrollbars=yes,menubar=no,directories=no,location=no,dependant=no');
myopen.focus();

}
function fCommonDelete(mtable,mid)
{
var mm=document.location.href;

if(confirm("是否删除当前记录?"))
document.location.href="Common_Delete.jsp?mid="+mid+"&mtable="+mtable+"&mret="+mm+"##AA";
}
function mprint(mtab,mid)
{
var myopen;
var mhref='print.jsp?mtab='+mtab+"&mid="+mid;
myopen=window.open(mhref,'打印','width=700,height=600,resizable=yes,toolbar=no,status=no,scrollbars=yes,menubar=no,directories=no,location=no,dependant=no');
myopen.focus();
return false;
}
function findmember2(mTableName,mFileld,mFieldTxt,mIDtxt,mAndstr)
{
var myopen;
myopen=window.open('searchView/SearchCust.jsp?Table='+mTableName+'&field='+mFileld+'&refield='+mFieldTxt+'&reid='+mIDtxt+'&andstr='+mAndstr,'搜索客户','status=yes,scrollbars=yes,width=500,height=330');
myopen.focus();
}
function findmember3(mTableName,mFileld,mFieldTxt,mIDtxt,mAndstr)
{
var myopen;
myopen=window.open('searchView/SearchSele.jsp?pp=44&ty=crm_dzyjmbwjj&field='+mFileld+'&refield='+mFieldTxt+'&reid='+mIDtxt+'&andstr='+mAndstr,'搜索客户','status=yes,scrollbars=yes,width=500,height=330');
myopen.focus();
 

}
function findtopic(mFieldTxt)
{
var myopen;
myopen=window.open('searchView/ActTitle.jsp?field='+mFieldTxt,'搜索客户','status=yes,scrollbars=yes,width=500,height=330');
myopen.focus();
}

function pickcolor(mFileld)
{
var myopen;
 
myopen=window.open('ftb.colorpicker.aspx?mfield='+mFileld,null,'status=no,scrollbars=no,width=200,height=150');
myopen.focus();


}
var mall=false;
function mCheck(dd)
{
 var mframe=Form1.elements;
 var isall=true;
for (var j=0;j<mframe.length;j++)
	if ((mframe[j].type=="checkbox") && (mframe[j].name!="btnall")) 
		if (!mframe[j].checked) isall=false;
Form1.btnall.checked=isall;
 mall=isall;
}
function mselectall(dd)
{
 mall=!mall;
 var mframe=Form1.elements;
for (var j=0;j<mframe.length;j++)
	if ((mframe[j].type=="checkbox") && (mframe[j].name!="btnall")) mframe[j].checked=mall;
Form1.btnall.checked=mall;
}
function fgetcheck(msg)
{
 
var ItemID="";
var mframe=Form1.elements;
 
for (var j=0;j<mframe.length;j++)
if ((mframe[j].type=="checkbox") && (mframe[j].name!="btnall") )
{
	if (mframe[j].checked)
		if (ItemID=="")	ItemID+=mframe[j].value;
		else ItemID+=","+mframe[j].value;
}
 if (ItemID=="")
 {
 alert("没有选中的记录!!");
 return false;
 }

	if (confirm(msg))
	{
	Form1.Crm_Control_mItemId.value=ItemID;

	 }
 

 
	
}
