//var dxForum={};

function gID(i){return document.getElementById(i)}
function gName(e,p){return p.getElementsByTagName(e)}

/*TINY.*/
accordion=function(){

	function slider(n)
	{
	this.nody=n; 
	this.h=[]; 
	this.c=[]
	}
	
	slider.prototype.init=function(classToSlide,element,m,o,k)
	{
		var ulToslide=gID(classToSlide), i=x=0; 
		this.s=k||'', w=[], nody=ulToslide.childNodes, lenght=nody.length; 
		this.m=m||false;
		for(i;i<lenght;i++)
		{   
		    if(nody[i].nodeType!=3)
		    {
		    w[x]=nody[i]; 
		    x++
		    }
		} 
		this.lenght=x;
		
		for(i=0;i<this.lenght;i++)
		{
			var v=w[i]; 
			this.h[i]=h=gName(element,v)[0]; 
			this.c[i]=c=gName('div',v)[0]; 
			if (h!=null)
			{
			    h.onclick=new Function(this.nody+'.pr(false,this)');
			    if(o==i)
			    {
			        h.className=this.s; 
			        c.style.height='auto'; 
			        c.d=1
			    }
			    else
			    {
			        c.style.height=0; 
			        c.d=-1
			    }
			}
		}
	};	
	
	slider.prototype.pr=function(f,d){
		for(var i=0;i<this.lenght;i++){
			var h=this.h[i], c=this.c[i], k=c.style.height; k=k=='auto'?1:parseInt(k); clearInterval(c.classToSlide);
			if((k!=1&&c.d==-1)&&(f==1||h==d)){
				c.style.height=''; c.m=c.offsetHeight; c.style.height=k+'px'; c.d=1; h.className=this.s; su(c,1)
			}else if(k>0&&(f==-1||this.m||h==d)){
				c.d=-1; h.className=''; su(c,-1)
			}
		}
	};
	function su(c){c.classToSlide=setInterval(function(){sl(c)},20)};
	function sl(c){
		var h=c.offsetHeight, d=c.d==1?c.m-h:h; c.style.height=h+(Math.ceil(d/1.5)*c.d)+'px';
		c.style.opacity=h/c.m; c.style.filter='alpha(opacity='+h*100/c.m+')';
		if((c.d==1&&h>=c.m)||(c.d!=1&&h==1)){if(c.d==1){c.style.height='auto'} clearInterval(c.classToSlide)}
	
	};
	return{slider:slider}
}();

function SetID(id,cont)
{
var control = gID(cont)
control.value = id;
}