var search_box_menu=function(){
	var t=15,z=50,s=6,a;
	var ary_t= new Array();
	
	function dd(n){this.n=n; this.h=[]; this.c=[]}
	dd.prototype.init=function(p,c){
		a=c; var w=document.getElementById(p), s=w.getElementsByTagName('ul'), l=s.length, i=0;
		for(i;i<l;i++){
			var h=s[i].parentNode; this.h[i]=h; this.c[i]=s[i];
			
			var cls_a="",ary_cls_a=h.getElementsByTagName('a'), cls_a_cou=ary_cls_a.length, j=0;
		    for(j;j<cls_a_cou;j++){
			var cls_a_n=ary_cls_a[j].className;
				if(cls_a_n=='search_box_ev_link'){
				cls_a=ary_cls_a[j];
				}
			}
			
			ary_t[i]=this;
			//h.onclick=new Function(this.n+'.st('+i+',true,'+l+')');
			cls_a.onclick=new Function(this.n+'.st('+i+',true,'+l+')');
			
			
			//h.onmouseover=new Function(this.n+'.st('+i+',true)');
			//h.onmouseout=new Function(this.n+'.st('+i+')');
			
			
			var cls_div="",ary_cls_div=h.getElementsByTagName('div'), cls_div_cou=ary_cls_div.length, k=0;
			for(k;k<cls_div_cou;k++){
			var cls_div_n=ary_cls_div[k].className;
			if(cls_div_n=='search_box_menu_close'){
				cls_div=ary_cls_div[k];
				cls_div.onclick=new Function(this.n+'.st2('+i+',false,'+l+')');
				}
			}

			
		}
		
	}
	dd.prototype.st=function(x,f,m){
		//クリックされた以外の処理
		var g=0;
		var cc="",hh="";

		
		
		for(g;g<m;g++)
		{
		 cc="";
		 hh="";
		 if(g*1!=x*1){
		 
		 cc=ary_t[g].c[g];
		 hh=ary_t[g].h[g];
		 
		 
		 if(cc.style.display=='block')
		 	{
		 	cc.style.display='none';
		 	cc.style.height=0;
		 	clearInterval(cc.t);
		 	cc.style.overflow='hidden';
		   
		 	}
		 }
		}
		
		
		
		//クリックされたものの処理
		var c=this.c[x], h=this.h[x];

			clearInterval(c.t);
			c.style.overflow='hidden';
			if(c.style.display=='none'){c.style.display='block';}
			
				if(!c.mh){c.style.display='block'; c.style.height=''; c.mh=c.offsetHeight; c.style.height=0}
				if(c.mh==c.offsetHeight){c.style.overflow='visible'}
				else{
					c.style.zIndex=z;
					z++;
					c.t=setInterval(function(){sl(c,1)},t);
				}

	}
	
	dd.prototype.st2=function(x,f,m){
	var c=this.c[x], h=this.h[x];

	clearInterval(c.t);
	c.style.overflow='hidden';
	c.t=setInterval(function(){sl(c,-1)},t)
	}
	
	function sl(c,f){
		var h=c.offsetHeight;
		if((h<=0&&f!=1)||(h>=c.mh&&f==1)){
			if(f==1){c.style.filter=''; c.style.opacity=1; c.style.overflow='visible'}
			clearInterval(c.t); return
		}
		var d=(f==1)?Math.ceil((c.mh-h)/s):Math.ceil(h/s), o=h/c.mh;
		c.style.opacity=o; c.style.filter='alpha(opacity='+(o*100)+')';
		c.style.height=h+(d*f)+'px';

	 	if(f*1==-1 && (o*100)*1<5){
		c.style.opacity=0;
		c.style.filter='alpha(opacity='+(0)+')';
		c.style.height=0+'px';
		clearInterval(c.t);
		}
		
	}
	
	
	
	return{dd:dd}
}();
