Index: tests/t3lib/t3lib_pagerenderer_testcase.php
===================================================================
--- tests/t3lib/t3lib_pagerenderer_testcase.php	(Revision 5952)
+++ tests/t3lib/t3lib_pagerenderer_testcase.php	(Arbeitskopie)
@@ -24,7 +24,7 @@
 
 
 /**
- * Testcase for the t3lib_pageIncludes class in the TYPO3 core.
+ * Testcase for the t3lib_PageRenderer class in the TYPO3 core.
  *
  * @package TYPO3
  * @subpackage t3lib
@@ -33,21 +33,12 @@
  */
 class t3lib_PageRenderer_testcase extends tx_phpunit_testcase {
 	/**
-	 * @var t3lib_pageIncludes
+	 * @var t3lib_PageRenderer
 	 */
 	private $fixture;
 
-	const PART_COMPLETE = 0;
-	const PART_HEADER = 1;
-	const PART_FOOTER = 2;
-
 	public function setUp() {
-		$className = 't3lib_PageRenderer_' . uniqid('test');
-		eval('
-			class ' . $className . ' extends t3lib_PageRenderer {
-			}
-		');
-		$this->fixture = new $className();
+		$this->fixture = new t3lib_PageRenderer();
 	}
 
 	public function tearDown() {
@@ -216,7 +207,7 @@
 		
 		$expectedReturnValue = '<tag method="private" name="test" />';
 		$this->fixture->addFooterData('<tag method="private" name="test" />');
-		$out = $this->fixture->render(self::PART_FOOTER);
+		$out = $this->fixture->render(t3lib_PageRenderer::PART_FOOTER);
 
 		$this->assertContains(
 			$expectedReturnValue,
@@ -249,7 +240,7 @@
 		
 		$expectedReturnValue = '<script src="fileadmin/test.js" type="text/javascript"></script>';
 		$this->fixture->addJsFooterLibrary('test', 'fileadmin/test.js');
-		$out = $this->fixture->render(self::PART_FOOTER);
+		$out = $this->fixture->render(t3lib_PageRenderer::PART_FOOTER);
 
 		$this->assertContains(
 			$expectedReturnValue,
@@ -281,7 +272,7 @@
 		
 		$expectedReturnValue = '<script src="fileadmin/test.js" type="text/javascript"></script>';
 		$this->fixture->addJsFooterFile('fileadmin/test.js');
-		$out = $this->fixture->render(self::PART_FOOTER);
+		$out = $this->fixture->render(t3lib_PageRenderer::PART_FOOTER);
 
 		$this->assertContains(
 			$expectedReturnValue,
@@ -313,7 +304,7 @@
 		
 		$expectedReturnValue = 'var x = "testvar"';
 		$this->fixture->addJsFooterInlineCode('test', 'var x = "testvar"');
-		$out = $this->fixture->render(self::PART_FOOTER);
+		$out = $this->fixture->render(t3lib_PageRenderer::PART_FOOTER);
 
 		$this->assertContains(
 			$expectedReturnValue,
@@ -502,7 +493,7 @@
 		$this->fixture->loadExtJS();
 		$this->fixture->addInlineLanguageLabel('myKey', 'myValue');
 		$out = $this->fixture->enableMoveJsFromHeaderToFooter();
-		$out = $this->fixture->render(self::PART_FOOTER);
+		$out = $this->fixture->render(t3lib_PageRenderer::PART_FOOTER);
 
 		$this->assertContains(
 			$expectedReturnValue,
@@ -520,7 +511,7 @@
 		$this->fixture->loadExtJS();
 		$this->fixture->addInlineLanguageLabelArray(array('myKey1' => 'myValue1', 'myKey2' => 'myValue2',));
 		$out = $this->fixture->enableMoveJsFromHeaderToFooter();
-		$out = $this->fixture->render(self::PART_FOOTER);
+		$out = $this->fixture->render(t3lib_PageRenderer::PART_FOOTER);
 
 		$this->assertContains(
 			$expectedReturnValue,
@@ -539,7 +530,7 @@
 		$this->fixture->addInlineLanguageLabelArray(array('myKey1' => 'myValue1',));
 		$this->fixture->addInlineLanguageLabelArray(array('myKey2' => 'myValue2',));
 		$out = $this->fixture->enableMoveJsFromHeaderToFooter();
-		$out = $this->fixture->render(self::PART_FOOTER);
+		$out = $this->fixture->render(t3lib_PageRenderer::PART_FOOTER);
 
 		$this->assertContains(
 			$expectedReturnValue,
@@ -557,7 +548,7 @@
 		$this->fixture->loadExtJS();
 		$this->fixture->addInlineSetting('myApp', 'myKey', 'myValue');
 		$out = $this->fixture->enableMoveJsFromHeaderToFooter();
-		$out = $this->fixture->render(self::PART_FOOTER);
+		$out = $this->fixture->render(t3lib_PageRenderer::PART_FOOTER);
 
 		$this->assertContains(
 			$expectedReturnValue,
@@ -575,7 +566,7 @@
 		$this->fixture->loadExtJS();
 		$this->fixture->addInlineSettingArray('myApp', array('myKey1' => 'myValue1', 'myKey2' => 'myValue2',));
 		$out = $this->fixture->enableMoveJsFromHeaderToFooter();
-		$out = $this->fixture->render(self::PART_FOOTER);
+		$out = $this->fixture->render(t3lib_PageRenderer::PART_FOOTER);
 
 		$this->assertContains(
 			$expectedReturnValue,
@@ -594,7 +585,7 @@
 		$this->fixture->addInlineSettingArray('myApp', array('myKey1' => 'myValue1',));
 		$this->fixture->addInlineSettingArray('myApp', array('myKey2' => 'myValue2',));
 		$out = $this->fixture->enableMoveJsFromHeaderToFooter();
-		$out = $this->fixture->render(self::PART_FOOTER);
+		$out = $this->fixture->render(t3lib_PageRenderer::PART_FOOTER);
 
 		$this->assertContains(
 			$expectedReturnValue,
Index: t3lib/class.t3lib_tceforms.php
===================================================================
--- t3lib/class.t3lib_tceforms.php	(Revision 5952)
+++ t3lib/class.t3lib_tceforms.php	(Arbeitskopie)
@@ -5244,8 +5244,10 @@
 				$this->loadJavascriptLib('md5.js');
 			}
 
-			$GLOBALS['SOBE']->doc->loadPrototype();
-			$GLOBALS['SOBE']->doc->loadExtJS();
+			/** @var $pageRenderer t3lib_PageRenderer */
+			$pageRenderer = $GLOBALS['SOBE']->doc->getPageRenderer();
+			$pageRenderer->loadPrototype();
+			$pageRenderer->loadExtJS();
 
 				// make textareas resizable and flexible
 			if (!($GLOBALS['BE_USER']->uc['resizeTextareas'] == '0' && $GLOBALS['BE_USER']->uc['resizeTextareas_Flexible'] == '0')) {
@@ -5257,7 +5259,7 @@
 				'textareaFlexible' => (!$GLOBALS['BE_USER']->uc['resizeTextareas_Flexible'] == '0'),
 				'textareaResize' => (!$GLOBALS['BE_USER']->uc['resizeTextareas'] == '0'),
 			);
-			$GLOBALS['SOBE']->doc->addInlineSettingArray('', $resizableSettings);
+			$pageRenderer->addInlineSettingArray('', $resizableSettings);
 
 			$this->loadJavascriptLib('../t3lib/jsfunc.evalfield.js');
 
@@ -5270,7 +5272,7 @@
 				'dateFormat'       => array('j-n-Y', 'G:i j-n-Y'),
 				'dateFormatUS'     => array('n-j-Y', 'G:i n-j-Y'),
 			);
-			$GLOBALS['SOBE']->doc->addInlineSettingArray('', $typo3Settings);
+			$pageRenderer->addInlineSettingArray('', $typo3Settings);
 
 			$this->loadJavascriptLib('../t3lib/js/extjs/tceforms.js');
 
@@ -5286,7 +5288,7 @@
 
 				// if Suggest fields were processed, add the JS functions
 			if ($this->suggest->suggestCount > 0) {
-				$GLOBALS['SOBE']->doc->loadScriptaculous();
+				$pageRenderer->loadScriptaculous();
 				$this->loadJavascriptLib('../t3lib/js/jsfunc.tceforms_suggest.js');
 			}
 
Index: t3lib/class.t3lib_pagerenderer.php
===================================================================
--- t3lib/class.t3lib_pagerenderer.php	(Revision 5952)
+++ t3lib/class.t3lib_pagerenderer.php	(Arbeitskopie)
@@ -34,7 +34,7 @@
  * @subpackage t3lib
  * $Id$
  */
-abstract class t3lib_PageRenderer implements t3lib_Singleton {
+class t3lib_PageRenderer implements t3lib_Singleton {
 	
 	protected $compressJavascript = FALSE;
 	protected $compressCss = FALSE;
Index: typo3/class.browse_links.php
===================================================================
--- typo3/class.browse_links.php	(Revision 5952)
+++ typo3/class.browse_links.php	(Arbeitskopie)
@@ -772,7 +772,7 @@
 		$this->doc = t3lib_div::makeInstance('template');
 		$this->doc->backPath = $GLOBALS['BACK_PATH'];
 			// Load the Prototype library and browse_links.js
-		$this->doc->loadPrototype();
+		$this->doc->getPageRenderer()->loadPrototype();
 		$this->doc->loadJavascriptLib('js/browse_links.js');
 
 			// init hook objects:
Index: typo3/file_list.php
===================================================================
--- typo3/file_list.php	(Revision 5952)
+++ typo3/file_list.php	(Arbeitskopie)
@@ -165,7 +165,7 @@
 		$this->doc = t3lib_div::makeInstance('template');
 		$this->doc->backPath = $BACK_PATH;
 		$this->doc->setModuleTemplate('templates/file_list.html');
-		$this->doc->loadPrototype();
+		$this->doc->getPageRenderer()->loadPrototype();
 
 			// Validating the input "id" (the path, directory!) and checking it against the mounts of the user.
 		$this->id = $this->basicFF->is_directory($this->id);
Index: typo3/template.php
===================================================================
--- typo3/template.php	(Revision 5952)
+++ typo3/template.php	(Arbeitskopie)
@@ -156,7 +156,7 @@
  * @package TYPO3
  * @subpackage core
  */
-class template extends t3lib_PageRenderer {
+class template {
 
 		// Vars you typically might want to/should set from outside after making instance of this class:
 	var $backPath = '';				// 'backPath' pointing back to the PATH_typo3
@@ -209,11 +209,13 @@
 
 	var $hasDocheader = true;
 
-    	// class for render the header / footer
+	/**
+	 * @var t3lib_PageRenderer
+	 */
+	protected $pageRenderer;
+	protected $pageHeaderFooterTemplateFile = '';	// alternative template file
 
-    var $pageHeaderFooterTemplateFile = '';	// alternative template file
 
-
 	/**
 	 * Constructor
 	 * Imports relevant parts from global $TBE_STYLES (colorscheme)
@@ -222,8 +224,10 @@
 	 */
 	function template()	{
 		global $TBE_STYLES;
-		parent::__construct(TYPO3_mainDir . 'templates/template_page_backend.html');
 
+			// Initializes the page rendering object:
+		$this->getPageRenderer();
+
 			// Setting default scriptID:
 		if (($temp_M = (string) t3lib_div::_GET('M')) && $GLOBALS['TBE_MODULES']['_PATHS'][$temp_M]) {
 			$this->scriptID = preg_replace('/^.*\/(sysext|ext)\//', 'ext/', $GLOBALS['TBE_MODULES']['_PATHS'][$temp_M] . 'index.php');
@@ -264,6 +268,20 @@
 	}
 
 
+	/**
+	 * Gets instance of PageRenderer
+	 * 
+	 * @return	t3lib_PageRenderer
+	 */
+	public function getPageRenderer() {
+		if (!isset($this->pageRenderer)) {
+			$this->pageRenderer = t3lib_div::makeInstance('t3lib_PageRenderer');
+			$this->pageRenderer->setTemplateFile(
+				TYPO3_mainDir . 'templates/template_page_backend.html'
+			);
+		}
+		return $this->pageRenderer;
+	}
 
 
 
@@ -277,7 +295,6 @@
 
 
 
-
 	/*****************************************
 	 *
 	 * EVALUATION FUNCTIONS
@@ -623,11 +640,13 @@
 			}
 		}
 
+		$this->pageRenderer->backPath = $this->backPath;
+
 			// alternative template for Header and Footer
 		if ($this->pageHeaderFooterTemplateFile) {
 			$file =  t3lib_div::getFileAbsFileName($this->pageHeaderFooterTemplateFile, TRUE);
 			if ($file) {
-				$this->setAlternativeTemplateFile($file);
+				$this->pageRenderer->setTemplateFile($file);
 			}
 		}
 			// For debugging: If this outputs "QuirksMode"/"BackCompat" (IE) the browser runs in quirks-mode. Otherwise the value is "CSS1Compat"
@@ -638,7 +657,7 @@
 		header ('Content-Type:text/html;charset='.$this->charset);
 
 			// Standard HTML tag
-		$this->setHtmlTag('<html xmlns="http://www.w3.org/1999/xhtml">');
+		$this->pageRenderer->setHtmlTag('<html xmlns="http://www.w3.org/1999/xhtml">');
 
 		switch($this->docType)	{
 			case 'html_3':
@@ -693,41 +712,41 @@
 			}
 		}
 
-		$this->setXmlPrologAndDocType($headerStart);
-		$this->setHeadTag('<head>' . chr(10). '<!-- TYPO3 Script ID: '.htmlspecialchars($this->scriptID).' -->');
-		$this->setCharSet($this->charset);	
-		$this->addMetaTag($this->generator());	
-		$this->setTitle($title);
+		$this->pageRenderer->setXmlPrologAndDocType($headerStart);
+		$this->pageRenderer->setHeadTag('<head>' . chr(10). '<!-- TYPO3 Script ID: '.htmlspecialchars($this->scriptID).' -->');
+		$this->pageRenderer->setCharSet($this->charset);
+		$this->pageRenderer->addMetaTag($this->generator());
+		$this->pageRenderer->setTitle($title);
 		
 		// add docstyles
 		$this->docStyle();
 
 
 		// add jsCode - has to go to headerData as it may contain the script tags already
-		$this->addHeaderData($this->JScode);
+		$this->pageRenderer->addHeaderData($this->JScode);
 		
 		foreach ($this->JScodeArray as $name => $code) {
-			$this->addJsInlineCode($name, $code);	
+			$this->pageRenderer->addJsInlineCode($name, $code);	
 		}
 
 		if (count($this->JScodeLibArray)) {
 			foreach($this->JScodeLibArray as $library) {
-				$this->addHeaderData($library);
+				$this->pageRenderer->addHeaderData($library);
 			}
 		}
 
 		if ($this->extJScode) {
-			$this->addJsHandlerCode($this->extJScode, t3lib_pageIncludes::JSHANDLER_EXTONREADY);
+			$this->pageRenderer->addExtOnReadyCode($this->extJScode);
 		}
 
 			// Construct page header.
-		$str = $this->render(1);
+		$str = $this->pageRenderer->render(t3lib_PageRenderer::PART_HEADER);
 
 		$this->JScodeLibArray = array();
 		$this->JScode = $this->extJScode = '';
 		$this->JScodeArray = array();
 
-		$this->endOfPageJsBlock = $this->render(2);
+		$this->endOfPageJsBlock = $this->pageRenderer->render(t3lib_PageRenderer::PART_FOOTER);
 		
 		if ($this->docType=='xhtml_frames')	{
 			return $str;
@@ -968,15 +987,15 @@
 		$inDocStyles = implode(chr(10), $this->inDocStylesArray);
 
 		if ($this->styleSheetFile) {
-		   $this->addCssFile($this->backPath . $this->styleSheetFile);					
+			$this->pageRenderer->addCssFile($this->backPath . $this->styleSheetFile);
 		}
 		if ($this->styleSheetFile2) {
-			$this->addCssFile($this->backPath . $this->styleSheetFile2);					
+			$this->pageRenderer->addCssFile($this->backPath . $this->styleSheetFile2);
 		}
 
-		$this->addCssInlineBlock('inDocStyles', $inDocStyles . chr(10) . '/*###POSTCSSMARKER###*/');
+		$this->pageRenderer->addCssInlineBlock('inDocStyles', $inDocStyles . chr(10) . '/*###POSTCSSMARKER###*/');
 		if ($this->styleSheetFile_post) {
-			$this->addCssFile($this->backPath . $this->styleSheetFile_post);
+			$this->pageRenderer->addCssFile($this->backPath . $this->styleSheetFile_post);
 	}
 
 	}
@@ -991,7 +1010,7 @@
 	 * @return	void
 	 */
 	function addStyleSheet($key, $href, $title='', $relation='stylesheet') {
-		$this->addCssFile($this->backPath . $href, $relation, $title);
+		$this->pageRenderer->addCssFile($this->backPath . $href, $relation, $title);
 		}
 
 	/**
@@ -1318,8 +1337,8 @@
 	 * @return	void
 	 */
 	function loadJavascriptLib($lib)	{
-		$this->addJsFile($this->backPath . $lib);
-		}
+		$this->pageRenderer->addJsFile($this->backPath . $lib);
+	}
 
 
 
@@ -1330,7 +1349,7 @@
 	 *			Please just call this function without expecting a return value for future calls
 	 */
 	function getContextMenuCode()   {
-	       $this->loadPrototype();
+	       $this->pageRenderer->loadPrototype();
 	       $this->loadJavascriptLib('js/clickmenu.js');
 
 	       $this->JScodeArray['clickmenu'] = '
@@ -1349,7 +1368,7 @@
 	 * @return	array		If values are present: [0] = A <script> section for the HTML page header, [1] = onmousemove/onload handler for HTML tag or alike, [2] = One empty <div> layer for the follow-mouse drag element
 	 */
 	function getDragDropCode($table)	{
-		$this->loadPrototype();
+		$this->pageRenderer->loadPrototype();
 		$this->loadJavascriptLib('js/common.js');
 		$this->loadJavascriptLib('js/tree.js');
 
@@ -1893,7 +1912,7 @@
 	 */
 	function setModuleTemplate($filename) {
 			// Load Prototype lib for IE event
-		$this->loadPrototype();
+		$this->pageRenderer->loadPrototype();
 		$this->loadJavascriptLib('js/iecompatibility.js');
 		$this->moduleTemplate = $this->getHtmlTemplate($filename);
 	}
Index: typo3/backend.php
===================================================================
--- typo3/backend.php	(Revision 5952)
+++ typo3/backend.php	(Arbeitskopie)
@@ -204,9 +204,9 @@
 		/******************************************************
 		 * now put the complete backend document together
 		 ******************************************************/
-
-		$GLOBALS['TBE_TEMPLATE']->loadScriptaculous('builder,effects,controls,dragdrop');
-		$GLOBALS['TBE_TEMPLATE']->loadExtJS();
+		$pageRenderer = $GLOBALS['TBE_TEMPLATE']->getPageRenderer();
+		$pageRenderer->loadScriptaculous('builder,effects,controls,dragdrop');
+		$pageRenderer->loadExtJS();
 		
 			// remove duplicate entries
 		$this->jsFiles = array_unique($this->jsFiles);
Index: typo3/alt_db_navframe.php
===================================================================
--- typo3/alt_db_navframe.php	(Revision 5952)
+++ typo3/alt_db_navframe.php	(Arbeitskopie)
@@ -157,7 +157,7 @@
 			// Adding javascript code for AJAX (prototype), drag&drop and the pagetree as well as the click menu code
 		$this->doc->getDragDropCode('pages');
 		$this->doc->getContextMenuCode();
-		$this->doc->loadScriptaculous('effects');
+		$this->doc->getPageRenderer()->loadScriptaculous('effects');
 
 		$this->doc->JScode .= $this->doc->wrapScriptTags(
 		($this->currentSubScript?'top.currentSubScript=unescape("'.rawurlencode($this->currentSubScript).'");':'').'
Index: typo3/alt_doc.php
===================================================================
--- typo3/alt_doc.php	(Revision 5952)
+++ typo3/alt_doc.php	(Arbeitskopie)
@@ -446,7 +446,7 @@
 		$this->doc->setModuleTemplate('templates/alt_doc.html');
 		$this->doc->form = '<form action="'.htmlspecialchars($this->R_URI).'" method="post" enctype="'.$GLOBALS['TYPO3_CONF_VARS']['SYS']['form_enctype'].'" name="editform" onsubmit="document.editform._scrollPosition.value=(document.documentElement.scrollTop || document.body.scrollTop); return TBE_EDITOR.checkSubmit(1);">';
 
-		$this->doc->loadPrototype();
+		$this->doc->getPageRenderer()->loadPrototype();
 		$this->doc->JScode = $this->doc->wrapScriptTags('
 			function jumpToUrl(URL,formEl)	{	//
 				if (!TBE_EDITOR.isFormChanged())	{
Index: typo3/mod/web/perm/index.php
===================================================================
--- typo3/mod/web/perm/index.php	(Revision 5952)
+++ typo3/mod/web/perm/index.php	(Arbeitskopie)
@@ -215,7 +215,7 @@
 		$this->doc->setModuleTemplate('templates/perm.html');
 		$this->doc->form = '<form action="'.$GLOBALS['BACK_PATH'].'tce_db.php" method="post" name="editform">';
 		$this->doc->loadJavascriptLib('../t3lib/jsfunc.updateform.js');
-		$this->doc->loadPrototype();
+		$this->doc->getPageRenderer()->loadPrototype();
 		$this->doc->loadJavascriptLib(TYPO3_MOD_PATH . 'perm.js');
 
 			// Setting up the context sensitive menu:
Index: typo3/sysext/t3editor/class.tx_t3editor.php
===================================================================
--- typo3/sysext/t3editor/class.tx_t3editor.php	(Revision 5952)
+++ typo3/sysext/t3editor/class.tx_t3editor.php	(Arbeitskopie)
@@ -128,8 +128,10 @@
 			$path_t3e = t3lib_extmgm::extRelPath('t3editor');
 
 				// include needed javascript-frameworks
-			$doc->loadPrototype();
-			$doc->loadScriptaculous();
+			/** @var $pageRenderer t3lib_PageRenderer */
+			$pageRenderer = $doc->getPageRenderer();
+			$pageRenderer->loadPrototype();
+			$pageRenderer->loadScriptaculous();
 
 				// include editor-css
 			$code.= '<link href="' .
Index: typo3/sysext/taskcenter/task/index.php
===================================================================
--- typo3/sysext/taskcenter/task/index.php	(Revision 5952)
+++ typo3/sysext/taskcenter/task/index.php	(Arbeitskopie)
@@ -92,7 +92,7 @@
 		$this->doc->divClass = '';
 		$this->doc->form = '<form action="index.php" method="post" name="editform">';
 		$this->backPath = $this->doc->backPath = $BACK_PATH;
-		$this->doc->loadPrototype();
+		$this->doc->getPageRenderer()->loadPrototype();
 		$this->doc->JScode = '  <script language="javascript" type="text/javascript">
 			script_ended = 0;
 			function jumpToUrl(URL) {
Index: typo3/sysext/cms/tslib/class.tslib_fe.php
===================================================================
--- typo3/sysext/cms/tslib/class.tslib_fe.php	(Revision 5952)
+++ typo3/sysext/cms/tslib/class.tslib_fe.php	(Arbeitskopie)
@@ -190,7 +190,7 @@
  * @package TYPO3
  * @subpackage tslib
  */
- class tslib_fe extends t3lib_PageRenderer {
+ class tslib_fe {
 
 		// CURRENT PAGE:
 	var $id='';							// The page id (int)
@@ -397,6 +397,11 @@
 	var $pages_lockObj;					// Locking object for accessing "cache_pages"
 
 	/**
+	 * @var t3lib_PageRenderer
+	 */
+	protected $pageRenderer;
+
+	/**
 	 * the page cache object, use this to save pages to the cache and to
 	 * retrieve them again
 	 *
@@ -457,7 +462,6 @@
 		}
 
 		$this->initCaches();
-		parent::__construct(PATH_tslib . 'templates/tslib_page_frontend.html');
 	}
 
 	/**
@@ -546,6 +550,18 @@
 		}
 	}
 
+	/**
+	 * Gets instance of PageRenderer
+	 * 
+	 * @return	t3lib_PageRenderer
+	 */
+	public function getPageRenderer() {
+		if (!isset($this->pageRenderer)) {
+			$this->pageRenderer = t3lib_div::makeInstance('t3lib_PageRenderer');
+			$this->pageRenderer->setTemplateFile(PATH_tslib . 'templates/tslib_page_frontend.html');
+		}
+		return $this->pageRenderer;
+	}
 
 
 
@@ -562,7 +578,6 @@
 
 
 
-
 	/********************************************
 	 *
 	 * Initializing, resolving page id
Index: typo3/sysext/cms/tslib/class.tslib_pagegen.php
===================================================================
--- typo3/sysext/cms/tslib/class.tslib_pagegen.php	(Revision 5952)
+++ typo3/sysext/cms/tslib/class.tslib_pagegen.php	(Arbeitskopie)
@@ -338,23 +338,26 @@
 	 * @return	void
 	 */
 	public static function renderContentWithHeader($pageContent) {
+			// get instance of t3lib_PageRenderer
+		/** @var $pageRenderer t3lib_PageRenderer */
+		$pageRenderer = $GLOBALS['TSFE']->getPageRenderer();
 		
-		$GLOBALS['TSFE']->backPath = 'typo3/';
+		$pageRenderer->backPath = 'typo3/';
 		
 		if ($GLOBALS['TSFE']->config['config']['moveJsFromHeaderToFooter']) {
-			$GLOBALS['TSFE']->enableMoveJsFromHeaderToFooter();
+			$pageRenderer->enableMoveJsFromHeaderToFooter();
 		}
 
 		if ($GLOBALS['TSFE']->config['config']['pageRenderTemplateFile']) {
 			$file = $GLOBALS['TSFE']->tmpl->getFileName($GLOBALS['TSFE']->config['config']['pageRenderTemplateFile']);
 			if ($file) {
-				$GLOBALS['TSFE']->setTemplateFile($file);
+				$pageRenderer->setTemplateFile($file);
 			}
 		}
 
 		$customContent = $GLOBALS['TSFE']->config['config']['headerComment'];
 		if (trim($customContent)) {
-			$GLOBALS['TSFE']->addInlineComment($customContent);
+			$pageRenderer->addInlineComment($customContent);
 		}
 
 			// Setting charset:
@@ -449,7 +452,7 @@
 
 			// Adding doctype parts:
 		if (count($docTypeParts)) {
-			$GLOBALS['TSFE']->setXmlPrologAndDocType(implode(chr(10), $docTypeParts));
+			$pageRenderer->setXmlPrologAndDocType(implode(chr(10), $docTypeParts));
 		}
 
 			// Begin header section:
@@ -458,16 +461,16 @@
 		} else {
 			$_attr = '';
 		}
-		$GLOBALS['TSFE']->setHtmlTag('<html' . ($_attr ? ' ' . $_attr : '') . '>');
+		$pageRenderer->setHtmlTag('<html' . ($_attr ? ' ' . $_attr : '') . '>');
 
 			// Head tag:
 		$headTag = $GLOBALS['TSFE']->pSetup['headTag'] ? $GLOBALS['TSFE']->pSetup['headTag'] : '<head>';
-		$GLOBALS['TSFE']->setHeadTag($headTag);
+		$pageRenderer->setHeadTag($headTag);
 
 			// Setting charset meta tag:
-		$GLOBALS['TSFE']->setCharSet($theCharset);
+		$pageRenderer->setCharSet($theCharset);
 
-		$GLOBALS['TSFE']->addInlineComment('
+		$pageRenderer->addInlineComment('
 	This website is powered by TYPO3 - inspiring people to share!
 	TYPO3 is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.
 	TYPO3 is copyright 1998-2009 of Kasper Skaarhoj. Extensions are copyright of their respective owners.
@@ -475,7 +478,7 @@
 ');
 
 		if ($GLOBALS['TSFE']->baseUrl) {
-			$GLOBALS['TSFE']->setBaseUrl($GLOBALS['TSFE']->baseUrl);
+			$pageRenderer->setBaseUrl($GLOBALS['TSFE']->baseUrl);
 		}
 
 		if ($GLOBALS['TSFE']->pSetup['shortcutIcon']) {
@@ -485,10 +488,10 @@
 				if (($finfo = @finfo_open(FILEINFO_MIME))) {
 					$iconMimeType = ' type="' . finfo_file($finfo, $favIcon) . '"';
 					finfo_close($finfo);
-					$GLOBALS['TSFE']->setIconMimeType($iconMimeType);
+					$pageRenderer->setIconMimeType($iconMimeType);
 				}
 			}
-			$GLOBALS['TSFE']->setFavIcon($favIcon);
+			$pageRenderer->setFavIcon($favIcon);
 		
 		}
 
@@ -502,9 +505,9 @@
 			}
 			if (count($temp_styleLines)) {
 				if ($GLOBALS['TSFE']->config['config']['inlineStyle2TempFile']) {
-					$GLOBALS['TSFE']->addCssFile(TSpagegen::inline2TempFile(implode(chr(10), $temp_styleLines), 'css'));
+					$pageRenderer->addCssFile(TSpagegen::inline2TempFile(implode(chr(10), $temp_styleLines), 'css'));
 				} else {
-					$GLOBALS['TSFE']->addCssInlineBlock('TSFEinlineStyle', implode(chr(10), $temp_styleLines));
+					$pageRenderer->addCssInlineBlock('TSFEinlineStyle', implode(chr(10), $temp_styleLines));
 				}
 			}
 		}
@@ -512,7 +515,7 @@
 		if ($GLOBALS['TSFE']->pSetup['stylesheet']) {
 			$ss = $GLOBALS['TSFE']->tmpl->getFileName($GLOBALS['TSFE']->pSetup['stylesheet']);
 			if ($ss) {
-				$GLOBALS['TSFE']->addCssFile($ss);
+				$pageRenderer->addCssFile($ss);
 			}
 		}
 
@@ -532,7 +535,7 @@
 							if (! $GLOBALS['TSFE']->pSetup['includeCSS.'][$key . '.']['external'] && substr($ss, 0, 1) != '/') { // To fix MSIE 6 that cannot handle these as relative paths (according to Ben v Ende)
 								$ss = t3lib_div::dirname(t3lib_div::getIndpEnv('SCRIPT_NAME')) . '/' . $ss;
 							}
-							$GLOBALS['TSFE']->addCssInlineBlock(
+							$pageRenderer->addCssInlineBlock(
 								'import_' . $key, 
 								'@import url("' . htmlspecialchars($ss) . '") ' . htmlspecialchars($GLOBALS['TSFE']->pSetup['includeCSS.'][$key . '.']['media']) . ';', 
 								$GLOBALS['TSFE']->pSetup['includeCSS.'][$key . '.']['compressed'] ? TRUE : FALSE, 
@@ -540,7 +543,7 @@
 								''
 							);
 						} else {
-							$GLOBALS['TSFE']->addCssFile(
+							$pageRenderer->addCssFile(
 								htmlspecialchars($ss), 
 								$GLOBALS['TSFE']->pSetup['includeCSS.'][$key . '.']['alternate'] ? 'alternate stylesheet' : 'stylesheet',
 								$GLOBALS['TSFE']->pSetup['includeCSS.'][$key . '.']['media'] ? $GLOBALS['TSFE']->pSetup['includeCSS.'][$key . '.']['media'] : 'screen', 
@@ -631,37 +634,37 @@
 
 		if (trim($style)) {
 			if ($GLOBALS['TSFE']->config['config']['inlineStyle2TempFile']) {
-				$GLOBALS['TSFE']->addCssFile(TSpagegen::inline2TempFile($style, 'css'));
+				$pageRenderer->addCssFile(TSpagegen::inline2TempFile($style, 'css'));
 			} else {
-				$GLOBALS['TSFE']->addCssInlineBlock('additionalTSFEInlineStyle', $style);
+				$pageRenderer->addCssInlineBlock('additionalTSFEInlineStyle', $style);
 			}
 		}
 
 			// Javascript Libraries
 		if (is_array($GLOBALS['TSFE']->pSetup['javascriptLibs.'])) {
 			if ($GLOBALS['TSFE']->pSetup['javascriptLibs.']['Prototype']) {
-				$GLOBALS['TSFE']->loadPrototype();
+				$pageRenderer->loadPrototype();
 			}
 			if ($GLOBALS['TSFE']->pSetup['javascriptLibs.']['Scriptaculous']) {
 				$modules = $GLOBALS['TSFE']->pSetup['javascriptLibs.']['Scriptaculous.']['modules'] ? $GLOBALS['TSFE']->pSetup['javascriptLibs.']['Scriptaculous.']['modules'] : '';
-				$GLOBALS['TSFE']->loadScriptaculous($modules);
+				$pageRenderer->loadScriptaculous($modules);
 			}
 			if ($GLOBALS['TSFE']->pSetup['javascriptLibs.']['ExtCore']) {
-				$GLOBALS['TSFE']->loadExtCore();
+				$pageRenderer->loadExtCore();
 				if ($GLOBALS['TSFE']->pSetup['javascriptLibs.']['ExtCore.']['debug']) {
-					$GLOBALS['TSFE']->enableExtCoreDebug();
+					$pageRenderer->enableExtCoreDebug();
 				}
 			}
 			if ($GLOBALS['TSFE']->pSetup['javascriptLibs.']['ExtJs']) {
 				$css = $GLOBALS['TSFE']->pSetup['javascriptLibs.']['ExtJs.']['css'] ? TRUE : FALSE;
 				$theme = $GLOBALS['TSFE']->pSetup['javascriptLibs.']['ExtJs.']['theme'] ? TRUE : FALSE;
 				$adapter = $GLOBALS['TSFE']->pSetup['javascriptLibs.']['ExtJs.']['adapter'] ? $GLOBALS['TSFE']->pSetup['javascriptLibs.']['ExtJs.']['adapter'] : '';
-				$GLOBALS['TSFE']->loadExtJs($css, $theme, $adapter);
+				$pageRenderer->loadExtJs($css, $theme, $adapter);
 				if ($GLOBALS['TSFE']->pSetup['javascriptLibs.']['ExtJs.']['debug']) {
-					$GLOBALS['TSFE']->enableExtJsDebug();
+					$pageRenderer->enableExtJsDebug();
 				}
 				if ($GLOBALS['TSFE']->pSetup['javascriptLibs.']['ExtJs.']['quickTips']) {
-					$GLOBALS['TSFE']->enableExtJSQuickTips();
+					$pageRenderer->enableExtJSQuickTips();
 				}
 			}
 		}
@@ -675,7 +678,7 @@
 					if (! $type) {
 						$type = 'text/javascript';
 					}
-					$GLOBALS['TSFE']->addJsLibrary(
+					$pageRenderer->addJsLibrary(
 						htmlspecialchars($key), 
 						htmlspecialchars($GLOBALS['TSFE']->absRefPrefix . $ss), 
 						htmlspecialchars($type), 
@@ -696,7 +699,7 @@
 					if (! $type) {
 						$type = 'text/javascript';
 					}
-					$GLOBALS['TSFE']->addJsFooterLibrary(
+					$pageRenderer->addJsFooterLibrary(
 						htmlspecialchars($key), 
 						htmlspecialchars($GLOBALS['TSFE']->absRefPrefix . $ss), 
 						htmlspecialchars($type), 
@@ -719,7 +722,7 @@
 						if (! $type) {
 							$type = 'text/javascript';
 						}
-						$GLOBALS['TSFE']->addJsFile(
+						$pageRenderer->addJsFile(
 							htmlspecialchars($GLOBALS['TSFE']->absRefPrefix . $ss), 
 							htmlspecialchars($type), 
 							$GLOBALS['TSFE']->pSetup['includeJS.'][$key . '.']['compressed'] ? TRUE : FALSE, 
@@ -740,7 +743,7 @@
 						if (! $type) {
 							$type = 'text/javascript';
 						}
-						$GLOBALS['TSFE']->addJsFooterFile(
+						$pageRenderer->addJsFooterFile(
 							htmlspecialchars($GLOBALS['TSFE']->absRefPrefix . $ss), 
 							htmlspecialchars($type), 
 							$GLOBALS['TSFE']->pSetup['includeFooterJS.'][$key . '.']['compressed'] ? TRUE : FALSE, 
@@ -754,12 +757,12 @@
 
 			// Headerdata
 		if (is_array($GLOBALS['TSFE']->pSetup['headerData.'])) {
-			$GLOBALS['TSFE']->addHeaderData($GLOBALS['TSFE']->cObj->cObjGet($GLOBALS['TSFE']->pSetup['headerData.'], 'headerData.'));
+			$pageRenderer->addHeaderData($GLOBALS['TSFE']->cObj->cObjGet($GLOBALS['TSFE']->pSetup['headerData.'], 'headerData.'));
 		}
 
 			// Footerdata
 		if (is_array($GLOBALS['TSFE']->pSetup['footerData.'])) {
-			$GLOBALS['TSFE']->addFooterData($GLOBALS['TSFE']->cObj->cObjGet($GLOBALS['TSFE']->pSetup['footerData.'], 'footerData.'));
+			$pageRenderer->addFooterData($GLOBALS['TSFE']->cObj->cObjGet($GLOBALS['TSFE']->pSetup['footerData.'], 'footerData.'));
 		}
 
 			// Title
@@ -769,10 +772,10 @@
 		}
 
 		if (strlen($titleTagContent) && intval($GLOBALS['TSFE']->config['config']['noPageTitle']) !== 2) {
-			$GLOBALS['TSFE']->setTitle($titleTagContent);
+			$pageRenderer->setTitle($titleTagContent);
 		}
 
-		$GLOBALS['TSFE']->addMetaTag('<meta name="generator" content="TYPO3 ' . TYPO3_branch . ' CMS" />');
+		$pageRenderer->addMetaTag('<meta name="generator" content="TYPO3 ' . TYPO3_branch . ' CMS" />');
 
 		$conf = $GLOBALS['TSFE']->pSetup['meta.'];
 		if (is_array($conf)) {
@@ -788,7 +791,7 @@
 						if (strtolower($key) == 'refresh') {
 							$a = 'http-equiv';
 						}
-						$GLOBALS['TSFE']->addMetaTag('<meta ' . $a . '="' . $key . '" content="' . htmlspecialchars(trim($val)) . '" />');
+						$pageRenderer->addMetaTag('<meta ' . $a . '="' . $key . '" content="' . htmlspecialchars(trim($val)) . '" />');
 					}
 				}
 			}
@@ -888,7 +891,7 @@
 
 			// Should minify?
 		if ($GLOBALS['TSFE']->config['config']['minifyJS']) {
-			$GLOBALS['TSFE']->enableCompressJavascript();
+			$pageRenderer->enableCompressJavascript();
 			$minifyErrorScript = $minifyErrorInline = '';
 			$scriptJsCode = t3lib_div::minifyJavaScript($scriptJsCode, $minifyErrorScript);
 			if ($minifyErrorScript) {
@@ -912,62 +915,62 @@
 		if (! $GLOBALS['TSFE']->config['config']['removeDefaultJS']) {
 				// inlude default and inlineJS
 			if ($scriptJsCode) {
-				$GLOBALS['TSFE']->addJsInlineCode('_scriptCode', $scriptJsCode, $GLOBALS['TSFE']->config['config']['minifyJS']);
+				$pageRenderer->addJsInlineCode('_scriptCode', $scriptJsCode, $GLOBALS['TSFE']->config['config']['minifyJS']);
 			}
 			if ($inlineJS) {
-				$GLOBALS['TSFE']->addJsInlineCode('TS_inlineJS', $inlineJS, $GLOBALS['TSFE']->config['config']['minifyJS']);
+				$pageRenderer->addJsInlineCode('TS_inlineJS', $inlineJS, $GLOBALS['TSFE']->config['config']['minifyJS']);
 			}
 			if ($inlineFooterJs) {
-				$GLOBALS['TSFE']->addJsFooterInlineCode('TS_inlineFooter', $inlineFooterJs, $GLOBALS['TSFE']->config['config']['minifyJS']);
+				$pageRenderer->addJsFooterInlineCode('TS_inlineFooter', $inlineFooterJs, $GLOBALS['TSFE']->config['config']['minifyJS']);
 			}
 		} elseif ($GLOBALS['TSFE']->config['config']['removeDefaultJS'] === 'external') {
 				// put default and inlineJS in external file
-			$GLOBALS['TSFE']->addJsFile(TSpagegen::inline2TempFile($scriptJsCode . $inlineJS, 'js'), 'text/javascript', $GLOBALS['TSFE']->config['config']['minifyJS']);
+			$pageRenderer->addJsFile(TSpagegen::inline2TempFile($scriptJsCode . $inlineJS, 'js'), 'text/javascript', $GLOBALS['TSFE']->config['config']['minifyJS']);
 			if ($inlineFooterJs) {
-				$GLOBALS['TSFE']->addJsFooterFile(TSpagegen::inline2TempFile($inlineFooterJs, 'js'), 'text/javascript', $GLOBALS['TSFE']->config['config']['minifyJS']);
+				$pageRenderer->addJsFooterFile(TSpagegen::inline2TempFile($inlineFooterJs, 'js'), 'text/javascript', $GLOBALS['TSFE']->config['config']['minifyJS']);
 			}
 		} else {
 				// include only inlineJS
 			if ($inlineJS) {
-				$GLOBALS['TSFE']->addJsInlineCode('TS_inlineJS', $inlineJS, $GLOBALS['TSFE']->config['config']['minifyJS']);
+				$pageRenderer->addJsInlineCode('TS_inlineJS', $inlineJS, $GLOBALS['TSFE']->config['config']['minifyJS']);
 			}
 			if ($inlineFooterJs) {
-				$GLOBALS['TSFE']->addJsFooterInlineCode('TS_inlineFooter', $inlineFooterJs, $GLOBALS['TSFE']->config['config']['minifyJS']);
+				$pageRenderer->addJsFooterInlineCode('TS_inlineFooter', $inlineFooterJs, $GLOBALS['TSFE']->config['config']['minifyJS']);
 			}
 		}
 
 			// ExtJS specific code
 		if (is_array($GLOBALS['TSFE']->pSetup['inlineLanguageLabel.'])) {
-			$GLOBALS['TSFE']->addInlineLanguageLabelArray($GLOBALS['TSFE']->pSetup['inlineLanguageLabel.']);		
+			$pageRenderer->addInlineLanguageLabelArray($GLOBALS['TSFE']->pSetup['inlineLanguageLabel.']);
 		} 
 
 		if (is_array($GLOBALS['TSFE']->pSetup['inlineSettings.'])) {
-			$GLOBALS['TSFE']->addInlineSettingArray('TS', $GLOBALS['TSFE']->pSetup['inlineSettings.']);		
+			$pageRenderer->addInlineSettingArray('TS', $GLOBALS['TSFE']->pSetup['inlineSettings.']);
 		}
  
 		if (is_array($GLOBALS['TSFE']->pSetup['extOnReady.'])) {
-			$GLOBALS['TSFE']->addExtOnReadyCode($GLOBALS['TSFE']->cObj->cObjGet($GLOBALS['TSFE']->pSetup['extOnReady.'], 'extOnReady.'));		
+			$pageRenderer->addExtOnReadyCode($GLOBALS['TSFE']->cObj->cObjGet($GLOBALS['TSFE']->pSetup['extOnReady.'], 'extOnReady.'));
 		}
  
 			// compression and concatenate settings
 		if ($GLOBALS['TSFE']->config['config']['minifyCSS']) {
-			$GLOBALS['TSFE']->enableCompressCss();
+			$pageRenderer->enableCompressCss();
 		}
 		if ($GLOBALS['TSFE']->config['config']['minifyJS']) {
-			$GLOBALS['TSFE']->enableCompressJavascript();
+			$pageRenderer->enableCompressJavascript();
 		}
 		if ($GLOBALS['TSFE']->config['config']['concatenateJsAndCss']) {
-			$GLOBALS['TSFE']->enableConcatenateFiles();
+			$pageRenderer->enableConcatenateFiles();
 		}
 
 			// add header data block
 		if ($GLOBALS['TSFE']->additionalHeaderData) {
-			$GLOBALS['TSFE']->addHeaderData(implode(chr(10), $GLOBALS['TSFE']->additionalHeaderData));
+			$pageRenderer->addHeaderData(implode(chr(10), $GLOBALS['TSFE']->additionalHeaderData));
 		}
 
 			// add footer data block
 		if ($GLOBALS['TSFE']->additionalFooterData) {
-			$GLOBALS['TSFE']->addFooterData(implode(chr(10), $GLOBALS['TSFE']->additionalFooterData));
+			$pageRenderer->addFooterData(implode(chr(10), $GLOBALS['TSFE']->additionalFooterData));
 		}
 
 		// Header complete, now add content
@@ -1004,18 +1007,18 @@
 		if (count($JSef[1])) { // Event functions:
 			$bodyTag = preg_replace('/>$/', '', trim($bodyTag)) . ' ' . trim(implode(' ', $JSef[1])) . '>';
 		}
-		$GLOBALS['TSFE']->addBodyContent(chr(10) . $bodyTag);
+		$pageRenderer->addBodyContent(chr(10) . $bodyTag);
 
 			// Div-sections
 		if ($GLOBALS['TSFE']->divSection) {
-			$GLOBALS['TSFE']->addBodyContent(chr(10) . $GLOBALS['TSFE']->divSection);
+			$pageRenderer->addBodyContent(chr(10) . $GLOBALS['TSFE']->divSection);
 		}
 
 			// Page content
-		$GLOBALS['TSFE']->addBodyContent(chr(10) . $pageContent);
+		$pageRenderer->addBodyContent(chr(10) . $pageContent);
 
 			// Render complete page
-		$GLOBALS['TSFE']->content = $GLOBALS['TSFE']->render();
+		$GLOBALS['TSFE']->content = $pageRenderer->render();
 
 			// Ending page
 		if ($GLOBALS['TSFE']->pSetup['frameSet.']) {
Index: typo3/sysext/cms/tslib/class.tslib_content.php
===================================================================
--- typo3/sysext/cms/tslib/class.tslib_content.php	(Revision 5952)
+++ typo3/sysext/cms/tslib/class.tslib_content.php	(Arbeitskopie)
@@ -2818,7 +2818,7 @@
 		$typeConf = $conf[$conf['type'] . '.'];
 
 			//add SWFobject js-file
-		$GLOBALS['TSFE']->addJsFile('typo3/contrib/flashmedia/swfobject/swfobject.js');
+		$GLOBALS['TSFE']->getPageRenderer()->addJsFile('typo3/contrib/flashmedia/swfobject/swfobject.js');
 		
 		$player = $this->stdWrap($conf[$conf['type'] . '.']['player'], $conf[$conf['type'] . '.']['player.']);
 		$installUrl = $conf['installUrl'] ? $conf['installUrl'] : $prefix . 'typo3/contrib/flashmedia/swfobject/expressInstall.swf';
@@ -2926,7 +2926,7 @@
 		$typeConf = $conf[$conf['type'] . '.'];
 
 			//add QTobject js-file
-		$GLOBALS['TSFE']->addJsFile('typo3/contrib/flashmedia/qtobject/qtobject.js');
+		$GLOBALS['TSFE']->getPageRenderer()->addJsFile('typo3/contrib/flashmedia/qtobject/qtobject.js');
 		$replaceElementIdString = uniqid('mmqt');
 		$GLOBALS['TSFE']->register['MMQTID'] = $replaceElementIdString;
 		$qtObject = 'QTObject' . $replaceElementIdString;
Index: typo3/sysext/rtehtmlarea/mod3/class.tx_rtehtmlarea_browse_links.php
===================================================================
--- typo3/sysext/rtehtmlarea/mod3/class.tx_rtehtmlarea_browse_links.php	(Revision 5952)
+++ typo3/sysext/rtehtmlarea/mod3/class.tx_rtehtmlarea_browse_links.php	(Arbeitskopie)
@@ -229,7 +229,7 @@
 		$this->doc = t3lib_div::makeInstance('template');
 		$this->doc->backPath = $GLOBALS['BACK_PATH'];
 			// Loading the Prototype library and browse_links.js
-		$this->doc->loadPrototype();
+		$this->doc->getPageRenderer()->loadPrototype();
 		$this->doc->loadJavascriptLib('js/browse_links.js');
 			// Adding context menu code
 		$this->doc->getContextMenuCode();
Index: typo3/sysext/rtehtmlarea/mod4/class.tx_rtehtmlarea_select_image.php
===================================================================
--- typo3/sysext/rtehtmlarea/mod4/class.tx_rtehtmlarea_select_image.php	(Revision 5952)
+++ typo3/sysext/rtehtmlarea/mod4/class.tx_rtehtmlarea_select_image.php	(Arbeitskopie)
@@ -180,7 +180,7 @@
 		$this->doc->backPath = $BACK_PATH;
 
 			// Load the Prototype library and browse_links.js
-		$this->doc->loadPrototype();
+		$this->doc->getPageRenderer()->loadPrototype();
 		$this->doc->loadJavascriptLib('js/browse_links.js');
 
 		$this->doc->getContextMenuCode();
Index: typo3/sysext/recycler/mod1/index.php
===================================================================
--- typo3/sysext/recycler/mod1/index.php	(Revision 5952)
+++ typo3/sysext/recycler/mod1/index.php	(Arbeitskopie)
@@ -137,7 +137,7 @@
 			// Load CSS Stylesheets:
 		$this->loadStylesheet($this->relativePath . 'res/css/customExtJs.css');
 			// Load Ext JS:
-		$this->doc->loadExtJS();
+		$this->doc->getPageRenderer()->loadExtJS();
 			// Integrate dynamic JavaScript such as configuration or lables:
 		$this->doc->JScode.= t3lib_div::wrapJS('
 			Ext.namespace("Recycler");
Index: typo3/sysext/scheduler/mod1/index.php
===================================================================
--- typo3/sysext/scheduler/mod1/index.php	(Revision 5952)
+++ typo3/sysext/scheduler/mod1/index.php	(Arbeitskopie)
@@ -602,9 +602,11 @@
 		}
 
 			// Load necessary JavaScript
-		$this->doc->loadExtJS();
+		/** @var $pageRenderer t3lib_PageRenderer */
+		$pageRenderer = $this->doc->getPageRenderer();
+		$pageRenderer->loadExtJS();
 		$this->doc->loadJavascriptLib(t3lib_extMgm::extRelPath('scheduler') . 'res/tx_scheduler_be.js');
-		$this->doc->addJsFile($this->backPath . '../t3lib/js/extjs/tceforms.js');
+		$pageRenderer->addJsFile($this->backPath . '../t3lib/js/extjs/tceforms.js');
 
 			// Define settings for Date Picker
 		$typo3Settings = array(
@@ -612,7 +614,7 @@
 			'dateFormat'       => array('j-n-Y', 'G:i j-n-Y'),
 			'dateFormatUS'     => array('n-j-Y', 'G:i n-j-Y'),
 		);
-		$this->doc->addInlineSettingArray('', $typo3Settings);
+		$pageRenderer->addInlineSettingArray('', $typo3Settings);
 
 			// Define table layout for add/edit form
 		$tableLayout = array (
@@ -834,7 +836,7 @@
 			$registeredClasses = self::getRegisteredClasses();
 
 				// Load ExtJS framework and specific JS library
-			$this->doc->loadExtJS();
+			$this->doc->getPageRenderer()->loadExtJS();
 			$this->doc->loadJavascriptLib(t3lib_extMgm::extRelPath('scheduler') . 'res/tx_scheduler_be.js');
 
 				// Initialise table layout
