<?php
class Template
{
	var $template_data = array();
	
	function set($name, $value)
	{
		$this->template_data[$name] = $value;
	}
	
	function load($template = '',$view_left = '' , $view_right = '', $view_data = array(),  $return = FALSE)
	{   
		$this->CI =& get_instance();

		$this->set('mainmenu', $this->CI->load->view('templates/mainmenu', $view_data, TRUE));
		
		$this->set('left', $this->CI->load->view($view_left, $view_data, TRUE));
		
		$this->set('right', $this->CI->load->view($view_right, $view_data, TRUE));
		
		return $this->CI->load->view($template, $this->template_data, $return);
	}
}
?>