	var clickedBox = 0;
	var initBox = 0;
	var validRows;
	function init(box) {
		if(box > 0) {
			initBox = box;
			setTimeout('getContent(initBox)',1000);	
		}
		validRows = $$('div.ecosolution_box_extra');				
	}


	function getContent(box) {
		clickedBox = box;
		new Ajax.Request('/include/ecosolution/box' + box + '.html', {
			onSuccess: function(transport) {
				if(clickedBox == box) {
					var currentRow = Math.ceil(box/4);
					var currentRowId = 'ecosolution_box_extra_row_'+currentRow;
					var currentRowDiv = $(currentRowId);
					
					if(typeof(validRows) != 'undefined') {
						for(var i=0; i < validRows.length; i++) {
							if(validRows[i].id == currentRowId) {
								if(validRows[i].style.display == 'none') {
									currentRowDiv.update(transport.responseText);
									new Effect.Parallel(
										[ new Effect.Opacity(currentRowId, { duration:10, from: 0, to:1 }),
										  new Effect.BlindDown(currentRowId, { duration: 2.5})]
									);
								} else {
									new Effect.Opacity(currentRowId, {
										duration:0.5, 
										from:1.0, 
										to:0.2,
										afterFinish: function(effect) { 
											currentRowDiv.update(transport.responseText);
											new Effect.Opacity(currentRowId, {duration:0.5, to:1.0});
										} 
			
									});
								}

							} else {
								if(validRows[i].style.display != 'none') {
									closeContentById(validRows[i].id);
								}
							}
						}
					}

				}
					
			}
		});
	
	}
	
	function closeContent(box) {
		var row = Math.ceil(box/4);
		var row_id = 'ecosolution_box_extra_row_'+row;

		closeContentById(row_id);
	}

	function closeContentById(row_id) {
		new Effect.Parallel(
			[ new Effect.Opacity(row_id, { duration: 10, from: 1.0, to: 0 }),
			new Effect.BlindUp(row_id, { duration: 2.5 })]
		);
	
	}

