       var showTypeFlag =new Array(0,0,0,0,0,0) ;   //支持showType（）
       function showCookies(){
		     var obj = $("#login001"); 
		     var offet = obj.offset(); 
	         $("#apDiv5").css({ "left": offet.left-35 });
		     $("#apDiv5").css({ "top": offet.top+obj.height()-3});
		     $("#apDiv5").show();
       }
		 	 
	  function hideCookies(){
		  	 $("#apDiv5").hide();
	  }
	 function headQuerySummit(){	
			var pw = document.getElementById("querykey").value;
			if(pw=="请输入您要搜索的关键字"){	
			   alert("请输入您要搜索关键字!");
					return;
			 }
			 if(pw=="") {	
			     alert("请输入您要搜索关键字!");
			     return;
			 }
		      var url=encodeURI(path+"/searchProduct.do?action=SearchType&querykey="+pw);
		      window.location=url;
	 }
     function play1(){  
                        PImgPlayer.addItem("龙年宝贝计划",path+"/ad/indexAD/long/index.html",path+"/ad/indexAD/long/long.jpg");    
                        PImgPlayer.addItem("闹元宵",path+"/ad/indexAD/yuanxiao/index.html",path+"/web/index/images/ad/focus_banner06.jpg");    
		                PImgPlayer.addItem("汇积分",path+"/jifenduihuan",path+"/web/index/images/ad/focus_banner04.jpg");                          
		                PImgPlayer.addItem("云南旅游_昆明旅游_大理旅游_丽江旅游-2288元,6天5夜双飞特惠“昆大丽”旅游","http://www.hg365.com/2288.htm",path+"/web/index/images/ad/focus_banner01.jpg");
                        PImgPlayer.addItem("e车卡专题",path+"/ad/icbc-ad/e_card/index.html",path+"/web/index/images/ad/focus_banner03.jpg");                          
                        PImgPlayer.init("imgPlayer",550,230);
	  }
	  
	  function setTab(name,cursel,n){
		 for(i=1;i<=n;i++){
		  var menu=document.getElementById(name+i);
		  var con=document.getElementById("con_"+name+"_"+i);
		  menu.className=i==cursel?"hover":"";
		  con.style.display=i==cursel?"block":"none";
		 }
      } 
      
      
  function showType(code,num){
          if(showTypeFlag[0]==0&&num=='1'){
             showTypeFlag[0]=1;
             doShowType(code,num) ; 
           }else if(showTypeFlag[1]==0&&num=='2'){
             showTypeFlag[1]=1;     
             doShowType(code,num) ;    
           }else if(showTypeFlag[2]==0&&num=='3'){
             showTypeFlag[2]=1;     
             doShowType(code,num) ; 
           }else  if(showTypeFlag[3]==0&&num=='4'){
              showTypeFlag[3]=1;   
              doShowType(code,num) ;   
           }else if(showTypeFlag[4]==0&&num=='5'){
             showTypeFlag[4]=1;      
             doShowType(code,num) ;  
           }else  if(showTypeFlag[5]==0&&num=='6'){
             showTypeFlag[5]=1;    
             doShowType(code,num) ;     
           }
           
           
}
function doShowType(code,num){
     $.ajax({   
        url:path+"/product/type.do?action=showMenuType" ,			
		type:"post",
		dataType:"html",
		data:{"code":code},   
		beforeSend:function(){ },
		error:function(XMLHttpRequest, textStatus, errorThrown){ },
		success:function(msg) {	
           if(num=='1'){
             $("#type_one").html(msg);
           }else if(num=='2'){
             $("#type_two").html(msg);
           }else if(num=='3'){
             $("#type_three").html(msg);
           }else if(num=='4'){
             $("#type_four").html(msg);
           }else if(num=='5'){
             $("#type_five").html(msg);
           }else if(num=='6'){
             $("#type_six").html(msg);
           }       
        }
      })
} 
