﻿// JScript 文件
function showitem(obj, objid){
    $(".itemd").each(function(){
        $(this).css("display","none");
        //$(this).parent.mouseout( function(){ $(this).css("display","none"); });
    })
     $(".itemd2").each(function(){
        $(this).css("display","none");
        //$(this).parent.mouseout( function(){ $(this).css("display","none"); });
    })
     $(".itemd3").each(function(){
        $(this).css("display","none");
        //$(this).parent.mouseout( function(){ $(this).css("display","none"); });
    })
    var item= document.getElementById("item_"+objid);
    item.style.display="block";
    $(item).css("margin-top", "-"+ ($(item).height()/2 + 12) +"px" );//动态定位三级菜单
    
    $(obj).parent("font").parent("ul").parent("div").mouseleave( function(){ item.style.display="none"; });
}


function showCat(obj,catid){    
    
    
    navid=catid;
    navid2=obj.id;
    obj.className="h2_cat active_cat";
	//document.getElementById("test").value="test";
    document.getElementById("cat2").style .display="none";
    document.getElementById("cat3").style .display="none"
    document.getElementById("cat1").style .display="none"
    document.getElementById(catid).style.display="block";
    
    
}



function closeCat(obj,catid){
    navid=catid;
    navid2=obj.id;
  //  $("#"+catid+"").fadeTo(0, 0);
     $(".itemd1").each(function(){
        $(this).css("display","none");
    })
     $(".itemd2").each(function(){
        $(this).css("display","none");
    })
     $(".itemd3").each(function(){
        $(this).css("display","none");
    })
    $(".itemd").each(function(){
        $(this).css("display","none");
    })
    document.getElementById(catid).style.display="none";
}


