function ck_mail(e)
{
  if("" !=e)
  {
    if(/(\S)+[@]{1}(\S)+[.]{1}(\w)+/.test(e))
    {
    return true; 
    }
  }
return false; 
}

function get_radio_checked()
{
var post_list="";

$("input[@type=radio][@checked]").each(function() { 
      post_list +=this.value+",";

        }); 
		
    if(""==post_list)
    {return "";}
    else
    {return post_list;}
}

//radio value='1-ID','2-ID','3-ID' 按不同状态值处理
//radio_value_part = 1,2,3
function set_radio_checked(value_part)
{
$("input[@type=radio]").each(function() { 
if(this.value.substring(0,1)==value_part)
{
this.checked=true;
}
        });

}
	
function get_checkbox_checked()
{
var post_list="";

$("input[@type=checkbox][@checked]").each(function() { 
post_list +=this.value+",";
        }); 
		
if(""==post_list)
{return "";}
else
{return post_list;}
//alert(b);
}


//反选
function CheckedRev()
{
  var arr = $(':checkbox');
  var c;
  
  c=arr[0].checked;
  
  for(var i=0;i<arr.length;i++)
  { 	
   arr[i].checked = !c ;
  }
}
 
//替换验证码图片 
function changeImg(imgName)
{
 $("#"+imgName).attr({ src: "/imgcode.php?"+Math.random(1)}); 
}

function copyToClipBoard(sText,showText)
{ 
	try
	{
		window.clipboardData.clearData(); 
		window.clipboardData.setData("Text", sText);
	} 
	catch (e) 
	{
  		var clipDiv;
  		clipDiv=$("#_FlashClipboard_Box").size();
  		//alert(clipDiv);
  	
  		if(0==clipDiv && document.body)
  		{
  			$('<div id="_FlashClipboard_Box"><embed src="/swf/clipboard.swf" FlashVars="clipboard='+sText+'" width="10" height="10"	type="application/x-shockwave-flash"></embed></div>').appendTo(document.body);
  		}
  		else
  		{
			$("#_FlashClipboard_Box").html('<embed src="/swf/clipboard.swf" FlashVars="clipboard='+sText+'" width="10" height="10"	type="application/x-shockwave-flash"></embed>');
		}
	}

   alert(showText); 
}
