public function checkTemplateExists($filepath,$options = array(),$tmplpath = '') {
		
		if (is_array($this->template_dir_orig) && $tmplpath == '') {
			foreach ($this->template_dir_orig as $path) {
				$exists = $this->checkTemplateExists($filepath,$options,$path);
				
				if ($exists) {
					return true;
				}
			}
			
			return false;
		}
		
		
		
		$filepath = (($tmplpath != '')?$tmplpath:$this->template_dir_orig).$filepath;

		if (!$options['extensionpresent']) {
			$filepath .= '.'.$this->templates_extension;
		}
		
		return file_exists($filepath);
	}