//新开窗口---------------------------------------------------------------------------------------------
var jsWin = null;
function JsOpenwindow(width,height,Url)
{
	if(jsWin!=null)
		jsWin.close();
	var left = screen.width/2 - width/2;
	var top  = screen.height/2 - height/2;	 
	jsWin = window.open(Url,"jsWin","width="+width+",height="+height+",left="+left+",top="+top+"\",scrollbars=yes,resizable=yes");
}
//模式窗口
function JsShowModalDialog(width,height,Url)
{	
	var sFeatures="dialogHeight: " + height + "px; width: " + width + "px; center: Yes; help:No; resizable:No; status:Yes;";
	var rtnValue = window.showModalDialog(Url,null,sFeatures);
	return rtnValue;
}

//是否删除
function isDelete(DelItem)
{
	if(window.confirm("是否确认删除"))
	{
		if(document.all("txtAction")!=null)
			document.all("txtAction").value = "del"				
		if(document.all("txtDelItem")!=null)
			document.all("txtDelItem").value = DelItem;
		document.forms[0].submit();
	}
}
//是否删除
function isDeleteExchange(G_Num)
{
	if(window.confirm("是否确认删除"))
	{
		if(document.all("txtAction")!=null)
			document.all("txtAction").value = "del"				
		if(document.all("txtE_G_Num")!=null)
			document.all("txtE_G_Num").value = G_Num;
		document.forms[0].submit();
	}
}
//搜索
function MySearch(url)
{
	
	if(document.all("tbSearch").style.display=="none")
		document.all("tbSearch").style.display = "";
	else
	{
		document.all("tbSearch").style.display = "none";
		location.href = url;
	}
}

//搜索Action
function SearchAction()
{
	if(document.all("txtAction")!=null)
		document.all("txtAction").value = "search"	
	document.forms[0].submit();
}

///帮助信息展示------------------------
function MyHelpMessageShow()
{
	var mes = document.all("tabMessage");
	if(mes.style.display=="none")
		mes.style.display = "";
	else
		mes.style.display = "none";
}

///控制显示
function ControlDis(objID)
{
	var objDis = document.all(objID);
	if(objDis.style.display=="none")
		objDis.style.display = "";
	else
		objDis.style.display = "none";
	
}
//四舍五入
//myFloat是要进行四舍五入的数字，mfNumber代表要取舍的位数
function floatRound(myFloat,mfNumber)
{
    var cutNumber = Math.pow(10,mfNumber-1);
    return Math.round(myFloat * cutNumber)/cutNumber;
}

