public function generatepage_json(){
		$status=200;
		foreach($this->rules as &$c){
			$this->positions[$c->position]=$c->output;
			if($c->status!=200){
				$status=$c->status;
				}
			}
		header('Content-type: text/json');
		if($status==403){
			header($_SERVER['SERVER_PROTOCOL'].' 403 Forbidden');
			}
		if($status==404){
			header($_SERVER['SERVER_PROTOCOL'].' 404 Page Not Found');
			}
		if($status==500){
			header($_SERVER['SERVER_PROTOCOL'].' 500 Server Error!');
			}
		echo $this->positions['content'];	
		}