content[error] = array();
		$this->content[warning] = array();
		$this->content[info] = array();
		$this->content[success] = array();
		$this->content[text] = array();
    	$this->content[debug][] = array();
*/    	$this->content['content_header'] = "";
    	$this->content['content_footer'] = "";
    	$this->content['title'] = "";
    	$this->content['charset'] = "";
		$this->content['header'] = array();
    	$this->content['css'] = array();
    	$this->content['body'] = array();
    	$this->static_title = $staticTitle;
    }
    
    function addHeader($header) {
    	$this->content['header'][] = $header;
    }
    function switchOffBuffer() {
    	$this->buffering = false;
    }
    function addCss($msg) {
    	$this->content['css'][] = $msg;
    }
    
    function addContentHeader($msg) {
    	$tmp = '
'. "\n";
    	if ($this->buffering) {
    		$this->content['content_header'][] = $tmp;
    	} else {
    		print $tmp;
    	}
    }
    function addContentFooter($msg) {
    	$tmp = ''. "\n";
    	if ($this->buffering) {
    		$this->content['content_footer'][] = $tmp;
    	} else {
    		print $tmp;
    	}
    }
    function setTitle($msg) {
    	$this->content['title'] = $msg;
    }
    function setCharset($msg) {
    	$this->content['charset'] = $msg;
    }
   
    function addError($msg, $title="") {
    	if ($title != "") {
    		$tmp = 'Error: '.$title.'
'."\n".''.$msg.'
'."\n";
    	} else {
    		$tmp = 'Error: '.$msg.'
'."\n";
    	}
    	if ($this->buffering) {
    		$this->content['body'][] = $tmp;
    	} else {
    		print $tmp;
    	}
    }
    function addWarning($msg, $title = "") {
    	if ($title != "") {
    		$tmp = 'Warning: '.$title.'
'."\n".''.$msg.'
'."\n";
    	} else {
    		$tmp = 'Warning: '.$msg.'
'."\n";
    	}
    	if ($this->buffering) {
    		$this->content['body'][] = $tmp;
    	} else {
    		print $tmp;
    	}
    }
    	
    function addInfo($msg, $title = "") {
    	if ($title != "") {
    		$tmp = 'Info: '.$title.'
'."\n".''.$msg.'
'."\n";
    	} else {
    		$tmp = 'Info: '.$msg.'
'."\n";
    	}
    	if ($this->buffering) {
    		$this->content['body'][] = $tmp;
    	} else {
    		print $tmp;
    	}
    	
    }
    
    function addText($msg, $title = "", $css_class="") {
    	if ($css_class != "") $css_class = ' class="'.$css_class.'"';
    	if ($title != "") $title = ''.$title.'
';
    	$tmp = $title.''.$msg.'
';
    	if ($this->buffering) {
    		$this->content['body'][] = $tmp;
    	} else {
    		print $tmp;
    	}
    	
    }
        
    function addDebug($msg, $title = '') {
    	if ($title != "") {
    		$tmp = 'Debug: '.$title.'
'."\n".''.$msg.'
'."\n";
    	} else {
    		$tmp = 'Debug: '.$msg.'
'."\n";
    	}
    	if ($this->buffering) {
    		$this->content['body'][] = $tmp;
    	} else {
    		print $tmp;
    	}
    	
    }
    function addSuccess($msg, $title = '') {
    	if ($title != "") {
    		$tmp = 'Successful: '.$title.'
'."\n".''.$msg.'
'."\n";
    	} else {
    		$tmp = 'Successful: '.$msg.'
'."\n";
    	}
    	if ($this->buffering) {
    		$this->content['body'][] = $tmp;
    	} else {
    		print $tmp;
    	}    	
    }
    
    
    function getFooterLayout() {
    	if ($this->buffering) return '';
    	$res = '';
		if(($this->content['content_footer'] != "") && count($this->content['content_footer']) > 0) {		
	    	foreach ($this->content['content_footer'] as $id => $line) {
	    		$res .= ''. "\n";
	    	}
		}
	    	
    	$res .= "