Установка активного класса для
  • при использовании Zend_Navigation, если автоматически не устанавливается.
  • Бывают случаи, когда Zend Navigation сам не может добавить для

  • активный класс. Это может быть из-за разных роутеров, мультиязычности — вариантов достаточно много.

    $container = new Zend_Navigation_Page_Mvc();
    $container->setPages($data);
        foreach ($container->getPages() as $page) {
            $uri = $page->getHref();
            $uri = str_replace($this->_view->baseUrl(), '', $uri);
            $res = str_replace('/', '', $uri);
            if (($uri == $request->getRequestUri()) || ((strlen($res) > 0) && (stristr(str_replace('/', '', $request->getRequestUri()), $res)))) {
                $page->setActive('true');
            }
        }
    Zend_Registry::set('mainMenu', $container);
    

    Ключевой момент — $page->setActive(‘true’);

    Zend_Navigation и построение меню из базы с использованием parent_id

    Как работать с Zend_Navigation написано в мануале, а вот как быть, если меню строится не из xml файла? Т.е. — динамически из базы?
    Начнем подготовку.

    основной bootstrap.php

        protected function _initNavigation() {
            $this->bootstrap('FrontController');
            if ($this->_navigation === null) {
                $front = $this->getResource('frontController');
                $navigation = new Plugin_UserMenu();
                $front->registerPlugin($navigation);
                $this->_navigation = $navigation;
            }
            return $this->_navigation;
        }
    

    Plugin_UserMenu — наш плагин, который, собственно, и будет генерировать данные для навигации.

    plugins/UserMenu.php

    <?php
    
    final class Plugin_UserMenu extends Zend_Controller_Plugin_Abstract {
    
        protected $_view;
        public function preDispatch(Zend_Controller_Request_Abstract $request) {
            $mapper = new Admin_Model_PagesMapper();
            $oData = $mapper->fetchAllAsArray();
            $data = Default_View_Helper_SelectParentIdCategories::Tree($oData);
            $layout = Zend_Layout::getMvcInstance();
            $this->_view = $layout->getView();
            $container = new Zend_Navigation();
            $container->setPages($data);
            $this->_view->navigation($container);
        }
    }
    

    Хитрость в fetchAllAsArray():

        public function fetchAllAsArray() {
            $where = $this->getDbTable()->select()
                    ->where('lang_id = ?', Zend_Registry::get('uds_lang_id'))
                    ->order('pr ASC');
            $resultSet = $this->getDbTable()->fetchAll($where);
            $entries = array();
            foreach ($resultSet as $row) {
                $entry['id'] = $row->id;
                $entry['parent_id'] = $row->parent_id;
                $entry['title'] = $row->title;
                $entry['label'] = $row->title;
                $entry['txt'] = $row->txt;
                $entry['kw'] = $row->kw;
                $entry['pic'] = $row->pic;
                $entry['visible'] = $row->visible;
                $entry['external_url'] = $row->external_url;
                $entry['uri'] = $row->external_url;
                $entries[] = $entry;
            }
            return $entries;
        }
    

    $entry['uri'] и $entry['label'] = $row->title используются именно для построения Zend_Navigation. Можно, конечно, при проектировании бд назвать поля таблицы сразу, как хочет zend, но не всегда удобно. По этому так.

    Не забываем, что у нас меню использует древовидную структуру по parent_id. Из мануала Zend_Navigation можно посмотреть пример массива, в каком виде нужно его передавать для Zend_Navigation. Собственно, нам осталось лишь подготовить сам массив. На одном форуме, нашел прекрасную функцию, которая сортирует дерево типа parent_id с помощью всего одного запроса и без рекурсии. Эта функция и вызывывается Default_View_Helper_SelectParentIdCategories::Tree($oData);

    Default_View_Helper_SelectParentIdCategories::Tree

    <?
    
    /* * *************************************************
     * Выкидывает селект под парент id
     */
    
    class Default_View_Helper_SelectParentIdCategories {
    
        public function Tree($rows) {
            $children = array(); // children of each ID
            $ids = array();
            $idName = 'id';
            $pidName = 'parent_id';
            // Collect who are children of whom.
            foreach ($rows as $i => $r) {
                $row = & $rows[$i];
                //$d['label'] = $rows[$i]['title'];
                //$row[] = $d;
                $id = $row[$idName];
                if ($id === null) {
                    continue;
                }
                $pid = $row[$pidName];
                if ($id == $pid)
                    $pid = null;
                $children[$pid][$id] = & $row;
    
                if (!isset($children[$id]))
                    $children[$id] = array();
                $row['pages'] = & $children[$id];
                $ids[$id] = true;
            }
            // Root elements are elements with non-found PIDs.
            $forest = array();
            foreach ($rows as $i => $r) {
                $row = & $rows[$i];
                $id = $row[$idName];
                $pid = $row[$pidName];
                if ($pid == $id)
                    $pid = null;
                if (!isset($ids[$pid])) {
                    $forest[$row[$idName]] = & $row;
                }
                //unset($row[$idName]);
                //unset($row[$pidName]);
            }
            //echo '<pre>';
            //print_r($forest);
             return $forest;
        }
    
        /*     * ******************************** */
    }
    

    Ну и вывод меню в layout:

    <?php print( $this->navigation()->menu()->renderMenu() ); ?>
    

    PS: Кто заметил Zend_Registry::get(‘uds_lang_id’)? Позже будет статья, как сделать мультиязычный сайт с неограниченным количеством языков.

    Скрипт обновления цен в Presta Shop [обновляет цену, скидку, количество]

    Как-то давно нашёл в просторах скрипт для PrestaShop, который обновлял количество и цену у товара. Знакомому нужен же был более полный функционал.
    С количеством и ценой проблем не возникает, а вот со скидкой пришлось повозиться. Скидка хранится в таблице ps_specific_price (ps — префикс таблицы, у вас он может быть другим).
    Сам код:

    <?php
    
    define('PS_ADMIN_DIR', getcwd());
    include(PS_ADMIN_DIR . '/../config/config.inc.php');
    include(PS_ADMIN_DIR . '/functions.php');
    include(PS_ADMIN_DIR . '/header.inc.php');
    echo '<div style="text-align:left;">';
    
    // Проверяем загружен ли файл
    if (is_uploaded_file($_FILES["filename"]["tmp_name"]))
    {
        // Если файл загружен успешно, перемещаем его из временной директории в конечную
        move_uploaded_file($_FILES["filename"]["tmp_name"], "" . $_SERVER["DOCUMENT_ROOT"] . "/upload/" . $_FILES["filename"]["name"]);
        $file_path = "" . $_SERVER["DOCUMENT_ROOT"] . "/upload/" . $_FILES["filename"]["name"] . "";
    
    // Меняем кодировку файла с windows-1251 на utf-8
        $file = file_get_contents("" . $file_path . "");
        $file = iconv("windows-1251", "utf-8", $file);
        file_put_contents("" . $file_path . "", $file);
    
    //меняем локаль на хостинге
        if (!setlocale(LC_ALL, 'ru_RU.utf8'))
            setlocale(LC_ALL, 'en_US.utf8'); if (setlocale(LC_ALL, 0) == 'C')
            die('Не поддерживается ни одна из перечисленных локалей (ru_RU.utf8, en_US.utf8)');
        if (($handle_f = fopen($file_path, "r")) !== FALSE)
        {
            //начинаем цикл чтения csv
            while (($data_f = fgetcsv($handle_f, 99999, ";")) !== FALSE)
            {
    
                //ищем товар по supplier_reference
                $sql = "SELECT id_product FROM ps_product WHERE supplier_reference = '" . $data_f[0] . "'";
                $id_product = Db::getInstance()->getValue($sql, 0);
    
                //если такой товар есть, обновляем количество и цену
                if ($id_product)
                {
                    if ((isset($data_f[1])))
                        $sql = mysql_query("UPDATE `ps_product` SET `quantity` ='" . $data_f[1] . "'  WHERE `id_product`='" . $id_product . "' LIMIT 1");
    
                    if ((isset($data_f[2])))
                        $sql = mysql_query("UPDATE `ps_product` SET`price` = '" . $data_f[2] . "' WHERE `id_product`='" . $id_product . "' LIMIT 1");
                    if ((isset($data_f[4])))
                        $sql = mysql_query("UPDATE `ps_product` SET `on_sale` = '" . $data_f[4] . "' WHERE `id_product`='" . $id_product . "' LIMIT 1");
    
                    if ((isset($data_f[3])))
                        $sql = mysql_query("UPDATE `ps_product` SET `wholesale_price` ='" . $data_f[3] . "' WHERE `id_product`='" . $id_product . "' LIMIT 1");
                    if ((isset($data_f[5])))
                    {
                        if ($data_f[5] == 0)
                        {
                            $sql = mysql_query("DELETE FROM `ps_specific_price` WHERE `id_product`='" . $id_product . "' LIMIT 1");
                        }
                        else
                        {
                            $sql = mysql_query("DELETE FROM `ps_specific_price` WHERE `id_product`='" . $id_product . "' LIMIT 1");
                            $s = str_replace(',', '.', $data_f[5] / 100);
                            $sql = mysql_query(
                                    "INSERT INTO `uds4lif_vne`.`ps_specific_price` (
    `id_specific_price` ,
    `id_product` ,
    `id_shop` ,
    `id_currency` ,
    `id_country` ,
    `id_group` ,
    `price` ,
    `from_quantity` ,
    `reduction` ,
    `reduction_type` ,
    `from` ,
    `to`
    )
    VALUES (
    NULL , '" . $id_product . "', '1', '0', '0', '0', '0', '1', '" . $s . "', 'percentage', '0000-00-00 00:00:00', '0000-00-00 00:00:00'
    );
    "
                            );
                        }
                    }
    
                    echo "<p style='color:green'>товар с штрихкодом <b>" . $data_f[0] . "</b> обновлен</p>";
                }
                else
                {
                    echo "<p style='color:red  '>товар с штрихкодом <b>" . $data_f[0] . "</b> не найден</p>";
                }
            }
            echo "<b>Обновление завершено</b>";
        }
        else
        {
            echo "Невозможно открыть загруженый файл";
        }
    }
    else
    {
        echo '
    <h2>Обновления цены и количества:</h2>
    <form action="' . $_SERVER["PHP_SELF"] . '" method="post" enctype="multipart/form-data">
              <input type="file" name="filename"><br>
              <input type="submit" value="Загрузить"><br>
    </form>
    ';
    }
    
    echo '</div>';
    include(PS_ADMIN_DIR . '/footer.inc.php');
    ?>
    

    Инструкция: Создаем/качаем ниже файл и закачиваем его в админку магазина. Путь к файлу: http://mojmagazin.ua/adminXXX/upl_price.php

    Инстуркция по созданию файла CSV:

    файл csv нужно заполнять так | Supplier reference #| количество | цена продажи | закупочная цена | скидка на товар: 1 – есть, 0 – нету | размер скидки в процентах|
    Расчитан скрипт на то что файл в кодировке windows-1251
    (в таком формате сохраняет файл эксель — «csv — разделеные точкой с запятой»)

    Теперь сами файлы:

    http://vazelin.org.ua/wp-content/plugins/downloads-manager/img/icons/default.gif download: update price for prestashop (1.65KB)
    added: 01/03/2012
    clicks: 47
    description:

    http://vazelin.org.ua/wp-content/plugins/downloads-manager/img/icons/default.gif download: Файл csv для импорта PrestaShop (B)
    added: 01/03/2012
    clicks: 53
    description:

    Если нужно будет для формата экселя — попросите, добавлю.
    PS: Кто знает автора оригинального скрипта — маякните, чтобы добавить автора.
    Спасибо: http://www.prestashop.com/forums/user/157834-surkov85/ и 4udak

    Кроссдоменный ajax запрос методом POST [ Cross domain Ajax POST query]

    Сразу скажу, что использовать будем curl.
    Суть проста: Отправляем данные на локальный скрипт, который принимает переменную и с помощью curl отправляет их на другой сервер. Получает ответ и выдает его в локальный скрипт.

    index.html

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru" lang="ru">
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
                <script type="text/javascript" src="jquery.js"></script>
                    <script type="text/javascript">
                    var ajax_url = 'http://newdomain.com/ajax.php';
                    $(document).ready(function(){
                        $('#link').click(function(){
    
                            $.post
                            (
                            "proxy.php",
                            {
                                msg: 'wer',
                                target_id: 'sdf'
                            },
                            function(data) {
                              alert(data);
                            });
                        });
                    });
                </script>
    
        </head>
        <body>
            <a href="#" id="link">post cross domain query</a>
        </body>
    </html>
    

    Локальный файл, так называемый proxy.php

    <?
    
    $url = $_POST['url'];
    unset($_POST['url']);
    
    $fields_string = "";
    
    foreach ($_POST as $key => $value)
    {
        $fields_string .= $key . '=' . $value . '&';
    }
    rtrim($fields_string, '&');
    
    $ch = curl_init();
    
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_POST, count($_POST));
    curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string);
    
    $result = curl_exec($ch);
    
    curl_close($ch);
    ?>
    

    Ну и файл на удаленном сервере ajax.php

    <?php
    
    error_reporting(0);
    
    header("Content-type: text/plain; charset=utf-8");
    header("Cache-Control: no-store, no-cache, must-revalidate");
    header("Cache-Control: post-check=0, pre-check=0", false);
    header("Connection: close");
    //print_r($_POST);
    if (!count($_POST))
        die('ERR');
    $data = array ();
    foreach ($_POST as $k => $v)
        $data[] = $k . '=' . $v;
    echo implode('&', $data) . "\nHI from " . $_SERVER['SERVER_NAME'] . '!';
    exit;
    ?>
    

    http://vazelin.org.ua/wp-content/plugins/downloads-manager/img/icons/winrar.gif download: ajax-cross-domain (16.60KB)
    added: 16/02/2012
    clicks: 35
    description:

    Вывод файлов в дериктории с помощью PHP

                                      <?
                                        $dir = $_SERVER['DOCUMENT_ROOT'] . '/imprices/';
                                        $gl = glob($dir . "*.xls");
                                        if (is_array($gl)):
                                            ?>
                                        <dt><label>Вы можете выбрать уже загруженный файл:</label></dt>
                                        <dd>
                                            <select>
                                                <?
                                                foreach ($gl as $filename):
                                                    ?><option value="<?= trim(str_replace($dir, '', $filename)); ?>">
                                                        <?= str_replace($dir, '', $filename) . " size " . filesize($filename); ?>
                                                    </option>
                                                    <?
                                                endforeach;
                                                ?>
                                            </select>
                                        </dd>
                                    <? endif; ?>
    

    Facebook OAuth 2.0

    ФБ давно уже предупреждал о переходе на OAuth 2.0.
    Что поменялось:

    1. Куки называются ‘fbsr_’ ( раньше ‘fbs_’);
    2. ‘perm’ стало ‘scope’
    3. response.authResponse (было response.session)
    4. FB.init нужно добавить oauth:true

    FB.getSession

    Теперь, кто использовал функцию get_facebook_cookie().
    Она стала вот такой:

    function get_facebook_cookie($app_id, $app_secret) {
        if (isset($_COOKIE['fbsr_' . $app_id])) {
            list($encoded_sig, $payload) = explode('.', $_COOKIE['fbsr_' . $app_id], 2);
    
            $sig = base64_decode(strtr($encoded_sig, '-_', '+/'));
            $data = json_decode(base64_decode(strtr($payload, '-_', '+/')), true);
    
            if (strtoupper($data['algorithm']) !== 'HMAC-SHA256') {
                return null;
            }
            $expected_sig = hash_hmac('sha256', $payload, $app_secret, $raw = true);
            if ($sig !== $expected_sig) {
                return null;
            }
            $token_url = "https://graph.facebook.com/oauth/access_token?"
                    . "client_id=" . $app_id . "&client_secret=" . $app_secret . "&redirect_uri=" . "&code=" . $data['code'];
    
            $response = @file_get_contents($token_url);
            $params = null;
            parse_str($response, $params);
            $data['access_token'] = $params['access_token'];
            $data['session_key'] = $data['code'];
            return $data;
        } else {
            return null;
        }
    }
    

    Но лушче уже сейчас перейти на PHP SDK.

    Удаление элемента массива по его значению

    <? unset($user_ar[array_search($id,$user_ar)]); ?>
    //var_dump($user_ar);
    

    Парсим html страницу с помощью PHP и nokogiri

    Нашел на Хабре класс, с которым очень легко и удобно парсить страницы.
    Сам класс:

    <?php
    
    /**
     * Description of nokogiri
     *
     * @author olamedia
     */
    class nokogiri implements IteratorAggregate{
        protected $_source = '';
        /**
         * @var DOMDocument
         */
        protected $_dom = null;
        /**
         * @var DOMXpath
         * */
        protected $_xpath = null;
        public function __construct($htmlString = ''){
            $this->loadHtml($htmlString);
        }
        public static function fromHtml($htmlString){
            $me = new self();
            $me->loadHtml($htmlString);
            return $me;
        }
        public static function fromDom($dom){
            $me = new self();
            $me->loadDom($dom);
            return $me;
        }
        public function loadDom($dom){
            $this->_dom = $dom;
            $this->_xpath = new DOMXpath($this->_dom);
        }
        public function loadHtml($htmlString = ''){
            $dom = new DOMDocument('1.0', 'UTF-8');
            $dom->preserveWhiteSpace = false;
            if (strlen($htmlString)){
                libxml_use_internal_errors(TRUE);
                $dom->loadHTML($htmlString);
                libxml_clear_errors();
            }
            $this->loadDom($dom);
        }
        function __invoke($expression){
            return $this->get($expression);
        }
        public function get($expression){
            if (strpos($expression, ' ') !== false){
                $a = explode(' ', $expression);
                foreach ($a as $k => $sub){
                    $a[$k] = $this->getXpathSubquery($sub);
                }
                return $this->getElements(implode('', $a));
            }
            return $this->getElements($this->getXpathSubquery($expression));
        }
        protected function getXpathSubquery($expression){
            $query = '';
            if (preg_match("/(?P<tag>[a-z0-9]+)?(\[(?P<attr>\S+)=(?P<value>\S+)\])?(#(?P<id>\S+))?(\.(?P<class>\S+))?/ims", $expression, $subs)){
                $tag = $subs['tag'];
                $id = $subs['id'];
                $attr = $subs['attr'];
                $attrValue = $subs['value'];
                $class = $subs['class'];
                if (!strlen($tag))
                    $tag = '*';
                $query = '//'.$tag;
                if (strlen($id)){
                    $query .= "[@id='".$id."']";
                }
                if (strlen($attr)){
                    $query .= "[@".$attr."='".$attrValue."']";
                }
                if (strlen($class)){
                    //$query .= "[@class='".$class."']";
                    $query .= '[contains(concat(" ", normalize-space(@class), " "), " '.$class.' ")]';
                }
            }
            return $query;
        }
        protected function getElements($xpathQuery){
            $newDom = new DOMDocument('1.0', 'UTF-8');
            $root = $newDom->createElement('root');
            $newDom->appendChild($root);
            if (strlen($xpathQuery)){
                $nodeList = $this->_xpath->query($xpathQuery);
                if ($nodeList === false){
                    throw new Exception('Malformed xpath');
                }
                foreach ($nodeList as $domElement){
                    $domNode = $newDom->importNode($domElement, true);
                    $root->appendChild($domNode);
                }
                return self::fromDom($newDom);
            }
        }
        public function toXml(){
            return $this->_dom->saveXML();
        }
        public function toArray($xnode = null){
            $array = array();
            if ($xnode === null){
                $node = $this->_dom;
            }else{
                $node = $xnode;
            }
            if ($node->nodeType == XML_TEXT_NODE){
                return $node->nodeValue;
            }
            if ($node->hasAttributes()){
                foreach ($node->attributes as $attr){
                    $array[$attr->nodeName] = $attr->nodeValue;
                }
            }
            if ($node->hasChildNodes()){
                if ($node->childNodes->length == 1){
                    $array[$node->firstChild->nodeName] = $this->toArray($node->firstChild);
                }else{
                    foreach ($node->childNodes as $childNode){
                        if ($childNode->nodeType != XML_TEXT_NODE){
                            $array[$childNode->nodeName][] = $this->toArray($childNode);
                        }
                    }
                }
            }
            if ($xnode === null){
                return reset(reset($array)); // first child
            }
            return $array;
        }
        public function getIterator(){
            $a = $this->toArray();
            return new ArrayIterator($a);
        }
    }
    ?>
    
    Первым делом, делаем запрос к странице и получаем данные:
    1
    $html = file_get_contents('http://kovcheg.apeha.ru/info_user_201746989.html');
    

    Если сайт не UTF-8 кодировке, нам нужно перекодировать данные:

    $html = mb_convert_encoding($html, 'HTML-ENTITIES', "UTF-8");
    

    Теперь создаем объект класса nokogiri и указываем что нам нужно получать:

    $saw = new nokogiri($html);
    $data = $saw->get('table tr td ')->toArray();
    ?>
    <pre>
    <?php
    print_r($data);
    ?>
    </pre>
    

    Мы получаем массив в который очень удобно «влазить» и грабить с него нужные данные:

    echo $data[4]['alt'].'<br>';
    

    От автора:

    Ошибки html игнорируются.
    Распознаются вложеные теги (через пробел), а также конструкции вида .class, #id и [attr=value]
    Создание из строки: nokogiri::fromString($htmlString); или new nokogiri($htmlString);
    Создание из DomDocument: nokogiri::fromDom($dom);

    Дополнительно, можно почитать на Хабре.

    Закругление углов с помощью PIE.htc в Internet Explorer

    А вы знаете, что на сервере закругление углов с помощью PIE.htc не работает в IE? На локалке (без веб-сервера) работают, а на серваке нет?

    Решение предлагаю:
    PIE.htc

    <!--
    PIE: CSS3 rendering for IE
    Version 1.0beta4
    
    http://css3pie.com
    
    Dual-licensed for use under the Apache License Version 2.0 or the General Public License (GPL) Version 2.
    -->
    
    <script type="text/javascript">// <![CDATA[
    var doc = element.document;var g=window.PIE;
    if(!g){g=window.PIE={F:"-pie-",Sa:"Pie",Pa:"pie_",Jb:{TD:1,TH:1}};try{doc.execCommand("BackgroundImageCache",false,true)}catch(L){}g.J=function(){for(var a=4,b=doc.createElement("div"),c=b.getElementsByTagName("i");b.innerHTML="<!--[if gt IE "+ ++a+"]><i></i>< ![endif]--\>",c[0];);return a}();if(g.J===6)g.F=g.F.replace(/^-/,"");g.Ab=doc.documentMode||g.J;(function(){var a,b=0,c={};g.p={Ga:function(e){if(!a){a=doc.createDocumentFragment();a.namespaces.add("css3vml","urn:schemas-microsoft-com:vml")}return a.createElement("css3vml:"+e)},
    ta:function(e){return e&#038;&e._pieId||(e._pieId=++b)},fb:function(e){var f,h,j,d,i=arguments;f=1;for(h=i.length;f<h ;f++){d=i[f];for(j in d)if(d.hasOwnProperty(j))e[j]=d[j]}return e},Pb:function(e,f,h){var j=c[e],d,i;if(j)Object.prototype.toString.call(j)==="[object Array]"?j.push([f,h]):f.call(h,j);else{i=c[e]=[[f,h]];d=new Image;d.onload=function(){j=c[e]={i:d.width,f:d.height};for(var k=0,m=i.length;k<m;k++)i[k][0].call(i[k][1],j);d.onload=null};d.src=e}}}})();g.ia=function(){this.hb=[];this.Db={}};
    g.ia.prototype={aa:function(a){var b=g.p.ta(a),c=this.Db,e=this.hb;if(!(b in c)){c[b]=e.length;e.push(a)}},Ma:function(a){a=g.p.ta(a);var b=this.Db;if(a&#038;&a in b){delete this.hb[b[a]];delete b[a]}},Ia:function(){for(var a=this.hb,b=a.length;b--;)a[b]&#038;&a[b]()}};g.ya=new g.ia;g.ya.Tc=function(){var a=this;if(!a.Uc){setInterval(function(){a.Ia()},250);a.Uc=1}};g.G=new g.ia;window.attachEvent("onbeforeunload",function(){g.G.Ia()});g.G.Ea=function(a,b,c){a.attachEvent(b,c);this.aa(function(){a.detachEvent(b,
    c)})};(function(){function a(){g.za.Ia()}g.za=new g.ia;g.G.Ea(window,"onresize",a)})();(function(){function a(){g.Ra.Ia()}g.Ra=new g.ia;g.G.Ea(window,"onscroll",a);g.za.aa(a)})();(function(){function a(){c=g.Qa.wc()}function b(){if(c){for(var e=0,f=c.length;e<f;e++)g.attach(c[e]);c=0}}var c;g.G.Ea(window,"onbeforeprint",a);g.G.Ea(window,"onafterprint",b)})();g.hd=function(){function a(i){this.V=i}var b=doc.createElement("length-calc"),c=doc.documentElement,e=b.style,f={},h=["mm","cm","in","pt","pc"],
    j=h.length,d={};e.position="absolute";e.top=e.left="-9999px";for(c.appendChild(b);j--;){b.style.width="100"+h[j];f[h[j]]=b.offsetWidth/100}c.removeChild(b);a.prototype={ib:/(px|em|ex|mm|cm|in|pt|pc|%)$/,vb:function(){var i=this.Lc;if(i===void 0)i=this.Lc=parseFloat(this.V);return i},ab:function(){var i=this.ad;if(!i)i=this.ad=(i=this.V.match(this.ib))&#038;&i[0]||"px";return i},a:function(i,k){var m=this.vb(),l=this.ab();switch(l){case "px":return m;case "%":return m*(typeof k==="function"?k():k)/100;
    case "em":return m*this.tb(i);case "ex":return m*this.tb(i)/2;default:return m*f[l]}},tb:function(i){var k=i.currentStyle.fontSize;if(k.indexOf("px")>0)return parseFloat(k);else{b.style.width="1em";i.appendChild(b);k=b.offsetWidth;b.parentNode===i&#038;&i.removeChild(b);return k}}};g.k=function(i){return d[i]||(d[i]=new a(i))};return a}();g.Na=function(){function a(f){this.U=f}var b=g.k("50%"),c={top:1,center:1,bottom:1},e={left:1,center:1,right:1};a.prototype={Dc:function(){if(!this.sb){var f=this.U,
    h=f.length,j=g.u,d=j.ja,i=g.k("0");d=d.fa;i=["left",i,"top",i];if(h===1){f.push(new j.Ta(d,"center"));h++}if(h===2){d&#038;(f[0].h|f[1].h)&#038;&f[0].d in c&#038;&f[1].d in e&#038;&f.push(f.shift());if(f[0].h&#038;d)if(f[0].d==="center")i[1]=b;else i[0]=f[0].d;else if(f[0].Y())i[1]=g.k(f[0].d);if(f[1].h&#038;d)if(f[1].d==="center")i[3]=b;else i[2]=f[1].d;else if(f[1].Y())i[3]=g.k(f[1].d)}this.sb=i}return this.sb},coords:function(f,h,j){var d=this.Dc(),i=d[1].a(f,h);f=d[3].a(f,j);return{x:d[0]==="right"?h-i:i,y:d[2]==="bottom"?
    j-f:f}}};return a}();g.Rb=function(){function a(b){this.V=b}a.prototype={ib:/[a-z]+$/i,ab:function(){return this.lc||(this.lc=this.V.match(this.ib)[0].toLowerCase())},vc:function(){var b=this.fc,c;if(b===undefined){b=this.ab();c=parseFloat(this.V,10);b=this.fc=b==="deg"?c:b==="rad"?c/Math.PI*180:b==="grad"?c/400*360:b==="turn"?c*360:0}return b}};return a}();g.$b=function(){function a(c){this.V=c}var b={};a.Sc=/\s*rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d+|\d*\.\d+)\s*\)\s*/;a.gb=
    {aliceblue:"F0F8FF",antiquewhite:"FAEBD7",aqua:"0FF",aquamarine:"7FFFD4",azure:"F0FFFF",beige:"F5F5DC",bisque:"FFE4C4",black:"000",blanchedalmond:"FFEBCD",blue:"00F",blueviolet:"8A2BE2",brown:"A52A2A",burlywood:"DEB887",cadetblue:"5F9EA0",chartreuse:"7FFF00",chocolate:"D2691E",coral:"FF7F50",cornflowerblue:"6495ED",cornsilk:"FFF8DC",crimson:"DC143C",cyan:"0FF",darkblue:"00008B",darkcyan:"008B8B",darkgoldenrod:"B8860B",darkgray:"A9A9A9",darkgreen:"006400",darkkhaki:"BDB76B",darkmagenta:"8B008B",darkolivegreen:"556B2F",
    darkorange:"FF8C00",darkorchid:"9932CC",darkred:"8B0000",darksalmon:"E9967A",darkseagreen:"8FBC8F",darkslateblue:"483D8B",darkslategray:"2F4F4F",darkturquoise:"00CED1",darkviolet:"9400D3",deeppink:"FF1493",deepskyblue:"00BFFF",dimgray:"696969",dodgerblue:"1E90FF",firebrick:"B22222",floralwhite:"FFFAF0",forestgreen:"228B22",fuchsia:"F0F",gainsboro:"DCDCDC",ghostwhite:"F8F8FF",gold:"FFD700",goldenrod:"DAA520",gray:"808080",green:"008000",greenyellow:"ADFF2F",honeydew:"F0FFF0",hotpink:"FF69B4",indianred:"CD5C5C",
    indigo:"4B0082",ivory:"FFFFF0",khaki:"F0E68C",lavender:"E6E6FA",lavenderblush:"FFF0F5",lawngreen:"7CFC00",lemonchiffon:"FFFACD",lightblue:"ADD8E6",lightcoral:"F08080",lightcyan:"E0FFFF",lightgoldenrodyellow:"FAFAD2",lightgreen:"90EE90",lightgrey:"D3D3D3",lightpink:"FFB6C1",lightsalmon:"FFA07A",lightseagreen:"20B2AA",lightskyblue:"87CEFA",lightslategray:"789",lightsteelblue:"B0C4DE",lightyellow:"FFFFE0",lime:"0F0",limegreen:"32CD32",linen:"FAF0E6",magenta:"F0F",maroon:"800000",mediumauqamarine:"66CDAA",
    mediumblue:"0000CD",mediumorchid:"BA55D3",mediumpurple:"9370D8",mediumseagreen:"3CB371",mediumslateblue:"7B68EE",mediumspringgreen:"00FA9A",mediumturquoise:"48D1CC",mediumvioletred:"C71585",midnightblue:"191970",mintcream:"F5FFFA",mistyrose:"FFE4E1",moccasin:"FFE4B5",navajowhite:"FFDEAD",navy:"000080",oldlace:"FDF5E6",olive:"808000",olivedrab:"688E23",orange:"FFA500",orangered:"FF4500",orchid:"DA70D6",palegoldenrod:"EEE8AA",palegreen:"98FB98",paleturquoise:"AFEEEE",palevioletred:"D87093",papayawhip:"FFEFD5",
    peachpuff:"FFDAB9",peru:"CD853F",pink:"FFC0CB",plum:"DDA0DD",powderblue:"B0E0E6",purple:"800080",red:"F00",rosybrown:"BC8F8F",royalblue:"4169E1",saddlebrown:"8B4513",salmon:"FA8072",sandybrown:"F4A460",seagreen:"2E8B57",seashell:"FFF5EE",sienna:"A0522D",silver:"C0C0C0",skyblue:"87CEEB",slateblue:"6A5ACD",slategray:"708090",snow:"FFFAFA",springgreen:"00FF7F",steelblue:"4682B4",tan:"D2B48C",teal:"008080",thistle:"D8BFD8",tomato:"FF6347",turquoise:"40E0D0",violet:"EE82EE",wheat:"F5DEB3",white:"FFF",
    whitesmoke:"F5F5F5",yellow:"FF0",yellowgreen:"9ACD32"};a.prototype={parse:function(){if(!this.Ca){var c=this.V,e;if(e=c.match(a.Sc)){this.Ca="rgb("+e[1]+","+e[2]+","+e[3]+")";this.qb=parseFloat(e[4])}else{if((e=c.toLowerCase())in a.gb)c="#"+a.gb[e];this.Ca=c;this.qb=c==="transparent"?0:1}}},O:function(c){this.parse();return this.Ca==="currentColor"?c.currentStyle.color:this.Ca},la:function(){this.parse();return this.qb}};g.pa=function(c){return b1
    
    ||(b1
    
    =new a(c))};return a}();g.u=function(){function a(c){this.Ha=
    c;this.ch=0;this.U=[];this.wa=0}var b=a.ja={xa:1,ob:2,ea:4,ac:8,pb:16,fa:32,A:64,ga:128,ha:256,Aa:512,dc:1024,URL:2048};a.Ta=function(c,e){this.h=c;this.d=e};a.Ta.prototype={db:function(){return this.h&#038;b.A||this.h&#038;b.ga&#038;&this.d==="0"},Y:function(){return this.db()||this.h&#038;b.Aa}};a.prototype={dd:/\s/,Mc:/^[\+\-]?(\d*\.)?\d+/,url:/^url\(\s*("([^"]*)"|'([^']*)'|([!#$%&#038;*-~]*))\s*\)/i,zb:/^\-?[_a-z][\w-]*/i,Yc:/^("([^"]*)"|'([^']*)')/,Fc:/^#([\da-f]{6}|[\da-f]{3})/i,bd:{px:b.A,em:b.A,ex:b.A,mm:b.A,cm:b.A,
    "in":b.A,pt:b.A,pc:b.A,deg:b.xa,rad:b.xa,grad:b.xa},sc:{rgb:1,rgba:1,hsl:1,hsla:1},next:function(c){function e(t,n){t=new a.Ta(t,n);if(!c){k.U.push(t);k.wa++}return t}function f(){k.wa++;return null}var h,j,d,i,k=this;if(this.wa
    <this .U.length)return this.U[this.wa++];for(;this.dd.test(this.Ha.charAt(this.ch));)this.ch++;if(this.ch>=this.Ha.length)return f();j=this.ch;h=this.Ha.substring(this.ch);d=h.charAt(0);switch(d){case "#":if(i=h.match(this.Fc)){this.ch+=i[0].length;return e(b.ea,i[0])}break;
    case '"':case "'":if(i=h.match(this.Yc)){this.ch+=i[0].length;return e(b.dc,i[2]||i[3]||"")}break;case "/":case ",":this.ch++;return e(b.ha,d);case "u":if(i=h.match(this.url)){this.ch+=i[0].length;return e(b.URL,i[2]||i[3]||i[4]||"")}}if(i=h.match(this.Mc)){d=i[0];this.ch+=d.length;if(h.charAt(d.length)==="%"){this.ch++;return e(b.Aa,d+"%")}if(i=h.substring(d.length).match(this.zb)){d+=i[0];this.ch+=i[0].length;return e(this.bd[i[0].toLowerCase()]||b.ac,d)}return e(b.ga,d)}if(i=h.match(this.zb)){d=
    i[0];this.ch+=d.length;if(d.toLowerCase()in g.$b.gb||d==="currentColor")return e(b.ea,d);if(h.charAt(d.length)==="("){this.ch++;if(d.toLowerCase()in this.sc){h=function(t){return t&#038;&t.h&#038;b.ga};i=function(t){return t&#038;&t.h&#038;(b.ga|b.Aa)};var m=function(t,n){return t&#038;&t.d===n},l=function(){return k.next(1)};if((d.charAt(0)==="r"?i(l()):h(l()))&#038;&m(l(),",")&#038;&i(l())&#038;&m(l(),",")&#038;&i(l())&#038;&(d==="rgb"||d==="hsa"||m(l(),",")&#038;&h(l()))&#038;&m(l(),")"))return e(b.ea,this.Ha.substring(j,this.ch));return f()}return e(b.pb,
    d)}return e(b.fa,d)}this.ch++;return e(b.ob,d)},z:function(){return this.U[this.wa-- -2]},all:function(){for(;this.next(););return this.U},da:function(c,e){for(var f=[],h,j;h=this.next();){if(c(h)){j=true;this.z();break}f.push(h)}return e&#038;&!j?null:f}};return a}();var M=function(a){this.e=a};M.prototype={K:0,Qc:function(){var a=this.Ua,b;return!a||(b=this.o())&#038;&(a.x!==b.x||a.y!==b.y)},Vc:function(){var a=this.Ua,b;return!a||(b=this.o())&#038;&(a.i!==b.i||a.f!==b.f)},ub:function(){var a=this.e.getBoundingClientRect();
    return{x:a.left,y:a.top,i:a.right-a.left,f:a.bottom-a.top}},o:function(){return this.K?this.Da||(this.Da=this.ub()):this.ub()},Ec:function(){return!!this.Ua},Ja:function(){++this.K},La:function(){if(!--this.K){if(this.Da)this.Ua=this.Da;this.Da=null}}};(function(){function a(b){var c=g.p.ta(b);return function(){if(this.K){var e=this.rb||(this.rb={});return c in e?e1
    
     :( e1
    
    =b.call(this))}else return b.call(this)}}g.s={K:0,$:function(b){function c(e){this.e=e}g.p.fb(c.prototype,g.s,b);c.kc={};return c},
    m:function(){var b=this.qa(),c=this.constructor.kc;return b?b in c?c[b]:(c[b]=this.ba(b)):null},qa:a(function(){var b=this.e,c=this.constructor,e=b.style;b=b.currentStyle;var f=this.na,h=this.va,j=c.ic||(c.ic=g.F+f);c=c.jc||(c.jc=g.Sa+h.charAt(0).toUpperCase()+h.substring(1));return e1
    
    ||b.getAttribute(j)||e[h]||b.getAttribute(f)}),g:a(function(){return!!this.m()}),D:a(function(){var b=this.qa(),c=b!==this.gc;this.gc=b;return c}),ma:a,Ja:function(){++this.K},La:function(){--this.K||delete this.rb}}})();
    g.Tb=g.s.$({na:g.F+"background",va:g.Sa+"Background",nc:{scroll:1,fixed:1,local:1},Ka:{"repeat-x":1,"repeat-y":1,repeat:1,"no-repeat":1},Nc:{"padding-box":1,"border-box":1,"content-box":1},rc:{"padding-box":1,"border-box":1},Rc:{top:1,right:1,bottom:1,left:1,center:1},Wc:{contain:1,cover:1},ba:function(a){function b(u){return u.Y()||u.h&#038;i&#038;&u.d in t}function c(u){return u.Y()&#038;&g.k(u.d)||u.d==="auto"&#038;&"auto"}var e=this.e.currentStyle,f,h,j=g.u.ja,d=j.ha,i=j.fa,k=j.ea,m,l,t=this.Rc,n,p,s=null;if(this.$a()){a=
    new g.u(a);s={M:[]};for(h={};f=a.next();){m=f.h;l=f.d;if(!h.P&#038;&m&#038;j.pb&#038;&l==="linear-gradient"){n={ca:[],P:l};for(p={};f=a.next();){m=f.h;l=f.d;if(m&#038;j.ob&#038;&l===")"){p.color&#038;&n.ca.push(p);n.ca.length>1&#038;&g.p.fb(h,n);break}if(m&#038;k){if(n.Xa||n.bb){f=a.z();if(f.h!==d)break;a.next()}p={color:g.pa(l)};f=a.next();if(f.Y())p.Fb=g.k(f.d);else a.z()}else if(m&#038;j.xa&#038;&!n.Xa&#038;&!p.color&#038;&!n.ca.length)n.Xa=new g.Rb(f.d);else if(b(f)&#038;&!n.bb&#038;&!p.color&#038;&!n.ca.length){a.z();n.bb=new g.Na(a.da(function(u){return!b(u)},false))}else if(m&#038;
    d&#038;&l===","){if(p.color){n.ca.push(p);p={}}}else break}}else if(!h.P&#038;&m&#038;j.URL){h.Cb=l;h.P="image"}else if(b(f)&#038;&!h.size){a.z();h.Ya=new g.Na(a.da(function(u){return!b(u)},false))}else if(m&#038;i)if(l in this.Ka)h.Bb=l;else if(l in this.Nc){h.kd=l;if(l in this.rc)h.clip=l}else{if(l in this.nc)h.jd=l}else if(m&#038;k&#038;&!s.color)s.color=g.pa(l);else if(m&#038;d)if(l==="/"){f=a.next();m=f.h;l=f.d;if(m&#038;i&#038;&l in this.Wc)h.size=l;else if(l=c(f))h.size={i:l,f:c(a.next())||a.z()&#038;&l}}else{if(l===","&#038;&h.P){s.M.push(h);h={}}}else return null}h.P&#038;&
    s.M.push(h)}else this.Nb(function(){var u=e.backgroundPositionX,w=e.backgroundPositionY,r=e.backgroundImage,o=e.backgroundColor;s={};if(o!=="transparent")s.color=g.pa(o);if(r!=="none")s.M=[{P:"image",Cb:(new g.u(r)).next().d,Bb:e.backgroundRepeat,Ya:new g.Na((new g.u(u+" "+w)).all())}]});return s&#038;&(s.color||s.M&#038;&s.M[0])?s:null},Nb:function(a){var b=this.e.runtimeStyle,c=b.backgroundImage,e=b.backgroundColor;if(c)b.backgroundImage="";if(e)b.backgroundColor="";a=a.call(this);if(c)b.backgroundImage=
    c;if(e)b.backgroundColor=e;return a},qa:g.s.ma(function(){return this.$a()||this.Nb(function(){var a=this.e.currentStyle;return a.backgroundColor+" "+a.backgroundImage+" "+a.backgroundRepeat+" "+a.backgroundPositionX+" "+a.backgroundPositionY})}),$a:g.s.ma(function(){var a=this.e;return a.style[this.va]||a.currentStyle.getAttribute(this.na)}),Eb:function(){var a=0;if(g.J&lt;7){a=this.e;a=""+(a.style[g.Sa+"PngFix"]||a.currentStyle.getAttribute(g.F+"png-fix"))==="true"}return a},g:g.s.ma(function(){return(this.$a()||
    this.Eb())&#038;&!!this.m()})});g.Xb=g.s.$({Ib:["Top","Right","Bottom","Left"],Kc:{thin:"1px",medium:"3px",thick:"5px"},ba:function(){var a={},b={},c={},e=false,f=true,h=true,j=true;this.Ob(function(){for(var d=this.e.currentStyle,i=0,k,m,l,t,n,p,s;i&lt;4;i++){l=this.Ib[i];s=l.charAt(0).toLowerCase();k=b[s]=d["border"+l+"Style"];m=d["border"+l+"Color"];l=d["border"+l+"Width"];if(i>0){if(k!==t)h=false;if(m!==n)f=false;if(l!==p)j=false}t=k;n=m;p=l;c[s]=g.pa(m);l=a[s]=g.k(b[s]==="none"?"0":this.Kc[l]||l);if(l.a(this.e)>
    0)e=true}});return e?{nb:a,Zc:b,tc:c,ed:j,uc:f,$c:h}:null},qa:g.s.ma(function(){var a=this.e,b=a.currentStyle,c;a.tagName in g.Jb&#038;&a.offsetParent.currentStyle.borderCollapse==="collapse"||this.Ob(function(){c=b.borderWidth+"|"+b.borderStyle+"|"+b.borderColor});return c}),Ob:function(a){var b=this.e.runtimeStyle,c=b.borderWidth,e=b.borderColor;if(c)b.borderWidth="";if(e)b.borderColor="";a=a.call(this);if(c)b.borderWidth=c;if(e)b.borderColor=e;return a}});(function(){g.Oa=g.s.$({na:"border-radius",
    va:"borderRadius",ba:function(b){var c=null,e,f,h,j,d=false;if(b){f=new g.u(b);var i=function(){for(var k=[],m;(h=f.next())&#038;&h.Y();){j=g.k(h.d);m=j.vb();if(m&lt;0)return null;if(m>0)d=true;k.push(j)}return k.length>0&#038;&k.length&lt;5?{tl:k[0],tr:k[1]||k[0],br:k[2]||k[0],bl:k[3]||k[1]||k[0]}:null};if(b=i()){if(h){if(h.h&#038;g.u.ja.ha&#038;&h.d==="/")e=i()}else e=b;if(d&#038;&b&#038;&e)c={x:b,y:e}}}return c}});var a=g.k("0");a={tl:a,tr:a,br:a,bl:a};g.Oa.Qb={x:a,y:a}})();g.Vb=g.s.$({na:"border-image",va:"borderImage",Ka:{stretch:1,
    round:1,repeat:1,space:1},ba:function(a){var b=null,c,e,f,h,j,d,i=0,k,m=g.u.ja,l=m.fa,t=m.ga,n=m.A,p=m.Aa;if(a){c=new g.u(a);b={};for(var s=function(r){return r&#038;&r.h&#038;m.ha&#038;&r.d==="/"},u=function(r){return r&#038;&r.h&#038;l&#038;&r.d==="fill"},w=function(){h=c.da(function(r){return!(r.h&#038;(t|p))});if(u(c.next())&#038;&!b.fill)b.fill=true;else c.z();if(s(c.next())){i++;j=c.da(function(){return!(e.h&#038;(t|p|n))&#038;&!(e.h&#038;l&#038;&e.d==="auto")});if(s(c.next())){i++;d=c.da(function(){return!(e.h&#038;(t|n))})}}else c.z()};e=c.next();){a=e.h;
    f=e.d;if(a&#038;(t|p)&#038;&!h){c.z();w()}else if(u(e)&#038;&!b.fill){b.fill=true;w()}else if(a&#038;l&#038;&this.Ka[f]&#038;&!b.repeat){b.repeat={f:f};if(e=c.next())if(e.h&#038;l&#038;&this.Ka[e.d])b.repeat.kb=e.d;else c.z()}else if(a&#038;m.URL&#038;&!b.src)b.src=f;else return null}if(!b.src||!h||h.length&lt;1||h.length>4||j&#038;&j.length>4||i===1&#038;&j.length&lt;1||d&#038;&d.length>4||i===2&#038;&d.length&lt;1)return null;if(!b.repeat)b.repeat={f:"stretch"};if(!b.repeat.kb)b.repeat.kb=b.repeat.f;a=function(r,o){return{T:o(r[0]),S:o(r[1]||r[0]),L:o(r[2]||r[0]),Q:o(r[3]||
    r[1]||r[0])}};b.slice=a(h,function(r){return g.k(r.h&#038;t?r.d+"px":r.d)});b.width=j&#038;&j.length>0?a(j,function(r){return r.h&#038;(n|p)?g.k(r.d):r.d}):(k=this.e.currentStyle)&#038;&{T:g.k(k.borderTopWidth),S:g.k(k.borderRightWidth),L:g.k(k.borderBottomWidth),Q:g.k(k.borderLeftWidth)};b.ua=a(d||[0],function(r){return r.h&#038;n?g.k(r.d):r.d})}return b}});g.Zb=g.s.$({na:"box-shadow",va:"boxShadow",ba:function(a){var b,c=g.k,e=g.u.ja,f;if(a){f=new g.u(a);b={ua:[],cb:[]};for(a=function(){for(var h,j,d,i,k,m;h=f.next();){d=
    h.d;j=h.h;if(j&#038;e.ha&#038;&d===",")break;else if(h.db()&#038;&!k){f.z();k=f.da(function(l){return!l.db()})}else if(j&#038;e.ea&#038;&!i)i=d;else if(j&#038;e.fa&#038;&d==="inset"&#038;&!m)m=true;else return false}h=k&#038;&k.length;if(h>1&#038;&h&lt;5){(m?b.cb:b.ua).push({fd:c(k[0].d),gd:c(k[1].d),blur:c(k[2]?k[2].d:"0"),Xc:c(k[3]?k[3].d:"0"),color:g.pa(i||"currentColor")});return true}return false};a(););}return b&#038;&(b.cb.length||b.ua.length)?b:null}});g.ec=g.s.$({qa:g.s.ma(function(){var a=this.e.currentStyle;return a.visibility+"|"+a.display}),
    ba:function(){var a=this.e,b=a.runtimeStyle;a=a.currentStyle;var c=b.visibility,e;b.visibility="";e=a.visibility;b.visibility=c;return{cd:e!=="hidden",xc:a.display!=="none"}},g:function(){return false}});g.B={Z:function(a){function b(c,e,f,h){this.e=c;this.q=e;this.j=f;this.parent=h}g.p.fb(b.prototype,g.B,a);return b},eb:false,R:function(){return false},Kb:function(){this.n();this.g()&#038;&this.X()},jb:function(){this.eb=true},Lb:function(){this.g()?this.X():this.n()},Wa:function(a,b){this.Hb(a);for(var c=
    this.ka||(this.ka=[]),e=a+1,f=c.length,h;e<f ;e++)if(h=c[e])break;c[a]=b;this.w().insertBefore(b,h||null)},ra:function(a){var b=this.ka;return b&#038;&b[a]||null},Hb:function(a){var b=this.ra(a),c=this.Ba;if(b&#038;&c){c.removeChild(b);this.ka[a]=null}},sa:function(a,b,c,e){var f=this.Va||(this.Va={}),h=f[a];if(!h){h=f[a]=g.p.Ga("shape");if(b)h.appendChild(h[b]=g.p.Ga(b));if(e){c=this.ra(e);if(!c){this.Wa(e,doc.createElement("group"+e));c=this.ra(e)}}c.appendChild(h);a=h.style;a.position="absolute";a.left=a.top=
    0;a.behavior="url(#default#VML)"}return h},Za:function(a){var b=this.Va,c=b&#038;&b[a];if(c){c.parentNode.removeChild(c);delete b[a]}return!!c},xb:function(a){var b=this.e,c=this.q.o(),e=c.i,f=c.f,h,j,d,i,k,m;c=a.x.tl.a(b,e);h=a.y.tl.a(b,f);j=a.x.tr.a(b,e);d=a.y.tr.a(b,f);i=a.x.br.a(b,e);k=a.y.br.a(b,f);m=a.x.bl.a(b,e);a=a.y.bl.a(b,f);e=Math.min(e/(c+j),f/(d+k),e/(m+i),f/(h+a));if(e&lt;1){c*=e;h*=e;j*=e;d*=e;i*=e;k*=e;m*=e;a*=e}return{x:{tl:c,tr:j,br:i,bl:m},y:{tl:h,tr:d,br:k,bl:a}}},oa:function(a,b,c){b=
    b||1;var e,f,h=this.q.o();f=h.i*b;h=h.f*b;var j=this.j.v,d=Math.floor,i=Math.ceil,k=a?a.T*b:0,m=a?a.S*b:0,l=a?a.L*b:0;a=a?a.Q*b:0;var t,n,p,s,u;if(c||j.g()){e=this.xb(c||j.m());c=e.x.tl*b;j=e.y.tl*b;t=e.x.tr*b;n=e.y.tr*b;p=e.x.br*b;s=e.y.br*b;u=e.x.bl*b;b=e.y.bl*b;f="m"+d(a)+","+d(j)+"qy"+d(c)+","+d(k)+"l"+i(f-t)+","+d(k)+"qx"+i(f-m)+","+d(n)+"l"+i(f-m)+","+i(h-s)+"qy"+i(f-p)+","+i(h-l)+"l"+d(u)+","+i(h-l)+"qx"+d(a)+","+i(h-b)+" x e"}else f="m"+d(a)+","+d(k)+"l"+i(f-m)+","+d(k)+"l"+i(f-m)+","+i(h-
    l)+"l"+d(a)+","+i(h-l)+"xe";return f},w:function(){var a=this.parent.ra(this.C),b;if(!a){a=doc.createElement(this.Fa);b=a.style;b.position="absolute";b.top=b.left=0;this.parent.Wa(this.C,a)}return a},n:function(){this.parent.Hb(this.C);delete this.Va;delete this.ka}};g.cc=g.B.Z({g:function(){var a=this.oc;for(var b in a)if(a.hasOwnProperty(b)&#038;&a[b].g())return true;return false},R:function(){return this.j.lb.D()},jb:function(){if(this.g()){var a=this.wb(),b=a,c;a=a.currentStyle;var e=a.position,f=
    this.w().style,h=0,j=0;j=this.q.o();if(e==="fixed"&#038;&g.J>6){h=j.x;j=j.y;b=e}else{do b=b.offsetParent;while(b&#038;&b.currentStyle.position==="static");if(b){c=b.getBoundingClientRect();b=b.currentStyle;h=j.x-c.left-(parseFloat(b.borderLeftWidth)||0);j=j.y-c.top-(parseFloat(b.borderTopWidth)||0)}else{b=doc.documentElement;h=j.x+b.scrollLeft-b.clientLeft;j=j.y+b.scrollTop-b.clientTop}b="absolute"}f.position=b;f.left=h;f.top=j;f.zIndex=e==="static"?-1:a.zIndex;this.eb=true}},Lb:function(){},Mb:function(){var a=
    this.j.lb.m();this.w().style.display=a.cd&#038;&a.xc?"":"none"},Kb:function(){this.g()?this.Mb():this.n()},wb:function(){var a=this.e;return a.tagName in g.Jb?a.offsetParent:a},w:function(){var a=this.Ba,b;if(!a){b=this.wb();a=this.Ba=doc.createElement("css3-container");a.style.direction="ltr";this.Mb();b.parentNode.insertBefore(a,b)}return a},n:function(){var a=this.Ba,b;if(a&#038;&(b=a.parentNode))b.removeChild(a);delete this.Ba;delete this.ka}});g.Sb=g.B.Z({C:2,Fa:"background",R:function(){var a=this.j;
    return a.H.D()||a.v.D()},g:function(){var a=this.j;return a.N.g()||a.v.g()||a.H.g()||a.W.g()&#038;&a.W.m().cb},X:function(){var a=this.q.o();if(a.i&#038;&a.f){this.yc();this.zc()}},yc:function(){var a=this.j.H.m(),b=this.q.o(),c=this.e,e=a&#038;&a.color,f,h;if(e&#038;&e.la()>0){this.yb();a=this.sa("bgColor","fill",this.w(),1);f=b.i;b=b.f;a.stroked=false;a.coordsize=f*2+","+b*2;a.coordorigin="1,1";a.path=this.oa(null,2);h=a.style;h.width=f;h.height=b;a.fill.color=e.O(c);c=e.la();if(c&lt;1)a.fill.opacity=c}else this.Za("bgColor")},
    zc:function(){var a=this.j.H.m(),b=this.q.o();a=a&#038;&a.M;var c,e,f,h,j;if(a){this.yb();e=b.i;f=b.f;for(j=a.length;j--;){b=a[j];c=this.sa("bgImage"+j,"fill",this.w(),2);c.stroked=false;c.fill.type="tile";c.fillcolor="none";c.coordsize=e*2+","+f*2;c.coordorigin="1,1";c.path=this.oa(0,2);h=c.style;h.width=e;h.height=f;if(b.P==="linear-gradient")this.mc(c,b);else{c.fill.src=b.Cb;this.Pc(c,j)}}}for(j=a?a.length:0;this.Za("bgImage"+j++););},Pc:function(a,b){g.p.Pb(a.fill.src,function(c){var e=a.fill,f=this.e,
    h=this.q.o(),j=h.i;h=h.f;var d=this.j,i=d.I.m(),k=i&#038;&i.nb;i=k?k.t.a(f):0;var m=k?k.r.a(f):0,l=k?k.b.a(f):0;k=k?k.l.a(f):0;d=d.H.m().M[b];f=d.Ya?d.Ya.coords(f,j-c.i-k-m,h-c.f-i-l):{x:0,y:0};d=d.Bb;l=m=0;var t=j+1,n=h+1,p=g.J===8?0:1;k=Math.round(f.x)+k+0.5;i=Math.round(f.y)+i+0.5;e.position=k/j+","+i/h;if(d&#038;&d!=="repeat"){if(d==="repeat-x"||d==="no-repeat"){m=i+1;n=i+c.f+p}if(d==="repeat-y"||d==="no-repeat"){l=k+1;t=k+c.i+p}a.style.clip="rect("+m+"px,"+t+"px,"+n+"px,"+l+"px)"}},this)},mc:function(a,
    b){function c(B,C,z,F,H){if(z===0||z===180)return[F,C];else if(z===90||z===270)return[B,H];else{z=Math.tan(-z*t/180);B=z*B-C;C=-1/z;F=C*F-H;H=C-z;return[(F-B)/H,(z*F-C*B)/H]}}function e(){w=m>=90&#038;&m&lt;270?i:0;r=m&lt;180?k:0;o=i-w;x=k-r}function f(){for(;m&lt;0;)m+=360;m%=360}function h(B,C){var z=C[0]-B[0];B=C[1]-B[1];return Math.abs(z===0?B:B===0?z:Math.sqrt(z*z+B*B))}var j=this.e,d=this.q.o(),i=d.i,k=d.f;a=a.fill;var m=b.Xa,l=b.bb;b=b.ca;d=b.length;var t=Math.PI,n,p,s,u,w,r,o,x,q,y,A,D;if(l){l=l.coords(j,
    i,k);n=l.x;p=l.y}if(m){m=m.vc();f();e();if(!l){n=w;p=r}l=c(n,p,m,o,x);s=l[0];u=l[1]}else if(l){s=i-n;u=k-p}else{n=p=s=0;u=k}l=s-n;q=u-p;if(m===void 0){m=!l?q&lt;0?90:270:!q?l&lt;0?180:0:-Math.atan2(q,l)/t*180;f();e()}l=m%90?Math.atan2(l*i/k,q)/t*180:m+90;l+=180;l%=360;y=h([n,p],[s,u]);s=h([w,r],c(w,r,m,o,x));u=[];p=h([n,p],c(n,p,m,w,r))/s*100;n=[];for(q=0;q<d ;q++)n.push(b[q].Fb?b[q].Fb.a(j,y):q===0?0:q===d-1?y:null);for(q=1;q<d;q++){if(n[q]===null){A=n[q-1];y=q;do D=n[++y];while(D===null);n[q]=A+(D-A)/
    (y-q+1)}n[q]=Math.max(n[q],n[q-1])}for(q=0;q<d;q++)u.push(p+n[q]/s*100+"% "+b[q].color.O(j));a.angle=l;a.type="gradient";a.method="sigma";a.color=b[0].color.O(j);a.color2=b[d-1].color.O(j);a.colors.value=u.join(",")},yb:function(){var a=this.e.runtimeStyle;a.backgroundImage="url(about:blank)";a.backgroundColor="transparent"},n:function(){g.B.n.call(this);var a=this.e.runtimeStyle;a.backgroundImage=a.backgroundColor=""}});g.Wb=g.B.Z({C:4,Fa:"border",qc:{TABLE:1,INPUT:1,TEXTAREA:1,SELECT:1,OPTION:1,
    IMG:1,HR:1,FIELDSET:1},Jc:{submit:1,button:1,reset:1},R:function(){var a=this.j;return a.I.D()||a.v.D()},g:function(){var a=this.j;return(a.N.g()||a.v.g()||a.H.g())&#038;&a.I.g()},X:function(){var a=this.e,b=this.j.I.m(),c=this.q.o(),e=c.i;c=c.f;var f,h,j,d,i;if(b){this.Hc();b=this.Bc(2);d=0;for(i=b.length;d<i;d++){j=b[d];f=this.sa("borderPiece"+d,j.stroke?"stroke":"fill",this.w());f.coordsize=e*2+","+c*2;f.coordorigin="1,1";f.path=j.path;h=f.style;h.width=e;h.height=c;f.filled=!!j.fill;f.stroked=!!j.stroke;
    if(j.stroke){f=f.stroke;f.weight=j.mb+"px";f.color=j.color.O(a);f.dashstyle=j.stroke==="dashed"?"2 2":j.stroke==="dotted"?"1 1":"solid";f.linestyle=j.stroke==="double"&#038;&j.mb>2?"ThinThin":"Single"}else f.fill.color=j.fill.O(a)}for(;this.Za("borderPiece"+d++););}},Hc:function(){var a=this.e,b=a.currentStyle,c=a.runtimeStyle,e=a.tagName,f=g.J===6,h;if(f&#038;&e in this.qc||e==="BUTTON"||e==="INPUT"&#038;&a.type in this.Jc){c.borderWidth="";e=this.j.I.Ib;for(h=e.length;h--;){f=e[h];c["padding"+f]="";c["padding"+
    f]=g.k(b["padding"+f]).a(a)+g.k(b["border"+f+"Width"]).a(a)+(!g.J===8&#038;&h%2?1:0)}c.borderWidth=0}else if(f){if(a.childNodes.length!==1||a.firstChild.tagName!=="ie6-mask"){b=doc.createElement("ie6-mask");e=b.style;e.visibility="visible";for(e.zoom=1;e=a.firstChild;)b.appendChild(e);a.appendChild(b);c.visibility="hidden"}}else c.borderColor="transparent"},Bc:function(a){var b=this.e,c,e,f,h=this.j.I,j=[],d,i,k,m,l=Math.round,t,n,p;if(h.g()){c=h.m();h=c.nb;n=c.Zc;p=c.tc;if(c.ed&#038;&c.$c&#038;&c.uc){if(p.t.la()>
    0){c=h.t.a(b);k=c/2;j.push({path:this.oa({T:k,S:k,L:k,Q:k},a),stroke:n.t,color:p.t,mb:c})}}else{a=a||1;c=this.q.o();e=c.i;f=c.f;c=l(h.t.a(b));k=l(h.r.a(b));m=l(h.b.a(b));b=l(h.l.a(b));var s={t:c,r:k,b:m,l:b};b=this.j.v;if(b.g())t=this.xb(b.m());d=Math.floor;i=Math.ceil;var u=function(o,x){return t?t[o][x]:0},w=function(o,x,q,y,A,D){var B=u("x",o),C=u("y",o),z=o.charAt(1)==="r";o=o.charAt(0)==="b";return B>0&#038;&C>0?(D?"al":"ae")+(z?i(e-B):d(B))*a+","+(o?i(f-C):d(C))*a+","+(d(B)-x)*a+","+(d(C)-q)*a+","+
    y*65535+","+2949075*(A?1:-1):(D?"m":"l")+(z?e-x:x)*a+","+(o?f-q:q)*a},r=function(o,x,q,y){var A=o==="t"?d(u("x","tl"))*a+","+i(x)*a:o==="r"?i(e-x)*a+","+d(u("y","tr"))*a:o==="b"?i(e-u("x","br"))*a+","+d(f-x)*a:d(x)*a+","+i(f-u("y","bl"))*a;o=o==="t"?i(e-u("x","tr"))*a+","+i(x)*a:o==="r"?i(e-x)*a+","+i(f-u("y","br"))*a:o==="b"?d(u("x","bl"))*a+","+d(f-x)*a:d(x)*a+","+d(u("y","tl"))*a;return q?(y?"m"+o:"")+"l"+A:(y?"m"+A:"")+"l"+o};b=function(o,x,q,y,A,D){var B=o==="l"||o==="r",C=s[o],z,F;if(C>0&#038;&n[o]!==
    "none"&#038;&p[o].la()>0){z=s[B?o:x];x=s[B?x:o];F=s[B?o:q];q=s[B?q:o];if(n[o]==="dashed"||n[o]==="dotted"){j.push({path:w(y,z,x,D+45,0,1)+w(y,0,0,D,1,0),fill:p[o]});j.push({path:r(o,C/2,0,1),stroke:n[o],mb:C,color:p[o]});j.push({path:w(A,F,q,D,0,1)+w(A,0,0,D-45,1,0),fill:p[o]})}else j.push({path:w(y,z,x,D+45,0,1)+r(o,C,0,0)+w(A,F,q,D,0,0)+(n[o]==="double"&#038;&C>2?w(A,F-d(F/3),q-d(q/3),D-45,1,0)+r(o,i(C/3*2),1,0)+w(y,z-d(z/3),x-d(x/3),D,1,0)+"x "+w(y,d(z/3),d(x/3),D+45,0,1)+r(o,d(C/3),1,0)+w(A,d(F/3),d(q/
    3),D,0,0):"")+w(A,0,0,D-45,1,0)+r(o,0,1,0)+w(y,0,0,D,1,0),fill:p[o]})}};b("t","l","r","tl","tr",90);b("r","t","b","tr","br",0);b("b","r","l","br","bl",-90);b("l","b","t","bl","tl",-180)}}return j},n:function(){g.B.n.call(this);this.e.runtimeStyle.borderColor=""}});g.Ub=g.B.Z({C:5,Oc:["t","tr","r","br","b","bl","l","tl","c"],R:function(){return this.j.N.D()},g:function(){return this.j.N.g()},X:function(){this.w();var a=this.j.N.m(),b=this.q.o(),c=this.e,e=this.Gb;g.p.Pb(a.src,function(f){function h(w,
    r,o,x,q){w=e[w].style;var y=Math.max;w.width=y(r,0);w.height=y(o,0);w.left=x;w.top=q}function j(w,r,o){for(var x=0,q=w.length;x<q ;x++)e[w[x]].imagedata[r]=o}var d=b.i,i=b.f,k=a.width,m=k.T.a(c),l=k.S.a(c),t=k.L.a(c);k=k.Q.a(c);var n=a.slice,p=n.T.a(c),s=n.S.a(c),u=n.L.a(c);n=n.Q.a(c);h("tl",k,m,0,0);h("t",d-k-l,m,k,0);h("tr",l,m,d-l,0);h("r",l,i-m-t,d-l,m);h("br",l,t,d-l,i-t);h("b",d-k-l,t,k,i-t);h("bl",k,t,0,i-t);h("l",k,i-m-t,0,m);h("c",d-k-l,i-m-t,k,m);j(["tl","t","tr"],"cropBottom",(f.f-p)/f.f);
    j(["tl","l","bl"],"cropRight",(f.i-n)/f.i);j(["bl","b","br"],"cropTop",(f.f-u)/f.f);j(["tr","r","br"],"cropLeft",(f.i-s)/f.i);if(a.repeat.kb==="stretch"){j(["l","r","c"],"cropTop",p/f.f);j(["l","r","c"],"cropBottom",u/f.f)}if(a.repeat.f==="stretch"){j(["t","b","c"],"cropLeft",n/f.i);j(["t","b","c"],"cropRight",s/f.i)}e.c.style.display=a.fill?"":"none"},this)},w:function(){var a=this.parent.ra(this.C),b,c,e,f=this.Oc,h=f.length;if(!a){a=doc.createElement("border-image");b=a.style;b.position="absolute";
    this.Gb={};for(e=0;e<h;e++){c=this.Gb[f[e]]=g.p.Ga("rect");c.appendChild(g.p.Ga("imagedata"));b=c.style;b.behavior="url(#default#VML)";b.position="absolute";b.top=b.left=0;c.imagedata.src=this.j.N.m().src;c.stroked=false;c.filled=false;a.appendChild(c)}this.parent.Wa(this.C,a)}return a}});g.Yb=g.B.Z({C:1,Fa:"outset-box-shadow",R:function(){var a=this.j;return a.W.D()||a.v.D()},g:function(){var a=this.j.W;return a.g()&#038;&a.m().ua[0]},X:function(){function a(z,F,H,K,J,v,E){z=b.sa("shadow"+z+F,"fill",
    e,j-z);F=z.fill;z.coordsize=m*2+","+l*2;z.coordorigin="1,1";z.stroked=false;z.filled=true;F.color=J.O(c);if(v){F.type="gradienttitle";F.color2=F.color;F.opacity=0}z.path=E;u=z.style;u.left=H;u.top=K;u.width=m;u.height=l;return z}var b=this,c=this.e,e=this.w(),f=this.j,h=f.W.m().ua;f=f.v.m();var j=h.length,d=j,i,k=this.q.o(),m=k.i,l=k.f;k=g.J===8?1:0;for(var t=["tl","tr","br","bl"],n,p,s,u,w,r,o,x,q,y,A,D,B,C;d--;){p=h[d];w=p.fd.a(c);r=p.gd.a(c);i=p.Xc.a(c);o=p.blur.a(c);p=p.color;x=-i-o;if(!f&#038;&o)f=
    g.Oa.Qb;x=this.oa({T:x,S:x,L:x,Q:x},2,f);if(o){q=(i+o)*2+m;y=(i+o)*2+l;A=o*2/q;D=o*2/y;if(o-i>m/2||o-i>l/2)for(i=4;i--;){n=t[i];B=n.charAt(0)==="b";C=n.charAt(1)==="r";n=a(d,n,w,r,p,o,x);s=n.fill;s.focusposition=(C?1-A:A)+","+(B?1-D:D);s.focussize="0,0";n.style.clip="rect("+((B?y/2:0)+k)+"px,"+(C?q:q/2)+"px,"+(B?y:y/2)+"px,"+((C?q/2:0)+k)+"px)"}else{n=a(d,"",w,r,p,o,x);s=n.fill;s.focusposition=A+","+D;s.focussize=1-A*2+","+(1-D*2)}}else{n=a(d,"",w,r,p,o,x);w=p.la();if(w&lt;1)n.fill.opacity=w}}}});g.bc=
    g.B.Z({C:6,Fa:"imgEl",R:function(){var a=this.j;return this.e.src!==this.hc||a.v.D()},g:function(){var a=this.j;return a.v.g()||a.H.Eb()},X:function(){this.hc=j;this.Gc();var a=this.sa("img","fill",this.w()),b=a.fill,c=this.q.o(),e=c.i;c=c.f;var f=this.j.I.m();f=f&#038;&f.nb;var h=this.e,j=h.src,d=Math.round;a.stroked=false;b.type="frame";b.src=j;b.position=(e?0.5/e:0)+","+(c?0.5/c:0);a.coordsize=e*2+","+c*2;a.coordorigin="1,1";a.path=this.oa(f?{T:d(f.t.a(h)),S:d(f.r.a(h)),L:d(f.b.a(h)),Q:d(f.l.a(h))}:
    0,2);a=a.style;a.width=e;a.height=c},Gc:function(){this.e.runtimeStyle.filter="alpha(opacity=0)"},n:function(){g.B.n.call(this);this.e.runtimeStyle.filter=""}});g.Qa=function(){function a(d){function i(){if(!z){var v,E,G=d.currentStyle,I=G.getAttribute(c)==="true";J=G.getAttribute(e);J=g.Ab===8?J!=="false":J==="true";if(!C){C=1;d.runtimeStyle.zoom=1;G=d;for(var O=1;G=G.previousSibling;)if(G.nodeType===1){O=0;break}if(O)d.className+=" "+g.Pa+"first-child"}y.Ja();if(I&#038;&(E=y.o())&#038;&(v=doc.documentElement||
    doc.body)&#038;&(E.y>v.clientHeight||E.x>v.clientWidth||E.y+E.f&lt;0||E.x+E.i&lt;0)){if(!H){H=1;g.Ra.aa(i)}}else{z=1;H=C=0;g.Ra.Ma(i);A={H:new g.Tb(d),I:new g.Xb(d),N:new g.Vb(d),v:new g.Oa(d),W:new g.Zb(d),lb:new g.ec(d)};D=[A.H,A.I,A.N,A.v,A.W,A.lb];v=new g.cc(d,y,A);E=[new g.Yb(d,y,A,v),new g.Sb(d,y,A,v),new g.Wb(d,y,A,v),new g.Ub(d,y,A,v)];d.tagName==="IMG"&#038;&E.push(new g.bc(d,y,A,v));v.oc=E;q=[v].concat(E);if(v=d.currentStyle.getAttribute(g.F+"watch-ancestors")){B=[];v=parseInt(v,10);E=0;for(I=d.parentNode;I&#038;&
    (v==="NaN"||E++<v );){B.push(I);I.attachEvent("onpropertychange",u);I.attachEvent("onmouseenter",p);I.attachEvent("onmouseleave",s);I=I.parentNode}}if(J){g.ya.aa(m);g.ya.Tc()}m(1)}if(!F){F=1;d.attachEvent("onmove",k);d.attachEvent("onresize",k);d.attachEvent("onpropertychange",l);d.attachEvent("onmouseenter",p);d.attachEvent("onmouseleave",s);g.za.aa(k);g.G.aa(o)}y.La()}}function k(){y&#038;&y.Ec()&#038;&m()}function m(v){if(!K)if(z){var E,G;w();if(v||y.Qc()){E=0;for(G=q.length;E<G;E++)q[E].jb()}if(v||y.Vc()){E=
    0;for(G=q.length;E<G;E++)q[E].Lb()}r()}else C||i()}function l(){var v,E,G;v=event;if(!K&#038;&!(v&#038;&v.propertyName in j))if(z){w();v=0;for(E=q.length;v<E;v++){G=q[v];G.eb||G.jb();G.R()&#038;&G.Kb()}r()}else C||i()}function t(){if(d)d.className+=f}function n(){if(d)d.className=d.className.replace(h,"")}function p(){setTimeout(t,0)}function s(){setTimeout(n,0)}function u(){var v=event.propertyName;if(v==="className"||v==="id")l()}function w(){y.Ja();for(var v=D.length;v--;)D[v].Ja()}function r(){for(var v=D.length;v--;)D[v].La();
    y.La()}function o(){if(F){if(B)for(var v=0,E=B.length,G;v<E;v++){G=B[v];G.detachEvent("onpropertychange",u);G.detachEvent("onmouseenter",p);G.detachEvent("onmouseleave",s)}d.detachEvent("onmove",m);d.detachEvent("onresize",m);d.detachEvent("onpropertychange",l);d.detachEvent("onmouseenter",p);d.detachEvent("onmouseleave",s);g.G.Ma(o);F=0}}function x(){if(!K){var v,E;o();K=1;if(q){v=0;for(E=q.length;v<E;v++)q[v].n()}J&#038;&g.ya.Ma(m);g.za.Ma(m);q=y=A=D=B=d=null}}var q,y=new M(d),A,D,B,C,z,F,H,K,J;this.Ic=
    i;this.update=m;this.n=x;this.Ac=d}var b={},c=g.F+"lazy-init",e=g.F+"poll",f=" "+g.Pa+"hover",h=new RegExp("\\b"+g.Pa+"hover\\b","g"),j={background:1,bgColor:1,display:1};a.Cc=function(d){var i=g.p.ta(d);return b[i]||(b[i]=new a(d))};a.n=function(d){d=g.p.ta(d);var i=b[d];if(i){i.n();delete b[d]}};a.wc=function(){var d=[],i;if(b){for(var k in b)if(b.hasOwnProperty(k)){i=b[k];d.push(i.Ac);i.n()}b={}}return d};return a}();g.attach=function(a){g.Ab&lt;9&#038;&g.Qa.Cc(a).Ic()};g.detach=function(a){g.Qa.n(a)}};
    var N=window.PIE,P=element;function init(){N&#038;&doc.media!=="print"&#038;&N.attach(P)}function cleanup(){if(N){N.detach(P);N=P=0}}P.readyState==="complete"&#038;&init();
    // ]]></script>
    

    Теперь делаем фокус:) открываем стиль и меняем в behavior PIE.htc на PIE.php.
    Получим:

      behavior: url("../css/PIE.php");
    

    в папке css создадим файл PIE.php с таким содержанием:

    <?php
    header( 'Content-type: text/x-component' );
    include( 'PIE.htc' );
    ?>
    

    Всё, наслаждайтесь закруглением углов с помощью CSS3 в IE без картинок ;)

    Функция, которая выводит глубину элемента в (id, parent_id)

        public function getRoot($id)
        {
    
            if ($id > 0)
            {
                $sql = $this->getAdapter()->select()
                        ->from('pages', array('parent_id'))
                        ->where('id = ?', $id)
                        ->limit('1');
                $stmt = $this->getAdapter()->query($sql);
                $result = $stmt->fetchObject();
    
                if ($result->parent_id > 0)
                {
                    $this->depth++;
                    $this->getRoot($result->parent_id);
                }
                return $this->depth;
            }
        }