<?php
defined('ROOT_DIR') or die(__FILE__.' requires egConfig.inc.php');
include_once(ROOT_DIR.'egButton.class.php');

class egLink extends egButton {

	function egLink($id, $title, $posX = 0, $posY = 0, $width = 0, $height = 0, $action = null, $icon = null) {
		parent::egButton($id, $title, $posX, $posY, $width, $height, $action, $icon);
	}

	function getClassName() {
		return "egLink";
	}

	function getHTML($container = null) {
		$html = "var link_{$this->id} = new egLink('{$this->id}', '{$this->title}', '{$this->posX}', '{$this->posY}', '{$this->width}', '{$this->height}', '{$this->action}', '{$this->icon}', '{$container}');";
		return $html;
	}

	/**
   *
   * @static
	 */
	function getScriptsFiles() {
    $scriptsArray = array();
    $scriptsArray[ALL] = "egLink_default.js";
    return $scriptsArray;
	}

	/**
   *
   * @static
   */
	function getStylesFiles() {
    $stylesArray = array();
    $stylesArray[ALL] = "egLink_default.css";

    $stylesArray[INTERNET_EXPLORER] = array();

    $stylesArray[INTERNET_EXPLORER][ALL] = "egLink_default.css";

    $stylesArray[INTERNET_EXPLORER]['6'] = array();
    $stylesArray[INTERNET_EXPLORER]['6'][ALL] = "egLink_default.css";

    $stylesArray[INTERNET_EXPLORER]['7'] = array();
    $stylesArray[INTERNET_EXPLORER]['7'][ALL] = "egLink_ie70.css";


    $stylesArray[FIREFOX] = array();

    $stylesArray[FIREFOX][ALL] = "egLink_default.css";

    $stylesArray[FIREFOX]['1'] = array();
    $stylesArray[FIREFOX]['1'][ALL] = "egLink_default.css";
    $stylesArray[FIREFOX]['1']['5'] = "egLink_default.css";

    $stylesArray[FIREFOX]['2'] = array();
    $stylesArray[FIREFOX]['2'][ALL] = "egLink_default.css";


    return $stylesArray;
  }
}
?>