<?php

class HighSlide extends CHtml {

	public static function load() {
		Yii::app()->controller->renderPartial('//layouts/partial/high_slide_config');
	}
	public static function text($field, $text) {
		$encoding = mb_detect_encoding($text);
		if($encoding == 'UTF-8') {
			throw new Exception("Texto com codificaçãoo errada: " . $encoding ."<br />Texto: " . $text, 400);	
		}
		Yii::app()->controller->renderPartial('//layouts/partial/high_slide', array('field' => $field, 'text' => $text));
	}
	public static function helpButton($field) {
		return '<span class="input-group-btn"><input type="image" src="'.FaHtml::getImgUrl('ico-help.png').'" alt="Submit" width="16" height="16" onClick="return hs.htmlExpand(this, {contentId: \'highslide-'.$field.'\'})" class="help-button" tabindex="-1"/></span>';
	}
}