$(document).ready(function(){
	$(".list_content").mouseover(function(){
		$(this).css("background","#444444");
	}).mouseout(function(){
		$(this).css("background","#283028");
	});
	$(".ip_change").mouseover(function(){
		$('.ip_change').css("color","#999966");
		$(this).css("color","#80B94B");
	});
	$(".point_content tr").mouseover(function(){
		$(this).css("background","#232524");
	}).mouseout(function(){
		$(this).css("background","#181D19");
	});
});

function wrAction(){
	if($.trim($("#title").val())==''){
		alert('请输入标题！');
		$("#title").select();
		$("#title").focus();
		return false;
		
	}else if($("#title").val().length<3 || $("#title").val().length>100){
		alert('标题长度至少3个字符 不能超过100个字符');
		$("#title").focus();
		return false;
	}
	if($("#bbs_class").length){
		if($("#bbs_class").val()==0){
			alert("请选择分类！！");return false;
		}
	}
	if($.trim($("#content").val())==''){
		alert('请输入内容！');
		$("#content").select();
		$("#content").focus();
		return false;
	}	
}
function listDelete(id,type){
	if(confirm("삭제하겠습니까??")){
		var no;
		if(!type || type==''){
			no=id;
		}else{
			var no=new Array();var num=0;
			$("input[id^='info_']:checkbox").each(function(){
				if(type=="all"){
					no[num]=$(this).attr("value");	
					num++;	
				}else if(type=="select"){
					if($(this).attr("checked")) {
					no[num]=$(this).attr("value");
					num++;
					}		
				}
			});
			if(no==''){
				alert('请选择 要删除内容！！');
				return false;
			}
		}
		$.ajax({
		   type: "POST",
		   url: "exe/exe.php",
		   data: "id="+no+"&mode=delete_list",
		   success: function(msg){
			 location.reload();
		   }
		});
	}
}
function change_area(id){
	$('.a1').css('color','#CC9966');
	$("#al_"+id).css('color','#CC7637');
	$.ajax({
	   type: "POST",
	   url: "exe/change_exe.php",
	   data: "id="+id+"&mode=change_game",
	   success: function(msg){
		 $("#point_content").html(msg);
		 //location.reload();
	   }
	});
}
function ipChange(id){
	$.ajax({
	   type: "POST",
	   url: "exe/change_exe.php",
	   data: "id="+id+"&mode=change_ip",
	   success: function(msg){
		 $("#cz_list").html(msg);
		 //location.reload();
	   }
	});
}
function upDate(id){
	$.ajax({
	   type: "POST",
	   url: "exe/change_exe.php",
	   data: "id="+id+"&mode=up_date",
	   success: function(msg){
		  if(msg==1){
		  	alert('每个小时 只能更新一个记录！');
			return false;
		  }
		 location.reload();
	   }
	});
}
