function ActionsPaneCollapse_OnClick()
{
	if (event.keyCode == 0 || event.keyCode == 13) {
		idActionsPane.style.display = "none";
		idActionsTable.style.display = "none";
		idActionsPaneCollapsed.style.display = "";
		idActPaneExpandArrow.style.display = "";
		idActPaneExpandArrow.focus();
	}
}

function ActionsPaneExpand_OnClick()
{
	if (event.keyCode == 0 || event.keyCode == 13) {
		idActionsPane.style.display = "";
		idActionsTable.style.display = "";
		idActionsPaneCollapsed.style.display = "none";
		idActPaneExpandArrow.style.display = "none";
		idActPaneCollapseArrow.focus();
	}
}

function OpenWindow(url, height, width) {
	window.open(url, "", "width="+width+",height="+height+",scrollbars=yes");
}

function ShowHide(obj) {
	obj.style.display = obj.style.dispaly == "" || obj.style.display == "inline" ? "none" : "inline";
}

function ShowHideAll(obj, txt) {
	obj.style.display = obj.style.dispaly == "" || obj.style.display == "inline" ? "none" : "inline";
	txt.innerText = txt.innerText == "显示" ? "隐藏" : "显示";
}

function OpenModeless(url) {
	window.showModelessDialog(url, '', 'dialogHeight:500px;dialogWidth:850px;status:no;resizable:yes;help:no;scroll:yes;unadorned:yes');
}

function OpenModal(url) {
	window.showModalDialog(url, '', 'dialogHeight:500px;dialogWidth:850px;status:no;resizable:yes;help:no;scroll:yes;unadorned:yes');
}

//*以下为徐高良加入部分2006.05.18
function changeUrl(url)
{
	window.location.href=url;
}
function focusControl(id)
{
	var obj = document.getElementById(id);
	
	
	
	try
	{
		if(obj.type=="text")
		{
			obj.select();
		}
		obj.focus();
		
	}
	catch(e)
	{
	alert("error");
	}
	
	
	//obj.select();
}
function keypressFocus(id)
{
	if(event.keyCode==13)
	{
		focusControl(id);
		event.returnValue=false;
		
	}
}
function column2Properties(s)
{
		s = s.toLowerCase();
		if(s.indexOf("t_")=="0")
		{
			s = s.substr(2);
		}
		else
		{
			if(s.indexOf("par_")=="0")
			{
				s= s.substr(4);
			}
		}
		//s = UpperFirstChar(s);
		var pos_ = s.indexOf("_");
		while(pos_ >0)
		{
			s = s.substr(0,pos_) +upperFirstChar(s.substr(pos_+1));
			pos_ = s.indexOf("_");
		}
		return s;
}
function upperFirstChar(s)
{
	return s.substr(0,1).toUpperCase() + s.substr(1);
}
function onlyTimeValid(source, arguments)
	{
	  
		var rx = new RegExp("\\d{2}:\\d{2}");
		
		var matches = rx.exec(arguments.Value);
		if (matches != null && arguments.Value == matches[0])
		{
			 var hours = parseInt(arguments.Value.split(":")[0]);
			 var minus = parseInt(arguments.Value.split(":")[1]);
			 
			 if(hours >24)
			 {
				arguments.IsValid =false;
				
			 }
			 else if(hours == 24&&minus > 0)
			 {
				arguments.IsValid =false;
				
			 }
			 else if(minus>=60)
			 {
				arguments.IsValid =false;
			 }
			 else
			 {
			 
				arguments.IsValid=true;
			 }
		}
		else
		{
			 arguments.IsValid=false;
			
		}
	}  