	var obj = null;
	var obj2 = null;
	var timers = null;
	var speed = null;
	var wrapperWidth = 923;
	var o2l = 0;
	var o2w = 0;

	function f_filterResults(n_win, n_docel, n_body) {
		var n_result = n_win ? n_win : 0;
		if (n_docel && (!n_result || (n_result > n_docel)))
			n_result = n_docel;
		return n_body && (!n_result || (n_result > n_body)) ? n_body : n_result;
	}
	function expand(elem,cl,nl,cw,nw) {
		obj = elem;
		speed = 10;
		if ( obj2 ) {
			obj2.style.zIndex = 0;
			obj2.style.left = o2l+'px';
			obj2.style.width = o2w+'px';
			obj2.style.backgroundPosition = (-o2l)+'px 0px';
		}
		obj.style.zIndex = 99;
		obj.style.left = cl+'px';
		obj.style.width = cw+'px';
		timers = [setTimeout('moveAndResize('+nl+','+nw+',99)',20)];
	}
        function collapse(elem,nl,nw) {
		obj2 = elem;
		o2l = nl;
		o2w = nw;
        	for (i=0;i<timers.length;i++) {
			clearTimeout(timers[i]);
		}
		timers = [setTimeout('moveAndResize('+nl+','+nw+',0)',20)];
	}
	function moveAndResize(newLeft,newWidth,zi) {
        	var curLeft = parseInt(obj.style.left);
		var curWidth = parseInt(obj.style.width);
		if (curLeft < newLeft) {
			tempLeft = curLeft+speed;
			if (tempLeft >= newLeft) {
				obj.style.left = newLeft+'px';
				obj.style.backgroundPosition = (-newLeft) + 'px 0px';
			} else {
				obj.style.left = tempLeft+'px';
				obj.style.backgroundPosition = (-tempLeft) + 'px 0px';
			}
		} else if (curLeft > newLeft) {
			tempLeft = curLeft-speed;
			if (tempLeft <= newLeft) {
				obj.style.left = newLeft+'px';
				obj.style.backgroundPosition = (-newLeft) + 'px 0px';
			} else {
				obj.style.left = tempLeft+'px';
				obj.style.backgroundPosition = (-tempLeft) + 'px 0px';
			}
		}
		if (curWidth < newWidth) {
			tempWidth = curWidth+speed;		
			if (curLeft != newLeft && (curLeft+curWidth) < wrapperWidth) tempWidth = curWidth+(speed*2);
			if (tempWidth+curLeft >= wrapperWidth) tempWidth = wrapperWidth-curLeft+speed;
			if (tempWidth >= newWidth) {
				obj.style.width = newWidth+'px';
				obj.style.zIndex= zi;
			} else {
				obj.style.width = tempWidth+'px';
				speed++;
				timers[0] = setTimeout('moveAndResize('+newLeft+','+newWidth+','+zi+')',20);
			}
		} else if (curWidth > newWidth) {
			tempWidth = curWidth-speed;
			if (curLeft != newLeft && (curLeft+curWidth) > (newLeft+newWidth)) tempWidth = curWidth-(speed*2);
			if ((tempWidth+curLeft) < (newLeft+newWidth)) tempWidth = (newLeft+newWidth)-curLeft-speed;
			
			if (tempWidth < newWidth) {
				obj.style.width = newWidth+'px';
				obj.style.zIndex= zi;
			} else {
				obj.style.width = tempWidth+'px';
				speed++;
				timers[0] = setTimeout('moveAndResize('+newLeft+','+newWidth+','+zi+')',20);
			}
		}
	}

