{
				$specifications =  Agreement::fetch_specifications($client_id,$agreement_id);
				while($row = $specifications->fetch_assoc())
				{
					if(!isset($specifications_arr[$row['specification_num']])) $specifications_arr[$row['specification_num']]= array();
					array_push($specifications_arr[$row['specification_num']],$row);
				
				}
			}
			else if($_GET['open'] == 'empty')
			{
				$specifications_arr = array();
			}
			else if($_GET['open'] == 'specification')
			{
			    $specification =  Agreement::fetch_specification($client_id,$agreement_id,(int)$_GET['specification_num']);
				while($row = $specification->fetch_assoc())
				{
					$specifications_arr[$row['specification_num']][] = $row;				
				}

			}
			
			/* 
			echo '<pre>';
            print_r($specifications_arr);
			echo '</pre>';
			*/
			
			$specifications = '';