function confirmact(url,action,flag,card){

	var whichIt = event.srcElement;
	while	(whichIt.tagName.indexOf("FORM") ==	-1)	
	{	whichIt	=	whichIt.parentElement;
		if (whichIt	== null) { return	true;	}
	}

	var length = whichIt.elements.length
	var tocheck = whichIt.SelAll.checked
	var haveselected=false
	whichIt.action="/cards/action/"+url+"?act="+action+"&card="+card;
	for (var i=0; i<length; i++)
	{
		if (whichIt.elements[i].name.indexOf("T") != -1){
			if(whichIt.elements[i].checked ==true)haveselected=true
		}
	}
	if(haveselected!=true){
		alert("请选择数据！")
		return false
	}
	if(flag>0){
		if ( confirm("请确认是否执行 “"+action+"” ？") ){
			whichIt.submit();
			return false;
		}else{
			return false;
		}
	}else{
		whichIt.submit();
		return false;
	}
}

function All() 
{
	var whichIt = event.srcElement;
	while	(whichIt.tagName.indexOf("FORM") ==	-1)	
	{	whichIt	=	whichIt.parentElement;
		if (whichIt	== null) { return	true;	}
	}
 
	var length = whichIt.elements.length 
	var tocheck = whichIt.SelAll.checked 
	for (var i=0; i<length; i++) 
	{ 
		if (whichIt.elements[i].name.indexOf("T") != -1) 
		whichIt.elements[i].checked = tocheck 
	} 
	return; 
}

function SetAll() 
{
	var whichIt = event.srcElement;
	while	(whichIt.tagName.indexOf("FORM") ==	-1)	
	{	whichIt	=	whichIt.parentElement;
		if (whichIt	== null) { return	true;	}
	}

	if (1 == whichIt.SelAll.checked) 
	{ 
		whichIt.SelAll.checked = 0 
	} 
	else 
	{ 
		whichIt.SelAll.checked = 1 
	} 
	All() 
	return; 
}

function OpenDialog() 
{
	window.showModalDialog("/menu/about.php","NewWin","dialogHeight: 275px; dialogWidth: 386px; dialogTop: px; dialogLeft: px; edge: raised; center: Yes; help: No; resizable: No; status: No; scroll: No;");
}
function CheckInputText(){

}
function changeRowColor(obj)
{
	var color='#A6D2FF';
	if(document.all)
	{
		if(obj.style.backgroundColor=='')
		{	
			obj.style.backgroundColor=color;
		}
		else
		{
			obj.style.backgroundColor='';
		}
	}
}
function SelectRowColor(obj, tabobj)
{

 	var color= '6a81bd';        //'#A6D2FF';
 	
	if(document.all)
	{
		for(var i=1;i < tabobj.rows.length;i++)
  	{
	    tabobj.rows(i).style.backgroundColor='';
  	}		
		if(obj.style.backgroundColor=='')
		{	
			obj.style.backgroundColor=color;
		}
		else
		{
			obj.style.backgroundColor='';
		}
	}
}
function unSelectRowColor(tabobj)
{

 	var color='#A6D2FF';
 	
	if(document.all)
	{
		for(var i=1;i < tabobj.rows.length;i++)
  		{
			tabobj.rows(i).style.backgroundColor='';
  		}		
		
	}
}

function SelectRowFontColor(obj, tabobj)
{

 	var color= '#e9e93f';        //'#A6D2FF';

 	
	if(document.all)
	{
		for(var i=1;i < tabobj.rows.length;i++)
  	{
	    tabobj.rows(i).style.Color='';
  	}		
		if(obj.style.backgroundColor=='')
		{	
			obj.style.Color=color;
		}
		else
		{
			obj.style.Color='';
		}
	}
}
function unSelectRowFontColor(tabobj)
{

 	var color='#000000';
 	
	if(document.all)
	{
		for(var i=1;i < tabobj.rows.length;i++)
  		{
			tabobj.rows(i).style.Color='';
  		}		
		
	}
}