code stringlengths 1 2.08M | language stringclasses 1 value |
|---|---|
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('devtools','lv',{devTools:{title:'Elementa informācija',dialogName:'Dialoga loga nosaukums',tabName:'Cilnes nosaukums',elementId:'Elementa ID',elementType:'Elementa tips'}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('devtools','zh-cn',{devTools:{title:'元素信息',dialogName:'对话框窗口名称',tabName:'Tab 名称',elementId:'元素 ID',elementType:'元素类型'}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('placeholder','cs',{placeholder:{title:'Vlastnosti vyhrazeného prostoru',toolbar:'Vytvořit vyhrazený prostor',text:'Vyhrazený text',edit:'Upravit vyhrazený prostor',textMissing:'Vyhrazený prostor musí obsahovat text.'}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('placeholder','eo',{placeholder:{title:'Atributoj de la rezervita spaco',toolbar:'Krei la rezervitan spacon',text:'Texto de la rezervita spaco',edit:'Modifi la rezervitan spacon',textMissing:'La rezervita spaco devas enteni tekston.'}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('placeholder','bg',{placeholder:{title:'Настройки на контейнера',toolbar:'Нов контейнер',text:'Текст за контейнера',edit:'Промяна на контейнер',textMissing:'Контейнера трябва да съдържа текст.'}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('placeholder','sk',{placeholder:{title:'Vlastnosti placeholdera',toolbar:'Vytvoriť placeholder',text:'Text placeholdera',edit:'Upraviť placeholder',textMissing:'Placeholder musí obsahovať text.'}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('placeholder','pl',{placeholder:{title:'Właściwości wypełniacza',toolbar:'Utwórz wypełniacz',text:'Tekst wypełnienia',edit:'Edytuj wypełnienie',textMissing:'Wypełnienie musi posiadać jakiś tekst.'}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('placeholder','nl',{placeholder:{title:'Eigenschappen placeholder',toolbar:'Placeholder aanmaken',text:'Placeholder tekst',edit:'Placeholder wijzigen',textMissing:'De placeholder moet tekst bevatten.'}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('placeholder','da',{placeholder:{title:'Egenskaber for pladsholder',toolbar:'Opret pladsholder',text:'Tekst til pladsholder',edit:'Redigér pladsholder',textMissing:'Pladsholder skal indeholde tekst'}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('placeholder','tr',{placeholder:{title:'Yer tutucu özellikleri',toolbar:'Yer tutucu oluşturun',text:'Yer tutucu metini',edit:'Yer tutucuyu düzenle',textMissing:'Yer tutucu metin içermelidir.'}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('placeholder','de',{placeholder:{title:'Platzhalter Einstellungen',toolbar:'Platzhalter erstellen',text:'Platzhalter Text',edit:'Platzhalter bearbeiten',textMissing:'Der Platzhalter muss einen Text beinhalten.'}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('placeholder','fi',{placeholder:{title:'Paikkamerkin ominaisuudet',toolbar:'Luo paikkamerkki',text:'Paikkamerkin teksti',edit:'Muokkaa paikkamerkkiä',textMissing:'Paikkamerkin täytyy sisältää tekstiä'}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('placeholder','vi',{placeholder:{title:'Thuộc tính đặt chỗ',toolbar:'Tạo đặt chỗ',text:'Văn bản đặt chỗ',edit:'Chỉnh sửa ',textMissing:'The placeholder must contain text.'}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('placeholder','cy',{placeholder:{title:"Priodweddau'r Daliwr Geiriau",toolbar:'Creu Daliwr Geiriau',text:'Testun y Daliwr Geiriau',edit:"Golygu'r Dailwr Geiriau",textMissing:"Mae'n rhaid i'r daliwr geiriau gynnwys testun."}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('placeholder','nb',{placeholder:{title:'Egenskaper for plassholder',toolbar:'Opprett plassholder',text:'Tekst for plassholder',edit:'Rediger plassholder',textMissing:'Plassholderen må inneholde tekst.'}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('placeholder','ug',{placeholder:{title:'ئورۇن بەلگە خاسلىقى',toolbar:'ئورۇن بەلگە قۇر',text:'ئورۇن بەلگە تېكىستى',edit:'ئورۇن بەلگە تەھرىر',textMissing:'ئورۇن بەلگىسىدە چوقۇم تېكىست بولۇشى لازىم'}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('placeholder','el',{placeholder:{title:'Ιδιότητες Υποκατάστατου Κειμένου',toolbar:'Δημιουργία Υποκατάσταστου Κειμένου',text:'Υποκαθιστόμενο Κείμενο',edit:'Επεξεργασία Υποκατάσταστου Κειμένου',textMissing:'Πρέπει να υπάρχει υποκαθιστόμενο κείμενο.'}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'placeholder', 'fa',
{
placeholder :
{
title : 'ویژگیهای محل نگهداری',
toolbar : 'ایجاد یک محل نگهداری',
text : 'متن محل نگهداری',
edit : 'ویرایش محل نگهداری',
textMissing : 'محل نگهداری باید محتوی متن باشد.'
}
});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('placeholder','no',{placeholder:{title:'Egenskaper for plassholder',toolbar:'Opprett plassholder',text:'Tekst for plassholder',edit:'Rediger plassholder',textMissing:'Plassholderen må inneholde tekst.'}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'placeholder', 'ku',
{
placeholder :
{
title : 'خاسیهتی شوێن ههڵگر',
toolbar : 'درووستکردنی شوێن ههڵگر',
text : 'دهق بۆ شوێن ههڵگڕ',
edit : 'چاکسازی شوێن ههڵگڕ',
textMissing : 'شوێن ههڵگڕ دهبێت لهدهق پێکهاتبێت.'
}
});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('placeholder','en',{placeholder:{title:'Placeholder Properties',toolbar:'Create Placeholder',text:'Placeholder Text',edit:'Edit Placeholder',textMissing:'The placeholder must contain text.'}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('placeholder','hr',{placeholder:{title:'Svojstva rezerviranog mjesta',toolbar:'Napravi rezervirano mjesto',text:'Tekst rezerviranog mjesta',edit:'Uredi rezervirano mjesto',textMissing:'Rezervirano mjesto mora sadržavati tekst.'}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('placeholder','uk',{placeholder:{title:'Налаштування Заповнювача',toolbar:'Створити Заповнювач',text:'Текст Заповнювача',edit:'Редагувати Заповнювач',textMissing:'Заповнювач повинен містити текст.'}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('placeholder','it',{placeholder:{title:'Proprietà segnaposto',toolbar:'Crea segnaposto',text:'Testo segnaposto',edit:'Modifica segnaposto',textMissing:'Il segnaposto deve contenere del testo.'}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('placeholder','he',{placeholder:{title:'מאפייני שומר מקום',toolbar:'צור שומר מקום',text:'תוכן שומר המקום',edit:'ערוך שומר מקום',textMissing:'שומר המקום חייב להכיל טקסט.'}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('placeholder','et',{placeholder:{title:'Kohahoidja omadused',toolbar:'Kohahoidja loomine',text:'Kohahoidja tekst',edit:'Kohahoidja muutmine',textMissing:'Kohahoidja peab sisaldama teksti.'}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('placeholder','pt-br',{placeholder:{title:'Propriedades do Espaço Reservado',toolbar:'Criar Espaço Reservado',text:'Texto do Espaço Reservado',edit:'Editar Espaço Reservado',textMissing:'O espaço reservado deve conter texto.'}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('placeholder','fr',{placeholder:{title:"Propriétés de l'Espace réservé",toolbar:"Créer l'Espace réservé",text:"Texte de l'Espace réservé",edit:"Modifier l'Espace réservé",textMissing:"L'Espace réservé doit contenir du texte."}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('placeholder','lv',{placeholder:{title:'Viettura uzstādījumi',toolbar:'Izveidot vietturi',text:'Viettura teksts',edit:'Labot vietturi',textMissing:'Vietturim jāsatur tekstu'}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('placeholder','zh-cn',{placeholder:{title:'占位符属性',toolbar:'创建占位符',text:'占位符文字',edit:'编辑占位符',textMissing:'占位符必须包含文字。'}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('uicolor','cs',{uicolor:{title:'Výběr barvy rozhraní',preview:'Živý náhled',config:'Vložte tento řetězec do Vašeho souboru config.js',predefined:'Přednastavené sady barev'}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('uicolor','eo',{uicolor:{title:'UI Kolorselektilo',preview:'Vidigi la aspekton',config:'Gluu tiun signoĉenon en vian dosieron config.js',predefined:'Antaŭdifinita koloraro'}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('uicolor','bg',{uicolor:{title:'ПИ избор на цвят',preview:'Преглед',config:'Вмъкнете този низ във Вашия config.js fajl',predefined:'Предефинирани цветови палитри'}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('uicolor','sk',{uicolor:{title:'UI výber farby',preview:'Živý náhľad',config:'Vložte tento reťazec do vášho config.js súboru',predefined:'Preddefinované sady farieb'}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('uicolor','pl',{uicolor:{title:'Wybór koloru interfejsu',preview:'Podgląd na żywo',config:'Wklej poniższy łańcuch znaków do pliku config.js:',predefined:'Predefiniowane zestawy kolorów'}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('uicolor','nl',{uicolor:{title:'UI Kleurenkiezer',preview:'Live voorbeeld',config:'Plak deze tekst in jouw config.js bestand',predefined:'Voorgedefinieerde kleurensets'}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('uicolor','da',{uicolor:{title:'Brugerflade på farvevælger',preview:'Vis liveeksempel',config:'Indsæt denne streng i din config.js fil',predefined:'Prædefinerede farveskemaer'}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('uicolor','tr',{uicolor:{title:'UI Renk Seçicisi',preview:'Canlı önizleme',config:'Bu dizeyi config.js dosyasının içine yapıştırın',predefined:'Önceden tanımlanmış renk kümeleri'}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('uicolor','de',{uicolor:{title:'UI Pipette',preview:'Live-Vorschau',config:"Fügen Sie diese Zeichenfolge in die 'config.js' Datei.",predefined:'Vordefinierte Farbsätze'}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('uicolor','fi',{uicolor:{title:'Käyttöliittymän värivalitsin',preview:'Esikatsele',config:'Liitä tämä merkkijono config.js tiedostoosi',predefined:'Esimääritellyt värijoukot'}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('uicolor','vi',{uicolor:{title:'Giao diện người dùng Color Picker',preview:'Xem trước trực tiếp',config:'Dán chuỗi này vào tập tin config.js của bạn',predefined:'Tập màu định nghĩa sẵn'}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('uicolor','cy',{uicolor:{title:"Dewisydd Lliwiau'r UI",preview:'Rhagolwg Byw',config:"Gludwch y llinyn hwn i'ch ffeil config.js",predefined:"Setiau lliw wedi'u cyn-ddiffinio"}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('uicolor','nb',{uicolor:{title:'Fargevelger for brukergrensesnitt',preview:'Forhåndsvisning i sanntid',config:'Lim inn følgende tekst i din config.js-fil',predefined:'Forhåndsdefinerte fargesett'}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('uicolor','ug',{uicolor:{title:'ئىشلەتكۈچى ئارايۈزى رەڭ تاللىغۇچ',preview:'شۇئان ئالدىن كۆزىتىش',config:'بۇ ھەرپ تىزىقىنى config.js ھۆججەتكە چاپلايدۇ',predefined:'ئالدىن بەلگىلەنگەن رەڭلەر'}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('uicolor','el',{uicolor:{title:'Διεπαφή Επιλογέα Χρωμάτων',preview:'Ζωντανή Προεπισκόπηση',config:'Επικολλήστε αυτό το κείμενο στο αρχείο config.js',predefined:'Προκαθορισμένα σύνολα χρωμάτων'}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'uicolor', 'fa',
{
uicolor :
{
title : 'انتخاب رنگ UI',
preview : 'پیشنمایش زنده',
config : 'این رشته را در فایل config.js خود بچسبانید.',
predefined : 'مجموعه رنگ از پیش تعریف شده'
}
});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('uicolor','no',{uicolor:{title:'Fargevelger for brukergrensesnitt',preview:'Forhåndsvisning i sanntid',config:'Lim inn følgende tekst i din config.js-fil',predefined:'Forhåndsdefinerte fargesett'}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'uicolor', 'ku',
{
uicolor :
{
title : 'ههڵگری ڕهنگ بۆ ڕووکاری بهکارهێنهر',
preview : 'پێشبینین به زیندوویی',
config : 'ئهم دهقانه بلکێنه به پهڕگهی config.js-fil',
predefined : 'کۆمهڵه ڕهنگه دیاریکراوهکانی پێشوو'
}
});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('uicolor','en',{uicolor:{title:'UI Color Picker',preview:'Live preview',config:'Paste this string into your config.js file',predefined:'Predefined color sets'}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('uicolor','hr',{uicolor:{title:'UI odabir boja',preview:'Pregled uživo',config:'Zalijepite ovaj tekst u Vašu config.js datoteku.',predefined:'Već postavljeni setovi boja'}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('uicolor','uk',{uicolor:{title:'Color Picker Інтерфейс',preview:'Перегляд наживо',config:'Вставте цей рядок у файл config.js',predefined:'Стандартний набір кольорів'}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('uicolor','it',{uicolor:{title:'Selettore Colore UI',preview:'Anteprima Live',config:'Incolla questa stringa nel tuo file config.js',predefined:'Set di colori predefiniti'}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('uicolor','he',{uicolor:{title:'בחירת צבע ממשק משתמש',preview:'תצוגה מקדימה',config:'הדבק את הטקסט הבא לתוך הקובץ config.js',predefined:'קבוצות צבעים מוגדרות מראש'}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('uicolor','et',{uicolor:{title:'Värvivalija kasutajaliides',preview:'Automaatne eelvaade',config:'Aseta see sõne oma config.js faili.',predefined:'Eelmääratud värvikomplektid'}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('uicolor','pt-br',{uicolor:{title:'Paleta de Cores',preview:'Visualização ao vivo',config:'Cole o texto no seu arquivo config.js',predefined:'Conjuntos de cores predefinidos'}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('uicolor','fr',{uicolor:{title:'UI Sélecteur de couleur',preview:'Aperçu',config:'Collez cette chaîne de caractères dans votre fichier config.js',predefined:'Palettes de couleurs prédéfinies'}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('uicolor','lv',{uicolor:{title:'UI krāsas izvēle',preview:'Priekšskatījums',config:'Ielīmējiet šo rindu jūsu config.js failā',predefined:'Predefinēti krāsu komplekti'}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('uicolor','mk',{uicolor:{title:'Палета со бои',preview:'Преглед',config:'Залепи го овој текст во config.js датотеката',predefined:'Предефинирани множества на бои'}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('uicolor','zh-cn',{uicolor:{title:'用户界面颜色选择器',preview:'即时预览',config:'粘贴此字符串到您的 config.js 文件',predefined:'预定义颜色集'}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'specialchar', 'fa',
{
euro: 'نشان یورو',
lsquo: 'علامت نقل قول تکی چپ',
rsquo: 'علامت نقل قول تکی راست',
ldquo: 'علامت دوتایی نقل قول چپ',
rdquo: 'علامت دوتایی نقل قول راست',
ndash: 'En dash', // MISSING
mdash: 'Em dash', // MISSING
iexcl: 'علامت گذاری به عنوان علامت تعجب وارونه',
cent: 'نشان سنت',
pound: 'نشان پوند',
curren: 'نشان ارز',
yen: 'نشان ین',
brvbar: 'نوار شکسته',
sect: 'نشان بخش',
uml: 'Diaeresis', // MISSING
copy: 'نشان کپی رایت',
ordf: 'Feminine ordinal indicator', // MISSING
laquo: 'Left-pointing double angle quotation mark', // MISSING
not: 'علامت ثبت نشده',
reg: 'علامت ثبت شده',
macr: 'Macron', // MISSING
deg: 'نشان درجه',
sup2: 'بالانویس دو',
sup3: 'بالانویس سه',
acute: 'لهجه غلیظ',
micro: 'نشان مایکرو',
para: 'Pilcrow sign', // MISSING
middot: 'نقطه میانی',
cedil: 'Cedilla', // MISSING
sup1: 'Superscript one', // MISSING
ordm: 'Masculine ordinal indicator', // MISSING
raquo: 'نشان زاویهدار دوتایی نقل قول راست چین',
frac14: 'Vulgar fraction one quarter', // MISSING
frac12: 'Vulgar fraction one half', // MISSING
frac34: 'Vulgar fraction three quarters', // MISSING
iquest: 'Inverted question mark', // MISSING
Agrave: 'Latin capital letter A with grave accent', // MISSING
Aacute: 'Latin capital letter A with acute accent', // MISSING
Acirc: 'Latin capital letter A with circumflex', // MISSING
Atilde: 'Latin capital letter A with tilde', // MISSING
Auml: 'Latin capital letter A with diaeresis', // MISSING
Aring: 'Latin capital letter A with ring above', // MISSING
AElig: 'Latin Capital letter Æ', // MISSING
Ccedil: 'Latin capital letter C with cedilla', // MISSING
Egrave: 'Latin capital letter E with grave accent', // MISSING
Eacute: 'Latin capital letter E with acute accent', // MISSING
Ecirc: 'Latin capital letter E with circumflex', // MISSING
Euml: 'Latin capital letter E with diaeresis', // MISSING
Igrave: 'Latin capital letter I with grave accent', // MISSING
Iacute: 'Latin capital letter I with acute accent', // MISSING
Icirc: 'Latin capital letter I with circumflex', // MISSING
Iuml: 'Latin capital letter I with diaeresis', // MISSING
ETH: 'Latin capital letter Eth', // MISSING
Ntilde: 'Latin capital letter N with tilde', // MISSING
Ograve: 'Latin capital letter O with grave accent', // MISSING
Oacute: 'Latin capital letter O with acute accent', // MISSING
Ocirc: 'Latin capital letter O with circumflex', // MISSING
Otilde: 'Latin capital letter O with tilde', // MISSING
Ouml: 'Latin capital letter O with diaeresis', // MISSING
times: 'Multiplication sign', // MISSING
Oslash: 'Latin capital letter O with stroke', // MISSING
Ugrave: 'Latin capital letter U with grave accent', // MISSING
Uacute: 'Latin capital letter U with acute accent', // MISSING
Ucirc: 'Latin capital letter U with circumflex', // MISSING
Uuml: 'Latin capital letter U with diaeresis', // MISSING
Yacute: 'Latin capital letter Y with acute accent', // MISSING
THORN: 'Latin capital letter Thorn', // MISSING
szlig: 'Latin small letter sharp s', // MISSING
agrave: 'Latin small letter a with grave accent', // MISSING
aacute: 'Latin small letter a with acute accent', // MISSING
acirc: 'Latin small letter a with circumflex', // MISSING
atilde: 'Latin small letter a with tilde', // MISSING
auml: 'Latin small letter a with diaeresis', // MISSING
aring: 'Latin small letter a with ring above', // MISSING
aelig: 'Latin small letter æ', // MISSING
ccedil: 'Latin small letter c with cedilla', // MISSING
egrave: 'Latin small letter e with grave accent', // MISSING
eacute: 'Latin small letter e with acute accent', // MISSING
ecirc: 'Latin small letter e with circumflex', // MISSING
euml: 'Latin small letter e with diaeresis', // MISSING
igrave: 'Latin small letter i with grave accent', // MISSING
iacute: 'Latin small letter i with acute accent', // MISSING
icirc: 'Latin small letter i with circumflex', // MISSING
iuml: 'Latin small letter i with diaeresis', // MISSING
eth: 'Latin small letter eth', // MISSING
ntilde: 'Latin small letter n with tilde', // MISSING
ograve: 'Latin small letter o with grave accent', // MISSING
oacute: 'Latin small letter o with acute accent', // MISSING
ocirc: 'Latin small letter o with circumflex', // MISSING
otilde: 'Latin small letter o with tilde', // MISSING
ouml: 'Latin small letter o with diaeresis', // MISSING
divide: 'Division sign', // MISSING
oslash: 'Latin small letter o with stroke', // MISSING
ugrave: 'Latin small letter u with grave accent', // MISSING
uacute: 'Latin small letter u with acute accent', // MISSING
ucirc: 'Latin small letter u with circumflex', // MISSING
uuml: 'Latin small letter u with diaeresis', // MISSING
yacute: 'Latin small letter y with acute accent', // MISSING
thorn: 'Latin small letter thorn', // MISSING
yuml: 'Latin small letter y with diaeresis', // MISSING
OElig: 'Latin capital ligature OE', // MISSING
oelig: 'Latin small ligature oe', // MISSING
'372': 'Latin capital letter W with circumflex', // MISSING
'374': 'Latin capital letter Y with circumflex', // MISSING
'373': 'Latin small letter w with circumflex', // MISSING
'375': 'Latin small letter y with circumflex', // MISSING
sbquo: 'Single low-9 quotation mark', // MISSING
'8219': 'Single high-reversed-9 quotation mark', // MISSING
bdquo: 'Double low-9 quotation mark', // MISSING
hellip: 'Horizontal ellipsis', // MISSING
trade: 'Trade mark sign', // MISSING
'9658': 'Black right-pointing pointer', // MISSING
bull: 'Bullet', // MISSING
rarr: 'Rightwards arrow', // MISSING
rArr: 'Rightwards double arrow', // MISSING
hArr: 'جهتنمای دوتایی چپ به راست',
diams: 'Black diamond suit', // MISSING
asymp: 'تقریبا برابر با'
});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'specialchar', 'ku',
{
euro: 'نیشانهی یۆرۆ',
lsquo: 'نیشانهی فاریزهی سهرووژێری تاکی چهپ',
rsquo: 'نیشانهی فاریزهی سهرووژێری تاکی ڕاست',
ldquo: 'نیشانهی فاریزهی سهرووژێری دووهێندهی چهپ',
rdquo: 'نیشانهی فاریزهی سهرووژێری دووهێندهی ڕاست',
ndash: 'تهقهڵی کورت',
mdash: 'تهقهڵی درێژ',
iexcl: 'نیشانهی ههڵهوگێڕی سهرسوڕمێنهر',
cent: 'نیشانهی سهنت',
pound: 'نیشانهی پاوهند',
curren: 'نیشانهی دراو',
yen: 'نیشانهی یهنی ژاپۆنی',
brvbar: 'شریتی ئهستوونی پچڕاو',
sect: 'نیشانهی دوو s لهسهریهك',
uml: 'خاڵ',
copy: 'نیشانهی مافی چاپ',
ordf: 'هێڵ لهسهر پیتی a',
laquo: 'دوو تیری بهدووایهکی چهپ',
not: 'نیشانهی نهخێر',
reg: 'نیشانهی R لهناو بازنهدا',
macr: 'ماکڕوون',
deg: 'نیشانهی پله',
sup2: 'سهرنووسی دوو',
sup3: 'سهرنووسی سێ',
acute: 'لاری تیژ',
micro: 'نیشانهی u لق درێژی چهپی خواروو',
para: 'نیشانهیپهڕهگراف',
middot: 'ناوهڕاستی خاڵ',
cedil: 'نیشانهی c ژێر چووکره',
sup1: 'سهرنووسی یهك',
ordm: 'هێڵ لهژێر پیتی o',
raquo: 'دوو تیری بهدووایهکی ڕاست',
frac14: 'یهك لهسهر چووار',
frac12: 'یهك لهسهر دوو',
frac34: 'سێ لهسهر چووار',
iquest: 'هێمای ههڵهوگێری پرسیار',
Agrave: 'پیتی لاتینی A-ی گهوره لهگهڵ ڕوومهتداری لار',
Aacute: 'پیتی لاتینی A-ی گهوره لهگهڵ ڕوومهتداری تیژ',
Acirc: 'پیتی لاتینی A-ی گهوره لهگهڵ نیشانه لهسهری',
Atilde: 'پیتی لاتینی A-ی گهوره لهگهڵ زهڕه',
Auml: 'پیتی لاتینی A-ی گهوره لهگهڵ نیشانه لهسهری',
Aring: 'پیتی لاتینی گهورهی Å',
AElig: 'پیتی لاتینی گهورهی Æ',
Ccedil: 'پیتی لاتینی C-ی گهوره لهگهڵ ژێر چووکره',
Egrave: 'پیتی لاتینی E-ی گهوره لهگهڵ ڕوومهتداری لار',
Eacute: 'پیتی لاتینی E-ی گهوره لهگهڵ ڕوومهتداری تیژ',
Ecirc: 'پیتی لاتینی E-ی گهوره لهگهڵ نیشانه لهسهری',
Euml: 'پیتی لاتینی E-ی گهوره لهگهڵ نیشانه لهسهری',
Igrave: 'پیتی لاتینی I-ی گهوره لهگهڵ ڕوومهتداری لار',
Iacute: 'پیتی لاتینی I-ی گهوره لهگهڵ ڕوومهتداری تیژ',
Icirc: 'پیتی لاتینی I-ی گهوره لهگهڵ نیشانه لهسهری',
Iuml: 'پیتی لاتینی I-ی گهوره لهگهڵ نیشانه لهسهری',
ETH: 'پیتی لاتینی E-ی گهورهی',
Ntilde: 'پیتی لاتینی N-ی گهوره لهگهڵ زهڕه',
Ograve: 'پیتی لاتینی O-ی گهوره لهگهڵ ڕوومهتداری لار',
Oacute: 'پیتی لاتینی O-ی گهوره لهگهڵ ڕوومهتداری تیژ',
Ocirc: 'پیتی لاتینی O-ی گهوره لهگهڵ نیشانه لهسهری',
Otilde: 'پیتی لاتینی O-ی گهوره لهگهڵ زهڕه',
Ouml: 'پیتی لاتینی O-ی گهوره لهگهڵ نیشانه لهسهری',
times: 'نیشانهی لێکدان',
Oslash: 'پیتی لاتینی گهورهی Ø لهگهڵ هێمای دڵ وهستان',
Ugrave: 'پیتی لاتینی U-ی گهوره لهگهڵ ڕوومهتداری لار',
Uacute: 'پیتی لاتینی U-ی گهوره لهگهڵ ڕوومهتداری تیژ',
Ucirc: 'پیتی لاتینی U-ی گهوره لهگهڵ نیشانه لهسهری',
Uuml: 'پیتی لاتینی U-ی گهوره لهگهڵ نیشانه لهسهری',
Yacute: 'پیتی لاتینی Y-ی گهوره لهگهڵ ڕوومهتداری تیژ',
THORN: 'پیتی لاتینی دڕکی گهوره',
szlig: 'پیتی لاتنی نووك تیژی s',
agrave: 'پیتی لاتینی a-ی بچووك لهگهڵ ڕوومهتداری لار',
aacute: 'پیتی لاتینی a-ی بچووك لهگهڵ ڕوومهتداری تیژ',
acirc: 'پیتی لاتینی a-ی بچووك لهگهڵ نیشانه لهسهری',
atilde: 'پیتی لاتینی a-ی بچووك لهگهڵ زهڕه',
auml: 'پیتی لاتینی a-ی بچووك لهگهڵ نیشانه لهسهری',
aring: 'پیتی لاتینی å-ی بچووك',
aelig: 'پیتی لاتینی æ-ی بچووك',
ccedil: 'پیتی لاتینی c-ی بچووك لهگهڵ ژێر چووکره',
egrave: 'پیتی لاتینی e-ی بچووك لهگهڵ ڕوومهتداری لار',
eacute: 'پیتی لاتینی e-ی بچووك لهگهڵ ڕوومهتداری تیژ',
ecirc: 'پیتی لاتینی e-ی بچووك لهگهڵ نیشانه لهسهری',
euml: 'پیتی لاتینی e-ی بچووك لهگهڵ نیشانه لهسهری',
igrave: 'پیتی لاتینی i-ی بچووك لهگهڵ ڕوومهتداری لار',
iacute: 'پیتی لاتینی i-ی بچووك لهگهڵ ڕوومهتداری تیژ',
icirc: 'پیتی لاتینی i-ی بچووك لهگهڵ نیشانه لهسهری',
iuml: 'پیتی لاتینی i-ی بچووك لهگهڵ نیشانه لهسهری',
eth: 'پیتی لاتینی e-ی بچووك',
ntilde: 'پیتی لاتینی n-ی بچووك لهگهڵ زهڕه',
ograve: 'پیتی لاتینی o-ی بچووك لهگهڵ ڕوومهتداری لار',
oacute: 'پیتی لاتینی o-ی بچووك لهگهڵ ڕوومهتداری تیژ',
ocirc: 'پیتی لاتینی o-ی بچووك لهگهڵ نیشانه لهسهری',
otilde: 'پیتی لاتینی o-ی بچووك لهگهڵ زهڕه',
ouml: 'پیتی لاتینی o-ی بچووك لهگهڵ نیشانه لهسهری',
divide: 'نیشانهی دابهش',
oslash: 'پیتی لاتینی گهورهی ø لهگهڵ هێمای دڵ وهستان',
ugrave: 'پیتی لاتینی u-ی بچووك لهگهڵ ڕوومهتداری لار',
uacute: 'پیتی لاتینی u-ی بچووك لهگهڵ ڕوومهتداری تیژ',
ucirc: 'پیتی لاتینی u-ی بچووك لهگهڵ نیشانه لهسهری',
uuml: 'پیتی لاتینی u-ی بچووك لهگهڵ نیشانه لهسهری',
yacute: 'پیتی لاتینی y-ی بچووك لهگهڵ ڕوومهتداری تیژ',
thorn: 'پیتی لاتینی دڕکی بچووك',
yuml: 'پیتی لاتینی y-ی بچووك لهگهڵ نیشانه لهسهری',
OElig: 'پیتی لاتینی گهورهی پێکهوهنووسراوی OE',
oelig: 'پیتی لاتینی بچووکی پێکهوهنووسراوی oe',
'372': 'پیتی لاتینی W-ی گهوره لهگهڵ نیشانه لهسهری',
'374': 'پیتی لاتینی Y-ی گهوره لهگهڵ نیشانه لهسهری',
'373': 'پیتی لاتینی w-ی بچووکی لهگهڵ نیشانه لهسهری',
'375': 'پیتی لاتینی y-ی بچووکی لهگهڵ نیشانه لهسهری',
sbquo: 'نیشانهی فاریزهی نزم',
'8219': 'نیشانهی فاریزهی بهرزی پێچهوانه',
bdquo: 'دوو فاریزهی تهنیش یهك',
hellip: 'ئاسۆیی بازنه',
trade: 'نیشانهی بازرگانی',
'9658': 'ئاراستهی ڕهشی دهستی ڕاست',
bull: 'فیشهك',
rarr: 'تیری دهستی ڕاست',
rArr: 'دووتیری دهستی ڕاست',
hArr: 'دوو تیری ڕاست و چهپ',
diams: 'ڕهشی پاقڵاوهیی',
asymp: 'نیشانهی یهکسانه'
});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.add('docprops',{init:function(a){var b=new CKEDITOR.dialogCommand('docProps');b.modes={wysiwyg:a.config.fullPage};a.addCommand('docProps',b);CKEDITOR.dialog.add('docProps',this.path+'dialogs/docprops.js');a.ui.addButton('DocProps',{label:a.lang.docprops.label,command:'docProps'});}});
| JavaScript |
/*
* @example An iframe-based dialog with custom button handling logics.
*/
( function() {
CKEDITOR.plugins.add( 'MediaEmbed',
{
requires: [ 'iframedialog' ],
init: function( editor )
{
var me = this;
CKEDITOR.dialog.add( 'MediaEmbedDialog', function ()
{
return {
title : 'Embed Media Dialog',
minWidth : 550,
minHeight : 200,
contents :
[
{
id : 'iframe',
label : 'Embed Media',
expand : true,
elements :
[
{
type : 'html',
id : 'pageMediaEmbed',
label : 'Embed Media',
style : 'width : 100%;',
html : '<iframe src="'+me.path+'dialogs/mediaembed.html" frameborder="0" name="iframeMediaEmbed" id="iframeMediaEmbed" allowtransparency="1" style="width:100%;margin:0;padding:0;"></iframe>'
}
]
}
],
onOk : function()
{
for (var i=0; i<window.frames.length; i++) {
if(window.frames[i].name == 'iframeMediaEmbed') {
var content = window.frames[i].document.getElementById("embed").value;
}
}
final_html = 'MediaEmbedInsertData|---' + escape('<div class="media_embed">'+content+'</div>') + '---|MediaEmbedInsertData';
editor.insertHtml(final_html);
updated_editor_data = editor.getData();
clean_editor_data = updated_editor_data.replace(final_html,'<div class="media_embed">'+content+'</div>');
editor.setData(clean_editor_data);
}
};
} );
editor.addCommand( 'MediaEmbed', new CKEDITOR.dialogCommand( 'MediaEmbedDialog' ) );
editor.ui.addButton( 'MediaEmbed',
{
label: 'Embed Media',
command: 'MediaEmbed',
icon: this.path + 'images/icon.gif'
} );
}
} );
} )();
| JavaScript |
var yuiAjaxObject = {
JSONParse:function(o) {
var messages = [];
try {
messages = YAHOO.lang.JSON.parse(o.responseText);
return messages;
} catch (x) {
return null;
}
},
startRequest:function(method, url, params, success, failure, scope) {
var callback = {
success:success,
failure:failure,
scope: scope
};
if (params != null && params != "") {
url += "?" + params;
}
YAHOO.util.Connect.asyncRequest(method, url, callback);
}
};
window.loadingPanel = function() {
if (window._loadingPanel) {
return window._loadingPanel;
}
window._loadingPanel =
new YAHOO.widget.Panel("wait",
{ width:"240px",
fixedcenter:true,
close:false,
draggable:false,
zindex:11110,
modal:true,
visible:false
}
);
window._loadingPanel.setHeader("Loading, please wait...");
window._loadingPanel.setBody('<img src="/admin/resources/images/loading.gif" />');
window._loadingPanel.render(document.body);
return window._loadingPanel;
};
String.prototype.startsWith = function(str) {
return (this.match("^"+str)==str);
}
String.prototype.endsWith = function(str) {
return (this.match(str+"$")==str);
}
String.prototype.trimLeftStr = function(trm) {
var str = this;
if (trm == null || trm === "") return str;
while(str.startsWith(trm)) {
str = str.substring(str.indexOf(trm) + 1);
}
return str;
}
String.prototype.trimRightStr = function(trm) {
var str = this;
if (trm == null || trm === "") return str;
while(str.endsWith(trm)) {
str = str.substring(0, str.lastIndexOf(trm));
}
return str;
}
var mapPath = function(path1, path2) {
path1 = path1.trimRightStr("/");
path2 = path2.trimLeftStr("/").trimRightStr("/");
if (path2.startsWith("..")) {
path1 = path1.substring(0, path1.lastIndexOf("/"));
path2 = path2.trimLeftStr(".").trimLeftStr("/");
}
return path1 + "/" + path2 + "/";
}
var appendFolder = function(i, absolute_folder, related_folder, folder_name, cont, dialog) {
var imgi = document.createElement( 'img' );
imgi.id = cont.id + '_f_img_' + (i+1);
imgi.src = "resources/images/folder.jpg";
imgi.style.width = "100px";
imgi.style.maxWidth = "100px";
imgi.style.maxHeight = "100px";
imgi.style.cursor = 'pointer';
imgi.alt = folder_name;
var divi = document.createElement( 'div' );
divi.id = cont.id + '_f_div_' + (i+1);
divi.style.cursor = 'pointer';
divi.style.marginTop = "6px";
divi.style.textAlign = "center";
divi.innerHTML = folder_name;
var linki = document.createElement( 'a' );
linki.id = cont.id + '_f_a_' + (i+1);
linki.style.display = 'block';
linki.style.width = "100px";
linki.style.marginTop = "5px";
linki.style.marginRight = "5px";
linki.style.height = "120px";
linki.style.overflow = "hidden";
linki.style.cssFloat = 'left';
linki.style.cursor = 'pointer';
linki.style.border = 'solid 1px #999';
linki.style.padding = '2px';
linki.parentDialog = dialog;
linki.parentEditor = dialog.getParentEditor();
linki.title = folder_name;
linki.appendChild(imgi);
linki.appendChild(divi);
linki.onclick = function() {
loadImages(mapPath(related_folder, this.title), this.parentDialog, this.parentEditor);
};
cont.appendChild(linki);
}
var appendImage = function(i, absolute_folder, related_folder, imgSrc, imgCont, dialog) {
var imgi = document.createElement( 'img' );
imgi.id = imgCont.id + '_i_img_' + (i+1);
imgi.src = absolute_folder + imgSrc;
//imgi.style.width = "100px";
imgi.style.maxWidth = "100px";
imgi.style.maxHeight = "100px";
imgi.style.cursor = 'pointer';
imgi.style.position = "absolute";
imgi.style.top = "0";
imgi.style.bottom = "0";
imgi.style.left = "0";
imgi.style.right = "0";
imgi.style.margin = "auto";
imgi.alt = imgSrc;
var imgci = document.createElement( 'div' );
imgci.id = imgCont.id + '_i_imgc_' + (i+1);
imgci.style.width = "100px";
imgci.style.height = "100px";
imgci.style.cursor = 'pointer';
imgci.style.position = 'relative';
imgci.style.backgroundColor = "#fff";
imgci.appendChild(imgi);
var divi = document.createElement( 'div' );
divi.id = imgCont.id + '_i_div_' + (i+1);
divi.style.cursor = 'pointer';
divi.style.marginTop = "6px";
divi.style.textAlign = "center";
divi.innerHTML = imgSrc;
var linki = document.createElement( 'a' );
linki.id = imgCont.id + '_i_a_' + (i+1);
linki.style.display = 'block';
linki.style.width = "100px";
linki.style.marginTop = "5px";
linki.style.marginRight = "5px";
linki.style.height = "120px";
linki.style.overflow = "hidden";
linki.style.cssFloat = 'left';
linki.style.cursor = 'pointer';
linki.style.border = 'solid 1px #999';
linki.style.padding = '2px';
linki.parentDialog = dialog;
linki.parentEditor = dialog.getParentEditor();
linki.title = imgSrc;
linki.appendChild(imgci);
linki.appendChild(divi);
linki.onclick = function() {
var imgUrl = this.firstChild.firstChild.getAttribute("src");
this.parentDialog.getContentElement('general', 'url').setValue(imgUrl);
this.parentDialog.click('ok');
};
imgCont.appendChild(linki);
}
var bindResult = function(result, dialog, editor) {
var imgCont = document.getElementById(editor.id + '_imgc');
var absolute_folder = result.absolute_folder;
var related_folder = result.related_folder;
dialog.related_folder = related_folder;
if (related_folder === "/") {
} else {
appendFolder(-1, absolute_folder, related_folder, "..", imgCont, dialog);
}
if (result.folders) {
for (var i = 0; i < result.folders.length; i++) {
var imgSrc = result.folders[i].src;
appendFolder(i, absolute_folder, related_folder, imgSrc, imgCont, dialog);
}
}
if (result.images) {
for (var i = 0; i < result.images.length; i++) {
var imgSrc = result.images[i].src;
appendImage(i, absolute_folder, related_folder, imgSrc, imgCont, dialog);
}
}
}
var loadImages = function(path, dialog, editor) {
var imgCont = document.getElementById(dialog.getParentEditor().id + '_imgc');
imgCont.innerHTML = '';
var callback = {
success:function(o) {
var imgCont = document.getElementById(editor.id + '_imgc');
imgCont.innerHTML = '';
var result = yuiAjaxObject.JSONParse(o);
if (result) {
bindResult(result, dialog, editor);
}
},
failure:function(o) {
}
};
yuiAjaxObject.startRequest('GET', 'ImageListProvider.aspx', 'file=' + encodeURIComponent(path) + '&id='+editor.id, callback.success, callback.failure, this);
}
CKEDITOR.plugins.add( 'selectImage',
{
init: function( editor )
{
editor.addCommand( 'selectImageDialog', new CKEDITOR.dialogCommand( 'selectImageDialog' ) );
editor.ui.addButton( 'SelectImage', {
label: 'Insert an image by select it.',
command: 'selectImageDialog',
icon: this.path + 'images/selectimage.gif'
});
}
});
CKEDITOR.dialog.add( 'selectImageDialog', function( editor )
{
return {
title : 'Select an image to insert',
minWidth : 684,
minHeight : 508,
contents :
[
{
id : 'general',
label : 'Settings',
elements :
[
{
type : 'html',
html : 'This dialog window lets you create simple image for your website, by browser and select it.'
},
{
type : 'text',
id : 'url',
label : 'URL',
validate : CKEDITOR.dialog.validate.notEmpty( 'The link must have an URL.' ),
required : true,
commit : function( data )
{
data.url = this.getValue();
}
},
{
type : 'text',
id : 'title',
label : 'Title',
required : false,
commit : function( data )
{
data.title = this.getValue();
}
},
{
type : 'file',
id : 'fuImg',
label : '<b style="font-weight: bold;">Or select an image to upload</b>',
required : false,
html : '<div id="' + editor.id + '_fuImg" style="width: 684px; height: 395px; overflow: auto;"><div>'
},
{
type : 'checkbox',
id : 'chkLayerMask',
label : 'Đính kèm logo (đối với file ảnh *.jpg)',
'default' : false,
commit : function( data )
{
data.addLayerMask = this.getValue();
}
},
{
type : 'html',
id : 'imgc',
html : '<div id="' + editor.id + '_imgc" style="width: 684px; height: 395px; overflow: auto;"><div>'
}
]
}
],onShow : function(o)
{
var imgCont = document.getElementById(this.getParentEditor().id + '_imgc');
if (!imgCont || imgCont.innerHTML.trimLeftStr(' ') == '' || imgCont.innerHTML.trimLeftStr(' ').trimRightStr(' ') == '<div></div>') {
loadImages('/', this, this.getParentEditor());
}
this._.contents.general.fuImg.getInputElement().$.dialog = this;
this._.contents.general.fuImg.getInputElement().$.onchange = function() {
var fuImg = this;
if (fuImg.files != null && fuImg.files.length > 0) {
if (NTTHAO.util.isImageFile(fuImg.value)) { // is image file
var data = {};
this.dialog.commitContent( data );
window.loadingPanel().show();
var fd = new FormData();
fd.append('fuImg', fuImg.files[0]);
fd.append('path', this.dialog.related_folder);
fd.append('addLayerMask', data.addLayerMask ? "1" : "0");
var xhr = null;
if (window.XMLHttpRequest) {
xhr = new XMLHttpRequest();
}
else { // for older IE 5/6
xhr = new ActiveXObject("Microsoft.XMLHTTP");
}
xhr.dialog = this.dialog;
xhr.addEventListener("load", function(e) {
this.dialog.getContentElement('general', 'url').setValue(e.target.responseText);
}, false);
xhr.addEventListener("error", function(e) {
alert('Có lỗi xảy ra trong quá trình upload file.\n Vui lòng đăng nhập lại.');
window.loadingPanel().hide();
}, false);
xhr.open("POST", '/admin/EditorFileUploader.aspx', false);
xhr.send(fd);
xhr.open('GET', '/admin/RefreshSessionState.aspx', false);
this.value = '';
loadImages(this.dialog.related_folder, this.dialog, this.dialog.getParentEditor());
window.loadingPanel().hide();
}
else {
fuImg.value = '';
alert('Chức năng này chỉ hỗ trợ file ảnh với các định dạng: *.jpg, *.jpeg, *.jpe, *.png, *.gif, *.bmp');
}
}
};
/*
document[this.getParentEditor().id] = this.getParentEditor();
var callback = {
success:function(o) {
var dialog = this;
var imgCont = document.getElementById(dialog.getParentEditor().id + '_imgc');
document[dialog.getParentEditor().id + '_imgc'] = imgCont;
imgCont.innerHTML = '';
var result = yuiAjaxObject.JSONParse(o);
if (result) {
bindResult(result, dialog, dialog.getParentEditor());
}
},
failure:function(o) {
}
};
//yuiAjaxObject.startRequest('GET', 'ImageListProvider.aspx', 'id='+this.getParentEditor().id, callback.success, callback.failure, this);
*/
},
onOk : function()
{
var dialog = this,
data = {},
img = editor.document.createElement( 'img' );
this.commitContent( data );
img.setAttribute( 'src', data.url );
if ( data.title )
img.setAttribute( 'title', data.title );
editor.insertElement( img );
}
};
}); | JavaScript |
var yuiAjaxObject = {
JSONParse:function(o) {
var messages = [];
try {
messages = YAHOO.lang.JSON.parse(o.responseText);
return messages;
} catch (x) {
return null;
}
},
startRequest:function(method, url, params, success, failure, scope) {
var callback = {
success:success,
failure:failure,
scope: scope
};
if (params != null && params != "") {
url += "?" + params;
}
YAHOO.util.Connect.asyncRequest(method, url, callback);
}
};
String.prototype.startsWith = function(str) {
return (this.match("^"+str)==str);
}
String.prototype.endsWith = function(str) {
return (this.match(str+"$")==str);
}
String.prototype.trimLeftStr = function(trm) {
var str = this;
if (trm == null || trm === "") return str;
while(str.startsWith(trm)) {
str = str.substring(str.indexOf(trm) + 1);
}
return str;
}
String.prototype.trimRightStr = function(trm) {
var str = this;
if (trm == null || trm === "") return str;
while(str.endsWith(trm)) {
str = str.substring(0, str.lastIndexOf(trm));
}
return str;
}
var mapPath = function(path1, path2) {
path1 = path1.trimRightStr("/");
path2 = path2.trimLeftStr("/").trimRightStr("/");
if (path2.startsWith("..")) {
path1 = path1.substring(0, path1.lastIndexOf("/"));
path2 = path2.trimLeftStr(".").trimLeftStr("/");
}
return path1 + "/" + path2 + "/";
}
var appendFolder = function(i, absolute_folder, related_folder, folder_name, cont, dialog) {
var imgi = document.createElement( 'img' );
imgi.id = cont.id + '_f_img_' + (i+1);
imgi.src = "resources/images/folder.jpg";
imgi.style.width = "100px";
imgi.style.maxWidth = "100px";
imgi.style.maxHeight = "100px";
imgi.style.cursor = 'pointer';
imgi.alt = folder_name;
var divi = document.createElement( 'div' );
divi.id = cont.id + '_f_div_' + (i+1);
divi.style.cursor = 'pointer';
divi.style.marginTop = "6px";
divi.style.textAlign = "center";
divi.innerHTML = folder_name;
var linki = document.createElement( 'a' );
linki.id = cont.id + '_f_a_' + (i+1);
linki.style.display = 'block';
linki.style.width = "100px";
linki.style.marginTop = "5px";
linki.style.marginRight = "5px";
linki.style.height = "120px";
linki.style.overflow = "hidden";
linki.style.cssFloat = 'left';
linki.style.cursor = 'pointer';
linki.style.border = 'solid 1px #999';
linki.style.padding = '2px';
linki.parentDialog = dialog;
linki.parentEditor = dialog.getParentEditor();
linki.title = folder_name;
linki.appendChild(imgi);
linki.appendChild(divi);
linki.onclick = function() {
loadImages(mapPath(related_folder, this.title), this.parentDialog, this.parentEditor);
};
cont.appendChild(linki);
}
var appendImage = function(i, absolute_folder, related_folder, imgSrc, imgCont, dialog) {
var imgi = document.createElement( 'img' );
imgi.id = imgCont.id + '_i_img_' + (i+1);
imgi.src = absolute_folder + imgSrc;
//imgi.style.width = "100px";
imgi.style.maxWidth = "100px";
imgi.style.maxHeight = "100px";
imgi.style.cursor = 'pointer';
imgi.style.position = "absolute";
imgi.style.top = "0";
imgi.style.bottom = "0";
imgi.style.left = "0";
imgi.style.right = "0";
imgi.style.margin = "auto";
imgi.alt = imgSrc;
var imgci = document.createElement( 'div' );
imgci.id = imgCont.id + '_i_imgc_' + (i+1);
imgci.style.width = "100px";
imgci.style.height = "100px";
imgci.style.cursor = 'pointer';
imgci.style.position = 'relative';
imgci.style.backgroundColor = "#fff";
imgci.appendChild(imgi);
var divi = document.createElement( 'div' );
divi.id = imgCont.id + '_i_div_' + (i+1);
divi.style.cursor = 'pointer';
divi.style.marginTop = "6px";
divi.style.textAlign = "center";
divi.innerHTML = imgSrc;
var linki = document.createElement( 'a' );
linki.id = imgCont.id + '_i_a_' + (i+1);
linki.style.display = 'block';
linki.style.width = "100px";
linki.style.marginTop = "5px";
linki.style.marginRight = "5px";
linki.style.height = "120px";
linki.style.overflow = "hidden";
linki.style.cssFloat = 'left';
linki.style.cursor = 'pointer';
linki.style.border = 'solid 1px #999';
linki.style.padding = '2px';
linki.parentDialog = dialog;
linki.parentEditor = dialog.getParentEditor();
linki.title = imgSrc;
linki.appendChild(imgci);
linki.appendChild(divi);
linki.onclick = function() {
var imgUrl = this.firstChild.firstChild.getAttribute("src");
this.parentDialog.getContentElement('general', 'url').setValue(imgUrl);
this.parentDialog.click('ok');
};
imgCont.appendChild(linki);
}
var bindResult = function(result, dialog, editor) {
var imgCont = document.getElementById(editor.id + '_imgc');
var absolute_folder = result.absolute_folder;
var related_folder = result.related_folder;
if (related_folder === "/") {
} else {
appendFolder(-1, absolute_folder, related_folder, "..", imgCont, dialog);
}
if (result.folders) {
for (var i = 0; i < result.folders.length; i++) {
var imgSrc = result.folders[i].src;
appendFolder(i, absolute_folder, related_folder, imgSrc, imgCont, dialog);
}
}
if (result.images) {
for (var i = 0; i < result.images.length; i++) {
var imgSrc = result.images[i].src;
appendImage(i, absolute_folder, related_folder, imgSrc, imgCont, dialog);
}
}
}
var loadImages = function(path, dialog, editor) {
var imgCont = document.getElementById(dialog.getParentEditor().id + '_imgc');
imgCont.innerHTML = '';
var callback = {
success:function(o) {
var imgCont = document.getElementById(editor.id + '_imgc');
imgCont.innerHTML = '';
var result = yuiAjaxObject.JSONParse(o);
if (result) {
bindResult(result, dialog, editor);
}
},
failure:function(o) {
}
};
yuiAjaxObject.startRequest('GET', 'ImageListProvider.aspx', 'file=' + encodeURIComponent(path) + '&id='+editor.id, callback.success, callback.failure, this);
}
CKEDITOR.plugins.add( 'selectImage',
{
init: function( editor )
{
editor.addCommand( 'selectImageDialog', new CKEDITOR.dialogCommand( 'selectImageDialog' ) );
editor.ui.addButton( 'SelectImage', {
label: 'Insert an image by select it.',
command: 'selectImageDialog',
icon: this.path + 'images/selectimage.gif'
});
}
});
CKEDITOR.dialog.add( 'selectImageDialog', function( editor )
{
return {
title : 'Select an image to insert',
minWidth : 684,
minHeight : 508,
contents :
[
{
id : 'general',
label : 'Settings',
elements :
[
{
type : 'html',
html : 'This dialog window lets you create simple image for your website, by browser and select it.'
},
{
type : 'text',
id : 'url',
label : 'URL',
validate : CKEDITOR.dialog.validate.notEmpty( 'The link must have a URL.' ),
required : true,
commit : function( data )
{
data.url = this.getValue();
}
},
{
type : 'text',
id : 'title',
label : 'Title',
required : false,
commit : function( data )
{
data.title = this.getValue();
}
},
{
type : 'html',
id : 'imgc',
html : '<div id="' + editor.id + '_imgc" style="width: 684px; height: 395px; overflow: auto;"><div>'
}
]
}
],onShow : function(o)
{
var imgCont = document.getElementById(this.getParentEditor().id + '_imgc');
if (!imgCont || imgCont.innerHTML.trimLeftStr(' ') == '' || imgCont.innerHTML.trimLeftStr(' ').trimRightStr(' ') == '<div></div>') {
loadImages('/', this, this.getParentEditor());
}
/*
document[this.getParentEditor().id] = this.getParentEditor();
var callback = {
success:function(o) {
var dialog = this;
var imgCont = document.getElementById(dialog.getParentEditor().id + '_imgc');
document[dialog.getParentEditor().id + '_imgc'] = imgCont;
imgCont.innerHTML = '';
var result = yuiAjaxObject.JSONParse(o);
if (result) {
bindResult(result, dialog, dialog.getParentEditor());
}
},
failure:function(o) {
}
};
//yuiAjaxObject.startRequest('GET', 'ImageListProvider.aspx', 'id='+this.getParentEditor().id, callback.success, callback.failure, this);
*/
},
onOk : function()
{
var dialog = this,
data = {},
img = editor.document.createElement( 'img' );
this.commitContent( data );
img.setAttribute( 'src', data.url );
if ( data.title )
img.setAttribute( 'title', data.title );
editor.insertElement( img );
}
};
}); | JavaScript |
var yuiAjaxObject = {
JSONParse:function(o) {
var messages = [];
try {
messages = YAHOO.lang.JSON.parse(o.responseText);
return messages;
} catch (x) {
return null;
}
},
startRequest:function(method, url, params, success, failure, scope) {
var callback = {
success:success,
failure:failure,
scope: scope
};
YAHOO.util.Connect.asyncRequest(method, url, callback, params);
}
};
CKEDITOR.plugins.add( 'selectImage',
{
init: function( editor )
{
editor.addCommand( 'selectImageDialog', new CKEDITOR.dialogCommand( 'selectImageDialog' ) );
editor.ui.addButton( 'SelectImage', {
label: 'Insert an image by select it.',
command: 'selectImageDialog',
icon: this.path + 'images/selectimage.gif'
});
}
});
CKEDITOR.dialog.add( 'selectImageDialog', function( editor )
{
return {
title : 'Select an image to insert',
minWidth : 600,
minHeight : 300,
contents :
[
{
id : 'general',
label : 'Settings',
elements :
[
{
type : 'html',
html : 'This dialog window lets you create simple links for your website.'
},
{
type : 'text',
id : 'url',
label : 'URL',
validate : CKEDITOR.dialog.validate.notEmpty( 'The link must have a URL.' ),
required : true,
commit : function( data )
{
data.url = this.getValue();
}
},
{
type : 'text',
id : 'title',
label : 'Title',
required : false,
commit : function( data )
{
data.title = this.getValue();
}
},
{
type : 'html',
id : 'imgc',
html : '<div id="' + editor.id + '_imgc" style="width: 580px; height: 300px; overflow: auto;"><div>'
}
]
}
],onShow : function(o)
{
document[this.getParentEditor().id] = this.getParentEditor();
var callback = {
success:function(o) {
var dialog = this;
var imgCont = document.getElementById(dialog.getParentEditor().id + '_imgc');
document[dialog.getParentEditor().id + '_imgc'] = imgCont;
imgCont.innerHTML = '';
var result = yuiAjaxObject.JSONParse(o);
if (result && result.images) {
for (var i = 0; i < result.images.length; i++) {
var imgSrc = result.images[i].src;
var imgi = document.createElement( 'img' );
imgi.id = imgCont.id + '_img' + (i+1);
imgi.src = imgSrc;
imgi.style.width = "100px";
imgi.style.maxWidth = "100px";
imgi.style.maxHeight = "100px";
imgi.style.cursor = 'pointer';
imgi.alt = imgSrc;
var linki = document.createElement( 'a' );
linki.id = imgCont.id + '_a' + (i+1);
linki.appendChild(imgi);
linki.style.display = 'block';
linki.style.width = "100px";
linki.style.marginTop = "5px";
linki.style.marginRight = "5px";
linki.style.height = "100px";
linki.style.overflow = "hidden";
linki.style.cssFloat = 'left';
linki.style.cursor = 'pointer';
linki.parentDialog = dialog;
linki.parentEditor = dialog.getParentEditor();
linki.title = imgSrc;
linki.onclick = function() {
this.parentDialog.getContentElement('general', 'url').setValue(this.firstChild.src);
this.parentDialog.click('ok');
};
imgCont.appendChild(linki);
}
}
},
failure:function(o) {
}
};
yuiAjaxObject.startRequest('GET', 'ImgListProvider.aspx', 'id='+this.getParentEditor().id, callback.success, callback.failure, this);
},
onOk : function()
{
var dialog = this,
data = {},
img = editor.document.createElement( 'img' );
this.commitContent( data );
img.setAttribute( 'src', data.url );
if ( data.title )
img.setAttribute( 'title', data.title );
editor.insertElement( img );
}
};
}); | JavaScript |
var yuiAjaxObject = {
JSONParse:function(o) {
var messages = [];
try {
messages = YAHOO.lang.JSON.parse(o.responseText);
return messages;
} catch (x) {
return null;
}
},
startRequest:function(method, url, params, success, failure, scope) {
var callback = {
success:success,
failure:failure,
scope: scope
};
if (params != null && params != "") {
url += "?" + params;
}
YAHOO.util.Connect.asyncRequest(method, url, callback);
}
};
window.loadingPanel = function() {
if (window._loadingPanel) {
return window._loadingPanel;
}
window._loadingPanel =
new YAHOO.widget.Panel("wait",
{ width:"240px",
fixedcenter:true,
close:false,
draggable:false,
zindex:11110,
modal:true,
visible:false
}
);
window._loadingPanel.setHeader("Loading, please wait...");
window._loadingPanel.setBody('<img src="/admin/resources/images/loading.gif" />');
window._loadingPanel.render(document.body);
return window._loadingPanel;
};
String.prototype.startsWith = function(str) {
return (this.match("^"+str)==str);
}
String.prototype.endsWith = function(str) {
return (this.match(str+"$")==str);
}
String.prototype.trimLeftStr = function(trm) {
var str = this;
if (trm == null || trm === "") return str;
while(str.startsWith(trm)) {
str = str.substring(str.indexOf(trm) + 1);
}
return str;
}
String.prototype.trimRightStr = function(trm) {
var str = this;
if (trm == null || trm === "") return str;
while(str.endsWith(trm)) {
str = str.substring(0, str.lastIndexOf(trm));
}
return str;
}
var mapPath = function(path1, path2) {
path1 = path1.trimRightStr("/");
path2 = path2.trimLeftStr("/").trimRightStr("/");
if (path2.startsWith("..")) {
path1 = path1.substring(0, path1.lastIndexOf("/"));
path2 = path2.trimLeftStr(".").trimLeftStr("/");
}
return path1 + "/" + path2 + "/";
}
var appendFolder = function(i, absolute_folder, related_folder, folder_name, cont, dialog) {
var imgi = document.createElement( 'img' );
imgi.id = cont.id + '_f_img_' + (i+1);
imgi.src = "resources/images/folder.jpg";
imgi.style.width = "100px";
imgi.style.maxWidth = "100px";
imgi.style.maxHeight = "100px";
imgi.style.cursor = 'pointer';
imgi.alt = folder_name;
var divi = document.createElement( 'div' );
divi.id = cont.id + '_f_div_' + (i+1);
divi.style.cursor = 'pointer';
divi.style.marginTop = "6px";
divi.style.textAlign = "center";
divi.innerHTML = folder_name;
var linki = document.createElement( 'a' );
linki.id = cont.id + '_f_a_' + (i+1);
linki.style.display = 'block';
linki.style.width = "100px";
linki.style.marginTop = "5px";
linki.style.marginRight = "5px";
linki.style.height = "120px";
linki.style.overflow = "hidden";
linki.style.cssFloat = 'left';
linki.style.cursor = 'pointer';
linki.style.border = 'solid 1px #999';
linki.style.padding = '2px';
linki.parentDialog = dialog;
linki.parentEditor = dialog.getParentEditor();
linki.title = folder_name;
linki.appendChild(imgi);
linki.appendChild(divi);
linki.onclick = function() {
loadImages(mapPath(related_folder, this.title), this.parentDialog, this.parentEditor);
};
cont.appendChild(linki);
}
var appendImage = function(i, absolute_folder, related_folder, imgSrc, imgCont, dialog) {
var imgi = document.createElement( 'img' );
imgi.id = imgCont.id + '_i_img_' + (i+1);
imgi.src = absolute_folder + imgSrc;
//imgi.style.width = "100px";
imgi.style.maxWidth = "100px";
imgi.style.maxHeight = "100px";
imgi.style.cursor = 'pointer';
imgi.style.position = "absolute";
imgi.style.top = "0";
imgi.style.bottom = "0";
imgi.style.left = "0";
imgi.style.right = "0";
imgi.style.margin = "auto";
imgi.alt = imgSrc;
var imgci = document.createElement( 'div' );
imgci.id = imgCont.id + '_i_imgc_' + (i+1);
imgci.style.width = "100px";
imgci.style.height = "100px";
imgci.style.cursor = 'pointer';
imgci.style.position = 'relative';
imgci.style.backgroundColor = "#fff";
imgci.appendChild(imgi);
var divi = document.createElement( 'div' );
divi.id = imgCont.id + '_i_div_' + (i+1);
divi.style.cursor = 'pointer';
divi.style.marginTop = "6px";
divi.style.textAlign = "center";
divi.innerHTML = imgSrc;
var linki = document.createElement( 'a' );
linki.id = imgCont.id + '_i_a_' + (i+1);
linki.style.display = 'block';
linki.style.width = "100px";
linki.style.marginTop = "5px";
linki.style.marginRight = "5px";
linki.style.height = "120px";
linki.style.overflow = "hidden";
linki.style.cssFloat = 'left';
linki.style.cursor = 'pointer';
linki.style.border = 'solid 1px #999';
linki.style.padding = '2px';
linki.parentDialog = dialog;
linki.parentEditor = dialog.getParentEditor();
linki.title = imgSrc;
linki.appendChild(imgci);
linki.appendChild(divi);
linki.onclick = function() {
var imgUrl = this.firstChild.firstChild.getAttribute("src");
this.parentDialog.getContentElement('general', 'url').setValue(imgUrl);
this.parentDialog.click('ok');
};
imgCont.appendChild(linki);
}
var bindResult = function(result, dialog, editor) {
var imgCont = document.getElementById(editor.id + '_imgc');
var absolute_folder = result.absolute_folder;
var related_folder = result.related_folder;
dialog.related_folder = related_folder;
if (related_folder === "/") {
} else {
appendFolder(-1, absolute_folder, related_folder, "..", imgCont, dialog);
}
if (result.folders) {
for (var i = 0; i < result.folders.length; i++) {
var imgSrc = result.folders[i].src;
appendFolder(i, absolute_folder, related_folder, imgSrc, imgCont, dialog);
}
}
if (result.images) {
for (var i = 0; i < result.images.length; i++) {
var imgSrc = result.images[i].src;
appendImage(i, absolute_folder, related_folder, imgSrc, imgCont, dialog);
}
}
}
var loadImages = function(path, dialog, editor) {
var imgCont = document.getElementById(dialog.getParentEditor().id + '_imgc');
imgCont.innerHTML = '';
var callback = {
success:function(o) {
var imgCont = document.getElementById(editor.id + '_imgc');
imgCont.innerHTML = '';
var result = yuiAjaxObject.JSONParse(o);
if (result) {
bindResult(result, dialog, editor);
}
},
failure:function(o) {
}
};
yuiAjaxObject.startRequest('GET', 'ImageListProvider.aspx', 'file=' + encodeURIComponent(path) + '&id='+editor.id, callback.success, callback.failure, this);
}
CKEDITOR.plugins.add( 'selectImage',
{
init: function( editor )
{
editor.addCommand( 'selectImageDialog', new CKEDITOR.dialogCommand( 'selectImageDialog' ) );
editor.ui.addButton( 'SelectImage', {
label: 'Insert an image by select it.',
command: 'selectImageDialog',
icon: this.path + 'images/selectimage.gif'
});
}
});
CKEDITOR.dialog.add( 'selectImageDialog', function( editor )
{
return {
title : 'Select an image to insert',
minWidth : 684,
minHeight : 508,
contents :
[
{
id : 'general',
label : 'Settings',
elements :
[
{
type : 'html',
html : 'This dialog window lets you create simple image for your website, by browser and select it.'
},
{
type : 'text',
id : 'url',
label : 'URL',
validate : CKEDITOR.dialog.validate.notEmpty( 'The link must have an URL.' ),
required : true,
commit : function( data )
{
data.url = this.getValue();
}
},
{
type : 'text',
id : 'title',
label : 'Title',
required : false,
commit : function( data )
{
data.title = this.getValue();
}
},
{
type : 'file',
id : 'fuImg',
label : '<b style="font-weight: bold;">Or select an image to upload</b>',
required : false,
html : '<div id="' + editor.id + '_fuImg" style="width: 684px; height: 395px; overflow: auto;"><div>'
},
{
type : 'html',
id : 'imgc',
html : '<div id="' + editor.id + '_imgc" style="width: 684px; height: 395px; overflow: auto;"><div>'
}
]
}
],onShow : function(o)
{
var imgCont = document.getElementById(this.getParentEditor().id + '_imgc');
if (!imgCont || imgCont.innerHTML.trimLeftStr(' ') == '' || imgCont.innerHTML.trimLeftStr(' ').trimRightStr(' ') == '<div></div>') {
loadImages('/', this, this.getParentEditor());
}
this._.contents.general.fuImg.getInputElement().$.dialog = this;
this._.contents.general.fuImg.getInputElement().$.onchange = function() {
var fuImg = this;
if (fuImg.files != null && fuImg.files.length > 0) {
if (NTTHAO.util.isImageFile(fuImg.value)) { // is image file
window.loadingPanel().show();
var fd = new FormData();
fd.append('fuImg', fuImg.files[0]);
fd.append('path', this.dialog.related_folder);
var xhr = null;
if (window.XMLHttpRequest) {
xhr = new XMLHttpRequest();
}
else { // for older IE 5/6
xhr = new ActiveXObject("Microsoft.XMLHTTP");
}
xhr.dialog = this.dialog;
xhr.addEventListener("load", function(e) {
this.dialog.getContentElement('general', 'url').setValue(e.target.responseText);
}, false);
xhr.addEventListener("error", function(e) {
alert('Có lỗi xảy ra trong quá trình upload file.\n Vui lòng đăng nhập lại.');
window.loadingPanel().hide();
}, false);
xhr.open("POST", '/admin/EditorFileUploader.aspx', false);
xhr.send(fd);
xhr.open('GET', '/admin/RefreshSessionState.aspx', false);
this.value = '';
loadImages(this.dialog.related_folder, this.dialog, this.dialog.getParentEditor());
window.loadingPanel().hide();
}
else {
fuImg.value = '';
alert('Chức năng này chỉ hỗ trợ file ảnh với các định dạng: *.jpg, *.jpeg, *.jpe, *.png, *.gif, *.bmp');
}
}
};
/*
document[this.getParentEditor().id] = this.getParentEditor();
var callback = {
success:function(o) {
var dialog = this;
var imgCont = document.getElementById(dialog.getParentEditor().id + '_imgc');
document[dialog.getParentEditor().id + '_imgc'] = imgCont;
imgCont.innerHTML = '';
var result = yuiAjaxObject.JSONParse(o);
if (result) {
bindResult(result, dialog, dialog.getParentEditor());
}
},
failure:function(o) {
}
};
//yuiAjaxObject.startRequest('GET', 'ImageListProvider.aspx', 'id='+this.getParentEditor().id, callback.success, callback.failure, this);
*/
},
onOk : function()
{
var dialog = this,
data = {},
img = editor.document.createElement( 'img' );
this.commitContent( data );
img.setAttribute( 'src', data.url );
if ( data.title )
img.setAttribute( 'title', data.title );
editor.insertElement( img );
}
};
}); | JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'a11yhelp', 'fa',
{
accessibilityHelp :
{
title : 'دستورالعملهای دسترسی',
contents : 'راهنمای فهرست مطالب. برای بستن این کادر محاورهای ESC را فشار دهید.',
legend :
[
{
name : 'عمومی',
items :
[
{
name : 'نوار ابزار ویرایشگر',
legend:
'${toolbarFocus} را برای باز کردن نوار ابزار بفشارید. با کلید Tab و Shif-Tab در مجموعه نوار ابزار بعدی و قبلی حرکت کنید. برای حرکت در کلید نوار ابزار قبلی و بعدی با کلید جهتنمای راست و چپ جابجا شوید. کلید Space یا Enter را برای فعال کردن کلید نوار ابزار بفشارید.'
},
{
name : 'پنجره محاورهای ویرایشگر',
legend :
'در داخل یک پنجره محاورهای، کلید Tab را بفشارید تا به پنجرهی بعدی بروید، Shift+Tab برای حرکت به فیلد قبلی، فشردن Enter برای ثبت اطلاعات پنجره، فشردن Esc برای لغو پنجره محاورهای و برای پنجرههایی که چندین برگه دارند، فشردن Alt+F10 جهت رفتن به Tab-List. در نهایت حرکت به برگه بعدی با Tab یا کلید جهتنمای راست. حرکت به برگه قبلی با Shift+Tab یا کلید جهتنمای چپ. فشردن Space یا Enter برای انتخاب یک برگه.'
},
{
name : 'منوی متنی ویرایشگر',
legend :
'${contextMenu} یا کلید برنامههای کاربردی را برای باز کردن منوی متن را بفشارید. سپس میتوانید برای حرکت به گزینه بعدی منو با کلید Tab و یا کلید جهتنمای پایین جابجا شوید. حرکت به گزینه قبلی با Shift+Tab یا کلید جهتنمای بالا. فشردن Space یا Enter برای انتخاب یک گزینه از منو. باز کردن زیر شاخه گزینه منو جاری با کلید Space یا Enter و یا کلید جهتنمای راست و چپ. بازگشت به منوی والد با کلید Esc یا کلید جهتنمای چپ. بستن منوی متن با Esc.'
},
{
name : 'جعبه فهرست ویرایشگر',
legend :
'در داخل جعبه لیست، قلم دوم از اقلام لیست بعدی را با TAB و یا Arrow Down حرکت دهید. انتقال به قلم دوم از اقلام لیست قبلی را با SHIFT + TAB یا UP ARROW. کلید Space یا ENTER را برای انتخاب گزینه لیست بفشارید. کلید ESC را برای بستن جعبه لیست بفشارید.'
},
{
name : 'ویرایشگر عنصر نوار راه',
legend :
'برای رفتن به مسیر عناصر ${elementsPathFocus} را بفشارید. حرکت به کلید عنصر بعدی با کلید Tab یا کلید جهتنمای راست. برگشت به کلید قبلی با Shift+Tab یا کلید جهتنمای چپ. فشردن Space یا Enter برای انتخاب یک عنصر در ویرایشگر.'
}
]
},
{
name : 'فرمانها',
items :
[
{
name : 'بازگشت فرمان',
legend : 'فشردن ${undo}'
},
{
name : 'انجام مجدد فرمان',
legend : 'فشردن ${redo}'
},
{
name : 'فرمان متن درشت',
legend : 'فشردن ${bold}'
},
{
name : 'فرمان متن کج',
legend : 'فشردن ${italic}'
},
{
name : 'فرمان متن زیرخطدار',
legend : 'فشردن ${underline}'
},
{
name : 'فرمان پیوند',
legend : 'فشردن ${link}'
},
{
name : 'بستن نوار ابزار فرمان',
legend : 'فشردن ${toolbarCollapse}'
},
{
name : 'راهنمای دسترسی',
legend : 'فشردن ${a11yHelp}'
}
]
}
]
}
});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'a11yhelp', 'ku',
{
accessibilityHelp :
{
title : 'ڕێنمای لەبەردەستدابوون',
contents : 'پێکهاتەی یارمەتی. کلیك ESC بۆ داخستنی ئەم دیالۆگه.',
legend :
[
{
name : 'گشتی',
items :
[
{
name : 'تووڵامرازی دهستكاریكهر',
legend:
'کلیك ${toolbarFocus} بۆ ڕابەری تووڵامراز. بۆ گواستنەوەی پێشوو داهاتووی گرووپی تووڵامرازی داگرتنی کلیلی TAB لهگهڵ SHIFT-TAB. بۆ گواستنەوەی پێشوو داهاتووی دووگمەی تووڵامرازی لەڕێی کلیلی تیری دەستی ڕاست یان کلیلی تیری دەستی چەپ. کلیکی کلیلی SPACE یان ENTER بۆ چالاککردنی دووگمەی تووڵامراز.'
},
{
name : 'دیالۆگی دهستكاریكهر',
legend :
'لەهەمانکاتدا کەتۆ لەدیالۆگی, کلیکی کلیلی TAB بۆ ڕابەری خانەی دیالۆگێکی تر, داگرتنی کلیلی SHIFT + TAB بۆ گواستنەوەی بۆ خانەی پێشووتر, کلیكی کلیلی ENTER بۆ ڕازیکردنی دیالۆگەکە, کلیكی کلیلی ESC بۆ هەڵوەشاندنەوەی دیالۆگەکە. بۆ دیالۆگی لەبازدەری (تابی) زیاتر, کلیكی کلیلی ALT + F10 بۆ ڕابهری لیستی بازدهرهکان. بۆ چوونه بازدهری تابی داهاتوو کلیكی کلیلی TAB یان کلیلی تیری دهستی ڕاست. بۆچوونه بازدهری تابی پێشوو داگرتنی کلیلی SHIFT + TAB یان کلیلی تیری دهستی چهپ. کلیی کلیلی SPACE یان ENTER بۆ ههڵبژاردنی بازدهر (تاب).'
},
{
name : 'پێڕستی سهرنووسهر',
legend :
'کلیك ${contextMenu} یان دوگمهی لیسته(Menu) بۆ کردنهوهی لیستهی دهق. بۆ چوونه ههڵبژاردهیهکی تر له لیسته کلیکی کلیلی TAB یان کلیلی تیری ڕوو لهخوارهوه بۆ چوون بۆ ههڵبژاردهی پێشوو کلیکی کلیلی SHIFT+TAB یان کلیلی تیری ڕوو له سهرهوه. داگرتنی کلیلی SPACE یان ENTER بۆ ههڵبژاردنی ههڵبژاردهی لیسته. بۆ کردنهوهی لقی ژێر لیسته لهههڵبژاردهی لیسته کلیکی کلیلی SPACE یان ENTER یان کلیلی تیری دهستی ڕاست. بۆ گهڕانهوه بۆ سهرهوهی لیسته کلیکی کلیلی ESC یان کلیلی تیری دهستی چهپ. بۆ داخستنی لیسته کلیكی کلیلی ESC بکه.'
},
{
name : 'لیستی سنووقی سهرنووسهر',
legend :
'لهناو سنوقی لیست, چۆن بۆ ههڵنبژاردهی لیستێکی تر کلیکی کلیلی TAB یان کلیلی تیری ڕوو لهخوار. چوون بۆ ههڵبژاردهی لیستی پێشوو کلیکی کلیلی SHIFT + TAB یان کلیلی تیری ڕوو لهسهرهوه. کلیکی کلیلی SPACE یان ENTER بۆ دیاریکردنی ههڵبژاردهی لیست. کلیکی کلیلی ESC بۆ داخستنی سنوقی لیست.'
},
{
name : 'تووڵامرازی توخم',
legend :
'کلیك ${elementsPathFocus} بۆ ڕابهری تووڵامرازی توخمهکان. چوون بۆ دوگمهی توخمێکی تر کلیکی کلیلی TAB یان کلیلی تیری دهستی ڕاست. چوون بۆ دوگمهی توخمی پێشوو کلیلی SHIFT+TAB یان کلیکی کلیلی تیری دهستی چهپ. داگرتنی کلیلی SPACE یان ENTER بۆ دیاریکردنی توخمهکه لهسهرنووسه.'
}
]
},
{
name : 'فهرمانهکان',
items :
[
{
name : 'فهرمانی پووچکردنهوه',
legend : 'کلیك ${undo}'
},
{
name : 'فهرمانی ههڵگهڕانهوه',
legend : 'کلیك ${redo}'
},
{
name : 'فهرمانی دهقی قهڵهو',
legend : 'کلیك ${bold}'
},
{
name : 'فهرمانی دهقی لار',
legend : 'کلیك ${italic}'
},
{
name : 'فهرمانی ژێرهێڵ',
legend : 'کلیك ${underline}'
},
{
name : 'فهرمانی بهستهر',
legend : 'کلیك ${link}'
},
{
name : 'شاردهنهوهی تووڵامراز',
legend : 'کلیك ${toolbarCollapse}'
},
{
name : 'دهستپێگهیشتنی یارمهتی',
legend : 'کلیك ${a11yHelp}'
}
]
}
]
}
});
| JavaScript |
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/* SHA-1 implementation in JavaScript | (c) Chris Veness 2002-2010 | www.movable-type.co.uk */
/* - see http://csrc.nist.gov/groups/ST/toolkit/secure_hashing.html */
/* http://csrc.nist.gov/groups/ST/toolkit/examples.html */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
var Sha1 = {}; // Sha1 namespace
/**
* Generates SHA-1 hash of string
*
* @param {String} msg String to be hashed
* @param {Boolean} [utf8encode=true] Encode msg as UTF-8 before generating hash
* @returns {String} Hash of msg as hex character string
*/
Sha1.hash = function(msg, utf8encode) {
utf8encode = (typeof utf8encode == 'undefined') ? true : utf8encode;
// convert string to UTF-8, as SHA only deals with byte-streams
if (utf8encode) msg = Utf8.encode(msg);
// constants [§4.2.1]
var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];
// PREPROCESSING
msg += String.fromCharCode(0x80); // add trailing '1' bit (+ 0's padding) to string [§5.1.1]
// convert string msg into 512-bit/16-integer blocks arrays of ints [§5.2.1]
var l = msg.length/4 + 2; // length (in 32-bit integers) of msg + ‘1’ + appended length
var N = Math.ceil(l/16); // number of 16-integer-blocks required to hold 'l' ints
var M = new Array(N);
for (var i=0; i<N; i++) {
M[i] = new Array(16);
for (var j=0; j<16; j++) { // encode 4 chars per integer, big-endian encoding
M[i][j] = (msg.charCodeAt(i*64+j*4)<<24) | (msg.charCodeAt(i*64+j*4+1)<<16) |
(msg.charCodeAt(i*64+j*4+2)<<8) | (msg.charCodeAt(i*64+j*4+3));
} // note running off the end of msg is ok 'cos bitwise ops on NaN return 0
}
// add length (in bits) into final pair of 32-bit integers (big-endian) [§5.1.1]
// note: most significant word would be (len-1)*8 >>> 32, but since JS converts
// bitwise-op args to 32 bits, we need to simulate this by arithmetic operators
M[N-1][14] = ((msg.length-1)*8) / Math.pow(2, 32); M[N-1][14] = Math.floor(M[N-1][14])
M[N-1][15] = ((msg.length-1)*8) & 0xffffffff;
// set initial hash value [§5.3.1]
var H0 = 0x67452301;
var H1 = 0xefcdab89;
var H2 = 0x98badcfe;
var H3 = 0x10325476;
var H4 = 0xc3d2e1f0;
// HASH COMPUTATION [§6.1.2]
var W = new Array(80); var a, b, c, d, e;
for (var i=0; i<N; i++) {
// 1 - prepare message schedule 'W'
for (var t=0; t<16; t++) W[t] = M[i][t];
for (var t=16; t<80; t++) W[t] = Sha1.ROTL(W[t-3] ^ W[t-8] ^ W[t-14] ^ W[t-16], 1);
// 2 - initialise five working variables a, b, c, d, e with previous hash value
a = H0; b = H1; c = H2; d = H3; e = H4;
// 3 - main loop
for (var t=0; t<80; t++) {
var s = Math.floor(t/20); // seq for blocks of 'f' functions and 'K' constants
var T = (Sha1.ROTL(a,5) + Sha1.f(s,b,c,d) + e + K[s] + W[t]) & 0xffffffff;
e = d;
d = c;
c = Sha1.ROTL(b, 30);
b = a;
a = T;
}
// 4 - compute the new intermediate hash value
H0 = (H0+a) & 0xffffffff; // note 'addition modulo 2^32'
H1 = (H1+b) & 0xffffffff;
H2 = (H2+c) & 0xffffffff;
H3 = (H3+d) & 0xffffffff;
H4 = (H4+e) & 0xffffffff;
}
return Sha1.toHexStr(H0) + Sha1.toHexStr(H1) +
Sha1.toHexStr(H2) + Sha1.toHexStr(H3) + Sha1.toHexStr(H4);
}
//
// function 'f' [§4.1.1]
//
Sha1.f = function(s, x, y, z) {
switch (s) {
case 0: return (x & y) ^ (~x & z); // Ch()
case 1: return x ^ y ^ z; // Parity()
case 2: return (x & y) ^ (x & z) ^ (y & z); // Maj()
case 3: return x ^ y ^ z; // Parity()
}
}
//
// rotate left (circular left shift) value x by n positions [§3.2.5]
//
Sha1.ROTL = function(x, n) {
return (x<<n) | (x>>>(32-n));
}
//
// hexadecimal representation of a number
// (note toString(16) is implementation-dependant, and
// in IE returns signed numbers when used on full words)
//
Sha1.toHexStr = function(n) {
var s="", v;
for (var i=7; i>=0; i--) { v = (n>>>(i*4)) & 0xf; s += v.toString(16); }
return s;
}
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ | JavaScript |
/*
* A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
* Digest Algorithm, as defined in RFC 1321.
* Version 2.1 Copyright (C) Paul Johnston 1999 - 2002.
* Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
* Distributed under the BSD License
* See http://pajhome.org.uk/crypt/md5 for more info.
*/
/*
* Configurable variables. You may need to tweak these to be compatible with
* the server-side, but the defaults work in most cases.
*/
var hexcase = 0; /* hex output format. 0 - lowercase; 1 - uppercase */
var b64pad = ""; /* base-64 pad character. "=" for strict RFC compliance */
var chrsz = 8; /* bits per input character. 8 - ASCII; 16 - Unicode */
/*
* These are the functions you'll usually want to call
* They take string arguments and return either hex or base-64 encoded strings
*/
function hex_md5(s){ return binl2hex(core_md5(str2binl(s), s.length * chrsz));}
function b64_md5(s){ return binl2b64(core_md5(str2binl(s), s.length * chrsz));}
function str_md5(s){ return binl2str(core_md5(str2binl(s), s.length * chrsz));}
function hex_hmac_md5(key, data) { return binl2hex(core_hmac_md5(key, data)); }
function b64_hmac_md5(key, data) { return binl2b64(core_hmac_md5(key, data)); }
function str_hmac_md5(key, data) { return binl2str(core_hmac_md5(key, data)); }
/*
* Perform a simple self-test to see if the VM is working
*/
function md5_vm_test()
{
return hex_md5("abc") == "900150983cd24fb0d6963f7d28e17f72";
}
/*
* Calculate the MD5 of an array of little-endian words, and a bit length
*/
function core_md5(x, len)
{
/* append padding */
x[len >> 5] |= 0x80 << ((len) % 32);
x[(((len + 64) >>> 9) << 4) + 14] = len;
var a = 1732584193;
var b = -271733879;
var c = -1732584194;
var d = 271733878;
for(var i = 0; i < x.length; i += 16)
{
var olda = a;
var oldb = b;
var oldc = c;
var oldd = d;
a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);
d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);
c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819);
b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);
a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);
d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426);
c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);
b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);
a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416);
d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);
c = md5_ff(c, d, a, b, x[i+10], 17, -42063);
b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);
a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682);
d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);
c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);
b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329);
a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);
d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);
c = md5_gg(c, d, a, b, x[i+11], 14, 643717713);
b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);
a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);
d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083);
c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);
b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);
a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438);
d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);
c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);
b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501);
a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);
d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);
c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473);
b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);
a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);
d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);
c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562);
b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);
a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);
d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353);
c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);
b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);
a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174);
d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);
c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);
b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189);
a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);
d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);
c = md5_hh(c, d, a, b, x[i+15], 16, 530742520);
b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);
a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);
d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415);
c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);
b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);
a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571);
d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);
c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);
b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);
a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359);
d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);
c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);
b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649);
a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);
d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);
c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259);
b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);
a = safe_add(a, olda);
b = safe_add(b, oldb);
c = safe_add(c, oldc);
d = safe_add(d, oldd);
}
return Array(a, b, c, d);
}
/*
* These functions implement the four basic operations the algorithm uses.
*/
function md5_cmn(q, a, b, x, s, t)
{
return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s),b);
}
function md5_ff(a, b, c, d, x, s, t)
{
return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t);
}
function md5_gg(a, b, c, d, x, s, t)
{
return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t);
}
function md5_hh(a, b, c, d, x, s, t)
{
return md5_cmn(b ^ c ^ d, a, b, x, s, t);
}
function md5_ii(a, b, c, d, x, s, t)
{
return md5_cmn(c ^ (b | (~d)), a, b, x, s, t);
}
/*
* Calculate the HMAC-MD5, of a key and some data
*/
function core_hmac_md5(key, data)
{
var bkey = str2binl(key);
if(bkey.length > 16) bkey = core_md5(bkey, key.length * chrsz);
var ipad = Array(16), opad = Array(16);
for(var i = 0; i < 16; i++)
{
ipad[i] = bkey[i] ^ 0x36363636;
opad[i] = bkey[i] ^ 0x5C5C5C5C;
}
var hash = core_md5(ipad.concat(str2binl(data)), 512 + data.length * chrsz);
return core_md5(opad.concat(hash), 512 + 128);
}
/*
* Add integers, wrapping at 2^32. This uses 16-bit operations internally
* to work around bugs in some JS interpreters.
*/
function safe_add(x, y)
{
var lsw = (x & 0xFFFF) + (y & 0xFFFF);
var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
return (msw << 16) | (lsw & 0xFFFF);
}
/*
* Bitwise rotate a 32-bit number to the left.
*/
function bit_rol(num, cnt)
{
return (num << cnt) | (num >>> (32 - cnt));
}
/*
* Convert a string to an array of little-endian words
* If chrsz is ASCII, characters >255 have their hi-byte silently ignored.
*/
function str2binl(str)
{
var bin = Array();
var mask = (1 << chrsz) - 1;
for(var i = 0; i < str.length * chrsz; i += chrsz)
bin[i>>5] |= (str.charCodeAt(i / chrsz) & mask) << (i%32);
return bin;
}
/*
* Convert an array of little-endian words to a string
*/
function binl2str(bin)
{
var str = "";
var mask = (1 << chrsz) - 1;
for(var i = 0; i < bin.length * 32; i += chrsz)
str += String.fromCharCode((bin[i>>5] >>> (i % 32)) & mask);
return str;
}
/*
* Convert an array of little-endian words to a hex string.
*/
function binl2hex(binarray)
{
var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef";
var str = "";
for(var i = 0; i < binarray.length * 4; i++)
{
str += hex_tab.charAt((binarray[i>>2] >> ((i%4)*8+4)) & 0xF) +
hex_tab.charAt((binarray[i>>2] >> ((i%4)*8 )) & 0xF);
}
return str;
}
/*
* Convert an array of little-endian words to a base-64 string
*/
function binl2b64(binarray)
{
var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
var str = "";
for(var i = 0; i < binarray.length * 4; i += 3)
{
var triplet = (((binarray[i >> 2] >> 8 * ( i %4)) & 0xFF) << 16)
| (((binarray[i+1 >> 2] >> 8 * ((i+1)%4)) & 0xFF) << 8 )
| ((binarray[i+2 >> 2] >> 8 * ((i+2)%4)) & 0xFF);
for(var j = 0; j < 4; j++)
{
if(i * 8 + j * 6 > binarray.length * 32) str += b64pad;
else str += tab.charAt((triplet >> 6*(3-j)) & 0x3F);
}
}
return str;
}
| JavaScript |
/*
* Treeview 1.5pre - jQuery plugin to hide and show branches of a tree
*
* http://bassistance.de/jquery-plugins/jquery-plugin-treeview/
* http://docs.jquery.com/Plugins/Treeview
*
* Copyright (c) 2007 Jörn Zaefferer
*
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
* Revision: $Id: jquery.treeview.js 5759 2008-07-01 07:50:28Z joern.zaefferer $
*
*/
;(function($) {
// TODO rewrite as a widget, removing all the extra plugins
$.extend($.fn, {
swapClass: function(c1, c2) {
var c1Elements = this.filter('.' + c1);
this.filter('.' + c2).removeClass(c2).addClass(c1);
c1Elements.removeClass(c1).addClass(c2);
return this;
},
replaceClass: function(c1, c2) {
return this.filter('.' + c1).removeClass(c1).addClass(c2).end();
},
hoverClass: function(className) {
className = className || "hover";
return this.hover(function() {
$(this).addClass(className);
}, function() {
$(this).removeClass(className);
});
},
heightToggle: function(animated, callback) {
animated ?
this.animate({ height: "toggle" }, animated, callback) :
this.each(function(){
jQuery(this)[ jQuery(this).is(":hidden") ? "show" : "hide" ]();
if(callback)
callback.apply(this, arguments);
});
},
heightHide: function(animated, callback) {
if (animated) {
this.animate({ height: "hide" }, animated, callback);
} else {
this.hide();
if (callback)
this.each(callback);
}
},
prepareBranches: function(settings) {
if (!settings.prerendered) {
// mark last tree items
this.filter(":last-child:not(ul)").addClass(CLASSES.last);
// collapse whole tree, or only those marked as closed, anyway except those marked as open
this.filter((settings.collapsed ? "" : "." + CLASSES.closed) + ":not(." + CLASSES.open + ")").find(">ul").hide();
}
// return all items with sublists
return this.filter(":has(>ul)");
},
applyClasses: function(settings, toggler) {
// TODO use event delegation
this.filter(":has(>ul):not(:has(>a))").find(">span").unbind("click.treeview").bind("click.treeview", function(event) {
// don't handle click events on children, eg. checkboxes
if ( this == event.target )
toggler.apply($(this).next());
}).add( $("a", this) ).hoverClass();
if (!settings.prerendered) {
// handle closed ones first
this.filter(":has(>ul:hidden)")
.addClass(CLASSES.expandable)
.replaceClass(CLASSES.last, CLASSES.lastExpandable);
// handle open ones
this.not(":has(>ul:hidden)")
.addClass(CLASSES.collapsable)
.replaceClass(CLASSES.last, CLASSES.lastCollapsable);
// create hitarea if not present
var hitarea = this.find("div." + CLASSES.hitarea);
if (!hitarea.length)
hitarea = this.prepend("<div class=\"" + CLASSES.hitarea + "\"/>").find("div." + CLASSES.hitarea);
hitarea.removeClass().addClass(CLASSES.hitarea).each(function() {
var classes = "";
$.each($(this).parent().attr("class").split(" "), function() {
classes += this + "-hitarea ";
});
$(this).addClass( classes );
})
}
// apply event to hitarea
this.find("div." + CLASSES.hitarea).click( toggler );
},
treeview: function(settings) {
settings = $.extend({
cookieId: "treeview"
}, settings);
if ( settings.toggle ) {
var callback = settings.toggle;
settings.toggle = function() {
return callback.apply($(this).parent()[0], arguments);
};
}
// factory for treecontroller
function treeController(tree, control) {
// factory for click handlers
function handler(filter) {
return function() {
// reuse toggle event handler, applying the elements to toggle
// start searching for all hitareas
toggler.apply( $("div." + CLASSES.hitarea, tree).filter(function() {
// for plain toggle, no filter is provided, otherwise we need to check the parent element
return filter ? $(this).parent("." + filter).length : true;
}) );
return false;
};
}
// click on first element to collapse tree
$("a:eq(0)", control).click( handler(CLASSES.collapsable) );
// click on second to expand tree
$("a:eq(1)", control).click( handler(CLASSES.expandable) );
// click on third to toggle tree
$("a:eq(2)", control).click( handler() );
}
// handle toggle event
function toggler() {
$(this)
.parent()
// swap classes for hitarea
.find(">.hitarea")
.swapClass( CLASSES.collapsableHitarea, CLASSES.expandableHitarea )
.swapClass( CLASSES.lastCollapsableHitarea, CLASSES.lastExpandableHitarea )
.end()
// swap classes for parent li
.swapClass( CLASSES.collapsable, CLASSES.expandable )
.swapClass( CLASSES.lastCollapsable, CLASSES.lastExpandable )
// find child lists
.find( ">ul" )
// toggle them
.heightToggle( settings.animated, settings.toggle );
if ( settings.unique ) {
$(this).parent()
.siblings()
// swap classes for hitarea
.find(">.hitarea")
.replaceClass( CLASSES.collapsableHitarea, CLASSES.expandableHitarea )
.replaceClass( CLASSES.lastCollapsableHitarea, CLASSES.lastExpandableHitarea )
.end()
.replaceClass( CLASSES.collapsable, CLASSES.expandable )
.replaceClass( CLASSES.lastCollapsable, CLASSES.lastExpandable )
.find( ">ul" )
.heightHide( settings.animated, settings.toggle );
}
}
this.data("toggler", toggler);
function serialize() {
function binary(arg) {
return arg ? 1 : 0;
}
var data = [];
branches.each(function(i, e) {
data[i] = $(e).is(":has(>ul:visible)") ? 1 : 0;
});
$.cookie(settings.cookieId, data.join(""), settings.cookieOptions );
}
function deserialize() {
var stored = $.cookie(settings.cookieId);
if ( stored ) {
var data = stored.split("");
branches.each(function(i, e) {
$(e).find(">ul")[ parseInt(data[i]) ? "show" : "hide" ]();
});
}
}
// add treeview class to activate styles
this.addClass("treeview");
// prepare branches and find all tree items with child lists
var branches = this.find("li").prepareBranches(settings);
switch(settings.persist) {
case "cookie":
var toggleCallback = settings.toggle;
settings.toggle = function() {
serialize();
if (toggleCallback) {
toggleCallback.apply(this, arguments);
}
};
deserialize();
break;
case "location":
var current = this.find("a").filter(function() {
return this.href.toLowerCase() == location.href.toLowerCase();
});
if ( current.length ) {
// TODO update the open/closed classes
var items = current.addClass("selected").parents("ul, li").add( current.next() ).show();
if (settings.prerendered) {
// if prerendered is on, replicate the basic class swapping
items.filter("li")
.swapClass( CLASSES.collapsable, CLASSES.expandable )
.swapClass( CLASSES.lastCollapsable, CLASSES.lastExpandable )
.find(">.hitarea")
.swapClass( CLASSES.collapsableHitarea, CLASSES.expandableHitarea )
.swapClass( CLASSES.lastCollapsableHitarea, CLASSES.lastExpandableHitarea );
}
}
break;
}
branches.applyClasses(settings, toggler);
// if control option is set, create the treecontroller and show it
if ( settings.control ) {
treeController(this, settings.control);
$(settings.control).show();
}
return this;
}
});
// classes used by the plugin
// need to be styled via external stylesheet, see first example
$.treeview = {};
var CLASSES = ($.treeview.classes = {
open: "open",
closed: "closed",
expandable: "expandable",
expandableHitarea: "expandable-hitarea",
lastExpandableHitarea: "lastExpandable-hitarea",
collapsable: "collapsable",
collapsableHitarea: "collapsable-hitarea",
lastCollapsableHitarea: "lastCollapsable-hitarea",
lastCollapsable: "lastCollapsable",
lastExpandable: "lastExpandable",
last: "last",
hitarea: "hitarea"
});
})(jQuery); | JavaScript |
(function($) {
var CLASSES = $.treeview.classes;
var proxied = $.fn.treeview;
$.fn.treeview = function(settings) {
settings = $.extend({}, settings);
if (settings.add) {
return this.trigger("add", [settings.add]);
}
if (settings.remove) {
return this.trigger("remove", [settings.remove]);
}
return proxied.apply(this, arguments).bind("add", function(event, branches) {
$(branches).prev()
.removeClass(CLASSES.last)
.removeClass(CLASSES.lastCollapsable)
.removeClass(CLASSES.lastExpandable)
.find(">.hitarea")
.removeClass(CLASSES.lastCollapsableHitarea)
.removeClass(CLASSES.lastExpandableHitarea);
$(branches).find("li").andSelf().prepareBranches(settings).applyClasses(settings, $(this).data("toggler"));
}).bind("remove", function(event, branches) {
var prev = $(branches).prev();
var parent = $(branches).parent();
$(branches).remove();
prev.filter(":last-child").addClass(CLASSES.last)
.filter("." + CLASSES.expandable).replaceClass(CLASSES.last, CLASSES.lastExpandable).end()
.find(">.hitarea").replaceClass(CLASSES.expandableHitarea, CLASSES.lastExpandableHitarea).end()
.filter("." + CLASSES.collapsable).replaceClass(CLASSES.last, CLASSES.lastCollapsable).end()
.find(">.hitarea").replaceClass(CLASSES.collapsableHitarea, CLASSES.lastCollapsableHitarea);
if (parent.is(":not(:has(>))") && parent[0] != this) {
parent.parent().removeClass(CLASSES.collapsable).removeClass(CLASSES.expandable)
parent.siblings(".hitarea").andSelf().remove();
}
});
};
})(jQuery); | JavaScript |
NTTHAO.namespace("TreeView");
NTTHAO.TreeView.create = function(o, data, clickEvent) {
o = NTTHAO.util.getElement(o);
var oCtrl = new Object();
oCtrl.Tree = new YAHOO.widget.TreeView(o.id);
}
| JavaScript |
/**
* Name: Highslide JS
* Version: 4.1.13 (2011-10-06)
* Config: default +slideshow +positioning +transitions +viewport +thumbstrip
* Author: Torstein Hønsi
* Support: www.highslide.com/support
* License: www.highslide.com/#license
*/
if (!hs) { var hs = {
// Language strings
lang : {
cssDirection: 'ltr',
loadingText : 'Loading...',
loadingTitle : 'Click to cancel',
focusTitle : 'Click to bring to front',
fullExpandTitle : 'Expand to actual size (f)',
creditsText : 'Powered by <i>Highslide JS</i>',
creditsTitle : 'Go to the Highslide JS homepage',
previousText : 'Previous',
nextText : 'Next',
moveText : 'Move',
closeText : 'Close',
closeTitle : 'Close (esc)',
resizeTitle : 'Resize',
playText : 'Play',
playTitle : 'Play slideshow (spacebar)',
pauseText : 'Pause',
pauseTitle : 'Pause slideshow (spacebar)',
previousTitle : 'Previous (arrow left)',
nextTitle : 'Next (arrow right)',
moveTitle : 'Move',
fullExpandText : '1:1',
number: 'Image %1 of %2',
restoreTitle : 'Click to close image, click and drag to move. Use arrow keys for next and previous.'
},
// See http://highslide.com/ref for examples of settings
graphicsDir : 'highslide/graphics/',
expandCursor : 'zoomin.cur', // null disables
restoreCursor : 'zoomout.cur', // null disables
expandDuration : 250, // milliseconds
restoreDuration : 250,
marginLeft : 15,
marginRight : 15,
marginTop : 15,
marginBottom : 15,
zIndexCounter : 1001, // adjust to other absolutely positioned elements
loadingOpacity : 0.75,
allowMultipleInstances: true,
numberOfImagesToPreload : 5,
outlineWhileAnimating : 2, // 0 = never, 1 = always, 2 = HTML only
outlineStartOffset : 3, // ends at 10
padToMinWidth : false, // pad the popup width to make room for wide caption
fullExpandPosition : 'bottom right',
fullExpandOpacity : 1,
showCredits : true, // you can set this to false if you want
creditsHref : 'http://highslide.com/',
creditsTarget : '_self',
enableKeyListener : true,
openerTagNames : ['a'], // Add more to allow slideshow indexing
transitions : [],
transitionDuration: 250,
dimmingOpacity: 0, // Lightbox style dimming background
dimmingDuration: 50, // 0 for instant dimming
anchor : 'auto', // where the image expands from
align : 'auto', // position in the client (overrides anchor)
targetX: null, // the id of a target element
targetY: null,
dragByHeading: true,
minWidth: 200,
minHeight: 200,
allowSizeReduction: true, // allow the image to reduce to fit client size. If false, this overrides minWidth and minHeight
outlineType : 'drop-shadow', // set null to disable outlines
skin : {
controls:
'<div class="highslide-controls"><ul>'+
'<li class="highslide-previous">'+
'<a href="#" title="{hs.lang.previousTitle}">'+
'<span>{hs.lang.previousText}</span></a>'+
'</li>'+
'<li class="highslide-play">'+
'<a href="#" title="{hs.lang.playTitle}">'+
'<span>{hs.lang.playText}</span></a>'+
'</li>'+
'<li class="highslide-pause">'+
'<a href="#" title="{hs.lang.pauseTitle}">'+
'<span>{hs.lang.pauseText}</span></a>'+
'</li>'+
'<li class="highslide-next">'+
'<a href="#" title="{hs.lang.nextTitle}">'+
'<span>{hs.lang.nextText}</span></a>'+
'</li>'+
'<li class="highslide-move">'+
'<a href="#" title="{hs.lang.moveTitle}">'+
'<span>{hs.lang.moveText}</span></a>'+
'</li>'+
'<li class="highslide-full-expand">'+
'<a href="#" title="{hs.lang.fullExpandTitle}">'+
'<span>{hs.lang.fullExpandText}</span></a>'+
'</li>'+
'<li class="highslide-close">'+
'<a href="#" title="{hs.lang.closeTitle}" >'+
'<span>{hs.lang.closeText}</span></a>'+
'</li>'+
'</ul></div>'
},
// END OF YOUR SETTINGS
// declare internal properties
preloadTheseImages : [],
continuePreloading: true,
expanders : [],
overrides : [
'allowSizeReduction',
'useBox',
'anchor',
'align',
'targetX',
'targetY',
'outlineType',
'outlineWhileAnimating',
'captionId',
'captionText',
'captionEval',
'captionOverlay',
'headingId',
'headingText',
'headingEval',
'headingOverlay',
'creditsPosition',
'dragByHeading',
'autoplay',
'numberPosition',
'transitions',
'dimmingOpacity',
'width',
'height',
'wrapperClassName',
'minWidth',
'minHeight',
'maxWidth',
'maxHeight',
'pageOrigin',
'slideshowGroup',
'easing',
'easingClose',
'fadeInOut',
'src'
],
overlays : [],
idCounter : 0,
oPos : {
x: ['leftpanel', 'left', 'center', 'right', 'rightpanel'],
y: ['above', 'top', 'middle', 'bottom', 'below']
},
mouse: {},
headingOverlay: {},
captionOverlay: {},
timers : [],
slideshows : [],
pendingOutlines : {},
clones : {},
onReady: [],
uaVersion: /Trident\/4\.0/.test(navigator.userAgent) ? 8 :
parseFloat((navigator.userAgent.toLowerCase().match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [0,'0'])[1]),
ie : (document.all && !window.opera),
//ie : navigator && /MSIE [678]/.test(navigator.userAgent), // ie9 compliant?
safari : /Safari/.test(navigator.userAgent),
geckoMac : /Macintosh.+rv:1\.[0-8].+Gecko/.test(navigator.userAgent),
$ : function (id) {
if (id) return document.getElementById(id);
},
push : function (arr, val) {
arr[arr.length] = val;
},
createElement : function (tag, attribs, styles, parent, nopad) {
var el = document.createElement(tag);
if (attribs) hs.extend(el, attribs);
if (nopad) hs.setStyles(el, {padding: 0, border: 'none', margin: 0});
if (styles) hs.setStyles(el, styles);
if (parent) parent.appendChild(el);
return el;
},
extend : function (el, attribs) {
for (var x in attribs) el[x] = attribs[x];
return el;
},
setStyles : function (el, styles) {
for (var x in styles) {
if (hs.ieLt9 && x == 'opacity') {
if (styles[x] > 0.99) el.style.removeAttribute('filter');
else el.style.filter = 'alpha(opacity='+ (styles[x] * 100) +')';
}
else el.style[x] = styles[x];
}
},
animate: function(el, prop, opt) {
var start,
end,
unit;
if (typeof opt != 'object' || opt === null) {
var args = arguments;
opt = {
duration: args[2],
easing: args[3],
complete: args[4]
};
}
if (typeof opt.duration != 'number') opt.duration = 250;
opt.easing = Math[opt.easing] || Math.easeInQuad;
opt.curAnim = hs.extend({}, prop);
for (var name in prop) {
var e = new hs.fx(el, opt , name );
start = parseFloat(hs.css(el, name)) || 0;
end = parseFloat(prop[name]);
unit = name != 'opacity' ? 'px' : '';
e.custom( start, end, unit );
}
},
css: function(el, prop) {
if (el.style[prop]) {
return el.style[prop];
} else if (document.defaultView) {
return document.defaultView.getComputedStyle(el, null).getPropertyValue(prop);
} else {
if (prop == 'opacity') prop = 'filter';
var val = el.currentStyle[prop.replace(/\-(\w)/g, function (a, b){ return b.toUpperCase(); })];
if (prop == 'filter')
val = val.replace(/alpha\(opacity=([0-9]+)\)/,
function (a, b) { return b / 100 });
return val === '' ? 1 : val;
}
},
getPageSize : function () {
var d = document, w = window, iebody = d.compatMode && d.compatMode != 'BackCompat'
? d.documentElement : d.body,
ieLt9 = hs.ie && (hs.uaVersion < 9 || typeof pageXOffset == 'undefined');
var width = ieLt9 ? iebody.clientWidth :
(d.documentElement.clientWidth || self.innerWidth),
height = ieLt9 ? iebody.clientHeight : self.innerHeight;
hs.page = {
width: width,
height: height,
scrollLeft: ieLt9 ? iebody.scrollLeft : pageXOffset,
scrollTop: ieLt9 ? iebody.scrollTop : pageYOffset
};
return hs.page;
},
getPosition : function(el) {
var p = { x: el.offsetLeft, y: el.offsetTop };
while (el.offsetParent) {
el = el.offsetParent;
p.x += el.offsetLeft;
p.y += el.offsetTop;
if (el != document.body && el != document.documentElement) {
p.x -= el.scrollLeft;
p.y -= el.scrollTop;
}
}
return p;
},
expand : function(a, params, custom, type) {
if (!a) a = hs.createElement('a', null, { display: 'none' }, hs.container);
if (typeof a.getParams == 'function') return params;
try {
new hs.Expander(a, params, custom);
return false;
} catch (e) { return true; }
},
getElementByClass : function (el, tagName, className) {
var els = el.getElementsByTagName(tagName);
for (var i = 0; i < els.length; i++) {
if ((new RegExp(className)).test(els[i].className)) {
return els[i];
}
}
return null;
},
replaceLang : function(s) {
s = s.replace(/\s/g, ' ');
var re = /{hs\.lang\.([^}]+)\}/g,
matches = s.match(re),
lang;
if (matches) for (var i = 0; i < matches.length; i++) {
lang = matches[i].replace(re, "$1");
if (typeof hs.lang[lang] != 'undefined') s = s.replace(matches[i], hs.lang[lang]);
}
return s;
},
focusTopmost : function() {
var topZ = 0,
topmostKey = -1,
expanders = hs.expanders,
exp,
zIndex;
for (var i = 0; i < expanders.length; i++) {
exp = expanders[i];
if (exp) {
zIndex = exp.wrapper.style.zIndex;
if (zIndex && zIndex > topZ) {
topZ = zIndex;
topmostKey = i;
}
}
}
if (topmostKey == -1) hs.focusKey = -1;
else expanders[topmostKey].focus();
},
getParam : function (a, param) {
a.getParams = a.onclick;
var p = a.getParams ? a.getParams() : null;
a.getParams = null;
return (p && typeof p[param] != 'undefined') ? p[param] :
(typeof hs[param] != 'undefined' ? hs[param] : null);
},
getSrc : function (a) {
var src = hs.getParam(a, 'src');
if (src) return src;
return a.href;
},
getNode : function (id) {
var node = hs.$(id), clone = hs.clones[id], a = {};
if (!node && !clone) return null;
if (!clone) {
clone = node.cloneNode(true);
clone.id = '';
hs.clones[id] = clone;
return node;
} else {
return clone.cloneNode(true);
}
},
discardElement : function(d) {
if (d) hs.garbageBin.appendChild(d);
hs.garbageBin.innerHTML = '';
},
dim : function(exp) {
if (!hs.dimmer) {
isNew = true;
hs.dimmer = hs.createElement ('div', {
className: 'highslide-dimming highslide-viewport-size',
owner: '',
onclick: function() {
hs.close();
}
}, {
visibility: 'visible',
opacity: 0
}, hs.container, true);
if (/(Android|iPad|iPhone|iPod)/.test(navigator.userAgent)) {
var body = document.body;
function pixDimmerSize() {
hs.setStyles(hs.dimmer, {
width: body.scrollWidth +'px',
height: body.scrollHeight +'px'
});
}
pixDimmerSize();
hs.addEventListener(window, 'resize', pixDimmerSize);
}
}
hs.dimmer.style.display = '';
var isNew = hs.dimmer.owner == '';
hs.dimmer.owner += '|'+ exp.key;
if (isNew) {
if (hs.geckoMac && hs.dimmingGeckoFix)
hs.setStyles(hs.dimmer, {
background: 'url('+ hs.graphicsDir + 'geckodimmer.png)',
opacity: 1
});
else
hs.animate(hs.dimmer, { opacity: exp.dimmingOpacity }, hs.dimmingDuration);
}
},
undim : function(key) {
if (!hs.dimmer) return;
if (typeof key != 'undefined') hs.dimmer.owner = hs.dimmer.owner.replace('|'+ key, '');
if (
(typeof key != 'undefined' && hs.dimmer.owner != '')
|| (hs.upcoming && hs.getParam(hs.upcoming, 'dimmingOpacity'))
) return;
if (hs.geckoMac && hs.dimmingGeckoFix) hs.dimmer.style.display = 'none';
else hs.animate(hs.dimmer, { opacity: 0 }, hs.dimmingDuration, null, function() {
hs.dimmer.style.display = 'none';
});
},
transit : function (adj, exp) {
var last = exp || hs.getExpander();
exp = last;
if (hs.upcoming) return false;
else hs.last = last;
hs.removeEventListener(document, window.opera ? 'keypress' : 'keydown', hs.keyHandler);
try {
hs.upcoming = adj;
adj.onclick();
} catch (e){
hs.last = hs.upcoming = null;
}
try {
if (!adj || exp.transitions[1] != 'crossfade')
exp.close();
} catch (e) {}
return false;
},
previousOrNext : function (el, op) {
var exp = hs.getExpander(el);
if (exp) return hs.transit(exp.getAdjacentAnchor(op), exp);
else return false;
},
previous : function (el) {
return hs.previousOrNext(el, -1);
},
next : function (el) {
return hs.previousOrNext(el, 1);
},
keyHandler : function(e) {
if (!e) e = window.event;
if (!e.target) e.target = e.srcElement; // ie
if (typeof e.target.form != 'undefined') return true; // form element has focus
var exp = hs.getExpander();
var op = null;
switch (e.keyCode) {
case 70: // f
if (exp) exp.doFullExpand();
return true;
case 32: // Space
op = 2;
break;
case 34: // Page Down
case 39: // Arrow right
case 40: // Arrow down
op = 1;
break;
case 8: // Backspace
case 33: // Page Up
case 37: // Arrow left
case 38: // Arrow up
op = -1;
break;
case 27: // Escape
case 13: // Enter
op = 0;
}
if (op !== null) {if (op != 2)hs.removeEventListener(document, window.opera ? 'keypress' : 'keydown', hs.keyHandler);
if (!hs.enableKeyListener) return true;
if (e.preventDefault) e.preventDefault();
else e.returnValue = false;
if (exp) {
if (op == 0) {
exp.close();
} else if (op == 2) {
if (exp.slideshow) exp.slideshow.hitSpace();
} else {
if (exp.slideshow) exp.slideshow.pause();
hs.previousOrNext(exp.key, op);
}
return false;
}
}
return true;
},
registerOverlay : function (overlay) {
hs.push(hs.overlays, hs.extend(overlay, { hsId: 'hsId'+ hs.idCounter++ } ));
},
addSlideshow : function (options) {
var sg = options.slideshowGroup;
if (typeof sg == 'object') {
for (var i = 0; i < sg.length; i++) {
var o = {};
for (var x in options) o[x] = options[x];
o.slideshowGroup = sg[i];
hs.push(hs.slideshows, o);
}
} else {
hs.push(hs.slideshows, options);
}
},
getWrapperKey : function (element, expOnly) {
var el, re = /^highslide-wrapper-([0-9]+)$/;
// 1. look in open expanders
el = element;
while (el.parentNode) {
if (el.hsKey !== undefined) return el.hsKey;
if (el.id && re.test(el.id)) return el.id.replace(re, "$1");
el = el.parentNode;
}
// 2. look in thumbnail
if (!expOnly) {
el = element;
while (el.parentNode) {
if (el.tagName && hs.isHsAnchor(el)) {
for (var key = 0; key < hs.expanders.length; key++) {
var exp = hs.expanders[key];
if (exp && exp.a == el) return key;
}
}
el = el.parentNode;
}
}
return null;
},
getExpander : function (el, expOnly) {
if (typeof el == 'undefined') return hs.expanders[hs.focusKey] || null;
if (typeof el == 'number') return hs.expanders[el] || null;
if (typeof el == 'string') el = hs.$(el);
return hs.expanders[hs.getWrapperKey(el, expOnly)] || null;
},
isHsAnchor : function (a) {
return (a.onclick && a.onclick.toString().replace(/\s/g, ' ').match(/hs.(htmlE|e)xpand/));
},
reOrder : function () {
for (var i = 0; i < hs.expanders.length; i++)
if (hs.expanders[i] && hs.expanders[i].isExpanded) hs.focusTopmost();
},
mouseClickHandler : function(e)
{
if (!e) e = window.event;
if (e.button > 1) return true;
if (!e.target) e.target = e.srcElement;
var el = e.target;
while (el.parentNode
&& !(/highslide-(image|move|html|resize)/.test(el.className)))
{
el = el.parentNode;
}
var exp = hs.getExpander(el);
if (exp && (exp.isClosing || !exp.isExpanded)) return true;
if (exp && e.type == 'mousedown') {
if (e.target.form) return true;
var match = el.className.match(/highslide-(image|move|resize)/);
if (match) {
hs.dragArgs = {
exp: exp ,
type: match[1],
left: exp.x.pos,
width: exp.x.size,
top: exp.y.pos,
height: exp.y.size,
clickX: e.clientX,
clickY: e.clientY
};
hs.addEventListener(document, 'mousemove', hs.dragHandler);
if (e.preventDefault) e.preventDefault(); // FF
if (/highslide-(image|html)-blur/.test(exp.content.className)) {
exp.focus();
hs.hasFocused = true;
}
return false;
}
} else if (e.type == 'mouseup') {
hs.removeEventListener(document, 'mousemove', hs.dragHandler);
if (hs.dragArgs) {
if (hs.styleRestoreCursor && hs.dragArgs.type == 'image')
hs.dragArgs.exp.content.style.cursor = hs.styleRestoreCursor;
var hasDragged = hs.dragArgs.hasDragged;
if (!hasDragged &&!hs.hasFocused && !/(move|resize)/.test(hs.dragArgs.type)) {
exp.close();
}
else if (hasDragged || (!hasDragged && hs.hasHtmlExpanders)) {
hs.dragArgs.exp.doShowHide('hidden');
}
hs.hasFocused = false;
hs.dragArgs = null;
} else if (/highslide-image-blur/.test(el.className)) {
el.style.cursor = hs.styleRestoreCursor;
}
}
return false;
},
dragHandler : function(e)
{
if (!hs.dragArgs) return true;
if (!e) e = window.event;
var a = hs.dragArgs, exp = a.exp;
a.dX = e.clientX - a.clickX;
a.dY = e.clientY - a.clickY;
var distance = Math.sqrt(Math.pow(a.dX, 2) + Math.pow(a.dY, 2));
if (!a.hasDragged) a.hasDragged = (a.type != 'image' && distance > 0)
|| (distance > (hs.dragSensitivity || 5));
if (a.hasDragged && e.clientX > 5 && e.clientY > 5) {
if (a.type == 'resize') exp.resize(a);
else {
exp.moveTo(a.left + a.dX, a.top + a.dY);
if (a.type == 'image') exp.content.style.cursor = 'move';
}
}
return false;
},
wrapperMouseHandler : function (e) {
try {
if (!e) e = window.event;
var over = /mouseover/i.test(e.type);
if (!e.target) e.target = e.srcElement; // ie
if (!e.relatedTarget) e.relatedTarget =
over ? e.fromElement : e.toElement; // ie
var exp = hs.getExpander(e.target);
if (!exp.isExpanded) return;
if (!exp || !e.relatedTarget || hs.getExpander(e.relatedTarget, true) == exp
|| hs.dragArgs) return;
for (var i = 0; i < exp.overlays.length; i++) (function() {
var o = hs.$('hsId'+ exp.overlays[i]);
if (o && o.hideOnMouseOut) {
if (over) hs.setStyles(o, { visibility: 'visible', display: '' });
hs.animate(o, { opacity: over ? o.opacity : 0 }, o.dur);
}
})();
} catch (e) {}
},
addEventListener : function (el, event, func) {
if (el == document && event == 'ready') {
hs.push(hs.onReady, func);
}
try {
el.addEventListener(event, func, false);
} catch (e) {
try {
el.detachEvent('on'+ event, func);
el.attachEvent('on'+ event, func);
} catch (e) {
el['on'+ event] = func;
}
}
},
removeEventListener : function (el, event, func) {
try {
el.removeEventListener(event, func, false);
} catch (e) {
try {
el.detachEvent('on'+ event, func);
} catch (e) {
el['on'+ event] = null;
}
}
},
preloadFullImage : function (i) {
if (hs.continuePreloading && hs.preloadTheseImages[i] && hs.preloadTheseImages[i] != 'undefined') {
var img = document.createElement('img');
img.onload = function() {
img = null;
hs.preloadFullImage(i + 1);
};
img.src = hs.preloadTheseImages[i];
}
},
preloadImages : function (number) {
if (number && typeof number != 'object') hs.numberOfImagesToPreload = number;
var arr = hs.getAnchors();
for (var i = 0; i < arr.images.length && i < hs.numberOfImagesToPreload; i++) {
hs.push(hs.preloadTheseImages, hs.getSrc(arr.images[i]));
}
// preload outlines
if (hs.outlineType) new hs.Outline(hs.outlineType, function () { hs.preloadFullImage(0)} );
else
hs.preloadFullImage(0);
// preload cursor
if (hs.restoreCursor) var cur = hs.createElement('img', { src: hs.graphicsDir + hs.restoreCursor });
},
init : function () {
if (!hs.container) {
hs.ieLt7 = hs.ie && hs.uaVersion < 7;
hs.ieLt9 = hs.ie && hs.uaVersion < 9;
hs.getPageSize();
for (var x in hs.langDefaults) {
if (typeof hs[x] != 'undefined') hs.lang[x] = hs[x];
else if (typeof hs.lang[x] == 'undefined' && typeof hs.langDefaults[x] != 'undefined')
hs.lang[x] = hs.langDefaults[x];
}
hs.container = hs.createElement('div', {
className: 'highslide-container'
}, {
position: 'absolute',
left: 0,
top: 0,
width: '100%',
zIndex: hs.zIndexCounter,
direction: 'ltr'
},
document.body,
true
);
hs.loading = hs.createElement('a', {
className: 'highslide-loading',
title: hs.lang.loadingTitle,
innerHTML: hs.lang.loadingText,
href: 'javascript:;'
}, {
position: 'absolute',
top: '-9999px',
opacity: hs.loadingOpacity,
zIndex: 1
}, hs.container
);
hs.garbageBin = hs.createElement('div', null, { display: 'none' }, hs.container);
hs.viewport = hs.createElement('div', {
className: 'highslide-viewport highslide-viewport-size'
}, {
visibility: (hs.safari && hs.uaVersion < 525) ? 'visible' : 'hidden'
}, hs.container, 1
);
// http://www.robertpenner.com/easing/
Math.linearTween = function (t, b, c, d) {
return c*t/d + b;
};
Math.easeInQuad = function (t, b, c, d) {
return c*(t/=d)*t + b;
};
Math.easeOutQuad = function (t, b, c, d) {
return -c *(t/=d)*(t-2) + b;
};
hs.hideSelects = hs.ieLt7;
hs.hideIframes = ((window.opera && hs.uaVersion < 9) || navigator.vendor == 'KDE'
|| (hs.ieLt7 && hs.uaVersion < 5.5));
}
},
ready : function() {
if (hs.isReady) return;
hs.isReady = true;
for (var i = 0; i < hs.onReady.length; i++) hs.onReady[i]();
},
updateAnchors : function() {
var el, els, all = [], images = [],groups = {}, re;
for (var i = 0; i < hs.openerTagNames.length; i++) {
els = document.getElementsByTagName(hs.openerTagNames[i]);
for (var j = 0; j < els.length; j++) {
el = els[j];
re = hs.isHsAnchor(el);
if (re) {
hs.push(all, el);
if (re[0] == 'hs.expand') hs.push(images, el);
var g = hs.getParam(el, 'slideshowGroup') || 'none';
if (!groups[g]) groups[g] = [];
hs.push(groups[g], el);
}
}
}
hs.anchors = { all: all, groups: groups, images: images };
return hs.anchors;
},
getAnchors : function() {
return hs.anchors || hs.updateAnchors();
},
close : function(el) {
var exp = hs.getExpander(el);
if (exp) exp.close();
return false;
}
}; // end hs object
hs.fx = function( elem, options, prop ){
this.options = options;
this.elem = elem;
this.prop = prop;
if (!options.orig) options.orig = {};
};
hs.fx.prototype = {
update: function(){
(hs.fx.step[this.prop] || hs.fx.step._default)(this);
if (this.options.step)
this.options.step.call(this.elem, this.now, this);
},
custom: function(from, to, unit){
this.startTime = (new Date()).getTime();
this.start = from;
this.end = to;
this.unit = unit;// || this.unit || "px";
this.now = this.start;
this.pos = this.state = 0;
var self = this;
function t(gotoEnd){
return self.step(gotoEnd);
}
t.elem = this.elem;
if ( t() && hs.timers.push(t) == 1 ) {
hs.timerId = setInterval(function(){
var timers = hs.timers;
for ( var i = 0; i < timers.length; i++ )
if ( !timers[i]() )
timers.splice(i--, 1);
if ( !timers.length ) {
clearInterval(hs.timerId);
}
}, 13);
}
},
step: function(gotoEnd){
var t = (new Date()).getTime();
if ( gotoEnd || t >= this.options.duration + this.startTime ) {
this.now = this.end;
this.pos = this.state = 1;
this.update();
this.options.curAnim[ this.prop ] = true;
var done = true;
for ( var i in this.options.curAnim )
if ( this.options.curAnim[i] !== true )
done = false;
if ( done ) {
if (this.options.complete) this.options.complete.call(this.elem);
}
return false;
} else {
var n = t - this.startTime;
this.state = n / this.options.duration;
this.pos = this.options.easing(n, 0, 1, this.options.duration);
this.now = this.start + ((this.end - this.start) * this.pos);
this.update();
}
return true;
}
};
hs.extend( hs.fx, {
step: {
opacity: function(fx){
hs.setStyles(fx.elem, { opacity: fx.now });
},
_default: function(fx){
try {
if ( fx.elem.style && fx.elem.style[ fx.prop ] != null )
fx.elem.style[ fx.prop ] = fx.now + fx.unit;
else
fx.elem[ fx.prop ] = fx.now;
} catch (e) {}
}
}
});
hs.Outline = function (outlineType, onLoad) {
this.onLoad = onLoad;
this.outlineType = outlineType;
var v = hs.uaVersion, tr;
this.hasAlphaImageLoader = hs.ie && hs.uaVersion < 7;
if (!outlineType) {
if (onLoad) onLoad();
return;
}
hs.init();
this.table = hs.createElement(
'table', {
cellSpacing: 0
}, {
visibility: 'hidden',
position: 'absolute',
borderCollapse: 'collapse',
width: 0
},
hs.container,
true
);
var tbody = hs.createElement('tbody', null, null, this.table, 1);
this.td = [];
for (var i = 0; i <= 8; i++) {
if (i % 3 == 0) tr = hs.createElement('tr', null, { height: 'auto' }, tbody, true);
this.td[i] = hs.createElement('td', null, null, tr, true);
var style = i != 4 ? { lineHeight: 0, fontSize: 0} : { position : 'relative' };
hs.setStyles(this.td[i], style);
}
this.td[4].className = outlineType +' highslide-outline';
this.preloadGraphic();
};
hs.Outline.prototype = {
preloadGraphic : function () {
var src = hs.graphicsDir + (hs.outlinesDir || "outlines/")+ this.outlineType +".png";
var appendTo = hs.safari && hs.uaVersion < 525 ? hs.container : null;
this.graphic = hs.createElement('img', null, { position: 'absolute',
top: '-9999px' }, appendTo, true); // for onload trigger
var pThis = this;
this.graphic.onload = function() { pThis.onGraphicLoad(); };
this.graphic.src = src;
},
onGraphicLoad : function () {
var o = this.offset = this.graphic.width / 4,
pos = [[0,0],[0,-4],[-2,0],[0,-8],0,[-2,-8],[0,-2],[0,-6],[-2,-2]],
dim = { height: (2*o) +'px', width: (2*o) +'px' };
for (var i = 0; i <= 8; i++) {
if (pos[i]) {
if (this.hasAlphaImageLoader) {
var w = (i == 1 || i == 7) ? '100%' : this.graphic.width +'px';
var div = hs.createElement('div', null, { width: '100%', height: '100%', position: 'relative', overflow: 'hidden'}, this.td[i], true);
hs.createElement ('div', null, {
filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale, src='"+ this.graphic.src + "')",
position: 'absolute',
width: w,
height: this.graphic.height +'px',
left: (pos[i][0]*o)+'px',
top: (pos[i][1]*o)+'px'
},
div,
true);
} else {
hs.setStyles(this.td[i], { background: 'url('+ this.graphic.src +') '+ (pos[i][0]*o)+'px '+(pos[i][1]*o)+'px'});
}
if (window.opera && (i == 3 || i ==5))
hs.createElement('div', null, dim, this.td[i], true);
hs.setStyles (this.td[i], dim);
}
}
this.graphic = null;
if (hs.pendingOutlines[this.outlineType]) hs.pendingOutlines[this.outlineType].destroy();
hs.pendingOutlines[this.outlineType] = this;
if (this.onLoad) this.onLoad();
},
setPosition : function (pos, offset, vis, dur, easing) {
var exp = this.exp,
stl = exp.wrapper.style,
offset = offset || 0,
pos = pos || {
x: exp.x.pos + offset,
y: exp.y.pos + offset,
w: exp.x.get('wsize') - 2 * offset,
h: exp.y.get('wsize') - 2 * offset
};
if (vis) this.table.style.visibility = (pos.h >= 4 * this.offset)
? 'visible' : 'hidden';
hs.setStyles(this.table, {
left: (pos.x - this.offset) +'px',
top: (pos.y - this.offset) +'px',
width: (pos.w + 2 * this.offset) +'px'
});
pos.w -= 2 * this.offset;
pos.h -= 2 * this.offset;
hs.setStyles (this.td[4], {
width: pos.w >= 0 ? pos.w +'px' : 0,
height: pos.h >= 0 ? pos.h +'px' : 0
});
if (this.hasAlphaImageLoader) this.td[3].style.height
= this.td[5].style.height = this.td[4].style.height;
},
destroy : function(hide) {
if (hide) this.table.style.visibility = 'hidden';
else hs.discardElement(this.table);
}
};
hs.Dimension = function(exp, dim) {
this.exp = exp;
this.dim = dim;
this.ucwh = dim == 'x' ? 'Width' : 'Height';
this.wh = this.ucwh.toLowerCase();
this.uclt = dim == 'x' ? 'Left' : 'Top';
this.lt = this.uclt.toLowerCase();
this.ucrb = dim == 'x' ? 'Right' : 'Bottom';
this.rb = this.ucrb.toLowerCase();
this.p1 = this.p2 = 0;
};
hs.Dimension.prototype = {
get : function(key) {
switch (key) {
case 'loadingPos':
return this.tpos + this.tb + (this.t - hs.loading['offset'+ this.ucwh]) / 2;
case 'loadingPosXfade':
return this.pos + this.cb+ this.p1 + (this.size - hs.loading['offset'+ this.ucwh]) / 2;
case 'wsize':
return this.size + 2 * this.cb + this.p1 + this.p2;
case 'fitsize':
return this.clientSize - this.marginMin - this.marginMax;
case 'maxsize':
return this.get('fitsize') - 2 * this.cb - this.p1 - this.p2 ;
case 'opos':
return this.pos - (this.exp.outline ? this.exp.outline.offset : 0);
case 'osize':
return this.get('wsize') + (this.exp.outline ? 2*this.exp.outline.offset : 0);
case 'imgPad':
return this.imgSize ? Math.round((this.size - this.imgSize) / 2) : 0;
}
},
calcBorders: function() {
// correct for borders
this.cb = (this.exp.content['offset'+ this.ucwh] - this.t) / 2;
this.marginMax = hs['margin'+ this.ucrb];
},
calcThumb: function() {
this.t = this.exp.el[this.wh] ? parseInt(this.exp.el[this.wh]) :
this.exp.el['offset'+ this.ucwh];
this.tpos = this.exp.tpos[this.dim];
this.tb = (this.exp.el['offset'+ this.ucwh] - this.t) / 2;
if (this.tpos == 0 || this.tpos == -1) {
this.tpos = (hs.page[this.wh] / 2) + hs.page['scroll'+ this.uclt];
};
},
calcExpanded: function() {
var exp = this.exp;
this.justify = 'auto';
// get alignment
if (exp.align == 'center') this.justify = 'center';
else if (new RegExp(this.lt).test(exp.anchor)) this.justify = null;
else if (new RegExp(this.rb).test(exp.anchor)) this.justify = 'max';
// size and position
this.pos = this.tpos - this.cb + this.tb;
if (this.maxHeight && this.dim == 'x')
exp.maxWidth = Math.min(exp.maxWidth || this.full, exp.maxHeight * this.full / exp.y.full);
this.size = Math.min(this.full, exp['max'+ this.ucwh] || this.full);
this.minSize = exp.allowSizeReduction ?
Math.min(exp['min'+ this.ucwh], this.full) :this.full;
if (exp.isImage && exp.useBox) {
this.size = exp[this.wh];
this.imgSize = this.full;
}
if (this.dim == 'x' && hs.padToMinWidth) this.minSize = exp.minWidth;
this.target = exp['target'+ this.dim.toUpperCase()];
this.marginMin = hs['margin'+ this.uclt];
this.scroll = hs.page['scroll'+ this.uclt];
this.clientSize = hs.page[this.wh];
},
setSize: function(i) {
var exp = this.exp;
if (exp.isImage && (exp.useBox || hs.padToMinWidth)) {
this.imgSize = i;
this.size = Math.max(this.size, this.imgSize);
exp.content.style[this.lt] = this.get('imgPad')+'px';
} else
this.size = i;
exp.content.style[this.wh] = i +'px';
exp.wrapper.style[this.wh] = this.get('wsize') +'px';
if (exp.outline) exp.outline.setPosition();
if (this.dim == 'x' && exp.overlayBox) exp.sizeOverlayBox(true);
if (this.dim == 'x' && exp.slideshow && exp.isImage) {
if (i == this.full) exp.slideshow.disable('full-expand');
else exp.slideshow.enable('full-expand');
}
},
setPos: function(i) {
this.pos = i;
this.exp.wrapper.style[this.lt] = i +'px';
if (this.exp.outline) this.exp.outline.setPosition();
}
};
hs.Expander = function(a, params, custom, contentType) {
if (document.readyState && hs.ie && !hs.isReady) {
hs.addEventListener(document, 'ready', function() {
new hs.Expander(a, params, custom, contentType);
});
return;
}
this.a = a;
this.custom = custom;
this.contentType = contentType || 'image';
this.isImage = !this.isHtml;
hs.continuePreloading = false;
this.overlays = [];
this.last = hs.last;
hs.last = null;
hs.init();
var key = this.key = hs.expanders.length;
// override inline parameters
for (var i = 0; i < hs.overrides.length; i++) {
var name = hs.overrides[i];
this[name] = params && typeof params[name] != 'undefined' ?
params[name] : hs[name];
}
if (!this.src) this.src = a.href;
// get thumb
var el = (params && params.thumbnailId) ? hs.$(params.thumbnailId) : a;
el = this.thumb = el.getElementsByTagName('img')[0] || el;
this.thumbsUserSetId = el.id || a.id;
// check if already open
for (var i = 0; i < hs.expanders.length; i++) {
if (hs.expanders[i] && hs.expanders[i].a == a
&& !(this.last && this.transitions[1] == 'crossfade')) {
hs.expanders[i].focus();
return false;
}
}
// cancel other
if (!hs.allowSimultaneousLoading) for (var i = 0; i < hs.expanders.length; i++) {
if (hs.expanders[i] && hs.expanders[i].thumb != el && !hs.expanders[i].onLoadStarted) {
hs.expanders[i].cancelLoading();
}
}
hs.expanders[key] = this;
if (!hs.allowMultipleInstances && !hs.upcoming) {
if (hs.expanders[key-1]) hs.expanders[key-1].close();
if (typeof hs.focusKey != 'undefined' && hs.expanders[hs.focusKey])
hs.expanders[hs.focusKey].close();
}
// initiate metrics
this.el = el;
this.tpos = this.pageOrigin || hs.getPosition(el);
hs.getPageSize();
var x = this.x = new hs.Dimension(this, 'x');
x.calcThumb();
var y = this.y = new hs.Dimension(this, 'y');
y.calcThumb();
this.wrapper = hs.createElement(
'div', {
id: 'highslide-wrapper-'+ this.key,
className: 'highslide-wrapper '+ this.wrapperClassName
}, {
visibility: 'hidden',
position: 'absolute',
zIndex: hs.zIndexCounter += 2
}, null, true );
this.wrapper.onmouseover = this.wrapper.onmouseout = hs.wrapperMouseHandler;
if (this.contentType == 'image' && this.outlineWhileAnimating == 2)
this.outlineWhileAnimating = 0;
// get the outline
if (!this.outlineType
|| (this.last && this.isImage && this.transitions[1] == 'crossfade')) {
this[this.contentType +'Create']();
} else if (hs.pendingOutlines[this.outlineType]) {
this.connectOutline();
this[this.contentType +'Create']();
} else {
this.showLoading();
var exp = this;
new hs.Outline(this.outlineType,
function () {
exp.connectOutline();
exp[exp.contentType +'Create']();
}
);
}
return true;
};
hs.Expander.prototype = {
error : function(e) {
if (hs.debug) alert ('Line '+ e.lineNumber +': '+ e.message);
else window.location.href = this.src;
},
connectOutline : function() {
var outline = this.outline = hs.pendingOutlines[this.outlineType];
outline.exp = this;
outline.table.style.zIndex = this.wrapper.style.zIndex - 1;
hs.pendingOutlines[this.outlineType] = null;
},
showLoading : function() {
if (this.onLoadStarted || this.loading) return;
this.loading = hs.loading;
var exp = this;
this.loading.onclick = function() {
exp.cancelLoading();
};
var exp = this,
l = this.x.get('loadingPos') +'px',
t = this.y.get('loadingPos') +'px';
if (!tgt && this.last && this.transitions[1] == 'crossfade')
var tgt = this.last;
if (tgt) {
l = tgt.x.get('loadingPosXfade') +'px';
t = tgt.y.get('loadingPosXfade') +'px';
this.loading.style.zIndex = hs.zIndexCounter++;
}
setTimeout(function () {
if (exp.loading) hs.setStyles(exp.loading, { left: l, top: t, zIndex: hs.zIndexCounter++ })}
, 100);
},
imageCreate : function() {
var exp = this;
var img = document.createElement('img');
this.content = img;
img.onload = function () {
if (hs.expanders[exp.key]) exp.contentLoaded();
};
if (hs.blockRightClick) img.oncontextmenu = function() { return false; };
img.className = 'highslide-image';
hs.setStyles(img, {
visibility: 'hidden',
display: 'block',
position: 'absolute',
maxWidth: '9999px',
zIndex: 3
});
img.title = hs.lang.restoreTitle;
if (hs.safari && hs.uaVersion < 525) hs.container.appendChild(img);
if (hs.ie && hs.flushImgSize) img.src = null;
img.src = this.src;
this.showLoading();
},
contentLoaded : function() {
try {
if (!this.content) return;
this.content.onload = null;
if (this.onLoadStarted) return;
else this.onLoadStarted = true;
var x = this.x, y = this.y;
if (this.loading) {
hs.setStyles(this.loading, { top: '-9999px' });
this.loading = null;
}
x.full = this.content.width;
y.full = this.content.height;
hs.setStyles(this.content, {
width: x.t +'px',
height: y.t +'px'
});
this.wrapper.appendChild(this.content);
hs.container.appendChild(this.wrapper);
x.calcBorders();
y.calcBorders();
hs.setStyles (this.wrapper, {
left: (x.tpos + x.tb - x.cb) +'px',
top: (y.tpos + x.tb - y.cb) +'px'
});
this.initSlideshow();
this.getOverlays();
var ratio = x.full / y.full;
x.calcExpanded();
this.justify(x);
y.calcExpanded();
this.justify(y);
if (this.overlayBox) this.sizeOverlayBox(0, 1);
if (this.allowSizeReduction) {
this.correctRatio(ratio);
var ss = this.slideshow;
if (ss && this.last && ss.controls && ss.fixedControls) {
var pos = ss.overlayOptions.position || '', p;
for (var dim in hs.oPos) for (var i = 0; i < 5; i++) {
p = this[dim];
if (pos.match(hs.oPos[dim][i])) {
p.pos = this.last[dim].pos
+ (this.last[dim].p1 - p.p1)
+ (this.last[dim].size - p.size) * [0, 0, .5, 1, 1][i];
if (ss.fixedControls == 'fit') {
if (p.pos + p.size + p.p1 + p.p2 > p.scroll + p.clientSize - p.marginMax)
p.pos = p.scroll + p.clientSize - p.size - p.marginMin - p.marginMax - p.p1 - p.p2;
if (p.pos < p.scroll + p.marginMin) p.pos = p.scroll + p.marginMin;
}
}
}
}
if (this.isImage && this.x.full > (this.x.imgSize || this.x.size)) {
this.createFullExpand();
if (this.overlays.length == 1) this.sizeOverlayBox();
}
}
this.show();
} catch (e) {
this.error(e);
}
},
justify : function (p, moveOnly) {
var tgtArr, tgt = p.target, dim = p == this.x ? 'x' : 'y';
if (tgt && tgt.match(/ /)) {
tgtArr = tgt.split(' ');
tgt = tgtArr[0];
}
if (tgt && hs.$(tgt)) {
p.pos = hs.getPosition(hs.$(tgt))[dim];
if (tgtArr && tgtArr[1] && tgtArr[1].match(/^[-]?[0-9]+px$/))
p.pos += parseInt(tgtArr[1]);
if (p.size < p.minSize) p.size = p.minSize;
} else if (p.justify == 'auto' || p.justify == 'center') {
var hasMovedMin = false;
var allowReduce = p.exp.allowSizeReduction;
if (p.justify == 'center')
p.pos = Math.round(p.scroll + (p.clientSize + p.marginMin - p.marginMax - p.get('wsize')) / 2);
else
p.pos = Math.round(p.pos - ((p.get('wsize') - p.t) / 2));
if (p.pos < p.scroll + p.marginMin) {
p.pos = p.scroll + p.marginMin;
hasMovedMin = true;
}
if (!moveOnly && p.size < p.minSize) {
p.size = p.minSize;
allowReduce = false;
}
if (p.pos + p.get('wsize') > p.scroll + p.clientSize - p.marginMax) {
if (!moveOnly && hasMovedMin && allowReduce) {
p.size = Math.min(p.size, p.get(dim == 'y' ? 'fitsize' : 'maxsize'));
} else if (p.get('wsize') < p.get('fitsize')) {
p.pos = p.scroll + p.clientSize - p.marginMax - p.get('wsize');
} else { // image larger than viewport
p.pos = p.scroll + p.marginMin;
if (!moveOnly && allowReduce) p.size = p.get(dim == 'y' ? 'fitsize' : 'maxsize');
}
}
if (!moveOnly && p.size < p.minSize) {
p.size = p.minSize;
allowReduce = false;
}
} else if (p.justify == 'max') {
p.pos = Math.floor(p.pos - p.size + p.t);
}
if (p.pos < p.marginMin) {
var tmpMin = p.pos;
p.pos = p.marginMin;
if (allowReduce && !moveOnly) p.size = p.size - (p.pos - tmpMin);
}
},
correctRatio : function(ratio) {
var x = this.x,
y = this.y,
changed = false,
xSize = Math.min(x.full, x.size),
ySize = Math.min(y.full, y.size),
useBox = (this.useBox || hs.padToMinWidth);
if (xSize / ySize > ratio) { // width greater
xSize = ySize * ratio;
if (xSize < x.minSize) { // below minWidth
xSize = x.minSize;
ySize = xSize / ratio;
}
changed = true;
} else if (xSize / ySize < ratio) { // height greater
ySize = xSize / ratio;
changed = true;
}
if (hs.padToMinWidth && x.full < x.minSize) {
x.imgSize = x.full;
y.size = y.imgSize = y.full;
} else if (this.useBox) {
x.imgSize = xSize;
y.imgSize = ySize;
} else {
x.size = xSize;
y.size = ySize;
}
changed = this.fitOverlayBox(this.useBox ? null : ratio, changed);
if (useBox && y.size < y.imgSize) {
y.imgSize = y.size;
x.imgSize = y.size * ratio;
}
if (changed || useBox) {
x.pos = x.tpos - x.cb + x.tb;
x.minSize = x.size;
this.justify(x, true);
y.pos = y.tpos - y.cb + y.tb;
y.minSize = y.size;
this.justify(y, true);
if (this.overlayBox) this.sizeOverlayBox();
}
},
fitOverlayBox : function(ratio, changed) {
var x = this.x, y = this.y;
if (this.overlayBox) {
while (y.size > this.minHeight && x.size > this.minWidth
&& y.get('wsize') > y.get('fitsize')) {
y.size -= 10;
if (ratio) x.size = y.size * ratio;
this.sizeOverlayBox(0, 1);
changed = true;
}
}
return changed;
},
show : function () {
var x = this.x, y = this.y;
this.doShowHide('hidden');
if (this.slideshow && this.slideshow.thumbstrip) this.slideshow.thumbstrip.selectThumb();
// Apply size change
this.changeSize(
1, {
wrapper: {
width : x.get('wsize'),
height : y.get('wsize'),
left: x.pos,
top: y.pos
},
content: {
left: x.p1 + x.get('imgPad'),
top: y.p1 + y.get('imgPad'),
width:x.imgSize ||x.size,
height:y.imgSize ||y.size
}
},
hs.expandDuration
);
},
changeSize : function(up, to, dur) {
// transition
var trans = this.transitions,
other = up ? (this.last ? this.last.a : null) : hs.upcoming,
t = (trans[1] && other
&& hs.getParam(other, 'transitions')[1] == trans[1]) ?
trans[1] : trans[0];
if (this[t] && t != 'expand') {
this[t](up, to);
return;
}
if (this.outline && !this.outlineWhileAnimating) {
if (up) this.outline.setPosition();
else this.outline.destroy();
}
if (!up) this.destroyOverlays();
var exp = this,
x = exp.x,
y = exp.y,
easing = this.easing;
if (!up) easing = this.easingClose || easing;
var after = up ?
function() {
if (exp.outline) exp.outline.table.style.visibility = "visible";
setTimeout(function() {
exp.afterExpand();
}, 50);
} :
function() {
exp.afterClose();
};
if (up) hs.setStyles( this.wrapper, {
width: x.t +'px',
height: y.t +'px'
});
if (this.fadeInOut) {
hs.setStyles(this.wrapper, { opacity: up ? 0 : 1 });
hs.extend(to.wrapper, { opacity: up });
}
hs.animate( this.wrapper, to.wrapper, {
duration: dur,
easing: easing,
step: function(val, args) {
if (exp.outline && exp.outlineWhileAnimating && args.prop == 'top') {
var fac = up ? args.pos : 1 - args.pos;
var pos = {
w: x.t + (x.get('wsize') - x.t) * fac,
h: y.t + (y.get('wsize') - y.t) * fac,
x: x.tpos + (x.pos - x.tpos) * fac,
y: y.tpos + (y.pos - y.tpos) * fac
};
exp.outline.setPosition(pos, 0, 1);
}
}
});
hs.animate( this.content, to.content, dur, easing, after);
if (up) {
this.wrapper.style.visibility = 'visible';
this.content.style.visibility = 'visible';
this.a.className += ' highslide-active-anchor';
}
},
fade : function(up, to) {
this.outlineWhileAnimating = false;
var exp = this, t = up ? hs.expandDuration : 0;
if (up) {
hs.animate(this.wrapper, to.wrapper, 0);
hs.setStyles(this.wrapper, { opacity: 0, visibility: 'visible' });
hs.animate(this.content, to.content, 0);
this.content.style.visibility = 'visible';
hs.animate(this.wrapper, { opacity: 1 }, t, null,
function() { exp.afterExpand(); });
}
if (this.outline) {
this.outline.table.style.zIndex = this.wrapper.style.zIndex;
var dir = up || -1,
offset = this.outline.offset,
startOff = up ? 3 : offset,
endOff = up? offset : 3;
for (var i = startOff; dir * i <= dir * endOff; i += dir, t += 25) {
(function() {
var o = up ? endOff - i : startOff - i;
setTimeout(function() {
exp.outline.setPosition(0, o, 1);
}, t);
})();
}
}
if (up) {}//setTimeout(function() { exp.afterExpand(); }, t+50);
else {
setTimeout( function() {
if (exp.outline) exp.outline.destroy(exp.preserveContent);
exp.destroyOverlays();
hs.animate( exp.wrapper, { opacity: 0 }, hs.restoreDuration, null, function(){
exp.afterClose();
});
}, t);
}
},
crossfade : function (up, to, from) {
if (!up) return;
var exp = this,
last = this.last,
x = this.x,
y = this.y,
lastX = last.x,
lastY = last.y,
wrapper = this.wrapper,
content = this.content,
overlayBox = this.overlayBox;
hs.removeEventListener(document, 'mousemove', hs.dragHandler);
hs.setStyles(content, {
width: (x.imgSize || x.size) +'px',
height: (y.imgSize || y.size) +'px'
});
if (overlayBox) overlayBox.style.overflow = 'visible';
this.outline = last.outline;
if (this.outline) this.outline.exp = exp;
last.outline = null;
var fadeBox = hs.createElement('div', {
className: 'highslide-'+ this.contentType
}, {
position: 'absolute',
zIndex: 4,
overflow: 'hidden',
display: 'none'
}
);
var names = { oldImg: last, newImg: this };
for (var n in names) {
this[n] = names[n].content.cloneNode(1);
hs.setStyles(this[n], {
position: 'absolute',
border: 0,
visibility: 'visible'
});
fadeBox.appendChild(this[n]);
}
wrapper.appendChild(fadeBox);
if (overlayBox) {
overlayBox.className = '';
wrapper.appendChild(overlayBox);
}
fadeBox.style.display = '';
last.content.style.display = 'none';
if (hs.safari && hs.uaVersion < 525) {
this.wrapper.style.visibility = 'visible';
}
hs.animate(wrapper, {
width: x.size
}, {
duration: hs.transitionDuration,
step: function(val, args) {
var pos = args.pos,
invPos = 1 - pos;
var prop,
size = {},
props = ['pos', 'size', 'p1', 'p2'];
for (var n in props) {
prop = props[n];
size['x'+ prop] = Math.round(invPos * lastX[prop] + pos * x[prop]);
size['y'+ prop] = Math.round(invPos * lastY[prop] + pos * y[prop]);
size.ximgSize = Math.round(
invPos * (lastX.imgSize || lastX.size) + pos * (x.imgSize || x.size));
size.ximgPad = Math.round(invPos * lastX.get('imgPad') + pos * x.get('imgPad'));
size.yimgSize = Math.round(
invPos * (lastY.imgSize || lastY.size) + pos * (y.imgSize || y.size));
size.yimgPad = Math.round(invPos * lastY.get('imgPad') + pos * y.get('imgPad'));
}
if (exp.outline) exp.outline.setPosition({
x: size.xpos,
y: size.ypos,
w: size.xsize + size.xp1 + size.xp2 + 2 * x.cb,
h: size.ysize + size.yp1 + size.yp2 + 2 * y.cb
});
last.wrapper.style.clip = 'rect('
+ (size.ypos - lastY.pos)+'px, '
+ (size.xsize + size.xp1 + size.xp2 + size.xpos + 2 * lastX.cb - lastX.pos) +'px, '
+ (size.ysize + size.yp1 + size.yp2 + size.ypos + 2 * lastY.cb - lastY.pos) +'px, '
+ (size.xpos - lastX.pos)+'px)';
hs.setStyles(content, {
top: (size.yp1 + y.get('imgPad')) +'px',
left: (size.xp1 + x.get('imgPad')) +'px',
marginTop: (y.pos - size.ypos) +'px',
marginLeft: (x.pos - size.xpos) +'px'
});
hs.setStyles(wrapper, {
top: size.ypos +'px',
left: size.xpos +'px',
width: (size.xp1 + size.xp2 + size.xsize + 2 * x.cb)+ 'px',
height: (size.yp1 + size.yp2 + size.ysize + 2 * y.cb) + 'px'
});
hs.setStyles(fadeBox, {
width: (size.ximgSize || size.xsize) + 'px',
height: (size.yimgSize || size.ysize) +'px',
left: (size.xp1 + size.ximgPad) +'px',
top: (size.yp1 + size.yimgPad) +'px',
visibility: 'visible'
});
hs.setStyles(exp.oldImg, {
top: (lastY.pos - size.ypos + lastY.p1 - size.yp1 + lastY.get('imgPad') - size.yimgPad)+'px',
left: (lastX.pos - size.xpos + lastX.p1 - size.xp1 + lastX.get('imgPad') - size.ximgPad)+'px'
});
hs.setStyles(exp.newImg, {
opacity: pos,
top: (y.pos - size.ypos + y.p1 - size.yp1 + y.get('imgPad') - size.yimgPad) +'px',
left: (x.pos - size.xpos + x.p1 - size.xp1 + x.get('imgPad') - size.ximgPad) +'px'
});
if (overlayBox) hs.setStyles(overlayBox, {
width: size.xsize + 'px',
height: size.ysize +'px',
left: (size.xp1 + x.cb) +'px',
top: (size.yp1 + y.cb) +'px'
});
},
complete: function () {
wrapper.style.visibility = content.style.visibility = 'visible';
content.style.display = 'block';
hs.discardElement(fadeBox);
exp.afterExpand();
last.afterClose();
exp.last = null;
}
});
},
reuseOverlay : function(o, el) {
if (!this.last) return false;
for (var i = 0; i < this.last.overlays.length; i++) {
var oDiv = hs.$('hsId'+ this.last.overlays[i]);
if (oDiv && oDiv.hsId == o.hsId) {
this.genOverlayBox();
oDiv.reuse = this.key;
hs.push(this.overlays, this.last.overlays[i]);
return true;
}
}
return false;
},
afterExpand : function() {
this.isExpanded = true;
this.focus();
if (this.dimmingOpacity) hs.dim(this);
if (hs.upcoming && hs.upcoming == this.a) hs.upcoming = null;
this.prepareNextOutline();
var p = hs.page, mX = hs.mouse.x + p.scrollLeft, mY = hs.mouse.y + p.scrollTop;
this.mouseIsOver = this.x.pos < mX && mX < this.x.pos + this.x.get('wsize')
&& this.y.pos < mY && mY < this.y.pos + this.y.get('wsize');
if (this.overlayBox) this.showOverlays();
},
prepareNextOutline : function() {
var key = this.key;
var outlineType = this.outlineType;
new hs.Outline(outlineType,
function () { try { hs.expanders[key].preloadNext(); } catch (e) {} });
},
preloadNext : function() {
var next = this.getAdjacentAnchor(1);
if (next && next.onclick.toString().match(/hs\.expand/))
var img = hs.createElement('img', { src: hs.getSrc(next) });
},
getAdjacentAnchor : function(op) {
var current = this.getAnchorIndex(), as = hs.anchors.groups[this.slideshowGroup || 'none'];
if (as && !as[current + op] && this.slideshow && this.slideshow.repeat) {
if (op == 1) return as[0];
else if (op == -1) return as[as.length-1];
}
return (as && as[current + op]) || null;
},
getAnchorIndex : function() {
var arr = hs.getAnchors().groups[this.slideshowGroup || 'none'];
if (arr) for (var i = 0; i < arr.length; i++) {
if (arr[i] == this.a) return i;
}
return null;
},
getNumber : function() {
if (this[this.numberPosition]) {
var arr = hs.anchors.groups[this.slideshowGroup || 'none'];
if (arr) {
var s = hs.lang.number.replace('%1', this.getAnchorIndex() + 1).replace('%2', arr.length);
this[this.numberPosition].innerHTML =
'<div class="highslide-number">'+ s +'</div>'+ this[this.numberPosition].innerHTML;
}
}
},
initSlideshow : function() {
if (!this.last) {
for (var i = 0; i < hs.slideshows.length; i++) {
var ss = hs.slideshows[i], sg = ss.slideshowGroup;
if (typeof sg == 'undefined' || sg === null || sg === this.slideshowGroup)
this.slideshow = new hs.Slideshow(this.key, ss);
}
} else {
this.slideshow = this.last.slideshow;
}
var ss = this.slideshow;
if (!ss) return;
var key = ss.expKey = this.key;
ss.checkFirstAndLast();
ss.disable('full-expand');
if (ss.controls) {
this.createOverlay(hs.extend(ss.overlayOptions || {}, {
overlayId: ss.controls,
hsId: 'controls',
zIndex: 5
}));
}
if (ss.thumbstrip) ss.thumbstrip.add(this);
if (!this.last && this.autoplay) ss.play(true);
if (ss.autoplay) {
ss.autoplay = setTimeout(function() {
hs.next(key);
}, (ss.interval || 500));
}
},
cancelLoading : function() {
hs.discardElement (this.wrapper);
hs.expanders[this.key] = null;
if (hs.upcoming == this.a) hs.upcoming = null;
hs.undim(this.key);
if (this.loading) hs.loading.style.left = '-9999px';
},
writeCredits : function () {
if (this.credits) return;
this.credits = hs.createElement('a', {
href: hs.creditsHref,
target: hs.creditsTarget,
className: 'highslide-credits',
innerHTML: hs.lang.creditsText,
title: hs.lang.creditsTitle
});
this.createOverlay({
overlayId: this.credits,
position: this.creditsPosition || 'top left',
hsId: 'credits'
});
},
getInline : function(types, addOverlay) {
for (var i = 0; i < types.length; i++) {
var type = types[i], s = null;
if (!this[type +'Id'] && this.thumbsUserSetId)
this[type +'Id'] = type +'-for-'+ this.thumbsUserSetId;
if (this[type +'Id']) this[type] = hs.getNode(this[type +'Id']);
if (!this[type] && !this[type +'Text'] && this[type +'Eval']) try {
s = eval(this[type +'Eval']);
} catch (e) {}
if (!this[type] && this[type +'Text']) {
s = this[type +'Text'];
}
if (!this[type] && !s) {
this[type] = hs.getNode(this.a['_'+ type + 'Id']);
if (!this[type]) {
var next = this.a.nextSibling;
while (next && !hs.isHsAnchor(next)) {
if ((new RegExp('highslide-'+ type)).test(next.className || null)) {
if (!next.id) this.a['_'+ type + 'Id'] = next.id = 'hsId'+ hs.idCounter++;
this[type] = hs.getNode(next.id);
break;
}
next = next.nextSibling;
}
}
}
if (!this[type] && !s && this.numberPosition == type) s = '\n';
if (!this[type] && s) this[type] = hs.createElement('div',
{ className: 'highslide-'+ type, innerHTML: s } );
if (addOverlay && this[type]) {
var o = { position: (type == 'heading') ? 'above' : 'below' };
for (var x in this[type+'Overlay']) o[x] = this[type+'Overlay'][x];
o.overlayId = this[type];
this.createOverlay(o);
}
}
},
// on end move and resize
doShowHide : function(visibility) {
if (hs.hideSelects) this.showHideElements('SELECT', visibility);
if (hs.hideIframes) this.showHideElements('IFRAME', visibility);
if (hs.geckoMac) this.showHideElements('*', visibility);
},
showHideElements : function (tagName, visibility) {
var els = document.getElementsByTagName(tagName);
var prop = tagName == '*' ? 'overflow' : 'visibility';
for (var i = 0; i < els.length; i++) {
if (prop == 'visibility' || (document.defaultView.getComputedStyle(
els[i], "").getPropertyValue('overflow') == 'auto'
|| els[i].getAttribute('hidden-by') != null)) {
var hiddenBy = els[i].getAttribute('hidden-by');
if (visibility == 'visible' && hiddenBy) {
hiddenBy = hiddenBy.replace('['+ this.key +']', '');
els[i].setAttribute('hidden-by', hiddenBy);
if (!hiddenBy) els[i].style[prop] = els[i].origProp;
} else if (visibility == 'hidden') { // hide if behind
var elPos = hs.getPosition(els[i]);
elPos.w = els[i].offsetWidth;
elPos.h = els[i].offsetHeight;
if (!this.dimmingOpacity) { // hide all if dimming
var clearsX = (elPos.x + elPos.w < this.x.get('opos')
|| elPos.x > this.x.get('opos') + this.x.get('osize'));
var clearsY = (elPos.y + elPos.h < this.y.get('opos')
|| elPos.y > this.y.get('opos') + this.y.get('osize'));
}
var wrapperKey = hs.getWrapperKey(els[i]);
if (!clearsX && !clearsY && wrapperKey != this.key) { // element falls behind image
if (!hiddenBy) {
els[i].setAttribute('hidden-by', '['+ this.key +']');
els[i].origProp = els[i].style[prop];
els[i].style[prop] = 'hidden';
} else if (hiddenBy.indexOf('['+ this.key +']') == -1) {
els[i].setAttribute('hidden-by', hiddenBy + '['+ this.key +']');
}
} else if ((hiddenBy == '['+ this.key +']' || hs.focusKey == wrapperKey)
&& wrapperKey != this.key) { // on move
els[i].setAttribute('hidden-by', '');
els[i].style[prop] = els[i].origProp || '';
} else if (hiddenBy && hiddenBy.indexOf('['+ this.key +']') > -1) {
els[i].setAttribute('hidden-by', hiddenBy.replace('['+ this.key +']', ''));
}
}
}
}
},
focus : function() {
this.wrapper.style.zIndex = hs.zIndexCounter += 2;
// blur others
for (var i = 0; i < hs.expanders.length; i++) {
if (hs.expanders[i] && i == hs.focusKey) {
var blurExp = hs.expanders[i];
blurExp.content.className += ' highslide-'+ blurExp.contentType +'-blur';
blurExp.content.style.cursor = hs.ieLt7 ? 'hand' : 'pointer';
blurExp.content.title = hs.lang.focusTitle;
}
}
// focus this
if (this.outline) this.outline.table.style.zIndex
= this.wrapper.style.zIndex - 1;
this.content.className = 'highslide-'+ this.contentType;
this.content.title = hs.lang.restoreTitle;
if (hs.restoreCursor) {
hs.styleRestoreCursor = window.opera ? 'pointer' : 'url('+ hs.graphicsDir + hs.restoreCursor +'), pointer';
if (hs.ieLt7 && hs.uaVersion < 6) hs.styleRestoreCursor = 'hand';
this.content.style.cursor = hs.styleRestoreCursor;
}
hs.focusKey = this.key;
hs.addEventListener(document, window.opera ? 'keypress' : 'keydown', hs.keyHandler);
},
moveTo: function(x, y) {
this.x.setPos(x);
this.y.setPos(y);
},
resize : function (e) {
var w, h, r = e.width / e.height;
w = Math.max(e.width + e.dX, Math.min(this.minWidth, this.x.full));
if (this.isImage && Math.abs(w - this.x.full) < 12) w = this.x.full;
h = w / r;
if (h < Math.min(this.minHeight, this.y.full)) {
h = Math.min(this.minHeight, this.y.full);
if (this.isImage) w = h * r;
}
this.resizeTo(w, h);
},
resizeTo: function(w, h) {
this.y.setSize(h);
this.x.setSize(w);
this.wrapper.style.height = this.y.get('wsize') +'px';
},
close : function() {
if (this.isClosing || !this.isExpanded) return;
if (this.transitions[1] == 'crossfade' && hs.upcoming) {
hs.getExpander(hs.upcoming).cancelLoading();
hs.upcoming = null;
}
this.isClosing = true;
if (this.slideshow && !hs.upcoming) this.slideshow.pause();
hs.removeEventListener(document, window.opera ? 'keypress' : 'keydown', hs.keyHandler);
try {
this.content.style.cursor = 'default';
this.changeSize(
0, {
wrapper: {
width : this.x.t,
height : this.y.t,
left: this.x.tpos - this.x.cb + this.x.tb,
top: this.y.tpos - this.y.cb + this.y.tb
},
content: {
left: 0,
top: 0,
width: this.x.t,
height: this.y.t
}
}, hs.restoreDuration
);
} catch (e) { this.afterClose(); }
},
createOverlay : function (o) {
var el = o.overlayId,
relToVP = (o.relativeTo == 'viewport' && !/panel$/.test(o.position));
if (typeof el == 'string') el = hs.getNode(el);
if (o.html) el = hs.createElement('div', { innerHTML: o.html });
if (!el || typeof el == 'string') return;
el.style.display = 'block';
o.hsId = o.hsId || o.overlayId;
if (this.transitions[1] == 'crossfade' && this.reuseOverlay(o, el)) return;
this.genOverlayBox();
var width = o.width && /^[0-9]+(px|%)$/.test(o.width) ? o.width : 'auto';
if (/^(left|right)panel$/.test(o.position) && !/^[0-9]+px$/.test(o.width)) width = '200px';
var overlay = hs.createElement(
'div', {
id: 'hsId'+ hs.idCounter++,
hsId: o.hsId
}, {
position: 'absolute',
visibility: 'hidden',
width: width,
direction: hs.lang.cssDirection || '',
opacity: 0
},
relToVP ? hs.viewport :this.overlayBox,
true
);
if (relToVP) overlay.hsKey = this.key;
overlay.appendChild(el);
hs.extend(overlay, {
opacity: 1,
offsetX: 0,
offsetY: 0,
dur: (o.fade === 0 || o.fade === false || (o.fade == 2 && hs.ie)) ? 0 : 250
});
hs.extend(overlay, o);
if (this.gotOverlays) {
this.positionOverlay(overlay);
if (!overlay.hideOnMouseOut || this.mouseIsOver)
hs.animate(overlay, { opacity: overlay.opacity }, overlay.dur);
}
hs.push(this.overlays, hs.idCounter - 1);
},
positionOverlay : function(overlay) {
var p = overlay.position || 'middle center',
relToVP = (overlay.relativeTo == 'viewport'),
offX = overlay.offsetX,
offY = overlay.offsetY;
if (relToVP) {
hs.viewport.style.display = 'block';
overlay.hsKey = this.key;
if (overlay.offsetWidth > overlay.parentNode.offsetWidth)
overlay.style.width = '100%';
} else
if (overlay.parentNode != this.overlayBox) this.overlayBox.appendChild(overlay);
if (/left$/.test(p)) overlay.style.left = offX +'px';
if (/center$/.test(p)) hs.setStyles (overlay, {
left: '50%',
marginLeft: (offX - Math.round(overlay.offsetWidth / 2)) +'px'
});
if (/right$/.test(p)) overlay.style.right = - offX +'px';
if (/^leftpanel$/.test(p)) {
hs.setStyles(overlay, {
right: '100%',
marginRight: this.x.cb +'px',
top: - this.y.cb +'px',
bottom: - this.y.cb +'px',
overflow: 'auto'
});
this.x.p1 = overlay.offsetWidth;
} else if (/^rightpanel$/.test(p)) {
hs.setStyles(overlay, {
left: '100%',
marginLeft: this.x.cb +'px',
top: - this.y.cb +'px',
bottom: - this.y.cb +'px',
overflow: 'auto'
});
this.x.p2 = overlay.offsetWidth;
}
var parOff = overlay.parentNode.offsetHeight;
overlay.style.height = 'auto';
if (relToVP && overlay.offsetHeight > parOff)
overlay.style.height = hs.ieLt7 ? parOff +'px' : '100%';
if (/^top/.test(p)) overlay.style.top = offY +'px';
if (/^middle/.test(p)) hs.setStyles (overlay, {
top: '50%',
marginTop: (offY - Math.round(overlay.offsetHeight / 2)) +'px'
});
if (/^bottom/.test(p)) overlay.style.bottom = - offY +'px';
if (/^above$/.test(p)) {
hs.setStyles(overlay, {
left: (- this.x.p1 - this.x.cb) +'px',
right: (- this.x.p2 - this.x.cb) +'px',
bottom: '100%',
marginBottom: this.y.cb +'px',
width: 'auto'
});
this.y.p1 = overlay.offsetHeight;
} else if (/^below$/.test(p)) {
hs.setStyles(overlay, {
position: 'relative',
left: (- this.x.p1 - this.x.cb) +'px',
right: (- this.x.p2 - this.x.cb) +'px',
top: '100%',
marginTop: this.y.cb +'px',
width: 'auto'
});
this.y.p2 = overlay.offsetHeight;
overlay.style.position = 'absolute';
}
},
getOverlays : function() {
this.getInline(['heading', 'caption'], true);
this.getNumber();
if (this.heading && this.dragByHeading) this.heading.className += ' highslide-move';
if (hs.showCredits) this.writeCredits();
for (var i = 0; i < hs.overlays.length; i++) {
var o = hs.overlays[i], tId = o.thumbnailId, sg = o.slideshowGroup;
if ((!tId && !sg) || (tId && tId == this.thumbsUserSetId)
|| (sg && sg === this.slideshowGroup)) {
this.createOverlay(o);
}
}
var os = [];
for (var i = 0; i < this.overlays.length; i++) {
var o = hs.$('hsId'+ this.overlays[i]);
if (/panel$/.test(o.position)) this.positionOverlay(o);
else hs.push(os, o);
}
for (var i = 0; i < os.length; i++) this.positionOverlay(os[i]);
this.gotOverlays = true;
},
genOverlayBox : function() {
if (!this.overlayBox) this.overlayBox = hs.createElement (
'div', {
className: this.wrapperClassName
}, {
position : 'absolute',
width: (this.x.size || (this.useBox ? this.width : null)
|| this.x.full) +'px',
height: (this.y.size || this.y.full) +'px',
visibility : 'hidden',
overflow : 'hidden',
zIndex : hs.ie ? 4 : 'auto'
},
hs.container,
true
);
},
sizeOverlayBox : function(doWrapper, doPanels) {
var overlayBox = this.overlayBox,
x = this.x,
y = this.y;
hs.setStyles( overlayBox, {
width: x.size +'px',
height: y.size +'px'
});
if (doWrapper || doPanels) {
for (var i = 0; i < this.overlays.length; i++) {
var o = hs.$('hsId'+ this.overlays[i]);
var ie6 = (hs.ieLt7 || document.compatMode == 'BackCompat');
if (o && /^(above|below)$/.test(o.position)) {
if (ie6) {
o.style.width = (overlayBox.offsetWidth + 2 * x.cb
+ x.p1 + x.p2) +'px';
}
y[o.position == 'above' ? 'p1' : 'p2'] = o.offsetHeight;
}
if (o && ie6 && /^(left|right)panel$/.test(o.position)) {
o.style.height = (overlayBox.offsetHeight + 2* y.cb) +'px';
}
}
}
if (doWrapper) {
hs.setStyles(this.content, {
top: y.p1 +'px'
});
hs.setStyles(overlayBox, {
top: (y.p1 + y.cb) +'px'
});
}
},
showOverlays : function() {
var b = this.overlayBox;
b.className = '';
hs.setStyles(b, {
top: (this.y.p1 + this.y.cb) +'px',
left: (this.x.p1 + this.x.cb) +'px',
overflow : 'visible'
});
if (hs.safari) b.style.visibility = 'visible';
this.wrapper.appendChild (b);
for (var i = 0; i < this.overlays.length; i++) {
var o = hs.$('hsId'+ this.overlays[i]);
o.style.zIndex = o.zIndex || 4;
if (!o.hideOnMouseOut || this.mouseIsOver) {
o.style.visibility = 'visible';
hs.setStyles(o, { visibility: 'visible', display: '' });
hs.animate(o, { opacity: o.opacity }, o.dur);
}
}
},
destroyOverlays : function() {
if (!this.overlays.length) return;
if (this.slideshow) {
var c = this.slideshow.controls;
if (c && hs.getExpander(c) == this) c.parentNode.removeChild(c);
}
for (var i = 0; i < this.overlays.length; i++) {
var o = hs.$('hsId'+ this.overlays[i]);
if (o && o.parentNode == hs.viewport && hs.getExpander(o) == this) hs.discardElement(o);
}
hs.discardElement(this.overlayBox);
},
createFullExpand : function () {
if (this.slideshow && this.slideshow.controls) {
this.slideshow.enable('full-expand');
return;
}
this.fullExpandLabel = hs.createElement(
'a', {
href: 'javascript:hs.expanders['+ this.key +'].doFullExpand();',
title: hs.lang.fullExpandTitle,
className: 'highslide-full-expand'
}
);
this.createOverlay({
overlayId: this.fullExpandLabel,
position: hs.fullExpandPosition,
hideOnMouseOut: true,
opacity: hs.fullExpandOpacity
});
},
doFullExpand : function () {
try {
if (this.fullExpandLabel) hs.discardElement(this.fullExpandLabel);
this.focus();
var xSize = this.x.size,
ySize = this.y.size;
this.resizeTo(this.x.full, this.y.full);
var xpos = this.x.pos - (this.x.size - xSize) / 2;
if (xpos < hs.marginLeft) xpos = hs.marginLeft;
var ypos = this.y.pos - (this.y.size - ySize) / 2;
if (ypos < hs.marginTop) ypos = hs.marginTop;
this.moveTo(xpos, ypos);
this.doShowHide('hidden');
} catch (e) {
this.error(e);
}
},
afterClose : function () {
this.a.className = this.a.className.replace('highslide-active-anchor', '');
this.doShowHide('visible');
if (this.outline && this.outlineWhileAnimating) this.outline.destroy();
hs.discardElement(this.wrapper);
this.destroyOverlays();
if (!hs.viewport.childNodes.length) hs.viewport.style.display = 'none';
if (this.dimmingOpacity) hs.undim(this.key);
hs.expanders[this.key] = null;
hs.reOrder();
}
};
hs.Slideshow = function (expKey, options) {
if (hs.dynamicallyUpdateAnchors !== false) hs.updateAnchors();
this.expKey = expKey;
for (var x in options) this[x] = options[x];
if (this.useControls) this.getControls();
if (this.thumbstrip) this.thumbstrip = hs.Thumbstrip(this);
};
hs.Slideshow.prototype = {
getControls: function() {
this.controls = hs.createElement('div', { innerHTML: hs.replaceLang(hs.skin.controls) },
null, hs.container);
var buttons = ['play', 'pause', 'previous', 'next', 'move', 'full-expand', 'close'];
this.btn = {};
var pThis = this;
for (var i = 0; i < buttons.length; i++) {
this.btn[buttons[i]] = hs.getElementByClass(this.controls, 'li', 'highslide-'+ buttons[i]);
this.enable(buttons[i]);
}
this.btn.pause.style.display = 'none';
//this.disable('full-expand');
},
checkFirstAndLast: function() {
if (this.repeat || !this.controls) return;
var exp = hs.expanders[this.expKey],
cur = exp.getAnchorIndex(),
re = /disabled$/;
if (cur == 0)
this.disable('previous');
else if (re.test(this.btn.previous.getElementsByTagName('a')[0].className))
this.enable('previous');
if (cur + 1 == hs.anchors.groups[exp.slideshowGroup || 'none'].length) {
this.disable('next');
this.disable('play');
} else if (re.test(this.btn.next.getElementsByTagName('a')[0].className)) {
this.enable('next');
this.enable('play');
}
},
enable: function(btn) {
if (!this.btn) return;
var sls = this, a = this.btn[btn].getElementsByTagName('a')[0], re = /disabled$/;
a.onclick = function() {
sls[btn]();
return false;
};
if (re.test(a.className)) a.className = a.className.replace(re, '');
},
disable: function(btn) {
if (!this.btn) return;
var a = this.btn[btn].getElementsByTagName('a')[0];
a.onclick = function() { return false; };
if (!/disabled$/.test(a.className)) a.className += ' disabled';
},
hitSpace: function() {
if (this.autoplay) this.pause();
else this.play();
},
play: function(wait) {
if (this.btn) {
this.btn.play.style.display = 'none';
this.btn.pause.style.display = '';
}
this.autoplay = true;
if (!wait) hs.next(this.expKey);
},
pause: function() {
if (this.btn) {
this.btn.pause.style.display = 'none';
this.btn.play.style.display = '';
}
clearTimeout(this.autoplay);
this.autoplay = null;
},
previous: function() {
this.pause();
hs.previous(this.btn.previous);
},
next: function() {
this.pause();
hs.next(this.btn.next);
},
move: function() {},
'full-expand': function() {
hs.getExpander().doFullExpand();
},
close: function() {
hs.close(this.btn.close);
}
};
hs.Thumbstrip = function(slideshow) {
function add (exp) {
hs.extend(options || {}, {
overlayId: dom,
hsId: 'thumbstrip',
className: 'highslide-thumbstrip-'+ mode +'-overlay ' + (options.className || '')
});
if (hs.ieLt7) options.fade = 0;
exp.createOverlay(options);
hs.setStyles(dom.parentNode, { overflow: 'hidden' });
};
function scroll (delta) {
selectThumb(undefined, Math.round(delta * dom[isX ? 'offsetWidth' : 'offsetHeight'] * 0.7));
};
function selectThumb (i, scrollBy) {
if (i === undefined) for (var j = 0; j < group.length; j++) {
if (group[j] == hs.expanders[slideshow.expKey].a) {
i = j;
break;
}
}
if (i === undefined) return;
var as = dom.getElementsByTagName('a'),
active = as[i],
cell = active.parentNode,
left = isX ? 'Left' : 'Top',
right = isX ? 'Right' : 'Bottom',
width = isX ? 'Width' : 'Height',
offsetLeft = 'offset' + left,
offsetWidth = 'offset' + width,
overlayWidth = div.parentNode.parentNode[offsetWidth],
minTblPos = overlayWidth - table[offsetWidth],
curTblPos = parseInt(table.style[isX ? 'left' : 'top']) || 0,
tblPos = curTblPos,
mgnRight = 20;
if (scrollBy !== undefined) {
tblPos = curTblPos - scrollBy;
if (minTblPos > 0) minTblPos = 0;
if (tblPos > 0) tblPos = 0;
if (tblPos < minTblPos) tblPos = minTblPos;
} else {
for (var j = 0; j < as.length; j++) as[j].className = '';
active.className = 'highslide-active-anchor';
var activeLeft = i > 0 ? as[i - 1].parentNode[offsetLeft] : cell[offsetLeft],
activeRight = cell[offsetLeft] + cell[offsetWidth] +
(as[i + 1] ? as[i + 1].parentNode[offsetWidth] : 0);
if (activeRight > overlayWidth - curTblPos) tblPos = overlayWidth - activeRight;
else if (activeLeft < -curTblPos) tblPos = -activeLeft;
}
var markerPos = cell[offsetLeft] + (cell[offsetWidth] - marker[offsetWidth]) / 2 + tblPos;
hs.animate(table, isX ? { left: tblPos } : { top: tblPos }, null, 'easeOutQuad');
hs.animate(marker, isX ? { left: markerPos } : { top: markerPos }, null, 'easeOutQuad');
scrollUp.style.display = tblPos < 0 ? 'block' : 'none';
scrollDown.style.display = (tblPos > minTblPos) ? 'block' : 'none';
};
// initialize
var group = hs.anchors.groups[hs.expanders[slideshow.expKey].slideshowGroup || 'none'],
options = slideshow.thumbstrip,
mode = options.mode || 'horizontal',
floatMode = (mode == 'float'),
tree = floatMode ? ['div', 'ul', 'li', 'span'] : ['table', 'tbody', 'tr', 'td'],
isX = (mode == 'horizontal'),
dom = hs.createElement('div', {
className: 'highslide-thumbstrip highslide-thumbstrip-'+ mode,
innerHTML:
'<div class="highslide-thumbstrip-inner">'+
'<'+ tree[0] +'><'+ tree[1] +'></'+ tree[1] +'></'+ tree[0] +'></div>'+
'<div class="highslide-scroll-up"><div></div></div>'+
'<div class="highslide-scroll-down"><div></div></div>'+
'<div class="highslide-marker"><div></div></div>'
}, {
display: 'none'
}, hs.container),
domCh = dom.childNodes,
div = domCh[0],
scrollUp = domCh[1],
scrollDown = domCh[2],
marker = domCh[3],
table = div.firstChild,
tbody = dom.getElementsByTagName(tree[1])[0],
tr;
for (var i = 0; i < group.length; i++) {
if (i == 0 || !isX) tr = hs.createElement(tree[2], null, null, tbody);
(function(){
var a = group[i],
cell = hs.createElement(tree[3], null, null, tr),
pI = i;
hs.createElement('a', {
href: a.href,
title: a.title,
onclick: function() {
if (/highslide-active-anchor/.test(this.className)) return false;
hs.getExpander(this).focus();
return hs.transit(a);
},
innerHTML: hs.stripItemFormatter ? hs.stripItemFormatter(a) : a.innerHTML
}, null, cell);
})();
}
if (!floatMode) {
scrollUp.onclick = function () { scroll(-1); };
scrollDown.onclick = function() { scroll(1); };
hs.addEventListener(tbody, document.onmousewheel !== undefined ?
'mousewheel' : 'DOMMouseScroll', function(e) {
var delta = 0;
e = e || window.event;
if (e.wheelDelta) {
delta = e.wheelDelta/120;
if (hs.opera) delta = -delta;
} else if (e.detail) {
delta = -e.detail/3;
}
if (delta) scroll(-delta * 0.2);
if (e.preventDefault) e.preventDefault();
e.returnValue = false;
});
}
return {
add: add,
selectThumb: selectThumb
}
};
hs.langDefaults = hs.lang;
// history
var HsExpander = hs.Expander;
if (hs.ie && window == window.top) {
(function () {
try {
document.documentElement.doScroll('left');
} catch (e) {
setTimeout(arguments.callee, 50);
return;
}
hs.ready();
})();
}
hs.addEventListener(document, 'DOMContentLoaded', hs.ready);
hs.addEventListener(window, 'load', hs.ready);
// set handlers
hs.addEventListener(document, 'ready', function() {
if (hs.expandCursor || hs.dimmingOpacity) {
var style = hs.createElement('style', { type: 'text/css' }, null,
document.getElementsByTagName('HEAD')[0]),
backCompat = document.compatMode == 'BackCompat';
function addRule(sel, dec) {
if (hs.ie && (hs.uaVersion < 9 || backCompat)) {
var last = document.styleSheets[document.styleSheets.length - 1];
if (typeof(last.addRule) == "object") last.addRule(sel, dec);
} else {
style.appendChild(document.createTextNode(sel + " {" + dec + "}"));
}
}
function fix(prop) {
return 'expression( ( ( ignoreMe = document.documentElement.'+ prop +
' ? document.documentElement.'+ prop +' : document.body.'+ prop +' ) ) + \'px\' );';
}
if (hs.expandCursor) addRule ('.highslide img',
'cursor: url('+ hs.graphicsDir + hs.expandCursor +'), pointer !important;');
addRule ('.highslide-viewport-size',
hs.ie && (hs.uaVersion < 7 || backCompat) ?
'position: absolute; '+
'left:'+ fix('scrollLeft') +
'top:'+ fix('scrollTop') +
'width:'+ fix('clientWidth') +
'height:'+ fix('clientHeight') :
'position: fixed; width: 100%; height: 100%; left: 0; top: 0');
}
});
hs.addEventListener(window, 'resize', function() {
hs.getPageSize();
if (hs.viewport) for (var i = 0; i < hs.viewport.childNodes.length; i++) {
var node = hs.viewport.childNodes[i],
exp = hs.getExpander(node);
exp.positionOverlay(node);
if (node.hsId == 'thumbstrip') exp.slideshow.thumbstrip.selectThumb();
}
});
hs.addEventListener(document, 'mousemove', function(e) {
hs.mouse = { x: e.clientX, y: e.clientY };
});
hs.addEventListener(document, 'mousedown', hs.mouseClickHandler);
hs.addEventListener(document, 'mouseup', hs.mouseClickHandler);
hs.addEventListener(document, 'ready', hs.getAnchors);
hs.addEventListener(window, 'load', hs.preloadImages);
}
| JavaScript |
/**
* Name: Highslide JS
* Version: 4.1.13 (2011-10-06)
* Config: default +events +unobtrusive +imagemap +slideshow +positioning +transitions +viewport +thumbstrip +inline +ajax +iframe +flash
* Author: Torstein Hønsi
* Support: www.highslide.com/support
* License: www.highslide.com/#license
*/
if (!hs) { var hs = {
// Language strings
lang : {
cssDirection: 'ltr',
loadingText : 'Loading...',
loadingTitle : 'Click to cancel',
focusTitle : 'Click to bring to front',
fullExpandTitle : 'Expand to actual size (f)',
creditsText : 'Powered by <i>Highslide JS</i>',
creditsTitle : 'Go to the Highslide JS homepage',
previousText : 'Hình trước',
nextText : 'Hình kế tiếp',
moveText : 'Move',
closeText : 'Đóng',
closeTitle : 'Đóng (esc)',
resizeTitle : 'Resize',
playText : 'Tự động',
playTitle : 'Tự động (spacebar)',
pauseText : 'Tạm dừng',
pauseTitle : 'Tạm dừng (spacebar)',
previousTitle : 'Hình trước (arrow left)',
nextTitle : 'Hình kế tiếp (arrow right)',
moveTitle : 'Move',
fullExpandText : 'Phóng to',
number: 'Image %1 of %2',
restoreTitle : 'Bấm để đóng lại. Sử dụng các nút mũi tên bàn phím để xem ảnh trước/kế tiếp.'
},
// See http://highslide.com/ref for examples of settings
graphicsDir : 'Resources/js/highslide/graphics/',
expandCursor : 'zoomin.cur', // null disables
restoreCursor : 'zoomout.cur', // null disables
expandDuration : 250, // milliseconds
restoreDuration : 250,
marginLeft : 15,
marginRight : 15,
marginTop : 15,
marginBottom : 15,
zIndexCounter : 1001, // adjust to other absolutely positioned elements
loadingOpacity : 0.75,
allowMultipleInstances: true,
numberOfImagesToPreload : 5,
outlineWhileAnimating : 2, // 0 = never, 1 = always, 2 = HTML only
outlineStartOffset : 3, // ends at 10
padToMinWidth : false, // pad the popup width to make room for wide caption
fullExpandPosition : 'bottom right',
fullExpandOpacity : 1,
showCredits : true, // you can set this to false if you want
creditsHref : 'http://highslide.com/',
creditsTarget : '_self',
enableKeyListener : true,
openerTagNames : ['a', 'area'], // Add more to allow slideshow indexing
transitions : [],
transitionDuration: 250,
dimmingOpacity: 0, // Lightbox style dimming background
dimmingDuration: 50, // 0 for instant dimming
allowWidthReduction : false,
allowHeightReduction : true,
preserveContent : true, // Preserve changes made to the content and position of HTML popups.
objectLoadTime : 'before', // Load iframes 'before' or 'after' expansion.
cacheAjax : true, // Cache ajax popups for instant display. Can be overridden for each popup.
anchor : 'auto', // where the image expands from
align : 'auto', // position in the client (overrides anchor)
targetX: null, // the id of a target element
targetY: null,
dragByHeading: true,
minWidth: 200,
minHeight: 200,
allowSizeReduction: true, // allow the image to reduce to fit client size. If false, this overrides minWidth and minHeight
outlineType : 'drop-shadow', // set null to disable outlines
skin : {
controls:
'<div class="highslide-controls"><ul>'+
'<li class="highslide-previous">'+
'<a href="#" title="{hs.lang.previousTitle}">'+
'<span>{hs.lang.previousText}</span></a>'+
'</li>'+
'<li class="highslide-play">'+
'<a href="#" title="{hs.lang.playTitle}">'+
'<span>{hs.lang.playText}</span></a>'+
'</li>'+
'<li class="highslide-pause">'+
'<a href="#" title="{hs.lang.pauseTitle}">'+
'<span>{hs.lang.pauseText}</span></a>'+
'</li>'+
'<li class="highslide-next">'+
'<a href="#" title="{hs.lang.nextTitle}">'+
'<span>{hs.lang.nextText}</span></a>'+
'</li>'+
'<li class="highslide-move">'+
'<a href="#" title="{hs.lang.moveTitle}">'+
'<span>{hs.lang.moveText}</span></a>'+
'</li>'+
'<li class="highslide-full-expand">'+
'<a href="#" title="{hs.lang.fullExpandTitle}">'+
'<span>{hs.lang.fullExpandText}</span></a>'+
'</li>'+
'<li class="highslide-close">'+
'<a href="#" title="{hs.lang.closeTitle}" >'+
'<span>{hs.lang.closeText}</span></a>'+
'</li>'+
'</ul></div>'
,
contentWrapper:
'<div class="highslide-header"><ul>'+
'<li class="highslide-previous">'+
'<a href="#" title="{hs.lang.previousTitle}" onclick="return hs.previous(this)">'+
'<span>{hs.lang.previousText}</span></a>'+
'</li>'+
'<li class="highslide-next">'+
'<a href="#" title="{hs.lang.nextTitle}" onclick="return hs.next(this)">'+
'<span>{hs.lang.nextText}</span></a>'+
'</li>'+
'<li class="highslide-move">'+
'<a href="#" title="{hs.lang.moveTitle}" onclick="return false">'+
'<span>{hs.lang.moveText}</span></a>'+
'</li>'+
'<li class="highslide-close">'+
'<a href="#" title="{hs.lang.closeTitle}" onclick="return hs.close(this)">'+
'<span>{hs.lang.closeText}</span></a>'+
'</li>'+
'</ul></div>'+
'<div class="highslide-body"></div>'+
'<div class="highslide-footer"><div>'+
'<span class="highslide-resize" title="{hs.lang.resizeTitle}"><span></span></span>'+
'</div></div>'
},
// END OF YOUR SETTINGS
// declare internal properties
preloadTheseImages : [],
continuePreloading: true,
expanders : [],
overrides : [
'allowSizeReduction',
'useBox',
'anchor',
'align',
'targetX',
'targetY',
'outlineType',
'outlineWhileAnimating',
'captionId',
'captionText',
'captionEval',
'captionOverlay',
'headingId',
'headingText',
'headingEval',
'headingOverlay',
'creditsPosition',
'dragByHeading',
'autoplay',
'numberPosition',
'transitions',
'dimmingOpacity',
'width',
'height',
'contentId',
'allowWidthReduction',
'allowHeightReduction',
'preserveContent',
'maincontentId',
'maincontentText',
'maincontentEval',
'objectType',
'cacheAjax',
'objectWidth',
'objectHeight',
'objectLoadTime',
'swfOptions',
'wrapperClassName',
'minWidth',
'minHeight',
'maxWidth',
'maxHeight',
'pageOrigin',
'slideshowGroup',
'easing',
'easingClose',
'fadeInOut',
'src'
],
overlays : [],
idCounter : 0,
oPos : {
x: ['leftpanel', 'left', 'center', 'right', 'rightpanel'],
y: ['above', 'top', 'middle', 'bottom', 'below']
},
mouse: {},
headingOverlay: {},
captionOverlay: {},
swfOptions: { flashvars: {}, params: {}, attributes: {} },
timers : [],
slideshows : [],
pendingOutlines : {},
sleeping : [],
preloadTheseAjax : [],
cacheBindings : [],
cachedGets : {},
clones : {},
onReady: [],
uaVersion: /Trident\/4\.0/.test(navigator.userAgent) ? 8 :
parseFloat((navigator.userAgent.toLowerCase().match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [0,'0'])[1]),
ie : (document.all && !window.opera),
//ie : navigator && /MSIE [678]/.test(navigator.userAgent), // ie9 compliant?
safari : /Safari/.test(navigator.userAgent),
geckoMac : /Macintosh.+rv:1\.[0-8].+Gecko/.test(navigator.userAgent),
$ : function (id) {
if (id) return document.getElementById(id);
},
push : function (arr, val) {
arr[arr.length] = val;
},
createElement : function (tag, attribs, styles, parent, nopad) {
var el = document.createElement(tag);
if (attribs) hs.extend(el, attribs);
if (nopad) hs.setStyles(el, {padding: 0, border: 'none', margin: 0});
if (styles) hs.setStyles(el, styles);
if (parent) parent.appendChild(el);
return el;
},
extend : function (el, attribs) {
for (var x in attribs) el[x] = attribs[x];
return el;
},
setStyles : function (el, styles) {
for (var x in styles) {
if (hs.ieLt9 && x == 'opacity') {
if (styles[x] > 0.99) el.style.removeAttribute('filter');
else el.style.filter = 'alpha(opacity='+ (styles[x] * 100) +')';
}
else el.style[x] = styles[x];
}
},
animate: function(el, prop, opt) {
var start,
end,
unit;
if (typeof opt != 'object' || opt === null) {
var args = arguments;
opt = {
duration: args[2],
easing: args[3],
complete: args[4]
};
}
if (typeof opt.duration != 'number') opt.duration = 250;
opt.easing = Math[opt.easing] || Math.easeInQuad;
opt.curAnim = hs.extend({}, prop);
for (var name in prop) {
var e = new hs.fx(el, opt , name );
start = parseFloat(hs.css(el, name)) || 0;
end = parseFloat(prop[name]);
unit = name != 'opacity' ? 'px' : '';
e.custom( start, end, unit );
}
},
css: function(el, prop) {
if (el.style[prop]) {
return el.style[prop];
} else if (document.defaultView) {
return document.defaultView.getComputedStyle(el, null).getPropertyValue(prop);
} else {
if (prop == 'opacity') prop = 'filter';
var val = el.currentStyle[prop.replace(/\-(\w)/g, function (a, b){ return b.toUpperCase(); })];
if (prop == 'filter')
val = val.replace(/alpha\(opacity=([0-9]+)\)/,
function (a, b) { return b / 100 });
return val === '' ? 1 : val;
}
},
getPageSize : function () {
var d = document, w = window, iebody = d.compatMode && d.compatMode != 'BackCompat'
? d.documentElement : d.body,
ieLt9 = hs.ie && (hs.uaVersion < 9 || typeof pageXOffset == 'undefined');
var width = ieLt9 ? iebody.clientWidth :
(d.documentElement.clientWidth || self.innerWidth),
height = ieLt9 ? iebody.clientHeight : self.innerHeight;
hs.page = {
width: width,
height: height,
scrollLeft: ieLt9 ? iebody.scrollLeft : pageXOffset,
scrollTop: ieLt9 ? iebody.scrollTop : pageYOffset
};
return hs.page;
},
getPosition : function(el) {
if (/area/i.test(el.tagName)) {
var imgs = document.getElementsByTagName('img');
for (var i = 0; i < imgs.length; i++) {
var u = imgs[i].useMap;
if (u && u.replace(/^.*?#/, '') == el.parentNode.name) {
el = imgs[i];
break;
}
}
}
var p = { x: el.offsetLeft, y: el.offsetTop };
while (el.offsetParent) {
el = el.offsetParent;
p.x += el.offsetLeft;
p.y += el.offsetTop;
if (el != document.body && el != document.documentElement) {
p.x -= el.scrollLeft;
p.y -= el.scrollTop;
}
}
return p;
},
expand : function(a, params, custom, type) {
if (!a) a = hs.createElement('a', null, { display: 'none' }, hs.container);
if (typeof a.getParams == 'function') return params;
if (type == 'html') {
for (var i = 0; i < hs.sleeping.length; i++) {
if (hs.sleeping[i] && hs.sleeping[i].a == a) {
hs.sleeping[i].awake();
hs.sleeping[i] = null;
return false;
}
}
hs.hasHtmlExpanders = true;
}
try {
new hs.Expander(a, params, custom, type);
return false;
} catch (e) { return true; }
},
htmlExpand : function(a, params, custom) {
return hs.expand(a, params, custom, 'html');
},
getSelfRendered : function() {
return hs.createElement('div', {
className: 'highslide-html-content',
innerHTML: hs.replaceLang(hs.skin.contentWrapper)
});
},
getElementByClass : function (el, tagName, className) {
var els = el.getElementsByTagName(tagName);
for (var i = 0; i < els.length; i++) {
if ((new RegExp(className)).test(els[i].className)) {
return els[i];
}
}
return null;
},
replaceLang : function(s) {
s = s.replace(/\s/g, ' ');
var re = /{hs\.lang\.([^}]+)\}/g,
matches = s.match(re),
lang;
if (matches) for (var i = 0; i < matches.length; i++) {
lang = matches[i].replace(re, "$1");
if (typeof hs.lang[lang] != 'undefined') s = s.replace(matches[i], hs.lang[lang]);
}
return s;
},
setClickEvents : function () {
var els = document.getElementsByTagName('a');
for (var i = 0; i < els.length; i++) {
var type = hs.isUnobtrusiveAnchor(els[i]);
if (type && !els[i].hsHasSetClick) {
(function(){
var t = type;
if (hs.fireEvent(hs, 'onSetClickEvent', { element: els[i], type: t })) {
els[i].onclick =(type == 'image') ?function() { return hs.expand(this) }:
function() { return hs.htmlExpand(this, { objectType: t } );};
}
})();
els[i].hsHasSetClick = true;
}
}
hs.getAnchors();
},
isUnobtrusiveAnchor: function(el) {
if (el.rel == 'highslide') return 'image';
else if (el.rel == 'highslide-ajax') return 'ajax';
else if (el.rel == 'highslide-iframe') return 'iframe';
else if (el.rel == 'highslide-swf') return 'swf';
},
getCacheBinding : function (a) {
for (var i = 0; i < hs.cacheBindings.length; i++) {
if (hs.cacheBindings[i][0] == a) {
var c = hs.cacheBindings[i][1];
hs.cacheBindings[i][1] = c.cloneNode(1);
return c;
}
}
return null;
},
preloadAjax : function (e) {
var arr = hs.getAnchors();
for (var i = 0; i < arr.htmls.length; i++) {
var a = arr.htmls[i];
if (hs.getParam(a, 'objectType') == 'ajax' && hs.getParam(a, 'cacheAjax'))
hs.push(hs.preloadTheseAjax, a);
}
hs.preloadAjaxElement(0);
},
preloadAjaxElement : function (i) {
if (!hs.preloadTheseAjax[i]) return;
var a = hs.preloadTheseAjax[i];
var cache = hs.getNode(hs.getParam(a, 'contentId'));
if (!cache) cache = hs.getSelfRendered();
var ajax = new hs.Ajax(a, cache, 1);
ajax.onError = function () { };
ajax.onLoad = function () {
hs.push(hs.cacheBindings, [a, cache]);
hs.preloadAjaxElement(i + 1);
};
ajax.run();
},
focusTopmost : function() {
var topZ = 0,
topmostKey = -1,
expanders = hs.expanders,
exp,
zIndex;
for (var i = 0; i < expanders.length; i++) {
exp = expanders[i];
if (exp) {
zIndex = exp.wrapper.style.zIndex;
if (zIndex && zIndex > topZ) {
topZ = zIndex;
topmostKey = i;
}
}
}
if (topmostKey == -1) hs.focusKey = -1;
else expanders[topmostKey].focus();
},
getParam : function (a, param) {
a.getParams = a.onclick;
var p = a.getParams ? a.getParams() : null;
a.getParams = null;
return (p && typeof p[param] != 'undefined') ? p[param] :
(typeof hs[param] != 'undefined' ? hs[param] : null);
},
getSrc : function (a) {
var src = hs.getParam(a, 'src');
if (src) return src;
return a.href;
},
getNode : function (id) {
var node = hs.$(id), clone = hs.clones[id], a = {};
if (!node && !clone) return null;
if (!clone) {
clone = node.cloneNode(true);
clone.id = '';
hs.clones[id] = clone;
return node;
} else {
return clone.cloneNode(true);
}
},
discardElement : function(d) {
if (d) hs.garbageBin.appendChild(d);
hs.garbageBin.innerHTML = '';
},
dim : function(exp) {
if (!hs.dimmer) {
isNew = true;
hs.dimmer = hs.createElement ('div', {
className: 'highslide-dimming highslide-viewport-size',
owner: '',
onclick: function() {
if (hs.fireEvent(hs, 'onDimmerClick'))
hs.close();
}
}, {
visibility: 'visible',
opacity: 0
}, hs.container, true);
if (/(Android|iPad|iPhone|iPod)/.test(navigator.userAgent)) {
var body = document.body;
function pixDimmerSize() {
hs.setStyles(hs.dimmer, {
width: body.scrollWidth +'px',
height: body.scrollHeight +'px'
});
}
pixDimmerSize();
hs.addEventListener(window, 'resize', pixDimmerSize);
}
}
hs.dimmer.style.display = '';
var isNew = hs.dimmer.owner == '';
hs.dimmer.owner += '|'+ exp.key;
if (isNew) {
if (hs.geckoMac && hs.dimmingGeckoFix)
hs.setStyles(hs.dimmer, {
background: 'url('+ hs.graphicsDir + 'geckodimmer.png)',
opacity: 1
});
else
hs.animate(hs.dimmer, { opacity: exp.dimmingOpacity }, hs.dimmingDuration);
}
},
undim : function(key) {
if (!hs.dimmer) return;
if (typeof key != 'undefined') hs.dimmer.owner = hs.dimmer.owner.replace('|'+ key, '');
if (
(typeof key != 'undefined' && hs.dimmer.owner != '')
|| (hs.upcoming && hs.getParam(hs.upcoming, 'dimmingOpacity'))
) return;
if (hs.geckoMac && hs.dimmingGeckoFix) hs.dimmer.style.display = 'none';
else hs.animate(hs.dimmer, { opacity: 0 }, hs.dimmingDuration, null, function() {
hs.dimmer.style.display = 'none';
});
},
transit : function (adj, exp) {
var last = exp || hs.getExpander();
exp = last;
if (hs.upcoming) return false;
else hs.last = last;
hs.removeEventListener(document, window.opera ? 'keypress' : 'keydown', hs.keyHandler);
try {
hs.upcoming = adj;
adj.onclick();
} catch (e){
hs.last = hs.upcoming = null;
}
try {
if (!adj || exp.transitions[1] != 'crossfade')
exp.close();
} catch (e) {}
return false;
},
previousOrNext : function (el, op) {
var exp = hs.getExpander(el);
if (exp) return hs.transit(exp.getAdjacentAnchor(op), exp);
else return false;
},
previous : function (el) {
return hs.previousOrNext(el, -1);
},
next : function (el) {
return hs.previousOrNext(el, 1);
},
keyHandler : function(e) {
if (!e) e = window.event;
if (!e.target) e.target = e.srcElement; // ie
if (typeof e.target.form != 'undefined') return true; // form element has focus
if (!hs.fireEvent(hs, 'onKeyDown', e)) return true;
var exp = hs.getExpander();
var op = null;
switch (e.keyCode) {
case 70: // f
if (exp) exp.doFullExpand();
return true;
case 32: // Space
op = 2;
break;
case 34: // Page Down
case 39: // Arrow right
case 40: // Arrow down
op = 1;
break;
case 8: // Backspace
case 33: // Page Up
case 37: // Arrow left
case 38: // Arrow up
op = -1;
break;
case 27: // Escape
case 13: // Enter
op = 0;
}
if (op !== null) {if (op != 2)hs.removeEventListener(document, window.opera ? 'keypress' : 'keydown', hs.keyHandler);
if (!hs.enableKeyListener) return true;
if (e.preventDefault) e.preventDefault();
else e.returnValue = false;
if (exp) {
if (op == 0) {
exp.close();
} else if (op == 2) {
if (exp.slideshow) exp.slideshow.hitSpace();
} else {
if (exp.slideshow) exp.slideshow.pause();
hs.previousOrNext(exp.key, op);
}
return false;
}
}
return true;
},
registerOverlay : function (overlay) {
hs.push(hs.overlays, hs.extend(overlay, { hsId: 'hsId'+ hs.idCounter++ } ));
},
addSlideshow : function (options) {
var sg = options.slideshowGroup;
if (typeof sg == 'object') {
for (var i = 0; i < sg.length; i++) {
var o = {};
for (var x in options) o[x] = options[x];
o.slideshowGroup = sg[i];
hs.push(hs.slideshows, o);
}
} else {
hs.push(hs.slideshows, options);
}
},
getWrapperKey : function (element, expOnly) {
var el, re = /^highslide-wrapper-([0-9]+)$/;
// 1. look in open expanders
el = element;
while (el.parentNode) {
if (el.hsKey !== undefined) return el.hsKey;
if (el.id && re.test(el.id)) return el.id.replace(re, "$1");
el = el.parentNode;
}
// 2. look in thumbnail
if (!expOnly) {
el = element;
while (el.parentNode) {
if (el.tagName && hs.isHsAnchor(el)) {
for (var key = 0; key < hs.expanders.length; key++) {
var exp = hs.expanders[key];
if (exp && exp.a == el) return key;
}
}
el = el.parentNode;
}
}
return null;
},
getExpander : function (el, expOnly) {
if (typeof el == 'undefined') return hs.expanders[hs.focusKey] || null;
if (typeof el == 'number') return hs.expanders[el] || null;
if (typeof el == 'string') el = hs.$(el);
return hs.expanders[hs.getWrapperKey(el, expOnly)] || null;
},
isHsAnchor : function (a) {
return (a.onclick && a.onclick.toString().replace(/\s/g, ' ').match(/hs.(htmlE|e)xpand/));
},
reOrder : function () {
for (var i = 0; i < hs.expanders.length; i++)
if (hs.expanders[i] && hs.expanders[i].isExpanded) hs.focusTopmost();
},
fireEvent : function (obj, evt, args) {
return obj && obj[evt] ? (obj[evt](obj, args) !== false) : true;
},
mouseClickHandler : function(e)
{
if (!e) e = window.event;
if (e.button > 1) return true;
if (!e.target) e.target = e.srcElement;
var el = e.target;
while (el.parentNode
&& !(/highslide-(image|move|html|resize)/.test(el.className)))
{
el = el.parentNode;
}
var exp = hs.getExpander(el);
if (exp && (exp.isClosing || !exp.isExpanded)) return true;
if (exp && e.type == 'mousedown') {
if (e.target.form) return true;
var match = el.className.match(/highslide-(image|move|resize)/);
if (match) {
hs.dragArgs = {
exp: exp ,
type: match[1],
left: exp.x.pos,
width: exp.x.size,
top: exp.y.pos,
height: exp.y.size,
clickX: e.clientX,
clickY: e.clientY
};
hs.addEventListener(document, 'mousemove', hs.dragHandler);
if (e.preventDefault) e.preventDefault(); // FF
if (/highslide-(image|html)-blur/.test(exp.content.className)) {
exp.focus();
hs.hasFocused = true;
}
return false;
}
else if (/highslide-html/.test(el.className) && hs.focusKey != exp.key) {
exp.focus();
exp.doShowHide('hidden');
}
} else if (e.type == 'mouseup') {
hs.removeEventListener(document, 'mousemove', hs.dragHandler);
if (hs.dragArgs) {
if (hs.styleRestoreCursor && hs.dragArgs.type == 'image')
hs.dragArgs.exp.content.style.cursor = hs.styleRestoreCursor;
var hasDragged = hs.dragArgs.hasDragged;
if (!hasDragged &&!hs.hasFocused && !/(move|resize)/.test(hs.dragArgs.type)) {
if (hs.fireEvent(exp, 'onImageClick'))
exp.close();
}
else if (hasDragged || (!hasDragged && hs.hasHtmlExpanders)) {
hs.dragArgs.exp.doShowHide('hidden');
}
if (hs.dragArgs.exp.releaseMask)
hs.dragArgs.exp.releaseMask.style.display = 'none';
if (hasDragged) hs.fireEvent(hs.dragArgs.exp, 'onDrop', hs.dragArgs);
hs.hasFocused = false;
hs.dragArgs = null;
} else if (/highslide-image-blur/.test(el.className)) {
el.style.cursor = hs.styleRestoreCursor;
}
}
return false;
},
dragHandler : function(e)
{
if (!hs.dragArgs) return true;
if (!e) e = window.event;
var a = hs.dragArgs, exp = a.exp;
if (exp.iframe) {
if (!exp.releaseMask) exp.releaseMask = hs.createElement('div', null,
{ position: 'absolute', width: exp.x.size+'px', height: exp.y.size+'px',
left: exp.x.cb+'px', top: exp.y.cb+'px', zIndex: 4, background: (hs.ieLt9 ? 'white' : 'none'),
opacity: 0.01 },
exp.wrapper, true);
if (exp.releaseMask.style.display == 'none')
exp.releaseMask.style.display = '';
}
a.dX = e.clientX - a.clickX;
a.dY = e.clientY - a.clickY;
var distance = Math.sqrt(Math.pow(a.dX, 2) + Math.pow(a.dY, 2));
if (!a.hasDragged) a.hasDragged = (a.type != 'image' && distance > 0)
|| (distance > (hs.dragSensitivity || 5));
if (a.hasDragged && e.clientX > 5 && e.clientY > 5) {
if (!hs.fireEvent(exp, 'onDrag', a)) return false;
if (a.type == 'resize') exp.resize(a);
else {
exp.moveTo(a.left + a.dX, a.top + a.dY);
if (a.type == 'image') exp.content.style.cursor = 'move';
}
}
return false;
},
wrapperMouseHandler : function (e) {
try {
if (!e) e = window.event;
var over = /mouseover/i.test(e.type);
if (!e.target) e.target = e.srcElement; // ie
if (!e.relatedTarget) e.relatedTarget =
over ? e.fromElement : e.toElement; // ie
var exp = hs.getExpander(e.target);
if (!exp.isExpanded) return;
if (!exp || !e.relatedTarget || hs.getExpander(e.relatedTarget, true) == exp
|| hs.dragArgs) return;
hs.fireEvent(exp, over ? 'onMouseOver' : 'onMouseOut', e);
for (var i = 0; i < exp.overlays.length; i++) (function() {
var o = hs.$('hsId'+ exp.overlays[i]);
if (o && o.hideOnMouseOut) {
if (over) hs.setStyles(o, { visibility: 'visible', display: '' });
hs.animate(o, { opacity: over ? o.opacity : 0 }, o.dur);
}
})();
} catch (e) {}
},
addEventListener : function (el, event, func) {
if (el == document && event == 'ready') {
hs.push(hs.onReady, func);
}
try {
el.addEventListener(event, func, false);
} catch (e) {
try {
el.detachEvent('on'+ event, func);
el.attachEvent('on'+ event, func);
} catch (e) {
el['on'+ event] = func;
}
}
},
removeEventListener : function (el, event, func) {
try {
el.removeEventListener(event, func, false);
} catch (e) {
try {
el.detachEvent('on'+ event, func);
} catch (e) {
el['on'+ event] = null;
}
}
},
preloadFullImage : function (i) {
if (hs.continuePreloading && hs.preloadTheseImages[i] && hs.preloadTheseImages[i] != 'undefined') {
var img = document.createElement('img');
img.onload = function() {
img = null;
hs.preloadFullImage(i + 1);
};
img.src = hs.preloadTheseImages[i];
}
},
preloadImages : function (number) {
if (number && typeof number != 'object') hs.numberOfImagesToPreload = number;
var arr = hs.getAnchors();
for (var i = 0; i < arr.images.length && i < hs.numberOfImagesToPreload; i++) {
hs.push(hs.preloadTheseImages, hs.getSrc(arr.images[i]));
}
// preload outlines
if (hs.outlineType) new hs.Outline(hs.outlineType, function () { hs.preloadFullImage(0)} );
else
hs.preloadFullImage(0);
// preload cursor
if (hs.restoreCursor) var cur = hs.createElement('img', { src: hs.graphicsDir + hs.restoreCursor });
},
init : function () {
if (!hs.container) {
hs.ieLt7 = hs.ie && hs.uaVersion < 7;
hs.ieLt9 = hs.ie && hs.uaVersion < 9;
hs.getPageSize();
hs.ie6SSL = hs.ieLt7 && location.protocol == 'https:';
for (var x in hs.langDefaults) {
if (typeof hs[x] != 'undefined') hs.lang[x] = hs[x];
else if (typeof hs.lang[x] == 'undefined' && typeof hs.langDefaults[x] != 'undefined')
hs.lang[x] = hs.langDefaults[x];
}
hs.container = hs.createElement('div', {
className: 'highslide-container'
}, {
position: 'absolute',
left: 0,
top: 0,
width: '100%',
zIndex: hs.zIndexCounter,
direction: 'ltr'
},
document.body,
true
);
hs.loading = hs.createElement('a', {
className: 'highslide-loading',
title: hs.lang.loadingTitle,
innerHTML: hs.lang.loadingText,
href: 'javascript:;'
}, {
position: 'absolute',
top: '-9999px',
opacity: hs.loadingOpacity,
zIndex: 1
}, hs.container
);
hs.garbageBin = hs.createElement('div', null, { display: 'none' }, hs.container);
hs.viewport = hs.createElement('div', {
className: 'highslide-viewport highslide-viewport-size'
}, {
visibility: (hs.safari && hs.uaVersion < 525) ? 'visible' : 'hidden'
}, hs.container, 1
);
hs.clearing = hs.createElement('div', null,
{ clear: 'both', paddingTop: '1px' }, null, true);
// http://www.robertpenner.com/easing/
Math.linearTween = function (t, b, c, d) {
return c*t/d + b;
};
Math.easeInQuad = function (t, b, c, d) {
return c*(t/=d)*t + b;
};
Math.easeOutQuad = function (t, b, c, d) {
return -c *(t/=d)*(t-2) + b;
};
hs.hideSelects = hs.ieLt7;
hs.hideIframes = ((window.opera && hs.uaVersion < 9) || navigator.vendor == 'KDE'
|| (hs.ieLt7 && hs.uaVersion < 5.5));
hs.fireEvent(this, 'onActivate');
}
},
ready : function() {
if (hs.isReady) return;
hs.isReady = true;
for (var i = 0; i < hs.onReady.length; i++) hs.onReady[i]();
},
updateAnchors : function() {
var el, els, all = [], images = [], htmls = [],groups = {}, re;
for (var i = 0; i < hs.openerTagNames.length; i++) {
els = document.getElementsByTagName(hs.openerTagNames[i]);
for (var j = 0; j < els.length; j++) {
el = els[j];
re = hs.isHsAnchor(el);
if (re) {
hs.push(all, el);
if (re[0] == 'hs.expand') hs.push(images, el);
else if (re[0] == 'hs.htmlExpand') hs.push(htmls, el);
var g = hs.getParam(el, 'slideshowGroup') || 'none';
if (!groups[g]) groups[g] = [];
hs.push(groups[g], el);
}
}
}
hs.anchors = { all: all, groups: groups, images: images, htmls: htmls };
return hs.anchors;
},
getAnchors : function() {
return hs.anchors || hs.updateAnchors();
},
close : function(el) {
var exp = hs.getExpander(el);
if (exp) exp.close();
return false;
}
}; // end hs object
hs.fx = function( elem, options, prop ){
this.options = options;
this.elem = elem;
this.prop = prop;
if (!options.orig) options.orig = {};
};
hs.fx.prototype = {
update: function(){
(hs.fx.step[this.prop] || hs.fx.step._default)(this);
if (this.options.step)
this.options.step.call(this.elem, this.now, this);
},
custom: function(from, to, unit){
this.startTime = (new Date()).getTime();
this.start = from;
this.end = to;
this.unit = unit;// || this.unit || "px";
this.now = this.start;
this.pos = this.state = 0;
var self = this;
function t(gotoEnd){
return self.step(gotoEnd);
}
t.elem = this.elem;
if ( t() && hs.timers.push(t) == 1 ) {
hs.timerId = setInterval(function(){
var timers = hs.timers;
for ( var i = 0; i < timers.length; i++ )
if ( !timers[i]() )
timers.splice(i--, 1);
if ( !timers.length ) {
clearInterval(hs.timerId);
}
}, 13);
}
},
step: function(gotoEnd){
var t = (new Date()).getTime();
if ( gotoEnd || t >= this.options.duration + this.startTime ) {
this.now = this.end;
this.pos = this.state = 1;
this.update();
this.options.curAnim[ this.prop ] = true;
var done = true;
for ( var i in this.options.curAnim )
if ( this.options.curAnim[i] !== true )
done = false;
if ( done ) {
if (this.options.complete) this.options.complete.call(this.elem);
}
return false;
} else {
var n = t - this.startTime;
this.state = n / this.options.duration;
this.pos = this.options.easing(n, 0, 1, this.options.duration);
this.now = this.start + ((this.end - this.start) * this.pos);
this.update();
}
return true;
}
};
hs.extend( hs.fx, {
step: {
opacity: function(fx){
hs.setStyles(fx.elem, { opacity: fx.now });
},
_default: function(fx){
try {
if ( fx.elem.style && fx.elem.style[ fx.prop ] != null )
fx.elem.style[ fx.prop ] = fx.now + fx.unit;
else
fx.elem[ fx.prop ] = fx.now;
} catch (e) {}
}
}
});
hs.Outline = function (outlineType, onLoad) {
this.onLoad = onLoad;
this.outlineType = outlineType;
var v = hs.uaVersion, tr;
this.hasAlphaImageLoader = hs.ie && hs.uaVersion < 7;
if (!outlineType) {
if (onLoad) onLoad();
return;
}
hs.init();
this.table = hs.createElement(
'table', {
cellSpacing: 0
}, {
visibility: 'hidden',
position: 'absolute',
borderCollapse: 'collapse',
width: 0
},
hs.container,
true
);
var tbody = hs.createElement('tbody', null, null, this.table, 1);
this.td = [];
for (var i = 0; i <= 8; i++) {
if (i % 3 == 0) tr = hs.createElement('tr', null, { height: 'auto' }, tbody, true);
this.td[i] = hs.createElement('td', null, null, tr, true);
var style = i != 4 ? { lineHeight: 0, fontSize: 0} : { position : 'relative' };
hs.setStyles(this.td[i], style);
}
this.td[4].className = outlineType +' highslide-outline';
this.preloadGraphic();
};
hs.Outline.prototype = {
preloadGraphic : function () {
var src = hs.graphicsDir + (hs.outlinesDir || "outlines/")+ this.outlineType +".png";
var appendTo = hs.safari && hs.uaVersion < 525 ? hs.container : null;
this.graphic = hs.createElement('img', null, { position: 'absolute',
top: '-9999px' }, appendTo, true); // for onload trigger
var pThis = this;
this.graphic.onload = function() { pThis.onGraphicLoad(); };
this.graphic.src = src;
},
onGraphicLoad : function () {
var o = this.offset = this.graphic.width / 4,
pos = [[0,0],[0,-4],[-2,0],[0,-8],0,[-2,-8],[0,-2],[0,-6],[-2,-2]],
dim = { height: (2*o) +'px', width: (2*o) +'px' };
for (var i = 0; i <= 8; i++) {
if (pos[i]) {
if (this.hasAlphaImageLoader) {
var w = (i == 1 || i == 7) ? '100%' : this.graphic.width +'px';
var div = hs.createElement('div', null, { width: '100%', height: '100%', position: 'relative', overflow: 'hidden'}, this.td[i], true);
hs.createElement ('div', null, {
filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale, src='"+ this.graphic.src + "')",
position: 'absolute',
width: w,
height: this.graphic.height +'px',
left: (pos[i][0]*o)+'px',
top: (pos[i][1]*o)+'px'
},
div,
true);
} else {
hs.setStyles(this.td[i], { background: 'url('+ this.graphic.src +') '+ (pos[i][0]*o)+'px '+(pos[i][1]*o)+'px'});
}
if (window.opera && (i == 3 || i ==5))
hs.createElement('div', null, dim, this.td[i], true);
hs.setStyles (this.td[i], dim);
}
}
this.graphic = null;
if (hs.pendingOutlines[this.outlineType]) hs.pendingOutlines[this.outlineType].destroy();
hs.pendingOutlines[this.outlineType] = this;
if (this.onLoad) this.onLoad();
},
setPosition : function (pos, offset, vis, dur, easing) {
var exp = this.exp,
stl = exp.wrapper.style,
offset = offset || 0,
pos = pos || {
x: exp.x.pos + offset,
y: exp.y.pos + offset,
w: exp.x.get('wsize') - 2 * offset,
h: exp.y.get('wsize') - 2 * offset
};
if (vis) this.table.style.visibility = (pos.h >= 4 * this.offset)
? 'visible' : 'hidden';
hs.setStyles(this.table, {
left: (pos.x - this.offset) +'px',
top: (pos.y - this.offset) +'px',
width: (pos.w + 2 * this.offset) +'px'
});
pos.w -= 2 * this.offset;
pos.h -= 2 * this.offset;
hs.setStyles (this.td[4], {
width: pos.w >= 0 ? pos.w +'px' : 0,
height: pos.h >= 0 ? pos.h +'px' : 0
});
if (this.hasAlphaImageLoader) this.td[3].style.height
= this.td[5].style.height = this.td[4].style.height;
},
destroy : function(hide) {
if (hide) this.table.style.visibility = 'hidden';
else hs.discardElement(this.table);
}
};
hs.Dimension = function(exp, dim) {
this.exp = exp;
this.dim = dim;
this.ucwh = dim == 'x' ? 'Width' : 'Height';
this.wh = this.ucwh.toLowerCase();
this.uclt = dim == 'x' ? 'Left' : 'Top';
this.lt = this.uclt.toLowerCase();
this.ucrb = dim == 'x' ? 'Right' : 'Bottom';
this.rb = this.ucrb.toLowerCase();
this.p1 = this.p2 = 0;
};
hs.Dimension.prototype = {
get : function(key) {
switch (key) {
case 'loadingPos':
return this.tpos + this.tb + (this.t - hs.loading['offset'+ this.ucwh]) / 2;
case 'loadingPosXfade':
return this.pos + this.cb+ this.p1 + (this.size - hs.loading['offset'+ this.ucwh]) / 2;
case 'wsize':
return this.size + 2 * this.cb + this.p1 + this.p2;
case 'fitsize':
return this.clientSize - this.marginMin - this.marginMax;
case 'maxsize':
return this.get('fitsize') - 2 * this.cb - this.p1 - this.p2 ;
case 'opos':
return this.pos - (this.exp.outline ? this.exp.outline.offset : 0);
case 'osize':
return this.get('wsize') + (this.exp.outline ? 2*this.exp.outline.offset : 0);
case 'imgPad':
return this.imgSize ? Math.round((this.size - this.imgSize) / 2) : 0;
}
},
calcBorders: function() {
// correct for borders
this.cb = (this.exp.content['offset'+ this.ucwh] - this.t) / 2;
this.marginMax = hs['margin'+ this.ucrb];
},
calcThumb: function() {
this.t = this.exp.el[this.wh] ? parseInt(this.exp.el[this.wh]) :
this.exp.el['offset'+ this.ucwh];
this.tpos = this.exp.tpos[this.dim];
this.tb = (this.exp.el['offset'+ this.ucwh] - this.t) / 2;
if (this.tpos == 0 || this.tpos == -1) {
this.tpos = (hs.page[this.wh] / 2) + hs.page['scroll'+ this.uclt];
};
},
calcExpanded: function() {
var exp = this.exp;
this.justify = 'auto';
// get alignment
if (exp.align == 'center') this.justify = 'center';
else if (new RegExp(this.lt).test(exp.anchor)) this.justify = null;
else if (new RegExp(this.rb).test(exp.anchor)) this.justify = 'max';
// size and position
this.pos = this.tpos - this.cb + this.tb;
if (this.maxHeight && this.dim == 'x')
exp.maxWidth = Math.min(exp.maxWidth || this.full, exp.maxHeight * this.full / exp.y.full);
this.size = Math.min(this.full, exp['max'+ this.ucwh] || this.full);
this.minSize = exp.allowSizeReduction ?
Math.min(exp['min'+ this.ucwh], this.full) :this.full;
if (exp.isImage && exp.useBox) {
this.size = exp[this.wh];
this.imgSize = this.full;
}
if (this.dim == 'x' && hs.padToMinWidth) this.minSize = exp.minWidth;
this.target = exp['target'+ this.dim.toUpperCase()];
this.marginMin = hs['margin'+ this.uclt];
this.scroll = hs.page['scroll'+ this.uclt];
this.clientSize = hs.page[this.wh];
},
setSize: function(i) {
var exp = this.exp;
if (exp.isImage && (exp.useBox || hs.padToMinWidth)) {
this.imgSize = i;
this.size = Math.max(this.size, this.imgSize);
exp.content.style[this.lt] = this.get('imgPad')+'px';
} else
this.size = i;
exp.content.style[this.wh] = i +'px';
exp.wrapper.style[this.wh] = this.get('wsize') +'px';
if (exp.outline) exp.outline.setPosition();
if (exp.releaseMask) exp.releaseMask.style[this.wh] = i +'px';
if (this.dim == 'y' && exp.iDoc && exp.body.style.height != 'auto') try {
exp.iDoc.body.style.overflow = 'auto';
} catch (e) {}
if (exp.isHtml) {
var d = exp.scrollerDiv;
if (this.sizeDiff === undefined)
this.sizeDiff = exp.innerContent['offset'+ this.ucwh] - d['offset'+ this.ucwh];
d.style[this.wh] = (this.size - this.sizeDiff) +'px';
if (this.dim == 'x') exp.mediumContent.style.width = 'auto';
if (exp.body) exp.body.style[this.wh] = 'auto';
}
if (this.dim == 'x' && exp.overlayBox) exp.sizeOverlayBox(true);
if (this.dim == 'x' && exp.slideshow && exp.isImage) {
if (i == this.full) exp.slideshow.disable('full-expand');
else exp.slideshow.enable('full-expand');
}
},
setPos: function(i) {
this.pos = i;
this.exp.wrapper.style[this.lt] = i +'px';
if (this.exp.outline) this.exp.outline.setPosition();
}
};
hs.Expander = function(a, params, custom, contentType) {
if (document.readyState && hs.ie && !hs.isReady) {
hs.addEventListener(document, 'ready', function() {
new hs.Expander(a, params, custom, contentType);
});
return;
}
this.a = a;
this.custom = custom;
this.contentType = contentType || 'image';
this.isHtml = (contentType == 'html');
this.isImage = !this.isHtml;
hs.continuePreloading = false;
this.overlays = [];
this.last = hs.last;
hs.last = null;
hs.init();
var key = this.key = hs.expanders.length;
// override inline parameters
for (var i = 0; i < hs.overrides.length; i++) {
var name = hs.overrides[i];
this[name] = params && typeof params[name] != 'undefined' ?
params[name] : hs[name];
}
if (!this.src) this.src = a.href;
// get thumb
var el = (params && params.thumbnailId) ? hs.$(params.thumbnailId) : a;
el = this.thumb = el.getElementsByTagName('img')[0] || el;
this.thumbsUserSetId = el.id || a.id;
if (!hs.fireEvent(this, 'onInit')) return true;
// check if already open
for (var i = 0; i < hs.expanders.length; i++) {
if (hs.expanders[i] && hs.expanders[i].a == a
&& !(this.last && this.transitions[1] == 'crossfade')) {
hs.expanders[i].focus();
return false;
}
}
// cancel other
if (!hs.allowSimultaneousLoading) for (var i = 0; i < hs.expanders.length; i++) {
if (hs.expanders[i] && hs.expanders[i].thumb != el && !hs.expanders[i].onLoadStarted) {
hs.expanders[i].cancelLoading();
}
}
hs.expanders[key] = this;
if (!hs.allowMultipleInstances && !hs.upcoming) {
if (hs.expanders[key-1]) hs.expanders[key-1].close();
if (typeof hs.focusKey != 'undefined' && hs.expanders[hs.focusKey])
hs.expanders[hs.focusKey].close();
}
// initiate metrics
this.el = el;
this.tpos = this.pageOrigin || hs.getPosition(el);
hs.getPageSize();
var x = this.x = new hs.Dimension(this, 'x');
x.calcThumb();
var y = this.y = new hs.Dimension(this, 'y');
y.calcThumb();
if (/area/i.test(el.tagName)) this.getImageMapAreaCorrection(el);
this.wrapper = hs.createElement(
'div', {
id: 'highslide-wrapper-'+ this.key,
className: 'highslide-wrapper '+ this.wrapperClassName
}, {
visibility: 'hidden',
position: 'absolute',
zIndex: hs.zIndexCounter += 2
}, null, true );
this.wrapper.onmouseover = this.wrapper.onmouseout = hs.wrapperMouseHandler;
if (this.contentType == 'image' && this.outlineWhileAnimating == 2)
this.outlineWhileAnimating = 0;
// get the outline
if (!this.outlineType
|| (this.last && this.isImage && this.transitions[1] == 'crossfade')) {
this[this.contentType +'Create']();
} else if (hs.pendingOutlines[this.outlineType]) {
this.connectOutline();
this[this.contentType +'Create']();
} else {
this.showLoading();
var exp = this;
new hs.Outline(this.outlineType,
function () {
exp.connectOutline();
exp[exp.contentType +'Create']();
}
);
}
return true;
};
hs.Expander.prototype = {
error : function(e) {
if (hs.debug) alert ('Line '+ e.lineNumber +': '+ e.message);
else window.location.href = this.src;
},
connectOutline : function() {
var outline = this.outline = hs.pendingOutlines[this.outlineType];
outline.exp = this;
outline.table.style.zIndex = this.wrapper.style.zIndex - 1;
hs.pendingOutlines[this.outlineType] = null;
},
showLoading : function() {
if (this.onLoadStarted || this.loading) return;
this.loading = hs.loading;
var exp = this;
this.loading.onclick = function() {
exp.cancelLoading();
};
if (!hs.fireEvent(this, 'onShowLoading')) return;
var exp = this,
l = this.x.get('loadingPos') +'px',
t = this.y.get('loadingPos') +'px';
if (!tgt && this.last && this.transitions[1] == 'crossfade')
var tgt = this.last;
if (tgt) {
l = tgt.x.get('loadingPosXfade') +'px';
t = tgt.y.get('loadingPosXfade') +'px';
this.loading.style.zIndex = hs.zIndexCounter++;
}
setTimeout(function () {
if (exp.loading) hs.setStyles(exp.loading, { left: l, top: t, zIndex: hs.zIndexCounter++ })}
, 100);
},
imageCreate : function() {
var exp = this;
var img = document.createElement('img');
this.content = img;
img.onload = function () {
if (hs.expanders[exp.key]) exp.contentLoaded();
};
if (hs.blockRightClick) img.oncontextmenu = function() { return false; };
img.className = 'highslide-image';
hs.setStyles(img, {
visibility: 'hidden',
display: 'block',
position: 'absolute',
maxWidth: '9999px',
zIndex: 3
});
img.title = hs.lang.restoreTitle;
if (hs.safari && hs.uaVersion < 525) hs.container.appendChild(img);
if (hs.ie && hs.flushImgSize) img.src = null;
img.src = this.src;
this.showLoading();
},
htmlCreate : function () {
if (!hs.fireEvent(this, 'onBeforeGetContent')) return;
this.content = hs.getCacheBinding(this.a);
if (!this.content)
this.content = hs.getNode(this.contentId);
if (!this.content)
this.content = hs.getSelfRendered();
this.getInline(['maincontent']);
if (this.maincontent) {
var body = hs.getElementByClass(this.content, 'div', 'highslide-body');
if (body) body.appendChild(this.maincontent);
this.maincontent.style.display = 'block';
}
hs.fireEvent(this, 'onAfterGetContent');
var innerContent = this.innerContent = this.content;
if (/(swf|iframe)/.test(this.objectType)) this.setObjContainerSize(innerContent);
// the content tree
hs.container.appendChild(this.wrapper);
hs.setStyles( this.wrapper, {
position: 'static',
padding: '0 '+ hs.marginRight +'px 0 '+ hs.marginLeft +'px'
});
this.content = hs.createElement(
'div', {
className: 'highslide-html'
}, {
position: 'relative',
zIndex: 3,
height: 0,
overflow: 'hidden'
},
this.wrapper
);
this.mediumContent = hs.createElement('div', null, null, this.content, 1);
this.mediumContent.appendChild(innerContent);
hs.setStyles (innerContent, {
position: 'relative',
display: 'block',
direction: hs.lang.cssDirection || ''
});
if (this.width) innerContent.style.width = this.width +'px';
if (this.height) hs.setStyles(innerContent, {
height: this.height +'px',
overflow: 'hidden'
});
if (innerContent.offsetWidth < this.minWidth)
innerContent.style.width = this.minWidth +'px';
if (this.objectType == 'ajax' && !hs.getCacheBinding(this.a)) {
this.showLoading();
var exp = this;
var ajax = new hs.Ajax(this.a, innerContent);
ajax.src = this.src;
ajax.onLoad = function () { if (hs.expanders[exp.key]) exp.contentLoaded(); };
ajax.onError = function () { location.href = exp.src; };
ajax.run();
}
else
if (this.objectType == 'iframe' && this.objectLoadTime == 'before') {
this.writeExtendedContent();
}
else
this.contentLoaded();
},
contentLoaded : function() {
try {
if (!this.content) return;
this.content.onload = null;
if (this.onLoadStarted) return;
else this.onLoadStarted = true;
var x = this.x, y = this.y;
if (this.loading) {
hs.setStyles(this.loading, { top: '-9999px' });
this.loading = null;
hs.fireEvent(this, 'onHideLoading');
}
if (this.isImage) {
x.full = this.content.width;
y.full = this.content.height;
hs.setStyles(this.content, {
width: x.t +'px',
height: y.t +'px'
});
this.wrapper.appendChild(this.content);
hs.container.appendChild(this.wrapper);
} else if (this.htmlGetSize) this.htmlGetSize();
x.calcBorders();
y.calcBorders();
hs.setStyles (this.wrapper, {
left: (x.tpos + x.tb - x.cb) +'px',
top: (y.tpos + x.tb - y.cb) +'px'
});
this.initSlideshow();
this.getOverlays();
var ratio = x.full / y.full;
x.calcExpanded();
this.justify(x);
y.calcExpanded();
this.justify(y);
if (this.isHtml) this.htmlSizeOperations();
if (this.overlayBox) this.sizeOverlayBox(0, 1);
if (this.allowSizeReduction) {
if (this.isImage)
this.correctRatio(ratio);
else this.fitOverlayBox();
var ss = this.slideshow;
if (ss && this.last && ss.controls && ss.fixedControls) {
var pos = ss.overlayOptions.position || '', p;
for (var dim in hs.oPos) for (var i = 0; i < 5; i++) {
p = this[dim];
if (pos.match(hs.oPos[dim][i])) {
p.pos = this.last[dim].pos
+ (this.last[dim].p1 - p.p1)
+ (this.last[dim].size - p.size) * [0, 0, .5, 1, 1][i];
if (ss.fixedControls == 'fit') {
if (p.pos + p.size + p.p1 + p.p2 > p.scroll + p.clientSize - p.marginMax)
p.pos = p.scroll + p.clientSize - p.size - p.marginMin - p.marginMax - p.p1 - p.p2;
if (p.pos < p.scroll + p.marginMin) p.pos = p.scroll + p.marginMin;
}
}
}
}
if (this.isImage && this.x.full > (this.x.imgSize || this.x.size)) {
this.createFullExpand();
if (this.overlays.length == 1) this.sizeOverlayBox();
}
}
this.show();
} catch (e) {
this.error(e);
}
},
setObjContainerSize : function(parent, auto) {
var c = hs.getElementByClass(parent, 'DIV', 'highslide-body');
if (/(iframe|swf)/.test(this.objectType)) {
if (this.objectWidth) c.style.width = this.objectWidth +'px';
if (this.objectHeight) c.style.height = this.objectHeight +'px';
}
},
writeExtendedContent : function () {
if (this.hasExtendedContent) return;
var exp = this;
this.body = hs.getElementByClass(this.innerContent, 'DIV', 'highslide-body');
if (this.objectType == 'iframe') {
this.showLoading();
var ruler = hs.clearing.cloneNode(1);
this.body.appendChild(ruler);
this.newWidth = this.innerContent.offsetWidth;
if (!this.objectWidth) this.objectWidth = ruler.offsetWidth;
var hDiff = this.innerContent.offsetHeight - this.body.offsetHeight,
h = this.objectHeight || hs.page.height - hDiff - hs.marginTop - hs.marginBottom,
onload = this.objectLoadTime == 'before' ?
' onload="if (hs.expanders['+ this.key +']) hs.expanders['+ this.key +'].contentLoaded()" ' : '';
this.body.innerHTML += '<iframe name="hs'+ (new Date()).getTime() +'" frameborder="0" key="'+ this.key +'" '
+' style="width:'+ this.objectWidth +'px; height:'+ h +'px" '
+ onload +' src="'+ this.src +'" ></iframe>';
this.ruler = this.body.getElementsByTagName('div')[0];
this.iframe = this.body.getElementsByTagName('iframe')[0];
if (this.objectLoadTime == 'after') this.correctIframeSize();
}
if (this.objectType == 'swf') {
this.body.id = this.body.id || 'hs-flash-id-' + this.key;
var a = this.swfOptions;
if (!a.params) a.params = {};
if (typeof a.params.wmode == 'undefined') a.params.wmode = 'transparent';
if (swfobject) swfobject.embedSWF(this.src, this.body.id, this.objectWidth, this.objectHeight,
a.version || '7', a.expressInstallSwfurl, a.flashvars, a.params, a.attributes);
}
this.hasExtendedContent = true;
},
htmlGetSize : function() {
if (this.iframe && !this.objectHeight) { // loadtime before
this.iframe.style.height = this.body.style.height = this.getIframePageHeight() +'px';
}
this.innerContent.appendChild(hs.clearing);
if (!this.x.full) this.x.full = this.innerContent.offsetWidth;
this.y.full = this.innerContent.offsetHeight;
this.innerContent.removeChild(hs.clearing);
if (hs.ie && this.newHeight > parseInt(this.innerContent.currentStyle.height)) { // ie css bug
this.newHeight = parseInt(this.innerContent.currentStyle.height);
}
hs.setStyles( this.wrapper, { position: 'absolute', padding: '0'});
hs.setStyles( this.content, { width: this.x.t +'px', height: this.y.t +'px'});
},
getIframePageHeight : function() {
var h;
try {
var doc = this.iDoc = this.iframe.contentDocument || this.iframe.contentWindow.document;
var clearing = doc.createElement('div');
clearing.style.clear = 'both';
doc.body.appendChild(clearing);
h = clearing.offsetTop;
if (hs.ie) h += parseInt(doc.body.currentStyle.marginTop)
+ parseInt(doc.body.currentStyle.marginBottom) - 1;
} catch (e) { // other domain
h = 300;
}
return h;
},
correctIframeSize : function () {
var wDiff = this.innerContent.offsetWidth - this.ruler.offsetWidth;
hs.discardElement(this.ruler);
if (wDiff < 0) wDiff = 0;
var hDiff = this.innerContent.offsetHeight - this.iframe.offsetHeight;
if (this.iDoc && !this.objectHeight && !this.height && this.y.size == this.y.full) try {
this.iDoc.body.style.overflow = 'hidden';
} catch (e) {}
hs.setStyles(this.iframe, {
width: Math.abs(this.x.size - wDiff) +'px',
height: Math.abs(this.y.size - hDiff) +'px'
});
hs.setStyles(this.body, {
width: this.iframe.style.width,
height: this.iframe.style.height
});
this.scrollingContent = this.iframe;
this.scrollerDiv = this.scrollingContent;
},
htmlSizeOperations : function () {
this.setObjContainerSize(this.innerContent);
if (this.objectType == 'swf' && this.objectLoadTime == 'before') this.writeExtendedContent();
// handle minimum size
if (this.x.size < this.x.full && !this.allowWidthReduction) this.x.size = this.x.full;
if (this.y.size < this.y.full && !this.allowHeightReduction) this.y.size = this.y.full;
this.scrollerDiv = this.innerContent;
hs.setStyles(this.mediumContent, {
position: 'relative',
width: this.x.size +'px'
});
hs.setStyles(this.innerContent, {
border: 'none',
width: 'auto',
height: 'auto'
});
var node = hs.getElementByClass(this.innerContent, 'DIV', 'highslide-body');
if (node && !/(iframe|swf)/.test(this.objectType)) {
var cNode = node; // wrap to get true size
node = hs.createElement(cNode.nodeName, null, {overflow: 'hidden'}, null, true);
cNode.parentNode.insertBefore(node, cNode);
node.appendChild(hs.clearing); // IE6
node.appendChild(cNode);
var wDiff = this.innerContent.offsetWidth - node.offsetWidth;
var hDiff = this.innerContent.offsetHeight - node.offsetHeight;
node.removeChild(hs.clearing);
var kdeBugCorr = hs.safari || navigator.vendor == 'KDE' ? 1 : 0; // KDE repainting bug
hs.setStyles(node, {
width: (this.x.size - wDiff - kdeBugCorr) +'px',
height: (this.y.size - hDiff) +'px',
overflow: 'auto',
position: 'relative'
}
);
if (kdeBugCorr && cNode.offsetHeight > node.offsetHeight) {
node.style.width = (parseInt(node.style.width) + kdeBugCorr) + 'px';
}
this.scrollingContent = node;
this.scrollerDiv = this.scrollingContent;
}
if (this.iframe && this.objectLoadTime == 'before') this.correctIframeSize();
if (!this.scrollingContent && this.y.size < this.mediumContent.offsetHeight) this.scrollerDiv = this.content;
if (this.scrollerDiv == this.content && !this.allowWidthReduction && !/(iframe|swf)/.test(this.objectType)) {
this.x.size += 17; // room for scrollbars
}
if (this.scrollerDiv && this.scrollerDiv.offsetHeight > this.scrollerDiv.parentNode.offsetHeight) {
setTimeout("try { hs.expanders["+ this.key +"].scrollerDiv.style.overflow = 'auto'; } catch(e) {}",
hs.expandDuration);
}
},
getImageMapAreaCorrection : function(area) {
var c = area.coords.split(',');
for (var i = 0; i < c.length; i++) c[i] = parseInt(c[i]);
if (area.shape.toLowerCase() == 'circle') {
this.x.tpos += c[0] - c[2];
this.y.tpos += c[1] - c[2];
this.x.t = this.y.t = 2 * c[2];
} else {
var maxX, maxY, minX = maxX = c[0], minY = maxY = c[1];
for (var i = 0; i < c.length; i++) {
if (i % 2 == 0) {
minX = Math.min(minX, c[i]);
maxX = Math.max(maxX, c[i]);
} else {
minY = Math.min(minY, c[i]);
maxY = Math.max(maxY, c[i]);
}
}
this.x.tpos += minX;
this.x.t = maxX - minX;
this.y.tpos += minY;
this.y.t = maxY - minY;
}
},
justify : function (p, moveOnly) {
var tgtArr, tgt = p.target, dim = p == this.x ? 'x' : 'y';
if (tgt && tgt.match(/ /)) {
tgtArr = tgt.split(' ');
tgt = tgtArr[0];
}
if (tgt && hs.$(tgt)) {
p.pos = hs.getPosition(hs.$(tgt))[dim];
if (tgtArr && tgtArr[1] && tgtArr[1].match(/^[-]?[0-9]+px$/))
p.pos += parseInt(tgtArr[1]);
if (p.size < p.minSize) p.size = p.minSize;
} else if (p.justify == 'auto' || p.justify == 'center') {
var hasMovedMin = false;
var allowReduce = p.exp.allowSizeReduction;
if (p.justify == 'center')
p.pos = Math.round(p.scroll + (p.clientSize + p.marginMin - p.marginMax - p.get('wsize')) / 2);
else
p.pos = Math.round(p.pos - ((p.get('wsize') - p.t) / 2));
if (p.pos < p.scroll + p.marginMin) {
p.pos = p.scroll + p.marginMin;
hasMovedMin = true;
}
if (!moveOnly && p.size < p.minSize) {
p.size = p.minSize;
allowReduce = false;
}
if (p.pos + p.get('wsize') > p.scroll + p.clientSize - p.marginMax) {
if (!moveOnly && hasMovedMin && allowReduce) {
p.size = Math.min(p.size, p.get(dim == 'y' ? 'fitsize' : 'maxsize'));
} else if (p.get('wsize') < p.get('fitsize')) {
p.pos = p.scroll + p.clientSize - p.marginMax - p.get('wsize');
} else { // image larger than viewport
p.pos = p.scroll + p.marginMin;
if (!moveOnly && allowReduce) p.size = p.get(dim == 'y' ? 'fitsize' : 'maxsize');
}
}
if (!moveOnly && p.size < p.minSize) {
p.size = p.minSize;
allowReduce = false;
}
} else if (p.justify == 'max') {
p.pos = Math.floor(p.pos - p.size + p.t);
}
if (p.pos < p.marginMin) {
var tmpMin = p.pos;
p.pos = p.marginMin;
if (allowReduce && !moveOnly) p.size = p.size - (p.pos - tmpMin);
}
},
correctRatio : function(ratio) {
var x = this.x,
y = this.y,
changed = false,
xSize = Math.min(x.full, x.size),
ySize = Math.min(y.full, y.size),
useBox = (this.useBox || hs.padToMinWidth);
if (xSize / ySize > ratio) { // width greater
xSize = ySize * ratio;
if (xSize < x.minSize) { // below minWidth
xSize = x.minSize;
ySize = xSize / ratio;
}
changed = true;
} else if (xSize / ySize < ratio) { // height greater
ySize = xSize / ratio;
changed = true;
}
if (hs.padToMinWidth && x.full < x.minSize) {
x.imgSize = x.full;
y.size = y.imgSize = y.full;
} else if (this.useBox) {
x.imgSize = xSize;
y.imgSize = ySize;
} else {
x.size = xSize;
y.size = ySize;
}
changed = this.fitOverlayBox(this.useBox ? null : ratio, changed);
if (useBox && y.size < y.imgSize) {
y.imgSize = y.size;
x.imgSize = y.size * ratio;
}
if (changed || useBox) {
x.pos = x.tpos - x.cb + x.tb;
x.minSize = x.size;
this.justify(x, true);
y.pos = y.tpos - y.cb + y.tb;
y.minSize = y.size;
this.justify(y, true);
if (this.overlayBox) this.sizeOverlayBox();
}
},
fitOverlayBox : function(ratio, changed) {
var x = this.x, y = this.y;
if (this.overlayBox && (this.isImage || this.allowHeightReduction)) {
while (y.size > this.minHeight && x.size > this.minWidth
&& y.get('wsize') > y.get('fitsize')) {
y.size -= 10;
if (ratio) x.size = y.size * ratio;
this.sizeOverlayBox(0, 1);
changed = true;
}
}
return changed;
},
reflow : function () {
if (this.scrollerDiv) {
var h = /iframe/i.test(this.scrollerDiv.tagName) ? (this.getIframePageHeight() + 1) +'px' : 'auto';
if (this.body) this.body.style.height = h;
this.scrollerDiv.style.height = h;
this.y.setSize(this.innerContent.offsetHeight);
}
},
show : function () {
var x = this.x, y = this.y;
this.doShowHide('hidden');
hs.fireEvent(this, 'onBeforeExpand');
if (this.slideshow && this.slideshow.thumbstrip) this.slideshow.thumbstrip.selectThumb();
// Apply size change
this.changeSize(
1, {
wrapper: {
width : x.get('wsize'),
height : y.get('wsize'),
left: x.pos,
top: y.pos
},
content: {
left: x.p1 + x.get('imgPad'),
top: y.p1 + y.get('imgPad'),
width:x.imgSize ||x.size,
height:y.imgSize ||y.size
}
},
hs.expandDuration
);
},
changeSize : function(up, to, dur) {
// transition
var trans = this.transitions,
other = up ? (this.last ? this.last.a : null) : hs.upcoming,
t = (trans[1] && other
&& hs.getParam(other, 'transitions')[1] == trans[1]) ?
trans[1] : trans[0];
if (this[t] && t != 'expand') {
this[t](up, to);
return;
}
if (this.outline && !this.outlineWhileAnimating) {
if (up) this.outline.setPosition();
else this.outline.destroy(
(this.isHtml && this.preserveContent));
}
if (!up) this.destroyOverlays();
var exp = this,
x = exp.x,
y = exp.y,
easing = this.easing;
if (!up) easing = this.easingClose || easing;
var after = up ?
function() {
if (exp.outline) exp.outline.table.style.visibility = "visible";
setTimeout(function() {
exp.afterExpand();
}, 50);
} :
function() {
exp.afterClose();
};
if (up) hs.setStyles( this.wrapper, {
width: x.t +'px',
height: y.t +'px'
});
if (up && this.isHtml) {
hs.setStyles(this.wrapper, {
left: (x.tpos - x.cb + x.tb) +'px',
top: (y.tpos - y.cb + y.tb) +'px'
});
}
if (this.fadeInOut) {
hs.setStyles(this.wrapper, { opacity: up ? 0 : 1 });
hs.extend(to.wrapper, { opacity: up });
}
hs.animate( this.wrapper, to.wrapper, {
duration: dur,
easing: easing,
step: function(val, args) {
if (exp.outline && exp.outlineWhileAnimating && args.prop == 'top') {
var fac = up ? args.pos : 1 - args.pos;
var pos = {
w: x.t + (x.get('wsize') - x.t) * fac,
h: y.t + (y.get('wsize') - y.t) * fac,
x: x.tpos + (x.pos - x.tpos) * fac,
y: y.tpos + (y.pos - y.tpos) * fac
};
exp.outline.setPosition(pos, 0, 1);
}
if (exp.isHtml) {
if (args.prop == 'left')
exp.mediumContent.style.left = (x.pos - val) +'px';
if (args.prop == 'top')
exp.mediumContent.style.top = (y.pos - val) +'px';
}
}
});
hs.animate( this.content, to.content, dur, easing, after);
if (up) {
this.wrapper.style.visibility = 'visible';
this.content.style.visibility = 'visible';
if (this.isHtml) this.innerContent.style.visibility = 'visible';
this.a.className += ' highslide-active-anchor';
}
},
fade : function(up, to) {
this.outlineWhileAnimating = false;
var exp = this, t = up ? hs.expandDuration : 0;
if (up) {
hs.animate(this.wrapper, to.wrapper, 0);
hs.setStyles(this.wrapper, { opacity: 0, visibility: 'visible' });
hs.animate(this.content, to.content, 0);
this.content.style.visibility = 'visible';
hs.animate(this.wrapper, { opacity: 1 }, t, null,
function() { exp.afterExpand(); });
}
if (this.outline) {
this.outline.table.style.zIndex = this.wrapper.style.zIndex;
var dir = up || -1,
offset = this.outline.offset,
startOff = up ? 3 : offset,
endOff = up? offset : 3;
for (var i = startOff; dir * i <= dir * endOff; i += dir, t += 25) {
(function() {
var o = up ? endOff - i : startOff - i;
setTimeout(function() {
exp.outline.setPosition(0, o, 1);
}, t);
})();
}
}
if (up) {}//setTimeout(function() { exp.afterExpand(); }, t+50);
else {
setTimeout( function() {
if (exp.outline) exp.outline.destroy(exp.preserveContent);
exp.destroyOverlays();
hs.animate( exp.wrapper, { opacity: 0 }, hs.restoreDuration, null, function(){
exp.afterClose();
});
}, t);
}
},
crossfade : function (up, to, from) {
if (!up) return;
var exp = this,
last = this.last,
x = this.x,
y = this.y,
lastX = last.x,
lastY = last.y,
wrapper = this.wrapper,
content = this.content,
overlayBox = this.overlayBox;
hs.removeEventListener(document, 'mousemove', hs.dragHandler);
hs.setStyles(content, {
width: (x.imgSize || x.size) +'px',
height: (y.imgSize || y.size) +'px'
});
if (overlayBox) overlayBox.style.overflow = 'visible';
this.outline = last.outline;
if (this.outline) this.outline.exp = exp;
last.outline = null;
var fadeBox = hs.createElement('div', {
className: 'highslide-'+ this.contentType
}, {
position: 'absolute',
zIndex: 4,
overflow: 'hidden',
display: 'none'
}
);
var names = { oldImg: last, newImg: this };
for (var n in names) {
this[n] = names[n].content.cloneNode(1);
hs.setStyles(this[n], {
position: 'absolute',
border: 0,
visibility: 'visible'
});
fadeBox.appendChild(this[n]);
}
wrapper.appendChild(fadeBox);
if (this.isHtml) hs.setStyles(this.mediumContent, {
left: 0,
top: 0
});
if (overlayBox) {
overlayBox.className = '';
wrapper.appendChild(overlayBox);
}
fadeBox.style.display = '';
last.content.style.display = 'none';
if (hs.safari && hs.uaVersion < 525) {
this.wrapper.style.visibility = 'visible';
}
hs.animate(wrapper, {
width: x.size
}, {
duration: hs.transitionDuration,
step: function(val, args) {
var pos = args.pos,
invPos = 1 - pos;
var prop,
size = {},
props = ['pos', 'size', 'p1', 'p2'];
for (var n in props) {
prop = props[n];
size['x'+ prop] = Math.round(invPos * lastX[prop] + pos * x[prop]);
size['y'+ prop] = Math.round(invPos * lastY[prop] + pos * y[prop]);
size.ximgSize = Math.round(
invPos * (lastX.imgSize || lastX.size) + pos * (x.imgSize || x.size));
size.ximgPad = Math.round(invPos * lastX.get('imgPad') + pos * x.get('imgPad'));
size.yimgSize = Math.round(
invPos * (lastY.imgSize || lastY.size) + pos * (y.imgSize || y.size));
size.yimgPad = Math.round(invPos * lastY.get('imgPad') + pos * y.get('imgPad'));
}
if (exp.outline) exp.outline.setPosition({
x: size.xpos,
y: size.ypos,
w: size.xsize + size.xp1 + size.xp2 + 2 * x.cb,
h: size.ysize + size.yp1 + size.yp2 + 2 * y.cb
});
last.wrapper.style.clip = 'rect('
+ (size.ypos - lastY.pos)+'px, '
+ (size.xsize + size.xp1 + size.xp2 + size.xpos + 2 * lastX.cb - lastX.pos) +'px, '
+ (size.ysize + size.yp1 + size.yp2 + size.ypos + 2 * lastY.cb - lastY.pos) +'px, '
+ (size.xpos - lastX.pos)+'px)';
hs.setStyles(content, {
top: (size.yp1 + y.get('imgPad')) +'px',
left: (size.xp1 + x.get('imgPad')) +'px',
marginTop: (y.pos - size.ypos) +'px',
marginLeft: (x.pos - size.xpos) +'px'
});
hs.setStyles(wrapper, {
top: size.ypos +'px',
left: size.xpos +'px',
width: (size.xp1 + size.xp2 + size.xsize + 2 * x.cb)+ 'px',
height: (size.yp1 + size.yp2 + size.ysize + 2 * y.cb) + 'px'
});
hs.setStyles(fadeBox, {
width: (size.ximgSize || size.xsize) + 'px',
height: (size.yimgSize || size.ysize) +'px',
left: (size.xp1 + size.ximgPad) +'px',
top: (size.yp1 + size.yimgPad) +'px',
visibility: 'visible'
});
hs.setStyles(exp.oldImg, {
top: (lastY.pos - size.ypos + lastY.p1 - size.yp1 + lastY.get('imgPad') - size.yimgPad)+'px',
left: (lastX.pos - size.xpos + lastX.p1 - size.xp1 + lastX.get('imgPad') - size.ximgPad)+'px'
});
hs.setStyles(exp.newImg, {
opacity: pos,
top: (y.pos - size.ypos + y.p1 - size.yp1 + y.get('imgPad') - size.yimgPad) +'px',
left: (x.pos - size.xpos + x.p1 - size.xp1 + x.get('imgPad') - size.ximgPad) +'px'
});
if (overlayBox) hs.setStyles(overlayBox, {
width: size.xsize + 'px',
height: size.ysize +'px',
left: (size.xp1 + x.cb) +'px',
top: (size.yp1 + y.cb) +'px'
});
},
complete: function () {
wrapper.style.visibility = content.style.visibility = 'visible';
content.style.display = 'block';
hs.discardElement(fadeBox);
exp.afterExpand();
last.afterClose();
exp.last = null;
}
});
},
reuseOverlay : function(o, el) {
if (!this.last) return false;
for (var i = 0; i < this.last.overlays.length; i++) {
var oDiv = hs.$('hsId'+ this.last.overlays[i]);
if (oDiv && oDiv.hsId == o.hsId) {
this.genOverlayBox();
oDiv.reuse = this.key;
hs.push(this.overlays, this.last.overlays[i]);
return true;
}
}
return false;
},
afterExpand : function() {
this.isExpanded = true;
this.focus();
if (this.isHtml && this.objectLoadTime == 'after') this.writeExtendedContent();
if (this.iframe) {
try {
var exp = this,
doc = this.iframe.contentDocument || this.iframe.contentWindow.document;
hs.addEventListener(doc, 'mousedown', function () {
if (hs.focusKey != exp.key) exp.focus();
});
} catch(e) {}
if (hs.ie && typeof this.isClosing != 'boolean') // first open
this.iframe.style.width = (this.objectWidth - 1) +'px'; // hasLayout
}
if (this.dimmingOpacity) hs.dim(this);
if (hs.upcoming && hs.upcoming == this.a) hs.upcoming = null;
this.prepareNextOutline();
var p = hs.page, mX = hs.mouse.x + p.scrollLeft, mY = hs.mouse.y + p.scrollTop;
this.mouseIsOver = this.x.pos < mX && mX < this.x.pos + this.x.get('wsize')
&& this.y.pos < mY && mY < this.y.pos + this.y.get('wsize');
if (this.overlayBox) this.showOverlays();
hs.fireEvent(this, 'onAfterExpand');
},
prepareNextOutline : function() {
var key = this.key;
var outlineType = this.outlineType;
new hs.Outline(outlineType,
function () { try { hs.expanders[key].preloadNext(); } catch (e) {} });
},
preloadNext : function() {
var next = this.getAdjacentAnchor(1);
if (next && next.onclick.toString().match(/hs\.expand/))
var img = hs.createElement('img', { src: hs.getSrc(next) });
},
getAdjacentAnchor : function(op) {
var current = this.getAnchorIndex(), as = hs.anchors.groups[this.slideshowGroup || 'none'];
if (as && !as[current + op] && this.slideshow && this.slideshow.repeat) {
if (op == 1) return as[0];
else if (op == -1) return as[as.length-1];
}
return (as && as[current + op]) || null;
},
getAnchorIndex : function() {
var arr = hs.getAnchors().groups[this.slideshowGroup || 'none'];
if (arr) for (var i = 0; i < arr.length; i++) {
if (arr[i] == this.a) return i;
}
return null;
},
getNumber : function() {
if (this[this.numberPosition]) {
var arr = hs.anchors.groups[this.slideshowGroup || 'none'];
if (arr) {
var s = hs.lang.number.replace('%1', this.getAnchorIndex() + 1).replace('%2', arr.length);
this[this.numberPosition].innerHTML =
'<div class="highslide-number">'+ s +'</div>'+ this[this.numberPosition].innerHTML;
}
}
},
initSlideshow : function() {
if (!this.last) {
for (var i = 0; i < hs.slideshows.length; i++) {
var ss = hs.slideshows[i], sg = ss.slideshowGroup;
if (typeof sg == 'undefined' || sg === null || sg === this.slideshowGroup)
this.slideshow = new hs.Slideshow(this.key, ss);
}
} else {
this.slideshow = this.last.slideshow;
}
var ss = this.slideshow;
if (!ss) return;
var key = ss.expKey = this.key;
ss.checkFirstAndLast();
ss.disable('full-expand');
if (ss.controls) {
this.createOverlay(hs.extend(ss.overlayOptions || {}, {
overlayId: ss.controls,
hsId: 'controls',
zIndex: 5
}));
}
if (ss.thumbstrip) ss.thumbstrip.add(this);
if (!this.last && this.autoplay) ss.play(true);
if (ss.autoplay) {
ss.autoplay = setTimeout(function() {
hs.next(key);
}, (ss.interval || 500));
}
},
cancelLoading : function() {
hs.discardElement (this.wrapper);
hs.expanders[this.key] = null;
if (hs.upcoming == this.a) hs.upcoming = null;
hs.undim(this.key);
if (this.loading) hs.loading.style.left = '-9999px';
hs.fireEvent(this, 'onHideLoading');
},
writeCredits : function () {
if (this.credits) return;
this.credits = hs.createElement('a', {
href: hs.creditsHref,
target: hs.creditsTarget,
className: 'highslide-credits',
innerHTML: hs.lang.creditsText,
title: hs.lang.creditsTitle
});
this.createOverlay({
overlayId: this.credits,
position: this.creditsPosition || 'top left',
hsId: 'credits'
});
},
getInline : function(types, addOverlay) {
for (var i = 0; i < types.length; i++) {
var type = types[i], s = null;
if (type == 'caption' && !hs.fireEvent(this, 'onBeforeGetCaption')) return;
else if (type == 'heading' && !hs.fireEvent(this, 'onBeforeGetHeading')) return;
if (!this[type +'Id'] && this.thumbsUserSetId)
this[type +'Id'] = type +'-for-'+ this.thumbsUserSetId;
if (this[type +'Id']) this[type] = hs.getNode(this[type +'Id']);
if (!this[type] && !this[type +'Text'] && this[type +'Eval']) try {
s = eval(this[type +'Eval']);
} catch (e) {}
if (!this[type] && this[type +'Text']) {
s = this[type +'Text'];
}
if (!this[type] && !s) {
this[type] = hs.getNode(this.a['_'+ type + 'Id']);
if (!this[type]) {
var next = this.a.nextSibling;
while (next && !hs.isHsAnchor(next)) {
if ((new RegExp('highslide-'+ type)).test(next.className || null)) {
if (!next.id) this.a['_'+ type + 'Id'] = next.id = 'hsId'+ hs.idCounter++;
this[type] = hs.getNode(next.id);
break;
}
next = next.nextSibling;
}
}
}
if (!this[type] && !s && this.numberPosition == type) s = '\n';
if (!this[type] && s) this[type] = hs.createElement('div',
{ className: 'highslide-'+ type, innerHTML: s } );
if (addOverlay && this[type]) {
var o = { position: (type == 'heading') ? 'above' : 'below' };
for (var x in this[type+'Overlay']) o[x] = this[type+'Overlay'][x];
o.overlayId = this[type];
this.createOverlay(o);
}
}
},
// on end move and resize
doShowHide : function(visibility) {
if (hs.hideSelects) this.showHideElements('SELECT', visibility);
if (hs.hideIframes) this.showHideElements('IFRAME', visibility);
if (hs.geckoMac) this.showHideElements('*', visibility);
},
showHideElements : function (tagName, visibility) {
var els = document.getElementsByTagName(tagName);
var prop = tagName == '*' ? 'overflow' : 'visibility';
for (var i = 0; i < els.length; i++) {
if (prop == 'visibility' || (document.defaultView.getComputedStyle(
els[i], "").getPropertyValue('overflow') == 'auto'
|| els[i].getAttribute('hidden-by') != null)) {
var hiddenBy = els[i].getAttribute('hidden-by');
if (visibility == 'visible' && hiddenBy) {
hiddenBy = hiddenBy.replace('['+ this.key +']', '');
els[i].setAttribute('hidden-by', hiddenBy);
if (!hiddenBy) els[i].style[prop] = els[i].origProp;
} else if (visibility == 'hidden') { // hide if behind
var elPos = hs.getPosition(els[i]);
elPos.w = els[i].offsetWidth;
elPos.h = els[i].offsetHeight;
if (!this.dimmingOpacity) { // hide all if dimming
var clearsX = (elPos.x + elPos.w < this.x.get('opos')
|| elPos.x > this.x.get('opos') + this.x.get('osize'));
var clearsY = (elPos.y + elPos.h < this.y.get('opos')
|| elPos.y > this.y.get('opos') + this.y.get('osize'));
}
var wrapperKey = hs.getWrapperKey(els[i]);
if (!clearsX && !clearsY && wrapperKey != this.key) { // element falls behind image
if (!hiddenBy) {
els[i].setAttribute('hidden-by', '['+ this.key +']');
els[i].origProp = els[i].style[prop];
els[i].style[prop] = 'hidden';
} else if (hiddenBy.indexOf('['+ this.key +']') == -1) {
els[i].setAttribute('hidden-by', hiddenBy + '['+ this.key +']');
}
} else if ((hiddenBy == '['+ this.key +']' || hs.focusKey == wrapperKey)
&& wrapperKey != this.key) { // on move
els[i].setAttribute('hidden-by', '');
els[i].style[prop] = els[i].origProp || '';
} else if (hiddenBy && hiddenBy.indexOf('['+ this.key +']') > -1) {
els[i].setAttribute('hidden-by', hiddenBy.replace('['+ this.key +']', ''));
}
}
}
}
},
focus : function() {
this.wrapper.style.zIndex = hs.zIndexCounter += 2;
// blur others
for (var i = 0; i < hs.expanders.length; i++) {
if (hs.expanders[i] && i == hs.focusKey) {
var blurExp = hs.expanders[i];
blurExp.content.className += ' highslide-'+ blurExp.contentType +'-blur';
if (blurExp.isImage) {
blurExp.content.style.cursor = hs.ieLt7 ? 'hand' : 'pointer';
blurExp.content.title = hs.lang.focusTitle;
}
hs.fireEvent(blurExp, 'onBlur');
}
}
// focus this
if (this.outline) this.outline.table.style.zIndex
= this.wrapper.style.zIndex - 1;
this.content.className = 'highslide-'+ this.contentType;
if (this.isImage) {
this.content.title = hs.lang.restoreTitle;
if (hs.restoreCursor) {
hs.styleRestoreCursor = window.opera ? 'pointer' : 'url('+ hs.graphicsDir + hs.restoreCursor +'), pointer';
if (hs.ieLt7 && hs.uaVersion < 6) hs.styleRestoreCursor = 'hand';
this.content.style.cursor = hs.styleRestoreCursor;
}
}
hs.focusKey = this.key;
hs.addEventListener(document, window.opera ? 'keypress' : 'keydown', hs.keyHandler);
hs.fireEvent(this, 'onFocus');
},
moveTo: function(x, y) {
this.x.setPos(x);
this.y.setPos(y);
},
resize : function (e) {
var w, h, r = e.width / e.height;
w = Math.max(e.width + e.dX, Math.min(this.minWidth, this.x.full));
if (this.isImage && Math.abs(w - this.x.full) < 12) w = this.x.full;
h = this.isHtml ? e.height + e.dY : w / r;
if (h < Math.min(this.minHeight, this.y.full)) {
h = Math.min(this.minHeight, this.y.full);
if (this.isImage) w = h * r;
}
this.resizeTo(w, h);
},
resizeTo: function(w, h) {
this.y.setSize(h);
this.x.setSize(w);
this.wrapper.style.height = this.y.get('wsize') +'px';
},
close : function() {
if (this.isClosing || !this.isExpanded) return;
if (this.transitions[1] == 'crossfade' && hs.upcoming) {
hs.getExpander(hs.upcoming).cancelLoading();
hs.upcoming = null;
}
if (!hs.fireEvent(this, 'onBeforeClose')) return;
this.isClosing = true;
if (this.slideshow && !hs.upcoming) this.slideshow.pause();
hs.removeEventListener(document, window.opera ? 'keypress' : 'keydown', hs.keyHandler);
try {
if (this.isHtml) this.htmlPrepareClose();
this.content.style.cursor = 'default';
this.changeSize(
0, {
wrapper: {
width : this.x.t,
height : this.y.t,
left: this.x.tpos - this.x.cb + this.x.tb,
top: this.y.tpos - this.y.cb + this.y.tb
},
content: {
left: 0,
top: 0,
width: this.x.t,
height: this.y.t
}
}, hs.restoreDuration
);
} catch (e) { this.afterClose(); }
},
htmlPrepareClose : function() {
if (hs.geckoMac) { // bad redraws
if (!hs.mask) hs.mask = hs.createElement('div', null,
{ position: 'absolute' }, hs.container);
hs.setStyles(hs.mask, { width: this.x.size +'px', height: this.y.size +'px',
left: this.x.pos +'px', top: this.y.pos +'px', display: 'block' });
}
if (this.objectType == 'swf') try { hs.$(this.body.id).StopPlay(); } catch (e) {}
if (this.objectLoadTime == 'after' && !this.preserveContent) this.destroyObject();
if (this.scrollerDiv && this.scrollerDiv != this.scrollingContent)
this.scrollerDiv.style.overflow = 'hidden';
},
destroyObject : function () {
if (hs.ie && this.iframe)
try { this.iframe.contentWindow.document.body.innerHTML = ''; } catch (e) {}
if (this.objectType == 'swf') swfobject.removeSWF(this.body.id);
this.body.innerHTML = '';
},
sleep : function() {
if (this.outline) this.outline.table.style.display = 'none';
this.releaseMask = null;
this.wrapper.style.display = 'none';
this.isExpanded = false;
hs.push(hs.sleeping, this);
},
awake : function() {try {
hs.expanders[this.key] = this;
if (!hs.allowMultipleInstances &&hs.focusKey != this.key) {
try { hs.expanders[hs.focusKey].close(); } catch (e){}
}
var z = hs.zIndexCounter++, stl = { display: '', zIndex: z };
hs.setStyles (this.wrapper, stl);
this.isClosing = false;
var o = this.outline || 0;
if (o) {
if (!this.outlineWhileAnimating) stl.visibility = 'hidden';
hs.setStyles (o.table, stl);
}
if (this.slideshow) {
this.initSlideshow();
}
this.show();
} catch (e) {}
},
createOverlay : function (o) {
var el = o.overlayId,
relToVP = (o.relativeTo == 'viewport' && !/panel$/.test(o.position));
if (typeof el == 'string') el = hs.getNode(el);
if (o.html) el = hs.createElement('div', { innerHTML: o.html });
if (!el || typeof el == 'string') return;
if (!hs.fireEvent(this, 'onCreateOverlay', { overlay: el })) return;
el.style.display = 'block';
o.hsId = o.hsId || o.overlayId;
if (this.transitions[1] == 'crossfade' && this.reuseOverlay(o, el)) return;
this.genOverlayBox();
var width = o.width && /^[0-9]+(px|%)$/.test(o.width) ? o.width : 'auto';
if (/^(left|right)panel$/.test(o.position) && !/^[0-9]+px$/.test(o.width)) width = '200px';
var overlay = hs.createElement(
'div', {
id: 'hsId'+ hs.idCounter++,
hsId: o.hsId
}, {
position: 'absolute',
visibility: 'hidden',
width: width,
direction: hs.lang.cssDirection || '',
opacity: 0
},
relToVP ? hs.viewport :this.overlayBox,
true
);
if (relToVP) overlay.hsKey = this.key;
overlay.appendChild(el);
hs.extend(overlay, {
opacity: 1,
offsetX: 0,
offsetY: 0,
dur: (o.fade === 0 || o.fade === false || (o.fade == 2 && hs.ie)) ? 0 : 250
});
hs.extend(overlay, o);
if (this.gotOverlays) {
this.positionOverlay(overlay);
if (!overlay.hideOnMouseOut || this.mouseIsOver)
hs.animate(overlay, { opacity: overlay.opacity }, overlay.dur);
}
hs.push(this.overlays, hs.idCounter - 1);
},
positionOverlay : function(overlay) {
var p = overlay.position || 'middle center',
relToVP = (overlay.relativeTo == 'viewport'),
offX = overlay.offsetX,
offY = overlay.offsetY;
if (relToVP) {
hs.viewport.style.display = 'block';
overlay.hsKey = this.key;
if (overlay.offsetWidth > overlay.parentNode.offsetWidth)
overlay.style.width = '100%';
} else
if (overlay.parentNode != this.overlayBox) this.overlayBox.appendChild(overlay);
if (/left$/.test(p)) overlay.style.left = offX +'px';
if (/center$/.test(p)) hs.setStyles (overlay, {
left: '50%',
marginLeft: (offX - Math.round(overlay.offsetWidth / 2)) +'px'
});
if (/right$/.test(p)) overlay.style.right = - offX +'px';
if (/^leftpanel$/.test(p)) {
hs.setStyles(overlay, {
right: '100%',
marginRight: this.x.cb +'px',
top: - this.y.cb +'px',
bottom: - this.y.cb +'px',
overflow: 'auto'
});
this.x.p1 = overlay.offsetWidth;
} else if (/^rightpanel$/.test(p)) {
hs.setStyles(overlay, {
left: '100%',
marginLeft: this.x.cb +'px',
top: - this.y.cb +'px',
bottom: - this.y.cb +'px',
overflow: 'auto'
});
this.x.p2 = overlay.offsetWidth;
}
var parOff = overlay.parentNode.offsetHeight;
overlay.style.height = 'auto';
if (relToVP && overlay.offsetHeight > parOff)
overlay.style.height = hs.ieLt7 ? parOff +'px' : '100%';
if (/^top/.test(p)) overlay.style.top = offY +'px';
if (/^middle/.test(p)) hs.setStyles (overlay, {
top: '50%',
marginTop: (offY - Math.round(overlay.offsetHeight / 2)) +'px'
});
if (/^bottom/.test(p)) overlay.style.bottom = - offY +'px';
if (/^above$/.test(p)) {
hs.setStyles(overlay, {
left: (- this.x.p1 - this.x.cb) +'px',
right: (- this.x.p2 - this.x.cb) +'px',
bottom: '100%',
marginBottom: this.y.cb +'px',
width: 'auto'
});
this.y.p1 = overlay.offsetHeight;
} else if (/^below$/.test(p)) {
hs.setStyles(overlay, {
position: 'relative',
left: (- this.x.p1 - this.x.cb) +'px',
right: (- this.x.p2 - this.x.cb) +'px',
top: '100%',
marginTop: this.y.cb +'px',
width: 'auto'
});
this.y.p2 = overlay.offsetHeight;
overlay.style.position = 'absolute';
}
},
getOverlays : function() {
this.getInline(['heading', 'caption'], true);
this.getNumber();
if (this.caption) hs.fireEvent(this, 'onAfterGetCaption');
if (this.heading) hs.fireEvent(this, 'onAfterGetHeading');
if (this.heading && this.dragByHeading) this.heading.className += ' highslide-move';
if (hs.showCredits) this.writeCredits();
for (var i = 0; i < hs.overlays.length; i++) {
var o = hs.overlays[i], tId = o.thumbnailId, sg = o.slideshowGroup;
if ((!tId && !sg) || (tId && tId == this.thumbsUserSetId)
|| (sg && sg === this.slideshowGroup)) {
if (this.isImage || (this.isHtml && o.useOnHtml))
this.createOverlay(o);
}
}
var os = [];
for (var i = 0; i < this.overlays.length; i++) {
var o = hs.$('hsId'+ this.overlays[i]);
if (/panel$/.test(o.position)) this.positionOverlay(o);
else hs.push(os, o);
}
for (var i = 0; i < os.length; i++) this.positionOverlay(os[i]);
this.gotOverlays = true;
},
genOverlayBox : function() {
if (!this.overlayBox) this.overlayBox = hs.createElement (
'div', {
className: this.wrapperClassName
}, {
position : 'absolute',
width: (this.x.size || (this.useBox ? this.width : null)
|| this.x.full) +'px',
height: (this.y.size || this.y.full) +'px',
visibility : 'hidden',
overflow : 'hidden',
zIndex : hs.ie ? 4 : 'auto'
},
hs.container,
true
);
},
sizeOverlayBox : function(doWrapper, doPanels) {
var overlayBox = this.overlayBox,
x = this.x,
y = this.y;
hs.setStyles( overlayBox, {
width: x.size +'px',
height: y.size +'px'
});
if (doWrapper || doPanels) {
for (var i = 0; i < this.overlays.length; i++) {
var o = hs.$('hsId'+ this.overlays[i]);
var ie6 = (hs.ieLt7 || document.compatMode == 'BackCompat');
if (o && /^(above|below)$/.test(o.position)) {
if (ie6) {
o.style.width = (overlayBox.offsetWidth + 2 * x.cb
+ x.p1 + x.p2) +'px';
}
y[o.position == 'above' ? 'p1' : 'p2'] = o.offsetHeight;
}
if (o && ie6 && /^(left|right)panel$/.test(o.position)) {
o.style.height = (overlayBox.offsetHeight + 2* y.cb) +'px';
}
}
}
if (doWrapper) {
hs.setStyles(this.content, {
top: y.p1 +'px'
});
hs.setStyles(overlayBox, {
top: (y.p1 + y.cb) +'px'
});
}
},
showOverlays : function() {
var b = this.overlayBox;
b.className = '';
hs.setStyles(b, {
top: (this.y.p1 + this.y.cb) +'px',
left: (this.x.p1 + this.x.cb) +'px',
overflow : 'visible'
});
if (hs.safari) b.style.visibility = 'visible';
this.wrapper.appendChild (b);
for (var i = 0; i < this.overlays.length; i++) {
var o = hs.$('hsId'+ this.overlays[i]);
o.style.zIndex = o.zIndex || 4;
if (!o.hideOnMouseOut || this.mouseIsOver) {
o.style.visibility = 'visible';
hs.setStyles(o, { visibility: 'visible', display: '' });
hs.animate(o, { opacity: o.opacity }, o.dur);
}
}
},
destroyOverlays : function() {
if (!this.overlays.length) return;
if (this.slideshow) {
var c = this.slideshow.controls;
if (c && hs.getExpander(c) == this) c.parentNode.removeChild(c);
}
for (var i = 0; i < this.overlays.length; i++) {
var o = hs.$('hsId'+ this.overlays[i]);
if (o && o.parentNode == hs.viewport && hs.getExpander(o) == this) hs.discardElement(o);
}
if (this.isHtml && this.preserveContent) {
this.overlayBox.style.top = '-9999px';
hs.container.appendChild(this.overlayBox);
} else
hs.discardElement(this.overlayBox);
},
createFullExpand : function () {
if (this.slideshow && this.slideshow.controls) {
this.slideshow.enable('full-expand');
return;
}
this.fullExpandLabel = hs.createElement(
'a', {
href: 'javascript:hs.expanders['+ this.key +'].doFullExpand();',
title: hs.lang.fullExpandTitle,
className: 'highslide-full-expand'
}
);
if (!hs.fireEvent(this, 'onCreateFullExpand')) return;
this.createOverlay({
overlayId: this.fullExpandLabel,
position: hs.fullExpandPosition,
hideOnMouseOut: true,
opacity: hs.fullExpandOpacity
});
},
doFullExpand : function () {
try {
if (!hs.fireEvent(this, 'onDoFullExpand')) return;
if (this.fullExpandLabel) hs.discardElement(this.fullExpandLabel);
this.focus();
var xSize = this.x.size,
ySize = this.y.size;
this.resizeTo(this.x.full, this.y.full);
var xpos = this.x.pos - (this.x.size - xSize) / 2;
if (xpos < hs.marginLeft) xpos = hs.marginLeft;
var ypos = this.y.pos - (this.y.size - ySize) / 2;
if (ypos < hs.marginTop) ypos = hs.marginTop;
this.moveTo(xpos, ypos);
this.doShowHide('hidden');
} catch (e) {
this.error(e);
}
},
afterClose : function () {
this.a.className = this.a.className.replace('highslide-active-anchor', '');
this.doShowHide('visible');
if (this.isHtml && this.preserveContent
&& this.transitions[1] != 'crossfade') {
this.sleep();
} else {
if (this.outline && this.outlineWhileAnimating) this.outline.destroy();
hs.discardElement(this.wrapper);
}
if (hs.mask) hs.mask.style.display = 'none';
this.destroyOverlays();
if (!hs.viewport.childNodes.length) hs.viewport.style.display = 'none';
if (this.dimmingOpacity) hs.undim(this.key);
hs.fireEvent(this, 'onAfterClose');
hs.expanders[this.key] = null;
hs.reOrder();
}
};
// hs.Ajax object prototype
hs.Ajax = function (a, content, pre) {
this.a = a;
this.content = content;
this.pre = pre;
};
hs.Ajax.prototype = {
run : function () {
var xhr;
if (!this.src) this.src = hs.getSrc(this.a);
if (this.src.match('#')) {
var arr = this.src.split('#');
this.src = arr[0];
this.id = arr[1];
}
if (hs.cachedGets[this.src]) {
this.cachedGet = hs.cachedGets[this.src];
if (this.id) this.getElementContent();
else this.loadHTML();
return;
}
try { xhr = new XMLHttpRequest(); }
catch (e) {
try { xhr = new ActiveXObject("Msxml2.XMLHTTP"); }
catch (e) {
try { xhr = new ActiveXObject("Microsoft.XMLHTTP"); }
catch (e) { this.onError(); }
}
}
var pThis = this;
xhr.onreadystatechange = function() {
if(pThis.xhr.readyState == 4) {
if (pThis.id) pThis.getElementContent();
else pThis.loadHTML();
}
};
var src = this.src;
this.xhr = xhr;
if (hs.forceAjaxReload)
src = src.replace(/$/, (/\?/.test(src) ? '&' : '?') +'dummy='+ (new Date()).getTime());
xhr.open('GET', src, true);
xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xhr.send(null);
},
getElementContent : function() {
hs.init();
var attribs = window.opera || hs.ie6SSL ? { src: 'about:blank' } : null;
this.iframe = hs.createElement('iframe', attribs,
{ position: 'absolute', top: '-9999px' }, hs.container);
this.loadHTML();
},
loadHTML : function() {
var s = this.cachedGet || this.xhr.responseText,
regBody;
if (this.pre) hs.cachedGets[this.src] = s;
if (!hs.ie || hs.uaVersion >= 5.5) {
s = s.replace(new RegExp('<link[^>]*>', 'gi'), '')
.replace(new RegExp('<script[^>]*>.*?</script>', 'gi'), '');
if (this.iframe) {
var doc = this.iframe.contentDocument;
if (!doc && this.iframe.contentWindow) doc = this.iframe.contentWindow.document;
if (!doc) { // Opera
var pThis = this;
setTimeout(function() { pThis.loadHTML(); }, 25);
return;
}
doc.open();
doc.write(s);
doc.close();
try { s = doc.getElementById(this.id).innerHTML; } catch (e) {
try { s = this.iframe.document.getElementById(this.id).innerHTML; } catch (e) {} // opera
}
hs.discardElement(this.iframe);
} else {
regBody = /(<body[^>]*>|<\/body>)/ig;
if (regBody.test(s)) s = s.split(regBody)[hs.ieLt9 ? 1 : 2];
}
}
hs.getElementByClass(this.content, 'DIV', 'highslide-body').innerHTML = s;
this.onLoad();
for (var x in this) this[x] = null;
}
};
hs.Slideshow = function (expKey, options) {
if (hs.dynamicallyUpdateAnchors !== false) hs.updateAnchors();
this.expKey = expKey;
for (var x in options) this[x] = options[x];
if (this.useControls) this.getControls();
if (this.thumbstrip) this.thumbstrip = hs.Thumbstrip(this);
};
hs.Slideshow.prototype = {
getControls: function() {
this.controls = hs.createElement('div', { innerHTML: hs.replaceLang(hs.skin.controls) },
null, hs.container);
var buttons = ['play', 'pause', 'previous', 'next', 'move', 'full-expand', 'close'];
this.btn = {};
var pThis = this;
for (var i = 0; i < buttons.length; i++) {
this.btn[buttons[i]] = hs.getElementByClass(this.controls, 'li', 'highslide-'+ buttons[i]);
this.enable(buttons[i]);
}
this.btn.pause.style.display = 'none';
//this.disable('full-expand');
},
checkFirstAndLast: function() {
if (this.repeat || !this.controls) return;
var exp = hs.expanders[this.expKey],
cur = exp.getAnchorIndex(),
re = /disabled$/;
if (cur == 0)
this.disable('previous');
else if (re.test(this.btn.previous.getElementsByTagName('a')[0].className))
this.enable('previous');
if (cur + 1 == hs.anchors.groups[exp.slideshowGroup || 'none'].length) {
this.disable('next');
this.disable('play');
} else if (re.test(this.btn.next.getElementsByTagName('a')[0].className)) {
this.enable('next');
this.enable('play');
}
},
enable: function(btn) {
if (!this.btn) return;
var sls = this, a = this.btn[btn].getElementsByTagName('a')[0], re = /disabled$/;
a.onclick = function() {
sls[btn]();
return false;
};
if (re.test(a.className)) a.className = a.className.replace(re, '');
},
disable: function(btn) {
if (!this.btn) return;
var a = this.btn[btn].getElementsByTagName('a')[0];
a.onclick = function() { return false; };
if (!/disabled$/.test(a.className)) a.className += ' disabled';
},
hitSpace: function() {
if (this.autoplay) this.pause();
else this.play();
},
play: function(wait) {
if (this.btn) {
this.btn.play.style.display = 'none';
this.btn.pause.style.display = '';
}
this.autoplay = true;
if (!wait) hs.next(this.expKey);
},
pause: function() {
if (this.btn) {
this.btn.pause.style.display = 'none';
this.btn.play.style.display = '';
}
clearTimeout(this.autoplay);
this.autoplay = null;
},
previous: function() {
this.pause();
hs.previous(this.btn.previous);
},
next: function() {
this.pause();
hs.next(this.btn.next);
},
move: function() {},
'full-expand': function() {
hs.getExpander().doFullExpand();
},
close: function() {
hs.close(this.btn.close);
}
};
hs.Thumbstrip = function(slideshow) {
function add (exp) {
hs.extend(options || {}, {
overlayId: dom,
hsId: 'thumbstrip',
className: 'highslide-thumbstrip-'+ mode +'-overlay ' + (options.className || '')
});
if (hs.ieLt7) options.fade = 0;
exp.createOverlay(options);
hs.setStyles(dom.parentNode, { overflow: 'hidden' });
};
function scroll (delta) {
selectThumb(undefined, Math.round(delta * dom[isX ? 'offsetWidth' : 'offsetHeight'] * 0.7));
};
function selectThumb (i, scrollBy) {
if (i === undefined) for (var j = 0; j < group.length; j++) {
if (group[j] == hs.expanders[slideshow.expKey].a) {
i = j;
break;
}
}
if (i === undefined) return;
var as = dom.getElementsByTagName('a'),
active = as[i],
cell = active.parentNode,
left = isX ? 'Left' : 'Top',
right = isX ? 'Right' : 'Bottom',
width = isX ? 'Width' : 'Height',
offsetLeft = 'offset' + left,
offsetWidth = 'offset' + width,
overlayWidth = div.parentNode.parentNode[offsetWidth],
minTblPos = overlayWidth - table[offsetWidth],
curTblPos = parseInt(table.style[isX ? 'left' : 'top']) || 0,
tblPos = curTblPos,
mgnRight = 20;
if (scrollBy !== undefined) {
tblPos = curTblPos - scrollBy;
if (minTblPos > 0) minTblPos = 0;
if (tblPos > 0) tblPos = 0;
if (tblPos < minTblPos) tblPos = minTblPos;
} else {
for (var j = 0; j < as.length; j++) as[j].className = '';
active.className = 'highslide-active-anchor';
var activeLeft = i > 0 ? as[i - 1].parentNode[offsetLeft] : cell[offsetLeft],
activeRight = cell[offsetLeft] + cell[offsetWidth] +
(as[i + 1] ? as[i + 1].parentNode[offsetWidth] : 0);
if (activeRight > overlayWidth - curTblPos) tblPos = overlayWidth - activeRight;
else if (activeLeft < -curTblPos) tblPos = -activeLeft;
}
var markerPos = cell[offsetLeft] + (cell[offsetWidth] - marker[offsetWidth]) / 2 + tblPos;
hs.animate(table, isX ? { left: tblPos } : { top: tblPos }, null, 'easeOutQuad');
hs.animate(marker, isX ? { left: markerPos } : { top: markerPos }, null, 'easeOutQuad');
scrollUp.style.display = tblPos < 0 ? 'block' : 'none';
scrollDown.style.display = (tblPos > minTblPos) ? 'block' : 'none';
};
// initialize
var group = hs.anchors.groups[hs.expanders[slideshow.expKey].slideshowGroup || 'none'],
options = slideshow.thumbstrip,
mode = options.mode || 'horizontal',
floatMode = (mode == 'float'),
tree = floatMode ? ['div', 'ul', 'li', 'span'] : ['table', 'tbody', 'tr', 'td'],
isX = (mode == 'horizontal'),
dom = hs.createElement('div', {
className: 'highslide-thumbstrip highslide-thumbstrip-'+ mode,
innerHTML:
'<div class="highslide-thumbstrip-inner">'+
'<'+ tree[0] +'><'+ tree[1] +'></'+ tree[1] +'></'+ tree[0] +'></div>'+
'<div class="highslide-scroll-up"><div></div></div>'+
'<div class="highslide-scroll-down"><div></div></div>'+
'<div class="highslide-marker"><div></div></div>'
}, {
display: 'none'
}, hs.container),
domCh = dom.childNodes,
div = domCh[0],
scrollUp = domCh[1],
scrollDown = domCh[2],
marker = domCh[3],
table = div.firstChild,
tbody = dom.getElementsByTagName(tree[1])[0],
tr;
for (var i = 0; i < group.length; i++) {
if (i == 0 || !isX) tr = hs.createElement(tree[2], null, null, tbody);
(function(){
var a = group[i],
cell = hs.createElement(tree[3], null, null, tr),
pI = i;
hs.createElement('a', {
href: a.href,
title: a.title,
onclick: function() {
if (/highslide-active-anchor/.test(this.className)) return false;
hs.getExpander(this).focus();
return hs.transit(a);
},
innerHTML: hs.stripItemFormatter ? hs.stripItemFormatter(a) : a.innerHTML
}, null, cell);
})();
}
if (!floatMode) {
scrollUp.onclick = function () { scroll(-1); };
scrollDown.onclick = function() { scroll(1); };
hs.addEventListener(tbody, document.onmousewheel !== undefined ?
'mousewheel' : 'DOMMouseScroll', function(e) {
var delta = 0;
e = e || window.event;
if (e.wheelDelta) {
delta = e.wheelDelta/120;
if (hs.opera) delta = -delta;
} else if (e.detail) {
delta = -e.detail/3;
}
if (delta) scroll(-delta * 0.2);
if (e.preventDefault) e.preventDefault();
e.returnValue = false;
});
}
return {
add: add,
selectThumb: selectThumb
}
};
hs.langDefaults = hs.lang;
// history
var HsExpander = hs.Expander;
if (hs.ie && window == window.top) {
(function () {
try {
document.documentElement.doScroll('left');
} catch (e) {
setTimeout(arguments.callee, 50);
return;
}
hs.ready();
})();
}
hs.addEventListener(document, 'DOMContentLoaded', hs.ready);
hs.addEventListener(window, 'load', hs.ready);
// set handlers
hs.addEventListener(document, 'ready', function() {
if (hs.expandCursor || hs.dimmingOpacity) {
var style = hs.createElement('style', { type: 'text/css' }, null,
document.getElementsByTagName('HEAD')[0]),
backCompat = document.compatMode == 'BackCompat';
function addRule(sel, dec) {
if (hs.ie && (hs.uaVersion < 9 || backCompat)) {
var last = document.styleSheets[document.styleSheets.length - 1];
if (typeof(last.addRule) == "object") last.addRule(sel, dec);
} else {
style.appendChild(document.createTextNode(sel + " {" + dec + "}"));
}
}
function fix(prop) {
return 'expression( ( ( ignoreMe = document.documentElement.'+ prop +
' ? document.documentElement.'+ prop +' : document.body.'+ prop +' ) ) + \'px\' );';
}
if (hs.expandCursor) addRule ('.highslide img',
'cursor: url('+ hs.graphicsDir + hs.expandCursor +'), pointer !important;');
addRule ('.highslide-viewport-size',
hs.ie && (hs.uaVersion < 7 || backCompat) ?
'position: absolute; '+
'left:'+ fix('scrollLeft') +
'top:'+ fix('scrollTop') +
'width:'+ fix('clientWidth') +
'height:'+ fix('clientHeight') :
'position: fixed; width: 100%; height: 100%; left: 0; top: 0');
}
});
hs.addEventListener(window, 'resize', function() {
hs.getPageSize();
if (hs.viewport) for (var i = 0; i < hs.viewport.childNodes.length; i++) {
var node = hs.viewport.childNodes[i],
exp = hs.getExpander(node);
exp.positionOverlay(node);
if (node.hsId == 'thumbstrip') exp.slideshow.thumbstrip.selectThumb();
}
});
hs.addEventListener(document, 'mousemove', function(e) {
hs.mouse = { x: e.clientX, y: e.clientY };
});
hs.addEventListener(document, 'mousedown', hs.mouseClickHandler);
hs.addEventListener(document, 'mouseup', hs.mouseClickHandler);
hs.addEventListener(document, 'ready', hs.setClickEvents);
hs.addEventListener(window, 'load', hs.preloadImages);
hs.addEventListener(window, 'load', hs.preloadAjax);
}
| JavaScript |
// JScript File
NTTHAO.namespace("gridview");
NTTHAO.gridview.ontrmouseover = function() {
this.className = "rowover " + this.className;
};
NTTHAO.gridview.ontrmouseout = function() {
this.className = this.className.replace(/rowover /g, "");
};
NTTHAO.gridview.init = function(grid) {
var tbDataList = null;
if(grid && grid.length) {
tbDataList = document.getElementById(grid);
} else {
tbDataList = grid;
}
var index = 0;
for(var i = 0; i < tbDataList.rows.length; i++) {
if (tbDataList.rows[i].style.display.toLowerCase() != 'none') {
tbDataList.rows[i].setAttribute('class', index%2==0?'even':'odd');
index++;
}
}
var ieVersion = getIEVersionNumber();
if (ieVersion < 1 || ieVersion > 6) {
return;
}
var trDataRows = tbDataList.rows;
for(var i = 0; i < trDataRows.length; i++) {
var row = trDataRows[i];
YAHOO.util.Event.on(row, 'mouseover', NTTHAO.gridview.ontrmouseover);
YAHOO.util.Event.on(row, 'mouseout', NTTHAO.gridview.ontrmouseout);
}
}
YAHOO.util.Event.onDOMReady(function() {
var tbGrid = document.getElementById('tbGrid');
if (tbGrid != null) {
NTTHAO.gridview.init(tbGrid);
}
var tbInput = document.getElementById('tbInput');
if (tbInput != null) {
NTTHAO.gridview.init(tbInput);
}
}); | JavaScript |
function CheckFieldString(type, formField, strMsg)
{
var checkOK;
var checkStr = formField.value;
var allValid = true;
var flagDot = false;
var namestr, domainstr;
if (type == 'noblank')
{
if (checkStr == "")
{
return (strMsg + String.fromCharCode(10));
}
}
else
{
if (type == 'integer')
{
checkOK = "0123456789";
}
else if (type == 'decimal')
{
checkOK = "0123456789.";
}
else if (type == 'text')
{
checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ";
}
else if (type == 'alphanumeric')
{
checkOK = "0123456789.+-_#,/ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ()_";
}
else if (type == 'full')
{
checkOK = "0123456789.,[]{}=+-_#,/ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ()_:;'\\*^%$@<>?'";
}
else if (type == 'alphanum')
{
checkOK = "0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ";
}
else if (type == 'verificationcode')
{
checkOK = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
}
else if (type == 'email')
{
checkOK = "0123456789_-@.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
if ( /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,7})+$/.test(checkStr) )
{
}
else
{
return (strMsg + String.fromCharCode(10));
}
}
else if (type == 'phone')
{
checkOK = "0123456789-+";
}
else if (type == 'URL')
{
//checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789.:/\\";
var RegExp = /^(http|https|ftp)\:\/\/([a-zA-Z0-9\.\-]+(\:[a-zA-Z0-9\.&%\$\-]+)*@)*((25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])|([a-zA-Z0-9\-]+\.)*[a-zA-Z0-9\-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(\:[0-9]+)*(\/($|[a-zA-Z0-9\.\,\?\'\\\+&%\$#\=~_\-]+))*$/i;
if(RegExp.test(checkStr)){
return "";
}else{
return (strMsg + String.fromCharCode(10));
}
}
else if (type == 'path')
{
checkOK = "0123456789.+-_#,/ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz () \\ ";
}
else
{
return "Check Validation one of the mentioned validation type is wrong" + String.fromCharCode(10);
}
for (i = 0; i < checkStr.length; i++)
{
ch = checkStr.charAt(i);
for (j = 0; j < checkOK.length; j++)
{
if (ch == checkOK.charAt(j))
{
break;
}
if (j == checkOK.length-1)
{
allValid = false;
break;
}
}
if (!allValid)
{
return (strMsg + String.fromCharCode(10));
}
}
if (type == 'decimal') /* for decimal type */
{
for (t = 0; t < checkStr.length; t++)
{
dot = checkStr.charAt(t);
if (dot == '.' && flagDot == false)
{
flagDot = true;
}
else if (dot =='.' && flagDot == true)
{
return (strMsg + String.fromCharCode(10));
}
}
}
}
return "";
} | JavaScript |
/*
Copyright (c) 2008, ThaoNguyen. All rights reserved.
*/
/**
* The NTTHAO form validator is a generic validator for form submit event.
* @module formValidator
* @namespace NTTHAO.formValidator
*/
NTTHAO.formValidator = NTTHAO.formValidator || {};
NTTHAO.formValidator.validatorList = new Array();
NTTHAO.formValidator.onFormSubmit = function() {
var validateResult = true;
var arr = NTTHAO.formValidator.validatorList;
for (i = 0; i < arr.length; i++) {
try {
var val = {};
var args = {};
var objValidate = arr[i];
val.controltovalidate = objValidate.ctrlToValidate;
args.IsValid = true;
var func = objValidate.validateFunction;
func.apply(val.controltovalidate, [val, args]);
if (args.IsValid) {
NTTHAO.util.getElement(objValidate.ctrlToDisplayMessage).style.visibility = "hidden";
NTTHAO.util.getElement(objValidate.ctrlToDisplayMessage).style.display = "none";
} else {
NTTHAO.util.getElement(objValidate.ctrlToDisplayMessage).style.visibility = "";
NTTHAO.util.getElement(objValidate.ctrlToDisplayMessage).style.display = "inline";
if (validateResult) {
NTTHAO.util.getElement(objValidate.ctrlToValidate).focus();
NTTHAO.util.getElement(objValidate.ctrlToValidate).select()
}
validateResult = false;
}
} catch (ex) {
}
}
return validateResult;
}
NTTHAO.formValidator.validate = function(form, input, validate, func) {
try {
form.onsubmit = NTTHAO.formValidator.onFormSubmit;
var ctrlToDisplayMessage = NTTHAO.util.getElement(validate);
ctrlToDisplayMessage.style.visibility = "hidden";
var obj = {};
obj.ctrlToValidate = input;
obj.ctrlToDisplayMessage = validate;
obj.validateFunction = func;
NTTHAO.formValidator.validatorList[NTTHAO.formValidator.validatorList.length] = obj;
} catch (ex) {}
}
| JavaScript |
if (typeof NTTHAO == "undefined" || !NTTHAO) {
/**
* The NTTHAO global namespace object. If NTTHAO is already defined, the
* existing NTTHAO object will not be overwritten so that defined
* namespaces are preserved.
* @class NTTHAO
* @static
*/
var NTTHAO = {};
}
/**
* Returns the namespace specified and creates it if it doesn't exist
* <pre>
* NTTHAO.namespace("property.package");
* NTTHAO.namespace("NTTHAO.property.package");
* </pre>
* Either of the above would create NTTHAO.property, then
* NTTHAO.property.package
*
* Be careful when naming packages. Reserved words may work in some browsers
* and not others. For instance, the following will fail in Safari:
* <pre>
* NTTHAO.namespace("really.long.nested.namespace");
* </pre>
* This fails because "long" is a future reserved word in ECMAScript
*
* @method namespace
* @static
* @param {String*} arguments 1-n namespaces to create
* @return {Object} A reference to the last namespace object created
*/
NTTHAO.namespace = function() {
var a=arguments, o=null, i, j, d;
for (i=0; i<a.length; i=i+1) {
d=a[i].split(".");
o=NTTHAO;
// NTTHAO is implied, so it is ignored if it is included
for (j=(d[0] == "NTTHAO") ? 1 : 0; j<d.length; j=j+1) {
o[d[j]]=o[d[j]] || {};
o=o[d[j]];
}
}
return o;
};
/**
* namespace NTTHAO.util
*/
NTTHAO.namespace('util');
NTTHAO.util.getElement = function(el) {
if(!YAHOO.lang.isObject(el)) {
return document.getElementById(el);
}
return el;
}
NTTHAO.util.getAbsoluteXY = function(el) {
if(!YAHOO.lang.isObject(el)) {
el = document.getElementById(el);
}
if(el == null) {
return null;
}
var yPos = el.offsetTop;
var xPos = el.offsetLeft;
var tempEl = el.offsetParent;
while (tempEl != null) {
xPos += tempEl.offsetLeft;
yPos += tempEl.offsetTop;
tempEl = tempEl.offsetParent;
}
return [xPos, yPos];
}
NTTHAO.util.isImageFile = function(filename) {
var fileEx = (/[.]/.exec(filename)) ? /[^.]+$/.exec(filename)[0] : null;
return (fileEx != null) && (".jpg .jpeg .jpe .png .gif .bmp ".indexOf('.'+fileEx.toLowerCase()+' ') >= 0);
} | JavaScript |
function keepSessionAlive() {
var oFrame=document.createElement("iframe");
oFrame.setAttribute('height', '0');
oFrame.setAttribute('width', '0');
oFrame.setAttribute('src', '/admin/RefreshSessionState.aspx');
oFrame.setAttribute('frameborder', '0');
document.body.appendChild(oFrame);
}
window.onload=keepSessionAlive; | JavaScript |
/*
Copyright (c) 2008, ThaoNguyen. All rights reserved.
*/
/**
* The NTTHAO validator is a generic validator.
* @module validator
* @namespace NTTHAO.validator
*/
NTTHAO.validator = NTTHAO.validator || { };
//NTTHAO.namespace("validator");
/*
Check input field
@Params:
1. type: name (in string) of validation type
2. formField: control to check
@Return: true or false
@Note: "type" is one of these (case-sensitive):
noblank,
integer,
decimal,
text,
alphanumeric,
full,
alphanum,
verificationcode,
email,
phone,
URL,
path,
image
*/
NTTHAO.validator.checkField = function(type, formField) {
var checkOK;
var checkStr = formField.value;
var allValid = true;
var flagDot = false;
var namestr, domainstr;
if (type == 'noblank')
{
if (checkStr == "")
{
return false;
}
var i = 0;
for(i = 0; i < checkStr.length; i++) {
if ((checkStr.charAt(i) != ' ')
&& (checkStr.charAt(i) != "\t")
&& (checkStr.charAt(i) != "\n")
&&(checkStr.charAt(i) != "\r")) {
break;
}
}
if (i == checkStr.length)
{
return false;
}
}
else
{
if (type == 'integer')
{
checkOK = "0123456789+-";
if(checkStr.length > 0)
{
if (!( /^[-+]?\b\d+\b$/.test(checkStr) ))
{
return false;
}
}
}
else if (type == 'decimal')
{
checkOK = "0123456789.+-";
if(checkStr.length > 0)
{
if (!( /^[-+]?((\b[0-9]+)?\.)?[0-9]+\b$/.test(checkStr) ))
{
return false;
}
}
}
else if (type == 'text')
{
checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ";
}
else if (type == 'alphanumeric')
{
checkOK = "0123456789.+-_#,/ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ()_";
}
else if (type == 'full')
{
checkOK = "0123456789.,[]{}=+-_#,/ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ()_:;'\\*^%$@<>?'";
}
else if (type == 'alphanum')
{
checkOK = "0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ";
}
else if (type == 'verificationcode')
{
checkOK = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
}
else if (type == 'email')
{
checkOK = "0123456789_-@.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
if(checkStr.length > 0)
{
if (!( /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,7})+$/.test(checkStr) ))
{
return false;
}
}
}
else if (type == 'phone')
{
checkOK = "0123456789-+";
}
else if (type == 'URL')
{
//checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789.:/\\";
var RegExp = /^(http|https|ftp)\:\/\/([a-zA-Z0-9\.\-]+(\:[a-zA-Z0-9\.&%\$\-]+)*@)*((25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])|([a-zA-Z0-9\-]+\.)*[a-zA-Z0-9\-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(\:[0-9]+)*(\/($|[a-zA-Z0-9\.\,\?\'\\\+&%\$#\=~_\-]+))*$/i;
if(RegExp.test(checkStr)){
return "";
}else{
return (strMsg + String.fromCharCode(10));
}
}
else if (type == 'path')
{
checkOK = "0123456789.+-_#,/ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz () \\ ";
}
else if (type == 'image')
{
if (checkStr == "")
return true;
if (checkStr.lastIndexOf('.') < 0)
return false;
var imgEx = checkStr.substring(checkStr.lastIndexOf('.')).toLowerCase();
return (
(imgEx == '.png')
|| (imgEx == '.jpg')
|| (imgEx == '.jpeg')
|| (imgEx == '.jpe')
|| (imgEx == '.gif')
|| (imgEx == '.bmp')
|| (imgEx == '.tiff')
);
}
else
{
return false;// "Check Validation one of the mentioned validation type is wrong";
}
for (i = 0; i < checkStr.length; i++)
{
ch = checkStr.charAt(i);
for (j = 0; j < checkOK.length; j++)
{
if (ch == checkOK.charAt(j))
{
break;
}
if (j == checkOK.length-1)
{
allValid = false;
break;
}
}
if (!allValid)
{
return false;
}
}
if (type == 'decimal') {/* for decimal type */
for (t = 0; t < checkStr.length; t++)
{
dot = checkStr.charAt(t);
if (dot == '.' && flagDot == false)
{
flagDot = true;
}
else if (dot =='.' && flagDot == true)
{
return false;
}
}
}
}
return true;
}
NTTHAO.validator.validate = function(val, args, type) {
if(val) {
var ctrlToValidate = document.all ? document.all[val.controltovalidate] : document.getElementById(val.controltovalidate);
if(args)
args.IsValid = NTTHAO.validator.checkField(type, ctrlToValidate);
}
}
NTTHAO.validator.validateWithNoBlank = function(val, args, type) {
NTTHAO.validator.validate(val, args, 'noblank');
if(args.IsValid) {
NTTHAO.validator.validate(val, args, type);
}
}
NTTHAO.validator.sameAs = function(val, args) {
if(val) {
var ctrlToValidate = document.all ? document.all[val.controltovalidate] : document.getElementById(val.controltovalidate);
var ctrlSameAs = document.getElementById(ctrlToValidate.getAttribute('sameas'));
if(args && ctrlSameAs) {
args.IsValid = (ctrlToValidate.value == ctrlSameAs.value);
}
}
}
NTTHAO.validator.minMaxLengthRequired = function(val, args) {
if(val) {
var ctrlToValidate = document.all ? document.all[val.controltovalidate] : document.getElementById(val.controltovalidate);
var minlength = ctrlToValidate.getAttribute('minlength');
var maxlength = ctrlToValidate.getAttribute('maxlength');
if(args && minlength && maxlength) {
try{
minlength = parseInt(minlength, 10);
maxlength = parseInt(maxlength, 10);
var valueLength = ctrlToValidate.value.trim().length;
args.IsValid = ((valueLength >= minlength) && (valueLength <= maxlength));
}catch(o){}
}
}
}
NTTHAO.validator.noBlank = function(val, args) {
NTTHAO.validator.validate(val, args, 'noblank');
}
NTTHAO.validator.isInteger = function(val, args) {
NTTHAO.validator.validate(val, args, 'integer');
}
NTTHAO.validator.isPositiveInteger = function(val, args) {
NTTHAO.validator.validate(val, args, 'integer');
if (args.IsValid) {
var ctrlToValidate = document.all ? document.all[val.controltovalidate] : document.getElementById(val.controltovalidate);
if (NTTHAO.validator.checkField('noblank', ctrlToValidate)) {
args.IsValid = (parseInt(ctrlToValidate.value, 10) > 0);
}
}
}
NTTHAO.validator.isNegativeInteger = function(val, args) {
NTTHAO.validator.validate(val, args, 'integer');
if (args.IsValid) {
var ctrlToValidate = document.all ? document.all[val.controltovalidate] : document.getElementById(val.controltovalidate);
if (NTTHAO.validator.checkField('noblank', ctrlToValidate)) {
args.IsValid = (parseInt(ctrlToValidate.value, 10) < 0);
}
}
}
NTTHAO.validator.isNaturalNumber = function(val, args) {
NTTHAO.validator.validate(val, args, 'integer');
if (args.IsValid) {
var ctrlToValidate = document.all ? document.all[val.controltovalidate] : document.getElementById(val.controltovalidate);
if (NTTHAO.validator.checkField('noblank', ctrlToValidate)) {
args.IsValid = (parseInt(ctrlToValidate.value, 10) >= 0);
}
}
}
NTTHAO.validator.isNaturalNumberVN = function(val, args) {
var ctrlToValidate = document.all ? document.all[val.controltovalidate] : document.getElementById(val.controltovalidate);
var rawValue = ctrlToValidate.value;
ctrlToValidate.value = ctrlToValidate.value.replace(/\./gi, '').replace(/,/gi, '.');
NTTHAO.validator.validate(val, args, 'integer');
if (args.IsValid) {
if (NTTHAO.validator.checkField('noblank', ctrlToValidate)) {
args.IsValid = (parseInt(ctrlToValidate.value, 10) >= 0);
}
}
ctrlToValidate.value = rawValue;
}
NTTHAO.validator.isDecimal = function(val, args) {
NTTHAO.validator.validate(val, args, 'decimal');
}
NTTHAO.validator.isPositiveDecimal = function(val, args) {
NTTHAO.validator.validate(val, args, 'decimal');
if (args.IsValid) {
var ctrlToValidate = document.all ? document.all[val.controltovalidate] : document.getElementById(val.controltovalidate);
if (NTTHAO.validator.checkField('noblank', ctrlToValidate)) {
args.IsValid = (parseFloat(ctrlToValidate.value) > 0);
}
}
}
NTTHAO.validator.isNegativeDecimal = function(val, args) {
NTTHAO.validator.validate(val, args, 'decimal');
if (args.IsValid) {
var ctrlToValidate = document.all ? document.all[val.controltovalidate] : document.getElementById(val.controltovalidate);
if (NTTHAO.validator.checkField('noblank', ctrlToValidate)) {
args.IsValid = (parseFloat(ctrlToValidate.value) < 0);
}
}
}
NTTHAO.validator.isText = function(val, args) {
NTTHAO.validator.validate(val, args, 'text');
}
NTTHAO.validator.isAlphanumeric = function(val, args) {
NTTHAO.validator.validate(val, args, 'alphanumeric');
}
NTTHAO.validator.isAlphanum = function(val, args) {
NTTHAO.validator.validate(val, args, 'alphanum');
}
NTTHAO.validator.isVerificationCode = function(val, args) {
NTTHAO.validator.validate(val, args, 'verificationcode');
}
NTTHAO.validator.isEmail = function(val, args) {
NTTHAO.validator.validate(val, args, 'email');
}
NTTHAO.validator.isPhone = function(val, args) {
NTTHAO.validator.validate(val, args, 'phone');
}
NTTHAO.validator.isURL = function(val, args) {
NTTHAO.validator.validate(val, args, 'URL');
}
NTTHAO.validator.isPath = function(val, args) {
NTTHAO.validator.validate(val, args, 'path');
}
NTTHAO.validator.isImageFile = function(val, args) {
NTTHAO.validator.validate(val, args, 'image');
}
NTTHAO.validator.isIntegerRequired = function(val, args) {
NTTHAO.validator.validateWithNoBlank(val, args, 'integer');
}
NTTHAO.validator.isPositiveIntegerRequired = function(val, args) {
NTTHAO.validator.validateWithNoBlank(val, args, 'integer');
if (args.IsValid) {
var ctrlToValidate = document.all ? document.all[val.controltovalidate] : document.getElementById(val.controltovalidate);
args.IsValid = (parseInt(ctrlToValidate.value, 10) > 0);
}
}
NTTHAO.validator.isNegativeIntegerRequired = function(val, args) {
NTTHAO.validator.validateWithNoBlank(val, args, 'integer');
if (args.IsValid) {
var ctrlToValidate = document.all ? document.all[val.controltovalidate] : document.getElementById(val.controltovalidate);
args.IsValid = (parseInt(ctrlToValidate.value, 10) < 0);
}
}
NTTHAO.validator.isNaturalNumberRequired = function(val, args) {
NTTHAO.validator.validateWithNoBlank(val, args, 'integer');
if (args.IsValid) {
var ctrlToValidate = document.all ? document.all[val.controltovalidate] : document.getElementById(val.controltovalidate);
args.IsValid = (parseInt(ctrlToValidate.value, 10) >= 0);
}
}
NTTHAO.validator.isNaturalNumberVNRequired = function(val, args) {
var ctrlToValidate = document.all ? document.all[val.controltovalidate] : document.getElementById(val.controltovalidate);
var rawValue = ctrlToValidate.value;
ctrlToValidate.value = ctrlToValidate.value.replace(/\./gi, '').replace(/,/gi, '.');
NTTHAO.validator.validateWithNoBlank(val, args, 'integer');
if (args.IsValid) {
args.IsValid = (parseInt(ctrlToValidate.value, 10) >= 0);
}
ctrlToValidate.value = rawValue;
}
NTTHAO.validator.isDecimalRequired = function(val, args) {
NTTHAO.validator.validateWithNoBlank(val, args, 'decimal');
}
NTTHAO.validator.isPositiveDecimalRequired = function(val, args) {
NTTHAO.validator.validateWithNoBlank(val, args, 'decimal');
if (args.IsValid) {
var ctrlToValidate = document.all ? document.all[val.controltovalidate] : document.getElementById(val.controltovalidate);
args.IsValid = (parseFloat(ctrlToValidate.value) > 0);
}
}
NTTHAO.validator.isNegativeDecimalRequired = function(val, args) {
NTTHAO.validator.validateWithNoBlank(val, args, 'decimal');
if (args.IsValid) {
var ctrlToValidate = document.all ? document.all[val.controltovalidate] : document.getElementById(val.controltovalidate);
args.IsValid = (parseFloat(ctrlToValidate.value) < 0);
}
}
NTTHAO.validator.isTextRequired = function(val, args) {
NTTHAO.validator.validateWithNoBlank(val, args, 'text');
}
NTTHAO.validator.isAlphanumericRequired = function(val, args) {
NTTHAO.validator.validateWithNoBlank(val, args, 'alphanumeric');
}
NTTHAO.validator.isAlphanumRequired = function(val, args) {
NTTHAO.validator.validateWithNoBlank(val, args, 'alphanum');
}
NTTHAO.validator.isVerificationCodeRequired = function(val, args) {
NTTHAO.validator.validateWithNoBlank(val, args, 'verificationcode');
}
NTTHAO.validator.isEmailRequired = function(val, args) {
NTTHAO.validator.validateWithNoBlank(val, args, 'email');
}
NTTHAO.validator.isPhoneRequired = function(val, args) {
NTTHAO.validator.validateWithNoBlank(val, args, 'phone');
}
NTTHAO.validator.isURLRequired = function(val, args) {
NTTHAO.validator.validateWithNoBlank(val, args, 'URL');
}
NTTHAO.validator.isPathRequired = function(val, args) {
NTTHAO.validator.validateWithNoBlank(val, args, 'path');
}
NTTHAO.validator.validateMe = function() {
// Clean Up Infragistics Ids
var cleanid = this.id.replace(/^igtxt/i,"");
for (var i = 0; i < Page_Validators.length; i++) {
if (Page_Validators[i].controltovalidate === cleanid) {
ValidatorValidate(Page_Validators[i]);
}
}
} | JavaScript |
///////////////////////////////////////////////////////
// Library for version 1.0
// langxangvn <langxangvn@gmail.com>
///////////////////////////////////////////////////////
/**
* Modifier name: Đặng Anh Vũ <langxangvn@gmail.com>
* Modifier ID 000
* Date 1/4/2007
* Reason bản đầu tiên
*/
/**
* Modifier name: Đặng Anh Vũ <langxangvn@gmail.com>
* Modifier ID 001
* Date 28/4/2007
* Reason Cac ham va chuc nang coordinate
*/
//---------------------------------------
// show/hide table row - langxangvn VinaCyber JSC 10/2006
//---------------------------------------
function showTableRow(idRow, bVisibility)
{
if(navigator.appName.indexOf("Microsoft") > -1)
{
// neu la IE thi visibility la block
var canSee = 'block';
}
else
{
// FF table-row
var canSee = 'table-row';
}
if (document.getElementById && document.createTextNode)
{
var tr = document.getElementById(idRow);
if (tr)
{
if(bVisibility == "true")
{
// block for IE
// table-row for FF
tr.style.display = canSee;
}
else if(bVisibility == "false")
{
tr.style.display = 'none';
}
}
}
}
function isLegal(szCheck, szInvalid)
{
// szInvalid cac ky tu dac biet
for(var i = 0; i < szInvalid.length; i ++)
{
// co ky tu dac biet trong chuoi can check
if(szCheck.indexOf(szInvalid.charAt(i)) >= 0 )
{
return false;
}
}
return true;
}
function LTrim(iStr)
{
if(!iStr)
return iStr;
else
iStr = iStr.toString();
while (iStr.charCodeAt(0) <= 32)
{
iStr = iStr.substr(1);
}
return iStr;
}
function RTrim(iStr)
{
if(!iStr)
return iStr;
else
iStr = iStr.toString();
while (iStr.charCodeAt(iStr.length - 1) <= 32)
{
iStr = iStr.substr(0, iStr.length - 1);
}
return iStr;
}
function Trim(iStr)
{
if(!iStr)
return iStr;
else
iStr = iStr.toString();
while (iStr.charCodeAt(0) <= 32)
{
iStr = iStr.substr(1);
}
while (iStr.charCodeAt(iStr.length - 1) <= 32)
{
iStr = iStr.substr(0, iStr.length - 1);
}
return iStr;
}
function Left(str, n)
{
if(!str)
return str;
else
str = str.toString();
if (n <= 0)
return "";
else if (n > String(str).length)
return str;
else
return String(str).substring(0, n);
}
function Right(str, n)
{
if(!str)
return str;
else
str = str.toString();
if (n <= 0)
return "";
else if (n > String(str).length)
return str;
else
{
var iLen = String(str).length;
return String(str).substring(iLen, iLen - n);
}
}
/*
Author: Matt Kruse <matt@mattkruse.com>
http://www.mattkruse.com/
*/
function isBlank(val) {
if(!val) {
return true;
}
for(var i = 0;i < val.length;i ++) {
if ((val.charAt(i) != ' ')
&& (val.charAt(i) != "\t")
&& (val.charAt(i) != "\n")
&&(val.charAt(i) != "\r")) {
return false;
}
}
return true;
}
function isInteger(val) {
if (isBlank(val)) {
return false;
}
for(var i = 0; i < val.length; i++) {
if(!isDigit(val.charAt(i))) {
return false;
}
}
return true;
}
function isNumeric(val) {
return(parseFloat(val, 10) == (val*1));
}
function isArray(obj) {
return(typeof(obj.length) == "undefined") ? false : true;
}
function isDigit(num) {
if (num.length > 1) {
return false;
}
var string="1234567890";
if (string.indexOf(num) != -1) {
return true;
}
return false;
}
function setNullIfBlank(obj) {
if(isBlank(obj.value)) {
obj.value = "";
}
}
function setFieldsToUpperCase() {
for(var i = 0;i < arguments.length; i++) {
arguments[i].value = arguments[i].value.toUpperCase();
}
}
/* end JavascriptToolbox http://www.mattkruse.com/javascript */
function isLeapYear(year) {
if(!isInteger(year))
return false;
return (year % 4 == 0 && year % 100 != 0) || (year % 400 == 0);
}
function isDate(datestring) {
var regex = /\b(0?[1-9]|[12][0-9]|3[01])[-\/.\\/](0?[1-9]|1[012])[-\/.\\/]((19|20)?[0-9]{2})\b/;
var match = regex.exec(datestring);
if(!match) {
return false;
}
else {
var day = parseInt(match[1]);
var month = parseInt(match[2]);
var year = parseInt(match[3]);
if(year < 100)
year = year + 2000;
if ((month == 4 || month == 6 || month == 9 || month == 11) && day == 31) {
return false;
}
if (month == 2) {
if (day > 29 || (day == 29 && !isLeapYear(year))) {
return false;
}
}
return true;
}
}
function isDateBefore(src, dst) {
var srcDate, dstDate;
var year, month, day;
var regex = /\b(0?[1-9]|[12][0-9]|3[01])[-\/.\\/](0?[1-9]|1[012])[-\/.\\/]((19|20)?[0-9]{2})\b/;
var match = regex.exec(src);
if(!match) {
return -1;
} else {
day = parseInt(match[1]);
month = parseInt(match[2]);
year = parseInt(match[3]);
if(year < 100)
year = year + 2000;
srcDate = new Date(year, month - 1, day);
}
match = regex.exec(dst);
if(!match) {
return -1;
} else {
day = parseInt(match[1]);
month = parseInt(match[2]);
year = parseInt(match[3]);
if(year < 100)
year = year + 2000;
dstDate = new Date(year, month - 1, day);
}
return (srcDate - dstDate) > 0 ? false : true;
}
function getSelectedOptionLabel(objSelect)
{
if(objSelect) {
arOptions = objSelect.getElementsByTagName("option");
for(var i = 0; i < arOptions.length; i++) {
if(arOptions[i].selected) {
return arOptions[i].label;
}
}
}
return '';
}
function getSelectedOptionInnerHTML(objSelect)
{
if(objSelect)
{
arOptions = objSelect.getElementsByTagName("option");
for(var i = 0; i < arOptions.length; i++)
{
if(arOptions[i].selected)
{
return arOptions[i].innerHTML;
}
}
}
return '';
}
function getEnter(field, event)
{
var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
if (keyCode == 13)
{
return true;
}
else
return false;
}
function getEscape(field, event)
{
var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
if (keyCode == 27)
{
return true;
}
else
return false;
}
function raiseKeyEvent(keyCode, objTarget)
{
var fireOn = document.getElementById(objTarget);
// Neu co createEvent
if(document.createEvent)
{
// Neu co KeyEvent (FireFox)
if(window.KeyEvent)
{
var evObj = document.createEvent('KeyEvents');
evObj.initKeyEvent('keypress', true, true, window, false, false, false, false, keyCode, 0);
}
// Khong ho tro KeyEvent, dung UIEvent thay the
else
{
var evObj = document.createEvent('UIEvents');
evObj.initUIEvent('keypress', true, true, window, 1);
evObj.keyCode = keyCode;
}
fireOn.dispatchEvent(evObj);
}
// Neu co createEventObject (IE dung fireEvent)
else if(document.createEventObject)
{
var evObj = document.createEventObject();
evObj.ctrlKey = false;
evObj.altKey = false;
evObj.shiftKey = false;
evObj.keyCode = keyCode;
fireOn.fireEvent('onkeypress', evObj);
}
}
function raiseEnterEvent(objTarget)
{
raiseKeyEvent(13, objTarget);
}
var glErrorCount = 0;
var glErrorMsg = new Array();
var glHasFocus = false;
glErrorMsg[0] = "---- The following errors occured ----" + String.fromCharCode(10);
function checkField(type, field, message)
{
var fieldvalue = Trim(field.value);
var bAllValid = true;
var bFlagDot = false;
// Blank error
if (type == 'noblank')
{
if (fieldvalue == "")
{
glErrorCount ++;
glErrorMsg[glErrorCount] = message + String.fromCharCode(10);
if(glHasFocus == false)
{
glHasFocus = true;
field.focus();
}
}
}
// Kiem tra dien chi email
else if(type == 'email')
{
if(!isEmail(fieldvalue))
{
glErrorCount ++;
glErrorMsg[glErrorCount] = message + String.fromCharCode(10);
if(glHasFocus == false)
{
glHasFocus = true;
field.focus();
}
}
}
else if(type == 'username')
{
/* ^(([A-Za-z\d][A-Za-z\d_]+[a-zA-Z\d])|([a-zA-Z\d]+))$ */
// neu co underscore thi khong nam dau hay cuoi username
if (!fieldvalue.match(/^(([A-Za-z\d][A-Za-z\d_]+[a-zA-Z\d])|([a-zA-Z\d]+))$/))
{
glErrorCount ++;
glErrorMsg[glErrorCount] = message + String.fromCharCode(10);
if(glHasFocus == false)
{
glHasFocus = true;
field.focus();
}
}
}
else if(type == 'captcha')
{
/* ^[A-Z0-9]{5}$ */
if (!fieldvalue.match(/^[a-zA-Z0-9]{5}$/))
{
glErrorCount ++;
glErrorMsg[glErrorCount] = message + String.fromCharCode(10);
if(glHasFocus == false)
{
glHasFocus = true;
field.focus();
}
}
}
else if(type == 'mobile')
{
/* ^((\(\+?\d{1,3}\))|(\+?\d{1,3}))*[.-\s]?\d{4}[.-\s]?\d+$ */
/* part 1: match (code) (+code) +code code voi code tu 1 den 3 so */
/* co hay khong co phan cach space - hay . */
/* tiep theo 4 chu so */
/* co hay khong co phan cach space - hay . */
if (!fieldvalue.match(/^((\(\+?84\)[\-\.\s]?)|(\+?84[\-\.\s]?)|(0))((9\d{2}[\-\.\s]?\d{6})|(9\d{1}[\-\.\s]?\d{7}))$/))
{
glErrorCount ++;
glErrorMsg[glErrorCount] = message + String.fromCharCode(10);
if(glHasFocus == false)
{
glHasFocus = true;
field.focus();
}
}
}
else if(type == 'phone')
{
if (!fieldvalue.match(/^((\(\d{2,4}\)[\-\.\s]?)|(\d{2,4}[\-\.\s]?))?(\d{3}[\-\.\s]?\d{3,4})$/))
{
glErrorCount ++;
glErrorMsg[glErrorCount] = message + String.fromCharCode(10);
if(glHasFocus == false)
{
glHasFocus = true;
field.focus();
}
}
}
else
{
}
}
function isEmail(email)
{
if(email.match(/^([a-z0-9+_]|\-|\.)+@(([a-z0-9_]|\-)+\.)+[a-z]{2,6}$/))
return true;
return false;
}
/*
Original code from www.yahoo.com
- Netscape Navigator 4.x (ns4): The most important test - NS4 does
almost everything differently to the other browsers.
- Opera 5 (op5): Opera 5 lacks some of the functions that other browsers have.
These include not being able to change an elements background colour and style class.
Opera 5 also chokes when sizes and co-ordinates are set using the "px" suffix.
- Opera 6 (op6): Opera 6 only lacks the ability to change an elements style class.
- MSIE on the Mac (mac_ie): The problem with MSIE on the Mac is when you try to get
the top co-ordinate of a table cell element. It incorrectly returns the top co-ordinate
of the table element, not the table cell. To get round this, you have to base positioning
on table row elements instead. Konqueror on Linux seems to have the opposite problem which adds to the fun.
*/
function sniffBrowsers() {
d = document;
this.agt = navigator.userAgent.toLowerCase();
this.major = parseInt(navigator.appVersion);
this.dom = (d.getElementById) ? 1 : 0; // true for ie6, ns6
this.ns = (d.layers);
this.ns4up = (this.ns && this.major >= 4);
this.ns6 = (this.dom&&navigator.appName == "Netscape");
this.op = (window.opera ? 1 : 0);
this.op5 = (navigator.userAgent.indexOf("Opera 5") != -1) || (navigator.userAgent.indexOf("Opera/5") != -1);
this.op6 = (navigator.userAgent.indexOf("Opera 6") != -1) || (navigator.userAgent.indexOf("Opera/6") != -1);
this.ie = (d.all);
this.ie4 = (d.all && !this.dom) ? 1 : 0;
this.ie4up = (this.ie && this.major >= 4);
this.ie5 = (d.all && this.dom);
this.win = ((this.agt.indexOf("win") != -1) || (this.agt.indexOf("16bit") != -1));
this.mac = (this.agt.indexOf("mac") != -1);
}
var objBrowser = new sniffBrowsers();
/* end determine browser */
function getStyleObject(objectId) {
if(document.getElementById && document.getElementById(objectId)) {
return document.getElementById(objectId).style;
} else if (document.all && document.all(objectId)) {
return document.all(objectId).style;
} else if (document.layers && document.layers[objectId]) {
return getObjNN4(document,objectId);
} else {
return false;
}
}
function changeObjectVisibility(objectId, newVisibility) {
var styleObject = getStyleObject(objectId, document);
if(styleObject) {
styleObject.visibility = newVisibility;
return true;
} else {
return false;
}
}
function findImage(name, doc) {
var i, img;
for (i = 0; i < doc.images.length; i++) {
if (doc.images[i].name == name) {
return doc.images[i];
}
}
for (i = 0; i < doc.layers.length; i++) {
if ((img = findImage(name, doc.layers[i].document)) != null) {
img.container = doc.layers[i];
return img;
}
}
return null;
}
function getImage(name) {
if (document.layers) {
return findImage(name, document);
}
return null;
}
function getObjNN4(obj,name)
{
var x = obj.layers;
var foundLayer;
for (var i=0;i<x.length;i++)
{
if (x[i].id == name)
foundLayer = x[i];
else if (x[i].layers.length)
var tmp = getObjNN4(x[i],name);
if (tmp) foundLayer = tmp;
}
return foundLayer;
}
function getElementHeight(element) {
if (objBrowser.ns4) {
var elem = getObjNN4(document, element);
return elem.clip.height;
} else {
var elem;
if(document.getElementById) {
var elem = document.getElementById(element);
} else if (document.all){
var elem = document.all[element];
}
if (objBrowser.op5) {
xPos = elem.style.pixelHeight;
} else {
xPos = elem.offsetHeight;
}
return xPos;
}
}
function getElementWidth(element) {
if (objBrowser.ns4) {
var elem = getObjNN4(document, element);
return elem.clip.width;
} else {
var elem;
if(document.getElementById) {
var elem = document.getElementById(element);
} else if (document.all){
var elem = document.all[element];
}
if (objBrowser.op5) {
xPos = elem.style.pixelWidth;
} else {
xPos = elem.offsetWidth;
}
return xPos;
}
}
function getElementLeft(element) {
if (objBrowser.ns4) {
var elem = getObjNN4(document, element);
return elem.pageX;
} else {
var elem;
if(document.getElementById) {
var elem = document.getElementById(element);
} else if (document.all){
var elem = document.all[element];
}
xPos = elem.offsetLeft;
tempEl = elem.offsetParent;
while (tempEl != null) {
xPos += tempEl.offsetLeft;
tempEl = tempEl.offsetParent;
}
return xPos;
}
}
function getElementTop(element) {
if (objBrowser.ns4) {
var elem = getObjNN4(document, element);
return elem.pageY;
} else {
if(document.getElementById) {
var elem = document.getElementById(element);
} else if (document.all) {
var elem = document.all[element];
}
yPos = elem.offsetTop;
tempEl = elem.offsetParent;
while (tempEl != null) {
yPos += tempEl.offsetTop;
tempEl = tempEl.offsetParent;
}
return yPos;
}
}
function getImageLeft(myImage) {
var x, obj;
if (document.layers) {
var img = getImage(myImage);
if (img.container != null)
return img.container.pageX + img.x;
else
return img.x;
} else {
return getElementLeft(myImage);
}
return -1;
}
function getImageTop(myImage) {
var y, obj;
if (document.layers) {
var img = getImage(myImage);
if (img.container != null)
return img.container.pageY + img.y;
else
return img.y;
} else {
return getElementTop(myImage);
}
return -1;
}
function getImageWidth(myImage) {
var x, obj;
if (document.layers) {
var img = getImage(myImage);
return img.width;
} else {
return getElementWidth(myImage);
}
return -1;
}
function getImageHeight(myImage) {
var y, obj;
if (document.layers) {
var img = getImage(myImage);
return img.height;
} else {
return getElementHeight(myImage);
}
return -1;
}
function moveXY(myObject, x, y) {
obj = getStyleObject(myObject)
if (objBrowser.ns4) {
obj.top = y;
obj.left = x;
} else {
if (objBrowser.op5) {
obj.pixelTop = y;
obj.pixelLeft = x;
} else {
obj.top = y + 'px';
obj.left = x + 'px';
}
}
}
function changeClass(element, myClass) {
var elem;
if(document.getElementById) {
var elem = document.getElementById(element);
} else if (document.all){
var elem = document.all[element];
}
elem.className = myClass;
}
function changeImage(target, source) {
var imageObj;
if (objBrowser.ns4) {
imageObj = getImage(target);
if (imageObj) imageObj.src = eval(source).src;
} else {
imageObj = eval('document.images.' + target);
if (imageObj) imageObj.src = eval(source).src;
}
}
function changeBGColour(myObject, colour) {
if (objBrowser.ns4) {
var obj = getObjNN4(document, myObject);
obj.bgColor=colour;
} else {
var obj = getStyleObject(myObject);
if (objBrowser.op5) {
obj.background = colour;
} else {
obj.backgroundColor = colour;
}
}
}
function getAbsolutePosition(element)
{
var r = { x: element.offsetLeft, y: element.offsetTop };
if (element.offsetParent) {
var tmp = getAbsolutePosition(element.offsetParent);
r.x += tmp.x;
r.y += tmp.y;
}
return r;
};
/**
* Retrieve the coordinates of the given event relative to the center
* of the widget.
*
* @param event
* A mouse-related DOM event.
* @param reference
* A DOM element whose position we want to transform the mouse coordinates to.
* @return
* A hash containing keys 'x' and 'y'.
*/
function getRelativeCoordinates(event, reference) {
var x, y;
event = event || window.event;
var el = event.target || event.srcElement;
if (!window.opera && typeof event.offsetX != 'undefined') {
// Use offset coordinates and find common offsetParent
var pos = { x: event.offsetX, y: event.offsetY };
// Send the coordinates upwards through the offsetParent chain.
var e = el;
while (e) {
e.mouseX = pos.x;
e.mouseY = pos.y;
pos.x += e.offsetLeft;
pos.y += e.offsetTop;
e = e.offsetParent;
}
// Look for the coordinates starting from the reference element.
var e = reference;
var offset = { x: 0, y: 0 }
while (e) {
if (typeof e.mouseX != 'undefined') {
x = e.mouseX - offset.x;
y = e.mouseY - offset.y;
break;
}
offset.x += e.offsetLeft;
offset.y += e.offsetTop;
e = e.offsetParent;
}
// Reset stored coordinates
e = el;
while (e) {
e.mouseX = undefined;
e.mouseY = undefined;
e = e.offsetParent;
}
}
else {
// Use absolute coordinates
var pos = getAbsolutePosition(reference);
x = event.pageX - pos.x;
y = event.pageY - pos.y;
}
// Subtract distance to middle
return { x: x, y: y };
}
function utf8(wide) {
var c, s;
var enc = "";
var i = 0;
while(i < wide.length) {
c= wide.charCodeAt(i++);
// handle UTF-16 surrogates
if (c >= 0xDC00 && c < 0xE000) continue;
if (c >= 0xD800 && c < 0xDC00) {
if (i >= wide.length) continue;
s = wide.charCodeAt(i ++);
if (s < 0xDC00 || c >= 0xDE00) continue;
c= ((c - 0xD800) << 10) + (s - 0xDC00) + 0x10000;
}
// output value
if (c < 0x80) enc += String.fromCharCode(c);
else if (c < 0x800) enc += String.fromCharCode(0xC0 + (c >> 6), 0x80 + (c & 0x3F));
else if (c < 0x10000) enc += String.fromCharCode(0xE0 + (c >> 12), 0x80 + (c >> 6 & 0x3F), 0x80 + (c & 0x3F));
else enc += String.fromCharCode(0xF0 + (c >> 18), 0x80 + (c >> 12 & 0x3F), 0x80 + (c >> 6&0x3F), 0x80 + (c & 0x3F));
}
return enc;
}
var hexchars = "0123456789ABCDEF";
function toHex(n) {
return hexchars.charAt(n >> 4) + hexchars.charAt(n & 0xF);
}
/*
Example File From "JavaScript and DHTML Cookbook"
Published by O'Reilly & Associates
Copyright 2003 Danny Goodman
*/
function getElementStyle(elemID, IEStyleAttr, CSSStyleAttr) {
var elem = document.getElementById(elemID);
if(elem != null) {
if (elem.currentStyle) {
return elem.currentStyle[IEStyleAttr];
} else if (window.getComputedStyle) {
var compStyle = window.getComputedStyle(elem, "");
return compStyle.getPropertyValue(CSSStyleAttr);
}
} else {
//alert(elemID + " is not an element");
}
return "0";
}
function htmlEncode(value) {
return value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/\"/g, """).replace(/\'/g, "'");
}
function htmlDecode(value) {
return value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, "\"").replace(/'/g, "'");
}
function appendOptionLast(objSelect, text, value)
{
var newOpt = document.createElement('option');
newOpt.text = text;
newOpt.value = value;
try {
objSelect.add(newOpt, null); // standards compliant; doesn't work in IE
} catch(ex) {
objSelect.add(newOpt); // IE only
}
}
// ThaoNguyen
// 123456.789 -> 123,456.789
function toNumericString(obj){
var str= new String(obj);
if(str == null || str.length < 1)
return "";
var strs = null;
if(str.indexOf(".", 0) >= 0) {
strs = str.split(".");
} else {
strs = new Array();
strs[0] = str;
}
var result = "";
var index = strs[0].length;
var len = strs[0].length;
do{
var num = (index >= 3) ? 3 : index;
index = ((index - 3) > 0) ? (index - 3) : 0;
result = strs[0].substr(index, num) + (result.length > 0 ? "," : "") + result;
} while(index > 0);
if(strs.length > 1 && strs[1].length > 0) {
result += "." + strs[1];
}
return result;
}
function getURLParam( name ) {
name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
var regexS = "[\\?&]"+name+"=([^&#]*)";
var regex = new RegExp( regexS );
var results = regex.exec( window.location.href );
if( results == null )
return "";
else
return results[1];
}
function getFileExtension(fileName)
{
if(fileName.length == 0) {
return "";
}
var dot = fileName.lastIndexOf(".");
if(dot == -1) {
return "";
}
var extension = fileName.substr(dot, fileName.length);
return extension;
}
function checkFileType(fileName, allowedExt)
{
if (!isArray(allowedExt)) {
return false;
}
if (!fileName)
return true;
var ext = getFileExtension(fileName);
if( ext == "" ) {
return false;
} else {
ext = ext.toLowerCase();
for(var i = 0; i < allowedExt.length; i++) {
if(ext == allowedExt[i].toLowerCase()) {
return true;
}
}
}
return false;
}
function getIEVersionNumber() {
var ua = navigator.userAgent;
var MSIEOffset = ua.indexOf("MSIE ");
if (MSIEOffset == -1) {
return 0;
} else {
return parseFloat(ua.substring(MSIEOffset + 5, ua.indexOf(";", MSIEOffset)));
}
} | JavaScript |
function getClientWidth() {
return (
window.innerWidth ? window.innerWidth : (document.documentElement ? document.documentElement.clientWidth : (document.body ? document.body.clientWidth : 0 ))
);
};
function getClientHeight() {
return (
window.innerHeight ? window.innerHeight : (document.documentElement ? document.documentElement.clientHeight : (document.body ? document.body.clientHeight : 0 ))
);
};
var onResizeWindow = function() {
var oDom = YAHOO.util.Dom;
var docHeight = getClientHeight();
var docWidth = getClientWidth();
var headerHeight = oDom.get('header').clientHeight;
var mainHeight = oDom.get('main').clientHeight;
var footerHeight = oDom.get('footer').clientHeight;
if (YAHOO.env.ua.ie > 0 && YAHOO.env.ua.ie < 7) {
var minHeight = docHeight - headerHeight - footerHeight - 50;
if(minHeight < 276) {
minHeight = 276;
}
if (oDom.getStyle('main', 'min-height') != ('' + (minHeight) + 'px')) {
oDom.setStyle('main', 'min-height', '' + (minHeight) + 'px');
}
} else {
var minHeight = docHeight - headerHeight - footerHeight - 27;
if(minHeight < 276) {
minHeight = 276;
}
if (oDom.getStyle('main', 'min-height') != ('' + (minHeight) + 'px')) {
oDom.setStyle('main', 'min-height', '' + (minHeight) + 'px');
}
}
};
YAHOO.util.Event.onDOMReady(function() {
onResizeWindow();
window.onresize = onResizeWindow;
NTTHAO.gridview.init('tbGrid');
}); | JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.editorConfig = function( config )
{
// Define changes to default configuration here. For example:
// config.language = 'fr';
// config.uiColor = '#AADC6E';
config.extraPlugins = 'selectImage,MediaEmbed';
};
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
/**
* @fileOverview Defines the {@link CKEDITOR.lang} object for the
* Persian language.
*/
/**#@+
@type String
@example
*/
/**
* Contains the dictionary of language entries.
* @namespace
*/
CKEDITOR.lang['fa'] =
{
/**
* The language reading direction. Possible values are "rtl" for
* Right-To-Left languages (like Arabic) and "ltr" for Left-To-Right
* languages (like English).
* @default 'ltr'
*/
dir : 'rtl',
/*
* Screenreader titles. Please note that screenreaders are not always capable
* of reading non-English words. So be careful while translating it.
*/
editorTitle : 'ویرایشگر متن غنی, %1',
editorHelp : 'کلید Alt+0 را برای راهنمایی بفشارید',
// ARIA descriptions.
toolbars : 'نوار ابزار',
editor : 'ویرایشگر متن غنی',
// Toolbar buttons without dialogs.
source : 'منبع',
newPage : 'برگهٴ تازه',
save : 'ذخیره',
preview : 'پیشنمایش',
cut : 'برش',
copy : 'کپی',
paste : 'چسباندن',
print : 'چاپ',
underline : 'زیرخطدار',
bold : 'درشت',
italic : 'خمیده',
selectAll : 'گزینش همه',
removeFormat : 'برداشتن فرمت',
strike : 'میانخط',
subscript : 'زیرنویس',
superscript : 'بالانویس',
horizontalrule : 'گنجاندن خط افقی',
pagebreak : 'گنجاندن شکستگی پایان برگه',
pagebreakAlt : 'شکستن صفحه',
unlink : 'برداشتن پیوند',
undo : 'واچیدن',
redo : 'بازچیدن',
// Common messages and labels.
common :
{
browseServer : 'فهرستنمایی سرور',
url : 'URL',
protocol : 'پروتکل',
upload : 'انتقال به سرور',
uploadSubmit : 'به سرور بفرست',
image : 'تصویر',
flash : 'فلش',
form : 'فرم',
checkbox : 'خانهٴ گزینهای',
radio : 'دکمهٴ رادیویی',
textField : 'فیلد متنی',
textarea : 'ناحیهٴ متنی',
hiddenField : 'فیلد پنهان',
button : 'دکمه',
select : 'فیلد چندگزینهای',
imageButton : 'دکمهٴ تصویری',
notSet : '<تعین نشده>',
id : 'شناسه',
name : 'نام',
langDir : 'جهتنمای زبان',
langDirLtr : 'چپ به راست (LTR)',
langDirRtl : 'راست به چپ (RTL)',
langCode : 'کد زبان',
longDescr : 'URL توصیف طولانی',
cssClass : 'کلاسهای شیوهنامه(Stylesheet)',
advisoryTitle : 'عنوان کمکی',
cssStyle : 'شیوه(style)',
ok : 'پذیرش',
cancel : 'انصراف',
close : 'بستن',
preview : 'پیشنمایش',
generalTab : 'عمومی',
advancedTab : 'پیشرفته',
validateNumberFailed : 'این مقدار یک عدد نیست.',
confirmNewPage : 'هر تغییر ایجاد شدهی ذخیره نشده از بین خواهد رفت. آیا اطمینان دارید که قصد بارگیری صفحه جدیدی را دارید؟',
confirmCancel : 'برخی از گزینهها تغییر کردهاند. آیا واقعا قصد بستن این پنجره را دارید؟',
options : 'گزینهها',
target : 'مسیر',
targetNew : 'پنجره جدید (_blank)',
targetTop : 'بالاترین پنجره (_top)',
targetSelf : 'همان پنجره (_self)',
targetParent : 'پنجره والد (_parent)',
langDirLTR : 'چپ به راست (LTR)',
langDirRTL : 'راست به چپ (RTL)',
styles : 'سبک',
cssClasses : 'کلاسهای شیوهنامه',
width : 'پهنا',
height : 'درازا',
align : 'چینش',
alignLeft : 'چپ',
alignRight : 'راست',
alignCenter : 'وسط',
alignTop : 'بالا',
alignMiddle : 'وسط',
alignBottom : 'پائین',
invalidValue : 'Invalid value.', // MISSING
invalidHeight : 'ارتفاع باید یک عدد باشد.',
invalidWidth : 'پهنا باید یک عدد باشد.',
invalidCssLength : 'عدد تعیین شده برای فیلد "%1" باید یک عدد مثبت با یا بدون یک واحد اندازه گیری CSS معتبر باشد (px, %, in, cm, mm, em, ex, pt, or pc).',
invalidHtmlLength : 'عدد تعیین شده برای فیلد "%1" باید یک عدد مثبت با یا بدون یک واحد اندازه گیری HTML معتبر باشد (px or %).',
invalidInlineStyle : 'عدد تعیین شده برای سبک درونخطی(Inline Style) باید دارای یک یا چند چندتایی با شکلی شبیه "name : value" که باید با یک ","(semi-colons) از هم جدا شوند.',
cssLengthTooltip : 'یک عدد برای یک مقدار بر حسب پیکسل و یا یک عدد با یک واحد CSS معتبر وارد کنید (px, %, in, cm, mm, em, ex, pt, or pc).',
// Put the voice-only part of the label in the span.
unavailable : '%1<span class="cke_accessibility">، غیر قابل دسترس</span>'
},
contextmenu :
{
options : 'گزینههای منوی زمینه'
},
// Special char dialog.
specialChar :
{
toolbar : 'گنجاندن نویسهٴ ویژه',
title : 'گزینش نویسهٴ ویژه',
options : 'گزینههای نویسههای ویژه'
},
// Link dialog.
link :
{
toolbar : 'گنجاندن/ویرایش پیوند',
other : '<سایر>',
menu : 'ویرایش پیوند',
title : 'پیوند',
info : 'اطلاعات پیوند',
target : 'مقصد',
upload : 'انتقال به سرور',
advanced : 'پیشرفته',
type : 'نوع پیوند',
toUrl : 'URL',
toAnchor : 'لنگر در همین صفحه',
toEmail : 'پست الکترونیکی',
targetFrame : '<فریم>',
targetPopup : '<پنجرهٴ پاپاپ>',
targetFrameName : 'نام فریم مقصد',
targetPopupName : 'نام پنجرهٴ پاپاپ',
popupFeatures : 'ویژگیهای پنجرهٴ پاپاپ',
popupResizable : 'قابل تغییر اندازه',
popupStatusBar : 'نوار وضعیت',
popupLocationBar: 'نوار موقعیت',
popupToolbar : 'نوارابزار',
popupMenuBar : 'نوار منو',
popupFullScreen : 'تمامصفحه (IE)',
popupScrollBars : 'میلههای پیمایش',
popupDependent : 'وابسته (Netscape)',
popupLeft : 'موقعیت چپ',
popupTop : 'موقعیت بالا',
id : 'شناسه',
langDir : 'جهتنمای زبان',
langDirLTR : 'چپ به راست (LTR)',
langDirRTL : 'راست به چپ (RTL)',
acccessKey : 'کلید دستیابی',
name : 'نام',
langCode : 'جهتنمای زبان',
tabIndex : 'نمایهٴ دسترسی با برگه',
advisoryTitle : 'عنوان کمکی',
advisoryContentType : 'نوع محتوای کمکی',
cssClasses : 'کلاسهای شیوهنامه(Stylesheet)',
charset : 'نویسهگان منبع پیوند شده',
styles : 'شیوه(style)',
rel : 'وابستگی',
selectAnchor : 'یک لنگر برگزینید',
anchorName : 'با نام لنگر',
anchorId : 'با شناسهٴ المان',
emailAddress : 'نشانی پست الکترونیکی',
emailSubject : 'موضوع پیام',
emailBody : 'متن پیام',
noAnchors : '(در این سند لنگری دردسترس نیست)',
noUrl : 'لطفا URL پیوند را بنویسید',
noEmail : 'لطفا نشانی پست الکترونیکی را بنویسید'
},
// Anchor dialog
anchor :
{
toolbar : 'گنجاندن/ویرایش لنگر',
menu : 'ویژگیهای لنگر',
title : 'ویژگیهای لنگر',
name : 'نام لنگر',
errorName : 'لطفا نام لنگر را بنویسید',
remove : 'حذف لنگر'
},
// List style dialog
list:
{
numberedTitle : 'ویژگیهای فهرست شمارهدار',
bulletedTitle : 'ویژگیهای فهرست گلولهدار',
type : 'نوع',
start : 'شروع',
validateStartNumber :'فهرست شماره شروع باید یک عدد صحیح باشد.',
circle : 'دایره',
disc : 'صفحه گرد',
square : 'چهارگوش',
none : 'هیچ',
notset : '<تنظیم نشده>',
armenian : 'شمارهگذاری ارمنی',
georgian : 'شمارهگذاری گریگورین (an, ban, gan, etc.)',
lowerRoman : 'پانویس رومی (i, ii, iii, iv, v, etc.)',
upperRoman : 'بالانویس رومی (I, II, III, IV, V, etc.)',
lowerAlpha : 'پانویس الفبایی (a, b, c, d, e, etc.)',
upperAlpha : 'بالانویس الفبایی (A, B, C, D, E, etc.)',
lowerGreek : 'پانویس یونانی (alpha, beta, gamma, etc.)',
decimal : 'دهدهی (1, 2, 3, etc.)',
decimalLeadingZero : 'دهدهی همراه با صفر (01, 02, 03, etc.)'
},
// Find And Replace Dialog
findAndReplace :
{
title : 'جستجو و جایگزینی',
find : 'جستجو',
replace : 'جایگزینی',
findWhat : 'چه چیز را مییابید:',
replaceWith : 'جایگزینی با:',
notFoundMsg : 'متن موردنظر یافت نشد.',
findOptions : 'گزینههای جستجو',
matchCase : 'همسانی در بزرگی و کوچکی نویسهها',
matchWord : 'همسانی با واژهٴ کامل',
matchCyclic : 'همسانی با چرخه',
replaceAll : 'جایگزینی همهٴ یافتهها',
replaceSuccessMsg : '%1 رخداد جایگزین شد.'
},
// Table Dialog
table :
{
toolbar : 'جدول',
title : 'ویژگیهای جدول',
menu : 'ویژگیهای جدول',
deleteTable : 'پاک کردن جدول',
rows : 'سطرها',
columns : 'ستونها',
border : 'اندازهٴ لبه',
widthPx : 'پیکسل',
widthPc : 'درصد',
widthUnit : 'واحد پهنا',
cellSpace : 'فاصلهٴ میان سلولها',
cellPad : 'فاصلهٴ پرشده در سلول',
caption : 'عنوان',
summary : 'خلاصه',
headers : 'سرنویسها',
headersNone : 'هیچ',
headersColumn : 'اولین ستون',
headersRow : 'اولین ردیف',
headersBoth : 'هردو',
invalidRows : 'تعداد ردیفها باید یک عدد بزرگتر از 0 باشد.',
invalidCols : 'تعداد ستونها باید یک عدد بزرگتر از 0 باشد.',
invalidBorder : 'مقدار اندازه خطوط باید یک عدد باشد.',
invalidWidth : 'مقدار پهنای جدول باید یک عدد باشد.',
invalidHeight : 'مقدار ارتفاع جدول باید یک عدد باشد.',
invalidCellSpacing : 'مقدار فاصلهگذاری سلول باید یک عدد باشد.',
invalidCellPadding : 'بالشتک سلول باید یک عدد باشد.',
cell :
{
menu : 'سلول',
insertBefore : 'افزودن سلول قبل از',
insertAfter : 'افزودن سلول بعد از',
deleteCell : 'حذف سلولها',
merge : 'ادغام سلولها',
mergeRight : 'ادغام به راست',
mergeDown : 'ادغام به پایین',
splitHorizontal : 'جدا کردن افقی سلول',
splitVertical : 'جدا کردن عمودی سلول',
title : 'ویژگیهای سلول',
cellType : 'نوع سلول',
rowSpan : 'محدوده ردیفها',
colSpan : 'محدوده ستونها',
wordWrap : 'شکستن کلمه',
hAlign : 'چینش افقی',
vAlign : 'چینش عمودی',
alignBaseline : 'خط مبنا',
bgColor : 'رنگ زمینه',
borderColor : 'رنگ خطوط',
data : 'اطلاعات',
header : 'سرنویس',
yes : 'بله',
no : 'خیر',
invalidWidth : 'عرض سلول باید یک عدد باشد.',
invalidHeight : 'ارتفاع سلول باید عدد باشد.',
invalidRowSpan : 'مقدار محدوده ردیفها باید یک عدد باشد.',
invalidColSpan : 'مقدار محدوده ستونها باید یک عدد باشد.',
chooseColor : 'انتخاب'
},
row :
{
menu : 'سطر',
insertBefore : 'افزودن سطر قبل از',
insertAfter : 'افزودن سطر بعد از',
deleteRow : 'حذف سطرها'
},
column :
{
menu : 'ستون',
insertBefore : 'افزودن ستون قبل از',
insertAfter : 'افزودن ستون بعد از',
deleteColumn : 'حذف ستونها'
}
},
// Button Dialog.
button :
{
title : 'ویژگیهای دکمه',
text : 'متن (مقدار)',
type : 'نوع',
typeBtn : 'دکمه',
typeSbm : 'ثبت',
typeRst : 'بازنشانی (Reset)'
},
// Checkbox and Radio Button Dialogs.
checkboxAndRadio :
{
checkboxTitle : 'ویژگیهای خانهٴ گزینهای',
radioTitle : 'ویژگیهای دکمهٴ رادیویی',
value : 'مقدار',
selected : 'برگزیده'
},
// Form Dialog.
form :
{
title : 'ویژگیهای فرم',
menu : 'ویژگیهای فرم',
action : 'رویداد',
method : 'متد',
encoding : 'رمزنگاری'
},
// Select Field Dialog.
select :
{
title : 'ویژگیهای فیلد چندگزینهای',
selectInfo : 'اطلاعات',
opAvail : 'گزینههای دردسترس',
value : 'مقدار',
size : 'اندازه',
lines : 'خطوط',
chkMulti : 'گزینش چندگانه فراهم باشد',
opText : 'متن',
opValue : 'مقدار',
btnAdd : 'افزودن',
btnModify : 'ویرایش',
btnUp : 'بالا',
btnDown : 'پائین',
btnSetValue : 'تنظیم به عنوان مقدار برگزیده',
btnDelete : 'پاککردن'
},
// Textarea Dialog.
textarea :
{
title : 'ویژگیهای ناحیهٴ متنی',
cols : 'ستونها',
rows : 'سطرها'
},
// Text Field Dialog.
textfield :
{
title : 'ویژگیهای فیلد متنی',
name : 'نام',
value : 'مقدار',
charWidth : 'پهنای نویسه',
maxChars : 'بیشینهٴ نویسهها',
type : 'نوع',
typeText : 'متن',
typePass : 'گذرواژه'
},
// Hidden Field Dialog.
hidden :
{
title : 'ویژگیهای فیلد پنهان',
name : 'نام',
value : 'مقدار'
},
// Image Dialog.
image :
{
title : 'ویژگیهای تصویر',
titleButton : 'ویژگیهای دکمهٴ تصویری',
menu : 'ویژگیهای تصویر',
infoTab : 'اطلاعات تصویر',
btnUpload : 'به سرور بفرست',
upload : 'انتقال به سرور',
alt : 'متن جایگزین',
lockRatio : 'قفل کردن نسبت',
resetSize : 'بازنشانی اندازه',
border : 'لبه',
hSpace : 'فاصلهٴ افقی',
vSpace : 'فاصلهٴ عمودی',
alertUrl : 'لطفا URL تصویر را بنویسید',
linkTab : 'پیوند',
button2Img : 'آیا مایلید از یک تصویر ساده روی دکمه تصویری انتخاب شده استفاده کنید؟',
img2Button : 'آیا مایلید از یک دکمه تصویری روی تصویر انتخاب شده استفاده کنید؟',
urlMissing : 'آدرس URL اصلی تصویر یافت نشد.',
validateBorder : 'مقدار خطوط باید یک عدد باشد.',
validateHSpace : 'مقدار فاصلهگذاری افقی باید یک عدد باشد.',
validateVSpace : 'مقدار فاصلهگذاری عمودی باید یک عدد باشد.'
},
// Flash Dialog
flash :
{
properties : 'ویژگیهای فلش',
propertiesTab : 'ویژگیها',
title : 'ویژگیهای فلش',
chkPlay : 'آغاز خودکار',
chkLoop : 'اجرای پیاپی',
chkMenu : 'در دسترس بودن منوی فلش',
chkFull : 'اجازه تمام صفحه',
scale : 'مقیاس',
scaleAll : 'نمایش همه',
scaleNoBorder : 'بدون کران',
scaleFit : 'جایگیری کامل',
access : 'دسترسی به اسکریپت',
accessAlways : 'همیشه',
accessSameDomain: 'همان دامنه',
accessNever : 'هرگز',
alignAbsBottom : 'پائین مطلق',
alignAbsMiddle : 'وسط مطلق',
alignBaseline : 'خط پایه',
alignTextTop : 'متن بالا',
quality : 'کیفیت',
qualityBest : 'بهترین',
qualityHigh : 'بالا',
qualityAutoHigh : 'بالا - خودکار',
qualityMedium : 'متوسط',
qualityAutoLow : 'پایین - خودکار',
qualityLow : 'پایین',
windowModeWindow: 'پنجره',
windowModeOpaque: 'مات',
windowModeTransparent : 'شفاف',
windowMode : 'حالت پنجره',
flashvars : 'مقادیر برای فلش',
bgcolor : 'رنگ پسزمینه',
hSpace : 'فاصلهٴ افقی',
vSpace : 'فاصلهٴ عمودی',
validateSrc : 'لطفا URL پیوند را بنویسید',
validateHSpace : 'مقدار فاصلهگذاری افقی باید یک عدد باشد.',
validateVSpace : 'مقدار فاصلهگذاری عمودی باید یک عدد باشد.'
},
// Speller Pages Dialog
spellCheck :
{
toolbar : 'بررسی املا',
title : 'بررسی املا',
notAvailable : 'با عرض پوزش خدمات الان در دسترس نیستند.',
errorLoading : 'خطا در بارگیری برنامه خدمات میزبان: %s.',
notInDic : 'در واژه~نامه یافت نشد',
changeTo : 'تغییر به',
btnIgnore : 'چشمپوشی',
btnIgnoreAll : 'چشمپوشی همه',
btnReplace : 'جایگزینی',
btnReplaceAll : 'جایگزینی همه',
btnUndo : 'واچینش',
noSuggestions : '- پیشنهادی نیست -',
progress : 'بررسی املا در حال انجام...',
noMispell : 'بررسی املا انجام شد. هیچ غلط املائی یافت نشد',
noChanges : 'بررسی املا انجام شد. هیچ واژهای تغییر نیافت',
oneChange : 'بررسی املا انجام شد. یک واژه تغییر یافت',
manyChanges : 'بررسی املا انجام شد. %1 واژه تغییر یافت',
ieSpellDownload : 'بررسی کنندهٴ املا نصب نشده است. آیا میخواهید آن را هماکنون دریافت کنید؟'
},
smiley :
{
toolbar : 'خندانک',
title : 'گنجاندن خندانک',
options : 'گزینههای خندانک'
},
elementsPath :
{
eleLabel : 'مسیر عناصر',
eleTitle : '%1 عنصر'
},
numberedlist : 'فهرست شمارهدار',
bulletedlist : 'فهرست نقطهای',
indent : 'افزایش تورفتگی',
outdent : 'کاهش تورفتگی',
justify :
{
left : 'چپچین',
center : 'میانچین',
right : 'راستچین',
block : 'بلوکچین'
},
blockquote : 'بلوک نقل قول',
clipboard :
{
title : 'چسباندن',
cutError : 'تنظیمات امنیتی مرورگر شما اجازه نمیدهد که ویرایشگر به طور خودکار عملکردهای برش را انجام دهد. لطفا با دکمههای صفحه کلید این کار را انجام دهید (Ctrl/Cmd+X).',
copyError : 'تنظیمات امنیتی مرورگر شما اجازه نمیدهد که ویرایشگر به طور خودکار عملکردهای کپی کردن را انجام دهد. لطفا با دکمههای صفحه کلید این کار را انجام دهید (Ctrl/Cmd+C).',
pasteMsg : 'لطفا متن را با کلیدهای (<STRONG>Ctrl/Cmd+V</STRONG>) در این جعبهٴ متنی بچسبانید و <STRONG>پذیرش</STRONG> را بزنید.',
securityMsg : 'به خاطر تنظیمات امنیتی مرورگر شما، ویرایشگر نمیتواند دسترسی مستقیم به دادههای clipboard داشته باشد. شما باید دوباره آنرا در این پنجره بچسبانید.',
pasteArea : 'محل چسباندن'
},
pastefromword :
{
confirmCleanup : 'متنی که میخواهید بچسبانید به نظر میرسد که از Word کپی شده است. آیا میخواهید قبل از چسباندن آن را پاکسازی کنید؟',
toolbar : 'چسباندن از Word',
title : 'چسباندن از Word',
error : 'به دلیل بروز خطای داخلی امکان پاکسازی اطلاعات بازنشانی شده وجود ندارد.'
},
pasteText :
{
button : 'چسباندن به عنوان متن ِساده',
title : 'چسباندن به عنوان متن ِساده'
},
templates :
{
button : 'الگوها',
title : 'الگوهای محتویات',
options : 'گزینههای الگو',
insertOption : 'محتویات کنونی جایگزین شوند',
selectPromptMsg : 'لطفا الگوی موردنظر را برای بازکردن در ویرایشگر برگزینید<br>(محتویات کنونی از دست خواهند رفت):',
emptyListMsg : '(الگوئی تعریف نشده است)'
},
showBlocks : 'نمایش بلوکها',
stylesCombo :
{
label : 'سبک',
panelTitle : 'سبکهای قالببندی',
panelTitle1 : 'سبکهای بلوک',
panelTitle2 : 'سبکهای درونخطی',
panelTitle3 : 'سبکهای شیء'
},
format :
{
label : 'فرمت',
panelTitle : 'فرمت',
tag_p : 'نرمال',
tag_pre : 'فرمت شده',
tag_address : 'آدرس',
tag_h1 : 'سرنویس 1',
tag_h2 : 'سرنویس 2',
tag_h3 : 'سرنویس 3',
tag_h4 : 'سرنویس 4',
tag_h5 : 'سرنویس 5',
tag_h6 : 'سرنویس 6',
tag_div : 'بند'
},
div :
{
title : 'ایجاد یک محل DIV',
toolbar : 'ایجاد یک محل DIV',
cssClassInputLabel : 'کلاسهای شیوهنامه',
styleSelectLabel : 'سبک',
IdInputLabel : 'شناسه',
languageCodeInputLabel : ' کد زبان',
inlineStyleInputLabel : 'سبک درونخطی(Inline Style)',
advisoryTitleInputLabel : 'عنوان مشاوره',
langDirLabel : 'جهت نوشتاری زبان',
langDirLTRLabel : 'چپ به راست (LTR)',
langDirRTLLabel : 'راست به چپ (RTL)',
edit : 'ویرایش Div',
remove : 'حذف Div'
},
iframe :
{
title : 'ویژگیهای IFrame',
toolbar : 'IFrame',
noUrl : 'لطفا مسیر URL iframe را درج کنید',
scrolling : 'نمایش خطکشها',
border : 'نمایش خطوط frame'
},
font :
{
label : 'قلم',
voiceLabel : 'قلم',
panelTitle : 'قلم'
},
fontSize :
{
label : 'اندازه',
voiceLabel : 'اندازه قلم',
panelTitle : 'اندازه'
},
colorButton :
{
textColorTitle : 'رنگ متن',
bgColorTitle : 'رنگ پسزمینه',
panelTitle : 'رنگها',
auto : 'خودکار',
more : 'رنگهای بیشتر...'
},
colors :
{
'000' : 'سیاه',
'800000' : 'خرمایی',
'8B4513' : 'قهوهای شکلاتی',
'2F4F4F' : 'ارغوانی مایل به خاکستری',
'008080' : 'آبی مایل به خاکستری',
'000080' : 'آبی سیر',
'4B0082' : 'نیلی',
'696969' : 'خاکستری تیره',
'B22222' : 'آتش آجری',
'A52A2A' : 'قهوهای',
'DAA520' : 'میلهی طلایی',
'006400' : 'سبز تیره',
'40E0D0' : 'فیروزهای',
'0000CD' : 'آبی روشن',
'800080' : 'ارغوانی',
'808080' : 'خاکستری',
'F00' : 'قرمز',
'FF8C00' : 'نارنجی پررنگ',
'FFD700' : 'طلایی',
'008000' : 'سبز',
'0FF' : 'آبی مایل به سبز',
'00F' : 'آبی',
'EE82EE' : 'بنفش',
'A9A9A9' : 'خاکستری مات',
'FFA07A' : 'صورتی کدر روشن',
'FFA500' : 'نارنجی',
'FFFF00' : 'زرد',
'00FF00' : 'فسفری',
'AFEEEE' : 'فیروزهای رنگ پریده',
'ADD8E6' : 'آبی کمرنگ',
'DDA0DD' : 'آلویی',
'D3D3D3' : 'خاکستری روشن',
'FFF0F5' : 'بنفش کمرنگ',
'FAEBD7' : 'عتیقه سفید',
'FFFFE0' : 'زرد روشن',
'F0FFF0' : 'عسلی',
'F0FFFF' : 'لاجوردی',
'F0F8FF' : 'آبی براق',
'E6E6FA' : 'بنفش کمرنگ',
'FFF' : 'سفید'
},
scayt :
{
title : 'بررسی املای تایپ شما',
opera_title : 'توسط اپرا پشتیبانی نمیشود',
enable : 'فعالسازی SCAYT',
disable : 'غیرفعالسازی SCAYT',
about : 'درباره SCAYT',
toggle : 'ضامن SCAYT',
options : 'گزینهها',
langs : 'زبانها',
moreSuggestions : 'پیشنهادهای بیشتر',
ignore : 'عبور کردن',
ignoreAll : 'عبور کردن از همه',
addWord : 'افزودن Word',
emptyDic : 'نام دیکشنری نباید خالی باشد.',
noSuggestions : 'No suggestions', // MISSING
optionsTab : 'گزینهها',
allCaps : 'نادیده گرفتن همه کلاه-واژهها',
ignoreDomainNames : 'عبور از نامهای دامنه',
mixedCase : 'عبور از کلماتی مرکب از حروف بزرگ و کوچک',
mixedWithDigits : 'عبور از کلمات به همراه عدد',
languagesTab : 'زبانها',
dictionariesTab : 'دیکشنریها',
dic_field_name : 'نام دیکشنری',
dic_create : 'ایجاد',
dic_restore : 'بازیافت',
dic_delete : 'حذف',
dic_rename : 'تغییر نام',
dic_info : 'در ابتدا دیکشنری کاربر در کوکی ذخیره میشود. با این حال، کوکیها در اندازه محدود شدهاند. وقتی که دیکشنری کاربری بزرگ میشود و به نقطهای که نمیتواند در کوکی ذخیره شود، پس از آن دیکشنری ممکن است بر روی سرور ما ذخیره شود. برای ذخیره دیکشنری شخصی شما بر روی سرور ما، باید یک نام برای دیکشنری خود مشخص نمایید. اگر شما قبلا یک دیکشنری روی سرور ما ذخیره کردهاید، لطفا نام آنرا درج و روی دکمه بازیافت کلیک نمایید.',
aboutTab : 'درباره'
},
about :
{
title : 'درباره CKEditor',
dlgTitle : 'درباره CKEditor',
help : 'بررسی $1 برای راهنمایی.',
userGuide : 'راهنمای کاربران CKEditor',
moreInfo : 'برای کسب اطلاعات مجوز لطفا به وب سایت ما مراجعه کنید:',
copy : 'حق نشر © $1. کلیه حقوق محفوظ است.'
},
maximize : 'حداکثر کردن',
minimize : 'حداقل کردن',
fakeobjects :
{
anchor : 'لنگر',
flash : 'انیمشن فلش',
iframe : 'IFrame',
hiddenfield : 'فیلد پنهان',
unknown : 'شیء ناشناخته'
},
resize : 'کشیدن برای تغییر اندازه',
colordialog :
{
title : 'انتخاب رنگ',
options : 'گزینههای رنگ',
highlight : 'متمایز',
selected : 'رنگ انتخاب شده',
clear : 'پاک کردن'
},
toolbarCollapse : 'بستن نوار ابزار',
toolbarExpand : 'بازکردن نوار ابزار',
toolbarGroups :
{
document : 'سند',
clipboard : 'حافظه موقت/برگشت',
editing : 'در حال ویرایش',
forms : 'فرمها',
basicstyles : 'شیوههای پایه',
paragraph : 'بند',
links : 'پیوندها',
insert : 'ورود',
styles : 'شیوهها',
colors : 'رنگها',
tools : 'ابزارها'
},
bidi :
{
ltr : 'نوشتار متن از چپ به راست',
rtl : 'نوشتار متن از راست به چپ'
},
docprops :
{
label : 'ویژگیهای سند',
title : 'ویژگیهای سند',
design : 'طراحی',
meta : 'فراداده',
chooseColor : 'انتخاب',
other : '<سایر>',
docTitle : 'عنوان صفحه',
charset : 'رمزگذاری نویسهگان',
charsetOther : 'رمزگذاری نویسهگان دیگر',
charsetASCII : 'ASCII',
charsetCE : 'اروپای مرکزی',
charsetCT : 'چینی رسمی (Big5)',
charsetCR : 'سیریلیک',
charsetGR : 'یونانی',
charsetJP : 'ژاپنی',
charsetKR : 'کرهای',
charsetTR : 'ترکی',
charsetUN : 'یونیکُد (UTF-8)',
charsetWE : 'اروپای غربی',
docType : 'عنوان نوع سند',
docTypeOther : 'عنوان نوع سند دیگر',
xhtmlDec : 'شامل تعاریف XHTML',
bgColor : 'رنگ پسزمینه',
bgImage : 'URL تصویر پسزمینه',
bgFixed : 'پسزمینهٴ پیمایش ناپذیر',
txtColor : 'رنگ متن',
margin : 'حاشیههای صفحه',
marginTop : 'بالا',
marginLeft : 'چپ',
marginRight : 'راست',
marginBottom : 'پایین',
metaKeywords : 'کلیدواژگان نمایهگذاری سند (با کاما جدا شوند)',
metaDescription : 'توصیف سند',
metaAuthor : 'نویسنده',
metaCopyright : 'حق انتشار',
previewHtml : '<p>این یک <strong>متن نمونه</strong> است. شما در حال استفاده از <a href="javascript:void(0)">CKEditor</a> هستید.</p>'
}
};
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
/**
* @fileOverview
*/
/**#@+
@type String
@example
*/
/**
* Contains the dictionary of language entries.
* @namespace
*/
CKEDITOR.lang['ku'] =
{
/**
* The language reading direction. Possible values are "rtl" for
* Right-To-Left languages (like Arabic) and "ltr" for Left-To-Right
* languages (like English).
* @default 'ltr'
*/
dir : 'rtl',
/*
* Screenreader titles. Please note that screenreaders are not always capable
* of reading non-English words. So be careful while translating it.
*/
editorTitle : 'دهسکاریکهری ناونیشان',
editorHelp : 'کلیکی ALT لهگهڵ 0 بکه بۆ یارمهتی',
// ARIA descriptions.
toolbars : 'تووڵاەرازی دەسکاریکەر',
editor : 'سەرنووسەی دەقی بەپیت',
// Toolbar buttons without dialogs.
source : 'سەرچاوە',
newPage : 'پەڕەیەکی نوێ',
save : 'پاشکەوتکردن',
preview : 'پێشبینین',
cut : 'بڕین',
copy : 'لەبەرگرنتەوه',
paste : 'لکاندن',
print : 'چاپکردن',
underline : 'ژێرهێڵ',
bold : 'قەڵەو',
italic : 'لار',
selectAll : 'نیشانکردنی هەمووی',
removeFormat : 'لابردنی داڕشتەکە',
strike : 'لێدان',
subscript : 'ژێرنووس',
superscript : 'سەرنووس',
horizontalrule : 'دانانی هێلی ئاسۆیی',
pagebreak : 'دانانی پشووی پەڕە بۆ چاپکردن',
pagebreakAlt : 'پشووی پەڕە',
unlink : 'لابردنی بەستەر',
undo : 'پووچکردنەوه',
redo : 'هەڵگەڕاندنەوه',
// Common messages and labels.
common :
{
browseServer : 'هێنانی ڕاژە',
url : 'ناونیشانی بەستەر',
protocol : 'پڕۆتۆکۆڵ',
upload : 'بارکردن',
uploadSubmit : 'ناردنی بۆ ڕاژە',
image : 'وێنە',
flash : 'فلاش',
form : 'داڕشتە',
checkbox : 'خانەی نیشانکردن',
radio : 'جێگرەوەی دوگمە',
textField : 'خانەی دەق',
textarea : 'ڕووبەری دەق',
hiddenField : 'شاردنەوی خانە',
button : 'دوگمە',
select : 'هەڵبژاردەی خانە',
imageButton : 'دوگمەی وێنە',
notSet : '<هیچ دانەدراوە>',
id : 'ناسنامە',
name : 'ناو',
langDir : 'ئاراستەی زمان',
langDirLtr : 'چەپ بۆ ڕاست (LTR)',
langDirRtl : 'ڕاست بۆ چەپ (RTL)',
langCode : 'هێمای زمان',
longDescr : 'پێناسەی درێژی بەستەر',
cssClass : 'شێوازی چینی پهڕە',
advisoryTitle : 'ڕاوێژکاری سەردێڕ',
cssStyle : 'شێواز',
ok : 'باشە',
cancel : 'هەڵوەشاندن',
close : 'داخستن',
preview : 'پێشبینین',
generalTab : 'گشتی',
advancedTab : 'پهرهسهندوو',
validateNumberFailed : 'ئەم نرخە ژمارە نیه، تکایە نرخێکی ژمارە بنووسە.',
confirmNewPage : 'سەرجەم گۆڕانکاریەکان و پێکهاتەکانی ناوەووە لەدەست دەدەی گەر بێتوو پاشکەوتی نەکەی یەکەم جار، تۆ هەر دڵنیایی لەکردنەوەی پەنجەرەکی نوێ؟',
confirmCancel : 'هەندێك هەڵبژاردە گۆڕدراوە. تۆ دڵنیایی لهداخستنی ئەم دیالۆگە؟',
options : 'هەڵبژاردە',
target : 'ئامانج',
targetNew : 'پەنجەرەیهکی نوێ (_blank)',
targetTop : 'لووتکەی پەنجەرە (_top)',
targetSelf : 'لەهەمان پەنجەرە (_self)',
targetParent : 'پەنجەرەی باوان (_parent)',
langDirLTR : 'چەپ بۆ ڕاست (LTR)',
langDirRTL : 'ڕاست بۆ چەپ (RTL)',
styles : 'شێواز',
cssClasses : 'شێوازی چینی پەڕە',
width : 'پانی',
height : 'درێژی',
align : 'ڕێککەرەوە',
alignLeft : 'چەپ',
alignRight : 'ڕاست',
alignCenter : 'ناوەڕاست',
alignTop : 'سەرەوە',
alignMiddle : 'ناوەند',
alignBottom : 'ژێرەوە',
invalidValue : 'نرخێکی نادرووست.',
invalidHeight : 'درێژی دەبێت ژمارە بێت.',
invalidWidth : 'پانی دەبێت ژمارە بێت.',
invalidCssLength : 'ئەم نرخەی دراوە بۆ خانەی "%1" دەبێت ژمارەکی درووست بێت یان بێ ناونیشانی ئامرازی (px, %, in, cm, mm, em, ex, pt, یان pc).',
invalidHtmlLength : 'ئەم نرخەی دراوە بۆ خانەی "%1" دەبێت ژمارەکی درووست بێت یان بێ ناونیشانی ئامرازی HTML (px یان %).',
invalidInlineStyle : 'دانهی نرخی شێوازی ناوهێڵ دهبێت پێکهاتبێت لهیهك یان زیاتری داڕشته "ناو : نرخ", جیاکردنهوهی بهفاریزهوخاڵ',
cssLengthTooltip : 'ژمارهیهك بنووسه بۆ نرخی piksel یان ئامرازێکی درووستی CSS (px, %, in, cm, mm, em, ex, pt, یان pc).',
// Put the voice-only part of the label in the span.
unavailable : '%1<span class="cke_accessibility">, ئامادە نیە</span>'
},
contextmenu :
{
options : 'هەڵبژاردەی لیستەی کلیکی دەستی ڕاست'
},
// Special char dialog.
specialChar :
{
toolbar : 'دانانەی نووسەی تایبەتی',
title : 'هەڵبژاردنی نووسەی تایبەتی',
options : 'هەڵبژاردەی نووسەی تایبەتی'
},
// Link dialog.
link :
{
toolbar : 'دانان/ڕێکخستنی بەستەر',
other : '<هیتر>',
menu : 'چاکسازی بەستەر',
title : 'بەستەر',
info : 'زانیاری بەستەر',
target : 'ئامانج',
upload : 'بارکردن',
advanced : 'پێشکهوتوو',
type : 'جۆری بهستهر',
toUrl : 'ناونیشانی بهستهر',
toAnchor : 'بهستهر بۆ لهنگهر له دهق',
toEmail : 'ئیمهیل',
targetFrame : '<چووارچێوه>',
targetPopup : '<پهنجهرهی سهرههڵدهر>',
targetFrameName : 'ناوی ئامانجی چووارچێوه',
targetPopupName : 'ناوی پهنجهرهی سهرههڵدهر',
popupFeatures : 'خاسیهتی پهنجهرهی سهرههڵدهر',
popupResizable : 'توانای گۆڕینی قهباره',
popupStatusBar : 'هێڵی دۆخ',
popupLocationBar: 'هێڵی ناونیشانی بهستهر',
popupToolbar : 'هێڵی تووڵامراز',
popupMenuBar : 'هێڵی لیسته',
popupFullScreen : 'پڕ بهپڕی شاشه (IE)',
popupScrollBars : 'هێڵی هاتووچۆپێکردن',
popupDependent : 'پێوهبهستراو (Netscape)',
popupLeft : 'جێگای چهپ',
popupTop : 'جێگای سهرهوه',
id : 'ناسنامه',
langDir : 'ئاراستهی زمان',
langDirLTR : 'چهپ بۆ ڕاست (LTR)',
langDirRTL : 'ڕاست بۆ چهپ (RTL)',
acccessKey : 'کلیلی دهستپێگهیشتن',
name : 'ناو',
langCode : 'هێمای زمان',
tabIndex : 'بازدهری تابی ئیندێکس',
advisoryTitle : 'ڕاوێژکاری سهردێڕ',
advisoryContentType : 'جۆری ناوهڕۆکی ڕاویژکار',
cssClasses : 'شێوازی چینی پهڕه',
charset : 'بەستەری سەرچاوەی نووسه',
styles : 'شێواز',
rel : 'پهیوهندی (rel)',
selectAnchor : 'ههڵبژاردنی لهنگهرێك',
anchorName : 'بهپێی ناوی لهنگهر',
anchorId : 'بهپێی ناسنامهی توخم',
emailAddress : 'ناونیشانی ئیمهیل',
emailSubject : 'بابهتی نامه',
emailBody : 'ناوهڕۆکی نامه',
noAnchors : '(هیچ جۆرێکی لهنگهر ئاماده نیه لهم پهڕهیه)',
noUrl : 'تکایه ناونیشانی بهستهر بنووسه',
noEmail : 'تکایه ناونیشانی ئیمهیل بنووسه'
},
// Anchor dialog
anchor :
{
toolbar : 'دانان/چاکسازی لهنگهر',
menu : 'چاکسازی لهنگهر',
title : 'خاسیهتی لهنگهر',
name : 'ناوی لهنگهر',
errorName : 'تکایه ناوی لهنگهر بنووسه',
remove : 'لابردنی لهنگهر'
},
// List style dialog
list:
{
numberedTitle : 'خاسیهتی لیستی ژمارهیی',
bulletedTitle : 'خاسیهتی لیستی خاڵی',
type : 'جۆر',
start : 'دهستپێکردن',
validateStartNumber :'دهستپێکهری لیستی ژمارهیی دهبێت تهنها ژماره بێت.',
circle : 'بازنه',
disc : 'پهپکه',
square : 'چووراگۆشه',
none : 'هیچ',
notset : '<دانهندراوه>',
armenian : 'ئاراستهی ژمارهی ئهرمهنی',
georgian : 'ئاراستهی ژمارهی جۆڕجی (an, ban, gan, وههیتر.)',
lowerRoman : 'ژمارهی ڕۆمی بچووك (i, ii, iii, iv, v, وههیتر.)',
upperRoman : 'ژمارهی ڕۆمی گهوره (I, II, III, IV, V, وههیتر.)',
lowerAlpha : 'ئهلفابێی بچووك (a, b, c, d, e, وههیتر.)',
upperAlpha : 'ئهلفابێی گهوره (A, B, C, D, E, وههیتر.)',
lowerGreek : 'یۆنانی بچووك (alpha, beta, gamma, وههیتر.)',
decimal : 'ژماره (1, 2, 3, وههیتر.)',
decimalLeadingZero : 'ژماره سفڕی لهپێشهوه (01, 02, 03, وههیتر.)'
},
// Find And Replace Dialog
findAndReplace :
{
title : 'گهڕان وه لهبریدانان',
find : 'گهڕان',
replace : 'لهبریدانان',
findWhat : 'گهڕان بهدووای:',
replaceWith : 'لهبریدانان به:',
notFoundMsg : 'هیچ دهقه گهڕانێك نهدۆزراوه.',
findOptions : 'ههڵبژاردهکانی گهڕان',
matchCase : 'جیاکردنهوه لهنێوان پیتی گهورهو بچووك',
matchWord : 'تهنها ههموو وشهکه',
matchCyclic : 'گهڕان لهههموو پهڕهکه',
replaceAll : 'لهبریدانانی ههمووی',
replaceSuccessMsg : ' پێشهاته(ی) لهبری دانرا. %1'
},
// Table Dialog
table :
{
toolbar : 'خشته',
title : 'خاسیهتی خشته',
menu : 'خاسیهتی خشته',
deleteTable : 'سڕینهوهی خشته',
rows : 'ڕیز',
columns : 'ستوونهکان',
border : 'گهورهیی پهراوێز',
widthPx : 'وێنهخاڵ - پیکسل',
widthPc : 'لهسهدا',
widthUnit : 'پانی یهکه',
cellSpace : 'بۆشایی خانه',
cellPad : 'بۆشایی ناوپۆش',
caption : 'سهردێڕ',
summary : 'کورته',
headers : 'سهرپهڕه',
headersNone : 'هیچ',
headersColumn : 'یهکهم ئهستوون',
headersRow : 'یهکهم ڕیز',
headersBoth : 'ههردووك',
invalidRows : 'ژمارهی ڕیز دهبێت گهورهتر بێت لهژمارهی 0.',
invalidCols : 'ژمارهی ئهستوونی دهبێت گهورهتر بێت لهژمارهی 0.',
invalidBorder : 'ژمارهی پهراوێز دهبێت تهنها ژماره بێت.',
invalidWidth : 'پانی خشته دهبێت تهنها ژماره بێت.',
invalidHeight : 'درێژی خشته دهبێت تهنها ژماره بێت.',
invalidCellSpacing : 'بۆشایی خانه دهبێت ژمارهکی درووست بێت.',
invalidCellPadding : 'ناوپۆشی خانه دهبێت ژمارهکی درووست بێت.',
cell :
{
menu : 'خانه',
insertBefore : 'دانانی خانه لهپێش',
insertAfter : 'دانانی خانه لهپاش',
deleteCell : 'سڕینهوهی خانه',
merge : 'تێکهڵکردنی خانه',
mergeRight : 'تێکهڵکردنی لهگهڵ ڕاست',
mergeDown : 'تێکهڵکردنی لهگهڵ خوارهوه',
splitHorizontal : 'دابهشکردنی خانهی ئاسۆیی',
splitVertical : 'دابهشکردنی خانهی ئهستونی',
title : 'خاسیهتی خانه',
cellType : 'جۆری خانه',
rowSpan : 'ماوهی نێوان ڕیز',
colSpan : 'بستی ئهستونی',
wordWrap : 'پێچانهوهی وشه',
hAlign : 'ڕیزکردنی ئاسۆیی',
vAlign : 'ڕیزکردنی ئهستونی',
alignBaseline : 'هێڵهبنهڕهت',
bgColor : 'ڕهنگی پاشبنهما',
borderColor : 'ڕهنگی پهراوێز',
data : 'داتا',
header : 'سهرپهڕه',
yes : 'بهڵێ',
no : 'نهخێر',
invalidWidth : 'پانی خانه دهبێت بهتهواوی ژماره بێت.',
invalidHeight : 'درێژی خانه بهتهواوی دهبێت ژماره بێت.',
invalidRowSpan : 'ماوهی نێوان ڕیز بهتهواوی دهبێت ژماره بێت.',
invalidColSpan : 'ماوهی نێوان ئهستونی بهتهواوی دهبێت ژماره بێت.',
chooseColor : 'ههڵبژاردن'
},
row :
{
menu : 'ڕیز',
insertBefore : 'دانانی ڕیز لهپێش',
insertAfter : 'دانانی ڕیز لهپاش',
deleteRow : 'سڕینهوهی ڕیز'
},
column :
{
menu : 'ئهستون',
insertBefore : 'دانانی ئهستون لهپێش',
insertAfter : 'دانانی ئهستوون لهپاش',
deleteColumn : 'سڕینهوهی ئهستوون'
}
},
// Button Dialog.
button :
{
title : 'خاسیهتی دوگمه',
text : '(نرخی) دهق',
type : 'جۆر',
typeBtn : 'دوگمه',
typeSbm : 'ناردن',
typeRst : 'ڕێکخستنهوه'
},
// Checkbox and Radio Button Dialogs.
checkboxAndRadio :
{
checkboxTitle : 'خاسیهتی چووارگۆشی پشکنین',
radioTitle : 'خاسیهتی جێگرهوهی دوگمه',
value : 'نرخ',
selected : 'ههڵبژاردرا'
},
// Form Dialog.
form :
{
title : 'خاسیهتی داڕشته',
menu : 'خاسیهتی داڕشته',
action : 'کردار',
method : 'ڕێگه',
encoding : 'بهکۆدکهر'
},
// Select Field Dialog.
select :
{
title : 'ههڵبژاردهی خاسیهتی خانه',
selectInfo : 'زانیاری',
opAvail : 'ههڵبژاردهی ههبوو',
value : 'نرخ',
size : 'گهورهیی',
lines : 'هێڵهکان',
chkMulti : 'ڕێدان بهفره ههڵبژارده',
opText : 'دهق',
opValue : 'نرخ',
btnAdd : 'زیادکردن',
btnModify : 'گۆڕانکاری',
btnUp : 'سهرهوه',
btnDown : 'خوارهوه',
btnSetValue : 'دابنێ وهك نرخێکی ههڵبژێردراو',
btnDelete : 'سڕینهوه'
},
// Textarea Dialog.
textarea :
{
title : 'خاسیهتی ڕووبهری دهق',
cols : 'ئهستونیهکان',
rows : 'ڕیزهکان'
},
// Text Field Dialog.
textfield :
{
title : 'خاسیهتی خانهی دهق',
name : 'ناو',
value : 'نرخ',
charWidth : 'پانی نووسه',
maxChars : 'ئهوپهڕی نووسه',
type : 'جۆر',
typeText : 'دهق',
typePass : 'پێپهڕهوشه'
},
// Hidden Field Dialog.
hidden :
{
title : 'خاسیهتی خانهی شاردراوه',
name : 'ناو',
value : 'نرخ'
},
// Image Dialog.
image :
{
title : 'خاسیهتی وێنه',
titleButton : 'خاسیهتی دوگمهی وێنه',
menu : 'خاسیهتی وێنه',
infoTab : 'زانیاری وێنه',
btnUpload : 'ناردنی بۆ ڕاژه',
upload : 'بارکردن',
alt : 'جێگرهوهی دهق',
lockRatio : 'داخستنی ڕێژه',
resetSize : 'ڕێکخستنهوهی قهباره',
border : 'پهراوێز',
hSpace : 'بۆشایی ئاسۆیی',
vSpace : 'بۆشایی ئهستونی',
alertUrl : 'تکایه ناونیشانی بهستهری وێنه بنووسه',
linkTab : 'بهستهر',
button2Img : 'تۆ دهتهوێت دوگمهی وێنهی دیاریکراو بگۆڕیت بۆ وێنهکی ئاسایی؟',
img2Button : 'تۆ دهتهوێت وێنهی دیاریکراو بگۆڕیت بۆ دوگمهی وێنه؟',
urlMissing : 'سهرچاوهی بهستهری وێنه بزره',
validateBorder : 'پهراوێز دهبێت بهتهواوی تهنها ژماره بێت.',
validateHSpace : 'بۆشایی ئاسۆیی دهبێت بهتهواوی تهنها ژماره بێت.',
validateVSpace : 'بۆشایی ئهستونی دهبێت بهتهواوی تهنها ژماره بێت.'
},
// Flash Dialog
flash :
{
properties : 'خاسیهتی فلاش',
propertiesTab : 'خاسیهت',
title : 'خاسیهتی فلاش',
chkPlay : 'پێکردنی یان لێدانی خۆکار',
chkLoop : 'گرێ',
chkMenu : 'چالاککردنی لیستهی فلاش',
chkFull : 'ڕێپێدان به پڕ بهپڕی شاشه',
scale : 'پێوانه',
scaleAll : 'نیشاندانی ههموو',
scaleNoBorder : 'بێ پهراوێز',
scaleFit : 'بهوردی بگونجێت',
access : 'دهستپێگهیشتنی نووسراو',
accessAlways : 'ههمیشه',
accessSameDomain: 'ههمان دۆمهین',
accessNever : 'ههرگیز',
alignAbsBottom : 'له ژێرهوه',
alignAbsMiddle : 'لهناوهند',
alignBaseline : 'هێڵەبنەڕەت',
alignTextTop : 'دهق لهسهرهوه',
quality : 'جۆرایهتی',
qualityBest : 'باشترین',
qualityHigh : 'بهرزی',
qualityAutoHigh : 'بهرزی خۆکار',
qualityMedium : 'مامناوهند',
qualityAutoLow : 'نزمی خۆکار',
qualityLow : 'نزم',
windowModeWindow: 'پهنجهره',
windowModeOpaque: 'ناڕوون',
windowModeTransparent : 'ڕۆشن',
windowMode : 'شێوازی پهنجهره',
flashvars : 'گۆڕاوهکان بۆ فلاش',
bgcolor : 'ڕهنگی پاشبنهما',
hSpace : 'بۆشایی ئاسۆیی',
vSpace : 'بۆشایی ئهستونی',
validateSrc : 'ناونیشانی بهستهر نابێت خاڵی بێت',
validateHSpace : 'بۆشایی ئاسۆیی دهبێت ژماره بێت.',
validateVSpace : 'بۆشایی ئهستونی دهبێت ژماره بێت.'
},
// Speller Pages Dialog
spellCheck :
{
toolbar : 'پشکنینی ڕێنووس',
title : 'پشکنینی ڕێنووس',
notAvailable : 'ببووره، لهمکاتهدا ڕاژهکه لهبهردهستا نیه.',
errorLoading : 'ههڵه لههێنانی داخوازینامهی خانهخۆێی ڕاژه: %s.',
notInDic : 'لهفهرههنگ دانیه',
changeTo : 'گۆڕینی بۆ',
btnIgnore : 'پشتگوێ کردن',
btnIgnoreAll : 'پشتگوێکردنی ههمووی',
btnReplace : 'لهبریدانن',
btnReplaceAll : 'لهبریدانانی ههمووی',
btnUndo : 'پووچکردنهوه',
noSuggestions : '- هیچ پێشنیارێك -',
progress : 'پشکنینی ڕێنووس لهبهردهوامبوون دایه...',
noMispell : 'پشکنینی ڕێنووس کۆتای هات: هیچ ههڵهیهکی ڕێنووس نهدۆزراوه',
noChanges : 'پشکنینی ڕێنووس کۆتای هات: هیچ وشهیهك نۆگۆڕدرا',
oneChange : 'پشکنینی ڕێنووس کۆتای هات: یهك وشه گۆڕدرا',
manyChanges : 'پشکنینی ڕێنووس کۆتای هات: لهسهدا %1 ی وشهکان گۆڕدرا',
ieSpellDownload : 'پشکنینی ڕێنووس دانهمزراوه. دهتهوێت ئێستا دایبگریت?'
},
smiley :
{
toolbar : 'زهردهخهنه',
title : 'دانانی زهردهخهنهیهك',
options : 'ههڵبژاردهی زهردهخهنه'
},
elementsPath :
{
eleLabel : 'ڕێڕهوی توخمهکان',
eleTitle : '%1 توخم'
},
numberedlist : 'دانان/لابردنی ژمارەی لیست',
bulletedlist : 'دانان/لابردنی خاڵی لیست',
indent : 'زیادکردنی بۆشایی',
outdent : 'کەمکردنەوەی بۆشایی',
justify :
{
left : 'بههێڵ کردنی چهپ',
center : 'ناوهڕاست',
right : 'بههێڵ کردنی ڕاست',
block : 'هاوستوونی'
},
blockquote : 'بەربەستکردنی وتەی وەرگیراو',
clipboard :
{
title : 'لکاندن',
cutError : 'پارێزی وێبگەڕەکەت ڕێگهنادات بە سەرنووسەکە لهبڕینی خۆکار. تکایە لەبری ئەمە ئەم فەرمانە بەکاربهێنە بەداگرتنی کلیلی (Ctrl/Cmd+X).',
copyError : 'پارێزی وێبگەڕەکەت ڕێگهنادات بەسەرنووسەکە لە لکاندنی دەقی خۆکار. تکایە لەبری ئەمە ئەم فەرمانە بەکاربهێنە بەداگرتنی کلیلی (Ctrl/Cmd+C).',
pasteMsg : 'تکایه بیلکێنه لهناوهوهی ئهم سنوقه لهڕێی تهختهکلیلهکهت بهباکارهێنانی کلیلی (<STRONG>Ctrl/Cmd+V</STRONG>) دووای کلیکی باشه بکه.',
securityMsg : 'بههۆی شێوهپێدانی پارێزی وێبگهڕهکهت، سهرنووسهکه ناتوانێت دهستبگهیهنێت بهههڵگیراوهکه ڕاستهوخۆ. بۆیه پێویسته دووباره بیلکێنیت لهم پهنجهرهیه.',
pasteArea : 'ناوچهی لکاندن'
},
pastefromword :
{
confirmCleanup : 'ئهم دهقهی بهتهمای بیلکێنی پێدهچێت له word هێنرابێت. دهتهوێت پاکی بکهیوه پێش ئهوهی بیلکێنی؟',
toolbar : 'لکاندنی لهڕێی Word',
title : 'لکاندنی لهلایهن Word',
error : 'هیچ ڕێگهیهك نهبوو لهلکاندنی دهقهکه بههۆی ههڵهکی ناوهخۆیی'
},
pasteText :
{
button : 'لکاندنی وهك دهقی ڕوون',
title : 'لکاندنی وهك دهقی ڕوون'
},
templates :
{
button : 'ڕووکار',
title : 'پێکهاتهی ڕووکار',
options : 'ههڵبژاردهکانی ڕووکار',
insertOption : 'لهشوێن دانانی ئهم پێکهاتانهی ئێستا',
selectPromptMsg : 'ڕووکارێك ههڵبژێره بۆ کردنهوهی له سهرنووسهر:',
emptyListMsg : '(هیچ ڕووکارێك دیارینهکراوه)'
},
showBlocks : 'نیشاندانی بەربەستەکان',
stylesCombo :
{
label : 'شێواز',
panelTitle : 'شێوازی ڕازاندنهوه',
panelTitle1 : 'شێوازی خشت',
panelTitle2 : 'شێوازی ناوهێڵ',
panelTitle3 : 'شێوازی بهرکار'
},
format :
{
label : 'ڕازاندنهوه',
panelTitle : 'بهشی ڕازاندنهوه',
tag_p : 'ئاسایی',
tag_pre : 'شێوازکراو',
tag_address : 'ناونیشان',
tag_h1 : 'سهرنووسهی ١',
tag_h2 : 'سهرنووسهی ٢',
tag_h3 : 'سهرنووسهی ٣',
tag_h4 : 'سهرنووسهی ٤',
tag_h5 : 'سهرنووسهی ٥',
tag_h6 : 'سهرنووسهی ٦',
tag_div : '(DIV)-ی ئاسایی'
},
div :
{
title : 'دانانی لهخۆگری Div',
toolbar : 'دانانی لهخۆگری Div',
cssClassInputLabel : 'شێوازی چینی پهڕه',
styleSelectLabel : 'شێواز',
IdInputLabel : 'ناسنامه',
languageCodeInputLabel : 'هێمای زمان',
inlineStyleInputLabel : 'شێوازی ناوهێڵ',
advisoryTitleInputLabel : 'سهردێڕ',
langDirLabel : 'ئاراستهی زمان',
langDirLTRLabel : 'چهپ بۆ ڕاست (LTR)',
langDirRTLLabel : 'ڕاست بۆ چهپ (RTL)',
edit : 'چاکسازی Div',
remove : 'لابردنی Div'
},
iframe :
{
title : 'دیالۆگی چووارچێوه',
toolbar : 'چووارچێوه',
noUrl : 'تکایه ناونیشانی بهستهر بنووسه بۆ چووارچێوه',
scrolling : 'چالاککردنی هاتووچۆپێکردن',
border : 'نیشاندانی لاکێشه بهچوواردهوری چووارچێوه'
},
font :
{
label : 'فۆنت',
voiceLabel : 'فۆنت',
panelTitle : 'ناوی فۆنت'
},
fontSize :
{
label : 'گهورهیی',
voiceLabel : 'گهورهیی فۆنت',
panelTitle : 'گهورهیی فۆنت'
},
colorButton :
{
textColorTitle : 'ڕهنگی دهق',
bgColorTitle : 'ڕهنگی پاشبنهما',
panelTitle : 'ڕهنگهکان',
auto : 'خۆکار',
more : 'ڕهنگی زیاتر...'
},
colors :
{
'000' : 'ڕهش',
'800000' : 'سۆرو ماڕوونی',
'8B4513' : 'ماڕوونی',
'2F4F4F' : 'سهوزی تاریك',
'008080' : 'سهوزو شین',
'000080' : 'شینی تۆخ',
'4B0082' : 'مۆری تۆخ',
'696969' : 'ڕهساسی تۆخ',
'B22222' : 'سۆری تۆخ',
'A52A2A' : 'قاوهیی',
'DAA520' : 'قاوهیی بریسکهدار',
'006400' : 'سهوزی تۆخ',
'40E0D0' : 'شینی ناتۆخی بریسکهدار',
'0000CD' : 'شینی مامناوهند',
'800080' : 'پهمبهیی',
'808080' : 'ڕهساسی',
'F00' : 'سۆر',
'FF8C00' : 'نارهنجی تۆخ',
'FFD700' : 'زهرد',
'008000' : 'سهوز',
'0FF' : 'شینی ئاسمانی',
'00F' : 'شین',
'EE82EE' : 'پهمهیی',
'A9A9A9' : 'ڕهساسی ناتۆخ',
'FFA07A' : 'نارهنجی ناتۆخ',
'FFA500' : 'نارهنجی',
'FFFF00' : 'زهرد',
'00FF00' : 'سهوز',
'AFEEEE' : 'شینی ناتۆخ',
'ADD8E6' : 'شینی زۆر ناتۆخ',
'DDA0DD' : 'پهمهیی ناتۆخ',
'D3D3D3' : 'ڕهساسی بریسکهدار',
'FFF0F5' : 'جهرگی زۆر ناتۆخ',
'FAEBD7' : 'جهرگی ناتۆخ',
'FFFFE0' : 'سپی ناتۆخ',
'F0FFF0' : 'ههنگوینی ناتۆخ',
'F0FFFF' : 'شینێکی زۆر ناتۆخ',
'F0F8FF' : 'شینێکی ئاسمانی زۆر ناتۆخ',
'E6E6FA' : 'شیری',
'FFF' : 'سپی'
},
scayt :
{
title : 'پشکنینی نووسه لهکاتی نووسین',
opera_title : 'پشتیوانی نهکراوه لهلایهن Opera',
enable : 'چالاککردنی SCAYT',
disable : 'ناچالاککردنی SCAYT',
about : 'دهربارهی SCAYT',
toggle : 'گۆڕینی SCAYT',
options : 'ههڵبژارده',
langs : 'زمانهکان',
moreSuggestions : 'پێشنیاری زیاتر',
ignore : 'پشتگوێخستن',
ignoreAll : 'پشتگوێخستنی ههمووی',
addWord : 'زیادکردنی ووشه',
emptyDic : 'ناوی فهرههنگ نابێت خاڵی بێت.',
noSuggestions : 'No suggestions', // MISSING
optionsTab : 'ههڵبژارده',
allCaps : 'پشتگوێخستنی وشانهی پێکهاتووه لهپیتی گهوره',
ignoreDomainNames : 'پشتگوێخستنی دۆمهین',
mixedCase : 'پشتگوێخستنی وشانهی پێکهاتووه لهپیتی گهورهو بچووك',
mixedWithDigits : 'پشتگوێخستنی وشانهی پێکهاتووه لهژماره',
languagesTab : 'زمانهکان',
dictionariesTab : 'فهرههنگهکان',
dic_field_name : 'ناوی فهرههنگ',
dic_create : 'درووستکردن',
dic_restore : 'گهڕاندنهوه',
dic_delete : 'سڕینهوه',
dic_rename : 'گۆڕینی ناو',
dic_info : 'لهبنچینهدا فهرههنگی بهکارهێنهر کۆگاکردن کراوه له شهکرۆکه Cookie, ههرچۆنێك بێت شهکۆرکه سنووردار کراوه له قهباره کۆگاکردن.کاتێك فهرههنگی بهکارهێنهر گهیشته ئهم خاڵهی کهناتوانرێت زیاتر کۆگاکردن بکرێت له شهکرۆکه، ئهوسا فهرههنگهکه پێویسته کۆگابکرێت له ڕاژهکهی ئێمه. بۆ کۆگاکردنی زانیاری تایبهتی فهرههنگهکه له ڕاژهکهی ئێمه, پێویسته ناوێك ههڵبژێریت بۆ فهرههنگهکه. گهر تۆ فهرههنگێکی کۆگاکراوت ههیه, تکایه ناوی فهرههنگهکه بنووسه وه کلیکی دوگمهی گهڕاندنهوه بکه.',
aboutTab : 'دهربارهی'
},
about :
{
title : 'دهربارهی CKEditor',
dlgTitle : 'دهربارهی CKEditor',
help : 'سهیری $1 بکه بۆ یارمهتی.',
userGuide : 'ڕێپیشاندهری CKEditors',
moreInfo : 'بۆ زانیاری زیاتری مۆڵهت, تکایه سهردانی ماڵپهڕهکهمان بکه:',
copy : 'مافی لهبهرگرتنهوهی © $1. گشتی پارێزراوه.'
},
maximize : 'ئەوپهڕی گەورەیی',
minimize : 'ئەوپەڕی بچووکی',
fakeobjects :
{
anchor : 'لهنگهر',
flash : 'فلاش',
iframe : 'لهچوارچێوه',
hiddenfield : 'شاردنهوهی خانه',
unknown : 'بهرکارێکی نهناسراو'
},
resize : 'ڕابکێشە بۆ گۆڕینی قەبارەکەی',
colordialog :
{
title : 'ههڵبژاردنی ڕهنگ',
options : 'ههڵبژاردهی ڕهنگهکان',
highlight : 'نیشانکردن',
selected : 'ههڵبژاردرا',
clear : 'پاککردنهوه'
},
toolbarCollapse : 'شاردنەوی هێڵی تووڵامراز',
toolbarExpand : 'نیشاندانی هێڵی تووڵامراز',
toolbarGroups :
{
document : 'پهڕه',
clipboard : 'بڕین/پووچکردنهوه',
editing : 'چاکسازی',
forms : 'داڕشته',
basicstyles : 'شێوازی بنچینهیی',
paragraph : 'بڕگه',
links : 'بهستهر',
insert : 'خستنه ناو',
styles : 'شێواز',
colors : 'ڕهنگهکان',
tools : 'ئامرازهکان'
},
bidi :
{
ltr : 'ئاراستهی نووسه لهچهپ بۆ ڕاست',
rtl : 'ئاراستهی نووسه لهڕاست بۆ چهپ'
},
docprops :
{
label : 'خاسییهتی پهڕه',
title : 'خاسییهتی پهڕه',
design : 'شێوهکار',
meta : 'زانیاری مێتا',
chooseColor : 'ههڵبژێره',
other : 'هیتر...',
docTitle : 'سهردێڕی پهڕه',
charset : 'دهستهی نووسهی بهکۆدهکهر',
charsetOther : 'دهستهی نووسهی بهکۆدهکهری تر',
charsetASCII : 'ASCII',
charsetCE : 'ناوهڕاست ئهوروپا',
charsetCT : 'چینی(Big5)',
charsetCR : 'سیریلیك',
charsetGR : 'یۆنانی',
charsetJP : 'ژاپۆن',
charsetKR : 'کۆریا',
charsetTR : 'تورکیا',
charsetUN : 'Unicode (UTF-8)',
charsetWE : 'ڕۆژئاوای ئهوروپا',
docType : 'سهرپهڕهی جۆری پهڕه',
docTypeOther : 'سهرپهڕهی جۆری پهڕهی تر',
xhtmlDec : 'بهیاننامهکانی XHTML لهگهڵدابێت',
bgColor : 'ڕهنگی پاشبنهما',
bgImage : 'ناونیشانی بهستهری وێنهی پاشبنهما',
bgFixed : 'بێ هاتووچوپێکردنی (چهسپاو) پاشبنهمای وێنه',
txtColor : 'ڕهنگی دهق',
margin : 'تهنیشت پهڕه',
marginTop : 'سهرهوه',
marginLeft : 'چهپ',
marginRight : 'ڕاست',
marginBottom : 'ژێرهوه',
metaKeywords : 'بهڵگهنامهی وشهی کاریگهر(به کۆما لێکیان جیابکهوه)',
metaDescription : 'پێناسهی لاپهڕه',
metaAuthor : 'نووسهر',
metaCopyright : 'مافی بڵاوکردنهوهی',
previewHtml : '<p>ئهمه وهك نموونهی <strong>دهقه</strong>. تۆ بهکاردههێنیت <a href="javascript:void(0)">CKEditor</a>.</p>'
}
};
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('devtools','cs',{devTools:{title:'Informace o prvku',dialogName:'Název dialogového okna',tabName:'Název karty',elementId:'ID prvku',elementType:'Typ prvku'}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('devtools','eo',{devTools:{title:'Informo pri la elemento',dialogName:'Nomo de la dialogfenestro',tabName:'Langetnomo',elementId:'ID de la elemento',elementType:'Tipo de la elemento'}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('devtools','bg',{devTools:{title:'Информация за елемента',dialogName:'Име на диалоговия прозорец',tabName:'Име на таб',elementId:'ID на елемента',elementType:'Тип на елемента'}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('devtools','sk',{devTools:{title:'Informácie o prvku',dialogName:'Názov okna dialógu',tabName:'Názov záložky',elementId:'ID prvku',elementType:'Typ prvku'}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('devtools','pl',{devTools:{title:'Informacja o elemencie',dialogName:'Nazwa okna dialogowego',tabName:'Nazwa zakładki',elementId:'ID elementu',elementType:'Typ elementu'}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('devtools','nl',{devTools:{title:'Elementinformatie',dialogName:'Naam dialoogvenster',tabName:'Tabnaam',elementId:'Element ID',elementType:'Elementtype'}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('devtools','da',{devTools:{title:'Information på elementet',dialogName:'Dialogboks',tabName:'Tab beskrivelse',elementId:'ID på element',elementType:'Type af element'}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('devtools','tr',{devTools:{title:'Eleman Bilgisi',dialogName:'İletişim pencere ismi',tabName:'Sekme adı',elementId:'Eleman ID',elementType:'Eleman türü'}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('devtools','de',{devTools:{title:'Elementinformation',dialogName:'Dialogfenstername',tabName:'Reitername',elementId:'Element ID',elementType:'Elementtyp'}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('devtools','fi',{devTools:{title:'Elementin tiedot',dialogName:'Dialogi-ikkunan nimi',tabName:'Välilehden nimi',elementId:'Elementin ID',elementType:'Elementin tyyppi'}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('devtools','vi',{devTools:{title:'Thông tin thành ph',dialogName:'Tên hộp tho',tabName:'Tên th',elementId:'Mã thành ph',elementType:'Loại thành ph'}});
| JavaScript |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang('devtools','cy',{devTools:{title:'Gwybodaeth am yr Elfen',dialogName:'Enw ffenestr y deialog',tabName:"Enw'r tab",elementId:'ID yr Elfen',elementType:'Math yr elfen'}});
| JavaScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.