public static function addFooterMediaElement($footerCount, $src, PHPWord_Section_MemoryImage $memoryImage = null) {
		$mediaId = md5($src);
		$key = 'footer'.$footerCount;
		
		if(!array_key_exists($key, self::$_footerMedia)) {
			self::$_footerMedia[$key] = array();
		}
		
		if(!array_key_exists($mediaId, self::$_footerMedia[$key])) {
			$cImg = self::countFooterMediaElements($key);
			$rID = $cImg + 1;
			
			$cImg++;
			$inf = pathinfo($src);
			$isMemImage = (substr(strtolower($inf['extension']), 0, 3) == 'php') ? true : false;
			
			$media = array();
			if($isMemImage) {
				$ext = $memoryImage->getImageExtension();
				$media['isMemImage'] = true;
				$media['createfunction'] = $memoryImage->getImageCreateFunction();
				$media['imagefunction'] = $memoryImage->getImageFunction();
			} else {
				$ext = $inf['extension'];
				if($ext == 'jpeg') { // Office crashes when adding a jpEg Image, so rename to jpg
					$ext = 'jpg';
				}
			}
			$file = 'image'.$cImg.'.'.strtolower($ext);
			
			$media['source'] = $src;
			$media['target'] = 'media/'.$key.'_'.$file;
			$media['type'] = 'image';
			$media['rID'] = $rID;
			
			self::$_footerMedia[$key][$mediaId] = $media;
			
			return $rID;
		} else {
			return self::$_footerMedia[$key][$mediaId]['rID'];
		}
	}