$(function() { 
$('.table_style tr').addClass('table_style_odd'); 
$('.table_style tr:even').addClass('table_style_even');

$(".table_style tr").mouseover(function(){  
   $(this).addClass("table_style_over");  
    }).mouseout(function(){  
   $(this).removeClass("table_style_over");  
})

});

function menu_load(url) {
	$("#sidebar").load(url);
	
};

function open_window(url,title) {
	parent.asyncbox.open({url : url,title:title,width :600,height :450,scroll:true,modal:true},window);
	
};

function del(url,title,msg,my) {	

parent.asyncbox.confirm(title,msg,
    function(action) {　　　　
	if (action == 'ok') {
	$.ajax({
	type: 'POST',
	url: url,
	dataType: "json",
	success: function(json) {
	if (json.result == 1) {
	$(my).parent().parent().remove();	
	}else{
	parent.asyncbox.error(json.msg,title);
	}
	}
	});
	
	}	　　
	});
	 
}

function post() {	
var dialog = frameElement.api;
var options = {dataType:'json',success: function(json) {
  if(json.result==0)
  {
   parent.asyncbox.error(json.msg,'操作提示');
  }
  else
   {
  asyncbox.success(json.msg,'操作提示',
	  function(action){
		if(action == 'ok'){
　　　　　dialog.opener.parent.frames['frame_content'].location.reload();
	     dialog.close();
　　     }
	  }
   );
   }
  }
};
$('#form').ajaxSubmit(options);
}
			
function getver(dq_ver, url, app) {
	$.ajax({
		type: "post",
		url: url,
		dataType: "json",
		success: function(json) {
			if (json == null) {
			
			$('#ver').html('暂时无法链接升级服务器');
			} else {
			$('#ver').html('');
			var ver = json.ver_name;
			ver += "&nbsp;V";
			ver += json.ver;
			ver += "&nbsp;[";
			ver += json.ver_date;
			ver += "]";
			ver += "&nbsp;";
			if (json.ver_date > dq_ver) {
				ver += '<a href="' + app + '" style="color:#F00">有更新</a>'
			}
			$('#ver').append(ver)
		}
		}
	})
};
       
function getdomain(url) {
	$.ajax({
		type: "post",
		url: url,
		dataType: "json",
		success: function(jsondomain) {
			if (jsondomain == null) {
				$('#domain_info').html('未获取商业授权 <a href="http://www.dlcms.net/support" target="_blank">赞助作者获得正规授权</a>');
			} else {
				var domain_info = '<span style="color:green">';
				domain_info += "授权域名：";
				domain_info += jsondomain.domain;
				domain_info += "&nbsp;&nbsp;持有人：";
				domain_info += jsondomain.holder;
				domain_info += "&nbsp;&nbsp;授权状态：";
				domain_info += "已授权";
				domain_info += "</span>";
				domain_info += '&nbsp;&nbsp;<a href="http://www.dlcms.net/certification/inquiry?domain=' + jsondomain.domain + '" target="_blank">证书查看</a>';
				$('#domain_info').html(domain_info)
			}
		}
	})
};