function changerc(){
		var rcid=$('input[@name=rcid][@checked]').val();
		if(!rcid){
			alert('请选择一个运营商');				
		}else{
			location.href='cardlist.php?rcid'+rcid;
		}
   }
function getcard(cid,step){
	//$(".text_box").show();
	//document.getElementById("msgshow").style.display="block";
	var safecode = $("#seccode").val();	   		
	var whycont = $("#whycont").val();var diffcont = $("#diffcont").val();
	jQuery.ajax({
		type: "POST",
		url: 'ajax_card.php',
		data: "do=cardinfo&cid="+cid+"&step="+step+"&seccode="+safecode+"&whycont="+whycont+"&diffcont="+diffcont,
		dataType: 'html',
		success: function(html){ 
			 
			 if(html=='-1'){
				$(".text_box").hide();$(".text_box_02").hide();	
				alert('请先登录');
 			 }else if(html==-3){
				alert('验证码错误');
			 }else if(html=='-11'){
				alert("所填内容必须是中文且大于5个字符!\r\n不允许英文");$(".text_box_02").hide();					 
			 }else if(html=='-22'){
				alert('您的积分不足，无法领取！');
			 }else{
				document.getElementById("msgshow").style.display="block";
 				document.getElementById('msgshow').innerHTML=html;
				//$(".text_box").html(html);
			 } 
		}
	});
}
//显示评论层
function msgboxshow(id){
	$('#repbox'+id).toggle();
}
//鲜花鸡蛋
function msgvote(id,t){
	jQuery.ajax({
		type: "POST",
		url: 'ajax_card_comment.php',
		data: "action=msgzc&msgflag="+t+"&msgid="+id,
 		success: function(html){ 
			  if(html=='-3'){
					alert('请不要重复投票');  
			  }else if(html=='1'){
				 if(t==0){
				 	sd = parseInt($('#egg'+id).text(),10)+1; 
					$('#egg'+id).text(sd);
				 }else{
					sd = parseInt($('#flower'+id).text(),10)+1; 
					$('#flower'+id).text(sd);
				}
			  } else{
				alert('发生错误!');  
			  }
		}
	});
}
function replycomment(id){
	var	content=$('#msgcontent'+id).val();
	jQuery.ajax({
		type: "POST",
		url: 'ajax_card_comment.php',
		data: "action=msgreply&content="+content+"&msgid="+id,
 		success: function(html){ 
			  if(html=='-3'){
				alert('请休息一会!');  
			  }else if(html=='-5'){
				 alert('请不要发垃圾信息或广告!'); 
			  }else{
				  cc= $('#msgcontent'+id).val();
				  $('#replylist'+id).append(html);
				  alert('发表回复成功!谢谢您的参与');
			 }
		}
	});
	
}
//中文
function iszw(obj,showdiv){
    
   if(obj.match(/[^\u4e00-\u9fa5]/g)|| obj==''){
    	document.getElementById(showdiv).innerHTML="<em></em><font color='#ff0000'>×只允许汉字</font>";
   }else{
    	document.getElementById(showdiv).innerHTML ="<em></em>√正确";
   }
}
//评论
function ajaxget(furl,ajaxdiv){
	jQuery.ajax({
 		url: furl,
 		dataType: 'html',
		success: function(html){
			  
			 $("#"+ajaxdiv).html(html);
		}
	});
}
ajaxget('ajax_card_comment.php?page=1&action=clist&cid='+$("#cardids").val(),'commentlist'); 
