   function dh_hide1(){
      $("#sy").show();
      $("#gyhx").show();
      $("#xwzx").show();
      $("#hxcp").show();
      $("#zxdd").show();
      $("#shfw").show();
      $("#zlxz").show();
      $("#lxwm").show();
      $("#yhzx").show();
      $("#syover").hide();
      $("#gyhxover").hide();
      $("#xwzxover").hide();
      $("#hxcpover").hide();
      $("#zxddover").hide();
      $("#shfwover").hide();
      $("#zlxzover").hide();
      $("#lxwmover").hide();
      $("#yhzxover").hide();
 }
 function dh_hide(type){
      $("#sy").show();
      $("#gyhx").show();
      $("#xwzx").show();
      $("#hxcp").show();
      $("#zxdd").show();
      $("#shfw").show();
      $("#zlxz").show();
      $("#lxwm").show();
      $("#yhzx").show();
      $("#syover").hide();
      $("#gyhxover").hide();
      $("#xwzxover").hide();
      $("#hxcpover").hide();
      $("#zxddover").hide();
      $("#shfwover").hide();
      $("#zlxzover").hide();
      $("#lxwmover").hide();
      $("#yhzxover").hide();

	  $("#"+type).hide();
	  $("#"+type+"over").show();

 }
  //登陆
 function login(){
   var username=$("#username").val();
   var password=$("#password").val();
   if(username==''|| password==''){
      alert("用户名密码不能为空");
      return false;
   }else{
     $.ajax({
            type: "POST",//用POST方式传输
             dataType:"html",//数据格式:JSON
             url:base_url+'admin/index.php/indexAction/yz_load',
             data:'username='+username+'&password='+password,
             success:function(param){
               if(param=='0'){
                 alert("用户名密码错误！");
               }else if(param=='1'){
                 window.location.reload();
               }
             }
        });
   }
 }
 //退出
 function exit(){
   $.ajax({
      type: "POST",//用POST方式传输
      dataType:"html",//数据格式:JSON
      url:base_url+'admin/index.php/indexAction/exit_one',
      data:'',
      success:function(param){
       window.location.reload();
      }
   });
}
//跳转到注册页面
function take_zc(){
   window.location.href=base_url+"index/yhzx.php?type=zx";
}
 //分类跳转
 function fenlei(id){
    window.location.href=base_url+"index/hxcp.php?type="+id;
 }
 //新闻跳转
 function newes(id){
    window.location.href=base_url+"index/news.php?id="+id;
 }
 //跳转指定产品
 function cp(id){
 	window.location.href=base_url+"index/hxcp.php?id="+id;
 }
 function index(){
    $.ajax({
            type: "POST",//用POST方式传输
             dataType:"html",//数据格式:JSON
             url:base_url+'admin/index.php/indexAction/',
             data:'isen='+isen,
             success:function(param){
                 var rel=new Array();
                 rel=param.split("<sbr>");
                 chanping(rel[0]);
                 chanping_fenlei(rel[1]);
                 news(rel[2]);
                 jianjie(rel[3]);
             }
        });
 }
 //展现分类子集
  function fenlei1(id){
 	if($("#"+id).html()=='+'){
 	    var url=base_url+'admin/index.php/indexAction/get_cp_type_son/';
 		$("#"+id).html('-');
 		  $.ajax({
            type: "POST",//用POST方式传输
             dataType:"html",//数据格式:JSON
             url:url,
             data:'isen='+isen+'&id='+id,
             success:function(param){
                  if(param=='')return false;
                  var param=eval("("+param+")");//转换为 json 对象
                   var html="";
                   for(var i=0;i<param.length;i++){
			          html=html+"<div class=\"s_"+id+"\">&nbsp;&nbsp;<span style=\"cursor:pointer\" onclick=\"fenlei("+param[i].id+");\">"+param[i].name+"</span></div>";
			       }
                  $("#p_"+id).append(html);
             }
         });
 	}else if($("#"+id).html()=='-'){
 		$("#"+id).html('+');
 		$(".s_"+id).hide();
 	}
 }
 //展现新闻标题 首页五条
 function news(param){
    var param=eval("("+param+")");//转换为 json 对象
    var html="<table height=\"150px\" width=\"410px\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">";
    if(param.length>0){
      for(var i=0;i<param.length;i++){
        if(isen==0){
            var title=param[i].title;
           html=html+"<tr><td class=\"newsspan\" ><span style=\"cursor:pointer;\" onclick=\"newes('"+param[i].id+"');\">"+title+"</span></td><td class=\"newsspan\" align=\"right\">"+param[i].creat_date+"</td></tr>";
        }else{
            var title=param[i].title;
            title.replace("'","#");
            html=html+"<tr><td class=\"newsspan\" ><span style=\"cursor:pointer;\" onclick=\"newes('"+param[i].id+"');\">"+title+"</span></td><td class=\"newsspan\" align=\"right\">"+param[i].creat_date+"</td></tr>";
        }
      }
    }
    html=html+"</table>";
    $("#news").html(html);
 }
  //展现公司简介
 function jianjie(param){
    param=param.substring(1,param.length-1);
    param=param.substring(0,238);
    $("#jianjie_content").html(param);
 }
 //联系我
 function lianxiwom(){
     $.ajax({
            type: "POST",//用POST方式传输
             dataType:"html",//数据格式:JSON
             url:base_url+'admin/index.php/indexAction/lxwm',
             data:'isen='+isen,
             success:function(param){
               var param=eval("("+param+")");//转换为 json 对象
	               if(param.length>0){
	                 for(var i=0;i<param.length;i++){
	                   var address=param[i].address;
	                   $("#address1").html(address.substring(0,8));
	                   $("#address2").html(address.substring(8,address.length));
	                   $("#post").html(param[i].post);
	                   $("#tel").html(param[i].tel);
	                   $("#fax").html(param[i].fax);
	                   $("#email").html(param[i].email);
	                 }
	               }
               }
        });
 }
 //展品分类展示
 function chanping_fenlei(param){
   var param=eval("("+param+")");//转换为 json 对象
   if(param.length>0){
     var html="<table width=\"219px\" width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tr><td height=\"51px\" background=\""+base_url+"file/images/head_34.png\" style=\"background-repeat:no-repeat\" valign=\"middle\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b><span style=\"font-size:12px;color:#FFFFFF\">虎兴产品分类</span></b></td></tr>";
     for(var i=0;i<param.length;i++){
          html=html+"<tr><td height=\"40px\" background=\""+base_url+"file/images/head_21.png\">";
          html=html+"<div id=\"p_"+param[i].id+"\"><span style=\"cursor:pointer\" id=\""+param[i].id+"\" onclick=\"fenlei1("+param[i].id+")\">+</span>"+
          "<span style=\"cursor:pointer\" onclick=\"fenlei("+param[i].id+");\">"+param[i].name+"</span></div>";
          html=html+"</td></tr><tr><td class=\"xuxian\"><img src=\""+base_url+"file/images/xu.png\"/></td></tr>";
       }
      html=html+"<tr><td height=\"10px\" background=\""+base_url+"file/images/head_20.png\" style=\"background-repeat:no-repeat\"></td></tr></table>";
      $("#chanpingfenlei").html(html);
   }
 }
 //首页展现产品 3条
function chanping(param){
    var param=eval("("+param+")");//转换为 json 对象
    if(param.length>0){
     for(var i=0;i<param.length;i++){
        var html="<div class=\"image1\"><div align=\"center\" class=\"image2\">";
        var title=param[i].title;
        var id=param[i].id;
        var title_a="";
        var title_b="";
        var le=(title.length)/2;
        title_a=title.substring(0,le);
        title_b=title.substring(le,title.length);
            $("#cpzs_xh"+i).html(param[i].xh);
            html=html+"<img width=\"151\" style=\"cursor:pointer\" height=\"126\" onclick=\"cp('"+id+"');\" src=\""+base_url+param[i].chanping_suolue+"\"/></div>";
            html=html+"<span style=\"cursor:pointer\" onclick=\"cp('"+id+"');\">"+param[i].xh+"</span></div><table class=\"cpzs2\" width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";
            html=html+"<tr><td><span style=\"cursor:pointer\" onclick=\"cp('"+id+"');\">"+title_a+"</span></td></tr><tr><td>";
            html=html+"<span style=\"cursor:pointer\" onclick=\"cp('"+id+"');\">"+title_b+"</span></td></tr><tr><td>&nbsp;</td></tr></table>";
            $("#cpzs_img"+i).html(html);
       }
     }
}

