			shrinkDiv = function(obj, newHeight, id) {
 			 var currentHeight = +obj.style.height.replace('px','');
  				obj.style.height = ((currentHeight - newHeight) >> 1) + newHeight + 'px';

				if (currentHeight > newHeight) {
    				shrinkTimeout = setTimeout(function(o, nh, id) { return function() { shrinkDiv(o, nh, id); } }(obj, newHeight, id),30);
				}
				//Hax pax
				else if (navigator.appName != "Microsoft Internet Explorer") {
					
					var mainDiv = document.getElementById('articleDiv'+id);
					if (mainDiv.offsetHeight > divMaxHeight) {
						mainDiv.style.height = divMaxHeight+'px';
						mainDiv.style.overflowY = 'scroll';
					
					}
				
				}
			}
			
			
			expandDiv = function(obj, newHeight, id, maxHeight) {
 				var currentHeight = +obj.style.height.replace('px','');
				var childHeight = newHeight - currentHeight;
				
				obj.style.height = Math.ceil(currentHeight + (childHeight / 2)) + 'px';
  				
				if (currentHeight < newHeight && currentHeight < (maxHeight-2)) {
    				expandTimeout = setTimeout(function(o, nh, id, mh) { return function() { expandDiv(o, nh, id, mh); } }(obj, newHeight, id, maxHeight),30);
				}
				
				else {
					hideDivs(id);
				}
				
			}

			
			function toggleArticles(obj, id) {
				
				divMaxHeight = 160;
			
				var mainDiv = document.getElementById('articleDiv'+id);
				var divOverflow = document.getElementById('overflow'+id);
				var wrapper = document.getElementById('articleWrapper'+id);
				
				var priceSpan = document.getElementById('priceSpan'+id);
				
				var buttonHeight = obj.offsetHeight; //style.height.replace(/[^0-9]/g,'');
			
				if (mainDiv.style.display != 'block') {
				
					if (typeof(window['expandTimeout']) != "undefined") clearTimeout(expandTimeout);
				
					priceSpan.style.visibility = 'hidden';
					obj.style.backgroundPosition = '0px -'+buttonHeight+'px';
				
					mainDiv.style.display = 'block';
					wrapper.style.visibility = 'visible';
					var wrapperHeight = wrapper.style.height.replace(/[^0-9]/g,'');
					var newHeight = +wrapperHeight - mainDiv.offsetHeight;
					
					if (newHeight < 0) {
						newHeight = 0;
					}
					
					//Hax pax				
					if (mainDiv.offsetHeight > divMaxHeight && navigator.appName == "Microsoft Internet Explorer") {
						mainDiv.style.height = divMaxHeight+'px';
						mainDiv.style.overflowY = 'scroll';
					}
					
					
					shrinkDiv(divOverflow, newHeight, id);
					//shrinkDiv(divOverflow, newHeight);
					//divOverflow.style.height = newHeight+'px';
				}
				
				else {
				
					if (typeof(window['shrinkTimeout']) != "undefined") clearTimeout(shrinkTimeout);
				
					var wrapperHeight = wrapper.style.height.replace(/[^0-9]/g,'');
					var newHeight = +wrapperHeight + mainDiv.offsetHeight;
					
					mainDiv.style.overflowY = 'hidden';
										
					priceSpan.style.visibility = 'visible';
					obj.style.backgroundPosition = '0px 0px';
					
					expandDiv(divOverflow, wrapper.offsetHeight, id, divMaxHeight);
					//divOverflow.style.height = wrapper.offsetHeight+'px'; //newHeight+'px';
					
					//mainDiv.style.display = 'none';
					//wrapper.style.visibility = 'hidden';
					
					
				}
			}
			
			function hideDivs(id) {
				
				var mainDiv = document.getElementById('articleDiv'+id);
				var wrapper = document.getElementById('articleWrapper'+id);

				mainDiv.style.display = 'none';
				wrapper.style.visibility = 'hidden';
			}
