<?xml version="1.0" encoding="UTF-8"
				$GLOBALS['SQ_SYSTEM']->pm->startTimer($this, 'Initialising Design Area "'.addslashes('body').' #11299"');
			
				$GLOBALS['SQ_SYSTEM']->pm->stopTimer($this, 'Initialising Design Area "'.addslashes('body').' #11299"');
			
				$GLOBALS['SQ_SYSTEM']->pm->startTimer($this, 'Painting Design Area "'.addslashes('body').' #11299"');
			
		$body = '';
		if (SQ_IN_LIMBO) {

			// Print the Simple Edit Interface
			$ASSET->printLimbo();

		} else if ((array_get_index($_GET, 'SQ_ACTION') == 'diff') && ($ASSET->status & SQ_SC_STATUS_SAFE_EDITING) && $ASSET->writeAccess('')) {

			// Show the diff between system version and edited version

			// Get the live contents of the asset being displayed
			ob_start();
				$ASSET->printBodyWithPaintLayout();
				$edited_contents = ob_get_contents();
			ob_end_clean();

			// Set the force-system-version flag
			$GLOBALS['SQ_SYSTEM']->setGlobalDefine('force_system_version', TRUE);

				// Reload all assets that were used during the previous printbody,
				// so they know they have to use the system version
				$used_asset_ids = array_unique($GLOBALS['SQ_SYSTEM']->am->_get_asset_history);
				foreach ($used_asset_ids as $used_asset_id) {
					$used_asset = $GLOBALS['SQ_SYSTEM']->am->getAsset($used_asset_id);
					if($used_asset)
						$used_asset->reload();
				}
				$ASSET->reload();

				// Get the safe edit contents of the asset being displayed
				ob_start();
					$ASSET->printBodyWithPaintLayout();
					$system_version_contents = ob_get_contents();
				ob_end_clean();

			// Unset the force-system-version flag
			$GLOBALS['SQ_SYSTEM']->setGlobalDefine('force_system_version', FALSE);

			// Reload all assets that were used during the printbody,
			// so they no longer think they have to use the system version
			$used_asset_ids = array_unique($GLOBALS['SQ_SYSTEM']->am->_get_asset_history);
			foreach ($used_asset_ids as $used_asset_id) {
				$used_asset = $GLOBALS['SQ_SYSTEM']->am->getAsset($used_asset_id);
				if($used_asset)
					$used_asset->reload();
			}
			$ASSET->reload();

			// Show the differences
			$highlighter = new Matrix_Diff_Highlighter();
			echo $highlighter->process($system_version_contents, $edited_contents);

		} else {

			// Print the body as normal
			if ($ASSET->_is_cacheable) {
				$cm = $GLOBALS['SQ_SYSTEM']->am->getSystemAsset('cache_manager');
				$body = $cm->loadFromCache($ASSET->id, $ASSET->type());
			}

			// If cache MISS, or not cacheable at all
			if (!$ASSET->_is_cacheable || ($body === FALSE)) {
				ob_start();
					$ASSET->printBodyWithPaintLayout();
					$body = ob_get_contents();
				ob_end_clean();
			}

						echo $body;

		}//end else print normally
		
				$GLOBALS['SQ_SYSTEM']->pm->stopTimer($this, 'Painting Design Area "'.addslashes('body').' #11299"');
			?>