
function products_category(aa,bb,cc,dd){
	if(dd.className==cc){
		var obj=document.getElementById(aa.id + "_b_" + bb);
		obj=obj.parentNode;
		if(obj!=null||obj!=undefined){
			obj.style.display="block";
		}
		var newMode = new mode_sliod;
		newMode.aa = aa;
		newMode.bb = bb;
		newMode.cc = cc;
		newMode.changeMenu();
	}
	else{
		dd.className=cc;
		var obj=document.getElementById(aa.id + "_b_" + bb);
		obj=obj.parentNode;
		if(obj!=null||obj!=undefined){
			obj.style.display="none";
		}
	}
}



mode_sliod = function (){
	this.aa = null;
	this.bb = null;
	this.cc = null;
	this.pause = false;
	
	this.changeMenu = function(){
		if(!this.pause){
			var _dd = 0;
			for(i=0;i<this.aa.childNodes.length;i++){
				if(this.aa.childNodes[i]){
					if(i==this.bb){
						var obj=document.getElementById(this.aa.id + "_a_" + i);
						if(obj){
							obj.className=this.cc+"_on";
							_dd++;
						}
						var obj=document.getElementById(this.aa.id + "_b_" + i);
						if(obj){
							obj.style.display="block";
						}
					}
					else{
						var obj=document.getElementById(this.aa.id + "_a_" + i);
						if(obj){
							obj.className=this.cc;
							_dd++;
						}
						var obj=document.getElementById(this.aa.id + "_b_" + i);
						if(obj){
							obj.style.display="none";
						}
					}
				}
			}
			//debugger;
		
			if(this.bb == _dd - 1){
				this.bb = 0;
			}
			else{
				this.bb++;
			}
		}
	}
}