protected function getOutTemplate($template = 'default') {
		// check for current locale
		if ($this->locale != '') {
			$templatefile = $this->templatespath.'/'.$this->locale.'/'.$this->outtemplateprefix.$template.'.htm';
			
			if (file_exists($templatefile)) {
				return $this->locale.'/'.$this->outtemplateprefix.$template;
			}
		}
		
		// if not found, check for default locale
		if ($this->deflocale != '') {
			$templatefile = $this->templatespath.'/'.$this->deflocale.'/'.$this->outtemplateprefix.$template.'.htm';
			
			if (file_exists($templatefile)) {
				return $this->deflocale.'/'.$this->outtemplateprefix.$template;
			}
		}
		
		// if not found then check in root
		$templatefile = $this->templatespath.'/'.$this->outtemplateprefix.$template.'.htm';
			
		if (file_exists($templatefile)) {
			return $this->outtemplateprefix.$template;
		}
		
		// out template not found
		return null;
	}