[Catalyst-commits] r6248 - in trunk/OzinoCMS: . database lib lib/CmsDB lib/I18N lib/cms lib/cms/Controller lib/cms/Controller/Admin lib/cms/Controller/Admin/Website lib/cms/Controller/Common lib/cms/Controller/Core lib/cms/Controller/Core/File lib/cms/Controller/_Modules lib/cms/Model lib/cms/View messages root root/_modules root/_modules/HTMLArea root/_modules/HelloWorld root/_modules/ShowProductList root/admin root/admin/category root/admin/file root/admin/gizmo root/admin/gizmo/widget root/admin/navigation root/admin/page root/admin/page/editContent root/admin/reseller root/admin/root root/core root/core/navigation root/emailBody root/files root/modules root/static root/static/images root/static/images/icon root/static/images/lightbox root/static/images/rainbow.office.ozino.com root/static/images/shuttl.office.ozino.com root/static/javascript root/static/javascript/tiny_mce root/static/javascript/tiny_mce/langs root/static/javascript/tiny_mce/plugins root/static/javascript/tiny_mce/plugins/_template root/static/javascript/tiny_mce/plugins/_template/images root/static/javascript/tiny_mce/plugins/_template/langs root/static/javascript/tiny_mce/plugins/advhr root/static/javascript/tiny_mce/plugins/advhr/css root/static/javascript/tiny_mce/plugins/advhr/images root/static/javascript/tiny_mce/plugins/advhr/jscripts root/static/javascript/tiny_mce/plugins/advhr/langs root/static/javascript/tiny_mce/plugins/advimage root/static/javascript/tiny_mce/plugins/advimage/css root/static/javascript/tiny_mce/plugins/advimage/images root/static/javascript/tiny_mce/plugins/advimage/jscripts root/static/javascript/tiny_mce/plugins/advimage/langs root/static/javascript/tiny_mce/plugins/advlink root/static/javascript/tiny_mce/plugins/advlink/css root/static/javascript/tiny_mce/plugins/advlink/jscripts root/static/javascript/tiny_mce/plugins/advlink/langs root/static/javascript/tiny_mce/plugins/autosave root/static/javascript/tiny_mce/plugins/autosave/langs root/static/javascript/tiny_mce/plugins/cleanup root/static/javascript/tiny_mce/plugins/contextmenu root/static/javascript/tiny_mce/plugins/contextmenu/css root/static/javascript/tiny_mce/plugins/contextmenu/images root/static/javascript/tiny_mce/plugins/directionality root/static/javascript/tiny_mce/plugins/directionality/images root/static/javascript/tiny_mce/plugins/directionality/langs root/static/javascript/tiny_mce/plugins/emotions root/static/javascript/tiny_mce/plugins/emotions/images root/static/javascript/tiny_mce/plugins/emotions/jscripts root/static/javascript/tiny_mce/plugins/emotions/langs root/static/javascript/tiny_mce/plugins/flash root/static/javascript/tiny_mce/plugins/flash/css root/static/javascript/tiny_mce/plugins/flash/images root/static/javascript/tiny_mce/plugins/flash/jscripts root/static/javascript/tiny_mce/plugins/flash/langs root/static/javascript/tiny_mce/plugins/fullpage root/static/javascript/tiny_mce/plugins/fullpage/css root/static/javascript/tiny_mce/plugins/fullpage/images root/static/javascript/tiny_mce/plugins/fullpage/jscripts root/static/javascript/tiny_mce/plugins/fullpage/langs root/static/javascript/tiny_mce/plugins/fullscreen root/static/javascript/tiny_mce/plugins/fullscreen/images root/static/javascript/tiny_mce/plugins/fullscreen/langs root/static/javascript/tiny_mce/plugins/iespell root/static/javascript/tiny_mce/plugins/iespell/images root/static/javascript/tiny_mce/plugins/iespell/langs root/static/javascript/tiny_mce/plugins/inlinepopups root/static/javascript/tiny_mce/plugins/inlinepopups/css root/static/javascript/tiny_mce/plugins/inlinepopups/images root/static/javascript/tiny_mce/plugins/inlinepopups/jscripts root/static/javascript/tiny_mce/plugins/insertdatetime root/static/javascript/tiny_mce/plugins/insertdatetime/images root/static/javascript/tiny_mce/plugins/insertdatetime/langs root/static/javascript/tiny_mce/plugins/layer root/static/javascript/tiny_mce/plugins/layer/images root/static/javascript/tiny_mce/plugins/layer/langs root/static/javascript/tiny_mce/plugins/noneditable root/static/javascript/tiny_mce/plugins/noneditable/css root/static/javascript/tiny_mce/plugins/paste root/static/javascript/tiny_mce/plugins/paste/css root/static/javascript/tiny_mce/plugins/paste/images root/static/javascript/tiny_mce/plugins/paste/jscripts root/static/javascript/tiny_mce/plugins/paste/langs root/static/javascript/tiny_mce/plugins/preview root/static/javascript/tiny_mce/plugins/preview/images root/static/javascript/tiny_mce/plugins/preview/langs root/static/javascript/tiny_mce/plugins/print root/static/javascript/tiny_mce/plugins/print/images root/static/javascript/tiny_mce/plugins/print/langs root/static/javascript/tiny_mce/plugins/save root/static/javascript/tiny_mce/plugins/save/images root/static/javascript/tiny_mce/plugins/save/langs root/static/javascript/tiny_mce/plugins/searchreplace root/static/javascript/tiny_mce/plugins/searchreplace/images root/static/javascript/tiny_mce/plugins/searchreplace/jscripts root/static/javascript/tiny_mce/plugins/searchreplace/langs root/static/javascript/tiny_mce/plugins/style root/static/javascript/tiny_mce/plugins/style/css root/static/javascript/tiny_mce/plugins/style/images root/static/javascript/tiny_mce/plugins/style/jscripts root/static/javascript/tiny_mce/plugins/style/langs root/static/javascript/tiny_mce/plugins/table root/static/javascript/tiny_mce/plugins/table/css root/static/javascript/tiny_mce/plugins/table/images root/static/javascript/tiny_mce/plugins/table/jscripts root/static/javascript/tiny_mce/plugins/table/langs root/static/javascript/tiny_mce/plugins/zoom root/static/javascript/tiny_mce/themes root/static/javascript/tiny_mce/themes/advanced root/static/javascript/tiny_mce/themes/advanced/css root/static/javascript/tiny_mce/themes/advanced/docs root/static/javascript/tiny_mce/themes/advanced/docs/en root/static/javascript/tiny_mce/themes/advanced/docs/en/images root/static/javascript/tiny_mce/themes/advanced/images root/static/javascript/tiny_mce/themes/advanced/images/xp root/static/javascript/tiny_mce/themes/advanced/jscripts root/static/javascript/tiny_mce/themes/advanced/langs root/static/javascript/tiny_mce/themes/simple root/static/javascript/tiny_mce/themes/simple/css root/static/javascript/tiny_mce/themes/simple/images root/static/javascript/tiny_mce/utils root/static/style root/static/style/rainbow.office.ozino.com root/static/style/rainbow.office.ozino.com/images root/static/style/shuttle.office.ozino.com root/static/style/shuttle.office.ozino.com/images script t

space at dev.catalyst.perl.org space at dev.catalyst.perl.org
Sat Mar 31 16:44:53 GMT 2007


Author: space
Date: 2007-03-31 16:44:51 +0100 (Sat, 31 Mar 2007)
New Revision: 6248

Added:
   trunk/OzinoCMS/Changes
   trunk/OzinoCMS/Makefile.PL
   trunk/OzinoCMS/README
   trunk/OzinoCMS/cms.yml
   trunk/OzinoCMS/database/
   trunk/OzinoCMS/database/cms.sql
   trunk/OzinoCMS/lib/
   trunk/OzinoCMS/lib/CmsDB.pm
   trunk/OzinoCMS/lib/CmsDB/
   trunk/OzinoCMS/lib/CmsDB/Category.pm
   trunk/OzinoCMS/lib/CmsDB/CategoryLang.pm
   trunk/OzinoCMS/lib/CmsDB/File.pm
   trunk/OzinoCMS/lib/CmsDB/Gizmo.pm
   trunk/OzinoCMS/lib/CmsDB/GizmoLang.pm
   trunk/OzinoCMS/lib/CmsDB/Group.pm
   trunk/OzinoCMS/lib/CmsDB/GroupCategoryPermission.pm
   trunk/OzinoCMS/lib/CmsDB/GroupGizmoPermission.pm
   trunk/OzinoCMS/lib/CmsDB/GroupMember.pm
   trunk/OzinoCMS/lib/CmsDB/GroupPagePermission.pm
   trunk/OzinoCMS/lib/CmsDB/GroupWebsitePermission.pm
   trunk/OzinoCMS/lib/CmsDB/HostHeader.pm
   trunk/OzinoCMS/lib/CmsDB/Language.pm
   trunk/OzinoCMS/lib/CmsDB/Module.pm
   trunk/OzinoCMS/lib/CmsDB/Navigation.pm
   trunk/OzinoCMS/lib/CmsDB/Page.pm
   trunk/OzinoCMS/lib/CmsDB/PageLang.pm
   trunk/OzinoCMS/lib/CmsDB/Product.pm
   trunk/OzinoCMS/lib/CmsDB/ProductCategory.pm
   trunk/OzinoCMS/lib/CmsDB/ProductLang.pm
   trunk/OzinoCMS/lib/CmsDB/Reseller.pm
   trunk/OzinoCMS/lib/CmsDB/ResellerWebsite.pm
   trunk/OzinoCMS/lib/CmsDB/ResetPassword.pm
   trunk/OzinoCMS/lib/CmsDB/Role.pm
   trunk/OzinoCMS/lib/CmsDB/Skin.pm
   trunk/OzinoCMS/lib/CmsDB/User.pm
   trunk/OzinoCMS/lib/CmsDB/UserCategoryPermission.pm
   trunk/OzinoCMS/lib/CmsDB/UserGizmoPermission.pm
   trunk/OzinoCMS/lib/CmsDB/UserPagePermission.pm
   trunk/OzinoCMS/lib/CmsDB/UserRole.pm
   trunk/OzinoCMS/lib/CmsDB/UserWebsitePermission.pm
   trunk/OzinoCMS/lib/CmsDB/VUsernameOnWebsiteid.pm
   trunk/OzinoCMS/lib/CmsDB/Website.pm
   trunk/OzinoCMS/lib/CmsDB/WebsiteLang.pm
   trunk/OzinoCMS/lib/I18N/
   trunk/OzinoCMS/lib/I18N/fa.pm
   trunk/OzinoCMS/lib/cms.pm
   trunk/OzinoCMS/lib/cms/
   trunk/OzinoCMS/lib/cms/Controller/
   trunk/OzinoCMS/lib/cms/Controller/Admin.pm
   trunk/OzinoCMS/lib/cms/Controller/Admin/
   trunk/OzinoCMS/lib/cms/Controller/Admin/Reseller.pm
   trunk/OzinoCMS/lib/cms/Controller/Admin/Root.pm
   trunk/OzinoCMS/lib/cms/Controller/Admin/Website.pm
   trunk/OzinoCMS/lib/cms/Controller/Admin/Website/
   trunk/OzinoCMS/lib/cms/Controller/Admin/Website/Category.pm
   trunk/OzinoCMS/lib/cms/Controller/Admin/Website/File.pm
   trunk/OzinoCMS/lib/cms/Controller/Admin/Website/Gizmo.pm
   trunk/OzinoCMS/lib/cms/Controller/Admin/Website/Navigation.pm
   trunk/OzinoCMS/lib/cms/Controller/Admin/Website/Page.pm
   trunk/OzinoCMS/lib/cms/Controller/Auth.pm
   trunk/OzinoCMS/lib/cms/Controller/Common.pm
   trunk/OzinoCMS/lib/cms/Controller/Common/
   trunk/OzinoCMS/lib/cms/Controller/Common/UserGroup.pm
   trunk/OzinoCMS/lib/cms/Controller/Core.pm
   trunk/OzinoCMS/lib/cms/Controller/Core/
   trunk/OzinoCMS/lib/cms/Controller/Core/Category.pm
   trunk/OzinoCMS/lib/cms/Controller/Core/File.pm
   trunk/OzinoCMS/lib/cms/Controller/Core/File/
   trunk/OzinoCMS/lib/cms/Controller/Core/File/Image.pm
   trunk/OzinoCMS/lib/cms/Controller/Core/File/Upload.pm
   trunk/OzinoCMS/lib/cms/Controller/Core/Module.pm
   trunk/OzinoCMS/lib/cms/Controller/Core/Navigation.pm
   trunk/OzinoCMS/lib/cms/Controller/Core/Page.pm
   trunk/OzinoCMS/lib/cms/Controller/Root.pm
   trunk/OzinoCMS/lib/cms/Controller/_Modules.pm
   trunk/OzinoCMS/lib/cms/Controller/_Modules/
   trunk/OzinoCMS/lib/cms/Controller/_Modules/HTMLArea.pm
   trunk/OzinoCMS/lib/cms/Controller/_Modules/HelloWorld.pm
   trunk/OzinoCMS/lib/cms/Controller/_Modules/LatestChange.pm
   trunk/OzinoCMS/lib/cms/Controller/_Modules/Navigator.pm
   trunk/OzinoCMS/lib/cms/Controller/_Modules/ShowProductList.pm
   trunk/OzinoCMS/lib/cms/Controller/_Modules/ViewProduct.pm
   trunk/OzinoCMS/lib/cms/Controller/cms.pm
   trunk/OzinoCMS/lib/cms/Model/
   trunk/OzinoCMS/lib/cms/Model/CmsDB.pm
   trunk/OzinoCMS/lib/cms/View/
   trunk/OzinoCMS/lib/cms/View/TT.pm
   trunk/OzinoCMS/messages/
   trunk/OzinoCMS/messages/messages.yml
   trunk/OzinoCMS/root/
   trunk/OzinoCMS/root/_modules/
   trunk/OzinoCMS/root/_modules/HTMLArea/
   trunk/OzinoCMS/root/_modules/HTMLArea/index.tt
   trunk/OzinoCMS/root/_modules/HelloWorld/
   trunk/OzinoCMS/root/_modules/HelloWorld/index.tt
   trunk/OzinoCMS/root/_modules/ShowProductList/
   trunk/OzinoCMS/root/_modules/ShowProductList/footer.tt
   trunk/OzinoCMS/root/_modules/ShowProductList/header.tt
   trunk/OzinoCMS/root/_modules/ShowProductList/row.tt
   trunk/OzinoCMS/root/_websites/
   trunk/OzinoCMS/root/accessDenied.tt
   trunk/OzinoCMS/root/admin/
   trunk/OzinoCMS/root/admin/category/
   trunk/OzinoCMS/root/admin/category/addedit.tt
   trunk/OzinoCMS/root/admin/category/addeditcatlang.tt
   trunk/OzinoCMS/root/admin/category/catLangList.tt
   trunk/OzinoCMS/root/admin/category/catsList.tt
   trunk/OzinoCMS/root/admin/category/default.tt
   trunk/OzinoCMS/root/admin/category/orderList.tt
   trunk/OzinoCMS/root/admin/common.tt
   trunk/OzinoCMS/root/admin/default.tt
   trunk/OzinoCMS/root/admin/file/
   trunk/OzinoCMS/root/admin/file/default.tt
   trunk/OzinoCMS/root/admin/file/edit.tt
   trunk/OzinoCMS/root/admin/footer.tt
   trunk/OzinoCMS/root/admin/gizmo/
   trunk/OzinoCMS/root/admin/gizmo/addGizmo.tt
   trunk/OzinoCMS/root/admin/gizmo/editGizmoControllers.tt
   trunk/OzinoCMS/root/admin/gizmo/header.tt
   trunk/OzinoCMS/root/admin/gizmo/index.tt
   trunk/OzinoCMS/root/admin/gizmo/newGizmoLink.tt
   trunk/OzinoCMS/root/admin/gizmo/showGizmoLang.tt
   trunk/OzinoCMS/root/admin/gizmo/widget/
   trunk/OzinoCMS/root/admin/gizmo/widget/checkbox.tt
   trunk/OzinoCMS/root/admin/gizmo/widget/convertHash2Yaml.pl
   trunk/OzinoCMS/root/admin/gizmo/widget/example.txt
   trunk/OzinoCMS/root/admin/gizmo/widget/fieldset.tt
   trunk/OzinoCMS/root/admin/gizmo/widget/file.tt
   trunk/OzinoCMS/root/admin/gizmo/widget/hidden.tt
   trunk/OzinoCMS/root/admin/gizmo/widget/html.tt
   trunk/OzinoCMS/root/admin/gizmo/widget/password.tt
   trunk/OzinoCMS/root/admin/gizmo/widget/radio.tt
   trunk/OzinoCMS/root/admin/gizmo/widget/select.tt
   trunk/OzinoCMS/root/admin/gizmo/widget/text.tt
   trunk/OzinoCMS/root/admin/gizmo/widget/textarea.tt
   trunk/OzinoCMS/root/admin/header.tt
   trunk/OzinoCMS/root/admin/headerImage.tt
   trunk/OzinoCMS/root/admin/menu.tt
   trunk/OzinoCMS/root/admin/navigation/
   trunk/OzinoCMS/root/admin/navigation/addEditItem.tt
   trunk/OzinoCMS/root/admin/navigation/addedit.tt
   trunk/OzinoCMS/root/admin/navigation/default.tt
   trunk/OzinoCMS/root/admin/navigation/manageItem.tt
   trunk/OzinoCMS/root/admin/navigation/typeWidget.tt
   trunk/OzinoCMS/root/admin/page/
   trunk/OzinoCMS/root/admin/page/addedit.tt
   trunk/OzinoCMS/root/admin/page/addeditpagelang.tt
   trunk/OzinoCMS/root/admin/page/catpagelist.tt
   trunk/OzinoCMS/root/admin/page/default.tt
   trunk/OzinoCMS/root/admin/page/editContent/
   trunk/OzinoCMS/root/admin/page/editContent/adminHotLink.tt
   trunk/OzinoCMS/root/admin/page/editContent/index.tt
   trunk/OzinoCMS/root/admin/page/orderList.tt
   trunk/OzinoCMS/root/admin/page/showPageLang.tt
   trunk/OzinoCMS/root/admin/reseller.tt
   trunk/OzinoCMS/root/admin/reseller/
   trunk/OzinoCMS/root/admin/reseller/addUser.tt
   trunk/OzinoCMS/root/admin/reseller/addWebsite.tt
   trunk/OzinoCMS/root/admin/reseller/viewSingleWebsite.tt
   trunk/OzinoCMS/root/admin/reseller/websiteList.tt
   trunk/OzinoCMS/root/admin/root.tt
   trunk/OzinoCMS/root/admin/root/
   trunk/OzinoCMS/root/admin/root/resellerList.tt
   trunk/OzinoCMS/root/admin/root/singleReseller.tt
   trunk/OzinoCMS/root/admin/webSite/
   trunk/OzinoCMS/root/admin/website.tt
   trunk/OzinoCMS/root/admin_admin-back.tt
   trunk/OzinoCMS/root/core/
   trunk/OzinoCMS/root/core/navigation/
   trunk/OzinoCMS/root/core/navigation/list.tt
   trunk/OzinoCMS/root/core/navigation/listItem.tt
   trunk/OzinoCMS/root/core/navigation/resultList.tt
   trunk/OzinoCMS/root/default.tt
   trunk/OzinoCMS/root/emailBody/
   trunk/OzinoCMS/root/emailBody/lostPassword.tt
   trunk/OzinoCMS/root/emailBody/newPassword.tt
   trunk/OzinoCMS/root/favicon.ico
   trunk/OzinoCMS/root/files/
   trunk/OzinoCMS/root/files/list.tt
   trunk/OzinoCMS/root/files/upload.tt
   trunk/OzinoCMS/root/login.tt
   trunk/OzinoCMS/root/lostPassword.tt
   trunk/OzinoCMS/root/modules/
   trunk/OzinoCMS/root/modules/ajaxupdater.tt
   trunk/OzinoCMS/root/modules/includeScripts.tt
   trunk/OzinoCMS/root/modules/navTypeList.tt
   trunk/OzinoCMS/root/modules/pageFooter.tt
   trunk/OzinoCMS/root/modules/pageHeader.tt
   trunk/OzinoCMS/root/modules/showErrorInput.tt
   trunk/OzinoCMS/root/modules/showInfoMessage.tt
   trunk/OzinoCMS/root/modules/showLanguages.tt
   trunk/OzinoCMS/root/modules/showMulSelGroupsUsers.tt
   trunk/OzinoCMS/root/modules/skinList.tt
   trunk/OzinoCMS/root/modules/statusList.tt
   trunk/OzinoCMS/root/notFound.tt
   trunk/OzinoCMS/root/static/
   trunk/OzinoCMS/root/static/images/
   trunk/OzinoCMS/root/static/images/adminHotLinkBack.png
   trunk/OzinoCMS/root/static/images/background.gif
   trunk/OzinoCMS/root/static/images/bar.gif
   trunk/OzinoCMS/root/static/images/btn_120x50_built.png
   trunk/OzinoCMS/root/static/images/btn_120x50_built_shadow.png
   trunk/OzinoCMS/root/static/images/btn_120x50_powered.png
   trunk/OzinoCMS/root/static/images/btn_120x50_powered_shadow.png
   trunk/OzinoCMS/root/static/images/btn_88x31_built.png
   trunk/OzinoCMS/root/static/images/btn_88x31_built_shadow.png
   trunk/OzinoCMS/root/static/images/btn_88x31_powered.png
   trunk/OzinoCMS/root/static/images/btn_88x31_powered_shadow.png
   trunk/OzinoCMS/root/static/images/catalyst_logo.png
   trunk/OzinoCMS/root/static/images/fade-butt.png
   trunk/OzinoCMS/root/static/images/header.gif
   trunk/OzinoCMS/root/static/images/help-browser.png
   trunk/OzinoCMS/root/static/images/icon.gif
   trunk/OzinoCMS/root/static/images/icon/
   trunk/OzinoCMS/root/static/images/icon/acroread.png
   trunk/OzinoCMS/root/static/images/icon/add.gif
   trunk/OzinoCMS/root/static/images/icon/add.png
   trunk/OzinoCMS/root/static/images/icon/audio.png
   trunk/OzinoCMS/root/static/images/icon/back.gif
   trunk/OzinoCMS/root/static/images/icon/cut.png
   trunk/OzinoCMS/root/static/images/icon/delete.png
   trunk/OzinoCMS/root/static/images/icon/down.png
   trunk/OzinoCMS/root/static/images/icon/edit.png
   trunk/OzinoCMS/root/static/images/icon/editContent.gif
   trunk/OzinoCMS/root/static/images/icon/ms-excel.png
   trunk/OzinoCMS/root/static/images/icon/ms-word.png
   trunk/OzinoCMS/root/static/images/icon/next.gif
   trunk/OzinoCMS/root/static/images/icon/openoffice-calc.png
   trunk/OzinoCMS/root/static/images/icon/openoffice-draw.png
   trunk/OzinoCMS/root/static/images/icon/openoffice-impress.png
   trunk/OzinoCMS/root/static/images/icon/openoffice-math.png
   trunk/OzinoCMS/root/static/images/icon/openoffice-writer.png
   trunk/OzinoCMS/root/static/images/icon/paste.png
   trunk/OzinoCMS/root/static/images/icon/ppt_icon.png
   trunk/OzinoCMS/root/static/images/icon/right.png
   trunk/OzinoCMS/root/static/images/icon/txt.gif
   trunk/OzinoCMS/root/static/images/icon/unknown.gif
   trunk/OzinoCMS/root/static/images/icon/up.png
   trunk/OzinoCMS/root/static/images/icon/video.png
   trunk/OzinoCMS/root/static/images/icon/zip.png
   trunk/OzinoCMS/root/static/images/lightbox/
   trunk/OzinoCMS/root/static/images/lightbox/blank.gif
   trunk/OzinoCMS/root/static/images/lightbox/close.gif
   trunk/OzinoCMS/root/static/images/lightbox/closelabel.gif
   trunk/OzinoCMS/root/static/images/lightbox/image-1.jpg
   trunk/OzinoCMS/root/static/images/lightbox/loading.gif
   trunk/OzinoCMS/root/static/images/lightbox/next.gif
   trunk/OzinoCMS/root/static/images/lightbox/nextlabel.gif
   trunk/OzinoCMS/root/static/images/lightbox/prev.gif
   trunk/OzinoCMS/root/static/images/lightbox/prevlabel.gif
   trunk/OzinoCMS/root/static/images/lightbox/thumb-1.jpg
   trunk/OzinoCMS/root/static/images/login_bottom-corner.gif
   trunk/OzinoCMS/root/static/images/login_containerBorder.gif
   trunk/OzinoCMS/root/static/images/login_top-corner.gif
   trunk/OzinoCMS/root/static/images/logo.gif
   trunk/OzinoCMS/root/static/images/logo1.gif
   trunk/OzinoCMS/root/static/images/rainbow.office.ozino.com/
   trunk/OzinoCMS/root/static/images/rainbow.office.ozino.com/7.jpeg
   trunk/OzinoCMS/root/static/images/rainbow.office.ozino.com/body_background.gif
   trunk/OzinoCMS/root/static/images/rainbow.office.ozino.com/bottomleft.gif
   trunk/OzinoCMS/root/static/images/rainbow.office.ozino.com/bottomright.gif
   trunk/OzinoCMS/root/static/images/rainbow.office.ozino.com/picture.gif
   trunk/OzinoCMS/root/static/images/rainbow.office.ozino.com/topleft.gif
   trunk/OzinoCMS/root/static/images/rainbow.office.ozino.com/topright.gif
   trunk/OzinoCMS/root/static/images/shuttl.office.ozino.com/
   trunk/OzinoCMS/root/static/images/shuttl.office.ozino.com/body_background.gif
   trunk/OzinoCMS/root/static/images/shuttl.office.ozino.com/bottomleft.gif
   trunk/OzinoCMS/root/static/images/shuttl.office.ozino.com/bottomright.gif
   trunk/OzinoCMS/root/static/images/shuttl.office.ozino.com/picture.gif
   trunk/OzinoCMS/root/static/images/shuttl.office.ozino.com/topleft.gif
   trunk/OzinoCMS/root/static/images/shuttl.office.ozino.com/topright.gif
   trunk/OzinoCMS/root/static/javascript/
   trunk/OzinoCMS/root/static/javascript/common.js
   trunk/OzinoCMS/root/static/javascript/effects.js
   trunk/OzinoCMS/root/static/javascript/lightbox.js
   trunk/OzinoCMS/root/static/javascript/progress.jmpl
   trunk/OzinoCMS/root/static/javascript/progress.jmpl.js
   trunk/OzinoCMS/root/static/javascript/progress.js
   trunk/OzinoCMS/root/static/javascript/prototype.js
   trunk/OzinoCMS/root/static/javascript/scriptaculous.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/blank.htm
   trunk/OzinoCMS/root/static/javascript/tiny_mce/langs/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/langs/en.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/langs/readme.txt
   trunk/OzinoCMS/root/static/javascript/tiny_mce/license.txt
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/_template/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/_template/editor_plugin.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/_template/editor_plugin_src.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/_template/images/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/_template/images/template.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/_template/langs/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/_template/langs/en.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/_template/popup.htm
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/_template/readme.txt
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advhr/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advhr/css/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advhr/css/advhr.css
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advhr/editor_plugin.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advhr/editor_plugin_src.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advhr/images/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advhr/images/advhr.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advhr/jscripts/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advhr/jscripts/rule.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advhr/langs/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advhr/langs/en.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advhr/readme.txt
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advhr/rule.htm
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advimage/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advimage/css/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advimage/css/advimage.css
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advimage/editor_plugin.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advimage/editor_plugin_src.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advimage/image.htm
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advimage/images/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advimage/images/sample.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advimage/jscripts/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advimage/jscripts/functions.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advimage/langs/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advimage/langs/en.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advimage/readme.txt
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advlink/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advlink/css/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advlink/css/advlink.css
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advlink/editor_plugin.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advlink/editor_plugin_src.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advlink/jscripts/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advlink/jscripts/functions.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advlink/langs/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advlink/langs/en.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advlink/link.htm
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advlink/readme.txt
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/autosave/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/autosave/editor_plugin.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/autosave/editor_plugin_src.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/autosave/langs/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/autosave/langs/en.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/autosave/readme.txt
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/cleanup/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/cleanup/editor_plugin.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/cleanup/editor_plugin_src.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/cleanup/readme.txt
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/contextmenu/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/contextmenu/css/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/contextmenu/css/contextmenu.css
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/contextmenu/editor_plugin.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/contextmenu/editor_plugin_src.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/contextmenu/images/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/contextmenu/images/spacer.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/contextmenu/readme.txt
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/directionality/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/directionality/editor_plugin.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/directionality/editor_plugin_src.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/directionality/images/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/directionality/images/ltr.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/directionality/images/rtl.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/directionality/langs/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/directionality/langs/en.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/directionality/readme.txt
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/editor_plugin.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/editor_plugin_src.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/emotions.htm
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/images/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/images/emotions.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/images/readme.txt
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/images/smiley-cool.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/images/smiley-cry.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/images/smiley-embarassed.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/images/smiley-foot-in-mouth.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/images/smiley-frown.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/images/smiley-innocent.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/images/smiley-kiss.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/images/smiley-laughing.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/images/smiley-money-mouth.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/images/smiley-sealed.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/images/smiley-smile.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/images/smiley-surprised.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/images/smiley-tongue-out.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/images/smiley-undecided.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/images/smiley-wink.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/images/smiley-yell.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/jscripts/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/jscripts/functions.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/langs/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/langs/en.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/readme.txt
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/flash/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/flash/css/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/flash/css/content.css
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/flash/css/flash.css
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/flash/editor_plugin.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/flash/editor_plugin_src.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/flash/flash.htm
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/flash/images/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/flash/images/flash.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/flash/jscripts/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/flash/jscripts/flash.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/flash/langs/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/flash/langs/en.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/flash/readme.txt
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullpage/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullpage/blank.htm
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullpage/css/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullpage/css/fullpage.css
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullpage/editor_plugin.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullpage/editor_plugin_src.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullpage/fullpage.htm
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullpage/images/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullpage/images/add.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullpage/images/fullpage.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullpage/images/move_down.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullpage/images/move_up.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullpage/images/remove.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullpage/jscripts/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullpage/jscripts/fullpage.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullpage/langs/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullpage/langs/en.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullscreen/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullscreen/editor_plugin.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullscreen/editor_plugin_src.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullscreen/fullscreen.htm
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullscreen/images/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullscreen/images/fullscreen.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullscreen/langs/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullscreen/langs/en.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullscreen/readme.txt
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/iespell/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/iespell/editor_plugin.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/iespell/editor_plugin_src.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/iespell/images/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/iespell/images/iespell.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/iespell/langs/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/iespell/langs/en.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/iespell/readme.txt
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/inlinepopups/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/inlinepopups/css/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/inlinepopups/css/inlinepopup.css
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/inlinepopups/editor_plugin.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/inlinepopups/editor_plugin_src.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/inlinepopups/images/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/inlinepopups/images/spacer.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/inlinepopups/images/window_close.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/inlinepopups/images/window_maximize.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/inlinepopups/images/window_minimize.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/inlinepopups/images/window_resize.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/inlinepopups/jscripts/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/inlinepopups/jscripts/mcwindows.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/inlinepopups/readme.txt
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/insertdatetime/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/insertdatetime/editor_plugin.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/insertdatetime/editor_plugin_src.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/insertdatetime/images/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/insertdatetime/images/insertdate.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/insertdatetime/images/inserttime.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/insertdatetime/langs/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/insertdatetime/langs/en.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/insertdatetime/readme.txt
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/layer/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/layer/editor_plugin.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/layer/editor_plugin_src.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/layer/images/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/layer/images/absolute.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/layer/images/backward.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/layer/images/forward.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/layer/images/insert_layer.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/layer/langs/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/layer/langs/en.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/layer/readme.txt
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/noneditable/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/noneditable/css/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/noneditable/css/noneditable.css
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/noneditable/editor_plugin.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/noneditable/editor_plugin_src.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/noneditable/readme.txt
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/paste/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/paste/blank.htm
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/paste/css/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/paste/css/blank.css
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/paste/css/pasteword.css
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/paste/editor_plugin.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/paste/editor_plugin_src.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/paste/images/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/paste/images/pastetext.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/paste/images/pasteword.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/paste/images/selectall.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/paste/jscripts/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/paste/jscripts/pastetext.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/paste/jscripts/pasteword.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/paste/langs/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/paste/langs/en.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/paste/pastetext.htm
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/paste/pasteword.htm
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/paste/readme.txt
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/preview/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/preview/editor_plugin.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/preview/editor_plugin_src.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/preview/example.html
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/preview/images/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/preview/images/preview.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/preview/langs/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/preview/langs/en.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/preview/readme.txt
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/print/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/print/editor_plugin.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/print/editor_plugin_src.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/print/images/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/print/images/print.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/print/langs/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/print/langs/en.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/print/readme.txt
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/readme.txt
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/save/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/save/editor_plugin.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/save/editor_plugin_src.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/save/images/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/save/images/save.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/save/langs/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/save/langs/en.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/save/readme.txt
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/searchreplace/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/searchreplace/editor_plugin.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/searchreplace/editor_plugin_src.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/searchreplace/images/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/searchreplace/images/replace.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/searchreplace/images/search.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/searchreplace/jscripts/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/searchreplace/jscripts/replace.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/searchreplace/jscripts/search.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/searchreplace/langs/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/searchreplace/langs/en.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/searchreplace/readme.txt
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/searchreplace/replace.htm
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/searchreplace/search.htm
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/style/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/style/css/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/style/css/props.css
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/style/editor_plugin.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/style/editor_plugin_src.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/style/images/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/style/images/apply_button_bg.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/style/images/style_info.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/style/jscripts/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/style/jscripts/props.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/style/langs/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/style/langs/en.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/style/props.htm
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/style/readme.txt
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/cell.htm
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/css/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/css/cell.css
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/css/row.css
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/css/table.css
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/editor_plugin.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/editor_plugin_src.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/images/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/images/buttons.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/images/table.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/images/table_cell_props.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/images/table_delete.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/images/table_delete_col.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/images/table_delete_row.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/images/table_insert_col_after.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/images/table_insert_col_before.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/images/table_insert_row_after.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/images/table_insert_row_before.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/images/table_merge_cells.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/images/table_row_props.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/images/table_split_cells.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/jscripts/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/jscripts/cell.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/jscripts/merge_cells.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/jscripts/row.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/jscripts/table.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/langs/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/langs/en.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/merge_cells.htm
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/readme.txt
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/row.htm
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/table.htm
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/zoom/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/zoom/editor_plugin.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/zoom/editor_plugin_src.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/zoom/readme.txt
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/about.htm
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/anchor.htm
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/charmap.htm
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/color_picker.htm
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/css/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/css/editor_content.css
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/css/editor_popup.css
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/css/editor_ui.css
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/docs/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/docs/en/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/docs/en/about.htm
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/docs/en/common_buttons.htm
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/docs/en/create_accessible_content.htm
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/docs/en/images/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/docs/en/images/insert_anchor_window.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/docs/en/images/insert_image_window.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/docs/en/images/insert_link_window.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/docs/en/images/insert_table_window.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/docs/en/index.htm
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/docs/en/insert_anchor_button.htm
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/docs/en/insert_image_button.htm
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/docs/en/insert_link_button.htm
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/docs/en/insert_table_button.htm
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/docs/en/style.css
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/editor_template.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/editor_template_src.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/image.htm
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/anchor.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/anchor_symbol.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/backcolor.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/bold.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/bold_de_se.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/bold_es.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/bold_fr.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/bold_ru.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/bold_tw.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/browse.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/bullist.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/button_menu.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/buttons.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/cancel_button_bg.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/charmap.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/cleanup.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/close.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/code.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/color.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/copy.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/custom_1.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/cut.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/forecolor.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/help.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/hr.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/image.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/indent.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/insert_button_bg.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/italic.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/italic_de_se.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/italic_es.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/italic_ru.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/italic_tw.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/justifycenter.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/justifyfull.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/justifyleft.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/justifyright.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/link.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/menu_check.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/newdocument.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/numlist.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/opacity.png
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/outdent.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/paste.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/redo.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/removeformat.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/separator.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/spacer.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/statusbar_resize.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/strikethrough.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/sub.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/sup.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/underline.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/underline_es.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/underline_fr.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/underline_ru.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/underline_tw.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/undo.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/unlink.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/visualaid.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/xp/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/xp/tab_bg.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/xp/tab_end.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/xp/tab_sel_bg.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/xp/tab_sel_end.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/xp/tabs_bg.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/jscripts/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/jscripts/about.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/jscripts/anchor.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/jscripts/charmap.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/jscripts/color_picker.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/jscripts/image.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/jscripts/link.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/jscripts/source_editor.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/langs/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/langs/en.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/link.htm
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/source_editor.htm
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/css/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/css/editor_content.css
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/css/editor_popup.css
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/css/editor_ui.css
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/editor_template.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/editor_template_src.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/bold.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/bold_de_se.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/bold_fr.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/bold_ru.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/bold_tw.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/bullist.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/buttons.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/cleanup.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/italic.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/italic_de_se.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/italic_ru.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/italic_tw.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/numlist.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/redo.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/separator.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/spacer.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/strikethrough.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/underline.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/underline_fr.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/underline_ru.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/underline_tw.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/undo.gif
   trunk/OzinoCMS/root/static/javascript/tiny_mce/tiny_mce.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/tiny_mce_popup.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/tiny_mce_src.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/utils/
   trunk/OzinoCMS/root/static/javascript/tiny_mce/utils/editable_selects.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/utils/form_utils.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/utils/mclayer.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/utils/mctabs.js
   trunk/OzinoCMS/root/static/javascript/tiny_mce/utils/validate.js
   trunk/OzinoCMS/root/static/style/
   trunk/OzinoCMS/root/static/style/add-style.css
   trunk/OzinoCMS/root/static/style/lightbox.css
   trunk/OzinoCMS/root/static/style/login.css
   trunk/OzinoCMS/root/static/style/progress.css
   trunk/OzinoCMS/root/static/style/rainbow.office.ozino.com/
   trunk/OzinoCMS/root/static/style/rainbow.office.ozino.com/images/
   trunk/OzinoCMS/root/static/style/rainbow.office.ozino.com/images/body_background.gif
   trunk/OzinoCMS/root/static/style/rainbow.office.ozino.com/images/bottomleft.gif
   trunk/OzinoCMS/root/static/style/rainbow.office.ozino.com/images/bottomright.gif
   trunk/OzinoCMS/root/static/style/rainbow.office.ozino.com/images/picture.gif
   trunk/OzinoCMS/root/static/style/rainbow.office.ozino.com/images/topleft.gif
   trunk/OzinoCMS/root/static/style/rainbow.office.ozino.com/images/topright.gif
   trunk/OzinoCMS/root/static/style/rainbow.office.ozino.com/style.css
   trunk/OzinoCMS/root/static/style/shuttle.office.ozino.com/
   trunk/OzinoCMS/root/static/style/shuttle.office.ozino.com/images/
   trunk/OzinoCMS/root/static/style/shuttle.office.ozino.com/images/body_background.gif
   trunk/OzinoCMS/root/static/style/shuttle.office.ozino.com/images/bottomleft.gif
   trunk/OzinoCMS/root/static/style/shuttle.office.ozino.com/images/bottomright.gif
   trunk/OzinoCMS/root/static/style/shuttle.office.ozino.com/images/picture.gif
   trunk/OzinoCMS/root/static/style/shuttle.office.ozino.com/images/topleft.gif
   trunk/OzinoCMS/root/static/style/shuttle.office.ozino.com/images/topright.gif
   trunk/OzinoCMS/root/static/style/shuttle.office.ozino.com/style.css
   trunk/OzinoCMS/root/static/style/style.css
   trunk/OzinoCMS/script/
   trunk/OzinoCMS/script/cms_cgi.pl
   trunk/OzinoCMS/script/cms_create.pl
   trunk/OzinoCMS/script/cms_create_dbic.sh
   trunk/OzinoCMS/script/cms_fastcgi.pl
   trunk/OzinoCMS/script/cms_server.pl
   trunk/OzinoCMS/script/cms_test.pl
   trunk/OzinoCMS/t/
   trunk/OzinoCMS/t/01app.t
   trunk/OzinoCMS/t/02pod.t
   trunk/OzinoCMS/t/03podcoverage.t
   trunk/OzinoCMS/t/controller_Admin-Reseller.t
   trunk/OzinoCMS/t/controller_Admin-Root.t
   trunk/OzinoCMS/t/controller_Admin-Website-Baghali.t
   trunk/OzinoCMS/t/controller_Admin-Website-Category.t
   trunk/OzinoCMS/t/controller_Admin-Website-File.t
   trunk/OzinoCMS/t/controller_Admin-Website-Gizmo.t
   trunk/OzinoCMS/t/controller_Admin-Website-Navigation.t
   trunk/OzinoCMS/t/controller_Admin-Website-Page.t
   trunk/OzinoCMS/t/controller_Admin-Website.t
   trunk/OzinoCMS/t/controller_Auth.t
   trunk/OzinoCMS/t/controller_Common-General.t
   trunk/OzinoCMS/t/controller_Common-UserGroup.t
   trunk/OzinoCMS/t/controller_Common.t
   trunk/OzinoCMS/t/controller_Core-Category.t
   trunk/OzinoCMS/t/controller_Core-File-Image.t
   trunk/OzinoCMS/t/controller_Core-File.t
   trunk/OzinoCMS/t/controller_Core-Module.t
   trunk/OzinoCMS/t/controller_Core-Navigation.t
   trunk/OzinoCMS/t/controller_Core-Page.t
   trunk/OzinoCMS/t/controller_Core.t
   trunk/OzinoCMS/t/controller_File-Upload.t
   trunk/OzinoCMS/t/controller__Modules-Menu.t
   trunk/OzinoCMS/t/controller__Modules-Navigator.t
   trunk/OzinoCMS/t/controller__Modules-ShowProductList.t
   trunk/OzinoCMS/t/controller__Modules-test.t
   trunk/OzinoCMS/t/controller__Modules-viewProduct.t
   trunk/OzinoCMS/t/controller__Modules.t
   trunk/OzinoCMS/t/controller_cms.t
   trunk/OzinoCMS/t/model_CmsDB.t
   trunk/OzinoCMS/t/view_TT.t
Log:
OzinoCMS first commit.

Added: trunk/OzinoCMS/Changes
===================================================================
--- trunk/OzinoCMS/Changes	                        (rev 0)
+++ trunk/OzinoCMS/Changes	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,4 @@
+This file documents the revision history for Perl extension cms.
+
+0.01  2006-12-18 16:12:57
+        - initial revision, generated by Catalyst

Added: trunk/OzinoCMS/Makefile.PL
===================================================================
--- trunk/OzinoCMS/Makefile.PL	                        (rev 0)
+++ trunk/OzinoCMS/Makefile.PL	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,16 @@
+use inc::Module::Install;
+
+name 'cms';
+all_from 'lib/cms.pm';
+
+requires 'Catalyst' => '5.7006';
+requires 'Catalyst::Plugin::ConfigLoader';
+requires 'Catalyst::Plugin::Static::Simple';
+requires 'Catalyst::Action::RenderView';
+requires 'YAML'; # This should reflect the config file format you've chosen
+                 # See Catalyst::Plugin::ConfigLoader for supported formats
+catalyst;
+
+install_script glob('script/*.pl');
+auto_install;
+WriteAll;

Added: trunk/OzinoCMS/README
===================================================================
--- trunk/OzinoCMS/README	                        (rev 0)
+++ trunk/OzinoCMS/README	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1 @@
+Run script/cms_server.pl to test the application.

Added: trunk/OzinoCMS/cms.yml
===================================================================
--- trunk/OzinoCMS/cms.yml	                        (rev 0)
+++ trunk/OzinoCMS/cms.yml	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,123 @@
+name: cms
+authentication:
+    dbic:
+        user_class : 'CmsDB::VUsernameOnWebsiteid'
+        user_field : 'global_username'
+        password_field : 'password'
+        password_type : 'hashed'
+        password_hash_type : 'MD5'
+
+authorization:
+    dbic:
+        role_class : 'CmsDB::Role'
+        role_field : 'role'
+        role_rel : 'map_user_role'
+        user_role_user_field : 'userid'
+
+validator: 
+    messages: 'messages/messages.yml'
+
+mail: 
+    smtp: 'mail.ozino.com'
+    username : 'web2_reza'
+    password : 'Monaliz~a'
+    fromEmail : 'reza at ozino.com'
+
+email:
+    - SMTP
+    - mail.ozino.com
+    - username
+    - web2_reza
+    - password
+    - Monaliz~a
+
+general:
+    statuses:
+        - title: 'Draft'
+          value: 1
+        - title: 'Prepublish'
+          value: 2
+        - title: 'Published'
+          value: 3
+        - title: 'Archived'
+          value: 4
+    scopes:
+        - title: 'Website'
+          value: 1
+        - title: 'Category'
+          value: 2
+        - title: 'Page'
+          value: 3
+
+navigation:
+    types:
+        - id: 1
+          title: 'Category'
+        - id: 2
+          title: 'Page'
+        - id: 3
+          title: 'Path'
+        - id: 4
+          title: 'From Here'
+
+files:
+#    base_address: '/files/projects/ozino/cms/trunk/cms/root/static/webfiles'
+    base_address: '/files/Project/cms/trunk/cms/root/static/webfiles'
+    max_size: 
+        size: 5000000
+        h_size_title: '5 M-Bytes'
+    image:
+        sizes: [ 150, 100 ]
+        thumbnail_size: 150
+    types:
+        application:
+            - name: 'pdf'
+              icon: 'acroread.png'
+            - name: 'mswd'
+              icon: 'ms-word.png'
+            - name: 'msword'
+              icon: 'ms-word.png'
+            - name: 'vnd.ms-excel'
+              icon: 'ms-excel.png'
+            - name: 'vnd.ms-powerpoint'
+              icon: 'ppt_icon.png'
+            - name: 'vnd.sun.xml.writer.template'
+              icon: 'openoffice-writer.png'
+            - name: 'vnd.oasis.opendocument.text'
+              icon: 'openoffice-writer.png'
+            - name: 'vnd.sun.xml.math'
+              icon: 'openoffice-math.png'
+            - name: 'vnd.sun.xml.impress'
+              icon: 'openoffice-impress.png'
+            - name: 'vnd.sun.xml.draw'
+              icon: 'openoffice-draw.png'
+            - name: 'vnd.sun.xml.calc'
+              icon: 'openoffice-calc.png'
+            - name: 'zip'
+              icon: 'zip.png'
+            - name: 'x-tar'
+              icon: 'zip.png'
+            - name: 'x-bzip'
+              icon: 'zip.png'
+            - name: 'x-rar'
+              icon: 'zip.png'
+            - name: 'x-gzip'
+              icon: 'zip.png'
+            - name: 'vnd.sun.xml.writer'
+              icon: 'openoffice-writer.png'
+            - name: 'octet-stream'
+              icon: 'unknown.gif'
+        video:
+            - name: 'x-msvideo'
+              icon: 'video.png'
+            - name: 'x-ms-asf'
+              icon: 'video.png'
+            - name: 'mpeg'
+              icon: 'video.png'
+        audio:
+            - name: 'mpeg'
+              icon: 'audio.png'
+        text:
+            - name: 'plain'
+              icon: 'txt.gif'
+

Added: trunk/OzinoCMS/database/cms.sql
===================================================================
--- trunk/OzinoCMS/database/cms.sql	                        (rev 0)
+++ trunk/OzinoCMS/database/cms.sql	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,974 @@
+-- MySQL dump 10.10
+--
+-- Host: 21.21.21.3    Database: cms
+-- ------------------------------------------------------
+-- Server version	5.0.24a-Debian_4-log
+
+/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
+/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
+/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
+/*!40101 SET NAMES utf8 */;
+/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
+/*!40103 SET TIME_ZONE='+00:00' */;
+/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
+/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
+/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
+/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
+
+--
+-- Table structure for table `category`
+--
+
+DROP TABLE IF EXISTS `category`;
+CREATE TABLE `category` (
+  `id` int(10) unsigned NOT NULL auto_increment,
+  `website_id` int(10) unsigned NOT NULL default '0',
+  `parent_id` int(10) unsigned default NULL,
+  `order` int(11) NOT NULL default '0',
+  `status` tinyint(3) unsigned NOT NULL default '1' COMMENT '1- Draft, 2- Prepublished, 3- Published, 4- Archived',
+  `default_page_id` int(10) unsigned default NULL,
+  PRIMARY KEY  (`id`),
+  KEY `FK_CATEGORY-CATEGORY-PARENT_ID-ID` (`parent_id`),
+  KEY `FK_CATEGORY-WEBSITE-WEBSITE_ID-ID` (`website_id`),
+  KEY `FK-CATEGROY-PAGE-DEFPGID-ID` (`default_page_id`),
+  CONSTRAINT `FK-CATEGROY-PAGE-DEFPGID-ID` FOREIGN KEY (`default_page_id`) REFERENCES `page` (`id`) ON DELETE SET NULL ON UPDATE SET NULL,
+  CONSTRAINT `fk_category` FOREIGN KEY (`parent_id`) REFERENCES `category` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
+  CONSTRAINT `FK_CATEGORY-WEBSITE-WEBSITE_ID-ID` FOREIGN KEY (`website_id`) REFERENCES `website` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+--
+-- Dumping data for table `category`
+--
+
+
+/*!40000 ALTER TABLE `category` DISABLE KEYS */;
+LOCK TABLES `category` WRITE;
+
+UNLOCK TABLES;
+/*!40000 ALTER TABLE `category` ENABLE KEYS */;
+
+--
+-- Table structure for table `category_lang`
+--
+
+DROP TABLE IF EXISTS `category_lang`;
+CREATE TABLE `category_lang` (
+  `id` int(10) unsigned NOT NULL auto_increment,
+  `category_id` int(10) unsigned default NULL,
+  `language_id` varchar(5) NOT NULL default '',
+  `title` varchar(45) NOT NULL default '',
+  `description` varchar(100) NOT NULL default '',
+  `default_skin_id` int(10) unsigned default NULL,
+  PRIMARY KEY  (`id`),
+  KEY `FK_CATEGORY_LANG-CATEGORY-CATEGORY_ID-ID` (`category_id`),
+  KEY `FK_CATEGORY_LANG-LANGUAGE-LANGUAGE_ID-ID` (`language_id`),
+  KEY `FK_CATEGORY_LANG-SKIN-DEFAULT_SKIN_ID-ID` (`default_skin_id`),
+  CONSTRAINT `FK_CATEGORY_LANG-CATEGORY-CATEGORY_ID-ID` FOREIGN KEY (`category_id`) REFERENCES `category` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
+  CONSTRAINT `FK_CATEGORY_LANG-LANGUAGE-LANGUAGE_ID-ID` FOREIGN KEY (`language_id`) REFERENCES `language` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
+  CONSTRAINT `FK_CATEGORY_LANG-SKIN-DEFAULT_SKIN_ID-ID` FOREIGN KEY (`default_skin_id`) REFERENCES `skin` (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+--
+-- Dumping data for table `category_lang`
+--
+
+
+/*!40000 ALTER TABLE `category_lang` DISABLE KEYS */;
+LOCK TABLES `category_lang` WRITE;
+
+UNLOCK TABLES;
+/*!40000 ALTER TABLE `category_lang` ENABLE KEYS */;
+
+--
+-- Table structure for table `file`
+--
+
+DROP TABLE IF EXISTS `file`;
+CREATE TABLE `file` (
+  `id` int(10) unsigned NOT NULL auto_increment,
+  `website_id` int(10) unsigned default NULL,
+  `title` varchar(254) default NULL,
+  `description` text,
+  `ext` varchar(10) default NULL,
+  `type` varchar(100) NOT NULL,
+  PRIMARY KEY  (`id`),
+  KEY `FK-FILE-WEBSITE-WEBSITE_ID-ID` (`website_id`),
+  CONSTRAINT `FK-FILE-WEBSITE-WEBSITE_ID-ID` FOREIGN KEY (`website_id`) REFERENCES `website` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Files table to hold website files data.';
+
+--
+-- Dumping data for table `file`
+--
+
+
+/*!40000 ALTER TABLE `file` DISABLE KEYS */;
+LOCK TABLES `file` WRITE;
+
+UNLOCK TABLES;
+/*!40000 ALTER TABLE `file` ENABLE KEYS */;
+
+--
+-- Table structure for table `gizmo`
+--
+
+DROP TABLE IF EXISTS `gizmo`;
+CREATE TABLE `gizmo` (
+  `id` int(10) unsigned NOT NULL auto_increment,
+  `website_id` int(10) unsigned NOT NULL,
+  `order` int(11) NOT NULL default '0',
+  `category_id` int(11) default NULL,
+  `page_id` int(11) default NULL,
+  `module_name` varchar(50) NOT NULL,
+  `contentarea` varchar(100) NOT NULL,
+  `status` tinyint(3) unsigned NOT NULL default '1' COMMENT '1- Draft, 2- Prepublished, 3- Published, 4- Archived',
+  `version` varchar(10) default NULL,
+  `deleted` tinyint(1) NOT NULL default '0',
+  PRIMARY KEY  (`id`),
+  KEY `FK_GIZMO-MODULE-MODULE_NAME-NAME` (`module_name`),
+  KEY `FK_GIZMO-WEBSITE-WEBSITE_ID-ID` (`website_id`),
+  CONSTRAINT `FK_GIZMO-MODULE-MODULE_NAME-NAME` FOREIGN KEY (`module_name`) REFERENCES `module` (`name`) ON DELETE CASCADE,
+  CONSTRAINT `FK_GIZMO-WEBSITE-WEBSITE_ID-ID` FOREIGN KEY (`website_id`) REFERENCES `website` (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+--
+-- Dumping data for table `gizmo`
+--
+
+
+/*!40000 ALTER TABLE `gizmo` DISABLE KEYS */;
+LOCK TABLES `gizmo` WRITE;
+
+UNLOCK TABLES;
+/*!40000 ALTER TABLE `gizmo` ENABLE KEYS */;
+
+--
+-- Table structure for table `gizmo_lang`
+--
+
+DROP TABLE IF EXISTS `gizmo_lang`;
+CREATE TABLE `gizmo_lang` (
+  `id` int(10) unsigned NOT NULL auto_increment,
+  `gizmo_id` int(10) unsigned NOT NULL,
+  `language_id` varchar(5) NOT NULL default '',
+  `name` varchar(45) NOT NULL,
+  `description` varchar(200) NOT NULL,
+  `parameter_values` text NOT NULL,
+  `latest_change_date_time` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
+  `deleted` tinyint(1) NOT NULL default '0',
+  PRIMARY KEY  (`id`),
+  KEY `FK_GIZMO_LANG-LANGUAGE-LANGUAGE_ID-ID` (`language_id`),
+  KEY `FK_GIZMO_LANG-GIZMO-GIZMO_ID-ID` (`gizmo_id`),
+  CONSTRAINT `FK_GIZMO_LANG-GIZMO-GIZMO_ID-ID` FOREIGN KEY (`gizmo_id`) REFERENCES `gizmo` (`id`) ON DELETE CASCADE,
+  CONSTRAINT `FK_GIZMO_LANG-LANGUAGE-LANGUAGE_ID-ID` FOREIGN KEY (`language_id`) REFERENCES `language` (`id`) ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+--
+-- Dumping data for table `gizmo_lang`
+--
+
+
+/*!40000 ALTER TABLE `gizmo_lang` DISABLE KEYS */;
+LOCK TABLES `gizmo_lang` WRITE;
+
+UNLOCK TABLES;
+/*!40000 ALTER TABLE `gizmo_lang` ENABLE KEYS */;
+
+--
+-- Table structure for table `group`
+--
+
+DROP TABLE IF EXISTS `group`;
+CREATE TABLE `group` (
+  `id` int(10) unsigned NOT NULL auto_increment,
+  `group_name` varchar(45) NOT NULL,
+  `group_description` varchar(100) NOT NULL,
+  `website_id` int(10) unsigned NOT NULL,
+  PRIMARY KEY  (`id`),
+  KEY `FK_GROUP-WEBSITE-WEBSITE_ID-ID` (`website_id`),
+  CONSTRAINT `FK_GROUP-WEBSITE-WEBSITE_ID-ID` FOREIGN KEY (`website_id`) REFERENCES `website` (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='website user groups';
+
+--
+-- Dumping data for table `group`
+--
+
+
+/*!40000 ALTER TABLE `group` DISABLE KEYS */;
+LOCK TABLES `group` WRITE;
+
+UNLOCK TABLES;
+/*!40000 ALTER TABLE `group` ENABLE KEYS */;
+
+--
+-- Table structure for table `group_category_permission`
+--
+
+DROP TABLE IF EXISTS `group_category_permission`;
+CREATE TABLE `group_category_permission` (
+  `id` int(10) unsigned NOT NULL auto_increment,
+  `category_id` int(10) unsigned NOT NULL,
+  `permission` tinyint(3) unsigned NOT NULL COMMENT '0: none, 1: view, 2: edit',
+  `group_id` int(10) unsigned NOT NULL,
+  PRIMARY KEY  (`id`),
+  KEY `FK_GROUP_CATEGORY_PERMISSION-GROUP-GROUP_ID-ID` (`group_id`),
+  KEY `FK_GROUP_CATEGORY_PERMISSION-GROUP-CATEGORY_ID-ID` (`category_id`),
+  CONSTRAINT `FK_GROUP_CATEGORY_PERMISSION-GROUP-CATEGORY_ID-ID` FOREIGN KEY (`category_id`) REFERENCES `category` (`id`) ON DELETE CASCADE,
+  CONSTRAINT `FK_GROUP_CATEGORY_PERMISSION-GROUP-GROUP_ID-ID` FOREIGN KEY (`group_id`) REFERENCES `group` (`id`) ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+--
+-- Dumping data for table `group_category_permission`
+--
+
+
+/*!40000 ALTER TABLE `group_category_permission` DISABLE KEYS */;
+LOCK TABLES `group_category_permission` WRITE;
+
+UNLOCK TABLES;
+/*!40000 ALTER TABLE `group_category_permission` ENABLE KEYS */;
+
+--
+-- Table structure for table `group_gizmo_permission`
+--
+
+DROP TABLE IF EXISTS `group_gizmo_permission`;
+CREATE TABLE `group_gizmo_permission` (
+  `id` int(10) unsigned NOT NULL auto_increment,
+  `gizmo_id` int(10) unsigned NOT NULL,
+  `permission` tinyint(3) unsigned NOT NULL COMMENT '0: none, 1: view, 2: edit',
+  `group_id` int(10) unsigned NOT NULL,
+  PRIMARY KEY  (`id`),
+  KEY `FK_GROUP_GIZMO_PERMISSION-GROUP-GROUP_ID-ID` (`group_id`),
+  KEY `FK_GROUP_GIZMO_PERMISSION-GROUP-GIZMO_ID-ID` (`gizmo_id`),
+  CONSTRAINT `FK_GROUP_GIZMO_PERMISSION-GROUP-GIZMO_ID-ID` FOREIGN KEY (`gizmo_id`) REFERENCES `gizmo` (`id`) ON DELETE CASCADE,
+  CONSTRAINT `FK_GROUP_GIZMO_PERMISSION-GROUP-GROUP_ID-ID` FOREIGN KEY (`group_id`) REFERENCES `group` (`id`) ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+--
+-- Dumping data for table `group_gizmo_permission`
+--
+
+
+/*!40000 ALTER TABLE `group_gizmo_permission` DISABLE KEYS */;
+LOCK TABLES `group_gizmo_permission` WRITE;
+
+UNLOCK TABLES;
+/*!40000 ALTER TABLE `group_gizmo_permission` ENABLE KEYS */;
+
+--
+-- Table structure for table `group_member`
+--
+
+DROP TABLE IF EXISTS `group_member`;
+CREATE TABLE `group_member` (
+  `group_id` int(10) unsigned NOT NULL,
+  `user_id` int(10) unsigned NOT NULL,
+  PRIMARY KEY  (`group_id`,`user_id`),
+  KEY `FK_GRPMEM-USER-USER_ID-ID` (`user_id`),
+  CONSTRAINT `FK_GRPMEM-GROUP-GROUP_ID-ID` FOREIGN KEY (`group_id`) REFERENCES `group` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
+  CONSTRAINT `FK_GRPMEM-USER-USER_ID-ID` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Members of groups';
+
+--
+-- Dumping data for table `group_member`
+--
+
+
+/*!40000 ALTER TABLE `group_member` DISABLE KEYS */;
+LOCK TABLES `group_member` WRITE;
+
+UNLOCK TABLES;
+/*!40000 ALTER TABLE `group_member` ENABLE KEYS */;
+
+--
+-- Table structure for table `group_page_permission`
+--
+
+DROP TABLE IF EXISTS `group_page_permission`;
+CREATE TABLE `group_page_permission` (
+  `id` int(10) unsigned NOT NULL auto_increment,
+  `page_id` int(10) unsigned NOT NULL,
+  `permission` tinyint(3) unsigned NOT NULL COMMENT '0: none, 1: view, 2: edit',
+  `group_id` int(10) unsigned NOT NULL,
+  PRIMARY KEY  (`id`),
+  KEY `FK_GROUP_PAGE_PERMISSION-GROUP-GROUP_ID-ID` (`group_id`),
+  KEY `FK_GROUP_PAGE_PERMISSION-GROUP-PAGE_ID-ID` (`page_id`),
+  CONSTRAINT `FK_GROUP_PAGE_PERMISSION-GROUP-GROUP_ID-ID` FOREIGN KEY (`group_id`) REFERENCES `group` (`id`) ON DELETE CASCADE,
+  CONSTRAINT `FK_GROUP_PAGE_PERMISSION-GROUP-PAGE_ID-ID` FOREIGN KEY (`page_id`) REFERENCES `page` (`id`) ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+--
+-- Dumping data for table `group_page_permission`
+--
+
+
+/*!40000 ALTER TABLE `group_page_permission` DISABLE KEYS */;
+LOCK TABLES `group_page_permission` WRITE;
+
+UNLOCK TABLES;
+/*!40000 ALTER TABLE `group_page_permission` ENABLE KEYS */;
+
+--
+-- Table structure for table `group_website_permission`
+--
+
+DROP TABLE IF EXISTS `group_website_permission`;
+CREATE TABLE `group_website_permission` (
+  `id` int(10) unsigned NOT NULL auto_increment,
+  `website_id` int(10) unsigned NOT NULL,
+  `permission` tinyint(3) unsigned NOT NULL COMMENT '0: none, 1: view, 2: edit',
+  `group_id` int(10) unsigned NOT NULL,
+  PRIMARY KEY  (`id`),
+  KEY `FK_GROUP_WEBSITE_PERMISSION-GROUP-GROUP_ID-ID` (`group_id`),
+  KEY `FK_GROUP_WEBSITE_PERMISSION-GROUP-WEBSITE_ID-ID` (`website_id`),
+  CONSTRAINT `FK_GROUP_WEBSITE_PERMISSION-GROUP-GROUP_ID-ID` FOREIGN KEY (`group_id`) REFERENCES `group` (`id`),
+  CONSTRAINT `FK_GROUP_WEBSITE_PERMISSION-GROUP-WEBSITE_ID-ID` FOREIGN KEY (`website_id`) REFERENCES `website` (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+--
+-- Dumping data for table `group_website_permission`
+--
+
+
+/*!40000 ALTER TABLE `group_website_permission` DISABLE KEYS */;
+LOCK TABLES `group_website_permission` WRITE;
+UNLOCK TABLES;
+/*!40000 ALTER TABLE `group_website_permission` ENABLE KEYS */;
+
+--
+-- Table structure for table `host_header`
+--
+
+DROP TABLE IF EXISTS `host_header`;
+CREATE TABLE `host_header` (
+  `id` int(10) unsigned NOT NULL auto_increment,
+  `website_id` int(10) unsigned NOT NULL default '0',
+  `header` varchar(250) NOT NULL default '' COMMENT 'host headers',
+  PRIMARY KEY  (`id`),
+  UNIQUE KEY `UNIQUE_HEADER` USING HASH (`header`),
+  KEY `FK_HOST_HEADER-WEBSITE-WEBSITE_ID-ID` (`website_id`),
+  CONSTRAINT `FK_HOST_HEADER-WEBSITE-WEBSITE_ID-ID` FOREIGN KEY (`website_id`) REFERENCES `website` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+--
+-- Dumping data for table `host_header`
+--
+
+
+/*!40000 ALTER TABLE `host_header` DISABLE KEYS */;
+LOCK TABLES `host_header` WRITE;
+
+UNLOCK TABLES;
+/*!40000 ALTER TABLE `host_header` ENABLE KEYS */;
+
+--
+-- Table structure for table `language`
+--
+
+DROP TABLE IF EXISTS `language`;
+CREATE TABLE `language` (
+  `id` varchar(5) NOT NULL default '',
+  `language_name` varchar(50) NOT NULL,
+  PRIMARY KEY  (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+--
+-- Dumping data for table `language`
+--
+
+
+/*!40000 ALTER TABLE `language` DISABLE KEYS */;
+LOCK TABLES `language` WRITE;
+INSERT INTO `language` VALUES ('aa','Afar'),('ab','Abkhazian'),('af','Afrikaans'),('am','Amharic'),('ar','Arabic'),('as','Assamese'),('ay','Aymara'),('az','Azerbaijani'),('ba','Bashkir'),('be','Byelorussian'),('bg','Bulgarian'),('bh','Bihari'),('bi','Bislama'),('bn','Bengali / Bangla'),('bo','Tibetan'),('br','Breton'),('ca','Catalan'),('co','Corsican'),('cs','Czech'),('cy','Welsh'),('da','Danish'),('de','German'),('dz','Bhutani'),('el','Greek'),('en','English / US'),('eo','Esperanto'),('es-es','Español'),('et','Estonian'),('eu','Basque'),('fa','Persian'),('fi','Finnish'),('fj','Fiji'),('fo','Faeroese'),('fr','French'),('fy','Frisian'),('ga','Irish'),('gd','Gaelic / Scots Gaelic'),('gl','Galician'),('gn','Guarani'),('gu','Gujarati'),('ha','Hausa'),('hi','Hindi'),('hr','Croatian'),('hu','Hungarian'),('hy','Armenian'),('ia','Interlingua'),('ie','Interlingue'),('ik','Inupiak'),('in','Indonesian'),('is','Icelandic'),('it','Italian'),('iw','Hebrew'),('ja','Japanese'),('ji','Yiddish'),('jw','Javanese'),('ka','Georgian'),('kk','Kazakh'),('kl','Greenlandic'),('km','Cambodian'),('kn','Kannada'),('ko','Korean'),('ks','Kashmiri'),('ku','Kurdish'),('ky','Kirghiz'),('la','Latin'),('ln','Lingala'),('lo','Laothian'),('lt','Lithuanian'),('lv','Latvian / Lettish'),('mg','Malagasy'),('mi','Maori'),('mk','Macedonian'),('ml','Malayalam'),('mn','Mongolian'),('mo','Moldavian'),('mr','Marathi'),('ms','Malay'),('mt','Maltese'),('my','Burmese'),('na','Nauru'),('ne','Nepali'),('nl','Dutch'),('no','Norwegian'),('oc','Occitan'),('om','Oromo / Afan'),('or','Oriya'),('pa','Punjabi'),('pl','Polish'),('ps','Pashto / Pushto'),('pt','Portuguese'),('pt-br','Brazil'),('qu','Quechua'),('rm','Rhaeto-Romance'),('rn','Kirundi'),('ro','Romanian'),('ru','Russian'),('rw','Kinyarwanda'),('sa','Sanskrit'),('sd','Sindhi'),('sg','Sangro'),('sh','Serbo-Croatian'),('si','Singhalese'),('sk','Slovak'),('sl','Slovenian'),('sm','Samoan'),('sn','Shona'),('so','Somali'),('sq','Albanian'),('sr','Serbian'),('ss','Siswati'),('st','Sesotho'),('su','Sudanese'),('sv','Swedish'),('sw','Swahili'),('ta','Tamil'),('te','Tegulu'),('tg','Tajik'),('th','Thai'),('ti','Tigrinya'),('tk','Turkmen'),('tl','Tagalog'),('tn','Setswana'),('to','Tonga'),('tr','Turkish'),('ts','Tsonga'),('tt','Tatar'),('tw','Twi'),('uk','Ukrainian'),('ur','Urdu'),('uz','Uzbek'),('vi','Vietnamese'),('vo','Volapuk'),('wo','Wolof'),('xh','Xhosa'),('yo','Yoruba'),('zh','Chinese(simplified)'),('zh-tw','Chinese(Taiwan)'),('zu','Zulu');
+UNLOCK TABLES;
+/*!40000 ALTER TABLE `language` ENABLE KEYS */;
+
+--
+-- Table structure for table `module`
+--
+
+DROP TABLE IF EXISTS `module`;
+CREATE TABLE `module` (
+  `name` varchar(50) character set latin1 NOT NULL,
+  `description` varchar(100) character set latin1 default NULL,
+  `version` varchar(10) character set latin1 default NULL,
+  `fields` text character set latin1,
+  PRIMARY KEY  (`name`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='module definition for ozino cms';
+
+--
+-- Dumping data for table `module`
+--
+
+
+/*!40000 ALTER TABLE `module` DISABLE KEYS */;
+LOCK TABLES `module` WRITE;
+INSERT INTO `module` VALUES ('HTMLArea','HTML area to manage your content','1.0','---\r\n- desc: This is a HTMLArea \r\n  label: HTMLArea\r\n  name: HTML\r\n  type: html\r\n'),('Navigator','Module to manage use of navigation(s) in site.','0.1','--- []\n'),('ShowProductList','The Module show list of Products','0.1','---\n- desc: Number products per page\n  label: Number products per page\n  name: NumProductPerPage\n  type: text\n'),('ViewProduct','The Module display one product. You can choose method of display.','0.1','---\n- desc: Select Display method\n  label: Display Method\n  name: displayMethod\n  options:\n    - optionLabel: Latest product\n      optionType: option\n      optionValue: 0\n    - optionLabel: Random product\n      optionType: option\n      optionValue: 1\n  type: select\n');
+UNLOCK TABLES;
+/*!40000 ALTER TABLE `module` ENABLE KEYS */;
+
+--
+-- Table structure for table `navigation`
+--
+
+DROP TABLE IF EXISTS `navigation`;
+CREATE TABLE `navigation` (
+  `id` int(10) unsigned NOT NULL auto_increment,
+  `website_id` int(10) unsigned NOT NULL,
+  `nav_name` varchar(254) default NULL,
+  `nav_desc` varchar(254) default NULL,
+  `nav_detail` text,
+  PRIMARY KEY  (`id`),
+  KEY `FK_NAVIGATION-WEBSITE-WEBSITE_ID-ID` (`website_id`),
+  CONSTRAINT `FK_NAVIGATION-WEBSITE-WEBSITE_ID-ID` FOREIGN KEY (`website_id`) REFERENCES `website` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+--
+-- Dumping data for table `navigation`
+--
+
+
+/*!40000 ALTER TABLE `navigation` DISABLE KEYS */;
+LOCK TABLES `navigation` WRITE;
+
+UNLOCK TABLES;
+/*!40000 ALTER TABLE `navigation` ENABLE KEYS */;
+
+--
+-- Table structure for table `page`
+--
+
+DROP TABLE IF EXISTS `page`;
+CREATE TABLE `page` (
+  `id` int(10) unsigned NOT NULL auto_increment,
+  `parent_id` int(10) unsigned default NULL,
+  `order` int(11) NOT NULL default '0',
+  `status` tinyint(3) unsigned NOT NULL default '1' COMMENT '1- Draft, 2- Prepublished, 3- Published, 4- Archived',
+  `visible` tinyint(1) NOT NULL COMMENT '1- Visible, 0- Invisible',
+  PRIMARY KEY  (`id`),
+  KEY `FK_PAGE-CATEGORY-PARENT_ID-ID` (`parent_id`),
+  CONSTRAINT `FK_PAGE-CATEGORY-PARENT_ID-ID` FOREIGN KEY (`parent_id`) REFERENCES `category` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+--
+-- Dumping data for table `page`
+--
+
+
+/*!40000 ALTER TABLE `page` DISABLE KEYS */;
+LOCK TABLES `page` WRITE;
+
+UNLOCK TABLES;
+/*!40000 ALTER TABLE `page` ENABLE KEYS */;
+
+--
+-- Table structure for table `page_lang`
+--
+
+DROP TABLE IF EXISTS `page_lang`;
+CREATE TABLE `page_lang` (
+  `id` int(10) unsigned NOT NULL auto_increment,
+  `page_id` int(10) unsigned default NULL,
+  `language_id` varchar(5) NOT NULL default '',
+  `title` varchar(45) NOT NULL default '',
+  `description` varchar(100) NOT NULL default '',
+  `default_skin_id` int(10) unsigned default NULL,
+  PRIMARY KEY  (`id`),
+  KEY `FK_PAGE_LANG-PAGE-PAGE_ID-ID` (`page_id`),
+  KEY `FK_PAGE_LANG-LANGUAGE-LANGUAGE_ID-ID` (`language_id`),
+  KEY `FK_PAGE_LANG-SKIN-DEFAULT_SKIN_ID-ID` (`default_skin_id`),
+  CONSTRAINT `FK_PAGE_LANG-LANGUAGE-LANGUAGE_ID-ID` FOREIGN KEY (`language_id`) REFERENCES `language` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
+  CONSTRAINT `FK_PAGE_LANG-PAGE-PAGE_ID-ID` FOREIGN KEY (`page_id`) REFERENCES `page` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
+  CONSTRAINT `FK_PAGE_LANG-SKIN-DEFAULT_SKIN_ID-ID` FOREIGN KEY (`default_skin_id`) REFERENCES `skin` (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+--
+-- Dumping data for table `page_lang`
+--
+
+
+/*!40000 ALTER TABLE `page_lang` DISABLE KEYS */;
+LOCK TABLES `page_lang` WRITE;
+
+UNLOCK TABLES;
+/*!40000 ALTER TABLE `page_lang` ENABLE KEYS */;
+
+--
+-- Table structure for table `product`
+--
+
+DROP TABLE IF EXISTS `product`;
+CREATE TABLE `product` (
+  `id` int(10) NOT NULL auto_increment,
+  `category_id` int(10) unsigned NOT NULL default '0',
+  `datetime` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
+  `image_id` int(10) unsigned NOT NULL,
+  `website_id` int(10) unsigned NOT NULL default '0',
+  PRIMARY KEY  (`id`),
+  KEY `FK_PRODUCT-CATEGORY_ID2PRODUCT-CATEGORY_ID` (`category_id`),
+  KEY `FK_PRODUCT-WEBSITE_ID2WEBSITE-ID` (`website_id`),
+  KEY `FK_PRODUCT-IMAGE_ID2FILE-ID` (`image_id`),
+  CONSTRAINT `FK_PRODUCT-CATEGORY_ID2PRODUCT-CATEGORY_ID` FOREIGN KEY (`category_id`) REFERENCES `product_category` (`id`),
+  CONSTRAINT `FK_PRODUCT-IMAGE_ID2FILE-ID` FOREIGN KEY (`image_id`) REFERENCES `file` (`id`),
+  CONSTRAINT `FK_PRODUCT-WEBSITE_ID2WEBSITE-ID` FOREIGN KEY (`website_id`) REFERENCES `website` (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+--
+-- Dumping data for table `product`
+--
+
+
+/*!40000 ALTER TABLE `product` DISABLE KEYS */;
+LOCK TABLES `product` WRITE;
+
+UNLOCK TABLES;
+/*!40000 ALTER TABLE `product` ENABLE KEYS */;
+
+--
+-- Table structure for table `product_category`
+--
+
+DROP TABLE IF EXISTS `product_category`;
+CREATE TABLE `product_category` (
+  `id` int(10) unsigned NOT NULL auto_increment,
+  `title` varchar(50) NOT NULL,
+  `website_id` int(10) NOT NULL,
+  PRIMARY KEY  (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+--
+-- Dumping data for table `product_category`
+--
+
+
+/*!40000 ALTER TABLE `product_category` DISABLE KEYS */;
+LOCK TABLES `product_category` WRITE;
+
+UNLOCK TABLES;
+/*!40000 ALTER TABLE `product_category` ENABLE KEYS */;
+
+--
+-- Table structure for table `product_lang`
+--
+
+DROP TABLE IF EXISTS `product_lang`;
+CREATE TABLE `product_lang` (
+  `id` int(11) NOT NULL auto_increment,
+  `product_id` int(10) NOT NULL,
+  `language_id` varchar(5) NOT NULL default '',
+  `title` varchar(150) NOT NULL,
+  `description` text NOT NULL,
+  PRIMARY KEY  (`id`),
+  KEY `FK_PRODUCT-LANG_PRODUCT_ID2PRODUCT_ID` (`product_id`),
+  KEY `FK_PRODUCT-LANG_LANG_ID2LANGUAGE_ID1` (`language_id`),
+  CONSTRAINT `FK_CATEGORY_LANG-LANGUAGE-LANGUAGE_ID-ID1` FOREIGN KEY (`language_id`) REFERENCES `language` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
+  CONSTRAINT `FK_PRODUCT-LANG_PRODUCT_ID2PRODUCT_ID` FOREIGN KEY (`product_id`) REFERENCES `product` (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+--
+-- Dumping data for table `product_lang`
+--
+
+
+/*!40000 ALTER TABLE `product_lang` DISABLE KEYS */;
+LOCK TABLES `product_lang` WRITE;
+
+UNLOCK TABLES;
+/*!40000 ALTER TABLE `product_lang` ENABLE KEYS */;
+
+--
+-- Table structure for table `reseller`
+--
+
+DROP TABLE IF EXISTS `reseller`;
+CREATE TABLE `reseller` (
+  `id` int(10) unsigned NOT NULL auto_increment COMMENT 'this is user_id too',
+  `credit_headers_left` int(11) default NULL,
+  `credit_users_left` int(11) NOT NULL,
+  `credit_xfer_left` int(10) unsigned NOT NULL COMMENT 'MB',
+  PRIMARY KEY  (`id`),
+  CONSTRAINT `FK_RESELLER-USER-ID-ID` FOREIGN KEY (`id`) REFERENCES `user` (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+--
+-- Dumping data for table `reseller`
+--
+
+
+/*!40000 ALTER TABLE `reseller` DISABLE KEYS */;
+LOCK TABLES `reseller` WRITE;
+
+UNLOCK TABLES;
+/*!40000 ALTER TABLE `reseller` ENABLE KEYS */;
+
+--
+-- Table structure for table `reseller_website`
+--
+
+DROP TABLE IF EXISTS `reseller_website`;
+CREATE TABLE `reseller_website` (
+  `website_id` int(10) unsigned NOT NULL,
+  `reseller_id` int(10) unsigned NOT NULL,
+  PRIMARY KEY  (`website_id`,`reseller_id`),
+  KEY `FK_RESELER_WEBSITE-RESELLER-RESELLER_ID-ID` (`reseller_id`),
+  CONSTRAINT `FK_RESELER_WEBSITE-RESELLER-RESELLER_ID-ID` FOREIGN KEY (`reseller_id`) REFERENCES `reseller` (`id`),
+  CONSTRAINT `FK_RESELLER_WEBSITE-WEBSITE-WEBSITE_ID-ID` FOREIGN KEY (`website_id`) REFERENCES `website` (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+--
+-- Dumping data for table `reseller_website`
+--
+
+
+/*!40000 ALTER TABLE `reseller_website` DISABLE KEYS */;
+LOCK TABLES `reseller_website` WRITE;
+
+UNLOCK TABLES;
+/*!40000 ALTER TABLE `reseller_website` ENABLE KEYS */;
+
+--
+-- Table structure for table `reset_password`
+--
+
+DROP TABLE IF EXISTS `reset_password`;
+CREATE TABLE `reset_password` (
+  `id` int(11) NOT NULL auto_increment,
+  `user_id` int(10) unsigned NOT NULL,
+  `key` varchar(50) NOT NULL,
+  `request_datetime` timestamp NOT NULL default CURRENT_TIMESTAMP,
+  `reset_datetime` timestamp NOT NULL default '0000-00-00 00:00:00',
+  PRIMARY KEY  (`id`),
+  UNIQUE KEY `key` (`key`),
+  KEY `FK_RESET_PASSWORD-USER_ID` (`user_id`),
+  CONSTRAINT `FK_RESET_PASSWORD-USER_ID` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+--
+-- Dumping data for table `reset_password`
+--
+
+
+/*!40000 ALTER TABLE `reset_password` DISABLE KEYS */;
+LOCK TABLES `reset_password` WRITE;
+
+UNLOCK TABLES;
+/*!40000 ALTER TABLE `reset_password` ENABLE KEYS */;
+
+--
+-- Table structure for table `role`
+--
+
+DROP TABLE IF EXISTS `role`;
+CREATE TABLE `role` (
+  `id` int(10) unsigned NOT NULL auto_increment,
+  `role` varchar(100) NOT NULL default '',
+  PRIMARY KEY  (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+--
+-- Dumping data for table `role`
+--
+
+
+/*!40000 ALTER TABLE `role` DISABLE KEYS */;
+LOCK TABLES `role` WRITE;
+INSERT INTO `role` VALUES (1,'admin'),(2,'websiteadmin'),(3,'reseller');
+UNLOCK TABLES;
+/*!40000 ALTER TABLE `role` ENABLE KEYS */;
+
+--
+-- Table structure for table `skin`
+--
+
+DROP TABLE IF EXISTS `skin`;
+CREATE TABLE `skin` (
+  `id` int(10) unsigned NOT NULL auto_increment,
+  `file_name` varchar(100) NOT NULL,
+  `type` varchar(250) NOT NULL COMMENT 'eg. PHP, TT ...',
+  `website_id` int(10) unsigned NOT NULL default '0',
+  `contentarea_list` varchar(255) NOT NULL,
+  PRIMARY KEY  (`id`),
+  KEY `FK_SKIN_WEBSITE-WEBSITE_ID-ID` (`website_id`),
+  CONSTRAINT `FK_SKIN_WEBSITE-WEBSITE_ID-ID` FOREIGN KEY (`website_id`) REFERENCES `website` (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+--
+-- Dumping data for table `skin`
+--
+
+
+/*!40000 ALTER TABLE `skin` DISABLE KEYS */;
+LOCK TABLES `skin` WRITE;
+
+UNLOCK TABLES;
+/*!40000 ALTER TABLE `skin` ENABLE KEYS */;
+
+--
+-- Table structure for table `user`
+--
+
+DROP TABLE IF EXISTS `user`;
+CREATE TABLE `user` (
+  `id` int(10) unsigned NOT NULL auto_increment,
+  `website_id` int(10) unsigned NOT NULL default '0',
+  `username` varchar(30) NOT NULL default '',
+  `password` char(32) default '',
+  `firstname` varchar(50) NOT NULL,
+  `lastname` varchar(50) NOT NULL,
+  `email` varchar(100) default NULL,
+  `deleted` tinyint(4) NOT NULL default '0',
+  `enable` tinyint(4) NOT NULL default '1',
+  PRIMARY KEY  (`id`),
+  KEY `FK_USER-WEBSITE-WEBSITE_ID-ID` (`website_id`),
+  CONSTRAINT `FK_USER-WEBSITE-WEBSITE_ID-ID` FOREIGN KEY (`website_id`) REFERENCES `website` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+--
+-- Dumping data for table `user`
+--
+
+
+/*!40000 ALTER TABLE `user` DISABLE KEYS */;
+LOCK TABLES `user` WRITE;
+INSERT INTO `user` VALUES (1,1,'admin','21232f297a57a5a743894a0e4a801fc3','Admin','',NULL,0,1);
+UNLOCK TABLES;
+/*!40000 ALTER TABLE `user` ENABLE KEYS */;
+
+--
+-- Table structure for table `user_category_permission`
+--
+
+DROP TABLE IF EXISTS `user_category_permission`;
+CREATE TABLE `user_category_permission` (
+  `id` int(10) unsigned NOT NULL auto_increment,
+  `category_id` int(10) unsigned NOT NULL,
+  `permission` tinyint(3) unsigned NOT NULL COMMENT '0: none, 1: view, 2: edit',
+  `user_id` int(10) unsigned NOT NULL,
+  PRIMARY KEY  (`id`),
+  KEY `FK_USER_CATEGORY_PERMISSION-USER-USER_ID-ID` (`user_id`),
+  KEY `FK_USER_CATEGORY_PERMISSION-USER-CATEGORY_ID-ID` (`category_id`),
+  CONSTRAINT `FK_USER_CATEGORY_PERMISSION-USER-CATEGORY_ID-ID` FOREIGN KEY (`category_id`) REFERENCES `category` (`id`) ON DELETE CASCADE,
+  CONSTRAINT `FK_USER_CATEGORY_PERMISSION-USER-USER_ID-ID` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+--
+-- Dumping data for table `user_category_permission`
+--
+
+
+/*!40000 ALTER TABLE `user_category_permission` DISABLE KEYS */;
+LOCK TABLES `user_category_permission` WRITE;
+
+UNLOCK TABLES;
+/*!40000 ALTER TABLE `user_category_permission` ENABLE KEYS */;
+
+--
+-- Table structure for table `user_gizmo_permission`
+--
+
+DROP TABLE IF EXISTS `user_gizmo_permission`;
+CREATE TABLE `user_gizmo_permission` (
+  `id` int(10) unsigned NOT NULL auto_increment,
+  `gizmo_id` int(10) unsigned NOT NULL,
+  `permission` tinyint(3) unsigned NOT NULL COMMENT '0: none, 1: view, 2: edit',
+  `user_id` int(10) unsigned NOT NULL,
+  PRIMARY KEY  (`id`),
+  KEY `FK_USER_GIZMO_PERMISSION-USER-USER_ID-ID` (`user_id`),
+  KEY `FK_USER_GIZMO_PERMISSION-USER-GIZMO_ID-ID` (`gizmo_id`),
+  CONSTRAINT `FK_USER_GIZMO_PERMISSION-USER-GIZMO_ID-ID` FOREIGN KEY (`gizmo_id`) REFERENCES `gizmo` (`id`) ON DELETE CASCADE,
+  CONSTRAINT `FK_USER_GIZMO_PERMISSION-USER-USER_ID-ID` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+--
+-- Dumping data for table `user_gizmo_permission`
+--
+
+
+/*!40000 ALTER TABLE `user_gizmo_permission` DISABLE KEYS */;
+LOCK TABLES `user_gizmo_permission` WRITE;
+
+UNLOCK TABLES;
+/*!40000 ALTER TABLE `user_gizmo_permission` ENABLE KEYS */;
+
+--
+-- Table structure for table `user_page_permission`
+--
+
+DROP TABLE IF EXISTS `user_page_permission`;
+CREATE TABLE `user_page_permission` (
+  `id` int(10) unsigned NOT NULL auto_increment,
+  `page_id` int(10) unsigned NOT NULL,
+  `permission` tinyint(3) unsigned NOT NULL COMMENT '0: none, 1: view, 2: edit',
+  `user_id` int(10) unsigned NOT NULL,
+  PRIMARY KEY  (`id`),
+  KEY `FK_USER_PAGE_PERMISSION-USER-USER_ID-ID` (`user_id`),
+  KEY `FK_USER_PAGE_PERMISSION-USER-PAGE_ID-ID` (`page_id`),
+  CONSTRAINT `FK_USER_PAGE_PERMISSION-USER-PAGE_ID-ID` FOREIGN KEY (`page_id`) REFERENCES `page` (`id`) ON DELETE CASCADE,
+  CONSTRAINT `FK_USER_PAGE_PERMISSION-USER-USER_ID-ID` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+--
+-- Dumping data for table `user_page_permission`
+--
+
+
+/*!40000 ALTER TABLE `user_page_permission` DISABLE KEYS */;
+LOCK TABLES `user_page_permission` WRITE;
+
+UNLOCK TABLES;
+/*!40000 ALTER TABLE `user_page_permission` ENABLE KEYS */;
+
+--
+-- Table structure for table `user_role`
+--
+
+DROP TABLE IF EXISTS `user_role`;
+CREATE TABLE `user_role` (
+  `userid` int(10) unsigned NOT NULL default '0',
+  `roleid` int(10) unsigned NOT NULL default '0',
+  PRIMARY KEY  (`userid`,`roleid`),
+  KEY `FK_USER_ROLE-ROLE-ROLEID-ID` (`roleid`),
+  KEY `FK_USER_ROLE-USER-USERID-ID` (`userid`),
+  CONSTRAINT `FK_USER_ROLE-ROLE-ROLEID-ID` FOREIGN KEY (`roleid`) REFERENCES `role` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
+  CONSTRAINT `FK_USER_ROLE-USER-USERID-ID` FOREIGN KEY (`userid`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+--
+-- Dumping data for table `user_role`
+--
+
+
+/*!40000 ALTER TABLE `user_role` DISABLE KEYS */;
+LOCK TABLES `user_role` WRITE;
+
+UNLOCK TABLES;
+/*!40000 ALTER TABLE `user_role` ENABLE KEYS */;
+
+--
+-- Table structure for table `user_website_permission`
+--
+
+DROP TABLE IF EXISTS `user_website_permission`;
+CREATE TABLE `user_website_permission` (
+  `id` int(10) unsigned NOT NULL auto_increment,
+  `website_id` int(10) unsigned NOT NULL,
+  `permission` tinyint(3) unsigned NOT NULL COMMENT '0: none, 1: view, 2: edit',
+  `user_id` int(10) unsigned NOT NULL,
+  PRIMARY KEY  (`id`),
+  KEY `FK_USER_WEBSITE_PERMISSION-USER-USER_ID-ID` (`user_id`),
+  KEY `FK_USER_WEBSITE_PERMISSION-USER-WEBSITE_ID-ID` (`website_id`),
+  CONSTRAINT `FK_USER_WEBSITE_PERMISSION-USER-USER_ID-ID` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`),
+  CONSTRAINT `FK_USER_WEBSITE_PERMISSION-USER-WEBSITE_ID-ID` FOREIGN KEY (`website_id`) REFERENCES `website` (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+--
+-- Dumping data for table `user_website_permission`
+--
+
+
+/*!40000 ALTER TABLE `user_website_permission` DISABLE KEYS */;
+LOCK TABLES `user_website_permission` WRITE;
+UNLOCK TABLES;
+/*!40000 ALTER TABLE `user_website_permission` ENABLE KEYS */;
+
+--
+-- Table structure for table `v_username_on_websiteid`
+--
+
+DROP TABLE IF EXISTS `v_username_on_websiteid`;
+/*!50001 DROP VIEW IF EXISTS `v_username_on_websiteid`*/;
+/*!50001 DROP TABLE IF EXISTS `v_username_on_websiteid`*/;
+/*!50001 CREATE TABLE `v_username_on_websiteid` (
+  `global_username` varbinary(42),
+  `id` int(10) unsigned,
+  `website_id` int(10) unsigned,
+  `username` varchar(30),
+  `password` char(32),
+  `firstname` varchar(50),
+  `lastname` varchar(50)
+) */;
+
+--
+-- Table structure for table `website`
+--
+
+DROP TABLE IF EXISTS `website`;
+CREATE TABLE `website` (
+  `id` int(10) unsigned NOT NULL auto_increment,
+  `default_language_id` varchar(5) NOT NULL default 'EN',
+  `admin_id` int(10) unsigned NOT NULL default '1',
+  `credit_headers_left` int(10) unsigned NOT NULL default '0',
+  `credit_users_left` int(10) unsigned NOT NULL default '0',
+  `credit_xfer_left` int(10) unsigned NOT NULL default '0',
+  `credit_monthly_xfer` int(10) unsigned NOT NULL default '0',
+  PRIMARY KEY  (`id`),
+  KEY `FK_WEBSITE-USER-ADMIN_ID-ID` (`admin_id`),
+  KEY `FK_WEBSITE-LANGUAGE-DEFAULT_LANGUAGE_ID-ID` (`default_language_id`),
+  CONSTRAINT `FK_WEBSITE-LANGUAGE-DEFAULT_LANGUAGE_ID-ID` FOREIGN KEY (`default_language_id`) REFERENCES `language` (`id`),
+  CONSTRAINT `FK_WEBSITE-USER-ADMIN_ID-ID` FOREIGN KEY (`admin_id`) REFERENCES `user` (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+--
+-- Dumping data for table `website`
+--
+
+
+/*!40000 ALTER TABLE `website` DISABLE KEYS */;
+LOCK TABLES `website` WRITE;
+INSERT INTO `website` VALUES (1,'en',1,0,0,0,0);
+UNLOCK TABLES;
+/*!40000 ALTER TABLE `website` ENABLE KEYS */;
+
+--
+-- Table structure for table `website_lang`
+--
+
+DROP TABLE IF EXISTS `website_lang`;
+CREATE TABLE `website_lang` (
+  `id` int(10) unsigned NOT NULL auto_increment,
+  `website_id` int(10) unsigned NOT NULL default '0',
+  `language_id` varchar(5) NOT NULL default '',
+  `website_name` varchar(45) NOT NULL default '',
+  `website_description` varchar(250) NOT NULL default '',
+  `website_keyword` varchar(250) NOT NULL default '',
+  `default_skin_id` int(10) unsigned NOT NULL default '1',
+  PRIMARY KEY  (`id`),
+  UNIQUE KEY `site_language_unique` USING HASH (`website_id`,`language_id`),
+  KEY `FK_WEBSITE_LANG-LANGUAGE-LANGUAGE_ID-ID` (`language_id`),
+  KEY `FK_WEBSITE_LANG-WEBSITE-WEBSITE_ID-ID` (`website_id`),
+  KEY `FK_WEBSITE_LANG-SKIN-DEFAULT_SKIN_ID-ID` (`default_skin_id`),
+  CONSTRAINT `FK_WEBSITE_LANG-LANGUAGE-LANGUAGE_ID-ID` FOREIGN KEY (`language_id`) REFERENCES `language` (`id`),
+  CONSTRAINT `FK_WEBSITE_LANG-SKIN-DEFAULT_SKIN_ID-ID` FOREIGN KEY (`default_skin_id`) REFERENCES `skin` (`id`),
+  CONSTRAINT `FK_WEBSITE_LANG-WEBSITE-WEBSITE_ID-ID` FOREIGN KEY (`website_id`) REFERENCES `website` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+--
+-- Dumping data for table `website_lang`
+--
+
+
+/*!40000 ALTER TABLE `website_lang` DISABLE KEYS */;
+LOCK TABLES `website_lang` WRITE;
+
+UNLOCK TABLES;
+/*!40000 ALTER TABLE `website_lang` ENABLE KEYS */;
+
+--
+-- View structure for view `v_username_on_websiteid`
+--
+
+/*!50001 DROP TABLE IF EXISTS `v_username_on_websiteid`*/;
+/*!50001 DROP VIEW IF EXISTS `v_username_on_websiteid`*/;
+/*!50001 CREATE ALGORITHM=UNDEFINED */
+/*!50013 DEFINER=`dummy`@`%` SQL SECURITY DEFINER */
+/*!50001 VIEW `v_username_on_websiteid` AS select concat(`user`.`username`,_latin1'@',`user`.`website_id`) AS `global_username`,`user`.`id` AS `id`,`user`.`website_id` AS `website_id`,`user`.`username` AS `username`,`user`.`password` AS `password`,`user`.`firstname` AS `firstname`,`user`.`lastname` AS `lastname` from `user` where ((`user`.`deleted` = 0) and (`user`.`enable` = 1)) */;
+/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
+
+/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
+/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
+/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
+/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
+/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
+/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
+/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
+

Added: trunk/OzinoCMS/lib/CmsDB/Category.pm
===================================================================
--- trunk/OzinoCMS/lib/CmsDB/Category.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/CmsDB/Category.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,49 @@
+package CmsDB::Category;
+
+# Created by DBIx::Class::Schema::Loader v0.03007 @ 2007-03-07 18:58:42
+
+use strict;
+use warnings;
+
+use base 'DBIx::Class';
+
+__PACKAGE__->load_components("PK::Auto", "Core");
+__PACKAGE__->table("category");
+__PACKAGE__->add_columns(
+  "id",
+  { data_type => "INT", default_value => undef, is_nullable => 0, size => 10 },
+  "website_id",
+  { data_type => "INT", default_value => 0, is_nullable => 0, size => 10 },
+  "parent_id",
+  { data_type => "INT", default_value => undef, is_nullable => 1, size => 10 },
+  "order",
+  { data_type => "INT", default_value => 0, is_nullable => 0, size => 11 },
+  "status",
+  { data_type => "TINYINT", default_value => 1, is_nullable => 0, size => 3 },
+  "default_page_id",
+  { data_type => "INT", default_value => undef, is_nullable => 1, size => 10 },
+);
+__PACKAGE__->set_primary_key("id");
+__PACKAGE__->has_many(
+  "category_langs",
+  "CategoryLang",
+  { "foreign.category_id" => "self.id" },
+);
+__PACKAGE__->has_many("pages", "Page", { "foreign.parent_id" => "self.id" });
+__PACKAGE__->has_many(
+  "group_category_permissions",
+  "GroupCategoryPermission",
+  { "foreign.category_id" => "self.id" },
+);
+__PACKAGE__->belongs_to("default_page_id", "Page", { id => "default_page_id" });
+__PACKAGE__->belongs_to("parent_id", "Category", { id => "parent_id" });
+__PACKAGE__->has_many("categories", "Category", { "foreign.parent_id" => "self.id" });
+__PACKAGE__->belongs_to("website_id", "Website", { id => "website_id" });
+__PACKAGE__->has_many(
+  "user_category_permissions",
+  "UserCategoryPermission",
+  { "foreign.category_id" => "self.id" },
+);
+
+1;
+

Added: trunk/OzinoCMS/lib/CmsDB/CategoryLang.pm
===================================================================
--- trunk/OzinoCMS/lib/CmsDB/CategoryLang.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/CmsDB/CategoryLang.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,35 @@
+package CmsDB::CategoryLang;
+
+# Created by DBIx::Class::Schema::Loader v0.03009 @ 2007-01-13 20:20:04
+
+use strict;
+use warnings;
+
+use base 'DBIx::Class';
+
+__PACKAGE__->load_components("PK::Auto", "Core");
+__PACKAGE__->table("category_lang");
+__PACKAGE__->add_columns(
+  "id",
+  { data_type => "INT", default_value => undef, is_nullable => 0, size => 10 },
+  "category_id",
+  { data_type => "INT", default_value => undef, is_nullable => 1, size => 10 },
+  "language_id",
+  { data_type => "VARCHAR", default_value => "", is_nullable => 0, size => 5 },
+  "title",
+  { data_type => "VARCHAR", default_value => "", is_nullable => 0, size => 45 },
+  "description",
+  { data_type => "VARCHAR", default_value => "", is_nullable => 0, size => 100 },
+  "default_skin_id",
+  { data_type => "INT", default_value => undef, is_nullable => 1, size => 10 },
+);
+__PACKAGE__->set_primary_key("id");
+__PACKAGE__->belongs_to("category_id", "CmsDB::Category", { id => "category_id" });
+__PACKAGE__->belongs_to("language_id", "CmsDB::Language", { id => "language_id" });
+__PACKAGE__->belongs_to("default_skin_id", "CmsDB::Skin", { id => "default_skin_id" });
+
+# Added by Omid Houshyar
+__PACKAGE__->add_unique_constraint( catid_langid => [ qw/category_id language_id/ ]);
+
+1;
+

Added: trunk/OzinoCMS/lib/CmsDB/File.pm
===================================================================
--- trunk/OzinoCMS/lib/CmsDB/File.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/CmsDB/File.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,40 @@
+package CmsDB::File;
+
+# Created by DBIx::Class::Schema::Loader v0.03007 @ 2007-03-12 12:34:14
+
+use strict;
+use warnings;
+
+use base 'DBIx::Class';
+
+__PACKAGE__->load_components("PK::Auto", "Core");
+__PACKAGE__->table("file");
+__PACKAGE__->add_columns(
+  "id",
+  { data_type => "INT", default_value => undef, is_nullable => 0, size => 10 },
+  "website_id",
+  { data_type => "INT", default_value => undef, is_nullable => 1, size => 10 },
+  "title",
+  {
+    data_type => "VARCHAR",
+    default_value => undef,
+    is_nullable => 1,
+    size => 254,
+  },
+  "description",
+  {
+    data_type => "TEXT",
+    default_value => undef,
+    is_nullable => 1,
+    size => 65_535,
+  },
+  "ext",
+  { data_type => "VARCHAR", default_value => "", is_nullable => 1, size => 100 },
+  "type",
+  { data_type => "VARCHAR", default_value => "", is_nullable => 0, size => 10 },
+);
+__PACKAGE__->set_primary_key("id");
+__PACKAGE__->belongs_to("website_id", "Website", { id => "website_id" });
+
+1;
+

Added: trunk/OzinoCMS/lib/CmsDB/Gizmo.pm
===================================================================
--- trunk/OzinoCMS/lib/CmsDB/Gizmo.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/CmsDB/Gizmo.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,53 @@
+package CmsDB::Gizmo;
+
+# Created by DBIx::Class::Schema::Loader v0.03009 @ 2007-02-07 18:00:31
+
+use strict;
+use warnings;
+
+use base 'DBIx::Class';
+
+__PACKAGE__->load_components("PK::Auto", "Core");
+__PACKAGE__->table("gizmo");
+__PACKAGE__->add_columns(
+  "id",
+  { data_type => "INT", default_value => undef, is_nullable => 0, size => 10 },
+  "website_id",
+  { data_type => "INT", default_value => "", is_nullable => 0, size => 10 },
+  "order",
+  { data_type => "INT", default_value => 0, is_nullable => 0, size => 11 },
+  "category_id",
+  { data_type => "INT", default_value => undef, is_nullable => 1, size => 11 },
+  "page_id",
+  { data_type => "INT", default_value => undef, is_nullable => 1, size => 11 },
+  "module_name",
+  { data_type => "VARCHAR", default_value => "", is_nullable => 0, size => 50 },
+  "contentarea",
+  { data_type => "VARCHAR", default_value => "", is_nullable => 0, size => 100 },
+  "status",
+  { data_type => "TINYINT", default_value => 1, is_nullable => 0, size => 3 },
+  "deleted",
+  { data_type => "TINYINT", default_value => 0, is_nullable => 0, size => 1 },
+
+);
+__PACKAGE__->set_primary_key("id");
+__PACKAGE__->has_many(
+  "gizmo_langs",
+  "CmsDB::GizmoLang",
+  { "foreign.gizmo_id" => "self.id" },
+);
+__PACKAGE__->has_many(
+  "user_gizmo_permissions",
+  "CmsDB::UserGizmoPermission",
+  { "foreign.gizmo_id" => "self.id" },
+);
+__PACKAGE__->belongs_to("module_name", "CmsDB::Module", { name => "module_name" });
+__PACKAGE__->belongs_to("website_id", "CmsDB::Website", { id => "website_id" });
+__PACKAGE__->has_many(
+  "group_gizmo_permissions",
+  "CmsDB::GroupGizmoPermission",
+  { "foreign.gizmo_id" => "self.id" },
+);
+
+1;
+

Added: trunk/OzinoCMS/lib/CmsDB/GizmoLang.pm
===================================================================
--- trunk/OzinoCMS/lib/CmsDB/GizmoLang.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/CmsDB/GizmoLang.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,43 @@
+package CmsDB::GizmoLang;
+
+# Created by DBIx::Class::Schema::Loader v0.03009 @ 2007-02-08 12:24:32
+
+use strict;
+use warnings;
+
+use base 'DBIx::Class';
+
+__PACKAGE__->load_components("PK::Auto", "Core");
+__PACKAGE__->table("gizmo_lang");
+__PACKAGE__->add_columns(
+  "id",
+  { data_type => "INT", default_value => undef, is_nullable => 0, size => 10 },
+  "gizmo_id",
+  { data_type => "INT", default_value => "", is_nullable => 0, size => 10 },
+  "language_id",
+  { data_type => "VARCHAR", default_value => "", is_nullable => 0, size => 5 },
+  "name",
+  { data_type => "VARCHAR", default_value => "", is_nullable => 0, size => 45 },
+  "description",
+  { data_type => "VARCHAR", default_value => "", is_nullable => 0, size => 200 },
+  "parameter_values",
+  { data_type => "TEXT", default_value => "", is_nullable => 0, size => 65_535 },
+  "latest_change_date_time",
+  {
+    data_type => "TIMESTAMP",
+    default_value => "CURRENT_TIMESTAMP",
+    is_nullable => 1,
+    size => 14,
+  },
+ "deleted",
+  { data_type => "TINYINT", default_value => 0, is_nullable => 0, size => 1 },
+
+);
+__PACKAGE__->set_primary_key("id");
+__PACKAGE__->belongs_to("gizmo_id", "CmsDB::Gizmo", { id => "gizmo_id" });
+__PACKAGE__->belongs_to("language_id", "CmsDB::Language", { id => "language_id" });
+
+### Added by reza sadeghzadeh
+__PACKAGE__->add_unique_constraint( 'idLangUniqueKey' => [ qw/ gizmo_id language_id / ],);
+1;
+

Added: trunk/OzinoCMS/lib/CmsDB/Group.pm
===================================================================
--- trunk/OzinoCMS/lib/CmsDB/Group.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/CmsDB/Group.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,51 @@
+package CmsDB::Group;
+
+# Created by DBIx::Class::Schema::Loader v0.03007 @ 2007-02-04 14:33:22
+
+use strict;
+use warnings;
+
+use base 'DBIx::Class';
+
+__PACKAGE__->load_components("PK::Auto", "Core");
+__PACKAGE__->table("group");
+__PACKAGE__->add_columns(
+  "id",
+  { data_type => "INT", default_value => undef, is_nullable => 0, size => 10 },
+  "group_name",
+  { data_type => "VARCHAR", default_value => "", is_nullable => 0, size => 45 },
+  "group_description",
+  { data_type => "VARCHAR", default_value => "", is_nullable => 0, size => 100 },
+  "website_id",
+  { data_type => "INT", default_value => "", is_nullable => 0, size => 10 },
+);
+__PACKAGE__->set_primary_key("id");
+__PACKAGE__->has_many(
+  "group_category_permissions",
+  "GroupCategoryPermission",
+  { "foreign.group_id" => "self.id" },
+);
+__PACKAGE__->belongs_to("website_id", "Website", { id => "website_id" });
+__PACKAGE__->has_many(
+  "group_members",
+  "GroupMember",
+  { "foreign.group_id" => "self.id" },
+);
+__PACKAGE__->has_many(
+  "group_page_permissions",
+  "GroupPagePermission",
+  { "foreign.group_id" => "self.id" },
+);
+__PACKAGE__->has_many(
+  "group_website_permissions",
+  "GroupWebsitePermission",
+  { "foreign.group_id" => "self.id" },
+);
+__PACKAGE__->has_many(
+  "group_gizmo_permissions",
+  "GroupGizmoPermission",
+  { "foreign.group_id" => "self.id" },
+);
+
+1;
+

Added: trunk/OzinoCMS/lib/CmsDB/GroupCategoryPermission.pm
===================================================================
--- trunk/OzinoCMS/lib/CmsDB/GroupCategoryPermission.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/CmsDB/GroupCategoryPermission.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,30 @@
+package CmsDB::GroupCategoryPermission;
+
+# Created by DBIx::Class::Schema::Loader v0.03009 @ 2007-01-13 20:20:04
+
+use strict;
+use warnings;
+
+use base 'DBIx::Class';
+
+__PACKAGE__->load_components("PK::Auto", "Core");
+__PACKAGE__->table("group_category_permission");
+__PACKAGE__->add_columns(
+  "id",
+  { data_type => "INT", default_value => undef, is_nullable => 0, size => 10 },
+  "category_id",
+  { data_type => "INT", default_value => "", is_nullable => 0, size => 10 },
+  "permission",
+  { data_type => "TINYINT", default_value => "", is_nullable => 0, size => 3 },
+  "group_id",
+  { data_type => "INT", default_value => "", is_nullable => 0, size => 10 },
+);
+__PACKAGE__->set_primary_key("id");
+__PACKAGE__->belongs_to("category_id", "CmsDB::Category", { id => "category_id" });
+__PACKAGE__->belongs_to("group_id", "CmsDB::Group", { id => "group_id" });
+
+# Added by Omid Houshyar
+__PACKAGE__->add_unique_constraint( catid_grpid => [ qw/category_id group_id/ ]);
+
+1;
+

Added: trunk/OzinoCMS/lib/CmsDB/GroupGizmoPermission.pm
===================================================================
--- trunk/OzinoCMS/lib/CmsDB/GroupGizmoPermission.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/CmsDB/GroupGizmoPermission.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,30 @@
+package CmsDB::GroupGizmoPermission;
+
+# Created by DBIx::Class::Schema::Loader v0.03009 @ 2007-01-13 20:20:04
+
+use strict;
+use warnings;
+
+use base 'DBIx::Class';
+
+__PACKAGE__->load_components("PK::Auto", "Core");
+__PACKAGE__->table("group_gizmo_permission");
+__PACKAGE__->add_columns(
+  "id",
+  { data_type => "INT", default_value => undef, is_nullable => 0, size => 10 },
+  "gizmo_id",
+  { data_type => "INT", default_value => "", is_nullable => 0, size => 10 },
+  "permission",
+  { data_type => "TINYINT", default_value => "", is_nullable => 0, size => 3 },
+  "group_id",
+  { data_type => "INT", default_value => "", is_nullable => 0, size => 10 },
+);
+__PACKAGE__->set_primary_key("id");
+__PACKAGE__->belongs_to("group_id", "CmsDB::Group", { id => "group_id" });
+__PACKAGE__->belongs_to("gizmo_id", "CmsDB::Gizmo", { id => "gizmo_id" });
+
+## Added by reza sadeghzadeh
+__PACKAGE__->add_unique_constraint( gizmoid_grpid => [ qw/ gizmo_id group_id/ ]);
+
+1;
+

Added: trunk/OzinoCMS/lib/CmsDB/GroupMember.pm
===================================================================
--- trunk/OzinoCMS/lib/CmsDB/GroupMember.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/CmsDB/GroupMember.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,23 @@
+package CmsDB::GroupMember;
+
+# Created by DBIx::Class::Schema::Loader v0.03007 @ 2007-02-04 14:20:40
+
+use strict;
+use warnings;
+
+use base 'DBIx::Class';
+
+__PACKAGE__->load_components("PK::Auto", "Core");
+__PACKAGE__->table("group_member");
+__PACKAGE__->add_columns(
+  "group_id",
+  { data_type => "INT", default_value => "", is_nullable => 0, size => 10 },
+  "user_id",
+  { data_type => "INT", default_value => "", is_nullable => 0, size => 10 },
+);
+__PACKAGE__->set_primary_key("group_id", "user_id");
+__PACKAGE__->belongs_to("group_id", "Group", { id => "group_id" });
+__PACKAGE__->belongs_to("user_id", "User", { id => "user_id" });
+
+1;
+

Added: trunk/OzinoCMS/lib/CmsDB/GroupPagePermission.pm
===================================================================
--- trunk/OzinoCMS/lib/CmsDB/GroupPagePermission.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/CmsDB/GroupPagePermission.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,30 @@
+package CmsDB::GroupPagePermission;
+
+# Created by DBIx::Class::Schema::Loader v0.03009 @ 2007-01-13 20:20:04
+
+use strict;
+use warnings;
+
+use base 'DBIx::Class';
+
+__PACKAGE__->load_components("PK::Auto", "Core");
+__PACKAGE__->table("group_page_permission");
+__PACKAGE__->add_columns(
+  "id",
+  { data_type => "INT", default_value => undef, is_nullable => 0, size => 10 },
+  "page_id",
+  { data_type => "INT", default_value => "", is_nullable => 0, size => 10 },
+  "permission",
+  { data_type => "TINYINT", default_value => "", is_nullable => 0, size => 3 },
+  "group_id",
+  { data_type => "INT", default_value => "", is_nullable => 0, size => 10 },
+);
+__PACKAGE__->set_primary_key("id");
+__PACKAGE__->belongs_to("group_id", "CmsDB::Group", { id => "group_id" });
+__PACKAGE__->belongs_to("page_id", "CmsDB::Page", { id => "page_id" });
+
+# Added by Omid Houshyar
+__PACKAGE__->add_unique_constraint( pageid_grpid => [ qw/page_id group_id/ ]);
+
+1;
+

Added: trunk/OzinoCMS/lib/CmsDB/GroupWebsitePermission.pm
===================================================================
--- trunk/OzinoCMS/lib/CmsDB/GroupWebsitePermission.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/CmsDB/GroupWebsitePermission.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,27 @@
+package CmsDB::GroupWebsitePermission;
+
+# Created by DBIx::Class::Schema::Loader v0.03009 @ 2007-01-13 20:20:04
+
+use strict;
+use warnings;
+
+use base 'DBIx::Class';
+
+__PACKAGE__->load_components("PK::Auto", "Core");
+__PACKAGE__->table("group_website_permission");
+__PACKAGE__->add_columns(
+  "id",
+  { data_type => "INT", default_value => undef, is_nullable => 0, size => 10 },
+  "website_id",
+  { data_type => "INT", default_value => "", is_nullable => 0, size => 10 },
+  "permission",
+  { data_type => "TINYINT", default_value => "", is_nullable => 0, size => 3 },
+  "group_id",
+  { data_type => "INT", default_value => "", is_nullable => 0, size => 10 },
+);
+__PACKAGE__->set_primary_key("id");
+__PACKAGE__->belongs_to("group_id", "CmsDB::Group", { id => "group_id" });
+__PACKAGE__->belongs_to("website_id", "CmsDB::Website", { id => "website_id" });
+
+1;
+

Added: trunk/OzinoCMS/lib/CmsDB/HostHeader.pm
===================================================================
--- trunk/OzinoCMS/lib/CmsDB/HostHeader.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/CmsDB/HostHeader.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,25 @@
+package CmsDB::HostHeader;
+
+# Created by DBIx::Class::Schema::Loader v0.03009 @ 2007-01-13 20:20:04
+
+use strict;
+use warnings;
+
+use base 'DBIx::Class';
+
+__PACKAGE__->load_components("PK::Auto", "Core");
+__PACKAGE__->table("host_header");
+__PACKAGE__->add_columns(
+  "id",
+  { data_type => "INT", default_value => undef, is_nullable => 0, size => 10 },
+  "website_id",
+  { data_type => "INT", default_value => 0, is_nullable => 0, size => 10 },
+  "header",
+  { data_type => "VARCHAR", default_value => "", is_nullable => 0, size => 250 },
+);
+__PACKAGE__->set_primary_key("id");
+__PACKAGE__->add_unique_constraint("UNIQUE_HEADER", ["header"]);
+__PACKAGE__->belongs_to("website_id", "CmsDB::Website", { id => "website_id" });
+
+1;
+

Added: trunk/OzinoCMS/lib/CmsDB/Language.pm
===================================================================
--- trunk/OzinoCMS/lib/CmsDB/Language.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/CmsDB/Language.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,46 @@
+package CmsDB::Language;
+
+# Created by DBIx::Class::Schema::Loader v0.03009 @ 2007-01-13 20:20:04
+
+use strict;
+use warnings;
+
+use base 'DBIx::Class';
+
+__PACKAGE__->load_components("PK::Auto", "Core");
+__PACKAGE__->table("language");
+__PACKAGE__->add_columns(
+  "id",
+  { data_type => "VARCHAR", default_value => "", is_nullable => 0, size => 5 },
+  "language_name",
+  { data_type => "VARCHAR", default_value => "", is_nullable => 0, size => 50 },
+);
+__PACKAGE__->set_primary_key("id");
+__PACKAGE__->has_many(
+  "gizmo_langs",
+  "CmsDB::GizmoLang",
+  { "foreign.language_id" => "self.id" },
+);
+__PACKAGE__->has_many(
+  "category_langs",
+  "CmsDB::CategoryLang",
+  { "foreign.language_id" => "self.id" },
+);
+__PACKAGE__->has_many(
+  "website_langs",
+  "CmsDB::WebsiteLang",
+  { "foreign.language_id" => "self.id" },
+);
+__PACKAGE__->has_many(
+  "websites",
+  "CmsDB::Website",
+  { "foreign.default_language_id" => "self.id" },
+);
+__PACKAGE__->has_many(
+  "page_langs",
+  "CmsDB::PageLang",
+  { "foreign.language_id" => "self.id" },
+);
+
+1;
+

Added: trunk/OzinoCMS/lib/CmsDB/Module.pm
===================================================================
--- trunk/OzinoCMS/lib/CmsDB/Module.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/CmsDB/Module.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,45 @@
+package CmsDB::Module;
+
+# Created by DBIx::Class::Schema::Loader v0.03009 @ 2007-01-13 20:20:04
+
+use strict;
+use warnings;
+
+use base 'DBIx::Class';
+
+__PACKAGE__->load_components("PK::Auto", "Core");
+__PACKAGE__->table("module");
+__PACKAGE__->add_columns(
+  "name",
+  { data_type => "VARCHAR", default_value => "", is_nullable => 0, size => 50 },
+  "description",
+  {
+    data_type => "VARCHAR",
+    default_value => undef,
+    is_nullable => 1,
+    size => 100,
+  },
+  "version",
+  {
+    data_type => "VARCHAR",
+    default_value => undef,
+    is_nullable => 1,
+    size => 10,
+  },
+  "fields",
+  {
+    data_type => "TEXT",
+    default_value => undef,
+    is_nullable => 1,
+    size => 65535,
+  },
+);
+__PACKAGE__->set_primary_key("name");
+__PACKAGE__->has_many(
+  "gizmoes",
+  "CmsDB::Gizmo",
+  { "foreign.module_name" => "self.name" },
+);
+
+1;
+

Added: trunk/OzinoCMS/lib/CmsDB/Navigation.pm
===================================================================
--- trunk/OzinoCMS/lib/CmsDB/Navigation.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/CmsDB/Navigation.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,43 @@
+package CmsDB::Navigation;
+
+# Created by DBIx::Class::Schema::Loader v0.03007 @ 2007-02-28 18:31:26
+
+use strict;
+use warnings;
+
+use base 'DBIx::Class';
+
+__PACKAGE__->load_components("PK::Auto", "Core");
+__PACKAGE__->table("navigation");
+__PACKAGE__->add_columns(
+  "id",
+  { data_type => "INT", default_value => undef, is_nullable => 0, size => 10 },
+  "website_id",
+  { data_type => "INT", default_value => "", is_nullable => 0, size => 10 },
+  "nav_name",
+  {
+    data_type => "VARCHAR",
+    default_value => undef,
+    is_nullable => 1,
+    size => 254,
+  },
+  "nav_desc",
+  {
+    data_type => "VARCHAR",
+    default_value => undef,
+    is_nullable => 1,
+    size => 254,
+  },
+  "nav_detail",
+  {
+    data_type => "TEXT",
+    default_value => undef,
+    is_nullable => 1,
+    size => 65_535,
+  },
+);
+__PACKAGE__->set_primary_key("id");
+__PACKAGE__->belongs_to("website_id", "Website", { id => "website_id" });
+
+1;
+

Added: trunk/OzinoCMS/lib/CmsDB/Page.pm
===================================================================
--- trunk/OzinoCMS/lib/CmsDB/Page.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/CmsDB/Page.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,39 @@
+package CmsDB::Page;
+
+# Created by DBIx::Class::Schema::Loader v0.03007 @ 2007-02-14 17:21:58
+
+use strict;
+use warnings;
+
+use base 'DBIx::Class';
+
+__PACKAGE__->load_components("PK::Auto", "Core");
+__PACKAGE__->table("page");
+__PACKAGE__->add_columns(
+  "id",
+  { data_type => "INT", default_value => undef, is_nullable => 0, size => 10 },
+  "parent_id",
+  { data_type => "INT", default_value => undef, is_nullable => 1, size => 10 },
+  "order",
+  { data_type => "INT", default_value => 0, is_nullable => 0, size => 11 },
+  "status",
+  { data_type => "TINYINT", default_value => 1, is_nullable => 0, size => 3 },
+  "visible",
+  { data_type => "TINYINT", default_value => "", is_nullable => 0, size => 1 },
+);
+__PACKAGE__->set_primary_key("id");
+__PACKAGE__->belongs_to("parent_id", "Category", { id => "parent_id" });
+__PACKAGE__->has_many(
+  "user_page_permissions",
+  "UserPagePermission",
+  { "foreign.page_id" => "self.id" },
+);
+__PACKAGE__->has_many(
+  "group_page_permissions",
+  "GroupPagePermission",
+  { "foreign.page_id" => "self.id" },
+);
+__PACKAGE__->has_many("page_langs", "PageLang", { "foreign.page_id" => "self.id" });
+
+1;
+

Added: trunk/OzinoCMS/lib/CmsDB/PageLang.pm
===================================================================
--- trunk/OzinoCMS/lib/CmsDB/PageLang.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/CmsDB/PageLang.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,35 @@
+package CmsDB::PageLang;
+
+# Created by DBIx::Class::Schema::Loader v0.03009 @ 2007-01-13 20:20:04
+
+use strict;
+use warnings;
+
+use base 'DBIx::Class';
+
+__PACKAGE__->load_components("PK::Auto", "Core");
+__PACKAGE__->table("page_lang");
+__PACKAGE__->add_columns(
+  "id",
+  { data_type => "INT", default_value => undef, is_nullable => 0, size => 10 },
+  "page_id",
+  { data_type => "INT", default_value => undef, is_nullable => 1, size => 10 },
+  "language_id",
+  { data_type => "VARCHAR", default_value => "", is_nullable => 0, size => 5 },
+  "title",
+  { data_type => "VARCHAR", default_value => "", is_nullable => 0, size => 45 },
+  "description",
+  { data_type => "VARCHAR", default_value => "", is_nullable => 0, size => 100 },
+  "default_skin_id",
+  { data_type => "INT", default_value => undef, is_nullable => 1, size => 10 },
+);
+__PACKAGE__->set_primary_key("id");
+__PACKAGE__->belongs_to("language_id", "CmsDB::Language", { id => "language_id" });
+__PACKAGE__->belongs_to("page_id", "CmsDB::Page", { id => "page_id" });
+__PACKAGE__->belongs_to("default_skin_id", "CmsDB::Skin", { id => "default_skin_id" });
+
+# Added by Omid Houshyar
+__PACKAGE__->add_unique_constraint( pageid_langid => [ qw/page_id language_id/ ]);
+
+1;
+

Added: trunk/OzinoCMS/lib/CmsDB/Product.pm
===================================================================
--- trunk/OzinoCMS/lib/CmsDB/Product.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/CmsDB/Product.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,44 @@
+package CmsDB::Product;
+
+# Created by DBIx::Class::Schema::Loader v0.03009 @ 2007-03-12 20:10:45
+
+use strict;
+use warnings;
+
+use base 'DBIx::Class';
+
+__PACKAGE__->load_components("PK::Auto", "Core");
+__PACKAGE__->table("product");
+__PACKAGE__->add_columns(
+  "id",
+  { data_type => "INT", default_value => undef, is_nullable => 0, size => 10 },
+  "category_id",
+  { data_type => "INT", default_value => 0, is_nullable => 0, size => 10 },
+  "datetime",
+  {
+    data_type => "TIMESTAMP",
+    default_value => "CURRENT_TIMESTAMP",
+    is_nullable => 1,
+    size => 14,
+  },
+  "image_id",
+  { data_type => "INT", default_value => "", is_nullable => 0, size => 10 },
+  "website_id",
+  { data_type => "INT", default_value => 0, is_nullable => 0, size => 10 },
+);
+__PACKAGE__->set_primary_key("id");
+__PACKAGE__->belongs_to(
+  "category_id",
+  "CmsDB::ProductCategory",
+  { id => "category_id" },
+);
+__PACKAGE__->belongs_to("website_id", "CmsDB::Website", { id => "website_id" });
+__PACKAGE__->belongs_to("image_id", "CmsDB::File", { id => "image_id" });
+__PACKAGE__->has_many(
+  "product_langs",
+  "CmsDB::ProductLang",
+  { "foreign.product_id" => "self.id" },
+);
+
+1;
+

Added: trunk/OzinoCMS/lib/CmsDB/ProductCategory.pm
===================================================================
--- trunk/OzinoCMS/lib/CmsDB/ProductCategory.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/CmsDB/ProductCategory.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,26 @@
+package CmsDB::ProductCategory;
+
+# Created by DBIx::Class::Schema::Loader v0.03009 @ 2007-03-12 14:06:26
+
+use strict;
+use warnings;
+
+use base 'DBIx::Class';
+
+__PACKAGE__->load_components("PK::Auto", "Core");
+__PACKAGE__->table("product_category");
+__PACKAGE__->add_columns(
+  "id",
+  { data_type => "INT", default_value => undef, is_nullable => 0, size => 10 },
+  "title",
+  { data_type => "VARCHAR", default_value => "", is_nullable => 0, size => 50 },
+);
+__PACKAGE__->set_primary_key("id");
+__PACKAGE__->has_many(
+  "products",
+  "CmsDB::Product",
+  { "foreign.category_id" => "self.id" },
+);
+
+1;
+

Added: trunk/OzinoCMS/lib/CmsDB/ProductLang.pm
===================================================================
--- trunk/OzinoCMS/lib/CmsDB/ProductLang.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/CmsDB/ProductLang.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,29 @@
+package CmsDB::ProductLang;
+
+# Created by DBIx::Class::Schema::Loader v0.03009 @ 2007-03-12 14:10:11
+
+use strict;
+use warnings;
+
+use base 'DBIx::Class';
+
+__PACKAGE__->load_components("PK::Auto", "Core");
+__PACKAGE__->table("product_lang");
+__PACKAGE__->add_columns(
+  "id",
+  { data_type => "INT", default_value => undef, is_nullable => 0, size => 11 },
+  "product_id",
+  { data_type => "INT", default_value => "", is_nullable => 0, size => 10 },
+  "language_id",
+  { data_type => "VARCHAR", default_value => "", is_nullable => 0, size => 5 },
+  "title",
+  { data_type => "VARCHAR", default_value => "", is_nullable => 0, size => 150 },
+  "description",
+  { data_type => "TEXT", default_value => "", is_nullable => 0, size => 65_535 },
+);
+__PACKAGE__->set_primary_key("id");
+__PACKAGE__->belongs_to("product_id", "CmsDB::Product", { id => "product_id" });
+__PACKAGE__->belongs_to("language_id", "CmsDB::Language", { id => "language_id" });
+
+1;
+

Added: trunk/OzinoCMS/lib/CmsDB/Reseller.pm
===================================================================
--- trunk/OzinoCMS/lib/CmsDB/Reseller.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/CmsDB/Reseller.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,31 @@
+package CmsDB::Reseller;
+
+# Created by DBIx::Class::Schema::Loader v0.03009 @ 2007-01-14 18:05:33
+
+use strict;
+use warnings;
+
+use base 'DBIx::Class';
+
+__PACKAGE__->load_components("PK::Auto", "Core");
+__PACKAGE__->table("reseller");
+__PACKAGE__->add_columns(
+  "id",
+  { data_type => "INT", default_value => undef, is_nullable => 0, size => 10 },
+  "credit_headers_left",
+  { data_type => "INT", default_value => undef, is_nullable => 1, size => 11 },
+  "credit_users_left",
+  { data_type => "INT", default_value => "", is_nullable => 0, size => 11 },
+  "credit_xfer_left",
+  { data_type => "INT", default_value => "", is_nullable => 0, size => 10 },
+);
+__PACKAGE__->set_primary_key("id");
+__PACKAGE__->belongs_to("id", "CmsDB::User", { id => "id" });
+__PACKAGE__->has_many(
+  "reseller_websites",
+  "CmsDB::ResellerWebsite",
+  { "foreign.reseller_id" => "self.id" },
+);
+
+1;
+

Added: trunk/OzinoCMS/lib/CmsDB/ResellerWebsite.pm
===================================================================
--- trunk/OzinoCMS/lib/CmsDB/ResellerWebsite.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/CmsDB/ResellerWebsite.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,23 @@
+package CmsDB::ResellerWebsite;
+
+# Created by DBIx::Class::Schema::Loader v0.03009 @ 2007-01-13 20:20:04
+
+use strict;
+use warnings;
+
+use base 'DBIx::Class';
+
+__PACKAGE__->load_components("PK::Auto", "Core");
+__PACKAGE__->table("reseller_website");
+__PACKAGE__->add_columns(
+  "website_id",
+  { data_type => "INT", default_value => "", is_nullable => 0, size => 10 },
+  "reseller_id",
+  { data_type => "INT", default_value => "", is_nullable => 0, size => 10 },
+);
+__PACKAGE__->set_primary_key("website_id", "reseller_id");
+__PACKAGE__->belongs_to("reseller_id", "CmsDB::Reseller", { id => "reseller_id" });
+__PACKAGE__->belongs_to("website_id", "CmsDB::Website", { id => "website_id" });
+
+1;
+

Added: trunk/OzinoCMS/lib/CmsDB/ResetPassword.pm
===================================================================
--- trunk/OzinoCMS/lib/CmsDB/ResetPassword.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/CmsDB/ResetPassword.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,39 @@
+package CmsDB::ResetPassword;
+
+# Created by DBIx::Class::Schema::Loader v0.03009 @ 2007-03-03 21:10:55
+
+use strict;
+use warnings;
+
+use base 'DBIx::Class';
+
+__PACKAGE__->load_components("PK::Auto", "Core");
+__PACKAGE__->table("reset_password");
+__PACKAGE__->add_columns(
+  "id",
+  { data_type => "INT", default_value => undef, is_nullable => 0, size => 11 },
+  "user_id",
+  { data_type => "INT", default_value => "", is_nullable => 0, size => 10 },
+  "key",
+  { data_type => "VARCHAR", default_value => "", is_nullable => 0, size => 50 },
+  "request_datetime",
+  {
+    data_type => "TIMESTAMP",
+    default_value => "CURRENT_TIMESTAMP",
+    is_nullable => 1,
+    size => 14,
+  },
+  "reset_datetime",
+  {
+    data_type => "TIMESTAMP",
+    default_value => "0000-00-00 00:00:00",
+    is_nullable => 1,
+    size => 14,
+  },
+);
+__PACKAGE__->set_primary_key("id");
+__PACKAGE__->add_unique_constraint("key", ["key"]);
+__PACKAGE__->belongs_to("user_id", "CmsDB::User", { id => "user_id" });
+
+1;
+

Added: trunk/OzinoCMS/lib/CmsDB/Role.pm
===================================================================
--- trunk/OzinoCMS/lib/CmsDB/Role.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/CmsDB/Role.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,26 @@
+package CmsDB::Role;
+
+# Created by DBIx::Class::Schema::Loader v0.03009 @ 2007-01-13 20:20:04
+
+use strict;
+use warnings;
+
+use base 'DBIx::Class';
+
+__PACKAGE__->load_components("PK::Auto", "Core");
+__PACKAGE__->table("role");
+__PACKAGE__->add_columns(
+  "id",
+  { data_type => "INT", default_value => undef, is_nullable => 0, size => 10 },
+  "role",
+  { data_type => "VARCHAR", default_value => "", is_nullable => 0, size => 100 },
+);
+__PACKAGE__->set_primary_key("id");
+__PACKAGE__->has_many(
+  "map_user_role",
+  "CmsDB::UserRole",
+  { "foreign.roleid" => "self.id" },
+);
+
+1;
+

Added: trunk/OzinoCMS/lib/CmsDB/Skin.pm
===================================================================
--- trunk/OzinoCMS/lib/CmsDB/Skin.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/CmsDB/Skin.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,43 @@
+package CmsDB::Skin;
+
+# Created by DBIx::Class::Schema::Loader v0.03009 @ 2007-01-13 20:20:04
+
+use strict;
+use warnings;
+
+use base 'DBIx::Class';
+
+__PACKAGE__->load_components("PK::Auto", "Core");
+__PACKAGE__->table("skin");
+__PACKAGE__->add_columns(
+  "id",
+  { data_type => "INT", default_value => undef, is_nullable => 0, size => 10 },
+  "file_name",
+  { data_type => "VARCHAR", default_value => "", is_nullable => 0, size => 100 },
+  "type",
+  { data_type => "VARCHAR", default_value => "", is_nullable => 0, size => 250 },
+  "website_id",
+  { data_type => "INT", default_value => 0, is_nullable => 0, size => 10 },
+  "contentarea_list",
+  { data_type => "VARCHAR", default_value => "", is_nullable => 0, size => 255 },
+);
+__PACKAGE__->set_primary_key("id");
+__PACKAGE__->has_many(
+  "category_langs",
+  "CmsDB::CategoryLang",
+  { "foreign.default_skin_id" => "self.id" },
+);
+__PACKAGE__->has_many(
+  "website_langs",
+  "CmsDB::WebsiteLang",
+  { "foreign.default_skin_id" => "self.id" },
+);
+__PACKAGE__->belongs_to("website_id", "CmsDB::Website", { id => "website_id" });
+__PACKAGE__->has_many(
+  "page_langs",
+  "CmsDB::PageLang",
+  { "foreign.default_skin_id" => "self.id" },
+);
+
+1;
+

Added: trunk/OzinoCMS/lib/CmsDB/User.pm
===================================================================
--- trunk/OzinoCMS/lib/CmsDB/User.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/CmsDB/User.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,64 @@
+package CmsDB::User;
+
+# Created by DBIx::Class::Schema::Loader v0.03007 @ 2007-02-04 14:35:34
+
+use strict;
+use warnings;
+
+use base 'DBIx::Class';
+
+__PACKAGE__->load_components("PK::Auto", "Core");
+__PACKAGE__->table("user");
+__PACKAGE__->add_columns(
+  "id",
+  { data_type => "INT", default_value => undef, is_nullable => 0, size => 10 },
+  "website_id",
+  { data_type => "INT", default_value => 0, is_nullable => 0, size => 10 },
+  "username",
+  { data_type => "VARCHAR", default_value => "", is_nullable => 0, size => 30 },
+  "password",
+  { data_type => "CHAR", default_value => "", is_nullable => 1, size => 32 },
+  "firstname",
+  { data_type => "VARCHAR", default_value => "", is_nullable => 0, size => 50 },
+  "lastname",
+  { data_type => "VARCHAR", default_value => "", is_nullable => 0, size => 50 },
+  "email",
+  { data_type => "VARCHAR", default_value => undef, is_nullable => 1, size => 100 },
+  "deleted",
+  { data_type => "TINYINT", default_value => 0, is_nullable => 0, size => 4 },
+  "enable",
+  { data_type => "TINYINT", default_value => 1, is_nullable => 0, size => 4 },
+);
+__PACKAGE__->set_primary_key("id");
+__PACKAGE__->has_many("user_roles", "UserRole", { "foreign.userid" => "self.id" });
+__PACKAGE__->belongs_to("website_id", "Website", { id => "website_id" });
+__PACKAGE__->has_many("resellers", "Reseller", { "foreign.id" => "self.id" });
+__PACKAGE__->has_many(
+  "user_gizmo_permissions",
+  "UserGizmoPermission",
+  { "foreign.user_id" => "self.id" },
+);
+__PACKAGE__->has_many("websites", "Website", { "foreign.admin_id" => "self.id" });
+__PACKAGE__->has_many(
+  "user_page_permissions",
+  "UserPagePermission",
+  { "foreign.user_id" => "self.id" },
+);
+__PACKAGE__->has_many(
+  "user_website_permissions",
+  "UserWebsitePermission",
+  { "foreign.user_id" => "self.id" },
+);
+__PACKAGE__->has_many(
+  "group_members",
+  "GroupMember",
+  { "foreign.user_id" => "self.id" },
+);
+__PACKAGE__->has_many(
+  "user_category_permissions",
+  "UserCategoryPermission",
+  { "foreign.user_id" => "self.id" },
+);
+
+1;
+

Added: trunk/OzinoCMS/lib/CmsDB/UserCategoryPermission.pm
===================================================================
--- trunk/OzinoCMS/lib/CmsDB/UserCategoryPermission.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/CmsDB/UserCategoryPermission.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,30 @@
+package CmsDB::UserCategoryPermission;
+
+# Created by DBIx::Class::Schema::Loader v0.03009 @ 2007-01-13 20:20:04
+
+use strict;
+use warnings;
+
+use base 'DBIx::Class';
+
+__PACKAGE__->load_components("PK::Auto", "Core");
+__PACKAGE__->table("user_category_permission");
+__PACKAGE__->add_columns(
+  "id",
+  { data_type => "INT", default_value => undef, is_nullable => 0, size => 10 },
+  "category_id",
+  { data_type => "INT", default_value => "", is_nullable => 0, size => 10 },
+  "permission",
+  { data_type => "TINYINT", default_value => "", is_nullable => 0, size => 3 },
+  "user_id",
+  { data_type => "INT", default_value => "", is_nullable => 0, size => 10 },
+);
+__PACKAGE__->set_primary_key("id");
+__PACKAGE__->belongs_to("user_id", "CmsDB::User", { id => "user_id" });
+__PACKAGE__->belongs_to("category_id", "CmsDB::Category", { id => "category_id" });
+
+# Added by Omid Houshyar
+__PACKAGE__->add_unique_constraint( catid_usrid => [ qw/category_id user_id/ ]);
+
+1;
+

Added: trunk/OzinoCMS/lib/CmsDB/UserGizmoPermission.pm
===================================================================
--- trunk/OzinoCMS/lib/CmsDB/UserGizmoPermission.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/CmsDB/UserGizmoPermission.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,30 @@
+package CmsDB::UserGizmoPermission;
+
+# Created by DBIx::Class::Schema::Loader v0.03009 @ 2007-01-13 20:20:04
+
+use strict;
+use warnings;
+
+use base 'DBIx::Class';
+
+__PACKAGE__->load_components("PK::Auto", "Core");
+__PACKAGE__->table("user_gizmo_permission");
+__PACKAGE__->add_columns(
+  "id",
+  { data_type => "INT", default_value => undef, is_nullable => 0, size => 10 },
+  "gizmo_id",
+  { data_type => "INT", default_value => "", is_nullable => 0, size => 10 },
+  "permission",
+  { data_type => "TINYINT", default_value => "", is_nullable => 0, size => 3 },
+  "user_id",
+  { data_type => "INT", default_value => "", is_nullable => 0, size => 10 },
+);
+__PACKAGE__->set_primary_key("id");
+__PACKAGE__->belongs_to("user_id", "CmsDB::User", { id => "user_id" });
+__PACKAGE__->belongs_to("gizmo_id", "CmsDB::Gizmo", { id => "gizmo_id" });
+
+### Added by reza sadeghzadeh
+__PACKAGE__->add_unique_constraint( gizmoid_usrid => [ qw/gizmo_id user_id/ ]);
+
+1;
+

Added: trunk/OzinoCMS/lib/CmsDB/UserPagePermission.pm
===================================================================
--- trunk/OzinoCMS/lib/CmsDB/UserPagePermission.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/CmsDB/UserPagePermission.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,30 @@
+package CmsDB::UserPagePermission;
+
+# Created by DBIx::Class::Schema::Loader v0.03009 @ 2007-01-13 20:20:04
+
+use strict;
+use warnings;
+
+use base 'DBIx::Class';
+
+__PACKAGE__->load_components("PK::Auto", "Core");
+__PACKAGE__->table("user_page_permission");
+__PACKAGE__->add_columns(
+  "id",
+  { data_type => "INT", default_value => undef, is_nullable => 0, size => 10 },
+  "page_id",
+  { data_type => "INT", default_value => "", is_nullable => 0, size => 10 },
+  "permission",
+  { data_type => "TINYINT", default_value => "", is_nullable => 0, size => 3 },
+  "user_id",
+  { data_type => "INT", default_value => "", is_nullable => 0, size => 10 },
+);
+__PACKAGE__->set_primary_key("id");
+__PACKAGE__->belongs_to("user_id", "CmsDB::User", { id => "user_id" });
+__PACKAGE__->belongs_to("page_id", "CmsDB::Page", { id => "page_id" });
+
+# Added by Omid Houshyar
+__PACKAGE__->add_unique_constraint( pageid_usrid => [ qw/page_id user_id/ ]);
+
+1;
+

Added: trunk/OzinoCMS/lib/CmsDB/UserRole.pm
===================================================================
--- trunk/OzinoCMS/lib/CmsDB/UserRole.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/CmsDB/UserRole.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,23 @@
+package CmsDB::UserRole;
+
+# Created by DBIx::Class::Schema::Loader v0.03009 @ 2007-01-13 20:20:04
+
+use strict;
+use warnings;
+
+use base 'DBIx::Class';
+
+__PACKAGE__->load_components("PK::Auto", "Core");
+__PACKAGE__->table("user_role");
+__PACKAGE__->add_columns(
+  "userid",
+  { data_type => "INT", default_value => 0, is_nullable => 0, size => 10 },
+  "roleid",
+  { data_type => "INT", default_value => 0, is_nullable => 0, size => 10 },
+);
+__PACKAGE__->set_primary_key("userid", "roleid");
+__PACKAGE__->belongs_to("roleid", "CmsDB::Role", { id => "roleid" });
+__PACKAGE__->belongs_to("userid", "CmsDB::User", { id => "userid" });
+
+1;
+

Added: trunk/OzinoCMS/lib/CmsDB/UserWebsitePermission.pm
===================================================================
--- trunk/OzinoCMS/lib/CmsDB/UserWebsitePermission.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/CmsDB/UserWebsitePermission.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,27 @@
+package CmsDB::UserWebsitePermission;
+
+# Created by DBIx::Class::Schema::Loader v0.03009 @ 2007-01-13 20:20:04
+
+use strict;
+use warnings;
+
+use base 'DBIx::Class';
+
+__PACKAGE__->load_components("PK::Auto", "Core");
+__PACKAGE__->table("user_website_permission");
+__PACKAGE__->add_columns(
+  "id",
+  { data_type => "INT", default_value => undef, is_nullable => 0, size => 10 },
+  "website_id",
+  { data_type => "INT", default_value => "", is_nullable => 0, size => 10 },
+  "permission",
+  { data_type => "TINYINT", default_value => "", is_nullable => 0, size => 3 },
+  "user_id",
+  { data_type => "INT", default_value => "", is_nullable => 0, size => 10 },
+);
+__PACKAGE__->set_primary_key("id");
+__PACKAGE__->belongs_to("user_id", "CmsDB::User", { id => "user_id" });
+__PACKAGE__->belongs_to("website_id", "CmsDB::Website", { id => "website_id" });
+
+1;
+

Added: trunk/OzinoCMS/lib/CmsDB/VUsernameOnWebsiteid.pm
===================================================================
--- trunk/OzinoCMS/lib/CmsDB/VUsernameOnWebsiteid.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/CmsDB/VUsernameOnWebsiteid.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,35 @@
+package CmsDB::VUsernameOnWebsiteid;
+
+# Created by DBIx::Class::Schema::Loader v0.03007 @ 2007-01-17 20:26:05
+
+use strict;
+use warnings;
+
+use base 'DBIx::Class';
+
+__PACKAGE__->load_components("PK::Auto", "Core");
+__PACKAGE__->table("v_username_on_websiteid");
+__PACKAGE__->add_columns(
+  "global_username",
+  {
+    data_type => "VARBINARY",
+    default_value => undef,
+    is_nullable => 1,
+    size => 27,
+  },
+  "id",
+  { data_type => "INT", default_value => 0, is_nullable => 0, size => 10 },
+  "website_id",
+  { data_type => "INT", default_value => 0, is_nullable => 0, size => 10 },
+  "username",
+  { data_type => "CHAR", default_value => "", is_nullable => 1, size => 15 },
+  "password",
+  { data_type => "CHAR", default_value => "", is_nullable => 1, size => 32 },
+  "firstname",
+  { data_type => "CHAR", default_value => "", is_nullable => 0, size => 50 },
+  "lastname",
+  { data_type => "CHAR", default_value => "", is_nullable => 0, size => 50 },
+);
+
+1;
+

Added: trunk/OzinoCMS/lib/CmsDB/Website.pm
===================================================================
--- trunk/OzinoCMS/lib/CmsDB/Website.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/CmsDB/Website.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,77 @@
+package CmsDB::Website;
+
+# Created by DBIx::Class::Schema::Loader v0.03009 @ 2007-01-14 22:03:11
+
+use strict;
+use warnings;
+
+use base 'DBIx::Class';
+
+__PACKAGE__->load_components("PK::Auto", "Core");
+__PACKAGE__->table("website");
+__PACKAGE__->add_columns(
+  "id",
+  { data_type => "INT", default_value => undef, is_nullable => 0, size => 10 },
+  "default_language_id",
+  { data_type => "VARCHAR", default_value => "EN", is_nullable => 0, size => 5 },
+  "admin_id",
+  { data_type => "INT", default_value => 1, is_nullable => 0, size => 10 },
+  "credit_headers_left",
+  { data_type => "INT", default_value => "", is_nullable => 0, size => 11 },
+  "credit_users_left",
+  { data_type => "INT", default_value => "", is_nullable => 0, size => 11 },
+  "credit_xfer_left",
+  { data_type => "INT", default_value => "", is_nullable => 0, size => 11 },
+);
+__PACKAGE__->set_primary_key("id");
+__PACKAGE__->has_many("users", "CmsDB::User", { "foreign.website_id" => "self.id" });
+__PACKAGE__->has_many(
+  "website_langs",
+  "CmsDB::WebsiteLang",
+  { "foreign.website_id" => "self.id" },
+);
+__PACKAGE__->belongs_to(
+  "default_language_id",
+  "CmsDB::Language",
+  { id => "default_language_id" },
+);
+__PACKAGE__->belongs_to("admin_id", "CmsDB::User", { id => "admin_id" });
+__PACKAGE__->has_many(
+  "reseller_websites",
+  "CmsDB::ResellerWebsite",
+  { "foreign.website_id" => "self.id" },
+);
+__PACKAGE__->has_many(
+  "gizmoes",
+  "CmsDB::Gizmo",
+  { "foreign.website_id" => "self.id" },
+);
+__PACKAGE__->has_many(
+  "user_website_permissions",
+  "CmsDB::UserWebsitePermission",
+  { "foreign.website_id" => "self.id" },
+);
+__PACKAGE__->has_many(
+  "groups",
+  "CmsDB::Group",
+  { "foreign.website_id" => "self.id" },
+);
+__PACKAGE__->has_many("skins", "CmsDB::Skin", { "foreign.website_id" => "self.id" });
+__PACKAGE__->has_many(
+  "host_headers",
+  "CmsDB::HostHeader",
+  { "foreign.website_id" => "self.id" },
+);
+__PACKAGE__->has_many(
+  "group_website_permissions",
+  "CmsDB::GroupWebsitePermission",
+  { "foreign.website_id" => "self.id" },
+);
+__PACKAGE__->has_many(
+  "categories",
+  "CmsDB::Category",
+  { "foreign.website_id" => "self.id" },
+);
+
+1;
+

Added: trunk/OzinoCMS/lib/CmsDB/WebsiteLang.pm
===================================================================
--- trunk/OzinoCMS/lib/CmsDB/WebsiteLang.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/CmsDB/WebsiteLang.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,35 @@
+package CmsDB::WebsiteLang;
+
+# Created by DBIx::Class::Schema::Loader v0.03009 @ 2007-01-13 20:20:04
+
+use strict;
+use warnings;
+
+use base 'DBIx::Class';
+
+__PACKAGE__->load_components("PK::Auto", "Core");
+__PACKAGE__->table("website_lang");
+__PACKAGE__->add_columns(
+  "id",
+  { data_type => "INT", default_value => undef, is_nullable => 0, size => 10 },
+  "website_id",
+  { data_type => "INT", default_value => 0, is_nullable => 0, size => 10 },
+  "language_id",
+  { data_type => "VARCHAR", default_value => "", is_nullable => 0, size => 5 },
+  "website_name",
+  { data_type => "VARCHAR", default_value => "", is_nullable => 0, size => 45 },
+  "website_description",
+  { data_type => "VARCHAR", default_value => "", is_nullable => 0, size => 250 },
+  "website_keyword",
+  { data_type => "VARCHAR", default_value => "", is_nullable => 0, size => 250 },
+  "default_skin_id",
+  { data_type => "INT", default_value => 1, is_nullable => 0, size => 10 },
+);
+__PACKAGE__->set_primary_key("id");
+__PACKAGE__->add_unique_constraint("site_language_unique", ["website_id", "language_id"]);
+__PACKAGE__->belongs_to("language_id", "CmsDB::Language", { id => "language_id" });
+__PACKAGE__->belongs_to("default_skin_id", "CmsDB::Skin", { id => "default_skin_id" });
+__PACKAGE__->belongs_to("website_id", "CmsDB::Website", { id => "website_id" });
+
+1;
+

Added: trunk/OzinoCMS/lib/CmsDB.pm
===================================================================
--- trunk/OzinoCMS/lib/CmsDB.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/CmsDB.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,13 @@
+package CmsDB;
+
+# Created by DBIx::Class::Schema::Loader v0.03009 @ 2006-12-21 13:21:43
+
+use strict;
+use warnings;
+
+use base 'DBIx::Class::Schema';
+
+__PACKAGE__->load_classes;
+
+1;
+

Added: trunk/OzinoCMS/lib/I18N/fa.pm
===================================================================
--- trunk/OzinoCMS/lib/I18N/fa.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/I18N/fa.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,11 @@
+package cms::I18N::fa;
+
+use strict;
+use warnings;
+
+use base qw( cms::I18N );
+
+our %Lexicon = (
+);
+
+1;

Added: trunk/OzinoCMS/lib/cms/Controller/Admin/Reseller.pm
===================================================================
--- trunk/OzinoCMS/lib/cms/Controller/Admin/Reseller.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/cms/Controller/Admin/Reseller.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,304 @@
+package cms::Controller::Admin::Reseller;
+
+use strict;
+use warnings;
+use base 'Catalyst::Controller';
+
+=head1 NAME
+
+cms::Controller::Admin::Reseller - Catalyst Controller
+
+=head1 DESCRIPTION
+
+Catalyst Controller.
+
+=head1 METHODS
+
+=cut
+
+
+=head2 index 
+
+=cut
+
+sub index : Private {
+	my ( $self, $c ) = @_;
+	my $rsWebsite = $c->forward( 'getWebsiteList' ); 
+
+	if ($rsWebsite) {
+		$c->stash( websiteList => $rsWebsite);
+	} else {
+		$c->stash( websiteList => $rsWebsite, message => $c->localize("No website defined yet, you can define first") );
+	}
+	$c->stash( template => 'admin/reseller.tt', content => $c->view('TT')->render($c,'admin/reseller/websiteList.tt') ); 
+}
+
+=head2 getWebsiteList 
+	returns List of websites
+=cut
+sub getWebsiteList : Private {
+	my ( $self, $c ) = @_;
+
+	my @rsWebsite = $c->model('CmsDB')->resultset('ResellerWebsite')->search({
+			reseller_id => $c->user->get_column('id'),			
+			default_language_id => \' = language_id', # select default language record from website_langs
+	}, {
+		prefetch => { website_id => 'website_langs' }
+	});
+	return \@rsWebsite;
+}
+
+
+=head2 viewWebsitesList
+	Shows list of websites to admin
+=cut
+
+sub viewWebsitesList : Local {
+	my ( $self, $c ) = @_;
+	
+	my $rsWebsite = $c->forward( 'getWebsiteList' ); 
+
+	if ($rsWebsite) {
+		$c->stash( template => 'admin/reseller/websiteList.tt', websiteList => $rsWebsite);
+	} else {
+		$c->stash( template => 'admin/reseller/websiteList.tt', websiteList => $rsWebsite, message => "No website defined you can define first" );
+	}
+}
+
+=head2 viewWebsite 
+	View single website information
+
+=head3 TODO:
+	
+test XSS, 
+
+=cut
+
+sub viewWebsite : Local {
+	my ( $self, $c , $websiteId ) = @_;
+	
+	unless ($websiteId) {
+		$c->res->body( $c->localize('website not found'));
+		return 1; 
+	}
+	my $rsWebsite = $c->model('CmsDB')->resultset('ResellerWebsite')->search({
+		'me.website_id' => $websiteId,
+		reseller_id => $c->user->get_column('id'),			
+	});
+	if ($rsWebsite->count) {
+		my @rsHeaders = $c->model('CmsDB')->resultset('HostHeader')->search({
+			 'me.website_id' =>  $websiteId
+		});
+		my @rsLanguages = $c->model('CmsDB')->resultset('WebsiteLang')->search({
+			 'me.website_id' =>  $websiteId
+		}, {
+			prefetch => [qw/ language_id /]
+		});
+
+		my @rsWebsite = $c->model('CmsDB')->resultset('Website')->search({
+			 'me.id' =>  $websiteId
+		}, {
+			prefetch => [qw/ default_language_id /]
+		});
+		$c->stash(template => 'admin/reseller/viewSingleWebsite.tt' , website => \@rsWebsite, headers => \@rsHeaders, languages => \@rsLanguages );
+	} else {
+		$c->res->body( $c->localize('website not found'));
+	}	
+}
+
+=head2 addUser
+	generates form for add user 
+=cut
+sub addUser : Local {
+	my ( $self, $c, $message ) = @_;
+        my $rsWebsite = $c->forward( 'getWebsiteList' );
+	$c->stash( template => 'admin/reseller/addUser.tt', websiteList => $rsWebsite , message => $message, action => 'AddUser' , params => $c->req->params );
+}
+
+
+=head2 addUser
+	add new user
+=cut
+sub doAddUser : Local {
+	my ( $self, $c ) = @_;
+	my $message;
+	my $error = 0;
+	## all fields should be fielded out
+	unless ( $c->req->params->{username} && $c->req->params->{password} && $c->req->params->{passwordConfirm} 
+						&& $c->req->params->{firstname} && $c->req->params->{lastname} ) {
+		$message = $c->localize("Please Fill All Fields")."<br />";
+		$error = 1;
+	};
+	## check password fields 
+	unless ( $c->req->params->{password} eq $c->req->params->{passwordConfirm} ) {
+		$message .= $c->localize("Please check both passwords")."<br />";
+		$error = 1;
+	};
+	## check username availablity
+        my @rs = $c->model('CmsDB')->resultset('User')->search({ username => $c->req->params->{username} });
+        if (@rs){
+		$message .= $c->localize("User name is not available, Please choose another one")."<br />";
+		$error = 1;
+        };
+	my $websiteId = $c->req->params->{website};
+	$websiteId = 1 unless $c->model('CmsDB')->resultset('ResellerWebsite')->find({
+		website_id => $websiteId,
+		reseller_id => $c->user->get_column('id'),			
+	} );
+	if ($error) {
+		$c->forward( 'addUser', [$message] );
+		return;
+	}
+	$c->model('CmsDB')->storage->txn_begin();
+	@rs = $c->model('CmsDB')->resultset('User')->create({
+				website_id => $websiteId,
+				username => $c->req->params->{username},
+				password => Digest::MD5->md5_hex($c->req->params->{password}),
+				firstname => $c->req->params->{firstname},
+				lastname => $c->req->params->{lastname},
+			});
+	my $result = $c->model('CmsDB')->resultset('Reseller')->find($c->user->get_column('id'))->update({ credit_users_left =>\'credit_users_left - 1' });
+	if ( $result && @rs ) {
+		$c->model('CmsDB')->storage->txn_commit();
+	} else {
+		$c->model('CmsDB')->storage->txn_rollback();
+	}
+
+	if (@rs && $result) {
+		$c->stash( template => 'admin/reseller/addUser.tt', message => $c->localize("User added successfully"), action => 'finish' );
+	} else {
+		$c->stash( template => 'admin/reseller/addUser.tt', message => $c->localize("Failed to add the user, please contact site administrators"), action => 'finish' );
+	}
+}
+
+=head2 addWebsite
+	generates form for add website
+
+=head3 TODO
+
+think about add website set user admin all that website_id = 1
+
+=cut
+sub addWebsite: Local {
+	my ( $self, $c, $message ) = @_;
+	my @rsLanguages = $c->model('CmsDB')->resultset('Language')->all();
+	my @rsUsers = $c->model('CmsDB')->resultset('User')->search({ 
+		website_id => 1,
+	});
+
+	unless (@rsUsers) {
+		$message = $c->localize("First please add an admin for this site");
+		$c->forward( 'addUser', [$message] );
+		return;
+	}
+	
+	$c->stash(
+			selectedLanguage => 'en',
+			template => 'admin/addWebsite.tt', 
+			userList => \@rsUsers,
+			languages => \@rsLanguages,
+			message => $message,
+			action => 'AddWebsite',
+			params => $c->req->params
+		);
+}
+
+
+=head2 doAddWebsite
+
+	add new website 
+
+=cut
+sub doAddWebsite : Local {
+	my ( $self, $c ) = @_;
+	my $message;
+	my $error = 0;
+
+#	$c->model('CmsDB')->storage->debug(1);
+
+
+	## all fields should be fielded out
+	unless ( $c->req->params->{name} && $c->req->params->{header} ) {
+		$message = $c->localize("Please Fill Website Name and Address")."<br />";
+		$error = 1;
+	};
+	## check username availablity
+        my @rs = $c->model('CmsDB')->resultset('User')->search({
+		id => $c->req->params->{admin},
+		website_id => 1,
+	});
+        unless (@rs){
+		$message .= $c->localize("User name is not available, Please choose another one")."<br />";
+		$error = 1;
+        };
+	## check hostheader availablity
+	if ( $c->req->params->{header} ) {
+		my @rs = $c->model('CmsDB')->resultset('HostHeader')->search({
+			header => $c->req->params->{header},
+		});
+		if (@rs){
+			$message .= $c->localize("Host address is not available, Please choos another one")."<br />";
+			$error = 1;
+		};
+	}
+	
+	if ($error) {
+		$c->forward( 'addWebsite', [$message] );
+		return;
+	}
+	# going to insert the new website --------------------------------
+	my $saved = 0;
+	$c->model('CmsDB')->storage->txn_begin();
+	my $rsWebsite = $c->model('CmsDB')->resultset('Website')->create({
+		default_language_id => $c->req->params->{language},
+		default_skin_id => 0,
+		admin_id => $c->req->params->{admin},
+	});
+	if ($rsWebsite) {
+		my $rsHeader = $c->model('CmsDB')->resultset('HostHeader')->create({
+			website_id => $rsWebsite->get_column('id'),
+			header => $c->req->params->{header},
+		});
+		if ($rsHeader) {
+			my $rsWebsiteLanguage = $c->model('CmsDB')->resultset('WebsiteLang')->create({
+				website_id => $rsWebsite->get_column('id'),
+				language_id => $c->req->params->{language},
+				website_name => $c->req->params->{name},
+				website_description => $c->req->params->{description},
+				website_keyword => $c->req->params->{keywords},
+			});
+			if ($rsWebsiteLanguage) { 
+				$c->model('CmsDB')->storage->txn_commit();
+				$saved = 1
+			};
+		}
+	}
+	$c->model('CmsDB')->storage->txn_rollback() unless ($saved);
+		
+	# finished inserting new website --------------------------------
+
+	if ($saved) {
+		$c->stash( template => 'admin/addWebsite.tt', message => $c->localize("Sky is Blue, your website added successfully"), action => 'finish' );
+	} else {
+		$c->stash( template => 'admin/addUser.tt', message => $c->localize("Sky is falling, can't add website please contact site administrators"), action => 'finish' );
+	}
+}
+
+sub editWebsite : Local {
+	my ( $self, $c ) = @_;
+
+	$c->res->body("Not impemented yet");
+}
+
+=head1 AUTHOR
+
+Davood Firoozian
+
+=head1 LICENSE
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+
+1;

Added: trunk/OzinoCMS/lib/cms/Controller/Admin/Root.pm
===================================================================
--- trunk/OzinoCMS/lib/cms/Controller/Admin/Root.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/cms/Controller/Admin/Root.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,105 @@
+package cms::Controller::Admin::Root;
+
+use strict;
+use warnings;
+use base 'Catalyst::Controller';
+
+=head1 NAME
+
+cms::Controller::Admin::Root - Catalyst Controller
+
+=head1 DESCRIPTION
+
+Catalyst Controller.
+
+=head1 METHODS
+
+=cut
+
+
+=head2 index 
+
+=cut
+
+sub index : Private {
+	my ( $self, $c, $message ) = @_;
+	$c->detach('listResellers');
+}
+
+
+sub listResellers : Local {
+	my ( $self, $c, $message ) = @_;
+	my @rsReseller = $c->model('CmsDB')->resultset('Reseller')->search({
+		deleted => 0,	
+	}, {
+		prefetch => 'id'
+	});
+
+	if (scalar(@rsReseller)) {
+		$c->stash( resellerList => \@rsReseller);
+	} else {
+		$c->stash( message => $message ."<br />". $c->localize("No reseller found, you can define first") );
+	}
+	$c->stash( template => 'admin/root.tt', content => $c->view('TT')->render($c,'admin/root/resellerList.tt') ); 
+
+}
+
+
+=head2 enableDisableReseller 
+
+Disable or Enables a User (claims to be a reseller)
+
+=cut
+
+sub enableDisableReseller : Local {
+	my ( $self, $c, $resellerID ) =  @_;
+	
+	my ( $message, $content, $url, $result );
+
+	$result = $c->model('CmsDB')->resultset('User')->find($resellerID)->update({ enable =>\'NOT enable' }) if $resellerID;
+	my $user = $c->model('CmsDB')->resultset('User')->find($resellerID);
+	if ($result) {
+		$message = $c->localize("User status changed to ". ($user->get_column('enable') ? $c->localize("Enable") : $c->localize("Disable") ) );
+	} else {
+		$message = $c->localize("User status change Failed");
+	}		
+	if ($user->get_column('enable')) {
+		$message .= " " . $c->prototype->link_to_remote( $c->localize( "Disable") , { update => $user->get_column("username")."Status", url => $c->uri_for('/admin/root/enableDisableReseller',$resellerID) } );
+	} else {
+		$message .= " " . $c->prototype->link_to_remote( $c->localize( "Enable" ) , { update => $user->get_column("username")."Status", url => $c->uri_for('/admin/root/enableDisableReseller',$resellerID) } );
+	}
+	$c->res->body($message); 
+}
+
+=head2 viewSingleReseller 
+
+viewSingleReseller Data
+
+=cut
+
+sub viewSingleReseller : Local {
+	my ( $self, $c, $resellerID ) =  @_;
+	my $reseller = $c->model("CmsDB")->resultset('Reseller')->find( $resellerID, {
+		prefetch => [ "id" ]
+	});
+	my @websites = $c->model("CmsDB")->resultset('ResellerWebsite')->search( {
+		reseller_id => $resellerID,
+	}, {
+		prefetch => { website_id => 'website_langs' }
+	});
+	$c->stash( template => "admin/root/singleReseller.tt", reseller => $reseller, websites => \@websites ); 
+}
+
+
+=head1 AUTHOR
+
+Davood Firoozian
+
+=head1 LICENSE
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+
+1;

Added: trunk/OzinoCMS/lib/cms/Controller/Admin/Website/Category.pm
===================================================================
--- trunk/OzinoCMS/lib/cms/Controller/Admin/Website/Category.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/cms/Controller/Admin/Website/Category.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,724 @@
+package cms::Controller::Admin::Website::Category;
+
+use strict;
+use warnings;
+use base 'Catalyst::Controller';
+
+=head1 NAME
+
+cms::Controller::Admin::Website::Category - Catalyst Controller
+
+=head1 DESCRIPTION
+
+Catalyst Controller.
+
+=head1 METHODS
+
+=cut
+
+
+=head2 auto
+
+=cut
+
+sub auto : Private {
+	my ( $self, $c ) = @_;
+
+#	$c->model('CmsDB')->storage->debug(1);
+#	$c->log->dumper($c->{stash}{cms}{website});
+}
+
+=head2 add
+
+	Add new category to website
+
+=cut
+
+sub add : Local {
+	my ( $self, $c, $formData ) = @_;
+
+	my $language = $c->model('CmsDB')->resultset('Language')->find($c->{stash}{cms}{website}->{default_language_id});
+	my $skins = $c->model('CmsDB')->resultset('Skin')->search({ website_id => $c->{stash}{cms}{website}->{website_id} });
+
+	my @params;
+	# Set recursive flag.
+	$params[2] = 1;
+	$c->stash(
+		isAdd		=> 1,
+		defaultLangId	=> $c->{stash}{cms}{website}->{default_language_id},
+		languageTitle	=> $language->language_name,
+		catsList	=> $c->forward( '/core/category/getCatList', \@params ),
+		skinList	=> $skins,
+		groups		=> $c->forward('/common/usergroup/getGroups', []),
+		users		=> $c->forward('/common/usergroup/getUsers', []),
+		formData	=> $formData,
+		template	=> 'admin/category/addedit.tt',
+	);
+
+	# Get orderList 
+	if ( $formData->{parent_id} ) {
+		@params = ();
+		$params[1] = $formData->{parent_id};
+		$c->stash->{orderList} = $c->forward( '/core/category/getCatList', \@params);
+	} else {
+		$c->stash->{orderList} = $c->forward( '/core/category/getCatList', []);
+	}
+}
+
+=head2 addEditCatLang
+
+	Function to show add edit category lang form.
+
+=cut
+
+sub addEditCatLang : Local {
+	my ( $self, $c, $catId, $catLangId, $formData ) = @_;
+
+	my $languages = $c->model('CmsDB')->resultset('Language')->search(1);
+	my $skins = $c->model('CmsDB')->resultset('Skin')->search({ website_id => $c->{stash}{cms}{website}->{website_id} });
+
+	$c->stash(
+		defaultLangId	=> $c->{stash}{cms}{website}->{default_language_id},
+		languageList	=> $languages,
+		defaultSkinId	=> $c->{stash}{cms}{website}->{default_skin_id},
+		skinList	=> $skins,
+		template	=> 'admin/category/addeditcatlang.tt',
+	);
+
+	if ( $catLangId ) {
+		unless ( $formData ) {
+			my $catLang = $c->model('CmsDB')->resultset('CategoryLang')->find($catLangId, { prefetch => [ 'category_id', 'language_id', 'default_skin_id' ] });
+			$formData = {
+				catid		=> $catId,
+				catLangId	=> $catLangId,
+				title		=> $catLang->title,
+				description	=> $catLang->description,
+				language_id	=> $catLang->language_id->id,
+				default_skin_id	=> $catLang->default_skin_id->id,
+			};
+
+#			$c->log->dumper($formData);
+		}
+
+		$c->stash->{isEdit} = 1;
+	} else {
+		$formData = { catid => $catId } unless $formData;
+		$c->stash->{isAdd} = 1;
+	}
+
+	$c->stash->{formData} = $formData;
+
+}
+
+=head2 doAdd 
+
+=cut
+
+sub doAdd : Local {
+	my ( $self, $c ) = @_;
+
+	##################################################################
+	# Form validation
+	##################################################################
+	my %fieldsValidation = (
+		title		=> [[qw/NOT_BLANK/], [qw/LENGTH 0 45/]],
+		editPermission	=> [[qw/NOT_BLANK/]],
+	);
+	$c->form(%fieldsValidation);
+
+	my @vPerm = $c->req->param('viewPermission');
+	my @ePerm = $c->req->param('editPermission');
+
+	my $formData = {
+		title		=> $c->req->param('title'),
+		description	=> $c->req->param('description'),
+		parent_id	=> $c->req->param('parent_id'),
+		order		=> $c->req->param('order'),
+		status		=> $c->req->param('status'),
+		default_skin_id	=> $c->req->param('default_skin_id'),
+		viewPermission	=> $c->forward('/common/getUserGroupIdsFromViewEditPerm', [ \@vPerm, 1 ]),
+		editPermission	=> $c->forward('/common/getUserGroupIdsFromViewEditPerm', [ \@ePerm, 1 ]),
+	};
+
+#	$c->log->dumper($formData);
+
+	my $result = $c->form;
+	if ( $result->has_error ) {
+		$c->detach('add', [ $formData ]);
+	}
+	##################################################################
+	# End of form validation
+	##################################################################
+
+	##################################################################
+	# Add Category in DB
+	##################################################################
+
+                ################## Transaction start ###################
+
+#	$c->model('CmsDB')->storage->debug(1);
+	my $addCategory = sub {
+		my ( $catData ) = @_;
+
+		my $catsToUpdate = $c->model('CmsDB')->resultset('Category')->search({
+				website_id	=> $c->{stash}{cms}{website}->{website_id},
+				parent_id	=> $catData->{parent_id},
+				order		=> { '>' => $catData->{order} },
+			});
+
+		while (my $res = $catsToUpdate->next ) {
+			$res->order( $res->order + 1 );
+			$res->update;
+		}
+
+		my $cat = $c->model('CmsDB')->resultset('Category')->create({
+				website_id	=> $c->{stash}{cms}{website}->{website_id},
+				parent_id	=> $catData->{parent_id},
+				order		=> $catData->{order} + 1,
+				status		=> $catData->{status},
+			});
+
+		my $catLang = $cat->category_langs->create({
+#				language_id	=> $catData->{language_id},
+				language_id	=> $c->{stash}{cms}{website}->{default_language_id},
+				title		=> $catData->{title},
+				description	=> $catData->{description},
+				default_skin_id	=> $catData->{default_skin_id},
+			});
+
+		# Add group permission
+		# View
+		for (@{ $catData->{viewPermission}->{groups} }) {
+			my $catGrpPrm = $cat->group_category_permissions->create({
+					permission	=> 1,
+					group_id	=> $_,
+				});
+		}
+
+		# Edit
+		for (@{ $catData->{editPermission}->{groups} }) {
+			my $catGrpPrm = $cat->group_category_permissions->update_or_create(
+				{
+					permission	=> 2,
+					group_id	=> $_,
+				},
+				{
+					key	=> 'catid_grpid',
+				}
+			);
+		}
+
+		# Add user permission
+		# View
+		for (@{ $catData->{viewPermission}->{users} }) {
+			my $catUsrPrm = $cat->user_category_permissions->create({
+					permission	=> 1,
+					user_id	=> $_,
+				});
+		}
+
+		# Edit
+		for (@{ $catData->{editPermission}->{users} }) {
+			my $catUsrPrm = $cat->user_category_permissions->update_or_create(
+				{
+					permission	=> 2,
+					user_id		=> $_,
+				},
+				{
+					key	=> 'catid_usrid',
+				}
+			);
+		}
+
+	};
+
+	my $rs;
+	eval {
+		my $schema = $c->model('CmsDB')->schema;
+		$rs = $schema->txn_do( $addCategory, $formData);
+	};
+
+	if ($@) {                             # Transaction failed
+		die "The sky is falling! :p"
+		if ($@ =~ /Rollback failed/);     # Rollback failed
+
+		$c->stash->{message} = $c->localize('There is an ERROR to add category');
+		$c->log->debug("Add category ERROR: $@");
+		$c->detach( '/admin/website/category/index');
+	} else {
+		$c->stash->{message} = $c->localize('Category is added successfully') . '.';
+		$c->detach( '/admin/website/category/index');
+	}
+
+                ################### Transaction End #################
+
+	##################################################################
+	# End of add category
+	##################################################################
+
+}
+
+=head2 doAddEditCatLang
+
+	FUnction to add or edit category lang value in database.
+
+=cut
+
+sub doAddEditCatLang : Local {
+	my ( $self, $c, $catId, $catLangId ) = @_;
+
+	##################################################################
+	# Form validation
+	##################################################################
+	my %fieldsValidation = (
+		title		=> [[qw/NOT_BLANK/], [qw/LENGTH 0 45/]],
+	);
+	$c->form(%fieldsValidation);
+
+	my $formData = {
+		catid		=> $catId,
+		title		=> $c->req->param('title'),
+		description	=> $c->req->param('description'),
+		language_id	=> $c->req->param('language_id'),
+		default_skin_id	=> $c->req->param('default_skin_id'),
+	};
+
+#	$c->log->dumper($formData);
+
+	my $result = $c->form;
+	if ( $result->has_error ) {
+		my @params;
+		$params[0] = $catId;
+		$params[1] = $catLangId if $catLangId; 
+		$params[2] = $formData;
+		$c->detach( 'addEditCatLang', \@params );
+
+	}
+	##################################################################
+	# End of form validation
+	##################################################################
+	##################################################################
+	# Add or Edit Category Lang in DB
+	##################################################################
+
+                ################## Transaction start ###################
+
+#	$c->model('CmsDB')->storage->debug(1);
+	my $addCategoryLang = sub {
+		my ( $catData ) = @_;
+
+		my $category = $c->model('CmsDB')->resultset('Category')->find($catId);
+
+		delete $catData->{catid};
+		$category->category_langs->update_or_create(
+			$catData,
+			{
+				key	=> 'catid_langid'
+			}
+		);
+	};
+
+	my $editCategoryLang = sub {
+		my ( $catData ) = @_;
+
+		my $catLang = $c->model('CmsDB')->resultset('CategoryLang')->find($catLangId, { prefetch => [ 'language_id', 'default_skin_id' ] });
+
+		$catLang->title($catData->{title}) if ($catLang->title ne $catData->{title});
+		$catLang->description($catData->{description}) if ($catLang->description ne $catData->{description});
+		$catLang->language_id($catData->{language_id}) if ($catLang->language_id ne $catData->{language_id});
+		$catLang->default_skin_id($catData->{default_skin_id}) if ($catLang->default_skin_id ne $catData->{default_skin_id});
+		$catLang->update;
+
+	};
+
+
+	my $rs;
+	eval {
+		my $schema = $c->model('CmsDB')->schema;
+		if ( $c->req->param('submit') && $c->req->param('submit') eq $c->localize('Add') ) {
+			# Add category lang
+			$rs = $schema->txn_do( $addCategoryLang, $formData);
+		} else {
+			# Edit category lang
+			$rs = $schema->txn_do( $editCategoryLang, $formData);
+		}
+	};
+
+	if ($@) {                             # Transaction failed
+		die "The sky is falling! :p"
+		if ($@ =~ /Rollback failed/);     # Rollback failed
+
+		$c->log->debug("Add category lang ERROR: $@");
+		$c->stash->{message} = $c->localize('There is an ERROR to add category lang') . '.';
+		my @params;
+		$params[0] = $catId;
+		$c->detach( '/core/category/showCatLangList', \@params );
+	} else {
+		$c->stash->{message} = $c->localize('Category lang is add or updated successfully') . '.';
+		my @params;
+		$params[0] = $catId;
+		$c->detach( '/core/category/showCatLangList', \@params );	
+	}
+
+                ################### Transaction End #################
+
+	##################################################################
+	# End of add or edit category lang
+	##################################################################
+
+}
+
+=head2 doEdit 
+
+	Edit Category
+
+=cut
+
+sub doEdit : Local {
+	my ( $self, $c, $catId ) = @_;
+
+	##################################################################
+	# Form validation
+	##################################################################
+	my %fieldsValidation = (
+		editPermission	=> [[qw/NOT_BLANK/]],
+	);
+	$c->form(%fieldsValidation);
+
+	my @vPerm = $c->req->param('viewPermission');
+	my @ePerm = $c->req->param('editPermission');
+
+	my $formData = {
+		id		=> $catId,
+		parent_id	=> $c->req->param('parent_id'),
+		status		=> $c->req->param('status'),
+		viewPermission	=> $c->forward('/common/getUserGroupIdsFromViewEditPerm', [ \@vPerm, 1 ]),
+		editPermission	=> $c->forward('/common/getUserGroupIdsFromViewEditPerm', [ \@ePerm, 1 ]),
+	};
+
+#	$c->log->dumper($formData);
+
+	my $result = $c->form;
+	if ( $result->has_error ) {
+		my $tmpData = $c->forward( '/core/category/get', [ $catId ]);
+		$formData->{catLang} = $tmpData->{catLang};
+		$c->detach('edit', [ $catId, $formData ]);
+	}
+	##################################################################
+	# End of form validation
+	##################################################################
+
+	##################################################################
+	# Edit Category in DB
+	##################################################################
+
+                ################## Transaction start ###################
+
+#	$c->model('CmsDB')->storage->debug(1);
+	my $editCategory = sub {
+		my ( $catData ) = @_;
+
+		my $cat = $c->model('CmsDB')->resultset('Category')->find( 
+			$catData->{id},
+	     		{ prefetch => 'parent_id' }  
+		);
+
+		if ( $cat->parent_id->id != $catData->{parent_id} ) {
+
+			# Old category parent
+			# Check and decrease categories' order one level.
+			my $catsToUpdate = $c->model('CmsDB')->resultset('Category')->search({
+					website_id	=> $c->{stash}{cms}{website}->{website_id},
+					parent_id	=> $cat->parent_id->id,
+					order		=> { '>' => $cat->order },
+				});
+
+			while (my $res = $catsToUpdate->next ) {
+				$res->order( $res->order - 1 );
+				$res->update;
+			}
+
+			# New category parent
+			$catsToUpdate = $c->model('CmsDB')->resultset('Category')->search({
+					website_id	=> $c->{stash}{cms}{website}->{website_id},
+					parent_id	=> $catData->{parent_id},
+					# This line is commented to get all cats with the specified parent_id
+					# order		=> { '>' => $catData->{order} },
+				});
+
+			while (my $res = $catsToUpdate->next ) {
+				$res->order( $res->order + 1 );
+				$res->update;
+			}
+
+			$cat->parent_id( $catData->{parent_id} );
+			$cat->order( 0 );
+		}
+
+		$cat->status( $catData->{status} ) if ( $cat->status != $catData->{status} );
+		$cat->update;
+
+		# Remove category permissions
+		$cat->group_category_permissions->delete_all;
+		$cat->user_category_permissions->delete_all;
+
+		# Add group permission
+		# View
+		for (@{ $catData->{viewPermission}->{groups} }) {
+			my $catGrpPrm = $cat->group_category_permissions->create({
+					permission	=> 1,
+					group_id	=> $_,
+				});
+		}
+
+		# Edit
+		for (@{ $catData->{editPermission}->{groups} }) {
+			my $catGrpPrm = $cat->group_category_permissions->update_or_create(
+				{
+					permission	=> 2,
+					group_id	=> $_,
+				},
+				{
+					key	=> 'catid_grpid',
+				}
+			);
+		}
+
+		# Add user permission
+		# View
+		for (@{ $catData->{viewPermission}->{users} }) {
+			my $catUsrPrm = $cat->user_category_permissions->create({
+					permission	=> 1,
+					user_id	=> $_,
+				});
+		}
+
+		# Edit
+		for (@{ $catData->{editPermission}->{users} }) {
+			my $catUsrPrm = $cat->user_category_permissions->update_or_create(
+				{
+					permission	=> 2,
+					user_id		=> $_,
+				},
+				{
+					key	=> 'catid_usrid',
+				}
+			);
+		}
+
+	};
+
+	my $rs;
+	eval {
+		my $schema = $c->model('CmsDB')->schema;
+		$rs = $schema->txn_do( $editCategory, $formData);
+	};
+
+	if ($@) {                             # Transaction failed
+		die "The sky is falling! :p"
+		if ($@ =~ /Rollback failed/);     # Rollback failed
+
+		$c->stash->{message} = $c->localize('There is an ERROR to edit category');
+		$c->log->debug("Edit category ERROR: $@");
+		$formData = $c->forward( '/core/category/get', [ $catId ]);
+		$c->detach('edit', [ $catId, $formData ]);
+	} else {
+		$c->stash->{message} = $c->localize('Category is updated successfully') . '.'; 
+		$formData = $c->forward( '/core/category/get', [ $catId ]);
+		$c->detach('edit', [ $catId, $formData ]);
+	}
+
+                ################### Transaction End #################
+
+	##################################################################
+	# End of edit category
+	##################################################################
+
+}
+
+=head2 edit
+
+	Edit Category
+
+=cut
+
+sub edit : Local {
+	my ( $self, $c, $catId, $formData ) = @_;
+
+#	my $languages = $c->model('CmsDB')->resultset('Language')->search(1);
+	$formData = $c->forward( '/core/category/get', [ $catId ]) unless $formData;
+
+#	$c->log->dumper($formData);
+
+	my @params;
+	# Set recursive flag.
+	$params[2] = 1;
+	$params[4] = $catId;
+	$c->stash(
+		isEdit		=> 1,
+#		defaultLangId	=> $c->{stash}{cms}{website}->{default_language_id},
+#		languageList	=> $languages,
+		catsList	=> $c->forward( '/core/category/getCatList', \@params ),
+		pageList	=> $c->forward('/core/page/getPageList', [ $catId ]),
+		groups		=> $c->forward('/common/usergroup/getGroups', []),
+		users		=> $c->forward('/common/usergroup/getUsers', []),
+		formData	=> $formData,
+		template	=> 'admin/category/addedit.tt',
+	);
+
+	# Get orderList 
+	if ( $formData->{parent_id} ) {
+		@params = ();
+		$params[1] = $formData->{parent_id};
+		$c->stash->{orderList} = $c->forward( '/core/category/getCatList', \@params);
+	} else {
+		$c->stash->{orderList} = $c->forward( '/core/category/getCatList', []);
+	}
+
+}
+
+=head2 index 
+
+=cut
+
+sub index : Private {
+	my ( $self, $c ) = @_;
+
+	my @params;
+	# Set recursive flag.
+	$params[2] = 1;
+
+	$c->stash(
+		catsList	=> $c->forward( '/core/category/getCatList', \@params ),
+		template	=> 'admin/category/default.tt',
+	);
+}
+
+=head2 remove 
+
+	Function to remove category.
+
+	$catId: (INT) Category ID
+
+=cut
+
+sub remove : Local {
+	my ( $self, $c, $catId ) = @_;
+
+	unless ( $catId ) {
+		$c->stash->{message} = $c->localize('Invalid category id to delete') . '.';
+		$c->detach( '/core/category/showCatList' );
+	}
+
+	eval {
+		$c->model('CmsDB')->resultset('Category')->find($catId)->delete;
+	};
+
+	if ($@) {
+		$c->stash->{message} = $c->localize('There is an ERROR in deleteing category') . '.';
+		$c->log->debug("Delete Category ERROR: $@");
+		$c->detach( '/core/category/showCatList' );
+	} else {
+		$c->stash->{message} = $c->localize('Category is deleted successfully') . '.';
+		$c->detach( '/core/category/showCatList' );
+	}
+
+}
+
+=head2 removeCatLang
+
+	Function to remove a category lang.
+
+	$catId: (INT) Categroy ID
+	$catLangId: (INT) Category Lang ID
+
+=cut 
+
+sub removeCatLang : Local {
+	my ( $self, $c, $catId, $catLangId ) = @_;
+
+	unless ( $catLangId ) {
+		$c->stash->{message} = $c->localize('Invalid category lang id to delete') . '.';
+		my @params;
+		$params[0] = $catId;
+		$c->detach( 'edit', \@params );
+	}
+
+	eval {
+		$c->model('CmsDB')->resultset('CategoryLang')->find($catLangId)->delete;
+	};
+
+	if ($@) {
+		$c->stash->{message} = $c->localize('There is an ERROR in deleteing category language') . '.';
+		$c->log->debug("Category Langage delete ERROR: $@");
+		my @params;
+		$params[0] = $catId;
+		$c->detach( '/core/category/showCatLangList', \@params );	
+	} else {
+		$c->stash->{message} = $c->localize('Category language is deleted successfully') . '.';
+		my @params;
+		$params[0] = $catId;
+		$c->detach( '/core/category/showCatLangList', \@params );	
+	}
+}
+
+=head2 setCatOrder
+
+	Change category order
+
+	$catId: (INT) Category ID
+	$orderDir: (BOOL) 0: decrease(up), 1: increase(down)
+
+=cut
+
+sub setCatOrder : Local {
+	my ( $self, $c, $catId, $orderDir ) = @_;
+
+	$c->res->body("No Category ID to search.") unless $catId;
+	$orderDir = 0 unless ( defined $orderDir );
+
+	my $cat = $c->model('CmsDB')->resultset('Category')->find($catId, { prefetch => 'parent_id' });
+	
+	my $sortType = $orderDir ? 'desc' : 'asc';
+	my $cats = $c->model('CmsDB')->resultset('Category')->search(
+		{ parent_id 	=> $cat->parent_id->id },
+		{ order_by 	=> \"`order` $sortType" }
+	);
+
+	my $pre = $cats->first;
+	while ( my $next = $cats->next ) {
+		if ( $next->id == $catId ) {
+			my $tmpOrder = $next->order;
+			$next->order($pre->order);
+			$pre->order($tmpOrder);
+			$next->update;
+			$pre->update;
+			last;
+		} else {
+			$pre = $next;
+		}
+	}
+
+	my @params;
+	# Set recursive flag.
+	$params[2] = 1;
+
+	$c->stash(
+		showCatIsNormalList	=> 1,
+		catsList		=> $c->forward( '/core/category/getCatList', \@params ),
+		template		=> 'admin/category/catsList.tt',
+	);
+}
+
+=head1 AUTHOR
+
+Omid Houshyar
+
+=head1 LICENSE
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+
+1;

Added: trunk/OzinoCMS/lib/cms/Controller/Admin/Website/File.pm
===================================================================
--- trunk/OzinoCMS/lib/cms/Controller/Admin/Website/File.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/cms/Controller/Admin/Website/File.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,120 @@
+package cms::Controller::Admin::Website::File;
+
+use strict;
+use warnings;
+use base 'Catalyst::Controller';
+
+=head1 NAME
+
+cms::Controller::Admin::Website::File - Catalyst Controller
+
+=head1 DESCRIPTION
+
+Catalyst Controller.
+
+=head1 METHODS
+
+=cut
+
+
+=head2 edit
+
+=cut
+
+sub edit : Local {
+	my ( $self, $c, $fileId ) = @_;
+
+	my $file = $c->forward( '/core/file/get', [ $fileId ] );
+	if ( $file->{website_id} != $c->{stash}{cms}{website}->{website_id} ) {
+		my $msg = $c->localize('Access denied. You are not allowed to edit this file') . ' !';
+		$c->detach( '/common/showError', [ $msg ]);
+	}
+
+#	$c->log->dumper($file);
+
+	$c->stash(
+		formData	=> $file,
+		template	=> 'admin/file/edit.tt',
+	);
+}
+
+=head2 doEdit
+
+=cut
+
+sub doEdit : Local {
+	my ( $self, $c, $fileId ) = @_;
+
+	my $file = $c->model('CmsDB')->resultset('File')->find( $fileId, { prefetch => 'website_id' });
+	if ( $file->website_id->id != $c->{stash}{cms}{website}->{website_id} ) {
+		my $msg = $c->localize('Access denied. You are not allowed to edit this file') . ' !';
+		$c->detach( '/common/showError', [ $msg ]);
+	}
+
+	eval {
+		$file->title( $c->req->param('title') );
+		$file->description( $c->req->param('description') );
+		$file->update;
+	};
+
+	if ( $@ ) {
+		$c->stash->{message} = $c->localize('There is an ERROR in editing file') . '.';
+		$c->detach( 'index', [] );	
+		$c->log->debug("Edit file ERROR: $@");
+	} else {
+		$c->stash->{message} = $c->localize('File is updated successfully') . '.';
+		$c->detach( 'index', [] );		
+	}
+}
+
+=head2 index 
+
+=cut
+
+sub index : Private {
+	my ( $self, $c ) = @_;
+
+	$c->stash(
+		files		=> $c->forward( '/core/file/getAllFiles' ),
+		template	=> 'admin/file/default.tt',
+	);
+}
+
+=head2 remove
+
+	Function to remove file.
+
+=head3 Parameters
+
+	$fileId: (INT) File ID
+
+=cut
+
+sub remove : Local {
+	my ( $self, $c, $fileId ) = @_;
+
+	my $file = $c->forward( '/core/file/get', [ $fileId ]);
+	if ( $file->{website_id} != $c->{stash}{cms}{website}->{website_id} ) {
+		my $msg = $c->localize('Access denied. You are not allowed to remove this file') . ' !';
+		$c->detach( '/common/showError', [ $msg ]);
+	}
+
+	if ( $c->forward( '/core/file/remove', [ $fileId ] ) ) {
+		$c->stash->{message} = $c->localize('File is removed successfully') . '.';
+		$c->forward( 'index', [] );
+	}
+}
+
+
+=head1 AUTHOR
+
+Omid Houshyar
+
+=head1 LICENSE
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+
+1;

Added: trunk/OzinoCMS/lib/cms/Controller/Admin/Website/Gizmo.pm
===================================================================
--- trunk/OzinoCMS/lib/cms/Controller/Admin/Website/Gizmo.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/cms/Controller/Admin/Website/Gizmo.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,602 @@
+package cms::Controller::Admin::Website::Gizmo;
+
+use strict;
+use warnings;
+use base 'Catalyst::Controller';
+
+=head1 NAME
+
+cms::Controller::Admin::Website::Gizmo - Catalyst Controller
+
+=head1 DESCRIPTION
+
+Catalyst Controller.
+
+=head1 METHODS
+
+=cut
+
+
+=head2 index 
+
+=cut
+
+sub index : Private {
+    my ( $self, $c ) = @_;
+
+    $c->response->body('Matched cms::Controller::Admin::Website::Gizmo in Admin::Website::Gizmo.');
+}
+
+
+
+=head2 setGizmoOrder
+
+	Change gizmo order
+
+	$pageId: (INT) Gizmo Id
+	$orderDir: (BOOL) 0: decrease(up), 1: increase(down)
+
+=cut
+
+sub setGizmoOrder : Local {
+	my ( $self, $c, $gizmoId, $pageId, $parentId, $contentArea, $orderDir ) = @_;
+	return if ( ! $gizmoId );
+	
+	################################################
+	# Check permission
+	################################################
+	$c->forward('/common/checkUserPermission',[ 'gizmo', $gizmoId, $c->{stash}{cms}{website}{userId}, 1 ]);
+	$orderDir = 0 unless ( defined $orderDir );
+	my $gizmo = $c->model('CmsDB')->resultset('Gizmo')->find( $gizmoId );
+	my $sortType = $orderDir ? 'desc' : 'asc';
+	my %cond;	
+	$cond{'-or'}= [
+				{
+					 website_id	=> $c->{stash}{cms}{website}->{website_id} ,
+					 category_id	=> undef,
+					 page_id	=> undef,
+				},
+				{
+					 website_id	=> $c->{stash}{cms}{website}->{website_id} ,
+					 category_id	=> $parentId,
+					 page_id	=> undef ,
+				},
+				{
+					 website_id	=> $c->{stash}{cms}{website}->{website_id} ,
+					 category_id	=> $parentId ,
+					 page_id	=> $pageId ,
+				}
+			];
+	$cond{'contentarea'}= $contentArea;
+	$cond{'status'}= { -in  => [ 1, 3 ] };
+	$cond{'deleted'}= 0;
+#	$c->log->dumper( \%cond );	
+	my $gizmos = $c->model('CmsDB')->resultset('Gizmo')->search( \%cond ,{ 
+			order_by 	=> \"`order` $sortType" 
+		});
+	
+#	$c->log->info( "----------" . $gizmos->count  );
+#	$c->log->info( "---------- gizmoId  = " . $gizmoId );
+	
+	my $pre = $gizmos->first;
+	while ( my $next = $gizmos->next ) {
+		if ( $next->id == $gizmoId ) {
+#			$c->log->info( "------+++++In IF ++----" );
+			my $tmpOrder = $next->order;
+			$next->order($pre->order);
+			$pre->order($tmpOrder);
+			$next->update;
+			$pre->update;
+			last;
+		} else {
+			$pre = $next;
+		}
+	}
+	$c->detach( '/core/_getPageContent', [ $pageId ,1 ] );
+		
+}
+
+=head2
+	This sub show list of a gizmo lang with controller links
+=cut
+
+sub showGizmoLang  : Private {
+	my ($self, $c, $gizmoId, $msg, $defaultLang ) = @_;
+	my $gizmoLangList = $c->model('CmsDB')->resultset('GizmoLang')->search({
+		gizmo_id 	=> $gizmoId,
+		deleted		=> 0,
+	});
+
+	$c->stash->{ template } = 'admin/gizmo/showGizmoLang.tt';
+	$c->stash->{ gizmoLangList } = $gizmoLangList;
+	$c->stash->{ message } = $msg;
+	$c->stash->{ defaultLangId } = $defaultLang;
+	
+}
+
+=head2
+=cut
+
+sub deleteGizmoLang  : Local {
+	my ( $self, $c, $gizmoLangId ) = @_;
+	return if (! $gizmoLangId );
+	my $rsGizmoLang;
+	my $msg;
+	############################################
+	# Find gizmoLang
+	############################################
+	eval{
+		$rsGizmoLang = $c->model('CmsDB')->resultset('GizmoLang')->find( $gizmoLangId );
+		if ( $rsGizmoLang ){
+			$rsGizmoLang->set_columns({
+				deleted	=> 1,
+			});
+			$rsGizmoLang->update();
+		}
+	};
+	
+	if ( $@ ){
+		$msg = 'Error in deleting gizmo lang';
+	}else{
+		$msg = 'Language deleted successfully ! ';
+	}
+	
+	$c->detach('showGizmoLang',[ $rsGizmoLang->gizmo_id->id, $msg, 'en' ]);
+}
+
+=head2 deleteGizmo
+
+	Input param: gizmoId
+	Delete specified gizmo
+
+=cut
+
+sub deleteGizmo : Local{
+	my ($self, $c, $gizmoId, $pageId ) = @_;
+	$gizmoId = $c->req->param('gizmoId') unless $gizmoId;
+	$pageId = $c->req->param('pageId') unless $pageId;
+	
+	return if (! $gizmoId );
+	#first check user permission
+	
+	eval{
+		my $rsGizmo = $c->model('CmsDB')->resultset('Gizmo')->find({ id 	=> $gizmoId, deleted	=> 0 });
+		
+		$rsGizmo->set_columns({
+			deleted	=> 1,
+		})->update;
+		
+		
+	};
+	my $msg;
+	if ( $@ ){
+	
+		$msg = 'Error in deleting gizmo';
+	}else{
+	
+		$msg = 'Gizmo deleted successfully!';
+	}
+	
+	$c->detach('/core/_getPageContent',[ $pageId , 1, $msg ]);
+	
+}
+
+
+=head2
+	Add gizmo. This functon show form for add a gizmo
+=cut
+
+sub _addGizmo : Global {
+	my ( $self, $c, $pageId, $contentArea, $formData ) = @_;
+	$pageId  = $c->req->param('pageId')  unless $pageId;
+	$contentArea  = $c->req->param('contentArea')  unless $contentArea;
+	
+	###### Prepare scope data for gizmo #######
+	my @scopes = @{ $c->config->{general}{scopes}} ;
+	
+	######### Prepare pages data ########
+	my $pages  = $c->model('CmsDB')->resultset('Page')->search({
+		'parent_id.website_id'	=>  $c->{stash}{cms}{website}->{website_id} ,
+	},{
+		prefetch	=> ['parent_id','page_langs'],
+	});	
+	
+	######## Prepare Module data #######
+	my $modules = $c->model('CmsDB')->resultset('Module')->search(1);
+
+	######## Prepare contentArea data ########
+	my $skinId = $c->model('CmsDB')->resultset('WebsiteLang')->search({
+		website_id 	=> $c->{stash}{cms}{website}->{website_id},
+		language_id	=> $c->{stash}{cms}{website}{language_id}, 
+	})->first->default_skin_id->id;
+	my $rsSkin = $c->model('CmsDB')->resultset('Skin')->find( $skinId );
+	my @contentAreaList  = split( ',' ,$rsSkin->contentarea_list );
+		
+	######## Prepare  status data ########
+	my @status = @{$c->config->{general}{statuses}};
+
+	####### Prepare category list ########
+	my @params;
+	# Set recursive flag.
+	$params[2] = 1; 
+	my $catsList = $c->forward('/core/category/getCatList', \@params);
+	
+#	$c->log->dumper(\@status );	
+	$c->stash(
+		template	=> 'admin/gizmo/addGizmo.tt',
+		scope		=> \@scopes,
+		pages		=> $pages,
+		modules		=>  $modules,
+		contentAreaList	=> \@contentAreaList,
+		status		=> \@status,
+		pageId		=> $pageId,
+		contentArea	=> $contentArea,
+		groups          => $c->forward('/common/usergroup/getGroups', []),
+		users           => $c->forward('/common/usergroup/getUsers', []),
+		formData	=> $formData,		    
+		catsList	=> $catsList,
+	);
+}
+
+=head2
+
+	doAddGizmo
+	This function add a gizmo to a page
+	
+=cut
+
+sub doAddGizmo : Local {
+	my ( $self, $c ) = @_;	
+	
+	##################################################################
+	# Form validation
+	##################################################################
+	my %fieldsValidation = (
+		gizmoName	       => [[qw/NOT_BLANK/], [qw/LENGTH 0 45/]],
+		editPermission => [[qw/NOT_BLANK/]],
+		gizmoOrder	=> [[qw/NOT_BLANK/]],
+	);
+	
+	my $formData={
+		gizmoName	=> $c->req->param('gizmoName'),
+		gizmoDesc	=> $c->req->param('gizmoDesc'),
+		gizmoScopeId	=> $c->req->param('gizmoScopeId'),
+		gizmoPageId	=> $c->req->param('gizmoPageId'),
+		gizmoCategoryId	=> $c->req->param('parent_id'),
+		gizmoModuleId	=> $c->req->param('gizmoModuleId'),
+		gizmoContentArea => $c->req->param('gizmoContentArea'),
+		gizmoStatus	=> $c->req->param('gizmoStatus'),
+		gizmoOrder	=> $c->req->param('gizmoOrder'),
+		gizmoDefaultPageId =>  $c->req->param('gizmoDefaultPageId'), # this send from add link
+		viewPermission  => $c->forward('/common/getUserGroupIdsFromViewEditPerm', [ $c->req->param('viewPermission') ]),
+                editPermission  => $c->forward('/common/getUserGroupIdsFromViewEditPerm', [ $c->req->param('editPermission') ]),
+	};
+	my $pageId = $c->req->param('gizmoDefaultPageId');
+#	$c->log->dumper(  $formData  );
+	$c->form(%fieldsValidation);
+	my $result = $c->form;
+	if ( $result->has_error ) {
+		$c->detach('_addGizmo', [ $pageId, '', $formData ]);
+	}
+	
+	##################################################################
+        # End of form validation
+	##################################################################
+		
+       	##################################################################
+        # Start Add gizmo 	
+	##################################################################
+	
+	
+                ################## Transaction start ###################
+		my %formData = %{ $formData };
+                my $addGizmo = sub {
+			my ( $gizmoData ) = @_;
+			### add row in gizmo
+			my %gizmo;
+			$gizmo{website_id} 	= $c->{stash}{cms}{website}->{website_id};
+			$gizmo{order} 		= $c->req->param('gizmoOrder');
+			######### set scope for gizmo  #######
+			if ( $formData{gizmoScopeId} == 1  ){
+				 # scope  = website
+				 $gizmo{category_id} = undef;
+				 $gizmo{page_id} = undef;	
+			}elsif (  $formData{gizmoScopeId} == 2  ) {
+				# scope is category 
+				 $gizmo{category_id} =  $formData{gizmoCategoryId};
+				 $gizmo{page_id} = undef;	
+			}elsif ( $formData{gizmoScopeId} == 3  ) {
+				# scope is page
+				my $rsPage = $c->model('CmsDB')->resultset('Page')->find(  $formData{gizmoPageId} );
+				 $gizmo{category_id} =  $rsPage->parent_id->id;
+				 $gizmo{page_id} = $formData{gizmoPageId};
+			 }
+			$gizmo{module_name}	= $c->req->param('gizmoModuleId');
+			$gizmo{contentarea}	= $c->req->param('gizmoContentArea');
+			$gizmo{status}		= $c->req->param('gizmoStatus');
+			$gizmo{deleted}		= 0;
+			
+			my $gizmo = $c->model('CmsDB')->resultset('Gizmo')->create(\%gizmo);
+	
+			## Add row in gizmoLang ##
+			my %gizmoLang;
+			$gizmoLang{gizmo_id }	= $gizmo->id;
+			$gizmoLang{language_id }= $c->{stash}{cms}{website}{language_id};
+			$gizmoLang{'name'}	= $c->req->param('gizmoName');
+			$gizmoLang{description}	= $c->req->param('gizmoDesc');
+			$gizmoLang{deleted}	= 0;
+			my $gizmoLang  = $c->model('CmsDB')->resultset('GizmoLang')->create( \%gizmoLang );		
+			
+			# Add group permission
+			# View
+			for (@{ $gizmoData->{viewPermission}->{groups} }) {
+				my $gizmoGrpPrm = $gizmo->group_gizmo_permissions->create({
+						permission	=> 1,
+						group_id	=> $_,
+					});
+			}
+			# Edit
+			for (@{ $gizmoData->{editPermission}->{groups} }) {
+				my $gizmoGrpPrm = $gizmo->group_gizmo_permissions->update_or_create(
+					{
+						permission	=> 2,
+						group_id	=> $_,
+					},
+					{
+						key	=> 'gizmoid_grpid',
+					}
+				);
+			}
+			
+			# Add user permission
+			# View
+			for (@{ $gizmoData->{viewPermission}->{users} }) {
+				my $gizmoUsrPrm = $gizmo->user_gizmo_permissions->create({
+						permission	=> 1,
+						user_id	=> $_,
+					});
+			}
+
+			# Edit
+			for ( @{ $gizmoData->{editPermission}->{users} } ) {
+				my $gizmoUsrPrm = $gizmo->user_gizmo_permissions->update_or_create(
+					{
+						permission	=> 2,
+						user_id		=> $_,
+					},
+					{
+						key	=> 'gizmoid_usrid',
+					}
+				);
+			}
+		};
+		my $rs;
+		#$c->model('CmsDB')->storage->debug(1);
+		eval {
+			my $schema = $c->model('CmsDB')->schema;
+			$rs = $schema->txn_do( $addGizmo, $formData);
+		};
+		my $msg;
+#		$c->log->dumper( $formData  );
+		if ($@) {                             # Transaction failed
+			die "The sky is falling! :p"
+			if ($@ =~ /Rollback failed/);     # Rollback failed
+
+			#$c->res->body( $c->localize('There is an ERROR in adding gizmo') );
+			$msg = $c->localize('There is an ERROR in adding gizmo');
+			$c->log->debug("Add gizmo ERROR: $@");
+		} else {
+			#$c->res->body( $c->localize('Gizmo is added successfully') . '.' );
+			$msg = $c->localize('Gizmo is added successfully') . '.';
+		}
+		
+		$c->detach('/core/_getPageContent',[ $formData{gizmoDefaultPageId}, 1, $msg ]);
+	        ################### Transaction End #################
+		
+       	##################################################################
+        # End Add gizmo 	
+	##################################################################
+	
+	
+}
+
+=head2 saveGizmoData
+
+	This function save gizmo data after user change.
+	Input parameters:  gizmoId, gizmoData (gizmoData is a hash ref)
+	output  : 1 if action be successfull and  0  if action be fail	
+
+	This function will save gizmoName  in gizmo_lang table, name field and 
+	state value in gizmo table . state value are  :
+		 value="1" = Draft
+		 value="2" = Prepublished 
+		 value="3" = Published
+		 value="4" = Archive
+	and will save Viewable Area value in gizmo table, website_id, category_id, page_id. It's depend value. values in Viewable Area are  :  
+		value="1"=Site 
+		value="2"=Category
+		value="3"=Page
+		
+	we will convert the hash to yaml mode and then will save in gizmo_lang, parameter_values field.
+	
+=cut
+
+sub saveGizmoData : Local {
+	
+	my ($self, $c ) = @_;
+
+	my %gizmoData = %{$c->req->parameters};
+	my %gizmoLangData;
+	my $gizmoId  = $gizmoData{gizmoId};
+	my $pageId  = $gizmoData{pageId};
+	my $gizmoPageId  = $gizmoData{gizmoPageId};
+	
+	###############################################
+	# Form validation
+	###############################################
+	my %fieldsValidation = (
+		gizmoName	       => [[qw/NOT_BLANK/], [qw/LENGTH 0 45/]],
+		editPermission => [[qw/NOT_BLANK/]],
+	);
+	$c->form(%fieldsValidation);
+	my $result = $c->form;
+	if ( $result->has_error ) {
+		$c->detach('_getGizmoContent', [ $gizmoId, 1, $pageId ]);
+	}
+	
+	my @viewPermission = $c->req->param('viewPermission');
+	my @editPermission = $c->req->param('editPermission');
+	my $formData = {
+		viewPermission  => $c->forward('/common/getUserGroupIdsFromViewEditPerm', [ \@viewPermission, 1 ]),
+		editPermission  => $c->forward('/common/getUserGroupIdsFromViewEditPerm', [ \@editPermission, 1 ]),
+	};
+	
+	delete $gizmoData{gizmoId};
+	return if ( !$gizmoId );
+	
+	my $langId = $gizmoData{language_id};
+	delete  $gizmoData{language_id};
+	
+	my $rsGizmoLang = $c->model('CmsDB')->resultset('GizmoLang')->search({ 
+		gizmo_id => $gizmoId ,
+		deleted	=> 0,
+	});$rsGizmoLang = $rsGizmoLang->first;
+	
+	my $rsGizmo = $c->model('CmsDB')->resultset('Gizmo')->find({ id	=> $gizmoId, deleted	=> 0  });
+	
+	my $gizmoName  = $gizmoData{gizmoName};
+	my $gizmoContentArea  = $gizmoData{gizmoContentArea};
+	delete $gizmoData{gizmoContentArea};
+	delete $gizmoData{gizmoName};
+	
+	#first save gizmo name
+	$gizmoLangData{name} = $gizmoName; 
+	
+	# second save gizmo state
+	my $gizmoStatus = $gizmoData{gizmoState}; 
+	delete $gizmoData{gizmoState};
+	$rsGizmo->set_columns({ status => $gizmoStatus,  contentarea => $gizmoContentArea, page_id =>  $gizmoPageId, });
+	$rsGizmo->update();
+	
+	#third save viewable area
+	my $viewableAreaGizmo = $gizmoData{viewableAreaGizmo};
+	#Website = 1 
+	#Category =2
+	#Page  = 3
+	
+	if ( $gizmoData{viewableAreaGizmo} == 1 ){ 
+		$rsGizmo->set_columns({ page_id => undef,category_id => undef });
+		$rsGizmo->update();
+	}elsif ( $gizmoData{viewableAreaGizmo} == 2 ){ 
+		#mean category
+		$rsGizmo->set_columns({  category_id =>  $gizmoData{parent_id} , page_id => undef });
+		$rsGizmo->update();
+		
+	}elsif ( $gizmoData{viewableAreaGizmo} == 3 ){
+		#mean page 
+		my $rsPage = $c->model('CmsDB')->resultset('Page')->find( $gizmoData{gizmoPageId});
+		$rsGizmo->set_columns({  
+			category_id => $rsPage->parent_id->id, 
+			page_id =>  $gizmoData{gizmoPageId}, 
+		});
+		$rsGizmo->update();
+	}
+	delete  $gizmoData{viewableAreaGizmo};
+	
+	# now serialize %gizmoData 
+	my $parameterValues =  YAML::Dump( \%gizmoData ); 
+	
+	########## set gizmo permissions #######
+#	$c->model('CmsDB')->storage->debug(1);
+	#### first delete all permissions 
+	$c->model('CmsDB')->resultset('GroupGizmoPermission')->search({
+		gizmo_id        => $gizmoId,
+	})->delete_all;
+	$c->model('CmsDB')->resultset('UserGizmoPermission')->search({
+		gizmo_id        => $gizmoId,
+	})->delete_all;
+	
+	### view permission for group
+	foreach ( @{ $formData->{viewPermission}->{groups} } ){
+		my $newGroupPermission = $c->model('CmsDB')->resultset('GroupGizmoPermission')->update_or_create(
+		{
+		   	permission      => 1,
+			group_id        => $_,
+			gizmo_id	=> $gizmoId,
+		},{
+			key		=> 'gizmoid_grpid' ,
+		}) ;
+	}
+	#### edit permission for group
+	foreach ( @{ $formData->{editPermission}->{groups} } ){
+		my $newGroupPermission = $c->model('CmsDB')->resultset('GroupGizmoPermission')->update_or_create(
+		{
+		   	permission      => 2,
+			group_id        => $_,
+			gizmo_id	=> $gizmoId,
+		},{
+			key		=> 'gizmoid_grpid' ,
+		}) ;
+	}
+	### view permission for users
+	foreach ( @{ $formData->{viewPermission}->{users} } ){
+		my $newGroupPermission = $c->model('CmsDB')->resultset('UserGizmoPermission')->update_or_create(
+		{
+		   	permission      => 1,
+			user_id        => $_,
+			gizmo_id	=> $gizmoId,
+		},{
+			key		=> 'gizmoid_usrid' ,
+		}) ;
+	}
+	### edit permission for users
+	foreach ( @{ $formData->{editPermission}->{users} } ){
+		my $newGroupPermission = $c->model('CmsDB')->resultset('UserGizmoPermission')->update_or_create(
+		{
+		   	permission      => 2,
+			user_id        => $_,
+			gizmo_id	=> $gizmoId,
+		},{
+			key		=> 'gizmoid_usrid' ,
+		}) ;
+	}
+	
+	# put unique key in hash for update or create
+	$gizmoLangData{gizmo_id} =  $gizmoId;
+	$gizmoLangData{deleted} =  0;
+	$gizmoLangData{language_id} =  $langId;
+	$gizmoLangData{parameter_values} =  $parameterValues;
+	
+	eval{
+		$c->model('CmsDB')->resultset('GizmoLang')->update_or_create(
+			\%gizmoLangData,
+		,{
+			key => 'idLangUniqueKey',
+		});
+	};
+	my $msg;
+	if ( $@ ){
+		$msg = 'Error in updateing gizmo data';
+	}else{
+		$msg = 'Gizmo updated successfully.';
+	}
+	if ( $gizmoData{op} eq 'apply' and  (  $gizmoStatus == 1 or $gizmoStatus == 3 ) ) {
+		$c->detach('/core/_getGizmoContent',[ $gizmoId, 1, $pageId ]);	
+	}else{
+		$c->detach('/core/_getPageContent',[ $pageId, 1, $msg ]);	
+	}
+#	return  1;	
+}
+
+=head1 AUTHOR
+
+root
+
+=head1 LICENSE
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+
+1;

Added: trunk/OzinoCMS/lib/cms/Controller/Admin/Website/Navigation.pm
===================================================================
--- trunk/OzinoCMS/lib/cms/Controller/Admin/Website/Navigation.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/cms/Controller/Admin/Website/Navigation.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,458 @@
+package cms::Controller::Admin::Website::Navigation;
+
+use strict;
+use warnings;
+use base 'Catalyst::Controller';
+
+=head1 NAME
+
+cms::Controller::Admin::Website::Navigation - Catalyst Controller
+
+=head1 DESCRIPTION
+
+Catalyst Controller.
+
+=head1 METHODS
+
+=cut
+
+
+=head2 add
+
+	Add new navigation.
+
+=cut
+
+sub addEdit : Local {
+	my ( $self, $c, $formData, $id ) = @_;
+	$id = $c->req->param('id') if $c->req->param('id');
+
+	if ( !$formData && $id ) {
+		$formData = $c->forward('/core/navigation/get', [ $id ]);
+
+		# Check the user permission on website_id and kick him off if he wants to edit navigation from 
+		# other website.
+		$c->detach('/access_denied') if ($formData->{website_id} != $c->{stash}{cms}{website}->{website_id});
+
+		$c->stash->{isEdit} = 1;
+		$c->stash->{id} = $id;
+	} elsif ( $id ) {
+		$c->stash->{isEdit} = 1;
+		$c->stash->{id} = $id;
+	} else {
+		$c->stash->{isAdd} = 1;
+	}
+
+	$c->stash->{formData} = $formData if $formData;
+	$c->stash->{template} = 'admin/navigation/addedit.tt';
+}
+
+=head2 doAdd 
+
+=cut
+
+sub doAddEdit : Local {
+	my ( $self, $c, $id ) = @_;
+
+	my $nav = $c->model('CmsDB')->resultset('Navigation')->find($id);
+	if ($nav) {
+		my %tmp = $nav->get_columns;
+		# Check the user permission on website_id and kick him off if he wants to remove navigation from 
+		# other website.
+		$c->detach('/access_denied') if ($tmp{website_id} != $c->{stash}{cms}{website}->{website_id});
+	}
+
+	##################################################################
+	# Form validation
+	##################################################################
+	my %fieldsValidation = (
+		nav_name	=> [[qw/NOT_BLANK/], [qw/LENGTH 0 45/]],
+	);
+	$c->form(%fieldsValidation);
+
+	my $formData = {
+		nav_name	=> $c->req->param('nav_name'),
+		nav_desc	=> $c->req->param('nav_desc'),
+		website_id	=> $c->{stash}{cms}{website}->{website_id},
+	};
+
+	$formData->{id} = $id if ( $c->req->param('submit') eq $c->localize('Update') && $id );
+
+#	$c->log->dumper($formData);
+
+	my $result = $c->form;
+	if ( $result->has_error ) {
+		my @params;
+		$params[0] = $formData;
+		$params[1] = $id if $id;
+
+		$c->detach( 'addEdit', \@params );
+	}
+	##################################################################
+	# End of form validation
+	##################################################################
+
+	##################################################################
+	# Add Navigation in DB
+	##################################################################
+
+	eval {
+		$c->model('CmsDB')->resultset('Navigation')->update_or_create( $formData );
+	};
+
+	if ($@) {                             
+		$c->stash->{message} = $c->localize('There is an ERROR in adding navigation');
+		$c->log->debug("Add navigation ERROR: $@");
+		$c->detach('/admin/website/navigation/index');
+	} else {
+		if ( $c->req->param('submit') eq $c->localize('Update') && $id ) {
+			$c->stash->{message} = $c->localize('Navigation is updated successfully') . '.';
+		} else {
+			$c->stash->{message} = $c->localize('Navigation is added successfully') . '.';
+		}
+		$c->detach('/admin/website/navigation/index');
+	}
+
+	##################################################################
+	# End of add navigation
+	##################################################################
+
+}
+
+=head2 addEditItem
+
+=cut
+
+sub addEditItem : Local {
+	my ( $self, $c, $navId, $itemIndex, $formData ) = @_;
+
+	my $nav = $c->model('CmsDB')->resultset('Navigation')->find($navId);
+	if ($nav) {
+		my %tmp = $nav->get_columns;
+		# Check the user permission on website_id and kick him off if he wants to remove navigation from 
+		# other website.
+		$c->detach('/access_denied') if ($tmp{website_id} != $c->{stash}{cms}{website}->{website_id});
+	}
+
+	if ( !$formData && $itemIndex ) {
+		my $tmpDetail = YAML::Load( ($nav->nav_detail ne '') ? $nav->nav_detail : "---\n" );
+		$formData = $tmpDetail->[$itemIndex - 1];
+	}
+
+#	$c->log->dumper($formData);
+	
+	my @params;
+	# Set recursive flag.
+	$params[2] = 1;
+	$params[5] = 1 if ( $formData->{type} && $formData->{type} == 2 );
+
+	$c->stash(
+		navId		=> $navId,
+		navType		=> $formData->{type} ? $formData->{type} : 1,
+		formData	=> $formData,
+		template	=> 'admin/navigation/addEditItem.tt',
+	);
+
+	if ($itemIndex) {
+		$c->stash->{isEdit} = 1;
+		$c->stash->{itemIndex} = $itemIndex;
+	} else {
+		$c->stash->{isAdd} = 1;
+	}
+	
+	if ( !$formData->{type} || $formData->{type} == 1 ) {
+		$c->stash->{catsList} = $c->forward('/core/category/getCatList', \@params );
+		$formData->{parent_id} = $formData->{id};
+	}
+	
+	if ( $formData->{type} && $formData->{type} == 2 ) {
+		$c->stash->{catPageList} = $c->forward('/core/category/getCatList', \@params );
+		$formData->{page_id} = $formData->{id};
+	}
+
+}
+
+=head2 doAddEditItem
+
+=cut
+
+sub doAddEditItem : Local {
+	my ( $self, $c, $navId, $itemIndex ) = @_;
+
+	my $nav = $c->model('CmsDB')->resultset('Navigation')->find($navId);
+	if ($nav) {
+		my %tmp = $nav->get_columns;
+		# Check the user permission on website_id and kick him off if he wants to remove navigation from 
+		# other website.
+		$c->detach('/access_denied') if ($tmp{website_id} != $c->{stash}{cms}{website}->{website_id});
+	}
+
+	##################################################################
+	# Form validation
+	##################################################################
+#	my %fieldsValidation = (
+#		name	=> [[qw/NOT_BLANK/], [qw/LENGTH 0 45/]],
+#	);
+#	$c->form(%fieldsValidation);
+
+	my $formData = {
+#		name	=> $c->req->param('name'),
+		type	=> $c->req->param('type'),
+	};
+
+	my $result = $c->form;
+	if ( $result->has_error ) {
+		$formData->{parent_id} = $c->req->param('parent_id') if $c->req->param('parent_id');
+		$formData->{page_id} = $c->req->param('page_id') if $c->req->param('page_id');
+		$formData->{depth} = $c->req->param('depth') if $c->req->param('depth');
+
+		my @params;
+		$params[0] = $navId;
+		$params[1] = $itemIndex if $itemIndex;
+		$params[2] = $formData;
+
+		$c->detach( 'addEditItem', \@params );
+	}
+	##################################################################
+	# End of form validation
+	##################################################################
+
+	##################################################################
+	# Add item
+	##################################################################
+	
+	if ( $formData->{type} == 1 ) {
+		$formData->{depth} 	= $c->req->param('depth') ? $c->req->param('depth') : -1;
+		$formData->{id} 	= $c->req->param('parent_id');
+		$formData->{show_only} 	= $c->req->param('show_only') ? $c->req->param('show_only') : -1;
+		$formData->{show_parent}= $c->req->param('show_parent') ? $c->req->param('show_parent') : -1;
+	} elsif ( $formData->{type} == 2 ) {
+		$formData->{id} = $c->req->param('page_id');
+	} elsif ( $formData->{type} == 3 ) {
+		$formData->{separator} = ($c->req->param('separator') && $c->req->param('separator') ne '' ) ? $c->req->param('separator') : '>';
+	} elsif ( $formData->{type} == 4 ) {
+		$formData->{depth} 	= $c->req->param('depth') ? $c->req->param('depth') : -1;
+		$formData->{show_only} 	= $c->req->param('show_only') ? $c->req->param('show_only') : -1;
+		$formData->{show_parent}= $c->req->param('show_parent') ? $c->req->param('show_parent') : -1;
+	}
+
+#	$c->log->dumper($formData);
+
+	my $tmpDetail = YAML::Load( ($nav->nav_detail ne '') ? $nav->nav_detail : "---\n" );
+	if ( $itemIndex ) {
+		$tmpDetail->[$itemIndex - 1] = $formData;
+	} else {
+		push @{ $tmpDetail }, $formData;
+	}
+
+	$nav->nav_detail( YAML::Dump($tmpDetail) );
+	$nav->update;
+
+	##################################################################
+	# End of add item
+	##################################################################
+	
+	$c->detach('manageItem', [ $navId ]);
+}
+
+=head2 index 
+
+=cut
+
+sub index : Private {
+	my ( $self, $c ) = @_;
+
+	$c->stash(
+		navList		=> $c->forward('/core/navigation/getNavList'),
+		template	=> 'admin/navigation/default.tt',
+	);
+}
+
+=head2 loadNavWidget
+
+	This function load widgets they are belongs to nav type to add items and other details.
+
+=cut
+
+sub loadNavWidget : Local {
+	my ( $self, $c, $navTypeId, $navDetail ) = @_;
+
+	$c->stash(
+		navType			=> $navTypeId,
+		template		=> 'admin/navigation/typeWidget.tt',
+	);
+
+	my @params;
+	# Set recursive flag.
+	$params[2] = 1;
+
+	if ( $navTypeId && $navTypeId == 1 ) {
+		$c->stash->{catsList} = $c->forward('/core/category/getCatList', \@params );
+	} elsif ( $navTypeId && $navTypeId == 2 ) {
+		$params[5] = 1;
+		$c->stash->{catPageList} = $c->forward('/core/category/getCatList', \@params );
+	}
+}
+
+=head2 manageItem
+
+	Function to manage navigation items.
+
+=cut
+
+sub manageItem : Local {
+	my ( $self, $c, $navId ) = @_;
+
+	my $nav = $c->model('CmsDB')->resultset('Navigation')->find($navId);
+	if ($nav) {
+		my %tmp = $nav->get_columns;
+		# Check the user permission on website_id and kick him off if he wants to 
+		# manage items of navigation from other website.
+		$c->detach('/access_denied') if ($tmp{website_id} != $c->{stash}{cms}{website}->{website_id});
+	}
+
+	my $navItems = YAML::Load( ($nav->nav_detail ne '') ? $nav->nav_detail : "---\n" );
+
+	for my $navItem ( @{ $navItems } ) {
+		if ($navItem->{type} == 1) {
+			my $cat = $c->forward( '/core/category/get', [ $navItem->{id} ]);
+
+			for ( @{ $cat->{catLang} } ) {
+				$navItem->{title} = $_->{title} if ( $_->{language_id} eq $c->{stash}{cms}{currentLanguageId} );
+			}
+		} elsif ($navItem->{type} == 2) {
+			my $page = $c->forward( '/core/page/get', [ $navItem->{id} ]);
+
+			for ( @{ $page->{pageLang} } ) {
+				$navItem->{title} = $_->{title} if ( $_->{language_id} eq $c->{stash}{cms}{currentLanguageId} );
+			}
+	
+		}
+	}
+
+	$c->stash(
+		navId		=> $navId,
+		navName		=> $nav->nav_name,
+		navItems	=> $navItems,
+		template	=> 'admin/navigation/manageItem.tt',
+	);
+}
+
+=head2 remove 
+
+	Function to remove navigation.
+
+	$id: (INT) Navigation ID
+
+=cut
+
+sub remove : Local {
+	my ( $self, $c, $id ) = @_;
+
+	my $nav = $c->model('CmsDB')->resultset('Navigation')->find($id);
+	if ($nav) {
+		my %tmp = $nav->get_columns;
+		# Check the user permission on website_id and kick him off if he wants to remove navigation from 
+		# other website.
+		$c->detach('/access_denied') if ($tmp{website_id} != $c->{stash}{cms}{website}->{website_id});
+	} else {
+		$c->stash->{message} = $c->localize('Invalid Navigation ID') . '.';
+		$c->detach( '/core/navigation/showNavList' );
+	}
+
+	eval {
+		$nav->delete;
+	};
+
+	if ($@) {
+		$c->stash->{message} = $c->localize('There is an ERROR in deleteing page') . '.';
+		$c->log->debug("Delete Page ERROR: $@");
+		$c->detach( '/core/navigation/showNavList' );
+	} else {
+		$c->stash->{message} = $c->localize('Page is deleted successfully') . '.';
+		$c->detach( '/core/navigation/showNavList' );
+	}
+
+}
+
+=head2 removeItem
+
+=cut
+
+sub removeItem : Local {
+	my ( $self, $c, $navId, $itemIndex ) = @_;
+
+	my $nav = $c->model('CmsDB')->resultset('Navigation')->find($navId);
+	if ($nav) {
+		my %tmp = $nav->get_columns;
+		# Check the user permission on website_id and kick him off if he wants to 
+		# manage items of navigation from other website.
+		$c->detach('/access_denied') if ($tmp{website_id} != $c->{stash}{cms}{website}->{website_id});
+	} else {
+		$c->stash->{message} = $c->localize('Invalid Navigation ID') . '.';
+		$c->detach( '/core/navigation/showItemList', [ $navId ] );
+	}
+
+	my $tmpDetail = YAML::Load( ($nav->nav_detail ne '') ? $nav->nav_detail : "---\n" );
+	delete $tmpDetail->[$itemIndex - 1];
+	my $res = [];
+	for (@{ $tmpDetail }) {
+		push @{$res}, $_ if $_;
+	}
+
+	$nav->nav_detail( YAML::Dump($res) );
+	$nav->update;
+
+	$c->detach('/core/navigation/showItemList', [ $navId ]);
+}
+
+=head2 setItemOrder
+
+	Change navigation item order
+
+	$navId: (INT) Navigation ID
+	$itemIndex - 1: (INT) Index of item in nav_detail
+	$orderDir: (BOOL) 0: decrease(up), 1: increase(down)
+
+=cut
+
+sub setItemOrder : Local {
+	my ( $self, $c, $navId, $itemIndex, $orderDir ) = @_;
+
+	my $nav = $c->model('CmsDB')->resultset('Navigation')->find($navId);
+	if ($nav) {
+		my %tmp = $nav->get_columns;
+		# Check the user permission on website_id and kick him off if he wants to 
+		# manage items of navigation from other website.
+		$c->detach('/access_denied') if ($tmp{website_id} != $c->{stash}{cms}{website}->{website_id});
+	} else {
+		$c->stash->{message} = $c->localize('Invalid Navigation ID') . '.';
+		$c->detach( '/core/navigation/showItemList', [ $navId ] );
+	}
+
+	my $tmpDetail = YAML::Load( ($nav->nav_detail ne '') ? $nav->nav_detail : "---\n" );
+
+	if ($orderDir) {
+		( $tmpDetail->[ $itemIndex - 1 ], $tmpDetail->[ $itemIndex ] ) = ( $tmpDetail->[ $itemIndex ], $tmpDetail->[ $itemIndex - 1 ] );
+	} else {
+		( $tmpDetail->[ $itemIndex - 1 ], $tmpDetail->[ $itemIndex - 2 ] ) = ( $tmpDetail->[ $itemIndex - 2 ], $tmpDetail->[ $itemIndex - 1 ] );
+	}
+
+	$nav->nav_detail( YAML::Dump($tmpDetail) );
+	$nav->update;
+
+	$c->detach('/core/navigation/showItemList', [ $navId ]);
+}
+
+=head1 AUTHOR
+
+Omid Houshyar
+
+=head1 LICENSE
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+
+1;

Added: trunk/OzinoCMS/lib/cms/Controller/Admin/Website/Page.pm
===================================================================
--- trunk/OzinoCMS/lib/cms/Controller/Admin/Website/Page.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/cms/Controller/Admin/Website/Page.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,722 @@
+package cms::Controller::Admin::Website::Page;
+
+use strict;
+use warnings;
+use base 'Catalyst::Controller';
+
+=head1 NAME
+
+cms::Controller::Admin::Website::Page - Catalyst Controller
+
+=head1 DESCRIPTION
+
+Catalyst Controller.
+
+=head1 METHODS
+
+=cut
+
+
+=head2 add
+
+=cut
+
+sub add : Local {
+	my ( $self, $c, $formData ) = @_;
+
+	my $language = $c->model('CmsDB')->resultset('Language')->find($c->{stash}{cms}{website}->{default_language_id});
+	my $skins = $c->model('CmsDB')->resultset('Skin')->search({ website_id => $c->{stash}{cms}{website}->{website_id} });
+
+	my @params;
+	# Set recursive flag.
+	$params[2] = 1;
+
+	$c->stash(
+		isAdd		=> 1,
+		isAddPage	=> 1,
+		defaultLangId	=> $c->{stash}{cms}{website}->{default_language_id},
+		languageTitle	=> $language->language_name,
+		catsList	=> $c->forward('/core/category/getCatList', \@params ),
+		skinList	=> $skins,
+		groups		=> $c->forward('/common/usergroup/getGroups', []),
+		users		=> $c->forward('/common/usergroup/getUsers', []),
+		formData	=> $formData,
+		template	=> 'admin/page/addedit.tt',
+	);
+
+	# Get orderList 
+	if ( $formData->{parent_id} ) {
+		@params = ();
+		$params[0] = $formData->{parent_id};
+		$c->stash->{orderList} = $c->forward('/core/page/getPageList', \@params);
+	} else {
+		$c->stash->{orderList} = $c->forward('/core/page/getPageList');
+	}
+}
+
+=head2 doAdd 
+
+=cut
+
+sub doAdd : Local {
+	my ( $self, $c ) = @_;
+
+	##################################################################
+	# Form validation
+	##################################################################
+	my %fieldsValidation = (
+		title		=> [[qw/NOT_BLANK/], [qw/LENGTH 0 45/]],
+		editPermission	=> [[qw/NOT_BLANK/]],
+	);
+	$c->form(%fieldsValidation);
+
+	my @vPerm = $c->req->param('viewPermission');
+	my @ePerm = $c->req->param('editPermission');
+
+	my $formData = {
+		title		=> $c->req->param('title'),
+		description	=> $c->req->param('description'),
+		parent_id	=> $c->req->param('parent_id'),
+		order		=> $c->req->param('order'),
+		status		=> $c->req->param('status'),
+		visible		=> $c->req->param('visible') ? $c->req->param('visible') : 0,
+		default_skin_id	=> $c->req->param('default_skin_id'),
+		viewPermission	=> $c->forward('/common/getUserGroupIdsFromViewEditPerm', [ \@vPerm, 1 ]),
+		editPermission	=> $c->forward('/common/getUserGroupIdsFromViewEditPerm', [ \@ePerm, 1 ]),
+	};
+
+#	$c->log->dumper($formData);
+
+	my $result = $c->form;
+	if ( $result->has_error ) {
+		$c->detach('add', [ $formData ]);
+	}
+	##################################################################
+	# End of form validation
+	##################################################################
+
+	##################################################################
+	# Add Page in DB
+	##################################################################
+
+                ################## Transaction start ###################
+
+#	$c->model('CmsDB')->storage->debug(1);
+	my $addPage = sub {
+		my ( $pageData ) = @_;
+
+		my $pagesToUpdate = $c->model('CmsDB')->resultset('Page')->search({
+				parent_id	=> $pageData->{parent_id},
+				order		=> { '>' => $pageData->{order} },
+			});
+
+		while (my $res = $pagesToUpdate->next ) {
+			$res->order( $res->order + 1 );
+			$res->update;
+		}
+
+		my $page = $c->model('CmsDB')->resultset('Page')->create({
+				parent_id	=> $pageData->{parent_id},
+				order		=> $pageData->{order} + 1,
+				status		=> $pageData->{status},
+				visible		=> $pageData->{visible},
+			});
+
+		my $pageLang = $page->page_langs->create({
+				language_id	=> $c->{stash}{cms}{website}->{default_language_id},
+				title		=> $pageData->{title},
+				description	=> $pageData->{description},
+				default_skin_id	=> $pageData->{default_skin_id},
+			});
+
+		# Add group permission
+		# View
+		for (@{ $pageData->{viewPermission}->{groups} }) {
+			my $pageGrpPrm = $page->group_page_permissions->create({
+					permission	=> 1,
+					group_id	=> $_,
+				});
+		}
+
+		# Edit
+		for (@{ $pageData->{editPermission}->{groups} }) {
+			my $pageGrpPrm = $page->group_page_permissions->update_or_create(
+				{
+					permission	=> 2,
+					group_id	=> $_,
+				},
+				{
+					key	=> 'pageid_grpid',
+				}
+			);
+		}
+
+		# Add user permission
+		# View
+		for (@{ $pageData->{viewPermission}->{users} }) {
+			my $pageUsrPrm = $page->user_page_permissions->create({
+					permission	=> 1,
+					user_id	=> $_,
+				});
+		}
+
+		# Edit
+		for (@{ $pageData->{editPermission}->{users} }) {
+			my $pageUsrPrm = $page->user_page_permissions->update_or_create(
+				{
+					permission	=> 2,
+					user_id		=> $_,
+				},
+				{
+					key	=> 'pageid_usrid',
+				}
+			);
+		}
+	};
+
+	my $rs;
+	eval {
+		my $schema = $c->model('CmsDB')->schema;
+		$rs = $schema->txn_do( $addPage, $formData);
+	};
+
+	if ($@) {                             # Transaction failed
+		die "The sky is falling! :p"
+		if ($@ =~ /Rollback failed/);     # Rollback failed
+
+		$c->stash->{message} = $c->localize('There is an ERROR in adding page');
+		$c->log->debug("Add page ERROR: $@");
+		$c->detach( '/admin/website/page/index');
+	} else {
+		$c->stash->{message} = $c->localize('Page is added successfully') . '.';
+		$c->detach( '/admin/website/page/index');
+	}
+
+                ################### Transaction End #################
+
+	##################################################################
+	# End of add page
+	##################################################################
+
+}
+
+=head2 edit
+
+	Edit Page
+
+=cut
+
+sub edit : Local {
+	my ( $self, $c, $pageId, $formData ) = @_;
+
+	$formData = $c->forward('/core/page/get', [ $pageId ]) unless $formData;
+	
+#	$c->log->dumper($formData);
+
+	my @params;
+	# Set recursive flag.
+	$params[2] = 1;
+	$c->stash(
+		isEdit		=> 1,
+		catsList	=> $c->forward('/core/category/getCatList', \@params ),
+		groups		=> $c->forward('/common/usergroup/getGroups', []),
+		users		=> $c->forward('/common/usergroup/getUsers', []),
+		formData	=> $formData,
+		template	=> 'admin/page/addedit.tt',
+	);
+
+
+}
+
+=head2 addEditPageLang
+
+	Function to show add edit page lang form.
+
+=cut
+
+sub addEditPageLang : Local {
+	my ( $self, $c, $pageId, $pageLangId, $formData ) = @_;
+
+	my $languages = $c->model('CmsDB')->resultset('Language')->search(1);
+	my $skins = $c->model('CmsDB')->resultset('Skin')->search({ website_id => $c->{stash}{cms}{website}->{website_id} });
+
+	$c->stash(
+		defaultLangId	=> $c->{stash}{cms}{website}->{default_language_id},
+		languageList	=> $languages,
+		defaultSkinId	=> $c->{stash}{cms}{website}->{default_skin_id},
+		skinList	=> $skins,
+		template	=> 'admin/page/addeditpagelang.tt',
+	);
+
+	if ( $pageLangId ) {
+		unless ( $formData ) {
+			my $pageLang = $c->model('CmsDB')->resultset('PageLang')->find($pageLangId, { prefetch => [ 'page_id', 'language_id', 'default_skin_id' ] });
+			$formData = {
+				pageid		=> $pageId,
+				pageLangId	=> $pageLangId,
+				title		=> $pageLang->title,
+				description	=> $pageLang->description,
+				language_id	=> $pageLang->language_id->id,
+				default_skin_id	=> $pageLang->default_skin_id->id,
+			};
+
+#			$c->log->dumper($formData);
+		}
+
+		$c->stash->{isEdit} = 1;
+	} else {
+		$formData = { pageid => $pageId } unless $formData;
+		$c->stash->{isAdd} = 1;
+	}
+
+	$c->stash->{formData} = $formData;
+
+}
+
+=head2 doAddEditCatLang
+
+	FUnction to add or edit page lang value in database.
+
+=cut
+
+sub doAddEditPageLang : Local {
+	my ( $self, $c, $pageId, $pageLangId ) = @_;
+
+	##################################################################
+	# Form validation
+	##################################################################
+	my %fieldsValidation = (
+		title		=> [[qw/NOT_BLANK/], [qw/LENGTH 0 45/]],
+	);
+	$c->form(%fieldsValidation);
+
+	my $formData = {
+		pageid		=> $pageId,
+		title		=> $c->req->param('title'),
+		description	=> $c->req->param('description'),
+		language_id	=> $c->req->param('language_id'),
+		default_skin_id	=> $c->req->param('default_skin_id'),
+	};
+
+#	$c->log->dumper($formData);
+
+	my $result = $c->form;
+	if ( $result->has_error ) {
+		my @params;
+		$params[0] = $pageId;
+		$params[1] = $pageLangId if $pageLangId; 
+		$params[2] = $formData;
+		$c->detach( 'addEditPageLang', \@params );
+
+	}
+	##################################################################
+	# End of form validation
+	##################################################################
+
+	##################################################################
+	# Add or Edit Page Lang in DB
+	##################################################################
+
+                ################## Transaction start ###################
+
+#	$c->model('CmsDB')->storage->debug(1);
+	my $addPageLang = sub {
+		my ( $pageData ) = @_;
+
+		my $page = $c->model('CmsDB')->resultset('Page')->find($pageId);
+
+		delete $pageData->{pageid};
+		$page->page_langs->update_or_create(
+			$pageData,
+			{
+				key	=> 'pageid_langid'
+			}
+		);
+	};
+
+	my $editPageLang = sub {
+		my ( $pageData ) = @_;
+
+		my $pageLang = $c->model('CmsDB')->resultset('PageLang')->find($pageLangId, { prefetch => [ 'language_id', 'default_skin_id' ] });
+
+		$pageLang->title($pageData->{title}) if ($pageLang->title ne $pageData->{title});
+		$pageLang->description($pageData->{description}) if ($pageLang->description ne $pageData->{description});
+		$pageLang->language_id($pageData->{language_id}) if ($pageLang->language_id->id ne $pageData->{language_id});
+		$pageLang->default_skin_id($pageData->{default_skin_id}) if ($pageLang->default_skin_id->id ne $pageData->{default_skin_id});
+		$pageLang->update;
+
+	};
+
+	my $rs;
+	eval {
+		my $schema = $c->model('CmsDB')->schema;
+		if ( $c->req->param('submit') && $c->req->param('submit') eq $c->localize('Add') ) {
+			# Add page lang
+			$rs = $schema->txn_do( $addPageLang, $formData);
+		} else {
+			# Edit page lang
+			$rs = $schema->txn_do( $editPageLang, $formData);
+		}
+	};
+
+	if ($@) {                             # Transaction failed
+		die "The sky is falling! :p"
+		if ($@ =~ /Rollback failed/);     # Rollback failed
+
+		$c->stash->{message} = $c->localize('There is an ERROR in add or edit page lang') . '.';
+		my @params;
+		$params[0] = $pageId;
+		$c->detach( '/core/page/showPageLangList', \@params );	
+		$c->log->debug("Add page lang ERROR: $@");
+	} else {
+		$c->stash->{message} = $c->localize('Page lang is add or updated successfully') . '.';
+		my @params;
+		$params[0] = $pageId;
+		$c->detach( '/core/page/showPageLangList', \@params );	
+	}
+
+                ################### Transaction End #################
+
+	##################################################################
+	# End of add or edit page lang
+	##################################################################
+
+}
+
+=head2 doEdit 
+
+	Edit Page
+
+=cut
+
+sub doEdit : Local {
+	my ( $self, $c, $pageId ) = @_;
+
+	##################################################################
+	# Form validation
+	##################################################################
+	my %fieldsValidation = (
+		editPermission	=> [[qw/NOT_BLANK/]],
+	);
+	$c->form(%fieldsValidation);
+
+	my @vPerm = $c->req->param('viewPermission');
+	my @ePerm = $c->req->param('editPermission');
+
+	my $formData = {
+		id		=> $pageId,
+		parent_id	=> $c->req->param('parent_id'),
+		status		=> $c->req->param('status'),
+		visible		=> $c->req->param('visible') ? $c->req->param('visible') : 0,
+		viewPermission	=> $c->forward('/common/getUserGroupIdsFromViewEditPerm', [ \@vPerm, 1 ]),
+		editPermission	=> $c->forward('/common/getUserGroupIdsFromViewEditPerm', [ \@ePerm, 1 ]),
+	};
+
+#	$c->log->dumper($formData);
+
+	my $result = $c->form;
+	if ( $result->has_error ) {
+		my $tmpData = $c->forward('/core/page/get', [ $pageId ]);
+		$formData->{pageLang} = $tmpData->{pageLang};
+		$c->detach('edit', [ $pageId, $formData ]);
+	}
+	##################################################################
+	# End of form validation
+	##################################################################
+
+	##################################################################
+	# Edit Page in DB
+	##################################################################
+
+                ################## Transaction start ###################
+
+#	$c->model('CmsDB')->storage->debug(1);
+	my $editPage = sub {
+		my ( $pageData ) = @_;
+
+		my $page = $c->model('CmsDB')->resultset('Page')->find( 
+			$pageData->{id},
+	     		{ prefetch => 'parent_id' }  
+		);
+
+		if ( $page->parent_id->id != $pageData->{parent_id} ) {
+
+			# Old page parent
+			# Check and decrease pages' order one level.
+			my $pagesToUpdate = $c->model('CmsDB')->resultset('Page')->search({
+					parent_id	=> $page->parent_id->id,
+					order		=> { '>' => $page->order },
+				});
+
+			while (my $res = $pagesToUpdate->next ) {
+				$res->order( $res->order - 1 );
+				$res->update;
+			}
+
+			# New page parent
+			$pagesToUpdate = $c->model('CmsDB')->resultset('Page')->search({
+					parent_id	=> $pageData->{parent_id},
+					# This line is commented to get all cats with the specified parent_id
+					# order		=> { '>' => $pageData->{order} },
+				});
+
+			while (my $res = $pagesToUpdate->next ) {
+				$res->order( $res->order + 1 );
+				$res->update;
+			}
+
+			$page->parent_id( $pageData->{parent_id} );
+			$page->order( 0 );
+		}
+
+		$page->status( $pageData->{status} ) if ( $page->status != $pageData->{status} );
+		$page->visible( $pageData->{visible} ) if ( $page->visible != $pageData->{visible} );
+		$page->update;
+
+		# Remove page permissions
+		$page->group_page_permissions->delete_all;
+		$page->user_page_permissions->delete_all;
+
+		# Add group permission
+		# View
+		for (@{ $pageData->{viewPermission}->{groups} }) {
+			my $pageGrpPrm = $page->group_page_permissions->create({
+					permission	=> 1,
+					group_id	=> $_,
+				});
+		}
+
+		# Edit
+		for (@{ $pageData->{editPermission}->{groups} }) {
+			my $pageGrpPrm = $page->group_page_permissions->update_or_create(
+				{
+					permission	=> 2,
+					group_id	=> $_,
+				},
+				{
+					key	=> 'pageid_grpid',
+				}
+			);
+		}
+
+		# Add user permission
+		# View
+		for (@{ $pageData->{viewPermission}->{users} }) {
+			my $pageUsrPrm = $page->user_page_permissions->create({
+					permission	=> 1,
+					user_id	=> $_,
+				});
+		}
+
+		# Edit
+		for (@{ $pageData->{editPermission}->{users} }) {
+			my $pageUsrPrm = $page->user_page_permissions->update_or_create(
+				{
+					permission	=> 2,
+					user_id		=> $_,
+				},
+				{
+					key	=> 'pageid_usrid',
+				}
+			);
+		}
+
+	};
+
+	my $rs;
+	eval {
+		my $schema = $c->model('CmsDB')->schema;
+		$rs = $schema->txn_do( $editPage, $formData);
+	};
+
+	if ($@) {                             # Transaction failed
+		die "The sky is falling! :p"
+		if ($@ =~ /Rollback failed/);     # Rollback failed
+
+		$c->stash->{message} = $c->localize('There is an ERROR to edit page');
+		$c->log->debug("Edit page ERROR: $@");
+		$formData = $c->forward('/core/page/get', [ $pageId ]);
+		$c->detach('edit', [ $pageId, $formData ]);
+	} else {
+		$c->stash->{message} = $c->localize('Page is updated successfully') . '.'; 
+		$formData = $c->forward('/core/page/get', [ $pageId ]);
+		$c->detach('edit', [ $pageId, $formData ]);
+	}
+
+                ################### Transaction End #################
+
+	##################################################################
+	# End of edit page
+	##################################################################
+
+
+}
+
+
+
+=head2 index 
+
+=cut
+
+sub index : Private {
+	my ( $self, $c ) = @_;
+
+	my @params;
+	# Set recursive flag.
+	$params[2] = 1;
+	$params[5] = 1;
+
+	$c->stash(
+		showCatIsNormalList	=> 1,
+		editOnPages		=> 1,
+		catPageList		=> $c->forward( '/core/category/getCatList', \@params ),
+		template		=> 'admin/page/default.tt',
+	);
+}
+
+=head2 remove 
+
+	Function to remove page.
+
+	$pageId: (INT) Page ID
+
+=cut
+
+sub remove : Local {
+	my ( $self, $c, $pageId ) = @_;
+
+	unless ( $pageId ) {
+		$c->stash->{message} = $c->localize('Invalid page id to delete') . '.';
+		$c->detach( '/core/page/showCatList' );
+	}
+
+	eval {
+		$c->model('CmsDB')->resultset('Page')->find($pageId)->delete;
+	};
+
+	if ($@) {
+		$c->stash->{message} = $c->localize('There is an ERROR in deleteing page') . '.';
+		$c->log->debug("Delete Page ERROR: $@");
+		$c->detach( '/core/page/showCatPageList' );
+	} else {
+		$c->stash->{message} = $c->localize('Page is deleted successfully') . '.';
+		$c->detach( '/core/page/showCatPageList' );
+	}
+
+}
+
+=head2 removePageLang
+
+	Function to remove a page lang.
+
+	$pageId: (INT) Page ID
+	$pageLangId: (INT) Page Lang ID
+
+=cut 
+
+sub removePageLang : Local {
+	my ( $self, $c, $pageId, $pageLangId ) = @_;
+
+	unless ( $pageLangId ) {
+		$c->stash->{message} = $c->localize('Invalid page lang id to delete') . '.';
+		my @params;
+		$params[0] = $pageId;
+		$c->detach( 'edit', \@params );
+	}
+
+	eval {
+		$c->model('CmsDB')->resultset('PageLang')->find($pageLangId)->delete;
+	};
+
+	if ($@) {
+		$c->stash->{message} = $c->localize('There is an ERROR in deleteing page language') . '.';
+		$c->log->debug("Page Langage delete ERROR: $@");
+		my @params;
+		$params[0] = $pageId;
+		$c->detach( '/core/page/showPageLangList', \@params );	
+	} else {
+		$c->stash->{message} = $c->localize('Page language is deleted successfully') . '.';
+		my @params;
+		$params[0] = $pageId;
+		$c->detach( '/core/page/showPageLangList', \@params );	
+	}
+}
+
+=head2 setAsDefaultPage
+
+=cut
+
+sub setAsDefaultPage : Local {
+	my ( $self, $c, $pageId, $catId ) = @_;
+
+	my $cat = $c->model('CmsDB')->resultset('Category')->find($catId);
+
+	eval {
+		$cat->default_page_id( $pageId );
+		$cat->update;
+	};
+
+	if ($@) {
+		$c->stash->{message} = $c->localize('There is an ERROR in setting default page') . '.';
+		$c->log->debug("Set default page ERROR: $@");
+		$c->detach( '/core/page/showCatPageList' );
+	} else {
+		$c->stash->{message} = $c->localize('Category default page is changed successfully') . '.';
+		$c->detach( '/core/page/showCatPageList' );
+	}
+
+}
+
+=head2 setPageOrder
+
+	Change page order
+
+	$pageId: (INT) Page ID
+	$orderDir: (BOOL) 0: decrease(up), 1: increase(down)
+
+=cut
+
+sub setPageOrder : Local {
+	my ( $self, $c, $pageId, $orderDir ) = @_;
+
+	$c->res->body("No Page ID to search.") unless $pageId;
+	$orderDir = 0 unless ( defined $orderDir );
+
+	my $page = $c->model('CmsDB')->resultset('Page')->find($pageId, { prefetch => 'parent_id' });
+	
+	my $sortType = $orderDir ? 'desc' : 'asc';
+	my $pages = $c->model('CmsDB')->resultset('Page')->search(
+		{ parent_id 	=> $page->parent_id->id },
+		{ order_by 	=> \"`order` $sortType" }
+	);
+
+	my $pre = $pages->first;
+	while ( my $next = $pages->next ) {
+		if ( $next->id == $pageId ) {
+			my $tmpOrder = $next->order;
+			$next->order($pre->order);
+			$pre->order($tmpOrder);
+			$next->update;
+			$pre->update;
+			last;
+		} else {
+			$pre = $next;
+		}
+	}
+
+	$c->detach( '/core/page/showCatPageList' );
+}
+
+
+=head1 AUTHOR
+
+Omid Houshyar
+
+=head1 LICENSE
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+
+1;

Added: trunk/OzinoCMS/lib/cms/Controller/Admin/Website.pm
===================================================================
--- trunk/OzinoCMS/lib/cms/Controller/Admin/Website.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/cms/Controller/Admin/Website.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,44 @@
+package cms::Controller::Admin::Website;
+
+use strict;
+use warnings;
+use base 'Catalyst::Controller';
+
+=head1 NAME
+
+cms::Controller::Admin::Website - Catalyst Controller
+
+=head1 DESCRIPTION
+
+Catalyst Controller.
+
+=head1 METHODS
+
+=cut
+
+
+=head2 index 
+
+=cut
+
+sub index : Private {
+    my ( $self, $c ) = @_;
+
+    $c->stash(
+    	template	=> 'admin/website.tt'
+    );
+}
+
+
+=head1 AUTHOR
+
+Davood Firoozian, Omid Houshyar
+
+=head1 LICENSE
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+
+1;

Added: trunk/OzinoCMS/lib/cms/Controller/Admin.pm
===================================================================
--- trunk/OzinoCMS/lib/cms/Controller/Admin.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/cms/Controller/Admin.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,48 @@
+package cms::Controller::Admin;
+
+use strict;
+use warnings;
+use base 'Catalyst::Controller';
+=head1 NAME
+
+cms::Controller::Admin - Catalyst Controller
+
+=head1 DESCRIPTION
+
+Catalyst Controller.
+
+=head1 METHODS
+
+=cut
+
+
+=head2 auto 
+
+=cut
+
+sub auto : Private {
+	my ( $self, $c ) = @_;
+}
+
+=head2 index 
+	list all websites from host header and website address
+=cut
+
+sub index : Private {
+	my ( $self, $c ) = @_;
+	$c->stash( template => 'admin/default.tt' ); 
+}
+
+
+=head1 AUTHOR
+
+root
+
+=head1 LICENSE
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+
+1;

Added: trunk/OzinoCMS/lib/cms/Controller/Auth.pm
===================================================================
--- trunk/OzinoCMS/lib/cms/Controller/Auth.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/cms/Controller/Auth.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,236 @@
+package cms::Controller::Auth;
+
+use strict;
+use warnings;
+use base 'Catalyst::Controller';
+use Digest::MD5 qw[ md5 md5_hex md5_base64 ];
+
+use POSIX qw(strftime);
+use String::MkPasswd qw(mkpasswd);
+
+=head1 NAME
+
+cms::Controller::Auth - Catalyst Controller
+
+=head1 DESCRIPTION
+
+Catalyst Controller.
+
+=head1 METHODS
+
+	login
+	logout
+
+=cut
+
+
+=head2 login
+
+	login user . If user and pass  is ok we put userId in $c->{stash}{cms}{userId}
+	
+=cut
+
+sub login : Global {
+	my ( $self, $c, $nextPage ) = @_;
+	$nextPage = $c->req->param('nextPage') unless $nextPage;
+	if ( $c->req->param('submit') ) {
+		if (my $user = $c->req->param("username") and my $password = $c->req->param("password")) {
+			$user = $user . '@' . $c->{stash}{cms}{website}->{website_id};
+			 if ( $c->login( $user, $password ) ) {
+			 	$c->{stash}{cms}{userId} = $c->user->get_column('id');
+				$c->res->body('Redirecting ...');
+				if ( $nextPage ){
+					$c->res->redirect( $nextPage );
+				}else{
+					$c->res->redirect('/admin');
+				}
+				return 1;
+			 }else{
+				$c->stash->{error} = 'Invalid Username or Password! Please try again.';
+				$c->stash->{template} = 'login.tt';
+				return  0;
+			 }
+		} elsif ( $c->req->param("username") eq '' or $c->req->param("password") eq '' ) {
+			$c->stash->{error} = 'Enter both Username and Password are required.';
+			$c->stash->{template} = 'login.tt';
+		} elsif ( $c->user_exists ){
+			$c->detach('logout');
+		}
+	}elsif( $c->user_exists ){
+		$c->detach('logout');						
+	}else{
+		$c->stash->{nextPage} = $nextPage;
+		$c->stash->{template} = 'login.tt';
+		return 0;
+	}
+	
+
+}
+
+
+=head2
+	show login form
+=cut
+
+sub logout : Global {
+	my ( $self, $c ) = @_;
+	$c->logout;
+	$c->stash->{template} = 'login.tt';
+}
+
+=head2
+	Show lost password form
+=cut
+
+sub lostPassword: Local {
+	my ( $self, $c, $submit ) = @_;
+	$submit = $c->req->param('submit') unless $submit;
+	if ( $submit ){
+		if (my $user = $c->req->param("username") and my $email = $c->req->param("email")) {
+			
+			###########################################################
+			# Check username and email address is valid  ?
+			###########################################################
+			#$c->model('CmsDB')->storage->debug( 1 );
+			my $rsUser = $c->model('CmsDB')->resultset('User')->search({
+				username	=> $user,
+				website_id	=> $c->{stash}{cms}{website}->{website_id},
+				email		=> $email,
+			});		
+					
+			if ( $rsUser->count ) {
+				#########################################
+				# Send an email to user 
+				#########################################
+				
+				### create a key for user		
+				my $key = Digest::MD5::md5_hex( time() . rand() . $$ );
+				$c->stash->{username} = $user;
+				$c->stash->{key} = $key;
+				
+				### init body email
+				my $subject = 'Reset password request';
+				my $body = $c->view('TT')->render($c,'emailBody/lostPassword.tt');	
+				
+				#### insert row in table
+				my $rsResetPassword  =  $c->model('CmsDB')->resultset('ResetPassword')->create({
+					user_id	=> $rsUser->first->id,
+					key	=> $key,
+				});
+				
+				my $param = [
+					$c->config->{mail}{smtp},
+					$c->config->{mail}{username},
+					$c->config->{mail}{password},
+					$c->config->{mail}{fromEmail},
+					$email,
+					$subject,
+					$body,
+				];
+				### call sendMail sub to send body email to user mail 
+				$c->forward('/common/sendMail', $param );
+				$c->res->body('Check your mail');	
+			 }else{
+				$c->stash->{error} = 'Invalid Username or E-mail! Please try again.';
+				$c->stash->{template} = 'lostPassword.tt';
+				return  0;
+			 }
+		}else{
+			$c->stash->{error} = 'Username and email address are required.';
+			$c->stash->{template} = 'lostPassword.tt';
+		}
+	}else{
+		$c->stash->{template} = 'lostPassword.tt';
+	}
+}
+
+
+=head2
+	This function get a key that is present in database and then if key valid, send new password to user mail
+=cut
+
+sub newPassword : Global{
+	my ( $self, $c, $key ) = @_;
+	return if (!$key);
+#	$c->model('CmsDB')->storage->debug(1);
+	###### Find key in database
+	my $dateTime = strftime "%Y-%m-%d %H:%M:%S", localtime( time );
+	my $dateTime24Before = strftime "%Y-%m-%d %H:%M:%S", localtime( time  - 86400 );
+
+	my $user  =  $c->model('CmsDB')->resultset('ResetPassword')->search({
+		key	=> $key,
+		request_datetime => { '>=' , $dateTime24Before },
+	},{
+		prefetch	=> [ 'user_id' ],
+	});
+	my $userId;
+#	$c->log->info(  "  count  is  : " .  $user->count  );
+	###### check key is valid 
+	if ( $user->count  ) {
+
+		my $userId = $user->first->user_id->id;
+		my $userEmail  =  $user->first->user_id->email;
+		
+		if ( ! $userEmail  or  ! $userId ) {
+			$c->res->body("Invalid Email Address.Contact with administrator");	
+			return 0;
+		}
+		
+		#### send mail with new password 
+		my $newPassword  =   mkpasswd();
+		$c->stash->{newPassword} =  $newPassword;
+		$c->stash->{username} = $user->first->user_id->username;
+		my $subject  = "New Password";
+		my $body = $c->view('TT')->render($c,'emailBody/newPassword.tt');	
+		eval{
+			my $param = [
+				$c->config->{mail}{smtp},
+				$c->config->{mail}{username},
+				$c->config->{mail}{password},
+				$c->config->{mail}{fromEmail},
+				$userEmail,
+				$subject,
+				$body,
+			];
+			### call sendMail sub to send body email to user mail 
+			$c->forward('/common/sendMail', $param );
+		};
+		if ( $@  ) {
+			$c->res->body("Error in sendif new password");
+		}else{
+			$c->res->body("New password send successfully .");
+			
+			#### set new password in database
+			my $rsUser = $c->model('CmsDB')->resultset('User')->find( $userId );
+			$rsUser->set_columns({
+				password	=> md5_hex( $newPassword ),
+			});
+			$rsUser->update;
+			#### set date and time  reset password
+			$user  = $user->first;
+			$user->set_columns({
+				 reset_datetime  => $dateTime,
+				 key	=> undef,
+			});
+			$user->update();
+		}	
+		
+		
+			
+	}else{
+#		$c->log->info("Key is invalid or key is expire");
+	}
+	
+}
+=head1 AUTHOR
+
+root
+
+=head1 LICENSE
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+
+1;

Added: trunk/OzinoCMS/lib/cms/Controller/Common/UserGroup.pm
===================================================================
--- trunk/OzinoCMS/lib/cms/Controller/Common/UserGroup.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/cms/Controller/Common/UserGroup.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,304 @@
+package cms::Controller::Common::UserGroup;
+
+use strict;
+use warnings;
+use base 'Catalyst::Controller';
+
+=head1 NAME
+
+cms::Controller::Common::UserGroup - Catalyst Controller
+
+=head1 DESCRIPTION
+
+Catalyst Controller.
+
+=head1 METHODS
+
+=cut
+
+
+=head2 getGroups
+
+=cut
+
+sub getGroups : Private {
+	my ( $self, $c, $websiteId ) = @_;
+
+	$websiteId = $c->{stash}{cms}{website}->{website_id} unless $websiteId;
+	
+	my $grps = $c->model('CmsDB')->resultset('Group')->search(
+		{ website_id	=> $websiteId, },
+		{ prefetch	=> 'website_id' }
+	);
+
+	my @groups;
+	while ( my $res = $grps->next ) {
+		my %tmp = $res->get_columns;
+		push @groups, \%tmp;
+	}
+
+#	$c->log->dumper(\@groups);
+
+	return \@groups;
+}
+
+=head2 getUsers
+
+=cut
+
+sub getUsers : Private {
+	my ( $self, $c, $websiteId ) = @_;
+
+	$websiteId = $c->{stash}{cms}{website}->{website_id} unless $websiteId;
+
+	my $user = $c->model('CmsDB')->resultset('User')->search(
+		{ website_id	=> $websiteId, },
+		{ prefetch	=> 'website_id' }
+	);
+
+	my @users;
+	while ( my $res = $user->next ) {
+		my %tmp = $res->get_columns;
+		push @users, \%tmp;
+	}
+
+#	$c->log->dumper(\@users);
+
+	return \@users;
+	
+}
+
+=head2 getGroupsOfUser 
+	
+	Input parameter :  userId
+	output : return an array ref contion list of groupId that user is member of that
+
+=cut
+
+sub getGroupsOfUser : Private  {
+	my ( $self, $c, $userId ) = @_;
+
+	my @groups;
+	$userId = $c->{stash}{cms}{userId} unless $userId;
+
+	my $groupList  = $c->model('CmsDB')->resultset('GroupMember')->search({
+		user_id => $userId ,
+	},{ 
+	});
+
+	foreach my $groupListItem ( $groupList->all ) {
+		push @groups, $groupListItem->group_id->id;
+	}
+
+#	$c->log->dumper(\@groups);
+	return \@groups;
+	
+}
+
+
+=head2 userGroupGizmoPermission
+
+	Input parameters :  gizmoId, groupId, $userId
+	Output: return group permission of gizmo if user be member of group else return 0 
+
+=cut
+
+sub groupGizmoPermission :  Private {
+	my ( $self, $c, $gizmoId, $userId ) = @_;
+
+	$gizmoId = $c->req->param('gizmoId') unless $gizmoId;
+	return if !$gizmoId;
+
+	my $groupList = $c->model('CmsDB')->resultset('GroupGizmoPermission')->search(
+	{
+		gizmo_id 	=> $gizmoId ,
+	},{
+		order_by 	=> \'permission DESC' ,
+	});
+
+	
+	
+	# check if everyone group is in list  then return  permision value
+	foreach my $groupListItem ( $groupList->all ) {
+		if ( $c->{stash}{cms}{everyoneGroupId} ==  $groupListItem->group_id->id ) {
+			
+			return $groupListItem->permission;	
+		}else{
+			if ( $c->forward('/common/usergroup/isUserMemberGroup' ,[ $userId , $groupListItem->group_id->id ]) ) {
+				return  $groupListItem->permission;
+			}	
+		}
+		
+	}
+	
+	return 0;
+} 
+
+=head2 userGizmoPermission
+
+	Input parameter : gizmoId, $userId
+	Output : return user permission of gizmo if exist else return 0
+
+=cut
+
+sub userGizmoPermission : Private {
+	my ( $self, $c, $gizmoId, $userId ) = @_;
+
+
+	return 0 if !$gizmoId;
+	my $userList  =  $c->model('CmsDB')->resultset('UserGizmoPermission')->search({
+		gizmo_id	=> $gizmoId,
+	});
+	foreach my $userListItem ( $userList->all ) {
+		if( $userListItem->user_id->id  == $userId ){
+			return  $userListItem->permission;
+		}
+	}
+	return  0;
+}
+
+=head2 isUserMemberGroup
+
+	Input parameter :  userId, groupId
+	Output :  This function check that user is member of specifed group. If yes return 1 else return 0
+
+=cut
+
+sub isUserMemberGroup : Private {
+	my ( $self, $c, $userId, $groupId ) = @_;
+
+	$userId  = $c->{stash}{cms}{userId} unless $userId;
+	$groupId  = $c->req->param('groupId') unless $groupId;
+	return if !$groupId;
+	
+	my $groupMember  = $c->model('CmsDB')->resultset('GroupMember')->search({
+		group_id	=> $groupId,
+		user_id		=> $userId,
+	});
+	
+	return  $groupMember->count;
+}
+
+=head2 userGroupPagePermission
+
+	Input parameters :  pageId, $userId
+	Output: return group permission of gizmo if user be member of group else return 0 
+
+=cut
+
+sub groupPagePermission :  Private {
+	my ( $self, $c, $pageId, $userId ) = @_;
+
+	$pageId = $c->req->param('pageId') unless $pageId;
+	return if !$pageId;
+
+	my $groupList = $c->model('CmsDB')->resultset('GroupPagePermission')->search({
+		page_id => $pageId ,
+	},{
+	});
+
+	# check if everyone group is in list  then return  permision value
+	foreach my $groupListItem ( $groupList->all ) {
+		if ( $c->{stash}{cms}{everyoneGroupId} ==  $groupListItem->group_id->id ) {
+			return $groupListItem->permission;	
+		}else{
+			if ( $c->forward('/common/usergroup/isUserMemberGroup' ,[ $userId , $groupListItem->group_id->id ]) ) {
+				return  $groupListItem->permission;
+			}	
+		}
+		
+	}
+	
+	return 0;
+} 
+
+=head2 userPagePermission
+
+	Input parameter : pageId, $userId
+	Output : return user permission of page if exist else return 0
+
+=cut
+
+sub userPagePermission : Private {
+	my ( $self, $c, $pageId, $userId ) = @_;
+
+	return 0 if !$pageId;
+	my $userList  =  $c->model('CmsDB')->resultset('UserPagePermission')->search({
+		page_id	=> $pageId,
+	});
+	foreach my $userListItem ( $userList->all ) {
+		if( $userListItem->user_id->id  == $userId ){
+			return  $userListItem->permission;
+		}
+	}
+	return  0;
+}
+
+
+=head2 userGroupCategoryPermission
+
+	Input parameters :  categoryId, $userId
+	Output: return group permission of categoryId if user be member of group else return 0 
+
+=cut
+
+sub groupCategoryPermission :  Private {
+	my ( $self, $c, $categoryId, $userId ) = @_;
+
+	$categoryId = $c->req->param('categoryId') unless $categoryId;
+	return if !$categoryId;
+
+	my $groupList = $c->model('CmsDB')->resultset('GroupCategoryPermission')->search({
+		category_id => $categoryId,
+	},{
+	});
+
+	# check if everyone group is in list  then return  permision value
+	foreach my $groupListItem ( $groupList->all ) {
+		if ( $c->{stash}{cms}{everyoneGroupId} ==  $groupListItem->group_id->id ) {
+			return $groupListItem->permission;	
+		}else{
+			if ( $c->forward('/common/usergroup/isUserMemberGroup' ,[ $userId , $groupListItem->group_id->id ]) ) {
+				return  $groupListItem->permission;
+			}	
+		}
+		
+	}
+	return 0;
+} 
+
+=head2 userCategoryPermission
+
+	Input parameter : categoryId, $userId
+	Output : return user permission of category if exist else return 0
+
+=cut
+
+sub userCategoryPermission : Private {
+	my ( $self, $c, $categoryId, $userId ) = @_;
+
+	return 0 if !$categoryId;
+	my $userList  =  $c->model('CmsDB')->resultset('UserCategoryPermission')->search({
+		category_id	=> $categoryId,
+	});
+	foreach my $userListItem ( $userList->all ) {
+		if( $userListItem->user_id->id  == $userId ){
+			return  $userListItem->permission;
+		}
+	}
+	return  0;
+}
+
+=head1 AUTHOR
+
+Omid Houshyar 
+Reza Sadeghzadeh 
+
+=head1 LICENSE
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+
+1;

Added: trunk/OzinoCMS/lib/cms/Controller/Common.pm
===================================================================
--- trunk/OzinoCMS/lib/cms/Controller/Common.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/cms/Controller/Common.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,189 @@
+package cms::Controller::Common;
+
+use strict;
+use warnings;
+use base 'Catalyst::Controller';
+use Mail::Mailer;
+use Net::POP3;
+
+=head1 NAME
+
+cms::Controller::Common - Catalyst Controller
+
+=head1 DESCRIPTION
+
+Catalyst Controller.
+
+=head1 METHODS
+
+=cut
+
+
+=head2 getUserGroupIdsFromViewEditPerm
+
+=cut
+
+sub getUserGroupIdsFromViewEditPerm : Private {
+	my ( $self, $c, $permTxt, $notAjax ) = @_;
+	my %perm;
+	my @perms;
+
+	return \%perm if (!$permTxt || $permTxt eq '');
+	
+	if ($notAjax) {
+		@perms = @{ $permTxt };
+	} else {	
+		# Pattern to remove 'Groups' and 'Users'. IE Bug
+		my $pat = '(^Groups,*)|(Groups,*)|(,*Groups$)|(^Users,*)|(Users,*)|(,*Users$)';
+		# Get groups and users id 
+		$permTxt =~ s/$pat//g;
+		@perms = split(/,/, $permTxt);
+	}
+	
+	for (@perms) {
+		if (m/g_/) {
+			s/g_//;
+			push @{ $perm{groups} }, $_;
+		} elsif (m/u_/) {
+			s/u_//;
+			push @{ $perm{users} }, $_;
+		}
+	}
+
+	return \%perm;
+
+}
+
+=head2 sendMail
+
+	This function get following parameters and send mail to a email address
+
+=cut
+
+sub sendMail : Private {
+	my ( $self, $c, $smtpAddress, $loginUser, $password , $fromEmailAddress, $toEmailAddress, $subject, $body ) = @_;
+	return if  ( !$toEmailAddress or  !$body );
+	my %headers;
+	
+	############ send mail 
+	my $pop = Net::POP3->new( $smtpAddress );
+	if ($pop->login( $loginUser, $password )) {
+		$c->log->info("Use logined... ok ");
+	}
+	my @parts = (
+		Email::MIME->create(
+			attributes => {
+			content_type => 'text/html',
+			charset      => 'UTF-8',
+		},
+	body => $body,
+	),);
+	$c->log->dumper( \@parts );		
+
+	$c->email(
+		header	=> [
+			From	=> $fromEmailAddress,
+			To	=> $toEmailAddress,
+			Subject	=> $subject,
+		],
+		parts => \@parts,
+	);
+
+	if ( $@  ){
+		$c->log->info( $@ );
+		return 0;	
+	}else{
+		$c->log->info("Mail sent successfully");
+		return 1;
+	}
+	
+}
+
+=head2 showError
+
+	Function to display error message.
+
+=head3 Parameters:
+
+	$errMsg: (STRING) The error message.
+
+=cut
+
+sub showError : Local {
+	my ( $self, $c, $errMsg ) = @_;
+
+	$errMsg = '<center><div class="message">' . $errMsg . '</div></center>';
+
+	$c->stash(
+		title		=> 'Error',
+		content		=> $errMsg,
+		template	=> 'admin/common.tt',
+	);
+}
+
+=head2 checkUserPermission
+
+=cut
+
+sub checkUserPermission : Private {
+	my ($self, $c, $type, $typeId, $userId, $controlByFunction ) = @_;
+	$userId =  $c->{stash}{cms}{website}{userId} unless $userId;
+	
+	#############################################
+	# Check is user exists ?
+	#############################################
+	if ( ! $c->user_exists  ) {
+		if (  $controlByFunction ) {
+			$c->stash->{message} = 'Stop, Access Denied';
+			$c->stash->{template} = 'accessDenied.tt';
+			return 0;
+		}else{
+			return 0;
+		}
+	}
+	
+	
+	#####################################################
+	#  Check user permission 
+	#####################################################
+	my ($groupPermission, $userPermission);
+	if ( $type eq 'gizmo' ) {
+		$groupPermission = $c->forward('/common/usergroup/groupGizmoPermission',[ $typeId, $userId ]);
+		$userPermission = $c->forward('/common/usergroup/userGizmoPermission',[ $typeId, $userId ]);
+	}elsif ( $type eq 'page'){
+		$groupPermission = $c->forward('/common/usergroup/groupPagePermission',[ $typeId, $userId ]);
+		$userPermission = $c->forward('/common/usergroup/userPagePermission',[ $typeId, $userId ]);
+	}elsif( $type eq 'category'){
+		$groupPermission = $c->forward('/common/usergroup/groupCategoryPermission',[ $typeId, $userId ]);
+		$userPermission = $c->forward('/common/usergroup/userCategoryPermission',[ $typeId, $userId ]);
+	}
+	
+	if ( $groupPermission > 1 or  $userPermission > 1 ){
+		return 1;
+	}else{
+		if (  $controlByFunction ) {
+			$c->stash->{message} = 'Stop, Access Denied';
+			$c->stash->{template} = 'accessDenied.tt';
+			return 0;
+		}else{
+			return 0;
+		}
+	}
+	
+
+}
+
+=head1 AUTHOR
+
+Omid Houshyar
+
+Reza Sadeghzadeh
+
+=head1 LICENSE
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+
+1;

Added: trunk/OzinoCMS/lib/cms/Controller/Core/Category.pm
===================================================================
--- trunk/OzinoCMS/lib/cms/Controller/Core/Category.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/cms/Controller/Core/Category.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,419 @@
+package cms::Controller::Core::Category;
+
+use strict;
+use warnings;
+use base 'Catalyst::Controller';
+
+=head1 NAME
+
+cms::Controller::Core::Category - Catalyst Controller
+
+=head1 DESCRIPTION
+
+Catalyst Controller.
+
+=head1 METHODS
+
+=cut
+
+
+=head2 get
+
+	Function to return a category 
+
+=cut
+
+sub get : Private {
+	my ( $self, $c, $catId, $langId, $websiteId ) = @_;
+
+	$c->res->body("No Category ID to search.") unless $catId;
+	$langId = $c->{stash}{cms}{website}->{language_id} unless $langId;
+	$websiteId = $c->{stash}{cms}{website}->{website_id} unless $websiteId;
+
+	my $cat = $c->model('CmsDB')->resultset('CategoryLang')->search(
+		{
+			'category_id.website_id'	=> $websiteId,
+			'category_id'			=> $catId,
+#			'language_id' 			=> $langId,
+		},
+		{
+			prefetch	=> [ 'category_id' ],
+		}
+	);
+
+	my %category;
+	if (!scalar $cat->all) {
+		$c->res->body("There is an internal error to get category.");
+		$c->log->debug("No Category found: Category ID: $catId, Language ID: $langId");
+	} else {
+		my $res = $cat->first;
+		%category = $res->category_id->get_columns;
+		my $tmpCatLang = {};
+		%{$tmpCatLang} = $res->get_columns;
+		push @{ $category{catLang} }, $tmpCatLang;
+
+		while ( $res = $cat->next ) {
+			$tmpCatLang = {};
+			%{$tmpCatLang} = $res->get_columns;
+			push @{ $category{catLang} }, $tmpCatLang;
+		}
+	}
+
+	my $permission = $c->model('CmsDB')->resultset('GroupCategoryPermission')->search(
+		{ category_id	=> $catId },
+		{ prefetch	=> 'group_id' }
+	);
+
+	while ( my $res = $permission->next ) {
+		if ( $res->permission == 2 ) {
+			push @{ $category{editPermission}{groups} }, $res->group_id->id;
+			push @{ $category{viewPermission}{groups} }, $res->group_id->id;
+		} else {
+			push @{ $category{viewPermission}{groups} }, $res->group_id->id;
+		}
+	}
+
+	$permission = $c->model('CmsDB')->resultset('UserCategoryPermission')->search(
+		{ category_id	=> $catId },
+		{ prefetch	=> 'user_id' }
+	);
+
+	while ( my $res = $permission->next ) {
+		if ( $res->permission == 2 ) {
+			push @{ $category{editPermission}{users} }, $res->user_id->id;
+			push @{ $category{viewPermission}{users} }, $res->user_id->id;
+		} else {
+			push @{ $category{viewPermission}{users} }, $res->user_id->id;
+		}
+	}
+
+#	$c->log->dumper(\%category);
+	return \%category;
+}
+
+=head2 getRootCat
+
+	Function to get root category.
+
+	$websiteId: (INT) Web site ID. If not defined get websiteId from $c->{stash}{cms}{website}
+
+=cut
+
+sub getRootCat : Private {
+	my ( $self, $c, $websiteId ) = @_;
+
+	$websiteId = $c->{stash}{cms}{website}->{website_id} unless $websiteId;
+
+	my $cat = $c->model('CmsDB')->resultset('CategoryLang')->search(
+		{
+			'category_id.website_id'	=> $websiteId,
+			'title'				=> 'root',
+		},
+		{
+			prefetch	=> [ 'category_id' ],
+		},	
+	);
+
+	my %rootCat;
+	while ( my $res = $cat->next ) {
+#		%rootCat = ( $res->get_columns, $res->category_id->get_columns );
+		%rootCat = %{ $c->forward( 'get', [ $res->category_id->id ] ) };
+	}
+
+#	$c->log->dumper(\%rootCat);
+	return \%rootCat;
+}
+
+=head2 getOrderList
+
+	Show the list of children categories.
+
+	Used on onchange event of select parent in Add Category and show the 
+	list of its children. It will help user to select the place he wants 
+	to add his/her new category.
+
+	$catId: (INT) Parent category ID
+
+=cut
+
+sub getOrderList : Local {
+	my ( $self, $c, $catId ) = @_;
+
+	my @params;
+	$params[1] = $catId;
+
+	$c->stash(
+		orderList	=> $c->forward('getCatList', \@params ),
+		template	=> 'admin/category/orderList.tt',
+	);
+}
+
+=head2 getCatList
+
+	Function to get category list of website.
+
+	$websiteId: (INT) Web site ID. If not defined get websiteId from $c->{stash}{cms}{website}
+	$catId: (INT) Category ID. If not defined or -1 get root ID
+	$recursive: (BOOL) true: Hierarchical list, false: Not Hierarchical
+	$hArray: (BOOL) true: return a hierarchical array, false: return a normal list. Both has depth value.
+	$editCatId: (INT) Function will not show the cat and its children.
+	$withPages: (BOOL) true: make a list included pages, false: list without page
+
+	return (Array) 
+
+=cut
+
+sub getCatList : Private {
+	my ( $self, $c, $websiteId, $catId, $recursive, $hArray, $editCatId, $withPages ) = @_;
+
+	my $rootCat;
+	my $catsList = [];
+	my $cat;
+
+	############################################
+	# init
+	############################################
+	$websiteId = $c->{stash}{cms}{website}->{website_id} unless $websiteId;
+	$recursive = 0 unless $recursive;
+	$hArray = 0 unless $hArray;
+
+	if ( !$catId || $catId == -1 ) {
+		$cat = $c->forward('getRootCat');
+		$catId = $cat->{id};
+	} else {
+		$cat = $c->forward('get', [ $catId ]);
+	}
+
+	my ($title, $desc);
+	for ( @{ $cat->{catLang} } ) {
+		$title = $_->{title} if ($_->{language_id} eq $c->{stash}{cms}{website}->{language_id});
+		$desc = $_->{description} if ($_->{language_id} eq $c->{stash}{cms}{website}->{language_id});
+	}
+
+	$rootCat = {
+		'id'			=> $cat->{id},
+		'title'			=> $title,
+		'description'		=> $desc,
+		'order'			=> $cat->{order},
+		'depth'			=> 0,
+		'status'		=> $cat->{status},
+		'default_page_id'	=> $cat->{default_page_id},
+	};
+
+#	$c->log->dumper($rootCat);
+
+	##########################################################
+	# Make category resultset from all categories of website
+	##########################################################
+	my $whereClause = {
+		'category_id.website_id'	=> $websiteId,
+	};
+	# Search just one level from catId
+	$whereClause->{'category_id.parent_id'} = $catId unless $recursive;
+
+	my @tmpAllCats = $c->model('CmsDB')->resultset('CategoryLang')->search(
+		$whereClause,
+		{
+			prefetch	=> [ { 'category_id' => 'parent_id' } ],
+			order_by	=> 'category_id.order',
+		},
+	);
+
+#	$DB::single=1;
+
+	my @allCats;
+	for my $tmp ( @tmpAllCats ) {
+		my $count = 0;
+		my $available = 0;
+		for (@allCats) {
+			if ( $_->category_id->id == $tmp->category_id->id ) {
+				$available = 1;
+				last;
+			}
+			$count++;
+		}
+
+		if ( $tmp->language_id->id eq $c->{stash}{cms}{website}->{default_language_id} ) {
+			if ( $available ) {
+				$allCats[$count] = $tmp;
+			} else {
+				push @allCats, $tmp;
+			}
+		} else {
+			push @allCats, $tmp unless $available;
+		}
+	}
+
+	if ($recursive) {
+		if ( $hArray ) {
+			my @params = ( \@allCats, $catId );
+			$params[4] = $hArray;
+			$params[5] = $editCatId if $editCatId;
+			$params[6] = $withPages if $withPages;
+			$rootCat->{catChildren} = $c->forward( 'makeHierarchicalCatList', \@params );
+			$rootCat->{pages} = $c->forward('/core/page/getPageList', [ $rootCat->{id} ]) if $withPages;
+			push @{$catsList}, $rootCat;
+		} else {
+			my @params = ( \@allCats, $catId );
+			$params[5] = $editCatId if $editCatId;
+			$params[6] = $withPages if $withPages;
+			$catsList = $c->forward( 'makeHierarchicalCatList', \@params );
+			unshift @{$catsList}, $rootCat;
+		}
+	} else {
+		for (@allCats) {
+			my $tmpCat = {
+				'catId'			=> $_->category_id->id,
+				'catTitle'		=> $_->title,
+				'catDesc'		=> $_->description,
+				'catParentId'		=> $_->category_id->parent_id->id,
+				'catOrderId'		=> $_->category_id->order,
+				'catStatus'		=> $_->category_id->status,
+				'catDefaultPageId'	=> $_->category_id->default_page_id,
+			};
+
+			push @{$catsList}, $tmpCat;
+		}
+	}
+
+#	$c->log->dumper($catsList);
+
+	return $catsList;
+}
+
+
+=head2 index 
+
+=cut
+
+sub index : Private {
+    my ( $self, $c ) = @_;
+
+    $c->response->body('Matched cms::Controller::Core::Category in Core::Category.');
+}
+
+=head2 makeHierarchicalCatList
+
+	Function to make a hierarchical list from all categories in website.
+
+	$catsList: (ArrayRef) List of all categories.
+	$startCatId: (INT) Start Category ID. This catId will be the start point of the return list.
+	$prntId: (INT) Use on recursive call.
+	$depth: (INT) Use on recursive call.
+	$hArray: (BOOL) true: return a hierarchical array, false: return a normal list. Both has depth value.
+	$editCatId: (INT) Function will not show the cat and its children.
+
+	return (Array)
+
+=cut
+
+sub makeHierarchicalCatList : Private {
+	my ( $self, $c, $catsList, $startCatId, $prntId, $depth, $hArray, $editCatId, $withPages ) = @_;
+
+	$depth = 1 unless $depth;
+	$prntId = $startCatId unless $prntId;
+	my @catsListHierarchical;
+
+	$DB::single=1;
+
+	for ( @{$catsList} ) {
+		# This line will detect the category that user want to edit so it will not 
+		# add to list.
+		next if ($editCatId && $_->category_id->id == $editCatId );
+
+		if ( $_->category_id->parent_id->id == $prntId ) {
+			my $tmpCat = {
+				'id'			=> $_->category_id->id,
+				'title'			=> $_->title,
+				'description'		=> $_->description,
+				'parent_id'		=> $_->category_id->parent_id->id,
+				'order'			=> $_->category_id->order,
+				'depth'			=> $depth,
+				'status'		=> $_->category_id->status,
+				'default_page_id'	=> $_->category_id->default_page_id,
+			};
+			$tmpCat->{default_page_id} = $tmpCat->{default_page_id}->id if $tmpCat->{default_page_id};
+
+			my $tmpDepth = $depth + 1;
+
+			my @params;
+			$params[0] = $catsList;
+			$params[2] = $_->category_id->id;
+			$params[3] = $tmpDepth;
+			$params[5] = $editCatId if $editCatId;
+			$params[6] = $withPages if $withPages;
+
+			my @pageParams;
+			$pageParams[0] = $tmpCat->{id};
+
+			if ( $hArray ) {
+				$params[4] = $hArray;
+				$tmpCat->{catChildren} = $c->forward( 'makeHierarchicalCatList', \@params );
+				$tmpCat->{pages} = $c->forward('/core/page/getPageList', \@pageParams ) if $withPages;
+				push @catsListHierarchical, $tmpCat;
+			} else {
+				push @catsListHierarchical, $tmpCat;
+				my $child = $c->forward( 'makeHierarchicalCatList', \@params );
+				for ( @{ $child } ) {
+					push @catsListHierarchical, $_;
+				}
+			}
+		}
+	}
+
+	if ( !$hArray && $withPages ) {
+		for ( @{ $c->forward('/core/page/getPageList', [ $prntId ]) } ) {
+			$_->{depth} = $depth;
+			push @catsListHierarchical, $_;
+		}
+	}
+
+#	$c->log->dumper(\@catsListHierarchical);
+	return \@catsListHierarchical;
+}
+
+=head2 showCatList
+
+=cut
+
+sub showCatList : Local {
+	my ( $self, $c ) = @_;
+
+	my @params;
+	# Set recursive flag.
+	$params[2] = 1;
+
+	$c->stash(
+		showCatIsNormalList	=> 1,
+		catsList		=> $c->forward('getCatList', \@params ),
+		template		=> 'admin/category/catsList.tt',
+	);
+}
+
+=head2 showCatLangList
+
+=cut
+
+sub showCatLangList : Local {
+	my ( $self, $c, $catId ) = @_;
+
+	my $formData = $c->forward( 'get', [ $catId ]);
+
+	$c->stash(
+		formData	=> $formData,
+		template	=> 'admin/category/catLangList.tt',
+	);
+}
+
+=head1 AUTHOR
+
+Omid Houshyar
+
+=head1 LICENSE
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+
+1;

Added: trunk/OzinoCMS/lib/cms/Controller/Core/File/Image.pm
===================================================================
--- trunk/OzinoCMS/lib/cms/Controller/Core/File/Image.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/cms/Controller/Core/File/Image.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,112 @@
+package cms::Controller::Core::File::Image;
+
+use strict;
+use warnings;
+use base 'Catalyst::Controller';
+use Image::Thumbnail 0.6;
+use Image::Size;
+
+=head1 NAME
+
+cms::Controller::Core::File::Image - Catalyst Controller
+
+=head1 DESCRIPTION
+
+Catalyst Controller.
+
+=head1 METHODS
+
+=cut
+
+
+=head2 createThumbnail
+
+	Create thumbnail from picture.
+
+=head3 Author
+
+	Reza Sadegh-zadeh
+
+=cut
+
+sub createThumbnail : Private {
+	my ($self, $c, $size1, $size2, $input, $output, $type ) = @_;
+
+	$DB::single = 1;
+	$size1= $c->req->param('size1') unless $size1;
+	$size2= $c->req->param('size2') unless $size2;
+
+	$input = $c->req->param('input') unless $input;
+	$output = $c->req->param('output') unless $output;
+	$type = $c->req->param('type') unless $type;
+	my $size = $size2 ? $size1 .'x'.$size2 : $size1;
+
+	my $t = new Image::Thumbnail(
+		module     => 'GD',
+		size       => $size,
+		create     => 1,
+		input      => $input,
+		outputpath => $output,
+		outputtype => $type,
+	);
+}
+																						
+=head2 sizeConvertor
+
+	Converts the size of an image.
+
+=head3 Parameters
+
+	$imgAddress: (STRING) Image address.
+	$size: (INT) The size the image should be convert to in pix.
+
+=head3 Return
+
+	Return an hash ref to ( width => $width, height => $height ).
+
+=head4 Author
+
+	Omid Houshyar
+
+=cut
+
+sub sizeConvertor : Private {
+	my ( $self, $c, $imgAddress, $size ) = @_;
+
+	my ( $imgWidth, $imgHeight ) = imgsize($imgAddress);
+	$c->log->info("Old => width: $imgWidth, height: $imgHeight");
+
+	my %newSize;
+	if ( $imgWidth >= $imgHeight ) {
+		%newSize = (
+			width	=> $size,
+			height 	=> ($imgHeight * $size) / $imgWidth,
+		);
+	} else {
+		%newSize = (
+			width	=> ($imgWidth * $size) / $imgHeight,
+			height 	=> $size,
+		);
+	}
+
+	$c->log->info("New => width: $newSize{width}, height: $newSize{height}");
+	return \%newSize;
+}
+
+sub test : Local {
+	my ($self, $c) = @_;
+	$c->forward( 'sizeConvertor', ['/files/Project/cms/trunk/cms/root/static/webfiles/website_18/35.JPG', 150]);
+}
+
+=head1 AUTHOR
+
+Omid Houshyar
+
+=head1 LICENSE
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+
+1;

Added: trunk/OzinoCMS/lib/cms/Controller/Core/File/Upload.pm
===================================================================
--- trunk/OzinoCMS/lib/cms/Controller/Core/File/Upload.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/cms/Controller/Core/File/Upload.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,166 @@
+package cms::Controller::Core::File::Upload;
+
+use strict;
+use warnings;
+use base 'Catalyst::Controller';
+
+=head1 NAME
+
+cms::Controller::Core::File::Upload - Catalyst Controller
+
+=head1 DESCRIPTION
+
+Catalyst Controller.
+
+=head1 METHODS
+
+=cut
+
+
+=head2 doUpload
+
+=cut
+
+sub doUpload : Local {
+	my ( $self, $c ) = @_;
+	$c->stash->{back} = $c->req->param('back');
+
+	my $formData = {
+		website_id	=> $c->{stash}{cms}{website}->{website_id},
+		title		=> $c->req->param('title') ? $c->req->param('title') : '',
+		description	=> $c->req->param('description') ? $c->req->param('description') : '',
+	};
+
+	my $upload = $c->request->uploads->{file};
+
+	if ($upload) {
+		# Get Application types from cms.yml and create a string to use in regex.
+		my ($pType, $cType) = ( '', '' );
+		my ($pFirst, $cFirst) = ( 1, 1 );
+		for my $p ( keys %{ $c->config->{files}->{types} } ) {
+			unless ( $pFirst ) {
+				$pType .= '|';
+			} else {
+				$pFirst = !$pFirst;
+			}
+			$pType .= "($p)";
+
+			for ( @{ $c->config->{files}->{types}->{$p} } ) {
+				unless ( $cFirst ) {
+					$cType .= '|';
+				} else {
+					$cFirst = !$cFirst;
+				}
+				$cType .= "($_->{name})";
+			}
+		}
+#		$c->log->info($pType);
+#		$c->log->info($cType);
+		###
+
+		# Checking file size. Max file size sets in cms.yml
+		if ($upload->size > $c->config->{files}->{max_size}->{size} ) {
+			$c->stash->{message} = $c->localize('Size of uploaded file is more than ') . $c->config->{files}->{max_size}->{h_size_title} . '.';
+			$c->stash->{formData} = $formData;
+			$c->detach( 'index' );
+		# Checkin file type. Get the types from cms.yml
+		} elsif ( $upload->type =~ /$pType/ && !($upload->type =~ /$cType/) ) {
+			$c->stash->{message} = $c->localize('Illegal file type') . ': "' . $upload->type . '".';
+			$c->stash->{formData} = $formData;
+			$c->detach( 'index' );
+		}
+		
+		my $filename = $upload->filename;
+		my $extension;
+		$filename =~  /\.(\w+)$/ ;
+		$extension = $1;
+		$formData->{ext} = $extension ? $extension : '';
+		$formData->{type} = $upload->type;
+
+		my $file = $c->model('CmsDB')->resultset('File')->create( $formData );
+
+		my $dir;
+		$dir = $c->config->{files}->{base_address};
+		if (!(-d $dir) ){
+			`mkdir $dir`;
+			`chown www-data:www-data $dir`;
+			`chmod +w $dir`;
+		}
+
+		$dir = $c->config->{files}->{base_address} . '/website_' . $formData->{website_id};
+		if (!(-d $dir) ){
+			`mkdir $dir`;
+			`chown www-data:www-data $dir`;
+			`chmod +w $dir`;
+		}
+
+		eval {
+			my $target   = "$dir/" . $file->id;
+			$target .= ".$extension" if ($extension && $extension ne '');
+			unless ( $upload->copy_to($target) ) {
+				die( "Failed to copy '$filename' to '$target': $!" );
+			} else {
+				# Create thumbnail if the file is image. Get the size of thumbnail from cms.yml.
+				if ( $upload->type =~ /image/ ) {
+					my @param;
+					foreach my $size ( @{ $c->config->{files}->{image}->{sizes} } ) {
+						my $thumbSize = $c->forward('/core/file/image/sizeConvertor', [ $target, $size ]);
+						$param[0] = $thumbSize->{width};
+						$param[1] = $thumbSize->{height};
+						$param[2] = $target;
+						$param[3] = "$dir/" . $file->id . "_$size" . "px.$extension" ;
+						$c->forward( "/core/file/image/createThumbnail", \@param );
+					}
+				} 
+			}
+		};
+
+		if ( $@ ){
+			$c->stash->{message} = $c->localize('There is an ERROR in uploading file') . '.';
+			$c->stash->{formData} = $formData;
+			$c->log->debug("ERROR: $@");
+			$c->detach( 'index' );
+		} else {
+			if ( $c->req->param('back') eq 'fileMng' ) {
+				$c->stash->{message} = $c->localize('New file is added successfully') . '.';
+				$c->detach( '/admin/website/file/index' );
+			} else {
+				$c->res->body('Complete');
+			}
+		}
+	} else {
+		$c->stash->{message} = $c->localize('Select a file to upload is required') . '.';
+		$c->stash->{formData} = $formData;
+		$c->detach( 'index' );
+	}
+}
+
+=head2 index 
+
+	Show upload form.
+
+=cut
+
+sub index : Private {
+	my ( $self, $c ) = @_;
+	my $back = $c->req->param('back') if $c->req->param('back');
+
+	$c->stash(
+		back		=> $back,
+		template 	=> 'files/upload.tt',
+	);
+}
+
+
+=head1 AUTHOR
+
+Omid Houshyar
+
+=head1 LICENSE
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+
+1;

Added: trunk/OzinoCMS/lib/cms/Controller/Core/File.pm
===================================================================
--- trunk/OzinoCMS/lib/cms/Controller/Core/File.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/cms/Controller/Core/File.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,199 @@
+package cms::Controller::Core::File;
+
+use strict;
+use warnings;
+use base 'Catalyst::Controller';
+
+=head1 NAME
+
+cms::Controller::Core::File - Catalyst Controller
+
+=head1 DESCRIPTION
+
+Catalyst Controller.
+
+=head1 METHODS
+
+=cut
+
+
+=head2 get
+
+	Function to get file detail. 
+
+=head3 Parameters:
+	
+	$fileId: (INT) file ID
+
+=cut
+
+sub get : Local {
+	my ( $self, $c, $fileId ) = @_;
+
+	unless ($fileId) {
+		my $msg = $c->localize('Valid file ID is required') . ' .';
+		$c->detach( '/common/showError', [ $msg ]);
+	} else {
+		if ( my $file = $c->model('CmsDB')->resultset('File')->find($fileId) ) {
+			my %tmpRes = $file->get_columns;
+			$tmpRes{icon} = $c->forward( 'getFileTypeIcon', [ $tmpRes{type} ] );
+			$file = \%tmpRes;
+
+#			$c->log->dumper($file);
+
+			return $file;
+		} else {
+			my $msg = $c->localize('Invalid file ID') . ' !';
+			$c->detach( '/common/showError', [ $msg ]);
+		}
+	}
+
+}
+
+=head2 getAllFiles
+
+=cut
+
+sub getAllFiles : Private {
+	my ( $self, $c, $websiteId ) = @_;
+	$websiteId = $c->{stash}{cms}{website}->{website_id} unless $websiteId;
+
+	my $file = $c->model('CmsDB')->resultset('File')->search(
+		website_id	=> $websiteId,
+	);
+
+	my @files;
+	while ( my $res = $file->next ) {
+		my %tmpRes = $res->get_columns;
+		$tmpRes{icon} = $c->forward( 'getFileTypeIcon', [ $tmpRes{type} ] );
+		push @files, \%tmpRes;
+	}
+
+#	$c->log->dumper(\@files);
+	return \@files;
+}
+
+=head2 getFileTypeIcon
+
+	Function to return file icon.
+
+=head3 Parameters: 
+	
+	$fileType: (STRING) file type
+
+=head3 Return:
+	
+	Icon file name.
+
+=head4 Author:
+
+	Omid Houshyar
+
+=cut
+
+sub getFileTypeIcon : Private {
+	my ( $self, $c, $fileType ) = @_;
+
+	for ( keys %{ $c->config->{files}->{types} } ) {
+		if ( $fileType =~ /$_/ ) {
+			my $match = $&;
+			$fileType =~ s/$match\///;
+			for ( @{ $c->config->{files}->{types}->{$match} } ) {
+				return $_->{icon} if $_->{name} eq $fileType;
+			}
+		}
+	}
+
+}
+
+
+=head2 remove
+
+	Function to remove file.
+
+=head3 Parameters
+
+	$fileId: (INT) File ID
+
+=head3 Important NOTE
+
+	Security check is needed before call.
+
+=cut
+
+sub remove : Private {
+	my ( $self, $c, $fileId, $websiteId ) = @_;
+	$websiteId = $c->{stash}{cms}{website}->{website_id} unless $websiteId;
+
+	unless ($fileId) {
+		my $msg = $c->localize('Valid file ID is required') . ' .';
+		$c->detach( '/common/showError', [ $msg ]);
+	} else {
+		if ( my $file = $c->model('CmsDB')->resultset('File')->find($fileId) ) {
+			my @fileNames;
+			my $dir = $c->config->{files}->{base_address} . '/website_' . $websiteId . '/';
+			
+			if ( $file->type =~ /image/ ) {
+				for ( @{ $c->config->{files}->{image}->{sizes} } ) {
+					push @fileNames, $dir . $file->id . "_$_" . 'px.' . $file->ext;
+				}
+				push @fileNames, $dir . $file->id . '.' . $file->ext;
+			} else {
+				my $target = $dir . $file->id;
+				$target .= '.' . $file->ext if ( $file->ext ne '' );
+				push @fileNames, $target;
+			}
+
+#			$c->log->dumper(\@fileNames);
+
+			eval {
+				for (@fileNames) {
+					`rm -f $_`;
+				}
+				$file->delete if ( -d $dir ); # Check if the address was correct then remove it from database.
+			};
+
+			if ( $@ ){
+				my $msg = $c->localize('There is an ERROR on removing file') . ' !';
+				$c->log->debug('Removing file ERROR: $@');
+				$c->detach( '/common/showError', [ $msg ]);
+				return 0;
+			} else {
+				return 1;
+			}
+		} else {
+				my $msg = $c->localize('Invalid file ID') . ' !';
+				$c->detach( '/common/showError', [ $msg ]);
+		}
+	}
+
+}
+
+=head2 showFileList
+
+	Show all files.
+
+=cut
+
+sub showFileList : Private {
+	my ( $self, $c ) = @_;
+
+	$c->stash(
+		files		=> $c->forward( 'getAllFiles' ),
+		template	=> 'files/list.tt',
+	);
+}
+
+
+=head1 AUTHOR
+
+Omid Houshyar
+
+=head1 LICENSE
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+
+1;

Added: trunk/OzinoCMS/lib/cms/Controller/Core/Module.pm
===================================================================
--- trunk/OzinoCMS/lib/cms/Controller/Core/Module.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/cms/Controller/Core/Module.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,42 @@
+package cms::Controller::Core::Module;
+
+use strict;
+use warnings;
+use base 'Catalyst::Controller';
+
+=head1 NAME
+
+cms::Controller::Core::Module - Catalyst Controller
+
+=head1 DESCRIPTION
+
+Catalyst Controller.
+
+=head1 METHODS
+
+=cut
+
+
+=head2 index 
+
+=cut
+
+sub index : Private {
+    my ( $self, $c ) = @_;
+
+    $c->response->body('Matched cms::Controller::Core::Module in Core::Module.');
+}
+
+
+=head1 AUTHOR
+
+root
+
+=head1 LICENSE
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+
+1;

Added: trunk/OzinoCMS/lib/cms/Controller/Core/Navigation.pm
===================================================================
--- trunk/OzinoCMS/lib/cms/Controller/Core/Navigation.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/cms/Controller/Core/Navigation.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,351 @@
+package cms::Controller::Core::Navigation;
+
+use strict;
+use warnings;
+use base 'Catalyst::Controller';
+
+=head1 NAME
+
+cms::Controller::Core::Navigation - Catalyst Controller
+
+=head1 DESCRIPTION
+
+Catalyst Controller.
+
+=head1 METHODS
+
+=cut
+
+
+=head2 get
+
+=cut
+
+sub get : Private {
+	my ( $self, $c, $id ) = @_;
+
+	my $nav = $c->model('CmsDB')->resultset('Navigation')->find($id);
+	unless ( $nav ) {
+		$c->res->body( $c->localize('Invalid navigation id.') );
+	} else {
+		my %navData = $nav->get_columns;
+		return \%navData;
+	}
+
+}
+
+=head2 getNavList
+
+=cut
+
+sub getNavList : Private {
+	my ( $self, $c ) = @_;
+
+	my $navs = [];
+	my $nav = $c->model('CmsDB')->resultset('Navigation')->search({
+			website_id	=> $c->{stash}{cms}{website}->{website_id},
+		});
+
+	while ( my $res = $nav->next ) {
+		my %tmp = $res->get_columns;
+		push @{ $navs }, \%tmp,
+	}
+
+	return $navs;
+}
+
+=head2 index 
+
+=cut
+
+sub index : Private {
+	my ( $self, $c ) = @_;
+
+	$c->response->body('Matched cms::Controller::Core::Navigation in Core::Navigation.');
+}
+
+=head2 processItem
+
+	This function gets a navigation item and process it depends on its navigation type and return a list.
+
+=head3 Parameters:
+
+	$item: (HASH REF) Item detail from navigation table.
+		$item = {
+			depth	=> -1,
+			id	=> 2,
+			name	=> 'Film',
+			type	=> 4,
+		};
+
+=head3 Return:
+
+	return: (ARRAY REF) A list of pages or category that must be shown.
+
+=cut
+
+sub processItem : Private {
+	my ( $self, $c, $item ) = @_;
+
+	if ( $item->{type} == 1 ) { # Category
+		return $c->forward( 'processCategoryItem', [ $item ] );
+	} elsif ( $item->{type} == 2 ) { # Page
+		return $c->forward( 'processPageItem', [ $item ] );
+	} elsif ( $item->{type} == 3 ) {
+		return $c->forward( 'processToHereItem', [ $item ] );
+	} elsif ( $item->{type} == 4 ) {
+		return $c->forward( 'processFromHereItem', [ $item ] );
+	}
+}
+
+=head2 processCategoryItem
+
+=cut
+
+sub processCategoryItem : Private {
+	my ( $self, $c, $item ) = @_;
+	
+	my @params;
+	$params[1] = $item->{id};
+	$params[2] = 1;
+	$params[5] = 1;
+
+	my $tmpList = $c->forward('/core/category/getCatList', \@params );
+	my $list;
+	for ( @{ $tmpList } ) {
+		if ( $_->{status} == 3 ) { # Check status and skip elements they have status different from 3.
+			if ( $item->{show_only} != 1 && $_->{page_id} && $_->{visible} ) { # On pages check their visibility in menu.
+				if ( $item->{depth} && ( $item->{depth} == -1 || ( $item->{depth} != -1 && ( $_->{depth} <= $item->{depth} ) ))) {
+					if ( $c->forward('/common/usergroup/groupPagePermission', [ $_->{page_id}, $c->{stash}{cms}{userId} ] ) ) {
+						push @{ $list }, $_;
+					} elsif ( $c->user_exists && $c->forward('/common/usergroup/userPagePermission', [ $_->{page_id}, $c->{stash}{cms}{userId} ] ) ) {
+						push @{ $list }, $_;
+					}
+				}
+			} elsif ( $item->{show_only} != 2 ) {
+				if ( $item->{depth} && ( $item->{depth} == -1 || ( $item->{depth} != -1 && ( $_->{depth} <= $item->{depth} ) ))) {
+					if ( $c->forward('/common/usergroup/groupCategoryPermission', [ $_->{id}, $c->{stash}{cms}{userId} ] ) ) {
+						push @{ $list }, $_;
+					} elsif ( $c->forward('/common/usergroup/userCategoryPermission', [ $_->{id}, $c->{stash}{cms}{userId} ] ) ) {
+						push @{ $list }, $_;
+					}
+				}
+			}
+		}
+	}
+
+	# Check show parent and remove the first item from list if show_parent is not 1
+	if ( $item->{id} != $c->{stash}{cms}{rootCatId} && $item->{show_parent} != 1 ) {
+		shift @{ $list };
+	}
+
+#	$c->log->dumper($tmpList);	
+#	$c->log->dumper($list);	
+
+	return $list;
+}
+
+=head2 processPageItem
+
+=cut
+
+sub processPageItem : Private {
+	my ( $self, $c, $item ) = @_;
+
+	my $page = $c->forward( '/core/page/get', [ $item->{id} ] );
+
+	my ($title, $desc, $skin);
+	for ( @{ $page->{pageLang} } ) {
+		if ($_->{language_id} eq $c->{stash}{cms}{website}->{language_id}) {
+			$title = $_->{title};
+			$desc = $_->{description};
+			$skin = $_->{default_skin_id};
+		}
+	}
+
+	$page->{title} = $title;
+	$page->{description} = $desc;
+	$page->{default_skin_id} = $skin;
+	$page->{depth} = 0;
+
+#	$c->log->dumper($page);
+
+	if ( $page->{status} == 3 ) {
+		if ( $c->forward('/common/usergroup/groupPagePermission', [ $page->{id}, $c->{stash}{cms}{userId} ] ) ) {
+			return $page;
+		} elsif ( $c->user_exists && $c->forward('/common/usergroup/userPagePermission', [ $page->{id}, $c->{stash}{cms}{userId} ] ) ) {
+			return $page;
+		}
+	}
+}
+
+=head2 processToHereItem
+
+=cut
+
+sub processToHereItem : Private {
+	my ( $self, $c, $item ) = @_;
+
+	my @tmpList;
+	my @list;
+	my $tmp = $c->forward( '/core/page/get', [ $item->{id} ] );
+
+	my ($title, $desc, $skin);
+	for ( @{ $tmp->{pageLang} } ) {
+		if ($_->{language_id} eq $c->{stash}{cms}{website}->{language_id}) {
+			$title = $_->{title};
+			$desc = $_->{description};
+			$skin = $_->{default_skin_id};
+		}
+	}
+
+	$tmp->{title} = $title;
+	$tmp->{description} = $desc;
+	$tmp->{default_skin_id} = $skin;
+	$tmp->{depth} = 0;
+
+	push @tmpList, $tmp;
+
+#	while ( $tmp->{parent_id} != $c->{stash}{cms}{rootCatId} ) {
+	while ( $tmp->{parent_id} ) {
+		$tmp = $c->forward( '/core/category/get', [ $tmp->{parent_id} ] );
+
+		for ( @{ $tmp->{catLang} } ) {
+			if ($_->{language_id} eq $c->{stash}{cms}{website}->{language_id}) {
+				$title = $_->{title};
+				$desc = $_->{description};
+				$skin = $_->{default_skin_id};
+			}
+		}
+
+		$tmp->{title} = $title;
+
+		$tmp->{description} = $desc;
+		$tmp->{default_skin_id} = $skin;
+		$tmp->{depth} = 0;
+
+		push @tmpList, $tmp;
+	}
+
+	for (@tmpList) {
+		if ( $_->{title} eq 'root' || $_->{status} == 3 ) {
+			if ($_->{title} eq 'root') {
+				if ( $_->{default_page_id} ) {
+					my $tmpPage = $c->forward( '/core/page/get', [ $_->{default_page_id} ]);
+					for my $pageLang ( @{ $tmpPage->{pageLang} } ) {
+						if ($pageLang->{language_id} eq $c->{stash}{cms}{website}->{language_id}) {
+							$_->{title} = $pageLang->{title};
+						}
+					}
+
+				}
+			}
+			if ( $_->{pageLang} ) {
+				if ( $c->forward('/common/usergroup/groupPagePermission', [ $_->{id}, $c->{stash}{cms}{userId} ] ) ) {
+					unshift @list, $_;
+				} elsif ( $c->user_exists && $c->forward('/common/usergroup/userPagePermission', [ $_->{id}, $c->{stash}{cms}{userId} ] ) ) {
+					unshift @list, $_;
+				}
+			} else {
+				if ( $c->forward('/common/usergroup/groupCategoryPermission', [ $_->{id}, $c->{stash}{cms}{userId} ] ) ) {
+					unshift @list, $_;
+				} elsif ( $c->user_exists && $c->forward('/common/usergroup/userCategoryPermission', [ $_->{id}, $c->{stash}{cms}{userId} ] ) ) {
+					unshift @list, $_;
+				}
+			}
+		}
+	}
+
+#	$c->log->dumper(\@tmpList);
+#	$c->log->dumper(\@list);
+
+	return \@list;
+
+}
+
+=head2 processFromHereItem
+
+=cut
+
+sub processFromHereItem : Private {
+	my ( $self, $c, $item ) = @_;
+
+	my $page = $c->forward( '/core/page/get', [ $item->{id} ] );
+	$item->{id} = $page->{parent_id};
+
+	return $c->forward( 'processCategoryItem', [ $item ] );
+}
+
+=head2 showItemList
+
+=cut
+
+sub showItemList : Local {
+	my ( $self, $c, $navId ) = @_;
+
+	my $nav = $c->model('CmsDB')->resultset('Navigation')->find($navId);
+	if ($nav) {
+		my %tmp = $nav->get_columns;
+		# Check the user permission on website_id and kick him off if he wants to 
+		# manage items of navigation from other website.
+		$c->detach('/access_denied') if ($tmp{website_id} != $c->{stash}{cms}{website}->{website_id});
+	} else {
+		$c->res->body( $c->localize('Invalid navigation id') . '.' );
+		return 0;
+	}
+
+	my $navItems = YAML::Load($nav->nav_detail);
+
+	for my $navItem ( @{ $navItems } ) {
+		if ($navItem->{type} == 1) {
+			my $cat = $c->forward( '/core/category/get', [ $navItem->{id} ]);
+
+			for ( @{ $cat->{catLang} } ) {
+				$navItem->{title} = $_->{title} if ( $_->{language_id} eq $c->{stash}{cms}{currentLanguageId} );
+			}
+		} elsif ($navItem->{type} == 2) {
+			my $page = $c->forward( '/core/page/get', [ $navItem->{id} ]);
+
+			for ( @{ $page->{pageLang} } ) {
+				$navItem->{title} = $_->{title} if ( $_->{language_id} eq $c->{stash}{cms}{currentLanguageId} );
+			}
+	
+		}
+	}
+
+	$c->stash(
+		navId		=> $nav->id,
+		navName		=> $nav->nav_name,
+		navItems	=> $navItems,
+		template	=> 'core/navigation/listItem.tt',
+	);
+}
+
+=head2 showNavList 
+
+=cut
+
+sub showNavList : Local {
+	my ( $self, $c ) = @_;
+
+	$c->stash(
+		viewType	=> 1,
+		navList		=> $c->forward('getNavList'),
+		template	=> 'core/navigation/list.tt',
+	);
+
+}
+
+
+=head1 AUTHOR
+
+Omid Houshyar
+
+=head1 LICENSE
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+
+1;

Added: trunk/OzinoCMS/lib/cms/Controller/Core/Page.pm
===================================================================
--- trunk/OzinoCMS/lib/cms/Controller/Core/Page.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/cms/Controller/Core/Page.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,297 @@
+package cms::Controller::Core::Page;
+
+use strict;
+use warnings;
+use base 'Catalyst::Controller';
+
+=head1 NAME
+
+cms::Controller::Core::Page - Catalyst Controller
+
+=head1 DESCRIPTION
+
+Catalyst Controller.
+
+=head1 METHODS
+
+=cut
+
+
+=head2 get
+
+=cut
+
+sub get : Private {
+	my ( $self, $c, $pageId ) = @_;
+
+	my $pg = $c->model('CmsDB')->resultset('PageLang')->search(
+		{
+			'page_id'	=> $pageId,
+		}, 
+		{
+			prefetch	=> [ 'page_id' ],
+		}
+	);
+
+	my %page;
+	if (!scalar $pg->all) {
+		$c->res->body("There is an internal error to get page.");
+		$c->log->debug("No Page found.");
+	} else {
+		my $res = $pg->first;
+		%page = $res->page_id->get_columns;
+		my $tmpPageLang = {};
+		%{$tmpPageLang} = $res->get_columns;
+		push @{ $page{pageLang} }, $tmpPageLang;
+
+		while ( $res = $pg->next ) {
+			$tmpPageLang = {};
+			%{$tmpPageLang} = $res->get_columns;
+			push @{ $page{pageLang} }, $tmpPageLang;
+		}
+	}
+
+	my $permission = $c->model('CmsDB')->resultset('GroupPagePermission')->search(
+		{ page_id	=> $pageId },
+		{ prefetch	=> 'group_id' }
+	);
+
+	while ( my $res = $permission->next ) {
+		if ( $res->permission == 2 ) {
+			push @{ $page{editPermission}{groups} }, $res->group_id->id;
+			push @{ $page{viewPermission}{groups} }, $res->group_id->id;
+		} else {
+			push @{ $page{viewPermission}{groups} }, $res->group_id->id;
+		}
+	}
+
+	$permission = $c->model('CmsDB')->resultset('UserPagePermission')->search(
+		{ page_id	=> $pageId },
+		{ prefetch	=> 'user_id' }
+	);
+
+	while ( my $res = $permission->next ) {
+		if ( $res->permission == 2 ) {
+			push @{ $page{editPermission}{users} }, $res->user_id->id;
+			push @{ $page{viewPermission}{users} }, $res->user_id->id;
+		} else {
+			push @{ $page{viewPermission}{users} }, $res->user_id->id;
+		}
+	}
+
+
+#	$c->log->dumper(\%page);
+	return \%page;
+}
+
+=head2 getAllPages
+
+=cut
+
+sub getAllPages : Private {
+	my ( $self, $c, $catId ) = @_;
+
+	my @params;
+	# Set recursive flag.
+	$params[2] = 1;
+	$params[5] = 1;
+
+	my $catPageList	= $c->forward( '/core/category/getCatList', \@params );
+	my @allPages;
+	for ( @{ $catPageList } ) {
+		push @allPages, $_ if $_->{page_id};
+	}
+
+	return \@allPages;
+
+#	$c->log->dumper($catPageList);
+#	$c->log->info(scalar @{$catPageList} . ' ' . scalar @allPages);
+#	$c->log->dumper(\@allPages);
+}
+
+=head2 getOrderList
+
+=cut
+
+sub getOrderList : Local {
+	my ( $self, $c, $catId ) = @_;
+
+	$c->stash(
+		orderList	=> $c->forward('getPageList', [ $catId ] ),
+		template	=> 'admin/page/orderList.tt',
+	);
+}
+
+=head2 getPageList
+
+	Function to get pages.
+
+	$catId: (INT) Pages parent_id
+
+	return: (ArreyRef) order by order
+
+=cut
+
+sub getPageList : Private {
+	my ( $self, $c, $catId, $defaultPageId ) = @_;
+#	$c->log->info($defaultPageId);
+
+	if ( !$catId || $catId == -1 ) {
+		my $cat = $c->forward('/core/category/getRootCat');
+		$catId = $cat->{id};
+	}
+
+	my @pages;
+
+	if ($catId) {
+		my $cat = $c->forward( '/core/category/get', [ $catId ]);
+
+		my $rsPages = $c->model('CmsDB')->resultset('PageLang')->search(
+			{
+				language_id		=> $c->{stash}{cms}{website}->{default_language_id},
+				'page_id.parent_id'	=> $catId,
+			},
+			{ 
+				prefetch	=> 'page_id',
+				order_by	=> 'page_id.order',
+			}
+		);
+
+		while ( my $res = $rsPages->next ) {
+			my %page = ( $res->get_columns, $res->page_id->get_columns );
+			$page{isDefault} = ($cat->{default_page_id} && $cat->{default_page_id} == $page{id}) ? 1 : 0;
+			push @pages, \%page;
+		}
+
+#		$c->log->dumper( \@pages );
+	}
+		
+	return \@pages;
+}
+
+=head2 index 
+
+=cut
+
+sub index : Private {
+    my ( $self, $c ) = @_;
+
+    $c->response->body('Matched cms::Controller::Core::Page in Core::Page.');
+}
+
+=head2 showCatPageList
+
+	Show Categories and their pages in hirarchical list.
+
+=cut
+
+sub showCatPageList : Local {
+	my ( $self, $c ) = @_;
+
+	my @params;
+	# Set recursive flag.
+	$params[2] = 1;
+	$params[5] = 1;
+
+	$c->stash(
+		showCatIsNormalList	=> 1,
+		editOnPages		=> 1,
+		catPageList		=> $c->forward( '/core/category/getCatList', \@params ),
+		template		=> 'admin/page/catpagelist.tt',
+	);
+
+}
+
+=head2 showPageLangList
+
+=cut
+
+sub showPageLangList : Local {
+	my ( $self, $c, $pageId ) = @_;
+
+	my $formData = $c->forward( 'get', [ $pageId ]);
+
+	$c->stash(
+		formData	=> $formData,
+		template	=> 'admin/page/showPageLang.tt',
+	);
+}
+
+
+=head2 getPageTemplate 
+=cut
+
+sub getPageTemplate : Global {
+	my ( $self, $c, $pageId ) = @_;
+#	$c->log->info("pageID ==== $pageId");
+	return if (! $pageId);
+	my $rsPage;
+	my %skin;
+#	$c->model('CmsDB')->storage->debug( 1 );
+	##################################################
+	# Find page with currentLangId
+	##################################################
+	$rsPage  =  $c->model('CmsDB')->resultset('Page')->search({
+		'me.id'				=> $pageId,
+		'page_langs.language_id'	=> $c->{stash}{cms}{currentLanguageId},
+		'website_id.id'			=> $c->{stash}{cms}{website}->{website_id},
+		
+	}
+	,{
+		prefetch	=> [ 'page_langs' ],
+		join		=> [  { 'parent_id' =>  'category_langs'  } , { 'parent_id' =>  'website_id' } ],
+	});
+	
+	###############################################################################
+	# If there isn't page with currentLangId we will find page with defaultLangId
+	###############################################################################
+	if ( ! $rsPage->count ){
+#		$c->log->info("In IF 2");
+		$rsPage  =  $c->model('CmsDB')->resultset('Page')->search({
+			'me.id'	=> $pageId,
+			'page_langs.language_id'	=> $c->{stash}{cms}{default_language_id},
+			'website_id.id'			=> $c->{stash}{cms}{website}->{website_id},
+		}
+		,{
+			prefetch	=> [ 'page_langs' ],
+			join		=> [  { 'parent_id' =>  'category_langs'  } , { 'parent_id' =>  { 'website_id' =>  'website_langs' } } ],
+		});
+	}
+	
+	return 0 unless $rsPage->count;
+	$rsPage = $rsPage->first;
+
+	my $pageSkin = $rsPage->page_langs->first->default_skin_id->id if ( $rsPage->page_langs->first->default_skin_id );
+#	$c->log->info( "PageSkin". $pageSkin  );
+	my $catSkin =  $rsPage->parent_id->category_langs->first->default_skin_id->id if (  $rsPage->parent_id->category_langs->first->default_skin_id );
+	
+	my $siteSkin = $rsPage->parent_id->website_id->website_langs->first->default_skin_id->id if (  $rsPage->parent_id->website_id->website_langs->first->default_skin_id );
+	
+	
+	my $skinId;
+	if ($pageSkin){
+		$skinId	 = $pageSkin;
+	}elsif( $catSkin ){
+		$skinId	 = $catSkin;
+	}elsif( $siteSkin ){
+		$skinId	 = $siteSkin;
+	}
+	my $rsSkin = $c->model('CmsDB')->resultset('Skin')->find( $skinId );
+	$skin{id} = $skinId;
+	$skin{fileName} = $rsSkin->file_name;
+
+#	$c->log->dumper( \%skin );
+	return \%skin;
+}
+=head1 AUTHOR
+
+Omid Houshyar
+
+=head1 LICENSE
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+
+1;

Added: trunk/OzinoCMS/lib/cms/Controller/Core.pm
===================================================================
--- trunk/OzinoCMS/lib/cms/Controller/Core.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/cms/Controller/Core.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,821 @@
+package cms::Controller::Core;
+
+use strict;
+use warnings;
+use base 'Catalyst::Controller';
+use YAML::Loader;
+
+=head1 NAME
+
+cms::Controller::Core - Catalyst Controller
+
+=head1 DESCRIPTION
+
+Catalyst Controller.
+
+=head1 METHODS
+
+=cut
+
+
+=head2 index 
+
+=cut
+
+sub index : Private {
+    my ( $self, $c ) = @_;
+
+    $c->response->body('Core Ozino CMS Engine, Nothing to show or hide');
+}
+
+=head2 checkHostHeader
+
+check Host Availablity and returns a hash containing all website information or 0
+
+websitehash items: 
+
+	'admin_id', 'default_language_id', 'default_skin_id', 'header', 'language_id', 
+	'language_name', 'website_description', 'website_id', 'website_keyword', 'website_name'
+
+
+=cut
+
+sub checkHostHeader : Private {
+        my ( $self, $c, $siteName ) = @_;
+
+        my @rs = $c->model('CmsDB')->resultset('HostHeader')->search({
+		header => $siteName,
+		language_id => \'= default_language_id',
+	},{
+		prefetch => { website_id => { website_langs => 'language_id' }  }
+	});
+
+        if (@rs) {
+		my %websiteHeader = $rs[0]->get_columns;
+		my %website = $rs[0]->website_id->get_columns;
+		my %websiteLang = $rs[0]->website_id->website_langs->first->get_columns;
+		my %websiteLanguage = $rs[0]->website_id->website_langs->first->language_id->get_columns;
+		my %data = ( %websiteHeader, %website, %websiteLang, %websiteLanguage);
+		return \%data;
+        }
+        else {
+                return 0;
+        }
+
+}
+
+=head2 getHostHeader
+
+extract the host header from url passed to application
+
+=cut
+
+sub getHostHeader : Private {
+        my ( $self, $c ) = @_;
+        my $siteName = $c->req->base;
+
+        $siteName =~ s/^http:\/\/// ;  # remove http://
+        $siteName =~ s/:\d+\///;  # remove port number
+        $siteName =~ s/\/$// ;  # remove last /
+
+        return $siteName;
+}
+
+
+=head2 installModule 
+
+=over 4
+
+=item Arguments: $moduleName
+
+=item Return: 1 for successful insert , 0 for unsuccessful
+
+=item Todo: Update Module
+
+=back
+
+this action first checks to see if the requested module is available then watches fot getConfig and installs  
+the module based on it's config file
+
+=cut
+
+sub installModule : Local {  # Private
+	my ( $self, $c, $moduleName ) = @_;
+	my @controllers = $c->controllers;
+	if ( grep ("_Modules::$moduleName", @controllers ) ) {
+		if ( $c->controller("_Modules::$moduleName")->can("getConfig") ) {
+			my $moduleConfig = $c->forward( "_Modules::$moduleName", "getConfig"); 
+			if ( $moduleConfig->{name} ) {
+				my $newModule = $c->model("CmsDB")->resultset("Module")->find_or_new({
+					name => $moduleConfig->{name}, 
+					description => $moduleConfig->{description} || "",
+					version => $moduleConfig->{version} || "0.01",
+					fields => YAML::Dump($moduleConfig->{fields}) || "",
+				});
+				if ($newModule->in_storage) {
+					$c->log->error("Module Already installed, Remove it first");
+					return 0;
+				} else {
+					$newModule->insert;
+					return 1;
+				};
+			} else {
+				$c->log->error("Module's config[name] not found: $moduleName ");
+				return 0;
+			}
+		} else {
+			$c->log->error("Unimplemented getConfig in $moduleName");
+			return 0;
+		};
+	} else {
+		$c->log->error("Module Not Found: $moduleName");
+		return 0;
+	};
+}
+
+
+=head2 getModuleContent 
+
+=over 4
+
+=item Arguments: $moduleName, @params 
+
+module parameters from database 
+
+=item Return: html of content 
+
+=back
+
+=cut
+
+sub getModuleContent : Local {
+	my ( $self, $c, $moduleName, $mode, $gizmoId, $gizmoName, $params, $pageId, $langId ) = @_;
+	
+	my $moduleContent;
+	my $fieldValue;
+	my $rsGizmo  = $c->model('CmsDB')->resultset('Gizmo')->find( { id => $gizmoId, deleted => 0 } , { prefetch =>  'gizmo_langs'} );
+	
+	if ( $c->controller("_Modules::$moduleName")->can("getContent") ) {
+		
+		$moduleContent = $c->forward( "_Modules::$moduleName", "getContent", [ $mode, $params ] ); 
+		# If moduleContent is false then we create hash of files data 
+		if ( $mode ){
+		
+			######### Prepare pages data ########
+			my $pages  = $c->model('CmsDB')->resultset('Page')->search({
+				'parent_id.website_id'	=>  $c->{stash}{cms}{website}->{website_id} ,
+			},{
+				prefetch	=> ['parent_id','page_langs'],
+			});
+			
+			####### Prepare contentArea list data ########
+			my %cond;
+			my $lang = $c->{stash}{cms}{website}{default_language_id};
+			$cond{'me.website_id'} = $c->{stash}{cms}{website}->{website_id};
+			$cond{'language_id'} = $lang ;
+				
+			my $rsWebsiteLang  =  $c->model('CmsDB')->resultset('WebsiteLang')->search(\%cond);
+			if ( ! $rsWebsiteLang->count )	{
+#				$c->log->info("Skin not found with language $lang");
+				$lang = 'en' ;
+				$cond{'language_id'} = $lang ;
+			}
+					
+			my $contentsArea = $c->model('CmsDB')->resultset('WebsiteLang')->search(
+				\%cond
+			,{
+				prefetch	=> ['default_skin_id'],
+			})->first->default_skin_id->contentarea_list;
+			
+			my @contentsArea  = split(',',  $contentsArea );
+			
+			####### Prepare category list ########
+			my @params;
+			# Set recursive flag.
+			$params[2] = 1; 
+			my $catsList = $c->forward('/core/category/getCatList', \@params);
+
+
+			###### set stash values ######
+			$c->stash->{gizmoName} = $gizmoName;	
+			$c->stash->{gizmoDesc} = $rsGizmo->gizmo_langs->first->description;
+			$c->stash->{gizmoState} = $rsGizmo->status;
+			$c->stash->{gizmoCategoryId} = $rsGizmo->category_id;	
+			$c->stash->{gizmoPageId} = $rsGizmo->page_id;	
+			$c->stash->{gizmoId} = $gizmoId;	
+			$c->stash->{pageId} = $pageId;	
+			$c->stash->{gizmoStatuses} =  $c->config->{general}->{statuses};
+			$c->stash->{gizmoScopes} =  $c->config->{general}->{scopes};
+			$c->stash->{catsList} = $catsList;
+			$c->stash->{pagesList} = $pages;
+			$c->stash->{contentsArea} = \@contentsArea;
+			$c->stash->{gizmoContentArea} = $rsGizmo->contentarea;
+			$c->stash->{includeTinyMce} = 1;
+			$c->stash->{defaultLangId} = $langId;
+			$c->stash->{groups} = $c->forward('/common/usergroup/getGroups', []);
+	                $c->stash->{users}  = $c->forward('/common/usergroup/getUsers', []);
+			##### This hash contion value same permission , ...
+			$c->stash->{formData} = $c->forward('getGizmoPermission',[ $gizmoId ]);
+			$c->stash->{isEdit} = 1;
+			#$c->log->dumper( $c->forward('getGizmoPermission',[ $gizmoId ])  );
+			
+			if ( ! $moduleContent   ) {
+				$c->stash->{fieldsData}	=  $c->forward('getGizmoFields',[ $gizmoId, $langId ]) ,
+			}else{
+				$c->stash->{fieldsData} =  $moduleContent;
+			}
+			
+			###############################################
+			#Check for mode is edit or view and render TT
+			###############################################
+			my $languages = $c->model('CmsDB')->resultset('Language')->search(1,{ order_by => 'language_name'});
+			$c->stash->{languageList}    = $languages;
+
+			$moduleContent = $c->view('TT')->render($c,'admin/gizmo/index.tt'); 	
+		}
+
+	} else {
+		$c->log->error("Unimplemented getContent in $moduleName");
+		$moduleContent = "";
+	};
+	#$c->res->body($moduleContent);
+	return $moduleContent;
+}
+
+
+=head2 _getGizmoContent 
+	This function is for ajax call
+=cut
+
+sub _getGizmoContent : Global {
+	my ( $self, $c, $gizmoID, $mode, $pageId, $langId, $op ) = @_;
+	$c->res->body( $c->forward('getGizmoContent',[$gizmoID, $mode, $pageId, $langId, $op ]) );
+	
+}
+
+
+=head2 getGizmoContent
+
+this method extracts and returns Exizmo Content Based On Website's Current Language, Permisstions of Current User
+this module also sets output body to returned HTML
+
+=over 4
+
+=item Arguments: $gizmoID
+
+=item Return: html of content 
+
+=back
+
+=head3 TODO:
+
+Extract's Gizmo Module Name, Gizmo Params and Convert Params to hash calls getModuleContent and return the HTML and print it
+Check if User Can See the Gizmo
+
+TEST
+
+=cut
+
+sub getGizmoContent : Private {
+	my ( $self, $c, $gizmoID, $mode, $pageId, $langId, $op ) = @_;
+	my $gizmoContent = $c->localize("Empty Gizmo");
+	
+	$gizmoID = $c->req->param('gizmoId') unless $gizmoID;
+	$mode    =  $c->req->param('mode') unless $mode;
+	$pageId  =  $c->req->param('pageId') unless $pageId;
+
+	
+	############################################
+	# send data to stash 
+	############################################
+	$c->stash->{op} = $op if ( $op );
+	$c->stash->{gizmoId} = $gizmoID;
+	
+	############################################
+	#  Get gizmo data 
+	############################################
+	my %cond;
+		################################################################
+		# Is there wanted language in GizmoLang else set lang to 'en'
+		################################################################
+		
+		### First we search with default_language_id if there isn't any laguage defined for gizmo, we search En lang for gizmo
+		my $lang = $langId ? $langId : $c->{stash}{cms}{website}->{default_language_id};
+		my $rsGizmoLang = $c->model('CmsDB')->resultset('GizmoLang')->search({
+			gizmo_id	=> $gizmoID,
+			language_id	=> $lang,
+		});
+		$lang  = 'en' if ( ! $rsGizmoLang->count );
+		$cond{language_id} = $lang;
+		
+	$cond{'me.id'} = $gizmoID; 
+	$cond{'me.deleted'} = 0; 
+	$cond{'header'} = $c->{stash}{cms}{website}->{header}; 
+	my @rsGizmo = $c->model('CmsDB')->resultset('Gizmo')->search( \%cond ,{
+		prefetch =>  'gizmo_langs' , 
+		join =>  {  'website_id' => 'host_headers' }, 
+	});
+	my $gizmo = $rsGizmo[0];
+	
+#	$c->log->info( $rsGizmo[0]->gizmo_langs->first->parameter_values  );	
+#	$c->log->info( "lang is  $lang  and  Name is  : " . $rsGizmo[0]->gizmo_langs->first->name  . " count =" . scalar  @rsGizmo );
+#	
+	#######################################################
+	# Check for user have permission to see or edit gizmo
+	#######################################################
+	
+	# first check group permission
+	my $haveGroupsGizmoPermission = $c->forward('/common/usergroup/groupGizmoPermission',[  $gizmoID, $c->{stash}{cms}{userId} ]);
+	
+	# second check user permission
+	my $haveUserGizmoPermission = $c->forward('/common/usergroup/userGizmoPermission',[  $gizmoID, $c->{stash}{cms}{userId} ]);
+	#############################################
+	# Call getModuleContent
+	#############################################
+		
+	if ( $haveGroupsGizmoPermission or $haveUserGizmoPermission ){
+#		$mode = $mode && !($haveGroupsGizmoPermission || $haveUserGizmoPermission );
+		
+		if ( $mode and  $mode > 0  and ( $haveGroupsGizmoPermission >  1 or $haveUserGizmoPermission > 1   ) ){
+			$mode = 1; #mean edit mode
+		}else{
+			$mode = 0;#mean view mode
+		}
+		############################################
+		# Show gizmo lang list 
+		############################################
+	
+		if ( $mode ){
+			$c->forward('/admin/website/gizmo/showGizmoLang', [ $gizmoID, $langId ] );
+		}
+
+		if ($rsGizmo[0]) {
+			###### get gizmo parametr values to send data to hash  ######
+			my %params;
+			#we check if there are values in parameter_values then init hash values
+			if ( (ref YAML::Load($gizmo->gizmo_langs->first->parameter_values)) eq 'HASH' ){
+				%params = %{YAML::Load($gizmo->gizmo_langs->first->parameter_values)};
+			}
+				
+			$params{gizmoName} = $gizmo->gizmo_langs->first->name;
+			$params{gizmoDescription} = $gizmo->gizmo_langs->first->description;
+			$params{order} = $gizmo->order;
+			my $moduleName = $gizmo->module_name->name;
+			$gizmoContent = $c->forward( "getModuleContent", [ $moduleName, $mode, $gizmoID, $rsGizmo[0]->gizmo_langs->first->name, \%params, $pageId, $lang ] ); 
+		} else {
+			$gizmoContent = $c->localize("Gizmo Not Found");
+		}
+
+
+	}else{
+		#$c->res->body('Access denaid');
+	}
+
+	return $gizmoContent;
+
+}
+
+=head2 _getPageContent
+
+this method extracts and returns page content based on website's current language, permisstions of current user
+this module also sets output body to returned HTML
+
+=over 4
+
+=item Arguments: $pageID
+
+=item Return: html of content 
+
+=back
+
+
+=head3 TODO:
+
+Extract's Page Name, Page Template, Page Gizmos 
+Check if User Can See the Gizmo
+
+	Progress: 1.getPageGizmo ------> 3.for each gizmo call getGizmoContent ---->  2.RenderView
+	
+TEST
+
+=cut
+
+sub _getPageContent : Global {
+	my ( $self, $c, $pageId, $mode, $msg  ) = @_;
+	$c->log->info( @_ );
+	$pageId = $c->req->param('pageId') unless $pageId;
+	$mode = $c->req->param('mode') unless $mode;
+	
+	###################################################
+	# Extract page's parent
+	###################################################
+	my $rsPage = $c->model('CmsDB')->resultset('Page')->find( $pageId );
+
+	if ( ! $rsPage ){ 
+		$c->res->body("Page not found");	
+		return 0;
+	}
+	###################################################
+	# Send needed data to stash
+	###################################################
+	$c->stash->{pageId} = $pageId;
+	$c->stash->{message} = $msg;
+
+	my $parentPage  = $rsPage->parent_id->id;	
+	###################################################
+	# check user have permission to see this category
+	###################################################
+	my $haveGroupsCategoryPermission = $c->forward('/common/usergroup/groupCategoryPermission',[ $parentPage, $c->{stash}{cms}{userId} ]);
+	my $haveUserCategoryPermission = $c->forward('/common/usergroup/userCategoryPermission',[ $parentPage, $c->{stash}{cms}{userId} ]);
+	
+	###################################################
+	# check user have permission to see or edit page
+	###################################################
+	my $haveGroupsPagePermission = $c->forward('/common/usergroup/groupPagePermission',[  $pageId, $c->{stash}{cms}{userId} ]);
+	my $haveUserPagePermission = $c->forward('/common/usergroup/userPagePermission',[  $pageId, $c->{stash}{cms}{userId} ]);
+
+	my $baseUrl = $c->req->base;
+	return if !$pageId;
+	my %contentValues;
+
+	####################################################
+	# Call getModuleContent
+	####################################################
+#	$c->log->info("systemLog: User  $c->{stash}{cms}{userId}  wants to view page $pageId  with $mode  privilage");
+#	$c->log->info("systemLog: Permission on  page $pageId for User $c->{stash}{cms}{userId} : group = $haveGroupsPagePermission and user: $haveUserPagePermission  ");
+	if ( $haveGroupsPagePermission or  $haveUserPagePermission or $haveGroupsCategoryPermission or  $haveUserCategoryPermission ){
+		
+		my $skinInfo = $c->forward('/core/page/getPageTemplate',[ $pageId ]);
+		if ( $mode >= 1 and ( $haveGroupsPagePermission  > 1 or $haveUserPagePermission  > 1 or  $haveGroupsCategoryPermission > 1 or  $haveUserCategoryPermission  > 1 ) ){
+#			$c->log->info("systemLog: User $c->{stash}{cms}{userId} viewed page $pageId  with edit privilage");
+			$mode = 1; #mean edit mode
+		}else{
+#			$c->log->info("systemLog: User  $c->{stash}{cms}{userId} view page $pageId");
+			$mode = 0;#mean view mode
+		}
+		
+		#################################################
+		# check page status
+		#################################################
+		if ( $mode ) {
+			if ( $rsPage->status != 1 and $rsPage->status != 3   ){
+				$c->res->body("You can't view this page.Page status is not viewable");
+				return;
+			}
+		}else{
+			if ( $rsPage->status != 3   ){
+				$c->res->body("You can't view this page. ");
+				return;
+			}
+		}
+		#################################################
+		# get list of gizmo 
+		#################################################
+		my %gizmoMap = %{$c->forward('getPageGizmo',[ $pageId, $mode ])};
+
+		##################################################
+		# Get latest modified of gizmo
+		##################################################
+		$c->forward('putLatestGizmoModifiedInStash',[ \%gizmoMap, $mode ]);
+#		$c->log->info(  $c->{stash}{cms}{website}{page_last_modified}  );	
+
+		foreach my $content( keys  %gizmoMap  ){
+		## in first step, keys are  center | footer | header | left | right
+			my @gizmoList  = @{$gizmoMap{$content}};
+			my $gizmoContent;
+			
+			$contentValues{$content} = "<div id='contentArea_". $content ."' class='contentArea' >";
+			foreach my $gizmoItem( @gizmoList ){
+				my %gizmoInfo = %{ $gizmoItem };
+				$c->stash->{cms}{website}{daft} = 1 if( $mode );
+				my $gizmoContent = $c->forward('getGizmoContent', [ $gizmoInfo{gizmoId} , 0 ]);
+
+			 	$gizmoContent = undef  if (  $gizmoContent  eq '0'  );
+				
+				# call  setGizmoHeader if mode is 1 . this call for add controll keys
+				my $numGizmos = scalar @gizmoList;  
+				$gizmoContent = $c->forward('setGizmoHeader', [ $gizmoInfo{gizmoId}, $gizmoContent, $pageId, $numGizmos ] ) if ( $mode  );
+				
+				$contentValues{$content}= $contentValues{$content} . $gizmoContent; #For using in editMode
+				$c->stash->{ 'contentArea_' . $content } = $contentValues{$content}; #For using in view mode
+			}
+			$contentValues{$content} = $contentValues{$content} . '</div>';
+			if ( $c->stash->{ 'contentArea_' . $content } ){
+				$c->stash->{ 'contentArea_' . $content } = $c->stash->{ 'contentArea_' . $content } . "</div>";
+			}
+		}
+
+		### Add 'new gizmo' link for each contentArea if mode  = 1
+		if ( $mode ){
+			foreach my $content( keys  %gizmoMap  ){
+				$c->stash->{content} = $content;
+				my $newGizmoLink = $c->view('TT')->render($c,'admin/gizmo/newGizmoLink.tt'); 	
+				$contentValues{$content} =  $newGizmoLink . $contentValues{$content};
+			}
+		}
+
+		###### add EditWebsite and logout link to page ######
+		if ( !$mode and $c->user_exists ) {
+			$c->stash->{pageId} = $pageId;
+			my $adminHotLinks =  $c->view('TT')->render($c,'admin/page/editContent/adminHotLink.tt');
+			$contentValues{header} = $adminHotLinks . $contentValues{header};
+		}
+
+		if( $mode ){	
+			$c->stash(
+				pageId		=> $pageId,
+				template	=> 'admin/page/editContent/index.tt',
+				contentValues =>  \%contentValues ,	
+			);
+		}else{
+			my $skinName  = $skinInfo->{fileName};
+			$c->stash(
+				template	=> '_websites/' . $c->{stash}{cms}{website}{header} . "/" . $skinName,
+				contentValues =>  \%contentValues ,	
+			);
+		}
+		
+	}else{
+#		$c->log->info("systemLog: User " . $c->{stash}{cms}{userId} . " access denaid to view page $pageId");
+		$c->res->body("You don't have permission to view this page. Please contact with your administrator ! ");
+	}
+}
+
+=head2 getPageGizmo
+
+	Return gizmos of each contentArea for example return
+		{
+			left { HellowWordl},
+			right{ ... },
+			center{ ... },
+			top{ ... },
+		}
+
+=cut
+
+sub getPageGizmo : Private {
+	my ( $self, $c, $pageId, $mode ) = @_;
+	my %gizmoMap;
+	my $rsPage = $c->model('CmsDB')->resultset('Page')->find( $pageId );
+	my $parentId  = $rsPage->parent_id->id;
+	########################################################
+	# 1. get list of all gizmos that user allowed to view 
+	#        get list of gizmo with website scope
+	#        get list of gizmo with category scope
+	#        get list of gizmo with page scope
+	########################################################
+	#$c->model('CmsDB')->storage->debug(1);
+	my %cond;
+	$cond{'-or'} = [
+			{
+				 website_id	=> $c->{stash}{cms}{website}->{website_id} ,
+				 category_id	=> undef,
+				 page_id	=> undef,
+			},
+			{
+				 website_id	=> $c->{stash}{cms}{website}->{website_id} ,
+				 category_id	=> $parentId,
+				 page_id	=> undef ,
+			},
+			{
+				 website_id	=> $c->{stash}{cms}{website}->{website_id} ,
+				 category_id	=> $parentId ,
+				 page_id	=> $pageId ,
+			}
+		];
+		
+	$cond{'gizmo_langs.language_id'} = $c->{stash}{cms}{website}{default_language_id},
+	$cond{'me.deleted'} = 0;
+	if ( $mode ){
+		$cond{'status'} = { -in => [ '1', '3' ] };
+	}else{
+		$cond{'status'} = '3';
+	}
+	#$c->log->dumper( \%cond );
+	my $gizmoList  = $c->model('CmsDB')->resultset('Gizmo')->search( \%cond ,{
+		order_by	=> [qw/ order  /],
+		prefetch	=> [ qw/ module_name gizmo_langs /],
+	});
+	#########################################################
+	# 2. process rows and put gizmos in categorized hash
+	#########################################################
+	# first get list of content area list from skin
+	my $skinId = $c->model('CmsDB')->resultset('WebsiteLang')->search({
+		website_id 	=> $c->{stash}{cms}{website}->{website_id},
+		language_id	=> $c->{stash}{cms}{website}{language_id}, 
+	})->first->default_skin_id->id;
+	my $rsSkin = $c->model('CmsDB')->resultset('Skin')->find( $skinId );
+	my @contentAreaList  = split(',' ,$rsSkin->contentarea_list );
+	#$c->log->dumper( \@contentAreaList  );
+	foreach my $content( @contentAreaList ){
+		$gizmoMap{ $content } = [];
+	}
+	my $area;
+	foreach my $gizmoListItem ( $gizmoList->all ){
+		my %gizmoInfo;
+		$area = $gizmoListItem->contentarea;
+		$gizmoInfo{gizmoId}  = $gizmoListItem->id;
+		$gizmoInfo{gizmoName}  = $gizmoListItem->gizmo_langs->first->name;
+		$gizmoInfo{gizmoOrder} = $gizmoListItem->order;
+		$gizmoInfo{moduleName} = $gizmoListItem->module_name->name;
+		$gizmoInfo{gizmoStatus} = $gizmoListItem->status;
+		$gizmoInfo{gizmoLastModified} = $gizmoListItem->gizmo_langs->first->latest_change_date_time;
+		$gizmoInfo{gizmoParameterValues} = $gizmoListItem->gizmo_langs->first->parameter_values;
+;		
+		######## Now push hash to related array #######
+		push  @{ $gizmoMap{$area} }, \%gizmoInfo;
+	}
+
+	#$c->log->dumper( \%gizmoMap );
+	return \%gizmoMap;
+}
+
+=head2 getGizmoFields
+	
+	This function get a gizmoId and return a hash contion list of fields and values of each fileds
+	
+=cut
+
+sub getGizmoFields : Private {
+	my ( $self, $c, $gizmoId, $langId ) = @_;
+	my %fieldsData;
+	$gizmoId  =  $c->req->param('gizmoId') unless $gizmoId;
+	return if ( ! $gizmoId );
+	
+	my $rsGizmo =  $c->model('CmsDB')->resultset('Gizmo')->search({
+		'me.id'				=> $gizmoId,
+		'gizmo_langs.language_id'	=> $langId,
+		'me.deleted'			=> 0,
+	},{ 
+		prefetch	=> 'gizmo_langs',
+	});
+	$rsGizmo = $rsGizmo->first;
+		
+	#########################################################
+	#first get fileds list and  convert to hash format
+	#########################################################
+	my $loader = YAML::Loader->new;
+	my @fields = @{$loader->load( $rsGizmo->module_name->fields )};		
+	$fieldsData{fields} = \@fields;
+	
+	##########################################################
+	#second get fields's values and convert to hash format
+	##########################################################
+	my %values; 
+	if (  ( ref $loader->load( $rsGizmo->gizmo_langs->first->parameter_values ))  eq 'HASH' ){
+		%values  =  %{ $loader->load( $rsGizmo->gizmo_langs->first->parameter_values ) };
+	}
+	$fieldsData{values} = \%values;
+	#third put in a hash and return hash
+	#$c->log->dumper(\%fieldsData );
+	return \%fieldsData;
+}
+
+
+=head2
+	Set hedaedr and footer for a gizmo
+	This use in edit mode
+=cut
+
+sub setGizmoHeader: Private {
+	my ($self, $c, $gizmoId, $gimzoContent, $pageId, $numGizmos ) = @_;
+	my $gizmoName;
+	my $gizmoOrder;
+	my $gizmoContentArea;
+	my ( $header, $footer, $baseUrl );
+	return if (!$gizmoId);
+	
+	my $rsGizmoLang = $c->model('CmsDB')->resultset('GizmoLang')->search({ 
+		gizmo_id 	=> $gizmoId ,
+		language_id 	=> $c->{stash}{cms}{website}->{default_language_id},
+		deleted		=> 0,
+	});
+	my $rsGizmo = $c->model('CmsDB')->resultset('Gizmo')->find({ id	=> $gizmoId, deleted	=> 0 });
+	$baseUrl = $c->req->base;
+	if ( $rsGizmoLang->count ){
+		$rsGizmoLang = $rsGizmoLang->first;
+		$gizmoName  =    $rsGizmoLang->name;	
+		$gizmoOrder =    $rsGizmo->order;	
+		$gizmoContentArea =    $rsGizmo->contentarea;	
+	}else{
+		$gimzoContent = $gimzoContent . '<b>No gizmo language found !!!</b>';			
+	}
+	my $rsPage  =  $c->model('CmsDB')->resultset('Page')->find( $pageId );
+	my $parentId;
+	
+	if ( $rsPage->parent_id ){
+		$parentId  =  $rsPage->parent_id->id;
+	}
+	################ set gizmo header #################
+	$c->stash->{pageId}=$pageId;
+	$c->stash->{gizmoId}=$gizmoId;
+	$c->stash->{parentId}=$parentId;
+	$c->stash->{gizmoContentAreaId}=$gizmoContentArea;
+	$c->stash->{gizmoName}=$gizmoName;
+	$c->stash->{gizmoOrder}=$gizmoOrder;
+	$c->stash->{numGizmos}=$numGizmos;
+	$c->stash->{gizmoContentArea}=$gizmoContentArea;
+	
+	$header = $c->view('TT')->render($c,'admin/gizmo/header.tt'); 	
+	$footer  = "<div class='gizmoFooter'></div>";	
+	return  $header  . $gimzoContent . $footer;
+}
+
+
+=head2
+
+	This function return an array contion permission of a gizmo
+	Input param: gizmoId
+	Output: hash ref
+	
+	The hash ref structure is this like:
+	{
+		'editPermission' => {
+			'users' => [
+					'18'
+				]
+		},
+		'viewPermission' => {
+			'groups' => [
+					'4'
+				],
+			'users' => [
+					'18'
+				]
+		},
+	}
+=cut
+
+sub getGizmoPermission: Private {
+	my ( $self, $c, $gizmoId ) = @_;
+	my %gizmo;
+	return if (! $gizmoId ) ;
+	my $permission = $c->model('CmsDB')->resultset('GroupGizmoPermission')->search(
+		{ gizmo_id	=> $gizmoId },
+		{ prefetch	=> 'group_id' }
+	);
+
+	while ( my $res = $permission->next ) {
+		if ( $res->permission == 2 ) {
+			push @{ $gizmo{editPermission}{groups} }, $res->group_id->id;
+			push @{ $gizmo{viewPermission}{groups} }, $res->group_id->id;
+		} else {
+			push @{ $gizmo{viewPermission}{groups} }, $res->group_id->id;
+		}
+	}
+
+	$permission = $c->model('CmsDB')->resultset('UserGizmoPermission')->search(
+		{ gizmo_id	=> $gizmoId },
+		{ prefetch	=> 'user_id' }
+	);
+
+	while ( my $res = $permission->next ) {
+		if ( $res->permission == 2 ) {
+			push @{ $gizmo{editPermission}{users} }, $res->user_id->id;
+			push @{ $gizmo{viewPermission}{users} }, $res->user_id->id;
+		} else {
+			push @{ $gizmo{viewPermission}{users} }, $res->user_id->id;
+		}
+	}
+	
+	return \%gizmo;
+	
+}
+
+=head2
+	putLatestGizmoModifiedInStash
+	This function put latest gizmo modifed in  $c->{stash}{cms}{website}{page_last_modified}
+=cut
+
+sub putLatestGizmoModifiedInStash : Private{
+	my ( $self, $c, $gizmoMap, $mode ) = @_;
+	my %gizmoMap =  %{ $gizmoMap };
+	
+	foreach my $content( keys  %gizmoMap  ){
+		## in first step, keys are  center | footer | header | left | right
+		my @gizmoList  = @{$gizmoMap{$content}};
+		foreach my $gizmoItem( @gizmoList ){
+			my %gizmoInfo = %{ $gizmoItem };
+			if (  $c->{stash}{cms}{website}{page_last_modified} lt  $gizmoInfo{gizmoLastModified} ){
+				 $c->{stash}{cms}{website}{page_last_modified} = $gizmoInfo{gizmoLastModified}; 
+			}	
+		}
+	}
+
+	
+}
+
+=head1 AUTHOR
+
+Davood Firoozian
+Reza Sadeghzadeh
+
+=head1 LICENSE
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+
+1;
+

Added: trunk/OzinoCMS/lib/cms/Controller/Root.pm
===================================================================
--- trunk/OzinoCMS/lib/cms/Controller/Root.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/cms/Controller/Root.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,160 @@
+package cms::Controller::Root;
+
+use strict;
+use warnings;
+use base 'Catalyst::Controller';
+
+#
+# Sets the actions in this controller to be registered with no prefix
+# so they function identically to actions created in MyApp.pm
+#
+__PACKAGE__->config->{namespace} = '';
+
+=head1 NAME
+
+cms::Controller::Root - Root Controller for cms
+
+=head1 DESCRIPTION
+
+[enter your description here]
+
+=head1 METHODS
+
+=cut
+
+=head2 auto 
+
+=cut
+
+sub auto : Private {
+	my ( $self, $c ) = @_;
+	$c->res->header("X-POWEREDBY = OzinoCMS");
+
+	my $siteName = $c->forward( "Core", 'getHostHeader');
+	my $viewState = $c->req->param('viewState');
+
+	if ( $siteName eq 'localhost') {
+		$c->res->body("you are connecting from <font color=red>$siteName</font><br />Note: need administration here"); 
+	} else {
+		my $website = $c->forward( "Core", 'checkHostHeader', [$siteName] );
+		if ($website) {
+			$c->{stash}{cms}{website} = $website;
+		} else {
+		       $c->stash( template  => 'notFound.tt', siteName => $siteName);
+			return 0;
+		}
+		######################### Call init function ####################
+		$c->forward('initCMS',[ $viewState ]);
+	}
+
+	##### forward to default page if action is default
+	if ( $c->req->action  eq 'default' ) {
+		$c->forward('/core/_getPageContent', [ $c->{stash}{cms}{website}{default_page_id},0 ]);
+	}
+	return 1;
+}
+
+
+=head2 default
+
+	Now Default checks the hostheader availablity and resticts access to undefined hostheaders
+
+=cut
+
+sub default : Private {
+	my ( $self, $c ) = @_;
+	
+}
+
+=head2 access_denied
+	accecc_denied for acl
+	message and template set
+=cut
+
+sub access_denied : Private {
+	my ( $self, $c, $action ) = @_;
+
+	unless ( $c->user_exists ) {
+		$c->stash->{error} = 'Access Denied ! Login is required.';
+		$c->stash->{nextPage} = $c->req->action;
+		$c->detach('/auth/login');
+	} else {
+		$c->stash( template  => 'accessDenied.tt') ;
+	}
+}
+
+=head2
+=cut
+
+sub initCMS : Private {
+	my ( $self, $c, $viewState ) = @_;
+	
+	if ( $c->user_exists ) {
+		# set userId in stash
+		$c->{stash}{cms}{userId} = $c->user->get_column('id');
+	}
+
+	#set everyone group current website in stash
+	my $group = $c->model('CmsDB')->resultset('Group')->search({
+		group_name 	=> 'Everyone',
+		Website_id	=> $c->{stash}{cms}{website}->{website_id} ,
+	});	
+	if ( $group->first ){
+		$c->{stash}{cms}{everyoneGroupId} = $group->first->id;
+	}
+	###### set default skin name in stash varible ######
+	my $rsWebsite  = $c->model('CmsDB')->resultset('Skin')->find( $c->{stash}{cms}{website}{default_skin_id} );
+	$c->{stash}{cms}{website}{default_skin_name} =  $rsWebsite->file_name;
+	my @viewState = @{ $c->config->{general}->{statuses} };	
+#	$c->log->dumper( \@viewState  );
+
+	########## check state is valid value ? ########
+	my $viewStateIsValid = 0;
+	foreach my $viewStateItem( @viewState ){
+		my %value = %{$viewStateItem};
+		if( $viewState && $viewState eq  $value{title} ){
+			$viewStateIsValid = 1;
+		}	
+	}
+
+	######## Set viewState in stash and session #######
+	if ( $viewState and $viewStateIsValid ){
+#		$c->log->info("value set in stash and session");
+		$c->{stash}{cms}{website}{viewState} = $viewState;
+		$c->session->{viewState} = $viewState;
+	}
+
+	######## Set root category id in stash #######
+	my $rootCat = $c->forward( '/core/category/getRootCat', [] );
+	$c->{stash}{cms}{rootCatId} = $rootCat->{id};
+	$c->{stash}{cms}{website}{default_page_id} = $rootCat->{default_page_id};
+
+	######## Set current language id in stash and session #######
+	$c->{stash}{cms}{currentLanguageId} = 'en'; # TODO: must be set
+	$c->session->{currentLanguageId} = 'en';
+
+#	$c->log->dumper($c->{stash}{cms});
+}
+
+
+=head2 end
+
+Attempt to render a view, if needed.
+
+=cut 
+
+sub end : ActionClass('RenderView') {}
+
+=head1 AUTHOR
+
+Davood Firoozian
+
+
+=head1 LICENSE
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+
+1;

Added: trunk/OzinoCMS/lib/cms/Controller/_Modules/HTMLArea.pm
===================================================================
--- trunk/OzinoCMS/lib/cms/Controller/_Modules/HTMLArea.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/cms/Controller/_Modules/HTMLArea.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,122 @@
+package cms::Controller::_Modules::HTMLArea;
+
+use strict;
+use warnings;
+use base 'Catalyst::Controller';
+
+=head1 NAME
+
+cms::Controller::_Modules::HelloWorld - Catalyst Controller
+
+=head1 DESCRIPTION
+
+Catalyst Controller.
+
+=head1 METHODS
+
+=cut
+
+
+=head2 index 
+	this action is used to get a default description about the module
+=cut
+
+    my $version = 0.1;
+    my $name = "HTMLArea";
+    my $description= "The Module for Ozino CMS Engine";
+
+sub index : Private {
+	my ( $self, $c ) = @_;
+
+	$c->response->body("Module Name: $name<br />\nModule Description: $description<br />\nModule Version: $version<br />\n");
+}
+
+=head2 getContent 
+	default content extractor action, this action will be called by CMS Core Engine
+	Params: 
+		$mode: 1=Edit View=0 
+		Attention, if this method returns 0 in edit mode, CMS will try to handle edit mode
+		@params: Params From Database
+=cut
+
+sub getContent : Private {
+	my ( $self, $c, $mode, $params ) = @_;
+	return 0 if ( $mode ); 
+	my %params = %{ $params };
+	my $gizmoContent = $params{HTML};
+	return $gizmoContent;
+}
+
+=head2
+
+=cut
+
+sub saveContent : Private {
+	my ( $self, $c, @params ) = @_;
+	
+}
+
+=head2 getConfig 
+=cut
+
+sub getConfig : Private {
+	my ( $self, $c ) = @_;
+
+	my %config = (
+		version => $version,
+		name => $name,
+		description => $description,
+		fields => [
+			{
+				name  => 'HelloName',
+				type   => 'text',
+				label  => 'Description',
+				desc  => 'This is a description',
+			},
+			{
+				name  => 'HelloSelection',
+				type   => 'select',
+				label  => 'Select Label',
+				desc  => 'This is a select',
+				options => [
+					{
+						optionLabel => 'Option One',
+						optionValue => 'op1',
+						optionType => 'option', # optional 
+					},
+					{
+						optionLabel => 'Option Two',
+						optionValue => 'op2',
+						optionType => 'optionGroup',
+					},
+					{
+						optionLabel => 'Option Three',
+						optionValue => 'op3',
+						optionType => 'option',
+						selected => 1,
+					},
+					{
+						optionLabel => 'Option Four',
+						optionValue => 'op4',
+						optionType => 'closeOptionGroup',
+					},
+				],
+			},
+		]
+	);
+	
+	return \%config;
+}
+
+=head1 AUTHOR
+
+Davood Firoozian
+
+=head1 LICENSE
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+
+1;

Added: trunk/OzinoCMS/lib/cms/Controller/_Modules/HelloWorld.pm
===================================================================
--- trunk/OzinoCMS/lib/cms/Controller/_Modules/HelloWorld.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/cms/Controller/_Modules/HelloWorld.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,120 @@
+package cms::Controller::_Modules::HelloWorld;
+
+use strict;
+use warnings;
+use base 'Catalyst::Controller';
+
+=head1 NAME
+
+cms::Controller::_Modules::HelloWorld - Catalyst Controller
+
+=head1 DESCRIPTION
+
+Catalyst Controller.
+
+=head1 METHODS
+
+=cut
+
+
+=head2 index 
+	this action is used to get a default description about the module
+=cut
+
+    my $version = 0.1;
+    my $name = "HelloWorld";
+    my $description= "The HelloWorld Module for Ozino CMS Engine";
+
+sub index : Private {
+	my ( $self, $c ) = @_;
+
+	$c->response->body("Module Name: $name<br />\nModule Description: $description<br />\nModule Version: $version<br />\n");
+}
+
+=head2 getContent 
+	default content extractor action, this action will be called by CMS Core Engine
+	Params: 
+		$mode: 1=Edit View=0 
+		@params: Params From Database
+=cut
+
+sub getContent : Private {
+	my ( $self, $c, $mode, $params ) = @_;
+	return 0 if ( $mode ); 
+	my %params = %{ $params };
+	my $gizmoContent = "Hello " . $params{name} . " " . $params{family} . "<br />This is gizmo test<br />Iam a gizmo.My name is " .  $params{gizmoName};
+	return $gizmoContent;
+}
+
+=head2
+=cut
+
+sub saveContent : Private {
+	my ( $self, $c, @params ) = @_;
+	
+}
+
+=head2 getConfig 
+=cut
+
+sub getConfig : Private {
+	my ( $self, $c ) = @_;
+
+	my %config = (
+		version => $version,
+		name => $name,
+		description => $description,
+		fields => [
+			{
+				name  => 'HelloName',
+				type   => 'text',
+				label  => 'Description',
+				desc  => 'This is a description',
+			},
+			{
+				name  => 'HelloSelection',
+				type   => 'select',
+				label  => 'Select Label',
+				desc  => 'This is a select',
+				options => [
+					{
+						optionLabel => 'Option One',
+						optionValue => 'op1',
+						optionType => 'option', # optional 
+					},
+					{
+						optionLabel => 'Option Two',
+						optionValue => 'op2',
+						optionType => 'optionGroup',
+					},
+					{
+						optionLabel => 'Option Three',
+						optionValue => 'op3',
+						optionType => 'option',
+						selected => 1,
+					},
+					{
+						optionLabel => 'Option Four',
+						optionValue => 'op4',
+						optionType => 'closeOptionGroup',
+					},
+				],
+			},
+		]
+	);
+	
+	return \%config;
+}
+
+=head1 AUTHOR
+
+Davood Firoozian
+
+=head1 LICENSE
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+
+1;

Added: trunk/OzinoCMS/lib/cms/Controller/_Modules/LatestChange.pm
===================================================================
--- trunk/OzinoCMS/lib/cms/Controller/_Modules/LatestChange.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/cms/Controller/_Modules/LatestChange.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,73 @@
+package cms::Controller::_Modules::LatestChange;
+
+use strict;
+use warnings;
+use base 'Catalyst::Controller';
+
+=head1 NAME
+
+cms::Controller::_Modules::LatestChange - Catalyst Controller
+
+=head1 DESCRIPTION
+
+Catalyst Controller.
+
+=head1 METHODS
+
+=cut
+
+
+=head2 index 
+
+=cut
+
+    my $version = 0.1;
+    my $name = "LatestChange";
+    my $description= "Latest Page Change Module";
+
+
+sub index : Private {
+	my ( $self, $c ) = @_;
+	$c->response->body("Module Name: $name<br />\nModule Description: $description<br />\nModule Version: $version<br />\n");
+}
+
+
+=head2 getContent 
+
+=cut
+
+sub getContent : Private {
+	my ( $self, $c, $mode, $params ) = @_;
+	return 0 if ( $mode ); 
+	return $c->{stash}{cms}{website}{'website_last_modified'};
+}
+
+
+
+=head2 getConfig 
+=cut
+
+sub getConfig : Private {
+	my ( $self, $c ) = @_;
+	my %config = (
+		version => $version,
+		name => $name,
+		description => $description,
+		fields => [ ],
+	);
+	
+	return \%config;
+}
+
+=head1 AUTHOR
+
+Davood Firoozian
+
+=head1 LICENSE
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+
+1;

Added: trunk/OzinoCMS/lib/cms/Controller/_Modules/Navigator.pm
===================================================================
--- trunk/OzinoCMS/lib/cms/Controller/_Modules/Navigator.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/cms/Controller/_Modules/Navigator.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,172 @@
+package cms::Controller::_Modules::Navigator;
+
+use strict;
+use warnings;
+use base 'Catalyst::Controller';
+
+=head1 NAME
+
+cms::Controller::_Modules::Navigator - Catalyst Controller
+
+=head1 DESCRIPTION
+
+Catalyst Controller.
+
+=head1 METHODS
+
+=cut
+
+
+my $version = 0.1;
+my $name = "Navigator";
+my $description= "Module to manage use of navigation(s) in site.";
+
+=head2 index 
+	this action is used to get a default description about the module
+=cut
+
+sub index : Private {
+	my ( $self, $c ) = @_;
+
+	$c->response->body("Module Name: $name<br />\nModule Description: $description<br />\nModule Version: $version<br />\n");
+}
+
+=head2 getContent 
+
+	default content extractor action, this action will be called by CMS Core Engine
+	Params: 
+		$mode: 1=Edit 0=View
+		Attention, if this method returns 0 in edit mode, CMS will try to handle edit mode
+		@params: Params From Database
+
+=cut
+
+sub getContent : Private {
+	my ( $self, $c, $mode, $params ) = @_;
+	my %params = %{ $params };
+
+#	$c->log->dumper(\%params);
+#	$c->log->info($c->stash->{pageId});
+
+	my $gizmoContent;
+
+	if ( $mode ) { # Custom edit mode
+		my $websiteId = $c->{stash}{cms}{website}->{website_id};
+		my %selectField = (
+			name	=> 'navigation',
+			type	=> 'select',
+			label	=> 'Navigation',
+			desc	=> 'Select a navigation from the list to put in your website.',
+			options	=> [],
+		);
+
+		my $nav = $c->model('CmsDB')->resultset('Navigation')->search({
+				website_id	=> $websiteId,
+			});
+		while (my $res = $nav->next ) {
+			push @{ $selectField{options} }, {
+				optionLabel => $res->nav_name,
+				optionValue => $res->id,
+			};
+		}
+
+		return { 
+			fields	=> [ \%selectField ],
+			values	=> {
+				navigation	=> $params{navigation},
+			}
+		};
+	} else {
+		my $nav;
+		my @list;
+		my $tmpGizmoContent = '';
+		
+		if ($params{navigation}) {
+			$nav = $c->forward( '/core/navigation/get', [ $params{navigation} ]);
+			if (ref($nav) eq 'HASH') {
+				$nav->{nav_detail} = YAML::Load($nav->{nav_detail});
+
+				for ( @{ $nav->{nav_detail} } ) {
+					my $tmpList;
+
+					if ( $_->{type} == 1 || $_->{type} == 2 ) {
+						$tmpList = $c->forward( '/core/navigation/processItem', [ $_ ] );
+					} else {
+						$_->{id} = $c->stash->{pageId};
+						$tmpList = $c->forward( '/core/navigation/processItem', [ $_ ] );
+					}
+
+					if ( ref($tmpList) eq 'ARRAY' ) {
+						if ( $_->{type} == 3 ) {
+							$c->stash(
+								navId		=> $params{navigation},
+								toHereList	=> 1,
+								catPageList	=> $tmpList,
+								herePageId	=> $c->stash->{pageId},
+								separator	=> $_->{separator},
+							);
+							$tmpGizmoContent .= $c->view('TT')->render( $c, 'core/navigation/resultList.tt');
+						} else {
+							push @list, @{ $tmpList };
+						}
+					} else {
+						push @list, $tmpList if $tmpList;
+					}
+				}
+
+#				$c->log->dumper(\@list);
+
+				$c->stash(
+					navId			=> $params{navigation},
+					showIsNormalList	=> 1,
+					catPageList		=> \@list,
+				);
+				$gizmoContent = $c->view('TT')->render( $c, 'core/navigation/resultList.tt');
+			} else {
+				$gizmoContent = $c->localize($nav);
+			}
+		}
+
+		return $gizmoContent . $tmpGizmoContent;
+	}
+}
+
+=head2 saveContent
+
+=cut
+
+sub saveContent : Private {
+	my ( $self, $c, @params ) = @_;
+	
+}
+
+=head2 getConfig 
+
+=cut
+
+sub getConfig : Private {
+	my ( $self, $c ) = @_;
+
+	my %config = (
+		version => $version,
+		name => $name,
+		description => $description,
+		fields => [],
+	);
+
+	return \%config;
+}
+
+
+=head1 AUTHOR
+
+Omid Houshyar
+
+=head1 LICENSE
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+
+1;

Added: trunk/OzinoCMS/lib/cms/Controller/_Modules/ShowProductList.pm
===================================================================
--- trunk/OzinoCMS/lib/cms/Controller/_Modules/ShowProductList.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/cms/Controller/_Modules/ShowProductList.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,154 @@
+package cms::Controller::_Modules::ShowProductList;
+
+use strict;
+use warnings;
+use base 'Catalyst::Controller';
+
+=head1 NAME
+
+cms::Controller::_Modules::ShowProductList - Catalyst Controller
+
+=head1 DESCRIPTION
+
+Catalyst Controller.
+
+=head1 METHODS
+
+=cut
+
+
+    my $version = 0.1;
+    my $name = "ShowProductList";
+    my $description= "The Module show list of Products";
+
+=head2 index 
+
+=cut
+
+sub index : Private {
+    my ( $self, $c ) = @_;
+
+    $c->response->body('Matched cms::Controller::_Modules::ShowProductList in _Modules::ShowProductList.');
+}
+
+
+=head2
+	
+=cut
+
+sub getContent : Private {
+	my ( $self, $c, $mode, $params ) = @_;
+	
+	my %bodyParams = %{ $c->req->parameters };
+	my %config = %{$params} if $params;
+	my $gizmoContent;
+#	$c->model('CmsDB')->storage->debug( 1 );
+	################################################
+	# get params
+	################################################
+	my $orderBy =  $bodyParams{orderBy}?$bodyParams{orderBy}:'datetime';
+	my $orderType =  $bodyParams{orderType}; 
+	my $page = $bodyParams{page}?$bodyParams{page}:1;
+	
+	return 0 if ( $mode ); 
+	my $numProductPerPage = $c->req->param('NumProductPerPage');
+	#########################################
+	# geting num products
+	#########################################
+	my $productsListAll = $c->model('CmsDB')->resultset('ProductLang')->search({
+		'product_id.website_id'=> $c->{stash}{cms}{website}{website_id},
+		'language_id'		=> $c->{stash}{cms}{currentLanguageId},
+	},{
+		prefetch	=>  [ { 'product_id' => 'website_id' } ],
+	});
+
+
+	my $productsList = $c->model('CmsDB')->resultset('ProductLang')->search({
+		'product_id.website_id'=> $c->{stash}{cms}{website}{website_id},
+		'language_id'		=> $c->{stash}{cms}{currentLanguageId},
+	},{
+		rows		=> $config{NumProductPerPage},
+		page		=> $page,
+		order_by	=> \" $orderBy   $orderType",
+		prefetch	=>  [ { 'product_id' => 'website_id' }, 'language_id', { 'product_id'  => 'category_id' },  {'product_id'  => 'image_id'},  ],
+	});
+	#### send some needed info to TT
+	$c->stash->{page} = $page;
+	$c->stash->{orderType} = $orderType;
+	$c->stash->{orderBy} = $orderBy;
+	$c->stash->{numProducts} = $productsList->count;
+	if ( $config{NumProductPerPage}  ){
+		$c->stash->{numProductPerPage} = $config{NumProductPerPage};		
+	}else{
+		$c->stash->{numProductPerPage} = 5;		
+	}
+	if ( $productsListAll->count  ){
+		$c->stash->{numPages} = int( $productsListAll->count / $c->stash->{numProductPerPage} ) + 1;
+	}
+	####Process header of table
+	$gizmoContent = $c->view('TT')->render($c,'_modules/ShowProductList/header.tt'); 	
+	foreach  ( $productsList->all  ){
+		$c->stash->{ productTitle } = $_->title;
+		$c->stash->{ productDesc } = $_->description;
+		$c->stash->{ productGroup } = $_->product_id->category_id->title;
+		$c->stash->{ imageId } = $_->product_id->image_id->id ;
+		$c->stash->{ imageExt } = $_->product_id->image_id->ext;
+		
+		$gizmoContent = $gizmoContent . $c->view('TT')->render($c,'_modules/ShowProductList/row.tt'); 	
+
+	}
+	$gizmoContent = $gizmoContent . $c->view('TT')->render($c,'_modules/ShowProductList/footer.tt'); 	
+	####Process footer of table
+	
+#	$c->log->info( $gizmoContent );
+	return $gizmoContent;
+	
+	
+}
+
+=head2
+	
+=cut
+
+sub saveContent : Private {
+	my ( $self, $c, @params ) = @_;
+	
+}
+
+=head2 getConfig 
+=cut
+
+sub getConfig : Private {
+	my ( $self, $c ) = @_;
+
+	my %config = (
+		version => $version,
+		name => $name,
+		description => $description,
+		fields => [
+			{
+				name  => 'NumProductPerPage',
+				type   => 'text',
+				label  => 'Number products per page',
+				desc  => 'Number products per page',
+			},
+		]
+	);
+	
+	return \%config;
+}
+
+
+
+=head1 AUTHOR
+
+root
+
+=head1 LICENSE
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+
+1;

Added: trunk/OzinoCMS/lib/cms/Controller/_Modules/ViewProduct.pm
===================================================================
--- trunk/OzinoCMS/lib/cms/Controller/_Modules/ViewProduct.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/cms/Controller/_Modules/ViewProduct.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,161 @@
+package cms::Controller::_Modules::ViewProduct;
+
+use strict;
+use warnings;
+use base 'Catalyst::Controller';
+
+=head1 NAME
+
+cms::Controller::_Modules::viewProduct - Catalyst Controller
+
+=head1 DESCRIPTION
+
+Catalyst Controller.
+
+=head1 METHODS
+
+=cut
+
+    my $version = 0.1;
+    my $name = "ViewProduct";
+    my $description= "The Module display one product. You can choose method of display.";
+
+=head2 index 
+
+=cut
+
+sub index : Private {
+    my ( $self, $c ) = @_;
+
+    $c->response->body('Matched cms::Controller::_Modules::viewProduct in _Modules::viewProduct.');
+}
+
+
+=head2
+	
+=cut
+
+sub saveContent : Private {
+	my ( $self, $c, @params ) = @_;
+	
+}
+
+=head2 getConfig 
+=cut
+
+sub getConfig : Private {
+	my ( $self, $c ) = @_;
+
+	my %config = (
+		version => $version,
+		name => $name,
+		description => $description,
+		## displaMethod specify method of display. latest product= 0, random product = 1 
+		
+		fields => [
+			{
+				name  => 'displayMethod', 
+				type   => 'select',
+				label  => 'Display Method',
+				desc  => 'Select Display method',
+				options => [
+					{
+						optionLabel => 'Latest product',
+						optionValue => '0',
+						optionType => 'option', # optional 
+					},
+					{
+						optionLabel => 'Random product',
+						optionValue => '1',
+						optionType => 'option', # optional 
+					},
+				],
+			},
+		]
+	);
+	
+	return \%config;
+}
+
+
+=head2
+	return html of product	
+=cut
+
+sub getContent : Local {
+	my ( $self, $c, $mode, $params ) = @_;
+	
+	my %config = %{$params} if $params;
+	my $gizmoContent;
+	my $displayMethod = $config{displayMethod};
+	my $product;
+#	$c->model('CmsDB')->storage->debug( 1 );
+	
+	return 0 if ( $mode ); 
+	
+	if ( $displayMethod ){
+		# random product 
+		my @products = $c->model('CmsDB')->resultset('ProductLang')->search({
+			'product_id.website_id'=> $c->{stash}{cms}{website}{website_id},
+			'language_id'		=> $c->{stash}{cms}{currentLanguageId},
+		},{
+			rows		=> $config{NumProductPerPage},
+			prefetch	=>  [ { 'product_id' => 'website_id' }, 'language_id', { 'product_id'  => 'category_id' },  {'product_id'  => 'image_id'},  ],
+		});
+		my $rndNumber = int ( rand( scalar  @products   )  + 0  );
+		if ( scalar  @products  ){
+			$product = $products[ $rndNumber ];
+		}
+	}else{
+		# latest product
+		$product = $c->model('CmsDB')->resultset('ProductLang')->search({
+			'product_id.website_id'=> $c->{stash}{cms}{website}{website_id},
+			'language_id'		=> $c->{stash}{cms}{currentLanguageId},
+		},{
+			rows		=> $config{NumProductPerPage},
+			order_by	=> \'product_id.id DESC',
+			prefetch	=>  [ { 'product_id' => 'website_id' }, 'language_id', { 'product_id'  => 'category_id' },  {'product_id'  => 'image_id'},  ],
+		});
+		
+		if ( 	$product->count  ){
+			$product = $product->first;
+		}
+	}
+	
+	
+	####Process header of table
+	$gizmoContent = $c->view('TT')->render($c,'_modules/ViewProduct/header.tt'); 	
+	$c->stash->{ productTitle } = $product->title;
+	$c->stash->{ productDesc } = $product->description;
+	$c->stash->{ productGroup } = $product->product_id->category_id->title;
+	$c->stash->{ imageId } = $product->product_id->image_id->id;
+	$c->stash->{ imageExt } = $product->product_id->image_id->ext;
+	
+	$c->stash->{numProducts} = 1 if ($product);
+	#### Process main content
+	$gizmoContent = $gizmoContent . $c->view('TT')->render($c,'_modules/ViewProduct/row.tt'); 	
+	####Process footer of table
+	$gizmoContent = $gizmoContent . $c->view('TT')->render($c,'_modules/ViewProduct/footer.tt'); 	
+	
+#	$c->log->info( $gizmoContent );
+	
+	return $gizmoContent;
+	
+	
+}
+
+
+
+
+=head1 AUTHOR
+
+root
+
+=head1 LICENSE
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+
+1;

Added: trunk/OzinoCMS/lib/cms/Controller/_Modules.pm
===================================================================
--- trunk/OzinoCMS/lib/cms/Controller/_Modules.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/cms/Controller/_Modules.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,42 @@
+package cms::Controller::_Modules;
+
+use strict;
+use warnings;
+use base 'Catalyst::Controller';
+
+=head1 NAME
+
+cms::Controller::_Modules - Catalyst Controller
+
+=head1 DESCRIPTION
+
+Catalyst Controller.
+
+=head1 METHODS
+
+=cut
+
+
+=head2 index 
+
+=cut
+
+sub index : Private {
+    my ( $self, $c ) = @_;
+
+    $c->response->body('Matched cms::Controller::_Modules in _Modules.');
+}
+
+
+=head1 AUTHOR
+
+Omid Houshyar
+
+=head1 LICENSE
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+
+1;

Added: trunk/OzinoCMS/lib/cms/Controller/cms.pm
===================================================================
--- trunk/OzinoCMS/lib/cms/Controller/cms.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/cms/Controller/cms.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,41 @@
+package cms::Controller::cms;
+
+use strict;
+use warnings;
+use base 'Catalyst::Controller';
+
+=head1 NAME
+
+cms::Controller::cms - Catalyst Controller
+
+=head1 DESCRIPTION
+
+Catalyst Controller.
+
+=head1 METHODS
+
+=cut
+
+
+=head2 index 
+
+=cut
+
+sub index : Private {
+    my ( $self, $c ) = @_;
+    $c->response->body('Matched cms::Controller::cms in cms.');
+}
+
+
+=head1 AUTHOR
+
+Davood Firoozian
+
+=head1 LICENSE
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+
+1;

Added: trunk/OzinoCMS/lib/cms/Model/CmsDB.pm
===================================================================
--- trunk/OzinoCMS/lib/cms/Model/CmsDB.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/cms/Model/CmsDB.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,39 @@
+package cms::Model::CmsDB;
+
+use strict;
+use base 'Catalyst::Model::DBIC::Schema';
+
+__PACKAGE__->config(
+    schema_class => 'CmsDB',
+    connect_info => [
+        'dbi:mysql:dbname=cms:host=21.21.21.3',
+        'dummy',
+        'monaliza',
+        {quote_char => '`', name_sep => '.' },
+        
+    ],
+);
+
+=head1 NAME
+
+cms::Model::CmsDB - Catalyst DBIC Schema Model
+=head1 SYNOPSIS
+
+See L<cms>
+
+=head1 DESCRIPTION
+
+L<Catalyst::Model::DBIC::Schema> Model using schema L<CmsDB>
+
+=head1 AUTHOR
+
+Davood Firoozian
+
+=head1 LICENSE
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+
+1;

Added: trunk/OzinoCMS/lib/cms/View/TT.pm
===================================================================
--- trunk/OzinoCMS/lib/cms/View/TT.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/cms/View/TT.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,32 @@
+package cms::View::TT;
+
+use strict;
+use base 'Catalyst::View::TT';
+
+#__PACKAGE__->config(TEMPLATE_EXTENSION => '.tt', INCLUDE_PATH => jamstonepars->path_to('root').':' . jamstonepars->path_to('root/image') . ':' . jamstonepars->path_to('root/module') );
+
+
+=head1 NAME
+
+cms::View::TT - Catalyst TT View
+
+=head1 SYNOPSIS
+
+See L<cms>
+
+=head1 DESCRIPTION
+
+Catalyst TT View.
+
+=head1 AUTHOR
+
+Davood Firoozian
+
+=head1 LICENSE
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+
+1;

Added: trunk/OzinoCMS/lib/cms.pm
===================================================================
--- trunk/OzinoCMS/lib/cms.pm	                        (rev 0)
+++ trunk/OzinoCMS/lib/cms.pm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,97 @@
+package cms;
+
+use strict;
+use warnings;
+
+use Catalyst::Runtime '5.70';
+
+# Set flags and add plugins for the application
+#
+#         -Debug: activates the debug mode for very useful log messages
+#   ConfigLoader: will load the configuration from a YAML file in the
+#                 application's home directory
+# Static::Simple: will serve static files from the application's root 
+#                 directory
+
+use Catalyst qw/-Debug
+		ConfigLoader
+		Dumper	
+		Prototype
+		Static::Simple
+                Authentication
+                Authentication::Store::DBIC
+                Authentication::Credential::Password
+                Authorization::Roles
+                Authorization::ACL
+                Session
+                Session::Store::FastMmap
+                Session::State::Cookie
+		FormValidator::Simple
+		I18N
+		Email
+		StackTrace
+		Cache::FastMmap 
+		UploadProgress/;
+
+our $VERSION = '0.01';
+
+# Configure the application. 
+#
+# Note that settings in cms.yml (or other external
+# configuration file that you set up manually) take precedence
+# over this when using ConfigLoader. Thus configuration
+# details given here can function as a default configuration,
+# with a external configuration file acting as an override for
+# local deployment.
+
+
+# Start the application
+__PACKAGE__->setup;
+
+=head2 ACL Roles
+=cut
+
+__PACKAGE__->deny_access_unless( "/admin/root", [qw/admin/] );
+__PACKAGE__->deny_access_unless( "/admin/website", [qw/websiteadmin/] );
+__PACKAGE__->deny_access_unless( "/admin/reseller", [qw/reseller/] );
+
+
+__PACKAGE__->allow_access_if( "/admin", [qw/reseller/] );
+__PACKAGE__->allow_access_if( "/admin", [qw/websiteadmin/] );
+__PACKAGE__->allow_access_if( "/admin", [qw/admin/] );
+
+__PACKAGE__->deny_access( "/admin");
+
+
+=head1 NAME
+
+cms - Catalyst based application
+
+=head1 SYNOPSIS
+
+    script/cms_server.pl
+
+=head1 DESCRIPTION
+
+[enter your description here]
+
+=head1 SEE ALSO
+
+L<cms::Controller::Root>, L<Catalyst>
+
+=head1 AUTHOR
+
+Davood Firoozian
+
+Omid Houshyar
+
+Reza Sadegh-zade
+
+=head1 LICENSE
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+
+1;

Added: trunk/OzinoCMS/messages/messages.yml
===================================================================
--- trunk/OzinoCMS/messages/messages.yml	                        (rev 0)
+++ trunk/OzinoCMS/messages/messages.yml	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1 @@
+DEAFAULT:

Added: trunk/OzinoCMS/root/_modules/HTMLArea/index.tt
===================================================================
--- trunk/OzinoCMS/root/_modules/HTMLArea/index.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/_modules/HTMLArea/index.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1 @@
+[% gizmoContent %]

Added: trunk/OzinoCMS/root/_modules/HelloWorld/index.tt
===================================================================
--- trunk/OzinoCMS/root/_modules/HelloWorld/index.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/_modules/HelloWorld/index.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1 @@
+[% gizmoContent %]

Added: trunk/OzinoCMS/root/_modules/ShowProductList/footer.tt
===================================================================
--- trunk/OzinoCMS/root/_modules/ShowProductList/footer.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/_modules/ShowProductList/footer.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,33 @@
+			<tr>
+			<td>
+				[% prePage  = page - 1 %]
+				[% nxtPage  = page + 1 %]
+				[% totalPage = numPages %]
+				[% IF  (totalPage - 1 ) *   numProductPerPage  == totalPage  %][% totalPage  =  totalPage  - 1 %][% END %]
+				
+				[% IF  prePage >= 1 %]
+					[% updaterUrl = c.req.base _ "_getGizmoContent/" _ gizmoId  _ "/0?orderBy=" _ orderBy _ "&page="_  prePage _"&orderType=" _ orderType %]
+					[% updaterContainer = 'productListArea' %]
+					[% updaterContent = "<img src='" _ c.req.base  _ "static/images/icon/back.gif' border='0px' alt='Back' name='Back' title='Back' />" %]		
+					[% INCLUDE modules/ajaxupdater.tt %]
+				[% ELSE %]
+					<img src="[% c.req.base %]static/images/icon/back.gif" border="0px" alt="Back" name="Back" title="Back" />
+				[% END %]
+
+			</td>
+			<td>
+				
+				[% IF  totalPage  > nxtPage %]
+					[% updaterUrl = c.req.base _ "_getGizmoContent/" _ gizmoId  _ "/0?orderBy=" _ orderBy _ "&page="_  nxtPage _"&orderType=" _ orderType %]
+					[% updaterContainer = 'productListArea' %]
+					[% updaterContent = "<img align='right' src='" _ c.req.base  _ "static/images/icon/next.gif' border='0px' alt='Next' name='Next' title='Next' />" %]		
+					[% INCLUDE modules/ajaxupdater.tt %]
+				[% ELSE %]
+					<img src="[% c.req.base %]static/images/icon/next.gif" align="right" border="0px" alt="Next" name="Next" title="Next" />
+				[% END %]
+					
+			</td>
+		</tr>
+	</table>
+
	<p class="productTableTitle" align="center">You Are Viewing Page no.[% page %]</p>
+</div>

Added: trunk/OzinoCMS/root/_modules/ShowProductList/header.tt
===================================================================
--- trunk/OzinoCMS/root/_modules/ShowProductList/header.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/_modules/ShowProductList/header.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,12 @@
+<div id="productListArea">
+	<div id="productBar"></div>
+	<p id="productTitle">Products - drug</p>
+
+	<table width="97%">
+		[% IF  ! numProducts %]
+			<tr>
+				<td colspan="2">
+					[% c.localize('No product found. ') %]	
+				</td>
+			</tr>
+		[% END %]

Added: trunk/OzinoCMS/root/_modules/ShowProductList/row.tt
===================================================================
--- trunk/OzinoCMS/root/_modules/ShowProductList/row.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/_modules/ShowProductList/row.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,22 @@
+ <tr >
+    <td class="img1" align="center" valign="middle">
+		<div align="center">
+		<a rel="lightbox[tpiProduct]" href="[% c.req.base %]static/webfiles/website_[% cms.website.website_id %]/[% imageId %].[%  imageExt %]" >
+			<img border="none" src="[% c.req.base %]static/webfiles/website_[% cms.website.website_id %]/[% imageId %]_100px.[% imageExt %]"  />
+		</a>
+		</div>
+    </td>
+    <td class="nameDescription">
+		<table width="100%" height="93px" border="0" cellspacing="0" cellpadding="0">
+		  <tr>
+			<td class="name" width="50%" height="100%">
+				<p>[% productTitle %]</p>
+				<p>[% productGroup %]</p>
+			</td>
+			<td class="description">
+				<p>[% productDesc %]</p>
+			</td>
+		  </tr>
+		</table>
+	</td>
+  </tr>

Added: trunk/OzinoCMS/root/accessDenied.tt
===================================================================
--- trunk/OzinoCMS/root/accessDenied.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/accessDenied.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,3 @@
+
+<font color"red"> Access Denied ... </font> 
+

Added: trunk/OzinoCMS/root/admin/category/addedit.tt
===================================================================
--- trunk/OzinoCMS/root/admin/category/addedit.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/admin/category/addedit.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,123 @@
+[% subMenu = "website" %]
+[% activeMenu = 'website' %]
+[% INCLUDE admin/header.tt %]
+
+<div id="contentArea">
+	[% IF isAdd %]
+		<form name="new_cat" method="post" action="[% c.uri_for('doAdd') %]">
+			[% INCLUDE addWidget %]
+	[% ELSIF isEdit %]
+			[% INCLUDE editWidget %]
+	[% END %]
+	</form>
+</div>
+
+[% INCLUDE admin/footer.tt %]
+
+[% BLOCK addWidget %]
+
+	<div id="addCategoryheader">
+		<div id="line">New Category</div>
+	</div>
+	[% INCLUDE modules/showErrorInput.tt %]
+	<br />	
+	<div id="someMargin">[% c.localize('Fields marked with an asterisk * are required') %].</div>
+	<br />
+	<table>
+		<tr>
+			<td colspan="4" align="left" class="title">[% c.localize('Category Information') %]</td>
+		</tr>
+		<tr>
+			<td align="right">[% c.localize('Language') %] :</td>
+			<td>[% languageTitle %]</td>
+			<td align="right">[% c.localize('Description') %] :</td>
+			<td rowspan="4"><textarea name="description" cols=40 rows=6>[% formData.description %]</textarea></td>
+		</tr>
+		<tr>
+			<td align="right">* [% c.localize('Title') %] :</td> 
+			<td><input type="text" name="title" value="[% categoryData.first.get_column('title') %]" ></td>
+		</tr>
+		<tr>
+			<td align="right">[% c.localize('Parent') %] :</td>
+			<td>[% showCatIsSelectBox = 1 %][% INCLUDE admin/category/catsList.tt%]</td>
+		</tr>
+		<tr>
+			<td align="right">[% c.localize('Order') %] :</td>
+			<td><div id="orderArea">[% INCLUDE admin/category/orderList.tt %]</div></td>
+		</tr>
+		<tr>
+			<td align="right">[% c.localize('Skin') %] :</td>
+			<td>[% showSkinIsSelectBox = 1 %][% INCLUDE modules/skinList.tt %]</td>
+		</tr>
+		<tr>
+			<td colspan="4" align="left" class="title">[% c.localize('Permissions') %]</td>
+		</tr>
+		<tr>
+			[% multSelGroupUserNameVal = 'viewPermission' %]
+			<td align="right" valign="top">[% c.localize('View') %] :</td>
+			<td>[% INCLUDE modules/showMulSelGroupsUsers.tt %]</td>
+			[% multSelGroupUserNameVal = 'editPermission' %]
+			<td align="right" valign="top">* [% c.localize('Edit') %] :</td>
+			<td>[% INCLUDE modules/showMulSelGroupsUsers.tt %]</td>
+		</tr>
+		<tr>
+			<td colspan="4" align="left" class="title">[% c.localize('Category Status') %]</td>
+		</tr>
+		<tr>
+			<td align="right">[% c.localize('Status') %] :</td>
+			<td>[% INCLUDE modules/statusList.tt %]</td>
+		</tr>
+		<tr>
+			<td colspan="4"><div id="td_bg"></div></td>			
+			<td colspan="4" align="right">
+				<input type="submit" name="submit" value="[%c.localize('Submit') %]"> 
+				<input type="button" value="[%c.localize('Cancel') %]" onclick="window.location.href='[% c.uri_for('/admin/website/category') %]'">
+			</td>
+		</tr>
+	</table>
+[% END %]
+
+[% BLOCK editWidget %]
+	<div id="showEditCatLangArea">
+		[% INCLUDE admin/category/catLangList.tt %]
+	</div>
+	<form name="edit_cat" method="post" action="[% c.uri_for('doEdit/') _ formData.id %]">
+		<table>
+			<tr>
+				<td align="right">[% c.localize('Parent') %] :</td>
+				<td>[% showCatIsSelectBox = 1 %][% INCLUDE admin/category/catsList.tt%]</td>
+				<td align="right">[% c.localize('Default Page') %] :</td>
+				<td>
+					<select name="default_page_id">
+					[% FOREACH page = pageList %]
+						<option value="[% page.id %]" [% IF page.id == formData.default_page_id %]selected[% END %]>[% page.title %]</option>
+					[% END %]
+					</select>
+				</td>
+			</tr>
+			<tr>
+				<td colspan="4" align="left" class="title">[% c.localize('Permissions') %]</td>
+			</tr>
+			<tr>
+				[% multSelGroupUserNameVal = 'viewPermission' %]
+				<td align="right" valign="top">[% c.localize('View') %] :</td>
+				<td>[% INCLUDE modules/showMulSelGroupsUsers.tt %]</td>
+				[% multSelGroupUserNameVal = 'editPermission' %]
+				<td align="right" valign="top">[% c.localize('Edit') %] :</td>
+				<td>[% INCLUDE modules/showMulSelGroupsUsers.tt %]</td>
+			</tr>
+			<tr>
+				<td colspan="4" align="left" class="title">[% c.localize('Category Status') %]</td>
+			</tr>
+			<tr>
+				<td align="right">[% c.localize('Status') %] :</td>
+				<td colspan="3">[% INCLUDE modules/statusList.tt %]</td>
+			</tr>
+			<tr>
+				<td colspan="4" align="right">
+					<input type="submit" name="submit" value="[%c.localize('Submit') %]"> 
+					<input type="button" value="[%c.localize('Back') %]" onclick="window.location.href='[% c.uri_for('/admin/website/category') %]'">
+				</td>
+			</tr>
+		</table>
+[% END %]

Added: trunk/OzinoCMS/root/admin/category/addeditcatlang.tt
===================================================================
--- trunk/OzinoCMS/root/admin/category/addeditcatlang.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/admin/category/addeditcatlang.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,40 @@
+[% INCLUDE modules/showErrorInput.tt %]
+[% IF isAdd %][% addEditUrl = c.uri_for('/admin/website/category/doAddEditCatLang/') _ formData.catid %][% ELSE %][% addEditUrl = c.uri_for('doAddEditCatLang/') _ formData.catid _ '/' _ formData.catLangId %][% END %]
+[% c.prototype.form_remote_tag({
+	url 		=> addEditUrl,
+	update 		=> 'showEditCatLangArea',
+	evalScripts 	=> 'true',
+}) %]
+<fieldset id="fieldSetProperties"><legend class="title">[% c.localize('Category Language') %]</legend>
+	<table>
+		<tr>
+			<td align="right">[% c.localize('Title') %] :</td> 
+			<td><input type="text" name="title" value="[% formData.title %]" ></td>
+			<td align="right">[% c.localize('Description') %] :</td>
+			<td rowspan="3"><textarea name="description" cols=40 rows=6>[% formData.description %]</textarea></td>
+		</tr>
+		<tr>
+			<td align="right">[% c.localize('Language') %] :</td>
+			<td>
+				[% 
+					showLangIsSelectBox = 1;
+					INCLUDE modules/showLanguages.tt;
+					IF !isAdd AND formData.language_id == cms.website.default_language_id; 
+				%]
+					<input type="hidden" name="language_id" value="[% formData.language_id %]" />
+				[% END %]
+			</td>
+		</tr>
+		<tr>
+			<td align="right">[% c.localize('Skin') %] :</td>
+			<td>[% showSkinIsSelectBox = 1 %][% INCLUDE modules/skinList.tt %]</td>
+		</tr>
+		<tr>
+			<td colspan="4" align="right">
+				<input type="submit" name="submit" value="[% IF isAdd %][% c.localize('Add') %][% ELSE %][% c.localize('Edit') %][% END %]" />
+				<input type="button" name="cancel" value="[% c.localize('Cancel') %]" onclick=" new Ajax.Updater( 'showEditCatLangArea',  '[% c.uri_for('/core/category/showCatLangList/') _ formData.catid %]', { asynchronous: 1,evalScripts: true } ) ; return false" />
+			</td>
+		</tr>
+	</table>
+</form>
+</fieldset>

Added: trunk/OzinoCMS/root/admin/category/catLangList.tt
===================================================================
--- trunk/OzinoCMS/root/admin/category/catLangList.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/admin/category/catLangList.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,42 @@
+	<table width="97%">
+		<tr>
+			<td colspan="4">[% IF message %]<div class="message">[% message %]</div>[% END %][% INCLUDE modules/showErrorInput.tt %]</td>
+		</tr>
+		<tr>
+			<td colspan="4" align="left" class="title">[% c.localize('Category Languages') %]</td>
+		</tr>
+		<tr>
+			<td colspan="4">
+				<table id="categoryLanguage" >
+					<tr align="center">
+						<td>[% c.localize('Title') %]</td>
+						<td>[% c.localize('Description') %]</td>
+						<td>[% c.localize('Language') %]</td>
+						<td>[% c.localize('Default Skin') %]</td>
+						<td>[% c.localize('Actions') %]</td>
+					</tr>
+					[% FOREACH cat = formData.catLang %]
+						<tr>
+							<td align="center">[% cat.title %]</td>
+							<td align="center">[% IF  ! cat.description %]&nbsp;[% ELSE %][% cat.description %][% END %]</td>
+							<td align="center">[% cat.language_id %]</td>
+							<td align="center">[% cat.default_skin_id IF cat.default_skin_id %]</td>
+							<td align="center"><a href="[% c.uri_for('/admin/website/category/addEditCatLang/') _ cat.category_id _ '/' _ cat.id %]" onclick=" new Ajax.Updater( 'showEditCatLangArea', '[% c.uri_for('/admin/website/category/addEditCatLang/') _ cat.category_id _ '/' _ cat.id %]', { asynchronous: 1,evalScripts: true } ) ; return false"><img border="none" src="/static/images/icon/edit.png" alt="Edit" name="Edit" title="Edit" /></a>
+								[% IF cat.language_id != cms.website.default_language_id %] 
+									<a href="[% c.uri_for('/admin/website/category/removeCatLang/') _ cat.category_id _ '/' _ cat.id %]" onclick="if (confirm('Are you sure ?')) { new Ajax.Updater( 'showEditCatLangArea', '[% c.uri_for('/admin/website/category/removeCatLang/') _ cat.category_id _ '/' _ cat.id %]', { asynchronous: 1,evalScripts: true } ) }; return false"><img border="none" src="/static/images/icon/delete.png" alt="Remove" name="Remove" title="Remove" /></a>
+								[% END %]
+							</td>
+						</tr>
+					[% END %]
+					<tr>
+						<td class="noDisplay"></td>
+						<td colspan="3" align="center">
+							<a href="[% c.uri_for('/admin/website/category/addEditCatLang/') _ formData.id %]" onclick=" new Ajax.Updater( 'showEditCatLangArea', '[% c.uri_for('/admin/website/category/addEditCatLang/') _ formData.id %]', { asynchronous: 1,evalScripts: true } ) ; return false"><img border="none" src="/static/images/icon/add.gif" alt="Add" name="Add" title="Add" /></a>
+							[% c.localize('Add a New Language') %]
+						</td>
+						<td class="noDisplay"></td>
+					</tr>
+				</table>
+			</td>
+		</tr>
+	</table>

Added: trunk/OzinoCMS/root/admin/category/catsList.tt
===================================================================
--- trunk/OzinoCMS/root/admin/category/catsList.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/admin/category/catsList.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,47 @@
+[% IF showCatIsSelectBox %]
+	[% INCLUDE selectBoxWidget %]
+[% ELSIF showCatIsNormalList %]
+	[% INCLUDE normalList %]
+[% END %]
+
+[% BLOCK selectBoxWidget %]
+	<select name="parent_id" [% IF isAdd %]onchange="new Ajax.Updater( 'orderArea',  '[% IF isAddPage; c.uri_for('/core/page/getOrderList/'); ELSE; c.uri_for('/core/category/getOrderList/'); END; %]' + this.value, { asynchronous: 1 } ) ; return false;"[% END %] >
+	[% FOREACH cat = catsList %]
+		[% 
+			counter = 1; 
+			WHILE counter < (2 * cat.depth);
+				title = title _ '&nbsp';
+				counter = counter + 1;
+			END; 
+			IF cat.depth;
+				title = title _ ' ' _ cat.title;
+			ELSE;
+				title = cat.title;
+			END 
+		%]
+		<option value="[% cat.id %]" [% IF cat.id == formData.parent_id  or  cat.id  == gizmoCategoryId %]selected[% END %]>[% title %]</option>[% title = '' %]
+	[% END %]
+	</select>
+[% END %]
+
+[% BLOCK normalList %]
+	<center>[% IF message %]<div class="message">[% message %]</div>[% END %]</center>
+	[%
+		firstDepth = catsList.0.depth; 
+		tmpDepth = firstDepth;
+		changeOrderUrl = c.uri_for('/admin/website/category/setCatOrder/');
+	%]
+	<ul>
+	[% FOREACH cat = catsList %]
+		[% IF cat.depth > tmpDepth %]<ul>[% tmpDepth = cat.depth %][% ELSIF cat.depth < tmpDepth%][% counter = 1 %][% WHILE counter <= ( tmpDepth - cat.depth ) %]</ul>[% counter = counter + 1 %][% END %][% tmpDepth = cat.depth %][% END %]
+		<li>[% cat.title %] [% IF cat.title != 'root' %]
+								<a href="[% changeOrderUrl _ cat.id _ '/0' %]" onclick=" new Ajax.Updater( 'contentArea',  '[% changeOrderUrl _ cat.id _ '/0' %]', { asynchronous: 1,evalScripts: true } ) ; return false"><img border="none" src="/static/images/icon/up.png" alt="Up" name="Up" title="Up" /></a>
+								<a href="[% changeOrderUrl _ cat.id _ '/1' %]" onclick=" new Ajax.Updater( 'contentArea',  '[% changeOrderUrl _ cat.id _ '/1' %]', { asynchronous: 1,evalScripts: true } ) ; return false"><img border="none" src="/static/images/icon/down.png" alt="Down" name="Down" title="Down" /></a>
+								<a href="[% c.uri_for('/admin/website/category/edit/') _ cat.id %]"><img border="none" src="/static/images/icon/edit.png" alt="Edit" name="Edit" title="Edit" /></a>									
+								<a href="[% c.uri_for('/admin/website/category/remove/') _ cat.id %]" onclick="if (confirm('Are you sure ?')) {  new Ajax.Updater( 'contentArea',  '[% c.uri_for('/admin/website/category/remove/') _ cat.id %]', { asynchronous: 1,evalScripts: true } ) ; }; return false"><img border="none" src="/static/images/icon/delete.png" alt="Remove" name="Remove" title="Remove" /></a> 		 
+							[% END %]
+		</li>
+	[% END %]
+	[% counter = firstDepth + 1 %][% WHILE counter <= tmpDepth %]</ul>[% counter = counter + 1 %][% END %]
+	</ul>
+[% END %]

Added: trunk/OzinoCMS/root/admin/category/default.tt
===================================================================
--- trunk/OzinoCMS/root/admin/category/default.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/admin/category/default.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,15 @@
+[% subMenu = "website" %]
+[% activeMenu = 'website' %]
+[% INCLUDE admin/header.tt %]
+
+<div id="addCategoryheader">
+	<div id="line_">
+	<div style="float: left">[% c.localize('Category') %]</div>
+		<a href="[% c.uri_for('add') %]" style="float: right" >[% c.localize('New Category') %]</a>
+	</div>
+</div>
+	<div id="contentArea">
+		[% showCatIsNormalList = 1 %][% INCLUDE admin/category/catsList.tt%]
+	</div> 
+
+[% INCLUDE admin/footer.tt %]

Added: trunk/OzinoCMS/root/admin/category/orderList.tt
===================================================================
--- trunk/OzinoCMS/root/admin/category/orderList.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/admin/category/orderList.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,7 @@
+<select name="order">
+	<option value="-1">--- Order ---</option>
+[% FOREACH cat = orderList %]
+	<option value="[% cat.catOrderId %]" [% IF cat.catOrderId == formData.order %]selected[% END %]>[% cat.catTitle %]</option>
+[% END %]
+</select>
+

Added: trunk/OzinoCMS/root/admin/common.tt
===================================================================
--- trunk/OzinoCMS/root/admin/common.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/admin/common.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,16 @@
+[% subMenu = "website" %]
+[% activeMenu = 'website' %]
+[% INCLUDE admin/header.tt %]
+
+[% IF title %]
+	<div id="addCategoryheader">
+		<div id="line_">
+			<div style="float: left">[% c.localize(title) %]</div>
+		</div>
+	</div>
+[% END %]
+	<div id="contentArea">
+		[% content %]
+	</div> 
+	
+[% INCLUDE admin/footer.tt %]

Added: trunk/OzinoCMS/root/admin/default.tt
===================================================================
--- trunk/OzinoCMS/root/admin/default.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/admin/default.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,4 @@
+[% INCLUDE admin/header.tt %]	
+
+
+[% INCLUDE admin/footer.tt %]	

Added: trunk/OzinoCMS/root/admin/file/default.tt
===================================================================
--- trunk/OzinoCMS/root/admin/file/default.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/admin/file/default.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,17 @@
+[% subMenu = "website" %]
+[% activeMenu = 'website' %]
+[% INCLUDE admin/header.tt %]
+	
+	<div id="addCategoryheader">
+		<div id="line_">
+			<div style="float: left">[% c.localize('Files') %]</div>
+			<a href="[% c.uri_for('/core/file/upload?back=fileMng') %]" style="float: right">[% c.localize('New File') %]</a>
+		</div>
+	</div>
+	<div style="clear:both;"></div>
+	<div id="contentArea">
+		<center>[% IF (message) %] <div class="message">[% message %]</div>[% END %]</center>
+		[% INCLUDE files/list.tt %]
+	</div> 
+	
+[% INCLUDE admin/footer.tt %]

Added: trunk/OzinoCMS/root/admin/file/edit.tt
===================================================================
--- trunk/OzinoCMS/root/admin/file/edit.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/admin/file/edit.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,48 @@
+[% subMenu = "website" %]
+[% activeMenu = 'website' %]
+[% INCLUDE admin/header.tt %]
+	
+	<div id="addCategoryheader">
+		<div id="line_">
+			<div style="float: left">[% c.localize('Edit File') %]</div>
+		</div>
+	</div>
+	<div style="clear:both;"></div>
+	<div id="contentArea">
+		[% INCLUDE formWidget %]
+	</div> 
+	
+[% INCLUDE admin/footer.tt %]
+
+[% BLOCK formWidget %]
+<form method="post" action="[% c.uri_for('/admin/website/file/doEdit/') _ formData.id %]">
+		[%
+			IF formData.type.match('image');
+				imgUrl = c.uri_for('/static/webfiles/website_') _ formData.website_id _ '/' _ formData.id _ '_' _ c.config.files.image.thumbnail_size _ 'px.' _ formData.ext;
+			ELSE;
+				imgUrl = c.uri_for('/static/images/icon/') _ formData.icon;
+			END;
+		%]
+	<table>
+		<tr >
+			<td rowspan="4" width="[% c.config.files.image.thumbnail_size %]" align="center">
+				<img style="border: 1px solid #f3f3f3; background-color: #fdfdfd; padding: 5px" src="[% imgUrl %]" alt="[% item.title %]" />
+			</td>
+		</tr>
+		<tr>
+			<td><label for="file_title">[% c.localize('Title') %] :</label></td>
+			<td><input type="text" name="title" value="[% formData.title %]" /></td>
+		</tr>
+		<tr>
+			<td><label for="file_description">[% c.localize('Description') %] :</label></td>
+			<td><textarea name="description">[% formData.description %]</textarea></td>
+		</tr>
+		<tr>
+			<td colspan="2" align="right">
+				<input type="submit" name="edit" value="[% c.localize('Submit') %]" />
+				<input type="button" name="cancel" value="[% c.localize('Cancel') %]" onclick="window.location.href='[% c.uri_for('/admin/website/file') %]'" />
+			</td>
+		</tr>
+	</table>
+</form>
+[% END %]

Added: trunk/OzinoCMS/root/admin/footer.tt
===================================================================
--- trunk/OzinoCMS/root/admin/footer.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/admin/footer.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,6 @@
+	</div> <!-- contentAreaContainer -->
+	<div id="footer">
+		<div id="footerIcon"></div>
+	</div>
+</div> <!-- wrapper -->
+[% INCLUDE modules/pageFooter.tt %]

Added: trunk/OzinoCMS/root/admin/gizmo/addGizmo.tt
===================================================================
--- trunk/OzinoCMS/root/admin/gizmo/addGizmo.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/admin/gizmo/addGizmo.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,151 @@
+[% subMenu = "website" %]
+[% INCLUDE admin/header.tt %]
+
+[% INCLUDE  modules/showErrorInput.tt %]<br />
+<form  method="post"  action="[% c.req.base %]admin/website/gizmo/doAddGizmo"  >
+
+<table>
+	<tr>
+		<td colspan="4" class="title">[% c.localize('Gizmo Information') %]</td>
+	</tr>
+	<tr>
+		<td align="right" rowspan="1">[% c.localize('Name') %]:</td>
+		<td rowspan="1"><input type="text" name="gizmoName" value="[% formData.gizmoName %]" >	</td>
+		<td rowspan="1">[% c.localize('Description') %]:</td>
+		<td rowspan="5"><textarea name="gizmoDesc" cols=40 rows=6>[% formData.gizmoDesc %]</textarea></td>
+	</tr>
+	<tr>
+		<td align="right">
+			[% c.localize('Scope') %]:
+		</td>
+		<td>
+			<select  id="gizmoScopeId" name="gizmoScopeId" onchange="
+				if( this.value  == '1' ){
+					 document.getElementById('pageTitleArea').style.display = 'none';
+					 document.getElementById('pageValueArea').style.display = 'none';
+					 document.getElementById('categoryTitleArea').style.display = 'none';
+					 document.getElementById('categoryValueArea').style.display = 'none';
+				}else if( this.value  == '2' ){
+					 document.getElementById('pageTitleArea').style.display = 'none';
+					 document.getElementById('pageValueArea').style.display = 'none';
+					 document.getElementById('categoryTitleArea').style.display = 'inline';
+					 document.getElementById('categoryValueArea').style.display = 'inline';
+				}else if( this.value == '3' ){
+					 document.getElementById('pageTitleArea').style.display = 'inline';
+					 document.getElementById('pageValueArea').style.display = 'inline';
+					 document.getElementById('categoryTitleArea').style.display = 'none';
+					 document.getElementById('categoryValueArea').style.display = 'none';
+				}"  
+				>
+				[% FOREACH  scopeItem = scope %]		
+					<option value="[% scopeItem.value %]">[% scopeItem.title %]</option>	
+				[% END %]
+			</select>
+		</td>
+	
+	</tr>
+	<tr>
+		<td>
+			<div id="pageTitleArea" style="display:none">
+				[% c.localize('Page') %]:
+			</div>
+		</td>
+		<td>
+			<div id="pageValueArea" style="display:none">
+				<select name="gizmoPageId" id="gizmoPageId" >
+					[% FOREACH  pageItem = pages.all %]		
+						<option [% IF  pageId  == pageItem.id %]selected[% END %] value="[% pageItem.id %]">[% pageItem.page_langs.title %]</option>	
+					[% END %]
+				</select>
+			</div>
+		</td>
+	
+	</tr>
+	<tr>
+		<td>
+			<div id="categoryTitleArea" style="display:none">
+				[% c.localize('Category') %]:
+			</div>
+		</td>
+		<td>
+			<div id="categoryValueArea" style="display:none">
+				[% showCatIsSelectBox = 1 %][% INCLUDE admin/category/catsList.tt%]
+			</div>
+		</td>
+	</tr>	
+	<tr>
+		<td align="right">
+			[% c.localize('Module') %]:
+		</td>
+		<td>
+			<select name="gizmoModuleId">
+				[% FOREACH  moduleItem = modules.all %]		
+					<option value="[% moduleItem.name %]">[% moduleItem.name %]</option>	
+				[% END %]
+			</select>
+		</td>
+	
+	</tr>
+	<tr>
+		<td align="right">
+			[% c.localize('Content Area') %]:
+		</td>
+		<td>
+			<select name="gizmoContentArea">
+				[% FOREACH contentAreaItem = contentAreaList %]		
+					<option value="[% contentAreaItem %]" [% IF  contentAreaItem == contentArea %]selected [% END %]   >[% contentAreaItem %]</option>	
+				[% END %]
+			</select>
+		</td>
+		
+	</tr>
+	<tr>
+		<td align="right">
+			[% c.localize('Order') %]:
+		</td>
+		<td>
+			<input type="text" name="gizmoOrder" size="2" value="[% formData.gizmoOrder %]">
+		</td>
+	</tr>
+	<tr>
+		<td class=title>
+			[% c.localize('Permissions') %]
+		</td>
+	</tr>
+	<tr>
+			[% multSelGroupUserNameVal = 'viewPermission' %]
+                       	<td align="right" valign="top">[% c.localize('View') %] :</td>
+                       	<td>[% INCLUDE modules/showMulSelGroupsUsers.tt %]</td>
+                        [% multSelGroupUserNameVal = 'editPermission' %]
+			<td align="right" valign="top">[% c.localize('Edit') %] :</td>
+			<td>[% INCLUDE modules/showMulSelGroupsUsers.tt %]</td>
+		
+	</tr>
+	<tr>
+		<td class="title">[% c.localize('Gizmo Status') %]</td>
+	</tr>
+	<tr>
+		<td align="right">[% c.localize('Status') %]:</td>
+		<td>
+			<select name="gizmoStatus">
+				[% FOREACH statusItem = status %]		
+					<option value="[% statusItem.value %]">[% statusItem.title %]</option>	
+				[% END %]
+			</select>
+		</td>
+		
+	</tr>
+
+
+	
+	<tr>
+		<td colspan="4" align="right">
+			<input type="submit" value="[% c.localize('submit') %]">
+	                <input type="button" value="Cancel" onclick="window.location='[% c.req.base %]_getPageContent/[% pageId %]/1' ">
+		</td>
+				
+	</tr>
+</table>
+	<input type="hidden" name="gizmoDefaultPageId"  value="[% pageId  %]">
+</form>
+[% INCLUDE admin/footer.tt %]

Added: trunk/OzinoCMS/root/admin/gizmo/editGizmoControllers.tt
===================================================================
--- trunk/OzinoCMS/root/admin/gizmo/editGizmoControllers.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/admin/gizmo/editGizmoControllers.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,117 @@
+<table>
+	<tr>
+		<td class="title">[% c.localize('Gizmo Information') %]</td>
+		<td colspan="3">&nbsp;</td>
+	</tr>
+	<tr>
+		<td align="right">[% c.localize('State') %]:</td>
+		<td>		
+			<select name="gizmoState">
+				[% FOREACH  stateItem = gizmoStatuses %]
+					<option [% IF gizmoState == stateItem.value  %]selected[% END %] value="[%  stateItem.value %]">[% stateItem.title %]</option>
+				[% END %]
+			</select>
+		</td>
+		<td colspan="2">&nbsp;</td>
+	</tr>
+	<tr>
+		<td align="right">[% c.localize('Scope') %]:</td>
+		<td>
+			<select  id="gizmoScopeId" name="viewableAreaGizmo" onchange="
+				if( this.value  == '1' ){
+					document.getElementById('pageTitleArea').style.display = 'none';
+					document.getElementById('pageValueArea').style.display = 'none';
+					document.getElementById('categoryTitleArea').style.display = 'none';
+					document.getElementById('categoryValueArea').style.display = 'none';
+				}else if( this.value  == '2' ){
+					document.getElementById('pageTitleArea').style.display = 'none';
+					document.getElementById('pageValueArea').style.display = 'none';
+					document.getElementById('categoryTitleArea').style.display = 'inline';
+					document.getElementById('categoryValueArea').style.display = 'inline';
+				}else if( this.value == '3' ){
+					document.getElementById('pageTitleArea').style.display = 'inline';
+					document.getElementById('pageValueArea').style.display = 'inline';
+					document.getElementById('categoryTitleArea').style.display = 'none';
+					document.getElementById('categoryValueArea').style.display = 'none';
+				}"
+				>
+				<option [% IF !gizmoCategoryId and !gizmoPageId %]selected[% END %] value="1">Site </option>
+				<option [% IF gizmoCategoryId %]selected[% END %] value="2">Category</option>
+				<option [% IF gizmoPageId %]selected[% END %] value="3">Page</option>
+			 
+			</select>
+		</td>
+		<td colspan="2">&nbsp;</td>
+	</tr>
+	<tr>
+		<td align="right">
+			<div id="pageTitleArea" [% IF ! gizmoPageId %]style="display:none" [% END %]>
+				[% c.localize('Page') %]:
+			</div>
+		</td>
+		<td>
+			<div id="pageValueArea" [% IF ! gizmoPageId  %]style="display:none" [% END %]>
+				<select name="gizmoPageId" id="gizmoPageId" >
+					[% FOREACH pageItem = pagesList.all %]		
+						<option value="[% pageItem.id %]" [% IF pageItem.id == gizmoPageId %]selected[% END %]>[% pageItem.page_langs.title %]</option>	
+					[% END %]
+				</select>
+			</div>
+		</td>
+		<td colspan="2"></td>	
+	</tr>
+	<tr>
+		<td align="right">
+			<div id="categoryTitleArea"  [% IF  gizmoPageId or  ( !gizmoPageId and !gizmoCategoryId )  %]style="display:none" [% END %]>
+				[% c.localize('Category') %]:
+			</div>
+		</td>
+		<td>
+			<div id="categoryValueArea" [% IF gizmoPageId  or  ( !gizmoPageId and !gizmoCategoryId ) %]style="display:none"[% END %]>
+				[% showCatIsSelectBox = 1 %][% INCLUDE admin/category/catsList.tt%]
+			</div>
+		</td>
+		<td colspan="2"></td>
+	</tr>	
+	<tr>
+		<td align="right">
+			[% c.localize('Content Area') %]:
+		</td>
+		<td>
+			<select id="gizmoContentArea" name="gizmoContentArea" >
+				[% FOREACH contentAreaItem = contentsArea %]
+					<option value="[% contentAreaItem %]" [% IF contentAreaItem == gizmoContentArea  %]selected[% END %]> [% contentAreaItem %] </option>			
+				[% END%]
+			</select>
+		</td>
+		<td colspan="2">&nbsp;</td>
+	</tr>
+	<tr>
+		<td align="right">[% c.localize('Language') %]:</td>
+		<td>[% showLangIsSelectBox = 1 %][% INCLUDE modules/showLanguages.tt %]</td>
+		<td colspan="2">&nbsp;</td>
+	</tr>
+	<tr>
+		<td class="title">[% c.localize('Permissions') %][% multSelGroupUserNameVal = 'viewPermission' %]</td>
+		<td colspan="3">&nbsp;</td>
+	</tr>
+	<tr>
+		<td align="right" valign="top">[% c.localize('View') %]:</td>
+		<td>
+			[% INCLUDE modules/showMulSelGroupsUsers.tt %]
+			[% multSelGroupUserNameVal = 'editPermission' %]
+		</td>
+		<td align="right" valign="top">[% c.localize('Edit') %]:</td>
+		<td>[% INCLUDE modules/showMulSelGroupsUsers.tt %]</td>
+	</tr>
+	<tr>
+		<td align="right" colspan="4">
+			<input type="submit" value="Save">
+			<input type="submit" value="Apply" onclick="$('op').value='apply';return true"> 
+			<input type="reset" value="Undo" >
+			<input type="button" value="Delete" onclick="if ( confirm('Are you sure to delet gizmo ? ') ){ window.location='[% c.req.base  %]admin/website/gizmo/deleteGizmo/[% gizmoId %]/[% pageId %]'}">
+			<input type="button" value="Cancel" onclick="window.location='[% c.req.base %]_getPageContent/[% pageId %]/1' ">
+		</td>
+	</tr>
+	<input type="hidden" name="op" value="" id="op" >
+</table>

Added: trunk/OzinoCMS/root/admin/gizmo/header.tt
===================================================================
--- trunk/OzinoCMS/root/admin/gizmo/header.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/admin/gizmo/header.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,16 @@
+[% baseUrl  = c.req.base  %]
+[% downUrl   = "/admin/website/gizmo/setGizmoOrder/" _ gizmoId _ "/" _ pageId _ "/" _ parentId _ "/" _ gizmoContentArea _ "/1" %]
+[% upUrl   = "/admin/website/gizmo/setGizmoOrder/" _ gizmoId _ "/" _ pageId _ "/" _ parentId _ "/" _ gizmoContentArea _ "/0" %]
+
+<div class='gizmoHeader'> [% gizmoName %]&nbsp;Order: [% gizmoOrder %]
+	<span class='gizmoHeaderKeys' >
+		[% IF numGizmos > 1 %]
+			<a href="[% c.uri_for( upUrl  ) %]"><img border="none" src="[% baseUrl %]static/images/icon/up.png"></a>
+			<a href="[% c.uri_for( downUrl ) %]"><img border="none" src="[% baseUrl %]static/images/icon/down.png"></a> 
+		[% END %]
+		<a href="[% baseUrl %]_getGizmoContent/[% gizmoId %]/[% 1 %]/[% pageId %]" ><img border="none" src="[% baseUrl %]static/images/icon/edit.png"></a>
+		<!-- <img border="none" src="[% baseUrl %]static/images/icon/cut.png">  -->
+		<a href="[% baseUrl %]admin/website/gizmo/deleteGizmo/[% gizmoId %]/[% pageId %]" onclick="if ( confirm('Are you sure to delete?')){ return true;}else{return false;}"><img border="none" src="[% baseUrl %]static/images/icon/delete.png"></a>
+	</span>
+</div>
+

Added: trunk/OzinoCMS/root/admin/gizmo/index.tt
===================================================================
--- trunk/OzinoCMS/root/admin/gizmo/index.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/admin/gizmo/index.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,52 @@
+[% subMenu = "website" %]
+[% INCLUDE admin/header.tt %]
+
+<form method="post" action="[% c.req.base  %]admin/website/gizmo/saveGizmoData">
+	<table style="width:98%">
+	<tr>
+		<td>
+			[% IF(message) %]<div id="messageArea" class="message">[% message %]</div>[% END %]
+		</td>
+	</tr>
+	<tr>
+		<td>
+			[% INCLUDE  admin/gizmo/showGizmoLang.tt %]
+		</td>
+	</tr>
+	<tr>
+		<td>	
+			[% gizmoDesc %]
+		</td>
+	</tr>
+	<tr>
+		<td>
+		[% c.localize('Title') %]:
+			<input type="text" name="gizmoName" [% IF  op != 'newLang' %]value="[% gizmoName %]" [% END %]>
+		</td>
+	</tr>	
+	[% FOREACH fieldsDataItem = fieldsData.fields %]
+		[% widget 	= fieldsDataItem %]
+		[% name 	= fieldsDataItem.name %]
+		[% IF op != 'newLang'  %][% widget.value = fieldsData.values.$name %][% END %]
+		[% path  = 'admin/gizmo/widget/' _ widget.type _ '.tt' %]
+		<tr>
+			<td>
+				[% INCLUDE $path %]<br />
+			</td>
+		</tr>
+	[% END %]
+	<tr>	
+		<td>
+			[% INCLUDE admin/gizmo/editGizmoControllers.tt  %]
+		</td>
+	</tr>
+	</table>
+	<input type="hidden" name="gizmoId" value="[% gizmoId %]">
+	<input type="hidden" name="mode" value="[% mode %]">
+	
+	<!--  pageId that after saving will rediret   //-->
+	<input type="hidden" name="pageId" value="[% pageId %]">
+
+</form>
+
+[% INCLUDE admin/footer.tt %]

Added: trunk/OzinoCMS/root/admin/gizmo/newGizmoLink.tt
===================================================================
--- trunk/OzinoCMS/root/admin/gizmo/newGizmoLink.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/admin/gizmo/newGizmoLink.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,10 @@
+<div class="contentAreaEditHeaderIcon">
+	<a href="[% c.req.base %]_addGizmo/[% pageId %]/[% content %]" >
+		<img border="none" src="[% c.req.base %]static/images/icon/add.gif" title="[% c.localize('Add Gizmo to Module') %]" alt="[% c.localize('Add Gizmo to Module') %]" name="[% c.localize('Add Gizmo to Module') %]" />
+	</a>
+</div>
+
+<!-- ### PASTE ####
+	<img border="none" src="[% baseUrl %]static/images/icon/paste.png"> 
+-->
+

Added: trunk/OzinoCMS/root/admin/gizmo/showGizmoLang.tt
===================================================================
--- trunk/OzinoCMS/root/admin/gizmo/showGizmoLang.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/admin/gizmo/showGizmoLang.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,43 @@
+<div id="gizmoLangArea">
+	<table id="categoryLanguage">
+		<tr align="center">
+			<td class="noDisplay"></td>
+			<td>
+				[% c.localize('Title') %]
+			</td>
+			<td>
+				[% c.localize('Language') %]
+			</td>
+			<td>[% c.localize('Actions') %]</td>
+		</tr>
+	[% FOREACH gizmoLangListItem = gizmoLangList.all %]
+		<tr align="center">
+			<td>
+				[% IF  defaultLangId  == gizmoLangListItem.language_id.id %]
+					<img border="none" src="[% c.req.base %]/static/images/icon/right.png" name=[% c.localize('Current') %] title=[% c.localize('Current') %] alt=[% c.localize('Current') %]>
+				[% END %]
+			</td>
+			<td>
+				[% gizmoLangListItem.name %]		
+			</td>
+			<td>
+				[% gizmoLangListItem.language_id.id %]<br />
+			</td>
+			<td>
+				[% url  = c.req.base _ '_getGizmoContent/' _ gizmoId _ '/1/' _ pageId _ '/' _  gizmoLangListItem.language_id.id %]
+				<a href="[% url %]"><img border="none" src="[% c.req.base %]/static/images/icon/edit.png" name=[% c.localize('Edit') %] title=[% c.localize('Edit') %] alt=[% c.localize('Edit') %]></a>
+				[% url =  c.req.base  _ 'admin/website/gizmo/deleteGizmoLang/' _  gizmoLangListItem.id %]
+				[% IF  gizmoLangListItem.language_id.id != 'en' %]
+					<a  href="[% c.uri_for( url  ) %]" onclick="if (confirm('Are you sure to delete?')) { new Ajax.Updater('gizmoLangArea',  '[% c.uri_for( url  ) %]', { asynchronous: 1 , evalScripts : true, onLoading: function(request){showLoading(request)},onComplete: function(request){hideLoading(request)} } )}; return false"> <img border="none" src="[% c.req.base %]/static/images/icon/delete.png" name=[% c.localize('Remove') %] title=[% c.localize('Remove') %] alt=[% c.localize('Remove') %]></a>
+				[% ELSE %]
+					<img border="none" src="[% c.req.base %]/static/images/icon/delete.png" name=[% c.localize('Remove') %] title=[% c.localize('Remove') %] alt=[% c.localize('Remove') %]>
+				[% END %]
+			</td>
+		</tr>
+	[% END  %]
+		<tr>
+			[% url  = c.req.base _ '_getGizmoContent/' _ gizmoId _ '/1/' _ pageId _ '/' _  gizmoLangListItem.language_id.id _ '/newLang' %]
+			<td colspan="5" align="center"><a href="[% url %]" ><img border="none" src="[% c.req.base %]static/images/icon/add.gif" name=[% c.localize('Add') %] title=[% c.localize('Add') %] alt=[% c.localize('Add') %]></a>&nbsp;[% c.localize('Add a New Language') %]</td>
+		</tr>
+	</table>
+</div>

Added: trunk/OzinoCMS/root/admin/gizmo/widget/checkbox.tt
===================================================================
--- trunk/OzinoCMS/root/admin/gizmo/widget/checkbox.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/admin/gizmo/widget/checkbox.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,10 @@
+<label for="[% widget.name %]">[% widget.label %]</label>:
+<input type="checkbox" name="[% widget.name %]"
+	[% IF widget.defined('value') and  widget.value %]
+		checked
+	[% ELSIF !widget.defined('value') and widget.checked %]
+		checked
+	[% END %]
+	[% IF widget.disabled %]disabled="disabled"[% END %] 
+/>
+<img src="[% c.req.base %]static/images/help-browser.png" alt="[% widget.desc %]" title="[% widget.desc %]">

Added: trunk/OzinoCMS/root/admin/gizmo/widget/convertHash2Yaml.pl
===================================================================
--- trunk/OzinoCMS/root/admin/gizmo/widget/convertHash2Yaml.pl	                        (rev 0)
+++ trunk/OzinoCMS/root/admin/gizmo/widget/convertHash2Yaml.pl	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,26 @@
+#! /usr/bin/perl -w
+use YAML;
+use Data::Dump;
+my $options = [
+	{
+		value	=> '1',
+		title	=> 'NumberOne',
+		disabled => 'true',
+		checked	=> 'true',
+	},{
+		value	=> '2',
+		title	=> 'NumberTwo',
+		disabled => 'true',
+		checked	=> 'true',
+	},{
+		value	=> '3',
+		title	=> 'NumberThree',
+		disabled => 'true',
+		checked	=> 'true',
+	}
+];
+
+my $select  = {
+	options	=> $options,
+};
+print Dump $select;

Added: trunk/OzinoCMS/root/admin/gizmo/widget/example.txt
===================================================================
--- trunk/OzinoCMS/root/admin/gizmo/widget/example.txt	                        (rev 0)
+++ trunk/OzinoCMS/root/admin/gizmo/widget/example.txt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,41 @@
+---
+- desc: This is a HTMLArea 
+  label: HTMLArea
+  name: myHtml
+  type: html
+- desc: This is a radio
+  label: Radio
+  name: myRadio
+  type: radio 
+  options:
+    - checked: true
+      title: NumberOne
+      value: 1
+    - disabled: true
+      title: NumberTwo
+      value: 2
+    - title: NumberThree
+      value: 3
+- desc: This is a File widget for select a file
+  label: Image 
+  disabled: true
+  name: myFile
+  type: file
+  accept: png, gif, jpg
+- desc: This is a Hidden field
+  name: myHidden
+  type: hidden
+- desc: This is a fieldset
+  type: fieldset
+  title : My Fields
+  options: 
+    - desc: This is a File widget for select a file
+      label: Image 
+      name: myFile
+      type: file
+      accept: png, gif, jpg
+    - desc: This is a text box in legend
+      label: Your name 
+      name: youName
+      type: text
+

Added: trunk/OzinoCMS/root/admin/gizmo/widget/fieldset.tt
===================================================================
--- trunk/OzinoCMS/root/admin/gizmo/widget/fieldset.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/admin/gizmo/widget/fieldset.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,12 @@
+[% USE Dumper %]
+<fieldset>
+	[% IF  widget.title %]<legend>[% widget.title %]</legend>[% END %]
+	[% FOREACH option = widget.options %]
+			[% widget = option  %]
+			[% name   = option.name %]
+			[% IF op != 'newLang'  %][% widget.value = fieldsData.values.$name %][% END %]
+			[% path  = 'admin/gizmo/widget/' _ widget.type _ '.tt' %]	
+			[% INCLUDE  $path %]<br />
+	[% END %]
+</fieldset>
+

Added: trunk/OzinoCMS/root/admin/gizmo/widget/file.tt
===================================================================
--- trunk/OzinoCMS/root/admin/gizmo/widget/file.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/admin/gizmo/widget/file.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,6 @@
+<label for="[% widget.name %]">[% widget.label %]</label>:
+<input type="file" name="[% widget.name %]" value="[% widget.value %]" [% IF widget.disabled %]disabled="disabled"[% END %]  accept="[% widget.accept  %]" /> [% widget.value %]
+
+<img src="[% c.req.base %]static/images/help-browser.png" alt="[% widget.desc %]" title="[% widget.desc %]">
+
+

Added: trunk/OzinoCMS/root/admin/gizmo/widget/hidden.tt
===================================================================
--- trunk/OzinoCMS/root/admin/gizmo/widget/hidden.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/admin/gizmo/widget/hidden.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,3 @@
+<input type="hidden" name="[% widget.name %]" value="[% widget.value %]"  />
+
+

Added: trunk/OzinoCMS/root/admin/gizmo/widget/html.tt
===================================================================
--- trunk/OzinoCMS/root/admin/gizmo/widget/html.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/admin/gizmo/widget/html.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,7 @@
+<script language="javascript" type="text/javascript">
+tinyMCE.init({
+	mode : "textareas"
+	});
+</script>
+<label for="[% widget.name %]">[% widget.label %]</label>:
+<textarea  cols="100" rows="20" id="[% widget.name %]" name="[% widget.name %]" [% IF widget.disabled %]disabled="disabled"[% END %] />[% widget.value %]</textarea><img src="[% c.req.base %]static/images/help-browser.png" alt="[% widget.desc %]" title="[% widget.desc %]">

Added: trunk/OzinoCMS/root/admin/gizmo/widget/password.tt
===================================================================
--- trunk/OzinoCMS/root/admin/gizmo/widget/password.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/admin/gizmo/widget/password.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,2 @@
+<label for="[% widget.name %]">[% widget.label %]</label>:
+<input type="password" name="[% widgetName %]" value="[% widgetValue %]" [% IF widget.disabled %]disabled="disabled"[% END %] /><img src="[% c.req.base %]static/images/help-browser.png" alt="[% widget.description %]" title="[% widget.description %]">

Added: trunk/OzinoCMS/root/admin/gizmo/widget/radio.tt
===================================================================
--- trunk/OzinoCMS/root/admin/gizmo/widget/radio.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/admin/gizmo/widget/radio.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,8 @@
+<label for="[% widget.name %]">[% widget.label %]</label>:
+[% FOREACH option = widget.options %]
+	[% option.title  %]
+	<input type="radio" name="[% widget.name %]" [% IF option.disabled %]disabled="disabled"[% END %] [% IF  widget.value ==  option.value %]checked=true[% END %]  value="[% option.value %]" />
+[% END %]
+
+<img src="[% c.req.base %]static/images/help-browser.png" alt="[% widget.desc %]" title="[% widget.desc %]">
+

Added: trunk/OzinoCMS/root/admin/gizmo/widget/select.tt
===================================================================
--- trunk/OzinoCMS/root/admin/gizmo/widget/select.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/admin/gizmo/widget/select.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,23 @@
+[% USE Dumper %]
+<label for="[% widget.name %]">[% widget.label %]</label>:
+<select name="[% widget.name %]" [% IF widget.disabled %]disabled="disabled"[% END %]   [% IF widget.size %]size="[% widget.size %]"[% END %]  [% IF widget.multiple %]multiple="[% widget.multiple %]" [% END %] />
+	[% FOREACH option = widget.options %]
+		[% IF option.optionType == 'optionGroup' %]
+			<optgroup label="[% option.optionLabel %]" [% IF option.disabled %]disabled="disabled"[% END %]>
+		[% ELSIF option.optionType == 'closeOptionGroup' %]
+			</optgroup> 
+		[% ELSE %]
+			<option value="[% option.optionValue %]"
+				[% IF option.optionValue == widget.value %]
+					selected="selected"
+				[% ELSIF !widget.defined('value') and option.selected %]
+					selected="selected"
+				[% END %]
+				[% IF option.disabled %]disabled="disabled"[% END %]>
+				[% option.optionLabel %] 
+			</option>
+		[% END %] 
+	[% END %]
+</select>
+<img src="[% c.req.base %]static/images/help-browser.png" alt="[% widget.desc %]" title="[% widget.desc %]">
+

Added: trunk/OzinoCMS/root/admin/gizmo/widget/text.tt
===================================================================
--- trunk/OzinoCMS/root/admin/gizmo/widget/text.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/admin/gizmo/widget/text.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,4 @@
+<label for="[% widget.name %]">[% widget.label %]</label>:
+<input type="text" name="[% widget.name %]" value="[% widget.value %]" [% IF widget.disabled %]disabled="disabled"[% END %] /><img src="[% c.req.base %]static/images/help-browser.png" alt="[% widget.desc %]" title="[% widget.desc %]">
+
+

Added: trunk/OzinoCMS/root/admin/gizmo/widget/textarea.tt
===================================================================
--- trunk/OzinoCMS/root/admin/gizmo/widget/textarea.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/admin/gizmo/widget/textarea.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,2 @@
+<label for="[% widget.name %]">[% widget.label %]</label>:
+<textarea name="[% widget.name %]" [% IF widget.rows %]rows="widget.rows"[% END %][% IF widget.cols %]rows="widget.cols"[% END %] [% IF widget.disabled %]disabled="disabled"[% END %] />[% widget.value %]</textarea><img src="[% c.req.base %]static/images/help-browser.png" alt="[% widget.desc %]" title="[% widget.desc %]">

Added: trunk/OzinoCMS/root/admin/header.tt
===================================================================
--- trunk/OzinoCMS/root/admin/header.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/admin/header.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,6 @@
+[% INCLUDE modules/pageHeader.tt %]
+<div id="wrapper">
+
+[% INCLUDE admin/headerImage.tt %]
+[% INCLUDE admin/menu.tt %]
+	<div id="contentAreaContainer">

Added: trunk/OzinoCMS/root/admin/headerImage.tt
===================================================================
--- trunk/OzinoCMS/root/admin/headerImage.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/admin/headerImage.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,7 @@
+<div id="header">
+<div class="adminHotLinkArea" >
+	<a href="[% c.req.base %]_getPageContent/[% pageId %]/0" target="_blank">[% c.localize('Preview') %]</a> |
+	<a href="[% c.req.base %]logout">[% c.localize('Logout') %]</a>
+</div>
+	<div id="logo"></div>
+</div>

Added: trunk/OzinoCMS/root/admin/menu.tt
===================================================================
--- trunk/OzinoCMS/root/admin/menu.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/admin/menu.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,36 @@
+<div id="Menu">
+	<ul>
+		<li>
+			[% IF c.check_user_roles( 'admin' ) %]
+				<a href="[% c.uri_for('/admin/root') %]" [% IF activeMenu == 'root' %] class="active" [% END %] >[% c.localize('CMS Administration') %]</a>
+	 		[% END %]
+		</li>
+		<li>
+			[% IF c.check_user_roles( 'reseller' ) %]
+				<a href="[% c.uri_for('/admin/reseller') %]" [% IF activeMenu == 'reseller' %] class="active" [% END %] >[% c.localize('Reseller Panel') %]</a>
+			[% END %]
+		</li>
+		<li>	[% IF c.check_user_roles( 'websiteadmin' ) %]
+				<a href="[% c.uri_for('/admin/website') %]" [% IF activeMenu == 'website' %] class="active" [% END %] >[% c.localize('Website Administration') %]</a>
+			[% END %]
+		</li>
+	</ul>
+</div>
+<div id="subMenu">
+	[% IF subMenu == 'website' %]
+		<ul>
+			<li>
+				<a href="[% c.uri_for('/admin/website/category') %]">[% c.localize('Category') %]</a>
+			</li>
+			<li>
+				<a href="[% c.uri_for('/admin/website/page') %]">[% c.localize('Page') %]</a>
+			</li>
+			<li>
+				<a href="[% c.uri_for('/admin/website/navigation') %]">[% c.localize('Navigation Management') %]</a>
+			</li>
+			<li>
+				<a href="[% c.uri_for('/admin/website/file') %]">[% c.localize('File Management') %]</a>
+			</li>
+		</ul>
+	[% END %]	
+</div>

Added: trunk/OzinoCMS/root/admin/navigation/addEditItem.tt
===================================================================
--- trunk/OzinoCMS/root/admin/navigation/addEditItem.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/admin/navigation/addEditItem.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,34 @@
+[% subMenu = "website" %]
+[% activeMenu = 'website' %]
+[% INCLUDE admin/header.tt %]
+
+	[% INCLUDE modules/showErrorInput.tt %]
+	[% IF isAdd %]
+		<form name="add_nav_item" method="post" action="[% c.uri_for('doAddEditItem/') _ navId %]">
+	[% ELSIF isEdit %]
+		<form name="edit_nav_item" method="post" action="[% c.uri_for('doAddEditItem/') _ navId _ '/' _ itemIndex %]">
+	[% END %]
+		[% INCLUDE widgets %]
+	</form>
+
+[% INCLUDE admin/footer.tt %]
+
+[% BLOCK widgets %]
+	<table>
+		<tr><td colspan="2" align="center" class="title">[% IF isAdd %]New Item[% ELSIF isEdit %]Edit Item[% END %]</td></tr>
+		<tr>
+			<td align="right">[% c.localize('Type') %] :</td>
+			<td>[% isSelectBox = 1 %][% INCLUDE modules/navTypeList.tt %]</td>
+		</tr>
+		<tr>
+			<td colspan="2"><div id="navItemsWidgetsArea">[% INCLUDE admin/navigation/typeWidget.tt; %]</div></td>
+		</tr>
+		<tr>
+			<td colspan="2" align="right">
+				<input type="submit" name="submit" value="[%c.localize('Submit') %]" /> 
+				<input type="button" value="[%c.localize('Cancel') %]" onclick="window.location.href='[% c.uri_for('/admin/website/navigation/manageItem/') _ navId  %]'">
+			</td>
+		</tr>
+	</table>
+[% END %]
+

Added: trunk/OzinoCMS/root/admin/navigation/addedit.tt
===================================================================
--- trunk/OzinoCMS/root/admin/navigation/addedit.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/admin/navigation/addedit.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,61 @@
+[% subMenu = "website" %]
+[% activeMenu = 'website' %]
+[% INCLUDE admin/header.tt %]
+
+[% INCLUDE modules/showErrorInput.tt %]
+[% IF isAdd %]
+	<form name="new_nav" method="post" action="[% c.uri_for('doAddEdit') %]">
+		[% INCLUDE addWidget %]
+[% ELSIF isEdit %]
+	<form name="edit_nav" method="post" action="[% c.uri_for('doAddEdit/') _ id %]">
+		[% INCLUDE editWidget %]
+[% END %]
+</form>
+
+[% INCLUDE admin/footer.tt %]
+
+[% BLOCK addWidget %]
+	<table>
+		<tr>
+			<td colspan="4" align="center" class="title">[% c.localize('Navigation') %]</td>
+		</tr>
+		<tr>
+			<td align="right">[% c.localize('Name') %] :</td> 
+			<td><input type="text" name="nav_name" value="[% formData.nav_name %]" ></td>
+		</tr>
+		<tr>
+			<td align="right" valign="top">[% c.localize('Description') %] :</td>
+			<td><textarea name="nav_desc">[% formData.nav_desc %]</textarea></td>
+		</tr>
+		<tr>
+			<td colspan="4" align="right">
+				<input type="submit" name="submit" value="[%c.localize('Submit') %]"> 
+				<input type="button" value="[% c.localize('Cancel') %]" onclick="window.location.href='[% c.uri_for('/admin/website/navigation') %]'">
+			</td>
+		</tr>
+	</table>
+[% END %]
+
+[% BLOCK editWidget %]
+	<table>
+		<tr>
+			<td colspan="4" align="center" class="title">[% c.localize('Navigation') %]</td>
+		</tr>
+		<tr>
+			<td align="right">[% c.localize('Name') %] :</td> 
+			<td><input type="text" name="nav_name" value="[% formData.nav_name %]" ></td>
+		</tr>
+		<tr>
+			<td align="right" valign="top">[% c.localize('Description') %] :</td>
+			<td><textarea name="nav_desc">[% formData.nav_desc %]</textarea></td>
+		</tr>
+		<tr>
+			<td colspan="4" align="right">
+				<input type="submit" name="submit" value="[%c.localize('Update') %]"> 
+				<input type="button" value="[%c.localize('Cancel') %]" onclick="window.location.href='[% c.uri_for('/admin/website/navigation') %]'">
+			</td>
+		</tr>
+	</table>
+[% END %]
+
+

Added: trunk/OzinoCMS/root/admin/navigation/default.tt
===================================================================
--- trunk/OzinoCMS/root/admin/navigation/default.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/admin/navigation/default.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,16 @@
+[% subMenu = "website" %]
+[% activeMenu = 'website' %]
+[% INCLUDE admin/header.tt %]
+
+<div id="addCategoryheader">
+	<div id="line_">
+		<div style="float: left">[% c.localize('Navigations') %]</div>
+		<a href="[% c.uri_for('addEdit') %]" style="float: right">[% c.localize('New Navigation') %]</a>
+	</div>
+</div>
+
+	<div id="contentArea">
+		[% viewType = 1; INCLUDE core/navigation/list.tt %]
+	</div>
+
+[% INCLUDE admin/footer.tt %]

Added: trunk/OzinoCMS/root/admin/navigation/manageItem.tt
===================================================================
--- trunk/OzinoCMS/root/admin/navigation/manageItem.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/admin/navigation/manageItem.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,15 @@
+[% subMenu = "website" %]
+[% activeMenu = 'website' %]
+[% INCLUDE admin/header.tt %]
+
+<div id="addCategoryheader">
+	<div id="line_">
+		<div style="float: left">[% c.localize('Items') %]</div>
+		<a href="[% c.uri_for('/admin/website/navigation/addEditItem/') _ navId %]" style="float: right">[% c.localize('New Item') %]</a>
+	</div>
+</div>
+<br />
+
+	<div id="contentArea">[% INCLUDE core/navigation/listItem.tt %]</div>
+
+[% INCLUDE admin/footer.tt %]

Added: trunk/OzinoCMS/root/admin/navigation/typeWidget.tt
===================================================================
--- trunk/OzinoCMS/root/admin/navigation/typeWidget.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/admin/navigation/typeWidget.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,94 @@
+[%
+	SWITCH navType;
+	CASE 1;
+		INCLUDE navType1;
+	CASE 2;
+		INCLUDE navType2;
+	CASE 3;
+		INCLUDE navType3;
+	CASE 4;
+		INCLUDE navType4;
+	CASE;
+		INCLUDE blank;
+	END;
+%]
+
+[% BLOCK navType1 %]
+	<fieldset>
+	<legend>[% c.config.navigation.types.0.title %]</legend>
+		<table>
+			<tr>
+				<td align="right">[% c.localize('Categories') %] : </td>
+				<td align="left">[% showCatIsSelectBox = 1 %][% INCLUDE admin/category/catsList.tt%]</td>
+			</tr>
+			<tr>
+				<td align="right">[% c.localize('Depth') %] : </td>
+				<td align="left"><input type="text" name="depth" value="[% formData.depth %]" size="2" maxlength="2" /></td>
+			</tr>
+			<tr>
+				<td align="right">[% c.localize('Show') %] : </td>
+				<td align="left">
+					<input type="radio" name="show_only" value="-1" [% IF !formData.show_only || formData.show_only == -1 %]checked[% END %] /> [% c.localize('All') %]
+					<input type="radio" name="show_only" value="1" [% IF formData.show_only == 1 %]checked[% END %] /> [% c.localize('Category') %]
+					<input type="radio" name="show_only" value="2" [% IF formData.show_only == 2 %]checked[% END %] /> [% c.localize('Page') %]
+				</td>
+			</tr>
+			<tr>
+				<td align="right">[% c.localize('Show Parent') %] : </td>
+				<td align="left"><input type="checkbox" name="show_parent" value="1" [% IF !formData.show_parent OR formData.show_parent == 1 %]checked[% END %] /></td>
+			</tr>
+		</table>
+	</fieldset>
+[% END %]
+
+[% BLOCK navType2 %]
+	<fieldset>
+	<legend>[% c.config.navigation.types.1.title %]</legend>
+		<table>
+			<tr>
+				<td align="right">[% c.localize('Pages') %] : </td>
+				<td align="left">[% nonHirarchicalSelBox = 1 %][% INCLUDE admin/page/catpagelist.tt %]</td>
+			</tr>
+		</table>
+	</fieldset>
+[% END %]
+
+[% BLOCK navType3 %]
+	<fieldset>
+	<legend>[% c.config.navigation.types.2.title %]</legend>
+		[% c.localize('Leave blank to use default separator: \'>\'') %] .
+		<table>
+			<tr>
+				<td align="right">[% c.localize('Separator') %] : </td>
+				<td align="left"><input type="text" name="separator" value="[% formData.separator %]" size="1" maxlength="5" /></td>
+			</tr>
+		</table>
+	</fieldset>
+[% END %]
+
+[% BLOCK navType4 %]
+	<fieldset>
+	<legend>[% c.config.navigation.types.3.title %]</legend>
+		<table>
+			<tr>
+				<td align="right">[% c.localize('Depth') %] : </td>
+				<td align="left"><input type="text" name="depth" value="[% formData.depth %]" size="2" maxlength="2" /></td>
+			</tr>
+			<tr>
+				<td align="right">[% c.localize('Show') %] : </td>
+				<td align="left">
+					<input type="radio" name="show_only" value="-1" [% IF !formData.show_only || formData.show_only == -1 %]checked[% END %] /> [% c.localize('All') %]
+					<input type="radio" name="show_only" value="1" [% IF formData.show_only == 1 %]checked[% END %] /> [% c.localize('Category') %]
+					<input type="radio" name="show_only" value="2" [% IF formData.show_only == 2 %]checked[% END %] /> [% c.localize('Page') %]
+				</td>
+			</tr>
+			<tr>
+				<td align="right">[% c.localize('Show Parent') %] : </td>
+				<td align="left"><input type="checkbox" name="show_parent" value="1" [% IF !formData.show_parent OR formData.show_parent == 1 %]checked[% END %] /></td>
+			</tr>
+		</table>
+	</fieldset>
+[% END %]
+
+[% BLOCK blank %]
+[% END %]

Added: trunk/OzinoCMS/root/admin/page/addedit.tt
===================================================================
--- trunk/OzinoCMS/root/admin/page/addedit.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/admin/page/addedit.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,118 @@
+[% subMenu = "website" %]
+[% activeMenu = 'website' %]
+[% INCLUDE admin/header.tt %]
+
+<div id="contentArea">
+	[% IF isAdd %]
+		<form name="new_page" method="post" action="[% c.uri_for('doAdd') %]">
+			[% INCLUDE addWidget %]
+	[% ELSIF isEdit %]
+			[% INCLUDE editWidget %]
+	[% END %]
+	</form>
+</div>
+
+[% INCLUDE admin/footer.tt %]
+
+[% BLOCK addWidget %]
+	<div id="addCategoryheader">
+		<div id="line">New Page</div>
+	</div>
+	[% INCLUDE modules/showErrorInput.tt %]
+	<br />	
+	<div id="someMargin">[% c.localize('Fields marked with an asterisk * are required') %].</div>
+	<br />
+	<table>
+		<tr>
+			<td colspan="4" align="left" class="title">[% c.localize('Page Information') %]</td>
+		</tr>
+		<tr>
+			<td align="right">[% c.localize('Language') %] :</td>
+			<td>[% languageTitle %]</td>
+			<td align="right">[% c.localize('Description') %] :</td>
+			<td rowspan="4"><textarea name="description" cols=40 rows=6>[% formData.description %]</textarea></td>
+		</tr>
+		<tr>
+			<td align="right">* [% c.localize('Title') %] :</td> 
+			<td><input type="text" name="title" value="[% categoryData.first.get_column('title') %]" ></td>
+		</tr>
+		<tr>
+			<td align="right">[% c.localize('Parent') %] :</td>
+			<td>[% showCatIsSelectBox = 1 %][% INCLUDE admin/category/catsList.tt%]</td>
+		</tr>
+		<tr>
+			<td align="right">[% c.localize('Order') %] :</td>
+			<td><div id="orderArea">[% INCLUDE admin/page/orderList.tt %]</div></td>
+		</tr>
+		<tr>
+			<td align="right">[% c.localize('Skin') %] :</td>
+			<td>[% showSkinIsSelectBox = 1 %][% INCLUDE modules/skinList.tt %]</td>
+		</tr>
+		<tr>
+			<td colspan="4" align="left" class="title">[% c.localize('Permissions') %]</td>
+		</tr>
+		<tr>
+			[% multSelGroupUserNameVal = 'viewPermission' %]
+			<td align="right" valign="top">[% c.localize('View') %] :</td>
+			<td>[% INCLUDE modules/showMulSelGroupsUsers.tt %]</td>
+			[% multSelGroupUserNameVal = 'editPermission' %]
+			<td align="right" valign="top">* [% c.localize('Edit') %] :</td>
+			<td>[% INCLUDE modules/showMulSelGroupsUsers.tt %]</td>
+		</tr>
+		<tr>
+			<td colspan="4" align="left" class="title">[% c.localize('Page Status') %]</td>
+		</tr>
+		<tr>
+			<td align="right">[% c.localize('Status') %] :</td>
+			<td>[% INCLUDE modules/statusList.tt %]</td>
+			<td align="right">[% c.localize('Visible') %] :</td>
+			<td><input type="checkbox" name="visible" value="1" [% IF !formData OR formData.visible %]checked[% END %]></td>
+		</tr>
+		<tr>
+			<td colspan="4"><div id="td_bg"></div></td>
+			<td colspan="4" align="right">
+				<input type="submit" name="submit" value="[%c.localize('Submit') %]"> 
+				<input type="button" value="[%c.localize('Cancel') %]" onclick="window.location.href='[% c.uri_for('/admin/website/page') %]'">
+			</td>
+		</tr>
+	</table>
+[% END %]
+
+[% BLOCK editWidget %]
+	<div id="showEditPageLangArea">
+		[% INCLUDE admin/page/showPageLang.tt %]
+	</div>
+	<form name="edit_page" method="post" action="[% c.uri_for('doEdit/') _ formData.id %]">
+		<table>
+			<tr>
+				<td align="right">[% c.localize('Parent') %] :</td>
+				<td colspan="3">[% showCatIsSelectBox = 1 %][% INCLUDE admin/category/catsList.tt%]</td>
+			</tr>
+			<tr>
+				<td colspan="4" align="left" class="title">[% c.localize('Permissions') %]</td>
+			</tr>
+			<tr>
+				[% multSelGroupUserNameVal = 'viewPermission' %]
+				<td align="right" valign="top">[% c.localize('View') %] :</td>
+				<td>[% INCLUDE modules/showMulSelGroupsUsers.tt %]</td>
+				[% multSelGroupUserNameVal = 'editPermission' %]
+				<td align="right" valign="top">[% c.localize('Edit') %] :</td>
+				<td>[% INCLUDE modules/showMulSelGroupsUsers.tt %]</td>
+			</tr>
+			<tr>
+				<td colspan="4" align="left" class="title">[% c.localize('Page Status') %]</td>
+			</tr>
+			<tr>
+				<td align="right">[% c.localize('Status') %] :</td>
+				<td>[% INCLUDE modules/statusList.tt %]</td>
+				<td align="right">[% c.localize('Visible') %] :</td>
+				<td><input type="checkbox" name="visible" value="1" [% IF !formData OR formData.visible %]checked[% END %]></td>
+			</tr>
+			<tr>
+				<td colspan="4" align="right">
+					<input type="submit" name="submit" value="[%c.localize('Submit') %]"> 
+					<input type="button" value="[%c.localize('Back') %]" onclick="window.location.href='[% c.uri_for('/admin/website/page') %]'">
+				</td>
+			</tr>
+		</table>
+[% END %]

Added: trunk/OzinoCMS/root/admin/page/addeditpagelang.tt
===================================================================
--- trunk/OzinoCMS/root/admin/page/addeditpagelang.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/admin/page/addeditpagelang.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,40 @@
+[% INCLUDE modules/showErrorInput.tt %]
+[% IF isAdd %][% addEditUrl = c.uri_for('doAddEditPageLang/') _ formData.pageid %][% ELSE %][% addEditUrl = c.uri_for('doAddEditPageLang/') _ formData.pageid _ '/' _ formData.pageLangId %][% END %]
+[% c.prototype.form_remote_tag({
+	url 		=> addEditUrl,
+	update 		=> 'showEditPageLangArea',
+	evalScripts 	=> 'true',
+}) %]
+<fieldset id="fieldSetProperties"><legend class="title">[% c.localize('Page Language') %]</legend>
+	<table>
+		<tr>
+			<td align="right">[% c.localize('Title') %] :</td> 
+			<td><input type="text" name="title" value="[% formData.title %]" ></td>
+			<td align="right">[% c.localize('Description') %] :</td>
+			<td rowspan="3"><textarea name="description" cols=40 rows=6>[% formData.description %]</textarea></td>
+		</tr>
+		<tr>
+			<td align="right">[% c.localize('Language') %] :</td>
+			<td>
+				[% 
+					showLangIsSelectBox = 1;
+					INCLUDE modules/showLanguages.tt;
+					IF !isAdd AND formData.language_id == cms.website.default_language_id; 
+				%]
+					<input type="hidden" name="language_id" value="[% formData.language_id %]" />
+				[% END %]
+			</td>
+		</tr>
+		<tr>
+			<td align="right">[% c.localize('Skin') %] :</td>
+			<td>[% showSkinIsSelectBox = 1 %][% INCLUDE modules/skinList.tt %]</td>
+		</tr>
+		<tr>
+			<td colspan="4" align="right">
+				<input type="submit" name="submit" value="[% IF isAdd %][% c.localize('Add') %][% ELSE %][% c.localize('Edit') %][% END %]" />
+				<input type="button" name="cancel" value="[% c.localize('Cancel') %]" onclick=" new Ajax.Updater( 'showEditPageLangArea',  '[% c.uri_for('/core/page/showPageLangList/') _ formData.pageid %]', { asynchronous: 1,evalScripts: true } ) ; return false" />
+			</td>
+		</tr>
+	</table>
+</form>
+</fieldset>

Added: trunk/OzinoCMS/root/admin/page/catpagelist.tt
===================================================================
--- trunk/OzinoCMS/root/admin/page/catpagelist.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/admin/page/catpagelist.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,65 @@
+[% 
+	IF showCatIsNormalList;
+		INCLUDE normalList;
+	ELSIF nonHirarchicalSelBox;
+		INCLUDE nonHirarchicalSelectBox;
+	END;
+%]
+
+[% BLOCK normalList %]
+	<center>[% IF (message) %] <div class="message">[% message %]</div>[% END %]</center>
+	[%
+		firstDepth = catPageList.0.depth; 
+		tmpDepth = firstDepth;
+		currentDefaultPageId = catPageList.0.default_page_id;
+		changeOrderUrl = c.uri_for('/admin/website/page/setPageOrder/');
+	%]
+	<ul>
+	[% FOREACH cat = catPageList %]
+		[% IF cat.depth > tmpDepth %]<ul>[% tmpDepth = cat.depth %][% ELSIF cat.depth < tmpDepth %][% counter = 1 %][% WHILE counter <= ( tmpDepth - cat.depth ) %]</ul>[% counter = counter + 1 %][% END %][% tmpDepth = cat.depth %][% END %]
+		<li>[% cat.title %] [% IF cat.title != 'root' AND cat.page_id %]
+					[% updaterUrl = changeOrderUrl _ cat.id _ '/0';
+					updaterContainer = "contentArea";
+					updaterContent = '<img border="none" src="/static/images/icon/up.png" alt="Up" name="Up" title="Up" />';
+					INCLUDE modules/ajaxupdater.tt %]
+
+					[% updaterUrl = changeOrderUrl _ cat.id _ '/1';
+					updaterContainer = "contentArea";
+					updaterContent = '<img border="none" src="/static/images/icon/down.png" alt="Down" name="Down" title="Down" />';
+					INCLUDE modules/ajaxupdater.tt %]
+
+					<a href="[% c.uri_for('/admin/website/page/edit/') _ cat.id %]"><img border="none" src="/static/images/icon/edit.png" alt="Edit" name="Edit" title="Edit" /></a>
+
+					[% updaterUrl = c.uri_for('/admin/website/page/remove/') _ cat.id ;
+					updaterContainer = "contentArea";
+					updaterContent = '<img border="none" src="/static/images/icon/delete.png" alt="Remove" name="Remove" title="Remove" />';
+					confirm = c.localize('Are you sure') _ '?';
+					INCLUDE modules/ajaxupdater.tt %]
+
+					[% url  =  '/_getPageContent/' _ cat.id _ '/1'   %]
+					<a href="[% c.uri_for( url ) %]" >[% c.localize('Edit Content') %]</a>
+					[% 
+						IF cat.isDefault;
+							c.localize('Default Page');
+						ELSE;
+							updaterUrl = c.uri_for('/admin/website/page/setAsDefaultPage/') _ cat.id _ '/' _ cat.parent_id ;
+							updaterContainer = "contentArea";
+							updaterContent = c.localize('Set as Default');
+							confirm = '';
+							INCLUDE modules/ajaxupdater.tt;
+						END;
+					%]
+				[% END %]
+		</li>
+	[% END %]
+	[% counter = firstDepth + 1 %][% WHILE counter <= tmpDepth %]</ul>[% counter = counter + 1 %][% END %]
+	</ul>
+[% END %]
+
+[% BLOCK nonHirarchicalSelectBox %]
+	<select name="page_id" >
+		[% FOREACH item IN catPageList %]
+			[% IF item.page_id %]<option value="[% item.id %]" [% IF item.id == formData.page_id %]selected[% END %]>[% item.title %]</option>[% END %]
+		[% END %]
+	</select>
+[% END %]

Added: trunk/OzinoCMS/root/admin/page/default.tt
===================================================================
--- trunk/OzinoCMS/root/admin/page/default.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/admin/page/default.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,15 @@
+[% subMenu = "website" %]
+[% activeMenu = 'website' %]
+[% INCLUDE admin/header.tt %]
+	
+<div id="addCategoryheader">
+	<div id="line_">
+		<div style="float: left">[% c.localize('Page') %]</div>
+		<a href="[% c.uri_for('add') %]" style="float: right">[% c.localize('New Page') %]</a>
+	</div>
+</div>
+	<div id="contentArea">
+		[% INCLUDE admin/page/catpagelist.tt %]
+	</div> 
+	
+[% INCLUDE admin/footer.tt %]

Added: trunk/OzinoCMS/root/admin/page/editContent/adminHotLink.tt
===================================================================
--- trunk/OzinoCMS/root/admin/page/editContent/adminHotLink.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/admin/page/editContent/adminHotLink.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,5 @@
+<div class='adminHotLinkArea' >
+	<a style='color:white;' href='[% c.req.base %]_getPageContent/[% pageId %]/1' target='_blank'>[% c.localize('Edit Page') %]</a> 
+	<a style='color:white;' href='[% c.req.base %]logout'>[% c.localize('Logout') %]</a> 
+</div>
+			

Added: trunk/OzinoCMS/root/admin/page/editContent/index.tt
===================================================================
--- trunk/OzinoCMS/root/admin/page/editContent/index.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/admin/page/editContent/index.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,16 @@
+[% title = c.localize('Edit page content') %]
+[% subMenu = "website" %]
+[% INCLUDE admin/header.tt %]
+
+	[% INCLUDE  modules/showInfoMessage.tt %]
+	<div id="contentWrapper">
+		[% FOREACH  key =  contentValues.keys %]
+			<div class="editContentArea">
+				<div class="contentAreaEditHeader" >
+					[% c.localize("Content Area") %] : [% key %]
+				</div>
+				[% contentValues.$key %]
+			</div>
+		[% END %]
+	</div>
+[% INCLUDE admin/footer.tt %]

Added: trunk/OzinoCMS/root/admin/page/orderList.tt
===================================================================
--- trunk/OzinoCMS/root/admin/page/orderList.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/admin/page/orderList.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,7 @@
+<select name="order">
+	<option value="-1">--- Order ---</option>
+[% FOREACH page = orderList %]
+	<option value="[% page.order %]" [% IF page.order == formData.order %]selected[% END %]>[% page.title %]</option>
+[% END %]
+</select>
+

Added: trunk/OzinoCMS/root/admin/page/showPageLang.tt
===================================================================
--- trunk/OzinoCMS/root/admin/page/showPageLang.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/admin/page/showPageLang.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,43 @@
+	<table width="97%">
+		<tr>
+			<td colspan="4">[% IF message %]<div class="message">[% message %]</div>[% END %][% INCLUDE modules/showErrorInput.tt %]</td>
+		</tr>
+		<tr>
+			<td colspan="4" align="left" class="title">[% c.localize('Page Information') %]</td>
+		</tr>
+		<tr>
+			<td colspan="4">
+				<table id="categoryLanguage">
+					<tr align="center">
+						<td>[% c.localize('Title') %]</td>
+						<td>[% c.localize('Description') %]</td>
+						<td>[% c.localize('Language') %]</td>
+						<td>[% c.localize('Default Skin') %]</td>
+						<td>[% c.localize('Actions') %]</td>
+					</tr>
+					[% FOREACH page = formData.pageLang %]
+						<tr>
+							<td align="center">[% page.title %]</td>
+							<td align="center">[% IF  ! page.description %]&nbsp;[% ELSE %][% page.description %][% END %]</td>
+							<td align="center">[% page.language_id %]</td>
+							<td align="center">[% page.default_skin_id IF page.default_skin_id %]</td>
+							<td align="center"><a href="[% c.uri_for('/admin/website/page/addEditPageLang/') _ page.page_id _ '/' _ page.id %]" onclick=" new Ajax.Updater( 'showEditPageLangArea', '[% c.uri_for('/admin/website/page/addEditPageLang/') _ page.page_id _ '/' _ page.id %]', { asynchronous: 1,evalScripts: true } ) ; return false"><img border="none" src="/static/images/icon/edit.png" alt="Edit" name="Edit" title="Edit" /></a>
+								[% IF page.language_id != cms.website.default_language_id %]
+									<a href="[% c.uri_for('/admin/website/page/removePageLang/') _ page.page_id _ '/' _ page.id %]" onclick="if (confirm('Are you sure ?')) { new Ajax.Updater( 'showEditPageLangArea', '[% c.uri_for('/admin/website/page/removePageLang/') _ page.page_id _ '/' _ page.id %]', { asynchronous: 1,evalScripts: true } ) }; return false"><img border="none" src="/static/images/icon/delete.png" alt="Remove" name="Remove" title="Remove" /></a>
+								[% END %]
+							</td>
+						</tr>
+					[% END %]
+					<tr>
+						<td class="noDisplay"></td>
+						<td colspan="3" align="center">
+							<a href="[% c.uri_for('/admin/website/category/addEditCatLang/') _ formData.id %]" onclick=" new Ajax.Updater( 'showEditPageLangArea', '[% c.uri_for('/admin/website/page/addEditPageLang/') _ formData.id %]', { asynchronous: 1,evalScripts: true } ) ; return false"><img border="none" src="/static/images/icon/add.gif" alt="Add" name="Add" title="Add" /></a>
+							[% c.localize('Add a New Language') %]
+						</td>
+						<td class="noDisplay"></td>
+					</tr>
+				</table>
+			</td>
+		</tr>
+	</table>
+

Added: trunk/OzinoCMS/root/admin/reseller/addUser.tt
===================================================================
--- trunk/OzinoCMS/root/admin/reseller/addUser.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/admin/reseller/addUser.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,81 @@
+[% INCLUDE modules/pageHeader.tt %]
+
+[% IF action == 'AddUser' %]
+	[% INCLUDE addUserForm %]
+[% ELSIF action == 'finish' %]
+	[% INCLUDE addUserFinishMessage %]
+[% END %]
+[% BLOCK addUserFinishMessage %]
+	[% message %]
+[% END %]
+[% BLOCK addUserForm %]
+	[% message %]
+	<form action="[%  c.uri_for('/admin/reseller/doAddUser') %]" method="post">
+	<font color="red">
+		[% c.localize('Please check all data you are entering before submit, they never will be checked in this version') %]
+	</red>
+		<table>
+			<tr>
+				<td>
+					<lable for="website">[% c.localize('Add to website') %]</lable>:
+				</td>
+				<td>
+					<select name="website">
+						<option value="1" selected="1" >[% c.localize('None') %]</option>
+						[% FOREACH item = websiteList %]<option value="[% item.website_id.id %]" >[% item.website_id.website_langs.website_name %]</option>
+						[%END%]
+					</select>
+				</td>
+			</tr>
+			<tr>
+				<td>
+					<lable for="username">[% c.localize('User Name') %]</lable>*:
+				</td>
+				<td>
+					<input type="text" name="username" value="[% params.username %]" /><br />
+				</td>
+			</tr>
+			<tr>
+				<td>
+					<lable for="password">[% c.localize('Password') %]</lable>*:
+				</td>
+				<td>
+					<input type="password" name="password" /><br />
+				</td>
+			</tr>
+			<tr>
+				<td>
+					<lable for="passwordConfirm">[% c.localize('Password Confirm') %]</lable>*:
+				</td>
+				<td>
+					<input type="password" name="passwordConfirm" /><br />
+				</td>
+			</tr>
+			<tr>
+				<td>
+					<lable for="fistname">[% c.localize('First Name') %]</lable>*:
+				</td>
+				<td>
+					<input type="text" name="firstname" value="[% params.firstname %]"/><br />
+				</td>
+			</tr>
+			<tr>
+				<td>
+					<lable for="lastname">[% c.localize('Last Name') %]</lable>*:
+				</td>
+				<td>
+					<input type="text" name="lastname" value="[% params.lastname %]" /><br />
+				</td>
+			</tr>
+			<tr>
+				<td>
+					<input type="submit" value="[% c.localize('Submit') %]" />
+					<input type="reset" value="[% c.localize('Reset') %]" />
+				</td>
+				<td>&nbsp</td>
+			</tr>
+	</form>
+[% END %]
+
+<a href="[% c.uri_for('/admin/reseller') %]">[% c.localize('Back') %]</a>
+[% INCLUDE modules/pageFooter.tt %]

Added: trunk/OzinoCMS/root/admin/reseller/addWebsite.tt
===================================================================
--- trunk/OzinoCMS/root/admin/reseller/addWebsite.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/admin/reseller/addWebsite.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,85 @@
+[% INCLUDE modules/pageHeader.tt %]
+[% IF action == 'AddWebsite' %]
+	[% INCLUDE addWebsiteForm %]
+[% ELSIF action == 'finish' %]
+	[% INCLUDE addWebsiteFinishMessage %]
+[% END %]
+[% BLOCK addWebsiteFinishMessage %]
+	[% message %]
+[% END %]
+[% BLOCK addWebsiteForm %]
+	[% message %]
+	<form action="[%  c.uri_for('/admin/reseller/doAddWebsite') %]" method="post">
+	<font color="red">
+		[% c.localize('Please check all data you are entering before submit, they never will be checked in this version') %]
+	</red>
+		<table>
+			<tr>
+				<td>
+					<lable for="admin">[% c.localize('Website Admin') %]</lable>*:
+				</td>
+				<td>
+					<select name="admin">
+						[% FOREACH item = userList %]<option value="[% item.id %]" [% IF item.id == params.admin %]selected="1"[% END %] >[% item.username %]</option>
+						[% END %]
+					</select>
+				</td>
+			</tr>
+
+			<tr>
+				<td>
+					<lable for="language">[% c.localize('Default Language') %]</lable>*:
+				</td>
+				<td>
+					<select name="language">
+						[% IF params.language %] [% selectedLanguage = params.language %] [% END %]
+						[% FOREACH item = languages %]<option value="[% item.id %]" [% IF item.id == selectedLanguage %]selected="1"[% END %] >[% item.name %]</option>
+						[% END %]
+					</select>
+				</td>
+			</tr>
+			<tr>
+				<td>
+					<lable for="name">[% c.localize('Website Name') %]</lable>*:
+				</td>
+				<td>
+					<input type="text" name="name" value="[% params.name %]" /><br />
+				</td>
+			</tr>
+			<tr>
+				<td>
+					<lable for="header">[% c.localize('Website Address Without HTTP://') %]</lable>*:
+				</td>
+				<td>
+					<input type="text" name="header" value="[% params.header %]" /><br />
+				</td>
+			</tr>
+
+			<tr>
+				<td>
+					<lable for="description">[% c.localize('Website Description') %]</lable>:
+				</td>
+				<td>
+					<input type="text" name="description" value="[% params.description %]" /><br />
+				</td>
+			</tr>
+			<tr>
+				<td>
+					<lable for="keywords">[% c.localize('Website Keywords') %]</lable>:
+				</td>
+				<td>
+					<input type="text" name="keywords" value="[% params.keywords %]" /><br />
+				</td>
+			</tr>
+			<tr>
+				<td>
+					<input type="submit" value="[% c.localize('Submit') %]" />
+					<input type="reset" value="[% c.localize('Reset') %]" />
+				</td>
+				<td>&nbsp</td>
+			</tr>
+	</form>
+[% END %]
+
+<a href="[% c.uri_for('/admin/reseller') %]">[% c.localize('Back') %]</a>
+[% INCLUDE modules/pageFooter.tt %]

Added: trunk/OzinoCMS/root/admin/reseller/viewSingleWebsite.tt
===================================================================
--- trunk/OzinoCMS/root/admin/reseller/viewSingleWebsite.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/admin/reseller/viewSingleWebsite.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,30 @@
+[% INCLUDE modules/pageHeader.tt %]
+
+[% c.localize('Website Information') %] :
+<hr />
+[% c.localize('Website ID') %]: [% website.id %]<br />
+[% c.localize('Website Default Language') %]: [% website.default_language_id.name %]<br />
+[% c.localize('Website Default Skin') %]: [% website.default_skin_id %]<br />
+<hr />
+[% c.localize('Website Addresses') %]:
+[% IF ( headers ) %]
+	[% FOREACH item = headers %]
+		<a href="http://[% item.header %]" target="_blank" >[% item.header %]</a>
+	[%END%]
+[% END %]
+<hr />
+[% c.localize('Website Names') %]:<br />
+[% IF ( languages ) %]
+	[% FOREACH item = languages %]
+		[% c.localize('Language') %]: [% item.language_id.name %],
+		[% c.localize('Name') %]: [% item.website_name %],<br />
+		[% c.localize('Description') %]: [% item.website_description %],<br />
+		
+		<a href="http://[% item.header %]" target="_blank" >[% item.header %]</a>
+	[%END%]
+[% END %]
+
+<br />
+
+<a href="[% c.uri_for('/admin/reseller') %]">[% c.localize('Back') %]</a>
+[% INCLUDE modules/pageFooter.tt %]

Added: trunk/OzinoCMS/root/admin/reseller/websiteList.tt
===================================================================
--- trunk/OzinoCMS/root/admin/reseller/websiteList.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/admin/reseller/websiteList.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,15 @@
+[% c.localize('List of All Websites') %]
+	<div id="headerMsg">[% c.localize(message) %]</div>
+	<div id="websiteList">
+		[% IF ( websiteList ) %]
+			<ul>
+			[% FOREACH item = websiteList %]
+				<li>
+					[% item.website_id.website_langs.website_name %]
+					<a href="[% c.uri_for('/admin/reseller/viewWebsite' item.website_id.id) %]">[% c.localize('View') %]</a>
+					<a href="[% c.uri_for('/admin/reseller/editWebsite' item.website_id.id) %]">[% c.localize('Edit') %]</a>
+				</li>
+			[%END%]
+			</ul>
+		[% END %]
+	</div>

Added: trunk/OzinoCMS/root/admin/reseller.tt
===================================================================
--- trunk/OzinoCMS/root/admin/reseller.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/admin/reseller.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,9 @@
+[% INCLUDE modules/pageHeader.tt %]
+
+<br />
+[% content %]
+
+<a href="[% c.uri_for('/admin/reseller/addWebsite') %]">[% c.localize('Add Website') %]</a>
+<a href="[% c.uri_for('/admin/reseller/addUser') %]">[% c.localize('Add User') %]</a>
+
+[% INCLUDE modules/pageFooter.tt %]

Added: trunk/OzinoCMS/root/admin/root/resellerList.tt
===================================================================
--- trunk/OzinoCMS/root/admin/root/resellerList.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/admin/root/resellerList.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,40 @@
+[% c.localize('List of All Resellers') %]
+	<div id="headerMsg">[% c.localize(message) %]</div>
+	<div id="resellerList">
+		[% IF ( resellerList ) %]
+			<table>
+				<tr>
+					<th> [% c.localize('Username') %] </th>
+					<th> [% c.localize('Status') %] </th>
+					<th> [% c.localize('View') %] </th>
+					<th> [% c.localize('Edit') %] </th>
+					<th> [% c.localize('Charge') %] </th>
+					<th> [% c.localize('Delete') %] </th>
+				</tr>
+				[% FOREACH item = resellerList %]
+					<tr>
+						<td> [% item.id.username %] </td>
+						<td id="[% item.id.username %]Status">
+							[% IF item.id.enable %]
+								[% content = c.localize('Disable') %]
+								[% url = c.uri_for('/admin/root/enableDisableReseller' item.id.id ) %]
+							[% ELSE %]
+								[% content = c.localize('Enable') %]
+								[% url = c.uri_for('/admin/root/enableDisableReseller' item.id.id ) %]
+							[% END %]
+							[% c.prototype.link_to_remote (
+									content,	
+									update => item.id.username _ 'Status',
+									url = url, 
+								)
+							%]
+						</td>						
+						<td><a href="[% c.uri_for('/admin/root/viewSingleReseller' item.id.id) %]">[% c.localize('View') %]</a></td>
+						<td><a href="[% c.uri_for('/admin/root/edit' item.id.id) %]">[% c.localize('Edit') %]</a></td>
+						<td><a href="[% c.uri_for('/admin/root/charge' item.id.id) %]">[% c.localize('Charge') %]</a></td>
+						<td><a href="[% c.uri_for('/admin/root/delete' item.id.id) %]">[% c.localize('Delete') %]</a></td>
+					</tr>
+				[%END%]
+			</table>
+		[% END %]
+	</div>

Added: trunk/OzinoCMS/root/admin/root/singleReseller.tt
===================================================================
--- trunk/OzinoCMS/root/admin/root/singleReseller.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/admin/root/singleReseller.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,37 @@
+[% c.localize('User ID') %]: [% reseller.id.id %] <br />
+[% c.localize('Username') %]: [% reseller.id.username %] <br />
+[% c.localize('Firstname') %]: [% reseller.id.firstname %] <br />
+[% c.localize('Lastname') %]: [% reseller.id.lastname %] <br />
+[% IF reseller.id.enable %] 
+	[% Enable = "Enable" %]
+[% ELSE %]
+	[% Enable = "Disable" %]
+[% END %]
+[% c.localize('Status') %]: [%  c.localize( Enable ) %]
+
+<hr />
+[% c.localize('Credit') %]: <br />
+[% c.localize('Headers Left') %]: [% reseller.credit_headers_left %] <br />
+[% c.localize('Users Left') %]: [% reseller.credit_users_left %] <br />
+[% c.localize('Xfer Left') %]: [% reseller.credit_xfer_left %] <br />
+<hr />
+[% c.localize('List of All Websites') %]
+<div id="headerMsg">[% c.localize(message) %]</div>
+<div id="websiteList">
+	[% IF ( websites ) %]
+		<ul>
+			[% FOREACH item = websites %]
+				<li>
+					[% IF item.get_column('website_id') == reseller.id.get_column('website_id') %] Default Website [% END %]
+					[% item.website_id.website_langs.website_name %]
+					<a href="[% c.uri_for('/admin/reseller/viewWebsite' item.website_id.id) %]">[% c.localize('View') %]</a>
+					<a href="[% c.uri_for('/admin/reseller/editWebsite' item.website_id.id) %]">[% c.localize('Edit') %]</a>
+				</li>
+			[%END%]
+		</ul>
+	[% END %]
+</div>
+
+
+<a href="[% c.uri_for('/admin/root/listResellers' item.website_id.id) %]">[% c.localize('Back') %]</a>
+

Added: trunk/OzinoCMS/root/admin/root.tt
===================================================================
--- trunk/OzinoCMS/root/admin/root.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/admin/root.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,13 @@
+[% INCLUDE modules/pageHeader.tt %]
+[% message %]
+
+[% content %]
+
+<br /><br />
+<a href="[% c.uri_for('/admin/root/addReseller' item.id.id) %]">[% c.localize('Add Reseller') %]</a>
+<br />
+<a href="[% c.uri_for('/admin' item.id.id) %]">[% c.localize('Back') %]</a>
+
+
+
+[% INCLUDE modules/pageFooter.tt %]

Added: trunk/OzinoCMS/root/admin/website.tt
===================================================================
--- trunk/OzinoCMS/root/admin/website.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/admin/website.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,6 @@
+[% subMenu = 'website' %]
+[% activeMenu = 'website' %]
+[% INCLUDE admin/header.tt %]	
+
+
+[% INCLUDE admin/footer.tt %]	

Added: trunk/OzinoCMS/root/admin_admin-back.tt
===================================================================
--- trunk/OzinoCMS/root/admin_admin-back.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/admin_admin-back.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,71 @@
+[% c.prototype.link_to_remote('Languages list', {
+	update  => 'ozinoCMSManagmentContainer',
+	url     => c.uri_for('/admin/editLanguages' item.site_id.id),
+}) %]
+|
+[% c.prototype.link_to_remote('New', {
+        update  => 'ozinoCMSManagmentContainer',
+        url     => c.uri_for('/admin/addLanguage'),
+}) %]
+		
+<div id="languagesContainer">
+
+</div>
+
+[% url = '/category' %]
+[% c.prototype.link_to_remote('Category list', {
+	update  => 'ozinoCMSManagmentContainer',
+	url     => c.uri_for( url ),
+	evalScripts => 'true',
+}) %] |
+[% url = '/category/addCategory' %]
+[% c.prototype.link_to_remote('New', {
+	update  => 'ozinoCMSManagmentContainer',
+	url     => c.uri_for( url  ),
+	evalScripts => 'true',
+
+}) %]|
+[% c.prototype.link_to_remote('New translate', {
+        update  => 'ozinoCMSManagmentContainer',
+	url     => c.uri_for('/category/addTranslate'),
+}) %]
+		
+<div id="categoryContainer">
+
+</div>
+
+[% c.prototype.link_to_remote('Pages list', {
+                update  => 'ozinoCMSManagmentContainer',
+                url     => c.uri_for('/pages/showPages'),
+}) %]|
+[% c.prototype.link_to_remote('New', {
+        update  => 'ozinoCMSManagmentContainer',
+	        url     => c.uri_for('/pages/addPage'),
+}) %]
+		
+<div id="pagesContainer">
+</div>
+
+Scripts:
+<div id="scriptsContainer">
+[% c.prototype.link_to_remote('Edit', {
+                update  => 'ozinoCMSManagmentContainer',
+                url     => c.uri_for('/admin/editWebsite' item.site_id.id),
+}) %]
+</div>
+
+Style:
+<div id="styleContainer">
+[% c.prototype.link_to_remote('Edit', {
+                update  => 'ozinoCMSManagmentContainer',
+                url     => c.uri_for('/admin/editWebsite' item.site_id.id),
+}) %]
+</div>
+
+Template:
+<div id="templateContainer">
+[% c.prototype.link_to_remote('Edit', {
+                update  => 'ozinoCMSManagmentContainer',
+                url     => c.uri_for('/admin/editWebsite' item.site_id.id),
+}) %]
+</div>

Added: trunk/OzinoCMS/root/core/navigation/list.tt
===================================================================
--- trunk/OzinoCMS/root/core/navigation/list.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/core/navigation/list.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,32 @@
+<center>[% IF message %]<div class="message">[% message %]</div>[% END %]</center>
+[%
+	SWITCH viewType;
+	CASE 1;
+		INCLUDE tableView;
+	END;
+%]
+
+[% BLOCK tableView %]
+	<br />
+	<table id="categoryLanguage">
+		<tr align="center">
+			<td>[% c.localize('Name') %]</td>
+			<td>[% c.localize('Description') %]</td>
+			<td>[% c.localize('Items') %]</td>
+			<td>[% c.localize('Actions') %]</td>
+		</tr>
+		[% FOREACH item IN navList %]
+			<tr align="center">
+				<td>[% item.nav_name %]</td>
+				<td>[% IF !(item.nav_desc) %]&nbsp;[% ELSE %][% item.nav_desc %][% END %]</td>
+				<td>
+					<a href="[% c.uri_for('/admin/website/navigation/manageItem/') _ item.id %]">[% c.localize('Items') %]</a>
+				</td>
+				<td>
+					<a href="[% c.uri_for('/admin/website/navigation/addEdit?id=') _ item.id %]"><img border="none" src="/static/images/icon/edit.png" alt="Edit" name="Edit" title="Edit" /></a>
+					<a href="[% c.uri_for('/admin/website/navigation/remove/') _ item.id %]" onclick="if (confirm('Are you sure ?')) { new Ajax.Updater( 'contentArea', '[% c.uri_for('/admin/website/navigation/remove/') _ item.id %]', { asynchronous: 1,evalScripts: true } ) }; return false"><img border="none" src="/static/images/icon/delete.png" alt="Remove" name="Remove" title="Remove" /></a>
+				</td>
+			</tr>
+		[% END %]
+	</table>
+[% END %]

Added: trunk/OzinoCMS/root/core/navigation/listItem.tt
===================================================================
--- trunk/OzinoCMS/root/core/navigation/listItem.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/core/navigation/listItem.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,67 @@
+<table id="categoryLanguage">
+	<tr align="center">
+		<td colspan="8" class="title" align="center">[% navName %]</td>
+	</tr>
+	<tr align="center">
+	<!--	<td><a href="#" onclick="">[% c.localize('All') %]</a></td> -->
+		<td>[% c.localize('No.') %]</td>
+		<td>[% c.localize('Type') %]</td>
+		<td>[% c.localize('Title') %]</td>
+		<td>[% c.localize('Depth') %]</td>
+		<td>[% c.localize('Show') %]</td>
+		<td>[% c.localize('Show Parent') %]</td>
+		<td>[% c.localize('Separator') %]</td>
+		<td>[% c.localize('Actions') %]</td>
+	</tr>
+
+<!--	<form name="navSelectedItem" method="post" action="[% c.uri_for('/admin/website/navigation/removeItem/') _ navId %]" onsubmit="if (confirm('Are you sure ?')) { new Ajax.Request(  '[% c.uri_for('/admin/website/navigation/removeItem/') _ navId %]', { parameters: Form.serialize(this),asynchronous: 1,evalScripts: true } ) ; return false"> -->
+	[% 	
+		count = 1;
+		changeOrderUrl = c.uri_for('/admin/website/navigation/setItemOrder/');
+		FOREACH item IN navItems;
+	%]
+		<tr align="center">
+	<!--		<td><input type="checkbox" name="navItem" value="[% count - 1 %]"></td> -->
+			<td>[% count %]</td>
+			<td>[% index = item.type - 1; c.config.navigation.types.$index.title; %]</td>
+			<td>[% IF item.title; item.title; ELSE; %]N / A[% END %]</td>
+			<td>[% IF item.depth AND item.depth == -1 %]All[% ELSIF item.depth; item.depth; ELSE; %]N / A[% END %]</td>
+			<td>
+				[% IF item.show_only %]
+					[%
+						SWITCH item.show_only;
+						CASE -1;
+							c.localize('All');
+						CASE 1;
+							c.localize('Category');
+						CASE 2;
+							c.localize('Page');
+						END;
+					%]
+				[% ELSE %]N / A[% END %]</td>
+			<td>[% IF item.show_parent %][% IF item.show_parent == 1; c.localize('Yes'); ELSE; c.localize('No'); END; %][% ELSE %]N / A[% END %]</td>
+			<td>[% IF item.separator; item.separator; ELSE; %]N / A[% END %]</td>
+			<td align="right">
+				[% IF count != 1;
+					updaterUrl = changeOrderUrl _ navId _ '/' _ count _ '/0';
+					updaterContainer = "contentArea";
+					updaterContent = '<img border="none" src="/static/images/icon/up.png" alt="Up" name="Up" title="Up" />';
+					INCLUDE modules/ajaxupdater.tt; 
+				   END ; %]
+				[% IF count != navItems.size; 
+					updaterUrl = changeOrderUrl _ navId _ '/' _ count _ '/1';
+					updaterContainer = "contentArea";
+					updaterContent = '<img border="none" src="/static/images/icon/down.png" alt="Down" name="Down" title="Down" />';
+					INCLUDE modules/ajaxupdater.tt; 
+				   END ;%]
+				<a href="[% c.uri_for('/admin/website/navigation/addEditItem/') _ navId _ '/' _ count %]"><img border="none" src="/static/images/icon/edit.png" alt="Edit" name="Edit" title="Edit" /></a>
+				<a href="[% c.uri_for('/admin/website/navigation/removeItem/') _ navId _ '/' _ count %]" onclick="if (confirm('Are you sure ?')) { new Ajax.Updater( 'contentArea', '[% c.uri_for('/admin/website/navigation/removeItem/') _ navId _ '/' _ count %]', { asynchronous: 1,evalScripts: true } ) }; return false"><img border="none" src="/static/images/icon/delete.png" alt="Remove" name="Remove" title="Remove" /></a>
+			</td>
+		</tr>
+	[% 
+		count = count + 1;
+		END;
+	%]
+	<!--	<tr><td colspan="6" align="right"><a href="javascript:if (confirm('Are you sure ?')) { document.navSelectedItem.submit(); }">Remove selected</a></td></tr> -->
+<!--	</form> -->
+</table>

Added: trunk/OzinoCMS/root/core/navigation/resultList.tt
===================================================================
--- trunk/OzinoCMS/root/core/navigation/resultList.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/core/navigation/resultList.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,37 @@
+[% 
+	IF showIsNormalList;
+		INCLUDE normalList;
+	ELSIF toHereList;
+		INCLUDE toHere;
+	END;
+%]
+
+[% BLOCK normalList %]
+	[% IF catPageList.size %]
+		<div id="nav_[% navId %]">
+			<center>[% message %]</center>
+			[%
+				firstDepth = catPageList.0.depth; 
+				tmpDepth = firstDepth;
+			%]
+			<ul>
+			[% FOREACH cat = catPageList %]
+				[% IF cat.depth > tmpDepth %]<ul>[% tmpDepth = cat.depth %][% ELSIF cat.depth < tmpDepth %][% counter = 1 %][% WHILE counter <= ( tmpDepth - cat.depth ) %]</ul>[% counter = counter + 1 %][% END %][% tmpDepth = cat.depth %][% END %]
+				<li class="nav_[% IF cat.page_id %]page[% ELSE %]category[% END %]">
+					[% IF (!cat.page_id OR cat.catLang ) AND cat.default_page_id %]<a href="[% c.uri_for('/_getPageContent/') _ cat.default_page_id %]">[% c.localize(cat.title) %]</a>[% ELSIF ( cat.page_id OR cat.pageLang ) %]<a href="[% c.uri_for('/_getPageContent/') _ cat.id %]">[% c.localize(cat.title) %]</a>[% ELSE; c.localize(cat.title); END; %]
+				</li>
+			[% END %]
+			[% counter = firstDepth + 1 %][% WHILE counter <= tmpDepth %]</ul>[% counter = counter + 1 %][% END %]
+			</ul>
+		</div>
+	[% END %]
+[% END %]
+
+[% BLOCK toHere %]
+	<div id="nav_[% navId %]">
+		[% first = 1 %]
+		[% FOREACH cat = catPageList %]
+			[% IF !first %] [% separator %] [% ELSE %][% first = 0 %][% END %][% IF (!cat.page_id OR cat.catLang ) AND cat.default_page_id %]<a href="[% c.uri_for('/_getPageContent/') _ cat.default_page_id %]">[% c.localize(cat.title) %]</a>[% ELSIF ( cat.page_id OR cat.pageLang ) %]<a href="[% c.uri_for('/_getPageContent/') _ cat.id %]">[% c.localize(cat.title) %]</a>[% ELSE; c.localize(cat.title); END; %]
+		[% END %]
+	</div>
+[% END %]

Added: trunk/OzinoCMS/root/default.tt
===================================================================
--- trunk/OzinoCMS/root/default.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/default.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,2 @@
+default.tt <br />
+we will replace it with user's default website's template page

Added: trunk/OzinoCMS/root/emailBody/lostPassword.tt
===================================================================
--- trunk/OzinoCMS/root/emailBody/lostPassword.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/emailBody/lostPassword.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+<head>
+</head>
+
+<body>
+Someone has asked to reset the password for the following site and username.<br />
+
+[% cms.website.header %]<br />
+Username: [% username %]<br />
+
+To reset your password  
+<a href="[% c.req.base  %]newPassword/[% key %]">Click here </a>
+, otherwise just ignore this email and nothing will happen.
+
+</body>
+</html>

Added: trunk/OzinoCMS/root/emailBody/newPassword.tt
===================================================================
--- trunk/OzinoCMS/root/emailBody/newPassword.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/emailBody/newPassword.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+<head>
+</head>
+
+<body>
+
+
+[% cms.website.header %]<br />
+Username: [% username %]<br />
+Password: [% newPassword %]
+
+<br />You can login form <a href="[% c.req.base  %]login"> [% c.req.base %]</a>
+
+</body>
+</html>

Added: trunk/OzinoCMS/root/favicon.ico
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/favicon.ico
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/files/list.tt
===================================================================
--- trunk/OzinoCMS/root/files/list.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/files/list.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,33 @@
+<table cellpadding="0" cellspacing="0">
+	[% FOR item = files %]
+		[%
+			fileUrl = c.uri_for('/static/webfiles/website_') _ item.website_id _ '/' _ item.id _ '.' _ item.ext;
+			IF item.type.match('image');
+				imgUrl = c.uri_for('/static/webfiles/website_') _ item.website_id _ '/' _ item.id _ '_' _ c.config.files.image.thumbnail_size _ 'px.' _ item.ext;
+			ELSE;
+				imgUrl = c.uri_for('/static/images/icon/') _ item.icon;
+			END;
+		%]
+
+		  <tr>
+			<td rowspan="2" style="text-align:center; padding: 5px; background-color: #f9f9f9 ">
+				<a href="[% fileUrl %]"><img style="border: 1px solid #f3f3f3; background-color: #fdfdfd; padding: 5px" src="[% imgUrl %]" alt="[% item.title %]" /></a>
+			</td>
+			<td style="width:550px; padding: 5px; background-color: #f9f9f9;" valign="top">
+				<strong>[% item.title %]</strong><br />
+				[% item.description %]
+			</td>
+		  </tr>
+		  <tr>
+		  	<td style="width:550px; padding: 0px 5px 0px 5px; background-color: #f9f9f9; height: 15px; ">
+				<div style="text-align: right; border: 1px solid #f3f3f3; background-color: #fdfdfd; margin: 5px 0px; padding: 3px">
+					<a href="[% c.uri_for('/admin/website/file/edit/') _ item.id %]"><img border="none" src="/static/images/icon/edit.png" alt="Edit" name="Edit" title="Edit" /></a>
+					<a href="#" onclick="if (confirm('Are you sure?')) { window.location.href='[% c.uri_for('/admin/website/file/remove/') _ item.id %]' }" ><img border="none" src="/static/images/icon/delete.png" alt="Remove" name="Remove" title="Remove" /></a>
+				</div>
+			</td>
+		  </tr>
+		   <tr>
+		   		<td colspan="2">&nbsp;</td>
+		   </tr>
+	[% END %]
+</table>

Added: trunk/OzinoCMS/root/files/upload.tt
===================================================================
--- trunk/OzinoCMS/root/files/upload.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/files/upload.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,62 @@
+[%
+	subMenu = "website";
+	activeMenu = 'website';
+	includeUpload = 1;
+	INCLUDE admin/header.tt;
+	
+	SWITCH back;
+	CASE 'fileMng';
+		cancelUrl = c.uri_for('/admin/website/file');
+	END;
+%]
+
+	<div id="addCategoryheader">
+		<div id="line_">
+			<div style="float: left">[% c.localize('Upload Files') %]</div>
+		</div>
+	</div>
+	<div style="clear:both;"></div>
+	<div id="contentArea">
+		[% INCLUDE formWidget %]
+	</div> 
+
+[% INCLUDE admin/footer.tt %]
+
+[% BLOCK formWidget %]
+	<div id="uploadForm">
+		[% IF message %]<center><div class="message">[% message %]</div></center>[% END %]
+		<form action="/core/file/upload/doUpload?back=[% back %]"
+			method="post"
+			enctype="multipart/form-data"
+			onsubmit="return startEmbeddedProgressBar(this);">
+			<table>
+				<tr>
+					<td>[% c.localize('Title') %]:</td>
+					<td><input type="text" name="title" value="[% formData.title %]" /></td>
+				</tr>
+				<tr>
+					<td>[% c.localize('Description') %]:</td>
+					<td><textarea name="description" col="30">[% formData.description %]</textarea></td>
+				</tr>
+				<tr>
+					<td colspan="2">
+						<fieldset>
+							<legend>[% c.localize('Select a file to upload') %]</legend>
+							<label for="file_max_size">[% c.localize('Select a file smaller than ') _ '<b>' _ c.config.files.max_size.h_size_title %]</b>.</label><br />
+							<label for="upload_file">[% c.localize('File') %]: </label>
+							<input type="file" name="file" />
+						</fieldset>
+					</td>
+				</tr>
+				<tr>
+					<td align="right" colspan="2">
+						<input type="submit" value="[% c.localize('Upload') %]" />
+						<input type="button" value="[% c.localize('Cancel') %]" onclick="window.location.href='[% cancelUrl %]'" />
+					</td>
+				</tr>
+			</table>
+		</form>
+	</div>
+
+	<div id="progress"></div>
+[% END %]

Added: trunk/OzinoCMS/root/login.tt
===================================================================
--- trunk/OzinoCMS/root/login.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/login.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,47 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+<title>[% title %]</title>
+<link type="text/css" href="[% c.uri_for('/static/style/login.css') %]" media="screen" rel="stylesheet" />
+<script>
+function setFocus(){
+        document.login.username.focus();
+}
+</script>
+</head>
+
+<body onLoad=setFocus() >
+<form action="[% c.req.base %]login" method="post" id="login" name="login">
+<div id="wrapper">
+	<div id="topCorner"></div>
+	<div id="container">
+		<div id="inputFormContainer">
+			<a href="http://cms.ozino.com/" id="logo" ></a>
+			<div [% IF c.stash.error  %]style="display:block;" [% END %] id="loginError">[% c.stash.error %]</div>
+			<div [% IF c.stash.error  %]style="display:block;" [% END %] id="inputMessage"><a href="http://www.ozino.com/help/enablecookie"><strong>[% c.localize('Note') %]:</strong> [% c.localize('You must enable cookies to use this site') %]</a></div>
+			<div id="formElements">
+				<label for="username" class="txt">[% c.localize('username') %]:</lable><input name="username" id="username" type="text" class="loginTxt" />
+				<label for="password" class="txt">[% c.localize('password') %]:</lable><input name="password" type="password" class="loginTxt" />
+				<div id="chkBoxContainer">
+					<input type="checkbox" id="chkBox" /><label class="txt"> Remember me</label>
+				</div>
+				<div style="margin-top: 1.5em; text-align: right">
+					<input type="submit" class="submit" value="[%   c.localize('Login &raquo;') %]" />
+					<input type="hidden" value="1" name="submit">
+					<input type="hidden" value="[% nextPage %]" name="nextPage">
+				</div>
+			</div>
+				<div id="loginHotLinks" >
+					<a id="loginBack2Web" href="[% c.req.base %]">Back to website</a>
+					<a id="loginResetPassword" href="[% c.req.base %]auth/lostPassword">[% c.localize('Lost your password') %]?</a>
+				</div>
+				<div class="clearBoth"></div>
+			
+		</div>
+	</div>
+	<div id="bottomCorner"></div>	
+</div>
+</form>
+</body>
+</html>

Added: trunk/OzinoCMS/root/lostPassword.tt
===================================================================
--- trunk/OzinoCMS/root/lostPassword.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/lostPassword.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,43 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+<title>[% title %]</title>
+<link type="text/css" href="[% c.uri_for('/static/style/login.css') %]" media="screen" rel="stylesheet" />
+<script>
+function setFocus(){
+        document.login.username.focus();
+}
+</script>
+</head>
+
+<body onLoad=setFocus() >
+<form action="[% c.req.base %]auth/lostPassword" method="post" id="login" name="login">
+<div id="wrapper">
+	<div id="topCorner"></div>
+	<div id="container">
+		<div id="inputFormContainer">
+			<a href="http://cms.ozino.com/" id="logo" ></a>
+			<div [% IF c.stash.error  %]style="display:block;" [% END %] id="loginError">[% c.stash.error %]</div>
+			<div style="display:block;" id="inputMessage">[% c.localize('Please enter your username and e-mail address. You will receive a new password via e-mail') %]. </div>
+			<div id="formElements">
+				<label for="username" class="txt">[% c.localize('username') %]:</lable><input name="username" id="username" type="text" class="loginTxt" />
+				<label for="email" class="txt">[% c.localize('E-mail') %]:</lable><input name="email" type="text" class="loginTxt" />
+				<div style="margin-top: 1.5em; text-align: right">
+					<input type="submit" class="submit" value="[%   c.localize('Get New Password &raquo;') %]" />
+					<input type="hidden" value="1" name="submit">
+				</div>
+			</div>
+				<div id="loginHotLinks" >
+					<a id="loginResetPassword" href="[% c.req.base %]login">[% c.localize('Login Page') %]</a>
+					<a id="loginBack2Web" href="[% c.req.base %]">[% c.localize('Back to website') %]</a>
+				</div>
+				<div class="clearBoth"></div>
+			
+		</div>
+	</div>
+	<div id="bottomCorner"></div>	
+</div>
+</form>
+</body>
+</html>

Added: trunk/OzinoCMS/root/modules/ajaxupdater.tt
===================================================================
--- trunk/OzinoCMS/root/modules/ajaxupdater.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/modules/ajaxupdater.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1 @@
+<a href="[% updaterUrl %]" onclick=" [% IF confirm %] if (confirm('[% confirm %]')) { [% END %] new Ajax.Updater( '[% updaterContainer %]', '[% updaterUrl %]', { asynchronous: 1,evalScripts: true } );  [% IF confirm %] } [% END %] return false"> [% updaterContent %]</a>

Added: trunk/OzinoCMS/root/modules/includeScripts.tt
===================================================================
--- trunk/OzinoCMS/root/modules/includeScripts.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/modules/includeScripts.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,11 @@
+<script type="text/javascript" src="[% c.uri_for('/static/javascript/prototype.js') %]"></script>
+<script type="text/javascript" src="[% c.uri_for('/static/javascript/common.js') %]"></script>
+
+[% IF includeTinyMce %]
+	<script type="text/javascript" src="[% c.uri_for('/static/javascript/tiny_mce/tiny_mce.js') %]"></script>
+[% END %]
+[% IF includeUpload %]
+	<link type="text/css" href="[% c.uri_for('/static/style/progress.css') %]" rel="stylesheet" />
+	<script type="text/javascript" src="[% c.uri_for('/static/javascript/progress.js') %]"></script>
+	<script type="text/javascript" src="[% c.uri_for('/static/javascript/progress.jmpl.js') %]"></script>
+[% END %]

Added: trunk/OzinoCMS/root/modules/navTypeList.tt
===================================================================
--- trunk/OzinoCMS/root/modules/navTypeList.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/modules/navTypeList.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,11 @@
+[% IF isSelectBox %]
+	[% INCLUDE selectBoxWidget %]
+[% END %]
+
+[% BLOCK selectBoxWidget %]
+	<select name="type" onchange="new Ajax.Updater( 'navItemsWidgetsArea',  '[% c.uri_for('/admin/website/navigation/loadNavWidget/') %]' + this.value, { asynchronous: 1 } ) ; return false;">
+	[% FOREACH item = c.config.navigation.types %]
+		<option value="[% item.id %]" [% IF item.id == formData.type %]selected[% END %]>[% item.title %]</option>
+	[% END %]
+	</select>
+[% END %]

Added: trunk/OzinoCMS/root/modules/pageFooter.tt
===================================================================
--- trunk/OzinoCMS/root/modules/pageFooter.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/modules/pageFooter.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,2 @@
+</body>
+</html>

Added: trunk/OzinoCMS/root/modules/pageHeader.tt
===================================================================
--- trunk/OzinoCMS/root/modules/pageHeader.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/modules/pageHeader.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,12 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+	<title>[% Title %]</title>
+	<link type="text/css" href="[% c.uri_for('/static/style/style.css') %]" rel="stylesheet" />
+        <link type="text/css" href="[% c.uri_for('/static/style/add-style.css') %]" rel="stylesheet" />
+
+	[% INCLUDE modules/includeScripts.tt %]
+
+</head>
+<body>

Added: trunk/OzinoCMS/root/modules/showErrorInput.tt
===================================================================
--- trunk/OzinoCMS/root/modules/showErrorInput.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/modules/showErrorInput.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,11 @@
+[% IF c.form.has_error || passerror %]
+	<div class="message">
+	[% IF passerror != ''%]
+		[% passerror %]<br />
+	[% END %]
+        [% FOREACH message IN c.form.messages() %]
+        	[% c.localize(message) %]<br />
+        [% END %]
+	</div>
+[% END %]
+										

Added: trunk/OzinoCMS/root/modules/showInfoMessage.tt
===================================================================
--- trunk/OzinoCMS/root/modules/showInfoMessage.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/modules/showInfoMessage.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,5 @@
+[% IF(message) %]
+<div class="message">
+	[% message %]
+</div>
+[% END %]
\ No newline at end of file

Added: trunk/OzinoCMS/root/modules/showLanguages.tt
===================================================================
--- trunk/OzinoCMS/root/modules/showLanguages.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/modules/showLanguages.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,11 @@
+[% IF showLangIsSelectBox %]
+	[% INCLUDE selectBoxWidget %]
+[% END %]
+
+[% BLOCK selectBoxWidget %]
+	<select name="language_id" [% IF !isAdd AND formData.language_id == cms.website.default_language_id %]disabled[% END %]>
+		[% FOREACH item = languageList.all %]
+			<option value="[% item.id %]" [% IF item.id == defaultLangId or item.id == formData.language_id %]selected[% END %]>[% item.language_name %]</option>
+		[% END %]
+	</select>
+[% END %]

Added: trunk/OzinoCMS/root/modules/showMulSelGroupsUsers.tt
===================================================================
--- trunk/OzinoCMS/root/modules/showMulSelGroupsUsers.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/modules/showMulSelGroupsUsers.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,24 @@
+<select name="[% multSelGroupUserNameVal %]" multiple size="8" >
+	<OPTGROUP label="Groups">
+	[% FOREACH group IN groups %]
+		[% IF multSelGroupUserNameVal == 'viewPermission' and formData.viewPermission %]
+			<option value="g_[% group.id %]" [% FOREACH groupId IN formData.viewPermission.groups %][% IF group.id == groupId %]selected[% END %][% END %]>[% group.group_name %]</option>
+		[% ELSIF multSelGroupUserNameVal == 'editPermission' and formData.editPermission %]
+			<option value="g_[% group.id %]" [% FOREACH groupId IN formData.editPermission.groups %][% IF group.id == groupId %]selected[% END %][% END %]>[% group.group_name %]</option>
+		[% ELSE %]
+			<option value="g_[% group.id %]" [% IF multSelGroupUserNameVal == 'viewPermission' and group.group_name == c.localize('Everyone') %]selected[% END %] >[% group.group_name %]</option>
+		[% END %]
+	[% END %]
+	</OPTGROUP>
+	<OPTGROUP label="Users">
+	[% FOREACH user IN users %]
+		[% IF multSelGroupUserNameVal == 'viewPermission' and formData.viewPermission %]
+			<option value="u_[% user.id %]" [% FOREACH userId IN formData.viewPermission.users %][% IF user.id == userId %]selected[% END %][% END %]>[% user.username %] [ [% user.firstname %] [% user.lastname %] ]</option>
+		[% ELSIF multSelGroupUserNameVal == 'editPermission' and formData.editPermission %]
+			<option value="u_[% user.id %]" [% FOREACH userId IN formData.editPermission.users %][% IF user.id == userId %]selected[% END %][% END %]>[% user.username %] [ [% user.firstname %] [% user.lastname %] ]</option>
+		[% ELSE %]
+			<option value="u_[% user.id %]" [% IF multSelGroupUserNameVal == 'editPermission' and user.username == c.user.username %]selected[% END %] >[% user.username %] [ [% user.firstname %] [% user.lastname %] ]</option>
+		[% END %]
+	[% END %]
+	</OPTGROUP>
+</select>

Added: trunk/OzinoCMS/root/modules/skinList.tt
===================================================================
--- trunk/OzinoCMS/root/modules/skinList.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/modules/skinList.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,11 @@
+[% IF showSkinIsSelectBox %]
+	[% INCLUDE selectBoxWidget %]
+[% END %]
+
+[% BLOCK selectBoxWidget %]
+	<select name="default_skin_id">
+	[% FOREACH item = skinList.all %]
+		<option value="[% item.id %]" [% IF item.id == formData.default_skin_id OR ( !formData.default_skin_id AND item.id == defaultSkinId ) %]selected[% END %]>[% item.file_name %]</option>
+	[% END %]
+	</select>
+[% END %]

Added: trunk/OzinoCMS/root/modules/statusList.tt
===================================================================
--- trunk/OzinoCMS/root/modules/statusList.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/modules/statusList.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,6 @@
+<select name="status">
+	[% FOREACH status = c.config.general.statuses %]
+		<option value="[% status.value %]" [% IF status.value == formData.status %]selected[% END %]>[% c.localize(status.title) %]</option>
+	[% END %]
+</select>
+

Added: trunk/OzinoCMS/root/notFound.tt
===================================================================
--- trunk/OzinoCMS/root/notFound.tt	                        (rev 0)
+++ trunk/OzinoCMS/root/notFound.tt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,3 @@
+
+<font color"red"> [% siteName %] not found<br />
+please contact ozino cms administrator a-dministrator_ozino_com

Added: trunk/OzinoCMS/root/static/images/adminHotLinkBack.png
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/adminHotLinkBack.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/background.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/background.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/bar.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/bar.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/btn_120x50_built.png
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/btn_120x50_built.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/btn_120x50_built_shadow.png
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/btn_120x50_built_shadow.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/btn_120x50_powered.png
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/btn_120x50_powered.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/btn_120x50_powered_shadow.png
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/btn_120x50_powered_shadow.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/btn_88x31_built.png
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/btn_88x31_built.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/btn_88x31_built_shadow.png
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/btn_88x31_built_shadow.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/btn_88x31_powered.png
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/btn_88x31_powered.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/btn_88x31_powered_shadow.png
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/btn_88x31_powered_shadow.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/catalyst_logo.png
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/catalyst_logo.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/fade-butt.png
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/fade-butt.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/header.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/header.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/help-browser.png
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/help-browser.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/icon/acroread.png
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/icon/acroread.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/icon/add.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/icon/add.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/icon/add.png
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/icon/add.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/icon/audio.png
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/icon/audio.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/icon/back.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/icon/back.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/icon/cut.png
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/icon/cut.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/icon/delete.png
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/icon/delete.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/icon/down.png
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/icon/down.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/icon/edit.png
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/icon/edit.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/icon/editContent.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/icon/editContent.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/icon/ms-excel.png
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/icon/ms-excel.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/icon/ms-word.png
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/icon/ms-word.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/icon/next.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/icon/next.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/icon/openoffice-calc.png
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/icon/openoffice-calc.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/icon/openoffice-draw.png
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/icon/openoffice-draw.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/icon/openoffice-impress.png
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/icon/openoffice-impress.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/icon/openoffice-math.png
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/icon/openoffice-math.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/icon/openoffice-writer.png
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/icon/openoffice-writer.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/icon/paste.png
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/icon/paste.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/icon/ppt_icon.png
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/icon/ppt_icon.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/icon/right.png
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/icon/right.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/icon/txt.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/icon/txt.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/icon/unknown.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/icon/unknown.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/icon/up.png
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/icon/up.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/icon/video.png
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/icon/video.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/icon/zip.png
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/icon/zip.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/icon.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/icon.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/lightbox/blank.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/lightbox/blank.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/lightbox/close.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/lightbox/close.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/lightbox/closelabel.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/lightbox/closelabel.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/lightbox/image-1.jpg
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/lightbox/image-1.jpg
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/lightbox/loading.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/lightbox/loading.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/lightbox/next.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/lightbox/next.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/lightbox/nextlabel.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/lightbox/nextlabel.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/lightbox/prev.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/lightbox/prev.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/lightbox/prevlabel.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/lightbox/prevlabel.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/lightbox/thumb-1.jpg
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/lightbox/thumb-1.jpg
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/login_bottom-corner.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/login_bottom-corner.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/login_containerBorder.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/login_containerBorder.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/login_top-corner.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/login_top-corner.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/logo.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/logo.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/logo1.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/logo1.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/rainbow.office.ozino.com/7.jpeg
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/rainbow.office.ozino.com/7.jpeg
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/rainbow.office.ozino.com/body_background.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/rainbow.office.ozino.com/body_background.gif
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/rainbow.office.ozino.com/bottomleft.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/rainbow.office.ozino.com/bottomleft.gif
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/rainbow.office.ozino.com/bottomright.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/rainbow.office.ozino.com/bottomright.gif
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/rainbow.office.ozino.com/picture.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/rainbow.office.ozino.com/picture.gif
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/rainbow.office.ozino.com/topleft.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/rainbow.office.ozino.com/topleft.gif
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/rainbow.office.ozino.com/topright.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/rainbow.office.ozino.com/topright.gif
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/shuttl.office.ozino.com/body_background.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/shuttl.office.ozino.com/body_background.gif
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/shuttl.office.ozino.com/bottomleft.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/shuttl.office.ozino.com/bottomleft.gif
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/shuttl.office.ozino.com/bottomright.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/shuttl.office.ozino.com/bottomright.gif
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/shuttl.office.ozino.com/picture.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/shuttl.office.ozino.com/picture.gif
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/shuttl.office.ozino.com/topleft.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/shuttl.office.ozino.com/topleft.gif
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/images/shuttl.office.ozino.com/topright.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/images/shuttl.office.ozino.com/topright.gif
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/common.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/common.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/common.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,8 @@
+function showLoading(){
+//document.getElementById('loadingArea').style.visibility = 'visible';
+}
+
+function hideLoading(request){
+//document.getElementById('loadingArea').style.visibility = 'hidden';
+}
+		

Added: trunk/OzinoCMS/root/static/javascript/effects.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/effects.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/effects.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,903 @@
+// Copyright (c) 2005 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
+// Contributors:
+//  Justin Palmer (http://encytemedia.com/)
+//  Mark Pilgrim (http://diveintomark.org/)
+//  Martin Bialasinki
+// 
+// See scriptaculous.js for full license.  
+
+/* ------------- element ext -------------- */  
+ 
+// converts rgb() and #xxx to #xxxxxx format,  
+// returns self (or first argument) if not convertable  
+String.prototype.parseColor = function() {  
+  var color = '#';  
+  if(this.slice(0,4) == 'rgb(') {  
+    var cols = this.slice(4,this.length-1).split(',');  
+    var i=0; do { color += parseInt(cols[i]).toColorPart() } while (++i<3);  
+  } else {  
+    if(this.slice(0,1) == '#') {  
+      if(this.length==4) for(var i=1;i<4;i++) color += (this.charAt(i) + this.charAt(i)).toLowerCase();  
+      if(this.length==7) color = this.toLowerCase();  
+    }  
+  }  
+  return(color.length==7 ? color : (arguments[0] || this));  
+}
+
+Element.collectTextNodes = function(element) {  
+  return $A($(element).childNodes).collect( function(node) {
+    return (node.nodeType==3 ? node.nodeValue : 
+      (node.hasChildNodes() ? Element.collectTextNodes(node) : ''));
+  }).flatten().join('');
+}
+
+Element.collectTextNodesIgnoreClass = function(element, className) {  
+  return $A($(element).childNodes).collect( function(node) {
+    return (node.nodeType==3 ? node.nodeValue : 
+      ((node.hasChildNodes() && !Element.hasClassName(node,className)) ? 
+        Element.collectTextNodes(node) : ''));
+  }).flatten().join('');
+}
+
+Element.setStyle = function(element, style) {
+  element = $(element);
+  for(k in style) element.style[k.camelize()] = style[k];
+}
+
+Element.setContentZoom = function(element, percent) {  
+  Element.setStyle(element, {fontSize: (percent/100) + 'em'});   
+  if(navigator.appVersion.indexOf('AppleWebKit')>0) window.scrollBy(0,0);  
+}
+
+Element.getOpacity = function(element){  
+  var opacity;
+  if (opacity = Element.getStyle(element, 'opacity'))  
+    return parseFloat(opacity);  
+  if (opacity = (Element.getStyle(element, 'filter') || '').match(/alpha\(opacity=(.*)\)/))  
+    if(opacity[1]) return parseFloat(opacity[1]) / 100;  
+  return 1.0;  
+}
+
+Element.setOpacity = function(element, value){  
+  element= $(element);  
+  if (value == 1){
+    Element.setStyle(element, { opacity: 
+      (/Gecko/.test(navigator.userAgent) && !/Konqueror|Safari|KHTML/.test(navigator.userAgent)) ? 
+      0.999999 : null });
+    if(/MSIE/.test(navigator.userAgent))  
+      Element.setStyle(element, {filter: Element.getStyle(element,'filter').replace(/alpha\([^\)]*\)/gi,'')});  
+  } else {  
+    if(value < 0.00001) value = 0;  
+    Element.setStyle(element, {opacity: value});
+    if(/MSIE/.test(navigator.userAgent))  
+     Element.setStyle(element, 
+       { filter: Element.getStyle(element,'filter').replace(/alpha\([^\)]*\)/gi,'') +
+                 'alpha(opacity='+value*100+')' });  
+  }   
+}  
+ 
+Element.getInlineOpacity = function(element){  
+  return $(element).style.opacity || '';
+}  
+
+Element.childrenWithClassName = function(element, className) {  
+  return $A($(element).getElementsByTagName('*')).select(
+    function(c) { return Element.hasClassName(c, className) });
+}
+
+Array.prototype.call = function() {
+  var args = arguments;
+  this.each(function(f){ f.apply(this, args) });
+}
+
+/*--------------------------------------------------------------------------*/
+
+var Effect = {
+  tagifyText: function(element) {
+    var tagifyStyle = 'position:relative';
+    if(/MSIE/.test(navigator.userAgent)) tagifyStyle += ';zoom:1';
+    element = $(element);
+    $A(element.childNodes).each( function(child) {
+      if(child.nodeType==3) {
+        child.nodeValue.toArray().each( function(character) {
+          element.insertBefore(
+            Builder.node('span',{style: tagifyStyle},
+              character == ' ' ? String.fromCharCode(160) : character), 
+              child);
+        });
+        Element.remove(child);
+      }
+    });
+  },
+  multiple: function(element, effect) {
+    var elements;
+    if(((typeof element == 'object') || 
+        (typeof element == 'function')) && 
+       (element.length))
+      elements = element;
+    else
+      elements = $(element).childNodes;
+      
+    var options = Object.extend({
+      speed: 0.1,
+      delay: 0.0
+    }, arguments[2] || {});
+    var masterDelay = options.delay;
+
+    $A(elements).each( function(element, index) {
+      new effect(element, Object.extend(options, { delay: index * options.speed + masterDelay }));
+    });
+  },
+  PAIRS: {
+    'slide':  ['SlideDown','SlideUp'],
+    'blind':  ['BlindDown','BlindUp'],
+    'appear': ['Appear','Fade']
+  },
+  toggle: function(element, effect) {
+    element = $(element);
+    effect = (effect || 'appear').toLowerCase();
+    var options = Object.extend({
+      queue: { position:'end', scope:(element.id || 'global') }
+    }, arguments[2] || {});
+    Effect[Element.visible(element) ? 
+      Effect.PAIRS[effect][1] : Effect.PAIRS[effect][0]](element, options);
+  }
+};
+
+var Effect2 = Effect; // deprecated
+
+/* ------------- transitions ------------- */
+
+Effect.Transitions = {}
+
+Effect.Transitions.linear = function(pos) {
+  return pos;
+}
+Effect.Transitions.sinoidal = function(pos) {
+  return (-Math.cos(pos*Math.PI)/2) + 0.5;
+}
+Effect.Transitions.reverse  = function(pos) {
+  return 1-pos;
+}
+Effect.Transitions.flicker = function(pos) {
+  return ((-Math.cos(pos*Math.PI)/4) + 0.75) + Math.random()/4;
+}
+Effect.Transitions.wobble = function(pos) {
+  return (-Math.cos(pos*Math.PI*(9*pos))/2) + 0.5;
+}
+Effect.Transitions.pulse = function(pos) {
+  return (Math.floor(pos*10) % 2 == 0 ? 
+    (pos*10-Math.floor(pos*10)) : 1-(pos*10-Math.floor(pos*10)));
+}
+Effect.Transitions.none = function(pos) {
+  return 0;
+}
+Effect.Transitions.full = function(pos) {
+  return 1;
+}
+
+/* ------------- core effects ------------- */
+
+Effect.ScopedQueue = Class.create();
+Object.extend(Object.extend(Effect.ScopedQueue.prototype, Enumerable), {
+  initialize: function() {
+    this.effects  = [];
+    this.interval = null;
+  },
+  _each: function(iterator) {
+    this.effects._each(iterator);
+  },
+  add: function(effect) {
+    var timestamp = new Date().getTime();
+    
+    var position = (typeof effect.options.queue == 'string') ? 
+      effect.options.queue : effect.options.queue.position;
+    
+    switch(position) {
+      case 'front':
+        // move unstarted effects after this effect  
+        this.effects.findAll(function(e){ return e.state=='idle' }).each( function(e) {
+            e.startOn  += effect.finishOn;
+            e.finishOn += effect.finishOn;
+          });
+        break;
+      case 'end':
+        // start effect after last queued effect has finished
+        timestamp = this.effects.pluck('finishOn').max() || timestamp;
+        break;
+    }
+    
+    effect.startOn  += timestamp;
+    effect.finishOn += timestamp;
+    this.effects.push(effect);
+    if(!this.interval) 
+      this.interval = setInterval(this.loop.bind(this), 40);
+  },
+  remove: function(effect) {
+    this.effects = this.effects.reject(function(e) { return e==effect });
+    if(this.effects.length == 0) {
+      clearInterval(this.interval);
+      this.interval = null;
+    }
+  },
+  loop: function() {
+    var timePos = new Date().getTime();
+    this.effects.invoke('loop', timePos);
+  }
+});
+
+Effect.Queues = {
+  instances: $H(),
+  get: function(queueName) {
+    if(typeof queueName != 'string') return queueName;
+    
+    if(!this.instances[queueName])
+      this.instances[queueName] = new Effect.ScopedQueue();
+      
+    return this.instances[queueName];
+  }
+}
+Effect.Queue = Effect.Queues.get('global');
+
+Effect.DefaultOptions = {
+  transition: Effect.Transitions.sinoidal,
+  duration:   1.0,   // seconds
+  fps:        25.0,  // max. 25fps due to Effect.Queue implementation
+  sync:       false, // true for combining
+  from:       0.0,
+  to:         1.0,
+  delay:      0.0,
+  queue:      'parallel'
+}
+
+Effect.Base = function() {};
+Effect.Base.prototype = {
+  position: null,
+  start: function(options) {
+    this.options      = Object.extend(Object.extend({},Effect.DefaultOptions), options || {});
+    this.currentFrame = 0;
+    this.state        = 'idle';
+    this.startOn      = this.options.delay*1000;
+    this.finishOn     = this.startOn + (this.options.duration*1000);
+    this.event('beforeStart');
+    if(!this.options.sync)
+      Effect.Queues.get(typeof this.options.queue == 'string' ? 
+        'global' : this.options.queue.scope).add(this);
+  },
+  loop: function(timePos) {
+    if(timePos >= this.startOn) {
+      if(timePos >= this.finishOn) {
+        this.render(1.0);
+        this.cancel();
+        this.event('beforeFinish');
+        if(this.finish) this.finish(); 
+        this.event('afterFinish');
+        return;  
+      }
+      var pos   = (timePos - this.startOn) / (this.finishOn - this.startOn);
+      var frame = Math.round(pos * this.options.fps * this.options.duration);
+      if(frame > this.currentFrame) {
+        this.render(pos);
+        this.currentFrame = frame;
+      }
+    }
+  },
+  render: function(pos) {
+    if(this.state == 'idle') {
+      this.state = 'running';
+      this.event('beforeSetup');
+      if(this.setup) this.setup();
+      this.event('afterSetup');
+    }
+    if(this.state == 'running') {
+      if(this.options.transition) pos = this.options.transition(pos);
+      pos *= (this.options.to-this.options.from);
+      pos += this.options.from;
+      this.position = pos;
+      this.event('beforeUpdate');
+      if(this.update) this.update(pos);
+      this.event('afterUpdate');
+    }
+  },
+  cancel: function() {
+    if(!this.options.sync)
+      Effect.Queues.get(typeof this.options.queue == 'string' ? 
+        'global' : this.options.queue.scope).remove(this);
+    this.state = 'finished';
+  },
+  event: function(eventName) {
+    if(this.options[eventName + 'Internal']) this.options[eventName + 'Internal'](this);
+    if(this.options[eventName]) this.options[eventName](this);
+  },
+  inspect: function() {
+    return '#<Effect:' + $H(this).inspect() + ',options:' + $H(this.options).inspect() + '>';
+  }
+}
+
+Effect.Parallel = Class.create();
+Object.extend(Object.extend(Effect.Parallel.prototype, Effect.Base.prototype), {
+  initialize: function(effects) {
+    this.effects = effects || [];
+    this.start(arguments[1]);
+  },
+  update: function(position) {
+    this.effects.invoke('render', position);
+  },
+  finish: function(position) {
+    this.effects.each( function(effect) {
+      effect.render(1.0);
+      effect.cancel();
+      effect.event('beforeFinish');
+      if(effect.finish) effect.finish(position);
+      effect.event('afterFinish');
+    });
+  }
+});
+
+Effect.Opacity = Class.create();
+Object.extend(Object.extend(Effect.Opacity.prototype, Effect.Base.prototype), {
+  initialize: function(element) {
+    this.element = $(element);
+    // make this work on IE on elements without 'layout'
+    if(/MSIE/.test(navigator.userAgent) && (!this.element.hasLayout))
+      Element.setStyle(this.element, {zoom: 1});
+    var options = Object.extend({
+      from: Element.getOpacity(this.element) || 0.0,
+      to:   1.0
+    }, arguments[1] || {});
+    this.start(options);
+  },
+  update: function(position) {
+    Element.setOpacity(this.element, position);
+  }
+});
+
+Effect.Move = Class.create();
+Object.extend(Object.extend(Effect.Move.prototype, Effect.Base.prototype), {
+  initialize: function(element) {
+    this.element = $(element);
+    var options = Object.extend({
+      x:    0,
+      y:    0,
+      mode: 'relative'
+    }, arguments[1] || {});
+    this.start(options);
+  },
+  setup: function() {
+    // Bug in Opera: Opera returns the "real" position of a static element or
+    // relative element that does not have top/left explicitly set.
+    // ==> Always set top and left for position relative elements in your stylesheets 
+    // (to 0 if you do not need them) 
+    Element.makePositioned(this.element);
+    this.originalLeft = parseFloat(Element.getStyle(this.element,'left') || '0');
+    this.originalTop  = parseFloat(Element.getStyle(this.element,'top')  || '0');
+    if(this.options.mode == 'absolute') {
+      // absolute movement, so we need to calc deltaX and deltaY
+      this.options.x = this.options.x - this.originalLeft;
+      this.options.y = this.options.y - this.originalTop;
+    }
+  },
+  update: function(position) {
+    Element.setStyle(this.element, {
+      left: this.options.x  * position + this.originalLeft + 'px',
+      top:  this.options.y  * position + this.originalTop  + 'px'
+    });
+  }
+});
+
+// for backwards compatibility
+Effect.MoveBy = function(element, toTop, toLeft) {
+  return new Effect.Move(element, 
+    Object.extend({ x: toLeft, y: toTop }, arguments[3] || {}));
+};
+
+Effect.Scale = Class.create();
+Object.extend(Object.extend(Effect.Scale.prototype, Effect.Base.prototype), {
+  initialize: function(element, percent) {
+    this.element = $(element)
+    var options = Object.extend({
+      scaleX: true,
+      scaleY: true,
+      scaleContent: true,
+      scaleFromCenter: false,
+      scaleMode: 'box',        // 'box' or 'contents' or {} with provided values
+      scaleFrom: 100.0,
+      scaleTo:   percent
+    }, arguments[2] || {});
+    this.start(options);
+  },
+  setup: function() {
+    this.restoreAfterFinish = this.options.restoreAfterFinish || false;
+    this.elementPositioning = Element.getStyle(this.element,'position');
+    
+    this.originalStyle = {};
+    ['top','left','width','height','fontSize'].each( function(k) {
+      this.originalStyle[k] = this.element.style[k];
+    }.bind(this));
+      
+    this.originalTop  = this.element.offsetTop;
+    this.originalLeft = this.element.offsetLeft;
+    
+    var fontSize = Element.getStyle(this.element,'font-size') || '100%';
+    ['em','px','%'].each( function(fontSizeType) {
+      if(fontSize.indexOf(fontSizeType)>0) {
+        this.fontSize     = parseFloat(fontSize);
+        this.fontSizeType = fontSizeType;
+      }
+    }.bind(this));
+    
+    this.factor = (this.options.scaleTo - this.options.scaleFrom)/100;
+    
+    this.dims = null;
+    if(this.options.scaleMode=='box')
+      this.dims = [this.element.offsetHeight, this.element.offsetWidth];
+    if(/^content/.test(this.options.scaleMode))
+      this.dims = [this.element.scrollHeight, this.element.scrollWidth];
+    if(!this.dims)
+      this.dims = [this.options.scaleMode.originalHeight,
+                   this.options.scaleMode.originalWidth];
+  },
+  update: function(position) {
+    var currentScale = (this.options.scaleFrom/100.0) + (this.factor * position);
+    if(this.options.scaleContent && this.fontSize)
+      Element.setStyle(this.element, {fontSize: this.fontSize * currentScale + this.fontSizeType });
+    this.setDimensions(this.dims[0] * currentScale, this.dims[1] * currentScale);
+  },
+  finish: function(position) {
+    if (this.restoreAfterFinish) Element.setStyle(this.element, this.originalStyle);
+  },
+  setDimensions: function(height, width) {
+    var d = {};
+    if(this.options.scaleX) d.width = width + 'px';
+    if(this.options.scaleY) d.height = height + 'px';
+    if(this.options.scaleFromCenter) {
+      var topd  = (height - this.dims[0])/2;
+      var leftd = (width  - this.dims[1])/2;
+      if(this.elementPositioning == 'absolute') {
+        if(this.options.scaleY) d.top = this.originalTop-topd + 'px';
+        if(this.options.scaleX) d.left = this.originalLeft-leftd + 'px';
+      } else {
+        if(this.options.scaleY) d.top = -topd + 'px';
+        if(this.options.scaleX) d.left = -leftd + 'px';
+      }
+    }
+    Element.setStyle(this.element, d);
+  }
+});
+
+Effect.Highlight = Class.create();
+Object.extend(Object.extend(Effect.Highlight.prototype, Effect.Base.prototype), {
+  initialize: function(element) {
+    this.element = $(element);
+    var options = Object.extend({ startcolor: '#ffff99' }, arguments[1] || {});
+    this.start(options);
+  },
+  setup: function() {
+    // Prevent executing on elements not in the layout flow
+    if(Element.getStyle(this.element, 'display')=='none') { this.cancel(); return; }
+    // Disable background image during the effect
+    this.oldStyle = {
+      backgroundImage: Element.getStyle(this.element, 'background-image') };
+    Element.setStyle(this.element, {backgroundImage: 'none'});
+    if(!this.options.endcolor)
+      this.options.endcolor = Element.getStyle(this.element, 'background-color').parseColor('#ffffff');
+    if(!this.options.restorecolor)
+      this.options.restorecolor = Element.getStyle(this.element, 'background-color');
+    // init color calculations
+    this._base  = $R(0,2).map(function(i){ return parseInt(this.options.startcolor.slice(i*2+1,i*2+3),16) }.bind(this));
+    this._delta = $R(0,2).map(function(i){ return parseInt(this.options.endcolor.slice(i*2+1,i*2+3),16)-this._base[i] }.bind(this));
+  },
+  update: function(position) {
+    Element.setStyle(this.element,{backgroundColor: $R(0,2).inject('#',function(m,v,i){
+      return m+(Math.round(this._base[i]+(this._delta[i]*position)).toColorPart()); }.bind(this)) });
+  },
+  finish: function() {
+    Element.setStyle(this.element, Object.extend(this.oldStyle, {
+      backgroundColor: this.options.restorecolor
+    }));
+  }
+});
+
+Effect.ScrollTo = Class.create();
+Object.extend(Object.extend(Effect.ScrollTo.prototype, Effect.Base.prototype), {
+  initialize: function(element) {
+    this.element = $(element);
+    this.start(arguments[1] || {});
+  },
+  setup: function() {
+    Position.prepare();
+    var offsets = Position.cumulativeOffset(this.element);
+    if(this.options.offset) offsets[1] += this.options.offset;
+    var max = window.innerHeight ? 
+      window.height - window.innerHeight :
+      document.body.scrollHeight - 
+        (document.documentElement.clientHeight ? 
+          document.documentElement.clientHeight : document.body.clientHeight);
+    this.scrollStart = Position.deltaY;
+    this.delta = (offsets[1] > max ? max : offsets[1]) - this.scrollStart;
+  },
+  update: function(position) {
+    Position.prepare();
+    window.scrollTo(Position.deltaX, 
+      this.scrollStart + (position*this.delta));
+  }
+});
+
+/* ------------- combination effects ------------- */
+
+Effect.Fade = function(element) {
+  var oldOpacity = Element.getInlineOpacity(element);
+  var options = Object.extend({
+  from: Element.getOpacity(element) || 1.0,
+  to:   0.0,
+  afterFinishInternal: function(effect) { with(Element) { 
+    if(effect.options.to!=0) return;
+    hide(effect.element);
+    setStyle(effect.element, {opacity: oldOpacity}); }}
+  }, arguments[1] || {});
+  return new Effect.Opacity(element,options);
+}
+
+Effect.Appear = function(element) {
+  var options = Object.extend({
+  from: (Element.getStyle(element, 'display') == 'none' ? 0.0 : Element.getOpacity(element) || 0.0),
+  to:   1.0,
+  beforeSetup: function(effect) { with(Element) {
+    setOpacity(effect.element, effect.options.from);
+    show(effect.element); }}
+  }, arguments[1] || {});
+  return new Effect.Opacity(element,options);
+}
+
+Effect.Puff = function(element) {
+  element = $(element);
+  var oldStyle = { opacity: Element.getInlineOpacity(element), position: Element.getStyle(element, 'position') };
+  return new Effect.Parallel(
+   [ new Effect.Scale(element, 200, 
+      { sync: true, scaleFromCenter: true, scaleContent: true, restoreAfterFinish: true }), 
+     new Effect.Opacity(element, { sync: true, to: 0.0 } ) ], 
+     Object.extend({ duration: 1.0, 
+      beforeSetupInternal: function(effect) { with(Element) {
+        setStyle(effect.effects[0].element, {position: 'absolute'}); }},
+      afterFinishInternal: function(effect) { with(Element) {
+         hide(effect.effects[0].element);
+         setStyle(effect.effects[0].element, oldStyle); }}
+     }, arguments[1] || {})
+   );
+}
+
+Effect.BlindUp = function(element) {
+  element = $(element);
+  Element.makeClipping(element);
+  return new Effect.Scale(element, 0, 
+    Object.extend({ scaleContent: false, 
+      scaleX: false, 
+      restoreAfterFinish: true,
+      afterFinishInternal: function(effect) { with(Element) {
+        [hide, undoClipping].call(effect.element); }} 
+    }, arguments[1] || {})
+  );
+}
+
+Effect.BlindDown = function(element) {
+  element = $(element);
+  var oldHeight = Element.getStyle(element, 'height');
+  var elementDimensions = Element.getDimensions(element);
+  return new Effect.Scale(element, 100, 
+    Object.extend({ scaleContent: false, 
+      scaleX: false,
+      scaleFrom: 0,
+      scaleMode: {originalHeight: elementDimensions.height, originalWidth: elementDimensions.width},
+      restoreAfterFinish: true,
+      afterSetup: function(effect) { with(Element) {
+        makeClipping(effect.element);
+        setStyle(effect.element, {height: '0px'});
+        show(effect.element); 
+      }},  
+      afterFinishInternal: function(effect) { with(Element) {
+        undoClipping(effect.element);
+        setStyle(effect.element, {height: oldHeight});
+      }}
+    }, arguments[1] || {})
+  );
+}
+
+Effect.SwitchOff = function(element) {
+  element = $(element);
+  var oldOpacity = Element.getInlineOpacity(element);
+  return new Effect.Appear(element, { 
+    duration: 0.4,
+    from: 0,
+    transition: Effect.Transitions.flicker,
+    afterFinishInternal: function(effect) {
+      new Effect.Scale(effect.element, 1, { 
+        duration: 0.3, scaleFromCenter: true,
+        scaleX: false, scaleContent: false, restoreAfterFinish: true,
+        beforeSetup: function(effect) { with(Element) {
+          [makePositioned,makeClipping].call(effect.element);
+        }},
+        afterFinishInternal: function(effect) { with(Element) {
+          [hide,undoClipping,undoPositioned].call(effect.element);
+          setStyle(effect.element, {opacity: oldOpacity});
+        }}
+      })
+    }
+  });
+}
+
+Effect.DropOut = function(element) {
+  element = $(element);
+  var oldStyle = {
+    top: Element.getStyle(element, 'top'),
+    left: Element.getStyle(element, 'left'),
+    opacity: Element.getInlineOpacity(element) };
+  return new Effect.Parallel(
+    [ new Effect.Move(element, {x: 0, y: 100, sync: true }), 
+      new Effect.Opacity(element, { sync: true, to: 0.0 }) ],
+    Object.extend(
+      { duration: 0.5,
+        beforeSetup: function(effect) { with(Element) {
+          makePositioned(effect.effects[0].element); }},
+        afterFinishInternal: function(effect) { with(Element) {
+          [hide, undoPositioned].call(effect.effects[0].element);
+          setStyle(effect.effects[0].element, oldStyle); }} 
+      }, arguments[1] || {}));
+}
+
+Effect.Shake = function(element) {
+  element = $(element);
+  var oldStyle = {
+    top: Element.getStyle(element, 'top'),
+    left: Element.getStyle(element, 'left') };
+	  return new Effect.Move(element, 
+	    { x:  20, y: 0, duration: 0.05, afterFinishInternal: function(effect) {
+	  new Effect.Move(effect.element,
+	    { x: -40, y: 0, duration: 0.1,  afterFinishInternal: function(effect) {
+	  new Effect.Move(effect.element,
+	    { x:  40, y: 0, duration: 0.1,  afterFinishInternal: function(effect) {
+	  new Effect.Move(effect.element,
+	    { x: -40, y: 0, duration: 0.1,  afterFinishInternal: function(effect) {
+	  new Effect.Move(effect.element,
+	    { x:  40, y: 0, duration: 0.1,  afterFinishInternal: function(effect) {
+	  new Effect.Move(effect.element,
+	    { x: -20, y: 0, duration: 0.05, afterFinishInternal: function(effect) { with(Element) {
+        undoPositioned(effect.element);
+        setStyle(effect.element, oldStyle);
+  }}}) }}) }}) }}) }}) }});
+}
+
+Effect.SlideDown = function(element) {
+  element = $(element);
+  Element.cleanWhitespace(element);
+  // SlideDown need to have the content of the element wrapped in a container element with fixed height!
+  var oldInnerBottom = Element.getStyle(element.firstChild, 'bottom');
+  var elementDimensions = Element.getDimensions(element);
+  return new Effect.Scale(element, 100, Object.extend({ 
+    scaleContent: false, 
+    scaleX: false, 
+    scaleFrom: 0,
+    scaleMode: {originalHeight: elementDimensions.height, originalWidth: elementDimensions.width},
+    restoreAfterFinish: true,
+    afterSetup: function(effect) { with(Element) {
+      makePositioned(effect.element);
+      makePositioned(effect.element.firstChild);
+      if(window.opera) setStyle(effect.element, {top: ''});
+      makeClipping(effect.element);
+      setStyle(effect.element, {height: '0px'});
+      show(element); }},
+    afterUpdateInternal: function(effect) { with(Element) {
+      setStyle(effect.element.firstChild, {bottom:
+        (effect.dims[0] - effect.element.clientHeight) + 'px' }); }},
+    afterFinishInternal: function(effect) { with(Element) {
+      undoClipping(effect.element); 
+      undoPositioned(effect.element.firstChild);
+      undoPositioned(effect.element);
+      setStyle(effect.element.firstChild, {bottom: oldInnerBottom}); }}
+    }, arguments[1] || {})
+  );
+}
+  
+Effect.SlideUp = function(element) {
+  element = $(element);
+  Element.cleanWhitespace(element);
+  var oldInnerBottom = Element.getStyle(element.firstChild, 'bottom');
+  return new Effect.Scale(element, 0, 
+   Object.extend({ scaleContent: false, 
+    scaleX: false, 
+    scaleMode: 'box',
+    scaleFrom: 100,
+    restoreAfterFinish: true,
+    beforeStartInternal: function(effect) { with(Element) {
+      makePositioned(effect.element);
+      makePositioned(effect.element.firstChild);
+      if(window.opera) setStyle(effect.element, {top: ''});
+      makeClipping(effect.element);
+      show(element); }},  
+    afterUpdateInternal: function(effect) { with(Element) {
+      setStyle(effect.element.firstChild, {bottom:
+        (effect.dims[0] - effect.element.clientHeight) + 'px' }); }},
+    afterFinishInternal: function(effect) { with(Element) {
+        [hide, undoClipping].call(effect.element); 
+        undoPositioned(effect.element.firstChild);
+        undoPositioned(effect.element);
+        setStyle(effect.element.firstChild, {bottom: oldInnerBottom}); }}
+   }, arguments[1] || {})
+  );
+}
+
+// Bug in opera makes the TD containing this element expand for a instance after finish 
+Effect.Squish = function(element) {
+  return new Effect.Scale(element, window.opera ? 1 : 0, 
+    { restoreAfterFinish: true,
+      beforeSetup: function(effect) { with(Element) {
+        makeClipping(effect.element); }},  
+      afterFinishInternal: function(effect) { with(Element) {
+        hide(effect.element); 
+        undoClipping(effect.element); }}
+  });
+}
+
+Effect.Grow = function(element) {
+  element = $(element);
+  var options = Object.extend({
+    direction: 'center',
+    moveTransistion: Effect.Transitions.sinoidal,
+    scaleTransition: Effect.Transitions.sinoidal,
+    opacityTransition: Effect.Transitions.full
+  }, arguments[1] || {});
+  var oldStyle = {
+    top: element.style.top,
+    left: element.style.left,
+    height: element.style.height,
+    width: element.style.width,
+    opacity: Element.getInlineOpacity(element) };
+
+  var dims = Element.getDimensions(element);    
+  var initialMoveX, initialMoveY;
+  var moveX, moveY;
+  
+  switch (options.direction) {
+    case 'top-left':
+      initialMoveX = initialMoveY = moveX = moveY = 0; 
+      break;
+    case 'top-right':
+      initialMoveX = dims.width;
+      initialMoveY = moveY = 0;
+      moveX = -dims.width;
+      break;
+    case 'bottom-left':
+      initialMoveX = moveX = 0;
+      initialMoveY = dims.height;
+      moveY = -dims.height;
+      break;
+    case 'bottom-right':
+      initialMoveX = dims.width;
+      initialMoveY = dims.height;
+      moveX = -dims.width;
+      moveY = -dims.height;
+      break;
+    case 'center':
+      initialMoveX = dims.width / 2;
+      initialMoveY = dims.height / 2;
+      moveX = -dims.width / 2;
+      moveY = -dims.height / 2;
+      break;
+  }
+  
+  return new Effect.Move(element, {
+    x: initialMoveX,
+    y: initialMoveY,
+    duration: 0.01, 
+    beforeSetup: function(effect) { with(Element) {
+      hide(effect.element);
+      makeClipping(effect.element);
+      makePositioned(effect.element);
+    }},
+    afterFinishInternal: function(effect) {
+      new Effect.Parallel(
+        [ new Effect.Opacity(effect.element, { sync: true, to: 1.0, from: 0.0, transition: options.opacityTransition }),
+          new Effect.Move(effect.element, { x: moveX, y: moveY, sync: true, transition: options.moveTransition }),
+          new Effect.Scale(effect.element, 100, {
+            scaleMode: { originalHeight: dims.height, originalWidth: dims.width }, 
+            sync: true, scaleFrom: window.opera ? 1 : 0, transition: options.scaleTransition, restoreAfterFinish: true})
+        ], Object.extend({
+             beforeSetup: function(effect) { with(Element) {
+               setStyle(effect.effects[0].element, {height: '0px'});
+               show(effect.effects[0].element); }},
+             afterFinishInternal: function(effect) { with(Element) {
+               [undoClipping, undoPositioned].call(effect.effects[0].element); 
+               setStyle(effect.effects[0].element, oldStyle); }}
+           }, options)
+      )
+    }
+  });
+}
+
+Effect.Shrink = function(element) {
+  element = $(element);
+  var options = Object.extend({
+    direction: 'center',
+    moveTransistion: Effect.Transitions.sinoidal,
+    scaleTransition: Effect.Transitions.sinoidal,
+    opacityTransition: Effect.Transitions.none
+  }, arguments[1] || {});
+  var oldStyle = {
+    top: element.style.top,
+    left: element.style.left,
+    height: element.style.height,
+    width: element.style.width,
+    opacity: Element.getInlineOpacity(element) };
+
+  var dims = Element.getDimensions(element);
+  var moveX, moveY;
+  
+  switch (options.direction) {
+    case 'top-left':
+      moveX = moveY = 0;
+      break;
+    case 'top-right':
+      moveX = dims.width;
+      moveY = 0;
+      break;
+    case 'bottom-left':
+      moveX = 0;
+      moveY = dims.height;
+      break;
+    case 'bottom-right':
+      moveX = dims.width;
+      moveY = dims.height;
+      break;
+    case 'center':  
+      moveX = dims.width / 2;
+      moveY = dims.height / 2;
+      break;
+  }
+  
+  return new Effect.Parallel(
+    [ new Effect.Opacity(element, { sync: true, to: 0.0, from: 1.0, transition: options.opacityTransition }),
+      new Effect.Scale(element, window.opera ? 1 : 0, { sync: true, transition: options.scaleTransition, restoreAfterFinish: true}),
+      new Effect.Move(element, { x: moveX, y: moveY, sync: true, transition: options.moveTransition })
+    ], Object.extend({            
+         beforeStartInternal: function(effect) { with(Element) {
+           [makePositioned, makeClipping].call(effect.effects[0].element) }},
+         afterFinishInternal: function(effect) { with(Element) {
+           [hide, undoClipping, undoPositioned].call(effect.effects[0].element);
+           setStyle(effect.effects[0].element, oldStyle); }}
+       }, options)
+  );
+}
+
+Effect.Pulsate = function(element) {
+  element = $(element);
+  var options    = arguments[1] || {};
+  var oldOpacity = Element.getInlineOpacity(element);
+  var transition = options.transition || Effect.Transitions.sinoidal;
+  var reverser   = function(pos){ return transition(1-Effect.Transitions.pulse(pos)) };
+  reverser.bind(transition);
+  return new Effect.Opacity(element, 
+    Object.extend(Object.extend({  duration: 3.0, from: 0,
+      afterFinishInternal: function(effect) { Element.setStyle(effect.element, {opacity: oldOpacity}); }
+    }, options), {transition: reverser}));
+}
+
+Effect.Fold = function(element) {
+  element = $(element);
+  var oldStyle = {
+    top: element.style.top,
+    left: element.style.left,
+    width: element.style.width,
+    height: element.style.height };
+  Element.makeClipping(element);
+  return new Effect.Scale(element, 5, Object.extend({   
+    scaleContent: false,
+    scaleX: false,
+    afterFinishInternal: function(effect) {
+    new Effect.Scale(element, 1, { 
+      scaleContent: false, 
+      scaleY: false,
+      afterFinishInternal: function(effect) { with(Element) {
+        [hide, undoClipping].call(effect.element); 
+        setStyle(effect.element, oldStyle);
+      }} });
+  }}, arguments[1] || {}));
+}

Added: trunk/OzinoCMS/root/static/javascript/lightbox.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/lightbox.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/lightbox.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,689 @@
+// -----------------------------------------------------------------------------------
+//
+//	Lightbox v2.02
+//	by Lokesh Dhakar - http://www.huddletogether.com
+//	3/31/06
+//
+//	For more information on this script, visit:
+//	http://huddletogether.com/projects/lightbox2/
+//
+//	Licensed under the Creative Commons Attribution 2.5 License - http://creativecommons.org/licenses/by/2.5/
+//	
+//	Credit also due to those who have helped, inspired, and made their code available to the public.
+//	Including: Scott Upton(uptonic.com), Peter-Paul Koch(quirksmode.org), Thomas Fuchs(mir.aculo.us), and others.
+//
+//
+// -----------------------------------------------------------------------------------
+/*
+
+	Table of Contents
+	-----------------
+	Configuration
+	Global Variables
+
+	Extending Built-in Objects	
+	- Object.extend(Element)
+	- Array.prototype.removeDuplicates()
+	- Array.prototype.empty()
+
+	Lightbox Class Declaration
+	- initialize()
+	- start()
+	- changeImage()
+	- resizeImageContainer()
+	- showImage()
+	- updateDetails()
+	- updateNav()
+	- enableKeyboardNav()
+	- disableKeyboardNav()
+	- keyboardAction()
+	- preloadNeighborImages()
+	- end()
+	
+	Miscellaneous Functions
+	- getPageScroll()
+	- getPageSize()
+	- getKey()
+	- listenKey()
+	- showSelectBoxes()
+	- hideSelectBoxes()
+	- pause()
+	- initLightbox()
+	
+	Function Calls
+	- addLoadEvent(initLightbox)
+	
+*/
+// -----------------------------------------------------------------------------------
+
+//
+//	Configuration
+//
+var fileLoadingImage = "/static/images/lightbox/loading.gif";		
+var fileBottomNavCloseImage = "/static/images/lightbox/closelabel.gif";
+
+var resizeSpeed = 7;	// controls the speed of the image resizing (1=slowest and 10=fastest)
+
+var borderSize = 10;	//if you adjust the padding in the CSS, you will need to update this variable
+
+// -----------------------------------------------------------------------------------
+
+//
+//	Global Variables
+//
+var imageArray = new Array;
+var activeImage;
+
+if(resizeSpeed > 10){ resizeSpeed = 10;}
+if(resizeSpeed < 1){ resizeSpeed = 1;}
+resizeDuration = (11 - resizeSpeed) * 0.15;
+
+// -----------------------------------------------------------------------------------
+
+//
+//	Additional methods for Element added by SU, Couloir
+//	- further additions by Lokesh Dhakar (huddletogether.com)
+//
+Object.extend(Element, {
+	getWidth: function(element) {
+	   	element = $(element);
+	   	return element.offsetWidth; 
+	},
+	setWidth: function(element,w) {
+	   	element = $(element);
+    	element.style.width = w +"px";
+	},
+	setHeight: function(element,h) {
+   		element = $(element);
+    	element.style.height = h +"px";
+	},
+	setTop: function(element,t) {
+	   	element = $(element);
+    	element.style.top = t +"px";
+	},
+	setSrc: function(element,src) {
+    	element = $(element);
+    	element.src = src; 
+	},
+	setHref: function(element,href) {
+    	element = $(element);
+    	element.href = href; 
+	},
+	setInnerHTML: function(element,content) {
+		element = $(element);
+		element.innerHTML = content;
+	}
+});
+
+// -----------------------------------------------------------------------------------
+
+//
+//	Extending built-in Array object
+//	- array.removeDuplicates()
+//	- array.empty()
+//
+Array.prototype.removeDuplicates = function () {
+	for(i = 1; i < this.length; i++){
+		if(this[i][0] == this[i-1][0]){
+			this.splice(i,1);
+		}
+	}
+}
+
+// -----------------------------------------------------------------------------------
+
+Array.prototype.empty = function () {
+	for(i = 0; i <= this.length; i++){
+		this.shift();
+	}
+}
+
+// -----------------------------------------------------------------------------------
+
+//
+//	Lightbox Class Declaration
+//	- initialize()
+//	- start()
+//	- changeImage()
+//	- resizeImageContainer()
+//	- showImage()
+//	- updateDetails()
+//	- updateNav()
+//	- enableKeyboardNav()
+//	- disableKeyboardNav()
+//	- keyboardNavAction()
+//	- preloadNeighborImages()
+//	- end()
+//
+//	Structuring of code inspired by Scott Upton (http://www.uptonic.com/)
+//
+var Lightbox = Class.create();
+
+Lightbox.prototype = {
+	
+	// initialize()
+	// Constructor runs on completion of the DOM loading. Loops through anchor tags looking for 
+	// 'lightbox' references and applies onclick events to appropriate links. The 2nd section of
+	// the function inserts html at the bottom of the page which is used to display the shadow 
+	// overlay and the image container.
+	//
+	initialize: function() {	
+		if (!document.getElementsByTagName){ return; }
+		var anchors = document.getElementsByTagName('a');
+
+		// loop through all anchor tags
+		for (var i=0; i<anchors.length; i++){
+			var anchor = anchors[i];
+			
+			var relAttribute = String(anchor.getAttribute('rel'));
+			
+			// use the string.match() method to catch 'lightbox' references in the rel attribute
+			if (anchor.getAttribute('href') && (relAttribute.toLowerCase().match('lightbox'))){
+				anchor.onclick = function () {myLightbox.start(this); return false;}
+			}
+		}
+
+		// The rest of this code inserts html at the bottom of the page that looks similar to this:
+		//
+		//	<div id="overlay"></div>
+		//	<div id="lightbox">
+		//		<div id="outerImageContainer">
+		//			<div id="imageContainer">
+		//				<img id="lightboxImage">
+		//				<div style="" id="hoverNav">
+		//					<a href="#" id="prevLink"></a>
+		//					<a href="#" id="nextLink"></a>
+		//				</div>
+		//				<div id="loading">
+		//					<a href="#" id="loadingLink">
+		//						<img src="images/loading.gif">
+		//					</a>
+		//				</div>
+		//			</div>
+		//		</div>
+		//		<div id="imageDataContainer">
+		//			<div id="imageData">
+		//				<div id="imageDetails">
+		//					<span id="caption"></span>
+		//					<span id="numberDisplay"></span>
+		//				</div>
+		//				<div id="bottomNav">
+		//					<a href="#" id="bottomNavClose">
+		//						<img src="images/close.gif">
+		//					</a>
+		//				</div>
+		//			</div>
+		//		</div>
+		//	</div>
+
+
+		var objBody = document.getElementsByTagName("body").item(0);
+		
+		var objOverlay = document.createElement("div");
+		objOverlay.setAttribute('id','overlay');
+		objOverlay.style.display = 'none';
+		objOverlay.onclick = function() { myLightbox.end(); return false; }
+		objBody.appendChild(objOverlay);
+		
+		var objLightbox = document.createElement("div");
+		objLightbox.setAttribute('id','lightbox');
+		objLightbox.style.display = 'none';
+		objBody.appendChild(objLightbox);
+	
+		var objOuterImageContainer = document.createElement("div");
+		objOuterImageContainer.setAttribute('id','outerImageContainer');
+		objLightbox.appendChild(objOuterImageContainer);
+
+		var objImageContainer = document.createElement("div");
+		objImageContainer.setAttribute('id','imageContainer');
+		objOuterImageContainer.appendChild(objImageContainer);
+	
+		var objLightboxImage = document.createElement("img");
+		objLightboxImage.setAttribute('id','lightboxImage');
+		objImageContainer.appendChild(objLightboxImage);
+	
+		var objHoverNav = document.createElement("div");
+		objHoverNav.setAttribute('id','hoverNav');
+		objImageContainer.appendChild(objHoverNav);
+	
+		var objPrevLink = document.createElement("a");
+		objPrevLink.setAttribute('id','prevLink');
+		objPrevLink.setAttribute('href','#');
+		objHoverNav.appendChild(objPrevLink);
+		
+		var objNextLink = document.createElement("a");
+		objNextLink.setAttribute('id','nextLink');
+		objNextLink.setAttribute('href','#');
+		objHoverNav.appendChild(objNextLink);
+	
+		var objLoading = document.createElement("div");
+		objLoading.setAttribute('id','loading');
+		objImageContainer.appendChild(objLoading);
+	
+		var objLoadingLink = document.createElement("a");
+		objLoadingLink.setAttribute('id','loadingLink');
+		objLoadingLink.setAttribute('href','#');
+		objLoadingLink.onclick = function() { myLightbox.end(); return false; }
+		objLoading.appendChild(objLoadingLink);
+	
+		var objLoadingImage = document.createElement("img");
+		objLoadingImage.setAttribute('src', fileLoadingImage);
+		objLoadingLink.appendChild(objLoadingImage);
+
+		var objImageDataContainer = document.createElement("div");
+		objImageDataContainer.setAttribute('id','imageDataContainer');
+		objImageDataContainer.className = 'clearfix';
+		objLightbox.appendChild(objImageDataContainer);
+
+		var objImageData = document.createElement("div");
+		objImageData.setAttribute('id','imageData');
+		objImageDataContainer.appendChild(objImageData);
+	
+		var objImageDetails = document.createElement("div");
+		objImageDetails.setAttribute('id','imageDetails');
+		objImageData.appendChild(objImageDetails);
+	
+		var objCaption = document.createElement("span");
+		objCaption.setAttribute('id','caption');
+		objImageDetails.appendChild(objCaption);
+	
+		var objNumberDisplay = document.createElement("span");
+		objNumberDisplay.setAttribute('id','numberDisplay');
+		objImageDetails.appendChild(objNumberDisplay);
+		
+		var objBottomNav = document.createElement("div");
+		objBottomNav.setAttribute('id','bottomNav');
+		objImageData.appendChild(objBottomNav);
+	
+		var objBottomNavCloseLink = document.createElement("a");
+		objBottomNavCloseLink.setAttribute('id','bottomNavClose');
+		objBottomNavCloseLink.setAttribute('href','#');
+		objBottomNavCloseLink.onclick = function() { myLightbox.end(); return false; }
+		objBottomNav.appendChild(objBottomNavCloseLink);
+	
+		var objBottomNavCloseImage = document.createElement("img");
+		objBottomNavCloseImage.setAttribute('src', fileBottomNavCloseImage);
+		objBottomNavCloseLink.appendChild(objBottomNavCloseImage);
+	},
+	
+	//
+	//	start()
+	//	Display overlay and lightbox. If image is part of a set, add siblings to imageArray.
+	//
+	start: function(imageLink) {	
+
+		hideSelectBoxes();
+
+		// stretch overlay to fill page and fade in
+		var arrayPageSize = getPageSize();
+		Element.setHeight('overlay', arrayPageSize[1]);
+		new Effect.Appear('overlay', { duration: 0.2, from: 0.0, to: 0.8 });
+
+		imageArray = [];
+		imageNum = 0;		
+
+		if (!document.getElementsByTagName){ return; }
+		var anchors = document.getElementsByTagName('a');
+
+		// if image is NOT part of a set..
+		if((imageLink.getAttribute('rel') == 'lightbox')){
+			// add single image to imageArray
+			imageArray.push(new Array(imageLink.getAttribute('href'), imageLink.getAttribute('title')));			
+		} else {
+		// if image is part of a set..
+
+			// loop through anchors, find other images in set, and add them to imageArray
+			for (var i=0; i<anchors.length; i++){
+				var anchor = anchors[i];
+				if (anchor.getAttribute('href') && (anchor.getAttribute('rel') == imageLink.getAttribute('rel'))){
+					imageArray.push(new Array(anchor.getAttribute('href'), anchor.getAttribute('title')));
+				}
+			}
+			imageArray.removeDuplicates();
+			while(imageArray[imageNum][0] != imageLink.getAttribute('href')) { imageNum++;}
+		}
+
+		// calculate top offset for the lightbox and display 
+		var arrayPageSize = getPageSize();
+		var arrayPageScroll = getPageScroll();
+		var lightboxTop = arrayPageScroll[1] + (arrayPageSize[3] / 15);
+
+		Element.setTop('lightbox', lightboxTop);
+		Element.show('lightbox');
+		
+		this.changeImage(imageNum);
+	},
+
+	//
+	//	changeImage()
+	//	Hide most elements and preload image in preparation for resizing image container.
+	//
+	changeImage: function(imageNum) {	
+		
+		activeImage = imageNum;	// update global var
+
+		// hide elements during transition
+		Element.show('loading');
+		Element.hide('lightboxImage');
+		Element.hide('hoverNav');
+		Element.hide('prevLink');
+		Element.hide('nextLink');
+		Element.hide('imageDataContainer');
+		Element.hide('numberDisplay');		
+		
+		imgPreloader = new Image();
+		
+		// once image is preloaded, resize image container
+		imgPreloader.onload=function(){
+			Element.setSrc('lightboxImage', imageArray[activeImage][0]);
+			myLightbox.resizeImageContainer(imgPreloader.width, imgPreloader.height);
+		}
+		imgPreloader.src = imageArray[activeImage][0];
+	},
+
+	//
+	//	resizeImageContainer()
+	//
+	resizeImageContainer: function( imgWidth, imgHeight) {
+
+		// get current height and width
+		this.wCur = Element.getWidth('outerImageContainer');
+		this.hCur = Element.getHeight('outerImageContainer');
+
+		// scalars based on change from old to new
+		this.xScale = ((imgWidth  + (borderSize * 2)) / this.wCur) * 100;
+		this.yScale = ((imgHeight  + (borderSize * 2)) / this.hCur) * 100;
+
+		// calculate size difference between new and old image, and resize if necessary
+		wDiff = (this.wCur - borderSize * 2) - imgWidth;
+		hDiff = (this.hCur - borderSize * 2) - imgHeight;
+
+		if(!( hDiff == 0)){ new Effect.Scale('outerImageContainer', this.yScale, {scaleX: false, duration: resizeDuration, queue: 'front'}); }
+		if(!( wDiff == 0)){ new Effect.Scale('outerImageContainer', this.xScale, {scaleY: false, delay: resizeDuration, duration: resizeDuration}); }
+
+		// if new and old image are same size and no scaling transition is necessary, 
+		// do a quick pause to prevent image flicker.
+		if((hDiff == 0) && (wDiff == 0)){
+			if (navigator.appVersion.indexOf("MSIE")!=-1){ pause(250); } else { pause(100);} 
+		}
+
+		Element.setHeight('prevLink', imgHeight);
+		Element.setHeight('nextLink', imgHeight);
+		Element.setWidth( 'imageDataContainer', imgWidth + (borderSize * 2));
+
+		this.showImage();
+	},
+	
+	//
+	//	showImage()
+	//	Display image and begin preloading neighbors.
+	//
+	showImage: function(){
+		Element.hide('loading');
+		new Effect.Appear('lightboxImage', { duration: 0.5, queue: 'end', afterFinish: function(){	myLightbox.updateDetails(); } });
+		this.preloadNeighborImages();
+	},
+
+	//
+	//	updateDetails()
+	//	Display caption, image number, and bottom nav.
+	//
+	updateDetails: function() {
+	
+		Element.show('caption');
+		Element.setInnerHTML( 'caption', imageArray[activeImage][1]);
+		
+		// if image is part of set display 'Image x of x' 
+		if(imageArray.length > 1){
+			Element.show('numberDisplay');
+			Element.setInnerHTML( 'numberDisplay', "Image " + eval(activeImage + 1) + " of " + imageArray.length);
+		}
+
+		new Effect.Parallel(
+			[ new Effect.SlideDown( 'imageDataContainer', { sync: true, duration: resizeDuration + 0.25, from: 0.0, to: 1.0 }), 
+			  new Effect.Appear('imageDataContainer', { sync: true, duration: 1.0 }) ], 
+			{ duration: 0.65, afterFinish: function() { myLightbox.updateNav();} } 
+		);
+	},
+
+	//
+	//	updateNav()
+	//	Display appropriate previous and next hover navigation.
+	//
+	updateNav: function() {
+
+		Element.show('hoverNav');				
+
+		// if not first image in set, display prev image button
+		if(activeImage != 0){
+			Element.show('prevLink');
+			document.getElementById('prevLink').onclick = function() {
+				myLightbox.changeImage(activeImage - 1); return false;
+			}
+		}
+
+		// if not last image in set, display next image button
+		if(activeImage != (imageArray.length - 1)){
+			Element.show('nextLink');
+			document.getElementById('nextLink').onclick = function() {
+				myLightbox.changeImage(activeImage + 1); return false;
+			}
+		}
+		
+		this.enableKeyboardNav();
+	},
+
+	//
+	//	enableKeyboardNav()
+	//
+	enableKeyboardNav: function() {
+		document.onkeydown = this.keyboardAction; 
+	},
+
+	//
+	//	disableKeyboardNav()
+	//
+	disableKeyboardNav: function() {
+		document.onkeydown = '';
+	},
+
+	//
+	//	keyboardAction()
+	//
+	keyboardAction: function(e) {
+		if (e == null) { // ie
+			keycode = event.keyCode;
+		} else { // mozilla
+			keycode = e.which;
+		}
+
+		key = String.fromCharCode(keycode).toLowerCase();
+		
+		if((key == 'x') || (key == 'o') || (key == 'c')){	// close lightbox
+			myLightbox.end();
+		} else if(key == 'p'){	// display previous image
+			if(activeImage != 0){
+				myLightbox.disableKeyboardNav();
+				myLightbox.changeImage(activeImage - 1);
+			}
+		} else if(key == 'n'){	// display next image
+			if(activeImage != (imageArray.length - 1)){
+				myLightbox.disableKeyboardNav();
+				myLightbox.changeImage(activeImage + 1);
+			}
+		}
+
+
+	},
+
+	//
+	//	preloadNeighborImages()
+	//	Preload previous and next images.
+	//
+	preloadNeighborImages: function(){
+
+		if((imageArray.length - 1) > activeImage){
+			preloadNextImage = new Image();
+			preloadNextImage.src = imageArray[activeImage + 1][0];
+		}
+		if(activeImage > 0){
+			preloadPrevImage = new Image();
+			preloadPrevImage.src = imageArray[activeImage - 1][0];
+		}
+	
+	},
+
+	//
+	//	end()
+	//
+	end: function() {
+		this.disableKeyboardNav();
+		Element.hide('lightbox');
+		new Effect.Fade('overlay', { duration: 0.2});
+		showSelectBoxes();
+	}
+}
+
+// -----------------------------------------------------------------------------------
+
+//
+// getPageScroll()
+// Returns array with x,y page scroll values.
+// Core code from - quirksmode.org
+//
+function getPageScroll(){
+
+	var yScroll;
+
+	if (self.pageYOffset) {
+		yScroll = self.pageYOffset;
+	} else if (document.documentElement && document.documentElement.scrollTop){	 // Explorer 6 Strict
+		yScroll = document.documentElement.scrollTop;
+	} else if (document.body) {// all other Explorers
+		yScroll = document.body.scrollTop;
+	}
+
+	arrayPageScroll = new Array('',yScroll) 
+	return arrayPageScroll;
+}
+
+// -----------------------------------------------------------------------------------
+
+//
+// getPageSize()
+// Returns array with page width, height and window width, height
+// Core code from - quirksmode.org
+// Edit for Firefox by pHaez
+//
+function getPageSize(){
+	
+	var xScroll, yScroll;
+	
+	if (window.innerHeight && window.scrollMaxY) {	
+		xScroll = document.body.scrollWidth;
+		yScroll = window.innerHeight + window.scrollMaxY;
+	} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
+		xScroll = document.body.scrollWidth;
+		yScroll = document.body.scrollHeight;
+	} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
+		xScroll = document.body.offsetWidth;
+		yScroll = document.body.offsetHeight;
+	}
+	
+	var windowWidth, windowHeight;
+	if (self.innerHeight) {	// all except Explorer
+		windowWidth = self.innerWidth;
+		windowHeight = self.innerHeight;
+	} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
+		windowWidth = document.documentElement.clientWidth;
+		windowHeight = document.documentElement.clientHeight;
+	} else if (document.body) { // other Explorers
+		windowWidth = document.body.clientWidth;
+		windowHeight = document.body.clientHeight;
+	}	
+	
+	// for small pages with total height less then height of the viewport
+	if(yScroll < windowHeight){
+		pageHeight = windowHeight;
+	} else { 
+		pageHeight = yScroll;
+	}
+
+	// for small pages with total width less then width of the viewport
+	if(xScroll < windowWidth){	
+		pageWidth = windowWidth;
+	} else {
+		pageWidth = xScroll;
+	}
+
+
+	arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight) 
+	return arrayPageSize;
+}
+
+// -----------------------------------------------------------------------------------
+
+//
+// getKey(key)
+// Gets keycode. If 'x' is pressed then it hides the lightbox.
+//
+function getKey(e){
+	if (e == null) { // ie
+		keycode = event.keyCode;
+	} else { // mozilla
+		keycode = e.which;
+	}
+	key = String.fromCharCode(keycode).toLowerCase();
+	
+	if(key == 'x'){
+	}
+}
+
+// -----------------------------------------------------------------------------------
+
+//
+// listenKey()
+//
+function listenKey () {	document.onkeypress = getKey; }
+	
+// ---------------------------------------------------
+
+function showSelectBoxes(){
+	selects = document.getElementsByTagName("select");
+	for (i = 0; i != selects.length; i++) {
+		selects[i].style.visibility = "visible";
+	}
+}
+
+// ---------------------------------------------------
+
+function hideSelectBoxes(){
+	selects = document.getElementsByTagName("select");
+	for (i = 0; i != selects.length; i++) {
+		selects[i].style.visibility = "hidden";
+	}
+}
+
+// ---------------------------------------------------
+
+//
+// pause(numberMillis)
+// Pauses code execution for specified time. Uses busy code, not good.
+// Code from http://www.faqts.com/knowledge_base/view.phtml/aid/1602
+//
+function pause(numberMillis) {
+	var now = new Date();
+	var exitTime = now.getTime() + numberMillis;
+	while (true) {
+		now = new Date();
+		if (now.getTime() > exitTime)
+			return;
+	}
+}
+
+// ---------------------------------------------------
+
+
+
+function initLightbox() { myLightbox = new Lightbox(); }
+Event.observe(window, 'load', initLightbox, false);

Added: trunk/OzinoCMS/root/static/javascript/progress.jmpl
===================================================================
--- trunk/OzinoCMS/root/static/javascript/progress.jmpl	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/progress.jmpl	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,30 @@
+<span class="progressmeter">
+  <div class="meter">
+    <div class="amount"  style="width: [% percent %]%;"></div>
+    <div class="percent" style="width: 100%">[% percent %]%</div>
+  </div>
+  <table>
+    <tbody>
+      <tr>
+        <th>Status:</th>
+        <td>
+[% IF finished -%]
+          <span class="finished">Transfer complete  ([% size %])</span>
+[% ELSE -%]
+          [% received %] of [% size %]
+[% END -%]
+        </td>
+      </tr>
+[% IF starttime -%]
+      <tr>
+        <th>Time:</th>
+        <td>[% elapsedtime %] (~ [% remainingtime %] to go)</td>
+      </tr>
+      <tr>
+        <th>Rate:</th>
+        <td>[% currentrate %] (avg [% rate %])</td>
+      </tr>
+[% END -%]
+    </tbody>
+  </table>
+</span>

Added: trunk/OzinoCMS/root/static/javascript/progress.jmpl.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/progress.jmpl.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/progress.jmpl.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,69 @@
+/* 
+   This Javascript code was generated by Jemplate, the Javascript
+   Template Toolkit. Any changes made to this file will be lost the next
+   time the templates are compiled.
+
+   Copyright 2006 - Ingy döt Net - All rights reserved.
+*/
+
+if (typeof(Jemplate) == 'undefined')
+    throw('Jemplate.js must be loaded before any Jemplate template files');
+
+Jemplate.templateMap['progress.jmpl'] = function(context) {
+    if (! context) throw('Jemplate function called without context\n');
+    var stash = context.stash;
+    var output = '';
+
+    try {
+output += '<span class="progressmeter">\n  <div class="meter">\n    <div class="amount"  style="width: ';
+//line 3 "progress.jmpl"
+output += stash.get('percent');
+output += '%;"></div>\n    <div class="percent" style="width: 100%">';
+//line 4 "progress.jmpl"
+output += stash.get('percent');
+output += '%</div>\n  </div>\n  <table>\n    <tbody>\n      <tr>\n        <th>Status:</th>\n        <td>\n';
+//line 15 "progress.jmpl"
+if (stash.get('finished')) {
+output += '          <span class="finished">Transfer complete  (';
+//line 12 "progress.jmpl"
+output += stash.get('size');
+output += ')</span>\n';
+}
+else {
+output += '          ';
+//line 14 "progress.jmpl"
+output += stash.get('received');
+output += ' of ';
+//line 14 "progress.jmpl"
+output += stash.get('size');
+output += '\n';
+}
+
+output += '        </td>\n      </tr>\n';
+//line 27 "progress.jmpl"
+if (stash.get('starttime')) {
+output += '      <tr>\n        <th>Time:</th>\n        <td>';
+//line 21 "progress.jmpl"
+output += stash.get('elapsedtime');
+output += ' (~ ';
+//line 21 "progress.jmpl"
+output += stash.get('remainingtime');
+output += ' to go)</td>\n      </tr>\n      <tr>\n        <th>Rate:</th>\n        <td>';
+//line 25 "progress.jmpl"
+output += stash.get('currentrate');
+output += ' (avg ';
+//line 25 "progress.jmpl"
+output += stash.get('rate');
+output += ')</td>\n      </tr>\n';
+}
+
+output += '    </tbody>\n  </table>\n</span>\n';
+    }
+    catch(e) {
+        var error = context.set_error(e, output);
+        throw(error);
+    }
+
+    return output;
+}
+

Added: trunk/OzinoCMS/root/static/javascript/progress.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/progress.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/progress.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,1214 @@
+
+var progress;
+
+function startPopupProgressBar(form, options) {
+    var id = generateProgressID();
+    if (form.action.match(/\?/))
+        form.action += '&progress_id=' + id;
+    else
+        form.action += '?progress_id=' + id;
+
+    var width  = options.width  || '480';
+    var height = options.height || '150';
+    window.open ('/progress?progress_id='+id,'Apache2-UploadProgress','location=0,status=0,width='+width+',height='+height); return true;
+
+
+}
+
+function startEmbeddedProgressBar(form) {
+    progress = {};
+    progress.id         = generateProgressID();
+    if (form.action.match(/\?/))
+        form.action += '&progress_id=' + progress.id;
+    else
+        form.action += '?progress_id=' + progress.id;
+    progress.starttime  = new Date();
+    progress.lasttime   = new Date(progress.starttime);
+    progress.lastamount = 0;
+    window.setTimeout( reportUploadProgress, 100 );
+    return true;
+}
+
+function updateHTMLProgressBar(progress) {
+    if (progress.size > progress.received)
+        window.setTimeout( function() { window.location.reload() }, 1000 );
+    updateProgressBar( progress );
+    return true;
+}
+
+function updateProgressBar(progress) {
+
+    if (progress.received == progress.size)
+        progress.finished = 1;
+
+    // Only calculate rates and times is we were given a starttime
+    if (progress.starttime) {
+        var currenttime = new Date();
+        var totalelapsedtime = ( currenttime.getTime() - progress.starttime.getTime() ) / 1000;
+        var lastelapsedtime  = ( currenttime.getTime() - progress.lasttime.getTime() ) / 1000;
+
+        progress.elapsedtime = totalelapsedtime;
+
+        if (totalelapsedtime != 0)
+            progress.rate = parseInt( progress.received / totalelapsedtime );
+        else
+            progress.rate = 0;
+
+        if (lastelapsedtime != 0)
+            progress.currentrate = parseInt( (progress.received - progress.lastamount) / lastelapsedtime );
+        else
+            progress.currentrate = 0
+
+        if (progress.currentrate != 0)
+            progress.remainingtime = parseInt( (progress.size - progress.received) / progress.rate );
+        else
+            progress.remainingtime = '';
+
+        progress.currentrate   = formatBytes(progress.currentrate);
+        progress.rate          = formatBytes(progress.rate);
+        progress.elapsedtime   = formatTime(progress.elapsedtime);
+        progress.remainingtime = formatTime(progress.remainingtime);
+    }
+
+    if (progress.size != 0)
+        progress.percent = Math.round(progress.received / progress.size * 100);
+
+    progress.size     = formatBytes(progress.size);
+    progress.received = formatBytes(progress.received);
+
+    document.getElementById('progress').innerHTML = Jemplate.process('progress.jmpl', progress);
+}
+
+function reportUploadProgress() {
+    
+    url = '/progress?progress_id=' + progress.id;
+
+    var req = new XMLHttpRequest();
+    req.open('GET', url, Boolean(handleUploadProgressResults));
+    // We have to set the qvalue to 1.1 because Konqueror sends
+    // it's standard Accept header with our header tacked on the end
+    // which means that text/html gets picked first
+    req.setRequestHeader(
+        'Accept', 
+        'text/x-json; q=1.1'
+    );
+    req.onreadystatechange = function() {
+        if (req.readyState == 4)
+            if (req.status == 200)
+                handleUploadProgressResults(req.responseText);
+            else
+                // If there was an error, try again in 4 seconds
+                window.setTimeout( reportUploadProgress, 4000 );
+    };
+    req.send(null);
+}
+
+function handleUploadProgressResults(results) {
+
+    var state = JSON.parse(results);
+
+    if ( state != undefined ) {
+
+        state.starttime       = progress.starttime;
+        state.lasttime        = progress.lasttime;
+        state.lastamount      = progress.lastamount;
+
+        progress.lasttime     = new Date();
+        progress.lastamount   = state.received;
+        progress.size         = state.size;
+        progress.received     = state.received;
+
+        if ( progress.received != progress.size ) {
+            window.setTimeout( reportUploadProgress, 1000 );
+        }
+
+        updateProgressBar(state);
+    }
+}
+
+function formatTime(time) {
+    var seconds = Math.round(time);
+    var minutes = 0;
+    if (time >= 60) {
+        minutes = Math.round(seconds / 60);
+        seconds %= 60;
+    }
+    if (seconds < 10)
+        seconds = '0' + seconds;
+
+    return minutes + ':' + seconds;
+}
+
+function formatBytes(bytes, precision) {
+    if ( typeof(precision) != 'number')
+        precision = 2;
+    var suffix = '';
+
+    // Only positive values are allowed
+    if (bytes <= 0)
+        return bytes;
+
+    if (bytes > 1073741824) {
+        bytes /= 1073741824;
+        suffix = 'G';
+    } else if (bytes > 1048576) {
+        bytes /= 1048576;
+        suffix = 'M';
+    } else if (bytes > 1024) {
+        bytes /= 1024;
+        suffix = 'K';
+    }
+
+    return formatNumber(bytes, precision) + suffix;
+}
+
+function formatNumber(number, precision) {
+    if ( typeof(precision) != 'number')
+        precision = 2;
+    var num = new Number(number);
+    return num.toFixed(precision)
+}
+
+function setActiveStyleSheet(title) {
+    var i, a, main;
+    for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
+        if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
+            a.disabled = true;
+            if(a.getAttribute("title") == title)
+                 a.disabled = false;
+        }
+    }
+}
+
+var alpha = "0123456789abcdef";
+
+function generateProgressID() {
+    var id = '';
+    for(var i=0; i < 32; i++) {
+        id += alpha.charAt(Math.round(Math.random()*14));
+    }
+    return id;
+}
+
+
+/*------------------------------------------------------------------------------
+Jemplate - Template Toolkit for Javascript
+
+DESCRIPTION - This module provides the runtime Javascript support for
+compiled Jemplate templates.
+
+AUTHOR - Ingy döt Net <ingy at cpan.org>
+
+Copyright 2006 Ingy döt Net. All Rights Reserved.
+
+This module is free software; you can redistribute it and/or
+modify it under the same terms as Perl itself.
+------------------------------------------------------------------------------*/
+
+//------------------------------------------------------------------------------
+// Main Jemplate class
+//------------------------------------------------------------------------------
+if (typeof Jemplate == 'undefined')
+    Jemplate = function() {};
+
+Jemplate.templateMap = {};
+
+Jemplate.process = function(template, data, output) {
+    var context = new Jemplate.Context();
+    context.stash = new Jemplate.Stash();
+    context._filter = new Jemplate.Filter();
+    var result;
+
+    var proc = function(input) {
+        try { 
+            result = context.process(template, input);
+        }
+        catch(e) {
+            if (! String(e).match(/Jemplate\.STOP\n/))
+                throw(e);
+            result = e.toString().replace(/Jemplate\.STOP\n/, '')
+        }
+
+        if (typeof output == 'undefined')
+            return result;
+        if (typeof output == 'function') {
+            output(result);
+            return;
+        }
+        if (typeof(output) == 'string' || output instanceof String) {
+            if (output.match(/^#[\w\-]+$/)) {
+                var id = output.replace(/^#/, '');
+                var element = document.getElementById(id);
+                if (typeof element == 'undefined')
+                    throw('No element found with id="' + id + '"');
+                element.innerHTML = result;
+                return;
+            }
+        }
+        else {
+            output.innerHTML = result;
+            return;
+        }
+
+        throw("Invalid arguments in call to Jemplate.process");
+
+        return 1;
+    }
+
+    if (typeof data == 'function')
+        data = data();
+    else if (typeof data == 'string') {
+        Ajax.get(data, function(r) { proc(JSON.parse(r)) });
+        return;
+    }
+
+    return proc(data);
+}
+
+//------------------------------------------------------------------------------
+// Jemplate.Context class
+//------------------------------------------------------------------------------
+if (typeof Jemplate.Context == 'undefined')
+    Jemplate.Context = function() {};
+
+proto = Jemplate.Context.prototype;
+
+proto.include = function(template, args) {
+    return this.process(template, args, true);
+}
+
+proto.process = function(template, args, localise) {
+    if (localise)
+        this.stash.clone(args);
+    else
+        this.stash.update(args);
+    var func = Jemplate.templateMap[template];
+    if (typeof func == 'undefined')
+        throw('No Jemplate template named "' + template + '" available');
+    var output = func(this);
+    if (localise)
+        this.stash.declone();
+    return output;
+}
+
+proto.set_error = function(error, output) {
+    this._error = [error, output];
+    return error;
+}
+
+proto.filter = function(text, name, args) {
+    if (name == 'null') 
+        name = "null_filter";
+    if (typeof this._filter.filters[name] == "function")
+        return this._filter.filters[name](text, args, this);  
+    else 
+        throw "Unknown filter name ':" + name + "'";
+}
+
+//------------------------------------------------------------------------------
+// Jemplate.Filter class
+//------------------------------------------------------------------------------
+if (typeof Jemplate.Filter == 'undefined') {
+    Jemplate.Filter = function() { };
+}
+
+proto = Jemplate.Filter.prototype;
+
+proto.filters = {};
+
+proto.filters.null_filter = function(text) {
+    return ''; 
+}
+
+proto.filters.upper = function(text) {
+    return text.toUpperCase();
+}
+
+proto.filters.lower = function(text) {
+    return text.toLowerCase();
+}
+
+proto.filters.ucfirst = function(text) {
+    var first = text.charAt(0);
+    var rest = text.substr(1);
+    return first.toUpperCase() + rest;
+}
+
+proto.filters.lcfirst = function(text) {
+    var first = text.charAt(0);
+    var rest = text.substr(1);
+    return first.toLowerCase() + rest;
+}
+
+proto.filters.trim = function(text) {
+    return text.replace( /^\s+/g, "" ).replace( /\s+$/g, "" );
+}
+
+proto.filters.collapse = function(text) {
+    return text.replace( /^\s+/g, "" ).replace( /\s+$/g, "" ).replace(/\s+/, " ");
+}
+
+proto.filters.html = function(text) {
+    text = text.replace(/&/g, '&amp;'); 
+    text = text.replace(/</g, '&lt;');
+    text = text.replace(/>/g, '&gt;');
+    text = text.replace(/"/g, '&quot;'); // " end quote for emacs
+    return text;
+}
+
+proto.filters.html_para = function(text) {
+    var lines = text.split(/(?:\r?\n){2,}/);
+    return "<p>\n" + lines.join("\n</p>\n\n<p>\n") + "</p>\n";
+}
+
+proto.filters.html_break = function(text) {
+    return text.replace(/(\r?\n){2,}/g, "$1<br />$1<br />$1");
+}
+
+proto.filters.html_line_break = function(text) {
+    return text.replace(/(\r?\n)/g, "$1<br />$1");
+}
+
+proto.filters.uri = function(text) {
+    return encodeURI(text);
+}
+
+proto.filters.indent = function(text, args) {
+    var pad = args[0];
+    if (! text) return;
+    if (typeof pad == 'undefined') 
+        pad = 4;
+
+    var finalpad = '';
+    if (typeof pad == 'number' || String(pad).match(/^\d$/)) {
+        for (var i = 0; i < pad; i++) {
+            finalpad += ' '; 
+        }
+    } else {
+        finalpad = pad;
+    }
+    var output = text.replace(/^/gm, finalpad);
+    return output;
+}
+
+proto.filters.truncate = function(text, args) {
+    var len = args[0];
+    if (! text) return;
+    if (! len) 
+        len = 32;
+    // This should probably be <=, but TT just uses <
+    if (text.length < len)
+        return text;
+    var newlen = len - 3;
+    return text.substr(0,newlen) + '...';
+}
+
+proto.filters.repeat = function(text, iter) {
+    if (! text) return;
+    if (! iter || iter == 0) 
+        iter = 1;
+    if (iter == 1) return text
+    
+    var output = text;
+    for (var i = 1; i < iter; i++) {
+        output += text;
+    } 
+    return output;
+}
+
+proto.filters.replace = function(text, args) {
+    if (! text) return;
+    var re_search = args[0];
+    var text_replace = args[1];
+    if (! re_search)
+        re_search = '';
+    if (! text_replace)
+        text_replace = '';
+    var re = new RegExp(re_search, 'g');
+    return text.replace(re, text_replace);
+}
+
+//------------------------------------------------------------------------------
+// Jemplate.Stash class
+//------------------------------------------------------------------------------
+if (typeof Jemplate.Stash == 'undefined') {
+    Jemplate.Stash = function() {
+        this.data = {};
+    };
+}
+
+proto = Jemplate.Stash.prototype;
+
+proto.clone = function(args) {
+    var data = this.data;
+    this.data = {};
+    this.update(data);
+    this.update(args);
+    this.data._PARENT = data;
+}
+
+proto.declone = function(args) {
+    this.data = this.data._PARENT || this.data;
+}
+
+proto.update = function(args) {
+    if (typeof args == 'undefined') return;
+    for (var key in args) {
+        var value = args[key];
+        this.set(key, value);
+    }
+}
+
+proto.get = function(key) {
+    var root = this.data;
+    if (key instanceof Array) {
+        for (var i = 0; i < key.length; i += 2) {
+            var args = key.slice(i, i+2);
+            args.unshift(root);
+            value = this._dotop.apply(this, args);
+            if (typeof value == 'undefined')
+                break;
+            root = value;
+    
+    }
+    }
+    else {
+        value = this._dotop(root, key);
+    }
+
+    return value;
+}
+
+proto.set = function(key, value, set_default) {
+    if (! (set_default && (typeof this.data[key] != 'undefined')))
+        this.data[key] = value;
+}
+
+proto._dotop = function(root, item, args) {
+    if (typeof item == 'undefined' ||
+        typeof item == 'string' && item.match(/^[\._]/)) {
+        return undefined;
+    }
+
+    if ((! args) &&
+        (typeof root == 'object') &&
+        (!(root instanceof Array) || (typeof item == 'number')) &&
+        (typeof root[item] != 'undefined')) {
+        var value = root[item];
+        if (typeof value == 'function')
+            value = value();
+        return value;
+    }
+
+    if (typeof root == 'string' && this.string_functions[item])
+        return this.string_functions[item](root, args);
+    if (root instanceof Array && this.list_functions[item])
+        return this.list_functions[item](root, args);
+    if (typeof root == 'object' && this.hash_functions[item])
+        return this.hash_functions[item](root, args);
+    if (typeof root[item] == 'function')
+        return root[item].apply(args);
+
+    return undefined;
+}
+
+proto.string_functions = {};
+
+// chunk(size)     negative size chunks from end 
+proto.string_functions.chunk = function(string, args) {
+    var size = args[0];
+    var list = new Array();
+    if (! size)
+        size = 1;
+    if (size < 0) {
+        size = 0 - size;
+        for (i = string.length - size; i >= 0; i = i - size)
+            list.unshift(string.substr(i, size));
+        if (string.length % size)
+            list.unshift(string.substr(0, string.length % size));
+    }
+    else
+        for (i = 0; i < string.length; i = i + size)
+            list.push(string.substr(i, size));
+    return list;
+}
+
+// defined         is value defined? 
+proto.string_functions.defined = function(string) {
+    return 1;
+}
+
+// hash            treat as single-element hash with key value 
+proto.string_functions.hash = function(string) {
+    return { 'value': string };
+}
+
+// length          length of string representation 
+proto.string_functions.length = function(string) {
+    return string.length;
+}
+
+// list            treat as single-item list 
+proto.string_functions.list = function(string) {
+    return [ string ];
+}
+
+// match(re)       get list of matches
+proto.string_functions.match = function(string, args) {
+    var regexp = new RegExp(args[0], 'gm');
+    var list = string.match(regexp);
+    return list;
+}
+
+// repeat(n)       repeated n times 
+proto.string_functions.repeat = function(string, args) {
+    var n = args[0] || 1;
+    var output = '';
+    for (var i = 0; i < n; i++) {
+        output += string;
+    }
+    return output;
+}
+
+// replace(re, sub)    replace instances of re with sub 
+proto.string_functions.replace = function(string, args) {
+    var regexp = new RegExp(args[0], 'gm');
+    var sub = args[1];
+    if (! sub)
+        sub  = '';
+    var output = string.replace(regexp, sub);
+    return output;
+}
+
+// search(re)      true if value matches re
+proto.string_functions.search = function(string, args) {
+    var regexp = new RegExp(args[0]);
+    return (string.search(regexp) >= 0) ? 1 : 0;
+}
+
+// size            returns 1, as if a single-item list 
+proto.string_functions.size = function(string) {
+    return 1;
+}
+
+// split(re)       split string on re 
+proto.string_functions.split = function(string, args) {
+    var regexp = new RegExp(args[0]);
+    var list = string.split(regexp);
+    return list;
+}
+
+
+
+proto.list_functions = {};
+
+proto.list_functions.join = function(list, args) {
+    return list.join(args[0]);
+};
+
+proto.list_functions.sort = function(list) {
+    return list.sort();
+}
+
+proto.list_functions.nsort = function(list) {
+    return list.sort(function(a, b) { return (a-b) });
+}
+
+proto.list_functions.grep = function(list, args) {
+    var regexp = new RegExp(args[0]);
+    var result = [];
+    for (var i = 0; i < list.length; i++) {
+        if (list[i].match(regexp))
+            result.push(list[i]);
+    }
+    return result;
+}
+
+proto.list_functions.unique = function(list) {
+    var result = [];
+    var seen = {};
+    for (var i = 0; i < list.length; i++) {
+        var elem = list[i];
+        if (! seen[elem])
+            result.push(elem);
+        seen[elem] = true;
+    }
+    return result;
+}
+
+proto.list_functions.reverse = function(list) {
+    var result = [];
+    for (var i = list.length - 1; i >= 0; i--) {
+        result.push(list[i]);
+    }
+    return result;
+}
+
+proto.list_functions.merge = function(list, args) {
+    var result = [];
+    var push_all = function(elem) {
+        if (elem instanceof Array) {
+            for (var j = 0; j < elem.length; j++) {
+                result.push(elem[j]);
+            }
+        }
+        else {
+            result.push(elem);
+        }
+    }
+    push_all(list);
+    for (var i = 0; i < args.length; i++) {
+        push_all(args[i]);
+    }
+    return result;
+}
+
+proto.list_functions.slice = function(list, args) {
+    return list.slice(args[0], args[1]);
+}
+
+proto.list_functions.splice = function(list, args) {
+    if (args.length == 1)
+        return list.splice(args[0]);
+    if (args.length == 2)
+        return list.splice(args[0], args[1]);
+    if (args.length == 3)
+        return list.splice(args[0], args[1], args[2]);
+}
+
+proto.list_functions.push = function(list, args) {
+    list.push(args[0]);
+    return list;        
+}
+
+proto.list_functions.pop = function(list) {
+    return list.pop();
+}
+
+proto.list_functions.unshift = function(list, args) {
+    list.unshift(args[0]);
+    return list;        
+}
+
+proto.list_functions.shift = function(list) {
+    return list.shift();
+}
+
+proto.list_functions.first = function(list) {
+    return list[0];        
+}
+
+proto.list_functions.size = function(list) {
+    return list.length;
+}
+
+proto.list_functions.max = function(list) {
+    return list.length - 1;
+}
+
+proto.list_functions.last = function(list) {
+    return list.slice(-1);        
+}
+
+proto.hash_functions = {};
+
+
+// each            list of alternating keys/values 
+proto.hash_functions.each = function(hash) {
+    var list = new Array();
+    for ( var key in hash )
+        list.push(key, hash[key]);
+    return list;
+}
+
+// exists(key)     does key exist? 
+proto.hash_functions.exists = function(hash, args) {
+    return ( typeof( hash[args[0]] ) == "undefined" ) ? 0 : 1;
+}
+
+// FIXME proto.hash_functions.import blows everything up
+//
+// import(hash2)   import contents of hash2 
+// import          import into current namespace hash 
+//proto.hash_functions.import = function(hash, args) {
+//    var hash2 = args[0];
+//    for ( var key in hash2 )
+//        hash[key] = hash2[key];
+//    return '';
+//}
+
+// keys            list of keys 
+proto.hash_functions.keys = function(hash) {
+    var list = new Array();
+    for ( var key in hash )
+        list.push(key);
+    return list;
+}
+
+// list            returns alternating key, value 
+proto.hash_functions.list = function(hash, args) {
+    var what = '';
+    if ( args )
+        var what = args[0];
+        
+    var list = new Array();
+    if (what == 'keys')
+        for ( var key in hash )
+            list.push(key);
+    else if (what == 'values')
+        for ( var key in hash )
+            list.push(hash[key]);
+    else if (what == 'each')
+        for ( var key in hash )
+            list.push(key, hash[key]);
+    else
+        for ( var key in hash )
+            list.push({ 'key': key, 'value': hash[key] });
+
+    return list;
+}
+
+// nsort           keys sorted numerically 
+proto.hash_functions.nsort = function(hash) {
+    var list = new Array();
+    for (var key in hash)
+        list.push(key);
+    return list.sort(function(a, b) { return (a-b) });
+}
+
+// size            number of pairs 
+proto.hash_functions.size = function(hash) {
+    var size = 0;
+    for (var key in hash)
+        size++;
+    return size;
+}
+
+
+// sort            keys sorted alphabetically 
+proto.hash_functions.sort = function(hash) {
+    var list = new Array();
+    for (var key in hash)
+        list.push(key);
+    return list.sort();
+}
+
+// values          list of values 
+proto.hash_functions.values = function(hash) {
+    var list = new Array();
+    for ( var key in hash )
+        list.push(hash[key]);
+    return list;
+}
+
+
+
+//------------------------------------------------------------------------------
+// Jemplate.Iterator class
+//------------------------------------------------------------------------------
+if (typeof Jemplate.Iterator == 'undefined') {
+    Jemplate.Iterator = function(object) {
+        if( object instanceof Array ) {
+            this.object = object;
+        }
+        else if ( object instanceof Object ) {
+            this.object = object;
+            var object_keys = new Array;
+            for( var key in object ) {
+                object_keys[object_keys.length] = key;
+            }
+            this.object_keys = object_keys.sort();
+        }
+    }
+}
+
+proto = Jemplate.Iterator.prototype;
+
+proto.get_first = function() {
+    this.index = 0;
+    return this.get_next();
+}
+
+proto.get_next = function() {
+    var object = this.object;
+    var index = this.index++;
+    if (typeof object == 'undefined')
+        throw('No object to iterate');
+    if( this.object_keys ) {
+        if (index < this.object_keys.length)
+            return [this.object_keys[index], false];
+    } else {
+        if (index < object.length)
+            return [object[index], false];
+    }
+    return [null, true];
+}
+
+//------------------------------------------------------------------------------
+// Debugging Support
+//------------------------------------------------------------------------------
+
+function XXX(msg) {
+    if (! confirm(msg))
+        throw("terminated...");
+}
+
+function JJJ(obj) {
+    XXX(JSON.stringify(obj));
+}
+
+//------------------------------------------------------------------------------
+// Ajax support
+//------------------------------------------------------------------------------
+if (! this.Ajax) Ajax = {};
+
+Ajax.get = function(url, callback) {
+    var req = new XMLHttpRequest();
+    req.open('GET', url, Boolean(callback));
+    return Ajax._send(req, null, callback);
+}
+
+Ajax.post = function(url, data, callback) {
+    var req = new XMLHttpRequest();
+    req.open('POST', url, Boolean(callback));
+    req.setRequestHeader(
+        'Content-Type', 
+        'application/x-www-form-urlencoded'
+    );
+    return Ajax._send(req, data, callback);
+}
+
+Ajax._send = function(req, data, callback) {
+    if (callback) {
+        req.onreadystatechange = function() {
+            if (req.readyState == 4) {
+                if(req.status == 200)
+                    callback(req.responseText);
+            }
+        };
+    }
+    req.send(data);
+    if (!callback) {
+        if (req.status != 200)
+            throw('Request for "' + url +
+                  '" failed with status: ' + req.status);
+        return req.responseText;
+    }
+}
+
+//------------------------------------------------------------------------------
+// Cross-Browser XMLHttpRequest v1.1
+//------------------------------------------------------------------------------
+/*
+Emulate Gecko 'XMLHttpRequest()' functionality in IE and Opera. Opera requires
+the Sun Java Runtime Environment <http://www.java.com/>.
+
+by Andrew Gregory
+http://www.scss.com.au/family/andrew/webdesign/xmlhttprequest/
+
+This work is licensed under the Creative Commons Attribution License. To view a
+copy of this license, visit http://creativecommons.org/licenses/by/1.0/ or send
+a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305,
+USA.
+*/
+
+// IE support
+if (window.ActiveXObject && !window.XMLHttpRequest) {
+  window.XMLHttpRequest = function() {
+    return new ActiveXObject((navigator.userAgent.toLowerCase().indexOf('msie 5') != -1) ? 'Microsoft.XMLHTTP' : 'Msxml2.XMLHTTP');
+  };
+}
+
+// Opera support
+if (window.opera && !window.XMLHttpRequest) {
+  window.XMLHttpRequest = function() {
+    this.readyState = 0; // 0=uninitialized,1=loading,2=loaded,3=interactive,4=complete
+    this.status = 0; // HTTP status codes
+    this.statusText = '';
+    this._headers = [];
+    this._aborted = false;
+    this._async = true;
+    this.abort = function() {
+      this._aborted = true;
+    };
+    this.getAllResponseHeaders = function() {
+      return this.getAllResponseHeader('*');
+    };
+    this.getAllResponseHeader = function(header) {
+      var ret = '';
+      for (var i = 0; i < this._headers.length; i++) {
+        if (header == '*' || this._headers[i].h == header) {
+          ret += this._headers[i].h + ': ' + this._headers[i].v + '\n';
+        }
+      }
+      return ret;
+    };
+    this.setRequestHeader = function(header, value) {
+      this._headers[this._headers.length] = {h:header, v:value};
+    };
+    this.open = function(method, url, async, user, password) {
+      this.method = method;
+      this.url = url;
+      this._async = true;
+      this._aborted = false;
+      if (arguments.length >= 3) {
+        this._async = async;
+      }
+      if (arguments.length > 3) {
+        // user/password support requires a custom Authenticator class
+        opera.postError('XMLHttpRequest.open() - user/password not supported');
+      }
+      this._headers = [];
+      this.readyState = 1;
+      if (this.onreadystatechange) {
+        this.onreadystatechange();
+      }
+    };
+    this.send = function(data) {
+      if (!navigator.javaEnabled()) {
+        alert("XMLHttpRequest.send() - Java must be installed and enabled.");
+        return;
+      }
+      if (this._async) {
+        setTimeout(this._sendasync, 0, this, data);
+        // this is not really asynchronous and won't execute until the current
+        // execution context ends
+      } else {
+        this._sendsync(data);
+      }
+    }
+    this._sendasync = function(req, data) {
+      if (!req._aborted) {
+        req._sendsync(data);
+      }
+    };
+    this._sendsync = function(data) {
+      this.readyState = 2;
+      if (this.onreadystatechange) {
+        this.onreadystatechange();
+      }
+      // open connection
+      var url = new java.net.URL(new java.net.URL(window.location.href), this.url);
+      var conn = url.openConnection();
+      for (var i = 0; i < this._headers.length; i++) {
+        conn.setRequestProperty(this._headers[i].h, this._headers[i].v);
+      }
+      this._headers = [];
+      if (this.method == 'POST') {
+        // POST data
+        conn.setDoOutput(true);
+        var wr = new java.io.OutputStreamWriter(conn.getOutputStream());
+        wr.write(data);
+        wr.flush();
+        wr.close();
+      }
+      // read response headers
+      // NOTE: the getHeaderField() methods always return nulls for me :(
+      var gotContentEncoding = false;
+      var gotContentLength = false;
+      var gotContentType = false;
+      var gotDate = false;
+      var gotExpiration = false;
+      var gotLastModified = false;
+      for (var i = 0; ; i++) {
+        var hdrName = conn.getHeaderFieldKey(i);
+        var hdrValue = conn.getHeaderField(i);
+        if (hdrName == null && hdrValue == null) {
+          break;
+        }
+        if (hdrName != null) {
+          this._headers[this._headers.length] = {h:hdrName, v:hdrValue};
+          switch (hdrName.toLowerCase()) {
+            case 'content-encoding': gotContentEncoding = true; break;
+            case 'content-length'  : gotContentLength   = true; break;
+            case 'content-type'    : gotContentType     = true; break;
+            case 'date'            : gotDate            = true; break;
+            case 'expires'         : gotExpiration      = true; break;
+            case 'last-modified'   : gotLastModified    = true; break;
+          }
+        }
+      }
+      // try to fill in any missing header information
+      var val;
+      val = conn.getContentEncoding();
+      if (val != null && !gotContentEncoding) this._headers[this._headers.length] = {h:'Content-encoding', v:val};
+      val = conn.getContentLength();
+      if (val != -1 && !gotContentLength) this._headers[this._headers.length] = {h:'Content-length', v:val};
+      val = conn.getContentType();
+      if (val != null && !gotContentType) this._headers[this._headers.length] = {h:'Content-type', v:val};
+      val = conn.getDate();
+      if (val != 0 && !gotDate) this._headers[this._headers.length] = {h:'Date', v:(new Date(val)).toUTCString()};
+      val = conn.getExpiration();
+      if (val != 0 && !gotExpiration) this._headers[this._headers.length] = {h:'Expires', v:(new Date(val)).toUTCString()};
+      val = conn.getLastModified();
+      if (val != 0 && !gotLastModified) this._headers[this._headers.length] = {h:'Last-modified', v:(new Date(val)).toUTCString()};
+      // read response data
+      var reqdata = '';
+      var stream = conn.getInputStream();
+      if (stream) {
+        var reader = new java.io.BufferedReader(new java.io.InputStreamReader(stream));
+        var line;
+        while ((line = reader.readLine()) != null) {
+          if (this.readyState == 2) {
+            this.readyState = 3;
+            if (this.onreadystatechange) {
+              this.onreadystatechange();
+            }
+          }
+          reqdata += line + '\n';
+        }
+        reader.close();
+        this.status = 200;
+        this.statusText = 'OK';
+        this.responseText = reqdata;
+        this.readyState = 4;
+        if (this.onreadystatechange) {
+          this.onreadystatechange();
+        }
+        if (this.onload) {
+          this.onload();
+        }
+      } else {
+        // error
+        this.status = 404;
+        this.statusText = 'Not Found';
+        this.responseText = '';
+        this.readyState = 4;
+        if (this.onreadystatechange) {
+          this.onreadystatechange();
+        }
+        if (this.onerror) {
+          this.onerror();
+        }
+      }
+    };
+  };
+}
+// ActiveXObject emulation
+if (!window.ActiveXObject && window.XMLHttpRequest) {
+  window.ActiveXObject = function(type) {
+    switch (type.toLowerCase()) {
+      case 'microsoft.xmlhttp':
+      case 'msxml2.xmlhttp':
+        return new XMLHttpRequest();
+    }
+    return null;
+  };
+}
+
+
+//------------------------------------------------------------------------------
+// JSON Support
+//------------------------------------------------------------------------------
+
+/*
+Copyright (c) 2005 JSON.org
+*/
+var JSON = function () {
+    var m = {
+            '\b': '\\b',
+            '\t': '\\t',
+            '\n': '\\n',
+            '\f': '\\f',
+            '\r': '\\r',
+            '"' : '\\"',
+            '\\': '\\\\'
+        },
+        s = {
+            'boolean': function (x) {
+                return String(x);
+            },
+            number: function (x) {
+                return isFinite(x) ? String(x) : 'null';
+            },
+            string: function (x) {
+                if (/["\\\x00-\x1f]/.test(x)) {
+                    x = x.replace(/([\x00-\x1f\\"])/g, function(a, b) {
+                        var c = m[b];
+                        if (c) {
+                            return c;
+                        }
+                        c = b.charCodeAt();
+                        return '\\u00' +
+                            Math.floor(c / 16).toString(16) +
+                            (c % 16).toString(16);
+                    });
+                }
+                return '"' + x + '"';
+            },
+            object: function (x) {
+                if (x) {
+                    var a = [], b, f, i, l, v;
+                    if (x instanceof Array) {
+                        a[0] = '[';
+                        l = x.length;
+                        for (i = 0; i < l; i += 1) {
+                            v = x[i];
+                            f = s[typeof v];
+                            if (f) {
+                                v = f(v);
+                                if (typeof v == 'string') {
+                                    if (b) {
+                                        a[a.length] = ',';
+                                    }
+                                    a[a.length] = v;
+                                    b = true;
+                                }
+                            }
+                        }
+                        a[a.length] = ']';
+                    } else if (x instanceof Object) {
+                        a[0] = '{';
+                        for (i in x) {
+                            v = x[i];
+                            f = s[typeof v];
+                            if (f) {
+                                v = f(v);
+                                if (typeof v == 'string') {
+                                    if (b) {
+                                        a[a.length] = ',';
+                                    }
+                                    a.push(s.string(i), ':', v);
+                                    b = true;
+                                }
+                            }
+                        }
+                        a[a.length] = '}';
+                    } else {
+                        return;
+                    }
+                    return a.join('');
+                }
+                return 'null';
+            }
+        };
+    return {
+        copyright: '(c)2005 JSON.org',
+        license: 'http://www.crockford.com/JSON/license.html',
+        stringify: function (v) {
+            var f = s[typeof v];
+            if (f) {
+                v = f(v);
+                if (typeof v == 'string') {
+                    return v;
+                }
+            }
+            return null;
+        },
+        parse: function (text) {
+            try {
+                return !(/[^,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]/.test(
+                        text.replace(/"(\\.|[^"\\])*"/g, ''))) &&
+                    eval('(' + text + ')');
+            } catch (e) {
+                return false;
+            }
+        }
+    };
+}();
+
+
+/*------------------------------------------------------------------------------
+End Source for Jemplate - Template Toolkit for Javascript
+------------------------------------------------------------------------------*/
+

Added: trunk/OzinoCMS/root/static/javascript/prototype.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/prototype.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/prototype.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,2515 @@
+/*  Prototype JavaScript framework, version 1.5.0
+ *  (c) 2005-2007 Sam Stephenson
+ *
+ *  Prototype is freely distributable under the terms of an MIT-style license.
+ *  For details, see the Prototype web site: http://prototype.conio.net/
+ *
+/*--------------------------------------------------------------------------*/
+
+var Prototype = {
+  Version: '1.5.0',
+  BrowserFeatures: {
+    XPath: !!document.evaluate
+  },
+
+  ScriptFragment: '(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)',
+  emptyFunction: function() {},
+  K: function(x) { return x }
+}
+
+var Class = {
+  create: function() {
+    return function() {
+      this.initialize.apply(this, arguments);
+    }
+  }
+}
+
+var Abstract = new Object();
+
+Object.extend = function(destination, source) {
+  for (var property in source) {
+    destination[property] = source[property];
+  }
+  return destination;
+}
+
+Object.extend(Object, {
+  inspect: function(object) {
+    try {
+      if (object === undefined) return 'undefined';
+      if (object === null) return 'null';
+      return object.inspect ? object.inspect() : object.toString();
+    } catch (e) {
+      if (e instanceof RangeError) return '...';
+      throw e;
+    }
+  },
+
+  keys: function(object) {
+    var keys = [];
+    for (var property in object)
+      keys.push(property);
+    return keys;
+  },
+
+  values: function(object) {
+    var values = [];
+    for (var property in object)
+      values.push(object[property]);
+    return values;
+  },
+
+  clone: function(object) {
+    return Object.extend({}, object);
+  }
+});
+
+Function.prototype.bind = function() {
+  var __method = this, args = $A(arguments), object = args.shift();
+  return function() {
+    return __method.apply(object, args.concat($A(arguments)));
+  }
+}
+
+Function.prototype.bindAsEventListener = function(object) {
+  var __method = this, args = $A(arguments), object = args.shift();
+  return function(event) {
+    return __method.apply(object, [( event || window.event)].concat(args).concat($A(arguments)));
+  }
+}
+
+Object.extend(Number.prototype, {
+  toColorPart: function() {
+    var digits = this.toString(16);
+    if (this < 16) return '0' + digits;
+    return digits;
+  },
+
+  succ: function() {
+    return this + 1;
+  },
+
+  times: function(iterator) {
+    $R(0, this, true).each(iterator);
+    return this;
+  }
+});
+
+var Try = {
+  these: function() {
+    var returnValue;
+
+    for (var i = 0, length = arguments.length; i < length; i++) {
+      var lambda = arguments[i];
+      try {
+        returnValue = lambda();
+        break;
+      } catch (e) {}
+    }
+
+    return returnValue;
+  }
+}
+
+/*--------------------------------------------------------------------------*/
+
+var PeriodicalExecuter = Class.create();
+PeriodicalExecuter.prototype = {
+  initialize: function(callback, frequency) {
+    this.callback = callback;
+    this.frequency = frequency;
+    this.currentlyExecuting = false;
+
+    this.registerCallback();
+  },
+
+  registerCallback: function() {
+    this.timer = setInterval(this.onTimerEvent.bind(this), this.frequency * 1000);
+  },
+
+  stop: function() {
+    if (!this.timer) return;
+    clearInterval(this.timer);
+    this.timer = null;
+  },
+
+  onTimerEvent: function() {
+    if (!this.currentlyExecuting) {
+      try {
+        this.currentlyExecuting = true;
+        this.callback(this);
+      } finally {
+        this.currentlyExecuting = false;
+      }
+    }
+  }
+}
+String.interpret = function(value){
+  return value == null ? '' : String(value);
+}
+
+Object.extend(String.prototype, {
+  gsub: function(pattern, replacement) {
+    var result = '', source = this, match;
+    replacement = arguments.callee.prepareReplacement(replacement);
+
+    while (source.length > 0) {
+      if (match = source.match(pattern)) {
+        result += source.slice(0, match.index);
+        result += String.interpret(replacement(match));
+        source  = source.slice(match.index + match[0].length);
+      } else {
+        result += source, source = '';
+      }
+    }
+    return result;
+  },
+
+  sub: function(pattern, replacement, count) {
+    replacement = this.gsub.prepareReplacement(replacement);
+    count = count === undefined ? 1 : count;
+
+    return this.gsub(pattern, function(match) {
+      if (--count < 0) return match[0];
+      return replacement(match);
+    });
+  },
+
+  scan: function(pattern, iterator) {
+    this.gsub(pattern, iterator);
+    return this;
+  },
+
+  truncate: function(length, truncation) {
+    length = length || 30;
+    truncation = truncation === undefined ? '...' : truncation;
+    return this.length > length ?
+      this.slice(0, length - truncation.length) + truncation : this;
+  },
+
+  strip: function() {
+    return this.replace(/^\s+/, '').replace(/\s+$/, '');
+  },
+
+  stripTags: function() {
+    return this.replace(/<\/?[^>]+>/gi, '');
+  },
+
+  stripScripts: function() {
+    return this.replace(new RegExp(Prototype.ScriptFragment, 'img'), '');
+  },
+
+  extractScripts: function() {
+    var matchAll = new RegExp(Prototype.ScriptFragment, 'img');
+    var matchOne = new RegExp(Prototype.ScriptFragment, 'im');
+    return (this.match(matchAll) || []).map(function(scriptTag) {
+      return (scriptTag.match(matchOne) || ['', ''])[1];
+    });
+  },
+
+  evalScripts: function() {
+    return this.extractScripts().map(function(script) { return eval(script) });
+  },
+
+  escapeHTML: function() {
+    var div = document.createElement('div');
+    var text = document.createTextNode(this);
+    div.appendChild(text);
+    return div.innerHTML;
+  },
+
+  unescapeHTML: function() {
+    var div = document.createElement('div');
+    div.innerHTML = this.stripTags();
+    return div.childNodes[0] ? (div.childNodes.length > 1 ?
+      $A(div.childNodes).inject('',function(memo,node){ return memo+node.nodeValue }) :
+      div.childNodes[0].nodeValue) : '';
+  },
+
+  toQueryParams: function(separator) {
+    var match = this.strip().match(/([^?#]*)(#.*)?$/);
+    if (!match) return {};
+
+    return match[1].split(separator || '&').inject({}, function(hash, pair) {
+      if ((pair = pair.split('='))[0]) {
+        var name = decodeURIComponent(pair[0]);
+        var value = pair[1] ? decodeURIComponent(pair[1]) : undefined;
+
+        if (hash[name] !== undefined) {
+          if (hash[name].constructor != Array)
+            hash[name] = [hash[name]];
+          if (value) hash[name].push(value);
+        }
+        else hash[name] = value;
+      }
+      return hash;
+    });
+  },
+
+  toArray: function() {
+    return this.split('');
+  },
+
+  succ: function() {
+    return this.slice(0, this.length - 1) +
+      String.fromCharCode(this.charCodeAt(this.length - 1) + 1);
+  },
+
+  camelize: function() {
+    var parts = this.split('-'), len = parts.length;
+    if (len == 1) return parts[0];
+
+    var camelized = this.charAt(0) == '-'
+      ? parts[0].charAt(0).toUpperCase() + parts[0].substring(1)
+      : parts[0];
+
+    for (var i = 1; i < len; i++)
+      camelized += parts[i].charAt(0).toUpperCase() + parts[i].substring(1);
+
+    return camelized;
+  },
+
+  capitalize: function(){
+    return this.charAt(0).toUpperCase() + this.substring(1).toLowerCase();
+  },
+
+  underscore: function() {
+    return this.gsub(/::/, '/').gsub(/([A-Z]+)([A-Z][a-z])/,'#{1}_#{2}').gsub(/([a-z\d])([A-Z])/,'#{1}_#{2}').gsub(/-/,'_').toLowerCase();
+  },
+
+  dasherize: function() {
+    return this.gsub(/_/,'-');
+  },
+
+  inspect: function(useDoubleQuotes) {
+    var escapedString = this.replace(/\\/g, '\\\\');
+    if (useDoubleQuotes)
+      return '"' + escapedString.replace(/"/g, '\\"') + '"';
+    else
+      return "'" + escapedString.replace(/'/g, '\\\'') + "'";
+  }
+});
+
+String.prototype.gsub.prepareReplacement = function(replacement) {
+  if (typeof replacement == 'function') return replacement;
+  var template = new Template(replacement);
+  return function(match) { return template.evaluate(match) };
+}
+
+String.prototype.parseQuery = String.prototype.toQueryParams;
+
+var Template = Class.create();
+Template.Pattern = /(^|.|\r|\n)(#\{(.*?)\})/;
+Template.prototype = {
+  initialize: function(template, pattern) {
+    this.template = template.toString();
+    this.pattern  = pattern || Template.Pattern;
+  },
+
+  evaluate: function(object) {
+    return this.template.gsub(this.pattern, function(match) {
+      var before = match[1];
+      if (before == '\\') return match[2];
+      return before + String.interpret(object[match[3]]);
+    });
+  }
+}
+
+var $break    = new Object();
+var $continue = new Object();
+
+var Enumerable = {
+  each: function(iterator) {
+    var index = 0;
+    try {
+      this._each(function(value) {
+        try {
+          iterator(value, index++);
+        } catch (e) {
+          if (e != $continue) throw e;
+        }
+      });
+    } catch (e) {
+      if (e != $break) throw e;
+    }
+    return this;
+  },
+
+  eachSlice: function(number, iterator) {
+    var index = -number, slices = [], array = this.toArray();
+    while ((index += number) < array.length)
+      slices.push(array.slice(index, index+number));
+    return slices.map(iterator);
+  },
+
+  all: function(iterator) {
+    var result = true;
+    this.each(function(value, index) {
+      result = result && !!(iterator || Prototype.K)(value, index);
+      if (!result) throw $break;
+    });
+    return result;
+  },
+
+  any: function(iterator) {
+    var result = false;
+    this.each(function(value, index) {
+      if (result = !!(iterator || Prototype.K)(value, index))
+        throw $break;
+    });
+    return result;
+  },
+
+  collect: function(iterator) {
+    var results = [];
+    this.each(function(value, index) {
+      results.push((iterator || Prototype.K)(value, index));
+    });
+    return results;
+  },
+
+  detect: function(iterator) {
+    var result;
+    this.each(function(value, index) {
+      if (iterator(value, index)) {
+        result = value;
+        throw $break;
+      }
+    });
+    return result;
+  },
+
+  findAll: function(iterator) {
+    var results = [];
+    this.each(function(value, index) {
+      if (iterator(value, index))
+        results.push(value);
+    });
+    return results;
+  },
+
+  grep: function(pattern, iterator) {
+    var results = [];
+    this.each(function(value, index) {
+      var stringValue = value.toString();
+      if (stringValue.match(pattern))
+        results.push((iterator || Prototype.K)(value, index));
+    })
+    return results;
+  },
+
+  include: function(object) {
+    var found = false;
+    this.each(function(value) {
+      if (value == object) {
+        found = true;
+        throw $break;
+      }
+    });
+    return found;
+  },
+
+  inGroupsOf: function(number, fillWith) {
+    fillWith = fillWith === undefined ? null : fillWith;
+    return this.eachSlice(number, function(slice) {
+      while(slice.length < number) slice.push(fillWith);
+      return slice;
+    });
+  },
+
+  inject: function(memo, iterator) {
+    this.each(function(value, index) {
+      memo = iterator(memo, value, index);
+    });
+    return memo;
+  },
+
+  invoke: function(method) {
+    var args = $A(arguments).slice(1);
+    return this.map(function(value) {
+      return value[method].apply(value, args);
+    });
+  },
+
+  max: function(iterator) {
+    var result;
+    this.each(function(value, index) {
+      value = (iterator || Prototype.K)(value, index);
+      if (result == undefined || value >= result)
+        result = value;
+    });
+    return result;
+  },
+
+  min: function(iterator) {
+    var result;
+    this.each(function(value, index) {
+      value = (iterator || Prototype.K)(value, index);
+      if (result == undefined || value < result)
+        result = value;
+    });
+    return result;
+  },
+
+  partition: function(iterator) {
+    var trues = [], falses = [];
+    this.each(function(value, index) {
+      ((iterator || Prototype.K)(value, index) ?
+        trues : falses).push(value);
+    });
+    return [trues, falses];
+  },
+
+  pluck: function(property) {
+    var results = [];
+    this.each(function(value, index) {
+      results.push(value[property]);
+    });
+    return results;
+  },
+
+  reject: function(iterator) {
+    var results = [];
+    this.each(function(value, index) {
+      if (!iterator(value, index))
+        results.push(value);
+    });
+    return results;
+  },
+
+  sortBy: function(iterator) {
+    return this.map(function(value, index) {
+      return {value: value, criteria: iterator(value, index)};
+    }).sort(function(left, right) {
+      var a = left.criteria, b = right.criteria;
+      return a < b ? -1 : a > b ? 1 : 0;
+    }).pluck('value');
+  },
+
+  toArray: function() {
+    return this.map();
+  },
+
+  zip: function() {
+    var iterator = Prototype.K, args = $A(arguments);
+    if (typeof args.last() == 'function')
+      iterator = args.pop();
+
+    var collections = [this].concat(args).map($A);
+    return this.map(function(value, index) {
+      return iterator(collections.pluck(index));
+    });
+  },
+
+  size: function() {
+    return this.toArray().length;
+  },
+
+  inspect: function() {
+    return '#<Enumerable:' + this.toArray().inspect() + '>';
+  }
+}
+
+Object.extend(Enumerable, {
+  map:     Enumerable.collect,
+  find:    Enumerable.detect,
+  select:  Enumerable.findAll,
+  member:  Enumerable.include,
+  entries: Enumerable.toArray
+});
+var $A = Array.from = function(iterable) {
+  if (!iterable) return [];
+  if (iterable.toArray) {
+    return iterable.toArray();
+  } else {
+    var results = [];
+    for (var i = 0, length = iterable.length; i < length; i++)
+      results.push(iterable[i]);
+    return results;
+  }
+}
+
+Object.extend(Array.prototype, Enumerable);
+
+if (!Array.prototype._reverse)
+  Array.prototype._reverse = Array.prototype.reverse;
+
+Object.extend(Array.prototype, {
+  _each: function(iterator) {
+    for (var i = 0, length = this.length; i < length; i++)
+      iterator(this[i]);
+  },
+
+  clear: function() {
+    this.length = 0;
+    return this;
+  },
+
+  first: function() {
+    return this[0];
+  },
+
+  last: function() {
+    return this[this.length - 1];
+  },
+
+  compact: function() {
+    return this.select(function(value) {
+      return value != null;
+    });
+  },
+
+  flatten: function() {
+    return this.inject([], function(array, value) {
+      return array.concat(value && value.constructor == Array ?
+        value.flatten() : [value]);
+    });
+  },
+
+  without: function() {
+    var values = $A(arguments);
+    return this.select(function(value) {
+      return !values.include(value);
+    });
+  },
+
+  indexOf: function(object) {
+    for (var i = 0, length = this.length; i < length; i++)
+      if (this[i] == object) return i;
+    return -1;
+  },
+
+  reverse: function(inline) {
+    return (inline !== false ? this : this.toArray())._reverse();
+  },
+
+  reduce: function() {
+    return this.length > 1 ? this : this[0];
+  },
+
+  uniq: function() {
+    return this.inject([], function(array, value) {
+      return array.include(value) ? array : array.concat([value]);
+    });
+  },
+
+  clone: function() {
+    return [].concat(this);
+  },
+
+  size: function() {
+    return this.length;
+  },
+
+  inspect: function() {
+    return '[' + this.map(Object.inspect).join(', ') + ']';
+  }
+});
+
+Array.prototype.toArray = Array.prototype.clone;
+
+function $w(string){
+  string = string.strip();
+  return string ? string.split(/\s+/) : [];
+}
+
+if(window.opera){
+  Array.prototype.concat = function(){
+    var array = [];
+    for(var i = 0, length = this.length; i < length; i++) array.push(this[i]);
+    for(var i = 0, length = arguments.length; i < length; i++) {
+      if(arguments[i].constructor == Array) {
+        for(var j = 0, arrayLength = arguments[i].length; j < arrayLength; j++)
+          array.push(arguments[i][j]);
+      } else {
+        array.push(arguments[i]);
+      }
+    }
+    return array;
+  }
+}
+var Hash = function(obj) {
+  Object.extend(this, obj || {});
+};
+
+Object.extend(Hash, {
+  toQueryString: function(obj) {
+    var parts = [];
+
+	  this.prototype._each.call(obj, function(pair) {
+      if (!pair.key) return;
+
+      if (pair.value && pair.value.constructor == Array) {
+        var values = pair.value.compact();
+        if (values.length < 2) pair.value = values.reduce();
+        else {
+        	key = encodeURIComponent(pair.key);
+          values.each(function(value) {
+            value = value != undefined ? encodeURIComponent(value) : '';
+            parts.push(key + '=' + encodeURIComponent(value));
+          });
+          return;
+        }
+      }
+      if (pair.value == undefined) pair[1] = '';
+      parts.push(pair.map(encodeURIComponent).join('='));
+	  });
+
+    return parts.join('&');
+  }
+});
+
+Object.extend(Hash.prototype, Enumerable);
+Object.extend(Hash.prototype, {
+  _each: function(iterator) {
+    for (var key in this) {
+      var value = this[key];
+      if (value && value == Hash.prototype[key]) continue;
+
+      var pair = [key, value];
+      pair.key = key;
+      pair.value = value;
+      iterator(pair);
+    }
+  },
+
+  keys: function() {
+    return this.pluck('key');
+  },
+
+  values: function() {
+    return this.pluck('value');
+  },
+
+  merge: function(hash) {
+    return $H(hash).inject(this, function(mergedHash, pair) {
+      mergedHash[pair.key] = pair.value;
+      return mergedHash;
+    });
+  },
+
+  remove: function() {
+    var result;
+    for(var i = 0, length = arguments.length; i < length; i++) {
+      var value = this[arguments[i]];
+      if (value !== undefined){
+        if (result === undefined) result = value;
+        else {
+          if (result.constructor != Array) result = [result];
+          result.push(value)
+        }
+      }
+      delete this[arguments[i]];
+    }
+    return result;
+  },
+
+  toQueryString: function() {
+    return Hash.toQueryString(this);
+  },
+
+  inspect: function() {
+    return '#<Hash:{' + this.map(function(pair) {
+      return pair.map(Object.inspect).join(': ');
+    }).join(', ') + '}>';
+  }
+});
+
+function $H(object) {
+  if (object && object.constructor == Hash) return object;
+  return new Hash(object);
+};
+ObjectRange = Class.create();
+Object.extend(ObjectRange.prototype, Enumerable);
+Object.extend(ObjectRange.prototype, {
+  initialize: function(start, end, exclusive) {
+    this.start = start;
+    this.end = end;
+    this.exclusive = exclusive;
+  },
+
+  _each: function(iterator) {
+    var value = this.start;
+    while (this.include(value)) {
+      iterator(value);
+      value = value.succ();
+    }
+  },
+
+  include: function(value) {
+    if (value < this.start)
+      return false;
+    if (this.exclusive)
+      return value < this.end;
+    return value <= this.end;
+  }
+});
+
+var $R = function(start, end, exclusive) {
+  return new ObjectRange(start, end, exclusive);
+}
+
+var Ajax = {
+  getTransport: function() {
+    return Try.these(
+      function() {return new XMLHttpRequest()},
+      function() {return new ActiveXObject('Msxml2.XMLHTTP')},
+      function() {return new ActiveXObject('Microsoft.XMLHTTP')}
+    ) || false;
+  },
+
+  activeRequestCount: 0
+}
+
+Ajax.Responders = {
+  responders: [],
+
+  _each: function(iterator) {
+    this.responders._each(iterator);
+  },
+
+  register: function(responder) {
+    if (!this.include(responder))
+      this.responders.push(responder);
+  },
+
+  unregister: function(responder) {
+    this.responders = this.responders.without(responder);
+  },
+
+  dispatch: function(callback, request, transport, json) {
+    this.each(function(responder) {
+      if (typeof responder[callback] == 'function') {
+        try {
+          responder[callback].apply(responder, [request, transport, json]);
+        } catch (e) {}
+      }
+    });
+  }
+};
+
+Object.extend(Ajax.Responders, Enumerable);
+
+Ajax.Responders.register({
+  onCreate: function() {
+    Ajax.activeRequestCount++;
+  },
+  onComplete: function() {
+    Ajax.activeRequestCount--;
+  }
+});
+
+Ajax.Base = function() {};
+Ajax.Base.prototype = {
+  setOptions: function(options) {
+    this.options = {
+      method:       'post',
+      asynchronous: true,
+      contentType:  'application/x-www-form-urlencoded',
+      encoding:     'UTF-8',
+      parameters:   ''
+    }
+    Object.extend(this.options, options || {});
+
+    this.options.method = this.options.method.toLowerCase();
+    if (typeof this.options.parameters == 'string')
+      this.options.parameters = this.options.parameters.toQueryParams();
+  }
+}
+
+Ajax.Request = Class.create();
+Ajax.Request.Events =
+  ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete'];
+
+Ajax.Request.prototype = Object.extend(new Ajax.Base(), {
+  _complete: false,
+
+  initialize: function(url, options) {
+    this.transport = Ajax.getTransport();
+    this.setOptions(options);
+    this.request(url);
+  },
+
+  request: function(url) {
+    this.url = url;
+    this.method = this.options.method;
+    var params = this.options.parameters;
+
+    if (!['get', 'post'].include(this.method)) {
+      // simulate other verbs over post
+      params['_method'] = this.method;
+      this.method = 'post';
+    }
+
+    params = Hash.toQueryString(params);
+    if (params && /Konqueror|Safari|KHTML/.test(navigator.userAgent)) params += '&_='
+
+    // when GET, append parameters to URL
+    if (this.method == 'get' && params)
+      this.url += (this.url.indexOf('?') > -1 ? '&' : '?') + params;
+
+    try {
+      Ajax.Responders.dispatch('onCreate', this, this.transport);
+
+      this.transport.open(this.method.toUpperCase(), this.url,
+        this.options.asynchronous);
+
+      if (this.options.asynchronous)
+        setTimeout(function() { this.respondToReadyState(1) }.bind(this), 10);
+
+      this.transport.onreadystatechange = this.onStateChange.bind(this);
+      this.setRequestHeaders();
+
+      var body = this.method == 'post' ? (this.options.postBody || params) : null;
+
+      this.transport.send(body);
+
+      /* Force Firefox to handle ready state 4 for synchronous requests */
+      if (!this.options.asynchronous && this.transport.overrideMimeType)
+        this.onStateChange();
+
+    }
+    catch (e) {
+      this.dispatchException(e);
+    }
+  },
+
+  onStateChange: function() {
+    var readyState = this.transport.readyState;
+    if (readyState > 1 && !((readyState == 4) && this._complete))
+      this.respondToReadyState(this.transport.readyState);
+  },
+
+  setRequestHeaders: function() {
+    var headers = {
+      'X-Requested-With': 'XMLHttpRequest',
+      'X-Prototype-Version': Prototype.Version,
+      'Accept': 'text/javascript, text/html, application/xml, text/xml, */*'
+    };
+
+    if (this.method == 'post') {
+      headers['Content-type'] = this.options.contentType +
+        (this.options.encoding ? '; charset=' + this.options.encoding : '');
+
+      /* Force "Connection: close" for older Mozilla browsers to work
+       * around a bug where XMLHttpRequest sends an incorrect
+       * Content-length header. See Mozilla Bugzilla #246651.
+       */
+      if (this.transport.overrideMimeType &&
+          (navigator.userAgent.match(/Gecko\/(\d{4})/) || [0,2005])[1] < 2005)
+            headers['Connection'] = 'close';
+    }
+
+    // user-defined headers
+    if (typeof this.options.requestHeaders == 'object') {
+      var extras = this.options.requestHeaders;
+
+      if (typeof extras.push == 'function')
+        for (var i = 0, length = extras.length; i < length; i += 2)
+          headers[extras[i]] = extras[i+1];
+      else
+        $H(extras).each(function(pair) { headers[pair.key] = pair.value });
+    }
+
+    for (var name in headers)
+      this.transport.setRequestHeader(name, headers[name]);
+  },
+
+  success: function() {
+    return !this.transport.status
+        || (this.transport.status >= 200 && this.transport.status < 300);
+  },
+
+  respondToReadyState: function(readyState) {
+    var state = Ajax.Request.Events[readyState];
+    var transport = this.transport, json = this.evalJSON();
+
+    if (state == 'Complete') {
+      try {
+        this._complete = true;
+        (this.options['on' + this.transport.status]
+         || this.options['on' + (this.success() ? 'Success' : 'Failure')]
+         || Prototype.emptyFunction)(transport, json);
+      } catch (e) {
+        this.dispatchException(e);
+      }
+
+      if ((this.getHeader('Content-type') || 'text/javascript').strip().
+        match(/^(text|application)\/(x-)?(java|ecma)script(;.*)?$/i))
+          this.evalResponse();
+    }
+
+    try {
+      (this.options['on' + state] || Prototype.emptyFunction)(transport, json);
+      Ajax.Responders.dispatch('on' + state, this, transport, json);
+    } catch (e) {
+      this.dispatchException(e);
+    }
+
+    if (state == 'Complete') {
+      // avoid memory leak in MSIE: clean up
+      this.transport.onreadystatechange = Prototype.emptyFunction;
+    }
+  },
+
+  getHeader: function(name) {
+    try {
+      return this.transport.getResponseHeader(name);
+    } catch (e) { return null }
+  },
+
+  evalJSON: function() {
+    try {
+      var json = this.getHeader('X-JSON');
+      return json ? eval('(' + json + ')') : null;
+    } catch (e) { return null }
+  },
+
+  evalResponse: function() {
+    try {
+      return eval(this.transport.responseText);
+    } catch (e) {
+      this.dispatchException(e);
+    }
+  },
+
+  dispatchException: function(exception) {
+    (this.options.onException || Prototype.emptyFunction)(this, exception);
+    Ajax.Responders.dispatch('onException', this, exception);
+  }
+});
+
+Ajax.Updater = Class.create();
+
+Object.extend(Object.extend(Ajax.Updater.prototype, Ajax.Request.prototype), {
+  initialize: function(container, url, options) {
+    this.container = {
+      success: (container.success || container),
+      failure: (container.failure || (container.success ? null : container))
+    }
+
+    this.transport = Ajax.getTransport();
+    this.setOptions(options);
+
+    var onComplete = this.options.onComplete || Prototype.emptyFunction;
+    this.options.onComplete = (function(transport, param) {
+      this.updateContent();
+      onComplete(transport, param);
+    }).bind(this);
+
+    this.request(url);
+  },
+
+  updateContent: function() {
+    var receiver = this.container[this.success() ? 'success' : 'failure'];
+    var response = this.transport.responseText;
+
+    if (!this.options.evalScripts) response = response.stripScripts();
+
+    if (receiver = $(receiver)) {
+      if (this.options.insertion)
+        new this.options.insertion(receiver, response);
+      else
+        receiver.update(response);
+    }
+
+    if (this.success()) {
+      if (this.onComplete)
+        setTimeout(this.onComplete.bind(this), 10);
+    }
+  }
+});
+
+Ajax.PeriodicalUpdater = Class.create();
+Ajax.PeriodicalUpdater.prototype = Object.extend(new Ajax.Base(), {
+  initialize: function(container, url, options) {
+    this.setOptions(options);
+    this.onComplete = this.options.onComplete;
+
+    this.frequency = (this.options.frequency || 2);
+    this.decay = (this.options.decay || 1);
+
+    this.updater = {};
+    this.container = container;
+    this.url = url;
+
+    this.start();
+  },
+
+  start: function() {
+    this.options.onComplete = this.updateComplete.bind(this);
+    this.onTimerEvent();
+  },
+
+  stop: function() {
+    this.updater.options.onComplete = undefined;
+    clearTimeout(this.timer);
+    (this.onComplete || Prototype.emptyFunction).apply(this, arguments);
+  },
+
+  updateComplete: function(request) {
+    if (this.options.decay) {
+      this.decay = (request.responseText == this.lastText ?
+        this.decay * this.options.decay : 1);
+
+      this.lastText = request.responseText;
+    }
+    this.timer = setTimeout(this.onTimerEvent.bind(this),
+      this.decay * this.frequency * 1000);
+  },
+
+  onTimerEvent: function() {
+    this.updater = new Ajax.Updater(this.container, this.url, this.options);
+  }
+});
+function $(element) {
+  if (arguments.length > 1) {
+    for (var i = 0, elements = [], length = arguments.length; i < length; i++)
+      elements.push($(arguments[i]));
+    return elements;
+  }
+  if (typeof element == 'string')
+    element = document.getElementById(element);
+  return Element.extend(element);
+}
+
+if (Prototype.BrowserFeatures.XPath) {
+  document._getElementsByXPath = function(expression, parentElement) {
+    var results = [];
+    var query = document.evaluate(expression, $(parentElement) || document,
+      null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
+    for (var i = 0, length = query.snapshotLength; i < length; i++)
+      results.push(query.snapshotItem(i));
+    return results;
+  };
+}
+
+document.getElementsByClassName = function(className, parentElement) {
+  if (Prototype.BrowserFeatures.XPath) {
+    var q = ".//*[contains(concat(' ', @class, ' '), ' " + className + " ')]";
+    return document._getElementsByXPath(q, parentElement);
+  } else {
+    var children = ($(parentElement) || document.body).getElementsByTagName('*');
+    var elements = [], child;
+    for (var i = 0, length = children.length; i < length; i++) {
+      child = children[i];
+      if (Element.hasClassName(child, className))
+        elements.push(Element.extend(child));
+    }
+    return elements;
+  }
+};
+
+/*--------------------------------------------------------------------------*/
+
+if (!window.Element)
+  var Element = new Object();
+
+Element.extend = function(element) {
+  if (!element || _nativeExtensions || element.nodeType == 3) return element;
+
+  if (!element._extended && element.tagName && element != window) {
+    var methods = Object.clone(Element.Methods), cache = Element.extend.cache;
+
+    if (element.tagName == 'FORM')
+      Object.extend(methods, Form.Methods);
+    if (['INPUT', 'TEXTAREA', 'SELECT'].include(element.tagName))
+      Object.extend(methods, Form.Element.Methods);
+
+    Object.extend(methods, Element.Methods.Simulated);
+
+    for (var property in methods) {
+      var value = methods[property];
+      if (typeof value == 'function' && !(property in element))
+        element[property] = cache.findOrStore(value);
+    }
+  }
+
+  element._extended = true;
+  return element;
+};
+
+Element.extend.cache = {
+  findOrStore: function(value) {
+    return this[value] = this[value] || function() {
+      return value.apply(null, [this].concat($A(arguments)));
+    }
+  }
+};
+
+Element.Methods = {
+  visible: function(element) {
+    return $(element).style.display != 'none';
+  },
+
+  toggle: function(element) {
+    element = $(element);
+    Element[Element.visible(element) ? 'hide' : 'show'](element);
+    return element;
+  },
+
+  hide: function(element) {
+    $(element).style.display = 'none';
+    return element;
+  },
+
+  show: function(element) {
+    $(element).style.display = '';
+    return element;
+  },
+
+  remove: function(element) {
+    element = $(element);
+    element.parentNode.removeChild(element);
+    return element;
+  },
+
+  update: function(element, html) {
+    html = typeof html == 'undefined' ? '' : html.toString();
+    $(element).innerHTML = html.stripScripts();
+    setTimeout(function() {html.evalScripts()}, 10);
+    return element;
+  },
+
+  replace: function(element, html) {
+    element = $(element);
+    html = typeof html == 'undefined' ? '' : html.toString();
+    if (element.outerHTML) {
+      element.outerHTML = html.stripScripts();
+    } else {
+      var range = element.ownerDocument.createRange();
+      range.selectNodeContents(element);
+      element.parentNode.replaceChild(
+        range.createContextualFragment(html.stripScripts()), element);
+    }
+    setTimeout(function() {html.evalScripts()}, 10);
+    return element;
+  },
+
+  inspect: function(element) {
+    element = $(element);
+    var result = '<' + element.tagName.toLowerCase();
+    $H({'id': 'id', 'className': 'class'}).each(function(pair) {
+      var property = pair.first(), attribute = pair.last();
+      var value = (element[property] || '').toString();
+      if (value) result += ' ' + attribute + '=' + value.inspect(true);
+    });
+    return result + '>';
+  },
+
+  recursivelyCollect: function(element, property) {
+    element = $(element);
+    var elements = [];
+    while (element = element[property])
+      if (element.nodeType == 1)
+        elements.push(Element.extend(element));
+    return elements;
+  },
+
+  ancestors: function(element) {
+    return $(element).recursivelyCollect('parentNode');
+  },
+
+  descendants: function(element) {
+    return $A($(element).getElementsByTagName('*'));
+  },
+
+  immediateDescendants: function(element) {
+    if (!(element = $(element).firstChild)) return [];
+    while (element && element.nodeType != 1) element = element.nextSibling;
+    if (element) return [element].concat($(element).nextSiblings());
+    return [];
+  },
+
+  previousSiblings: function(element) {
+    return $(element).recursivelyCollect('previousSibling');
+  },
+
+  nextSiblings: function(element) {
+    return $(element).recursivelyCollect('nextSibling');
+  },
+
+  siblings: function(element) {
+    element = $(element);
+    return element.previousSiblings().reverse().concat(element.nextSiblings());
+  },
+
+  match: function(element, selector) {
+    if (typeof selector == 'string')
+      selector = new Selector(selector);
+    return selector.match($(element));
+  },
+
+  up: function(element, expression, index) {
+    return Selector.findElement($(element).ancestors(), expression, index);
+  },
+
+  down: function(element, expression, index) {
+    return Selector.findElement($(element).descendants(), expression, index);
+  },
+
+  previous: function(element, expression, index) {
+    return Selector.findElement($(element).previousSiblings(), expression, index);
+  },
+
+  next: function(element, expression, index) {
+    return Selector.findElement($(element).nextSiblings(), expression, index);
+  },
+
+  getElementsBySelector: function() {
+    var args = $A(arguments), element = $(args.shift());
+    return Selector.findChildElements(element, args);
+  },
+
+  getElementsByClassName: function(element, className) {
+    return document.getElementsByClassName(className, element);
+  },
+
+  readAttribute: function(element, name) {
+    element = $(element);
+    if (document.all && !window.opera) {
+      var t = Element._attributeTranslations;
+      if (t.values[name]) return t.values[name](element, name);
+      if (t.names[name])  name = t.names[name];
+      var attribute = element.attributes[name];
+      if(attribute) return attribute.nodeValue;
+    }
+    return element.getAttribute(name);
+  },
+
+  getHeight: function(element) {
+    return $(element).getDimensions().height;
+  },
+
+  getWidth: function(element) {
+    return $(element).getDimensions().width;
+  },
+
+  classNames: function(element) {
+    return new Element.ClassNames(element);
+  },
+
+  hasClassName: function(element, className) {
+    if (!(element = $(element))) return;
+    var elementClassName = element.className;
+    if (elementClassName.length == 0) return false;
+    if (elementClassName == className ||
+        elementClassName.match(new RegExp("(^|\\s)" + className + "(\\s|$)")))
+      return true;
+    return false;
+  },
+
+  addClassName: function(element, className) {
+    if (!(element = $(element))) return;
+    Element.classNames(element).add(className);
+    return element;
+  },
+
+  removeClassName: function(element, className) {
+    if (!(element = $(element))) return;
+    Element.classNames(element).remove(className);
+    return element;
+  },
+
+  toggleClassName: function(element, className) {
+    if (!(element = $(element))) return;
+    Element.classNames(element)[element.hasClassName(className) ? 'remove' : 'add'](className);
+    return element;
+  },
+
+  observe: function() {
+    Event.observe.apply(Event, arguments);
+    return $A(arguments).first();
+  },
+
+  stopObserving: function() {
+    Event.stopObserving.apply(Event, arguments);
+    return $A(arguments).first();
+  },
+
+  // removes whitespace-only text node children
+  cleanWhitespace: function(element) {
+    element = $(element);
+    var node = element.firstChild;
+    while (node) {
+      var nextNode = node.nextSibling;
+      if (node.nodeType == 3 && !/\S/.test(node.nodeValue))
+        element.removeChild(node);
+      node = nextNode;
+    }
+    return element;
+  },
+
+  empty: function(element) {
+    return $(element).innerHTML.match(/^\s*$/);
+  },
+
+  descendantOf: function(element, ancestor) {
+    element = $(element), ancestor = $(ancestor);
+    while (element = element.parentNode)
+      if (element == ancestor) return true;
+    return false;
+  },
+
+  scrollTo: function(element) {
+    element = $(element);
+    var pos = Position.cumulativeOffset(element);
+    window.scrollTo(pos[0], pos[1]);
+    return element;
+  },
+
+  getStyle: function(element, style) {
+    element = $(element);
+    if (['float','cssFloat'].include(style))
+      style = (typeof element.style.styleFloat != 'undefined' ? 'styleFloat' : 'cssFloat');
+    style = style.camelize();
+    var value = element.style[style];
+    if (!value) {
+      if (document.defaultView && document.defaultView.getComputedStyle) {
+        var css = document.defaultView.getComputedStyle(element, null);
+        value = css ? css[style] : null;
+      } else if (element.currentStyle) {
+        value = element.currentStyle[style];
+      }
+    }
+
+    if((value == 'auto') && ['width','height'].include(style) && (element.getStyle('display') != 'none'))
+      value = element['offset'+style.capitalize()] + 'px';
+
+    if (window.opera && ['left', 'top', 'right', 'bottom'].include(style))
+      if (Element.getStyle(element, 'position') == 'static') value = 'auto';
+    if(style == 'opacity') {
+      if(value) return parseFloat(value);
+      if(value = (element.getStyle('filter') || '').match(/alpha\(opacity=(.*)\)/))
+        if(value[1]) return parseFloat(value[1]) / 100;
+      return 1.0;
+    }
+    return value == 'auto' ? null : value;
+  },
+
+  setStyle: function(element, style) {
+    element = $(element);
+    for (var name in style) {
+      var value = style[name];
+      if(name == 'opacity') {
+        if (value == 1) {
+          value = (/Gecko/.test(navigator.userAgent) &&
+            !/Konqueror|Safari|KHTML/.test(navigator.userAgent)) ? 0.999999 : 1.0;
+          if(/MSIE/.test(navigator.userAgent) && !window.opera)
+            element.style.filter = element.getStyle('filter').replace(/alpha\([^\)]*\)/gi,'');
+        } else if(value == '') {
+          if(/MSIE/.test(navigator.userAgent) && !window.opera)
+            element.style.filter = element.getStyle('filter').replace(/alpha\([^\)]*\)/gi,'');
+        } else {
+          if(value < 0.00001) value = 0;
+          if(/MSIE/.test(navigator.userAgent) && !window.opera)
+            element.style.filter = element.getStyle('filter').replace(/alpha\([^\)]*\)/gi,'') +
+              'alpha(opacity='+value*100+')';
+        }
+      } else if(['float','cssFloat'].include(name)) name = (typeof element.style.styleFloat != 'undefined') ? 'styleFloat' : 'cssFloat';
+      element.style[name.camelize()] = value;
+    }
+    return element;
+  },
+
+  getDimensions: function(element) {
+    element = $(element);
+    var display = $(element).getStyle('display');
+    if (display != 'none' && display != null) // Safari bug
+      return {width: element.offsetWidth, height: element.offsetHeight};
+
+    // All *Width and *Height properties give 0 on elements with display none,
+    // so enable the element temporarily
+    var els = element.style;
+    var originalVisibility = els.visibility;
+    var originalPosition = els.position;
+    var originalDisplay = els.display;
+    els.visibility = 'hidden';
+    els.position = 'absolute';
+    els.display = 'block';
+    var originalWidth = element.clientWidth;
+    var originalHeight = element.clientHeight;
+    els.display = originalDisplay;
+    els.position = originalPosition;
+    els.visibility = originalVisibility;
+    return {width: originalWidth, height: originalHeight};
+  },
+
+  makePositioned: function(element) {
+    element = $(element);
+    var pos = Element.getStyle(element, 'position');
+    if (pos == 'static' || !pos) {
+      element._madePositioned = true;
+      element.style.position = 'relative';
+      // Opera returns the offset relative to the positioning context, when an
+      // element is position relative but top and left have not been defined
+      if (window.opera) {
+        element.style.top = 0;
+        element.style.left = 0;
+      }
+    }
+    return element;
+  },
+
+  undoPositioned: function(element) {
+    element = $(element);
+    if (element._madePositioned) {
+      element._madePositioned = undefined;
+      element.style.position =
+        element.style.top =
+        element.style.left =
+        element.style.bottom =
+        element.style.right = '';
+    }
+    return element;
+  },
+
+  makeClipping: function(element) {
+    element = $(element);
+    if (element._overflow) return element;
+    element._overflow = element.style.overflow || 'auto';
+    if ((Element.getStyle(element, 'overflow') || 'visible') != 'hidden')
+      element.style.overflow = 'hidden';
+    return element;
+  },
+
+  undoClipping: function(element) {
+    element = $(element);
+    if (!element._overflow) return element;
+    element.style.overflow = element._overflow == 'auto' ? '' : element._overflow;
+    element._overflow = null;
+    return element;
+  }
+};
+
+Object.extend(Element.Methods, {childOf: Element.Methods.descendantOf});
+
+Element._attributeTranslations = {};
+
+Element._attributeTranslations.names = {
+  colspan:   "colSpan",
+  rowspan:   "rowSpan",
+  valign:    "vAlign",
+  datetime:  "dateTime",
+  accesskey: "accessKey",
+  tabindex:  "tabIndex",
+  enctype:   "encType",
+  maxlength: "maxLength",
+  readonly:  "readOnly",
+  longdesc:  "longDesc"
+};
+
+Element._attributeTranslations.values = {
+  _getAttr: function(element, attribute) {
+    return element.getAttribute(attribute, 2);
+  },
+
+  _flag: function(element, attribute) {
+    return $(element).hasAttribute(attribute) ? attribute : null;
+  },
+
+  style: function(element) {
+    return element.style.cssText.toLowerCase();
+  },
+
+  title: function(element) {
+    var node = element.getAttributeNode('title');
+    return node.specified ? node.nodeValue : null;
+  }
+};
+
+Object.extend(Element._attributeTranslations.values, {
+  href: Element._attributeTranslations.values._getAttr,
+  src:  Element._attributeTranslations.values._getAttr,
+  disabled: Element._attributeTranslations.values._flag,
+  checked:  Element._attributeTranslations.values._flag,
+  readonly: Element._attributeTranslations.values._flag,
+  multiple: Element._attributeTranslations.values._flag
+});
+
+Element.Methods.Simulated = {
+  hasAttribute: function(element, attribute) {
+    var t = Element._attributeTranslations;
+    attribute = t.names[attribute] || attribute;
+    return $(element).getAttributeNode(attribute).specified;
+  }
+};
+
+// IE is missing .innerHTML support for TABLE-related elements
+if (document.all && !window.opera){
+  Element.Methods.update = function(element, html) {
+    element = $(element);
+    html = typeof html == 'undefined' ? '' : html.toString();
+    var tagName = element.tagName.toUpperCase();
+    if (['THEAD','TBODY','TR','TD'].include(tagName)) {
+      var div = document.createElement('div');
+      switch (tagName) {
+        case 'THEAD':
+        case 'TBODY':
+          div.innerHTML = '<table><tbody>' +  html.stripScripts() + '</tbody></table>';
+          depth = 2;
+          break;
+        case 'TR':
+          div.innerHTML = '<table><tbody><tr>' +  html.stripScripts() + '</tr></tbody></table>';
+          depth = 3;
+          break;
+        case 'TD':
+          div.innerHTML = '<table><tbody><tr><td>' +  html.stripScripts() + '</td></tr></tbody></table>';
+          depth = 4;
+      }
+      $A(element.childNodes).each(function(node){
+        element.removeChild(node)
+      });
+      depth.times(function(){ div = div.firstChild });
+
+      $A(div.childNodes).each(
+        function(node){ element.appendChild(node) });
+    } else {
+      element.innerHTML = html.stripScripts();
+    }
+    setTimeout(function() {html.evalScripts()}, 10);
+    return element;
+  }
+};
+
+Object.extend(Element, Element.Methods);
+
+var _nativeExtensions = false;
+
+if(/Konqueror|Safari|KHTML/.test(navigator.userAgent))
+  ['', 'Form', 'Input', 'TextArea', 'Select'].each(function(tag) {
+    var className = 'HTML' + tag + 'Element';
+    if(window[className]) return;
+    var klass = window[className] = {};
+    klass.prototype = document.createElement(tag ? tag.toLowerCase() : 'div').__proto__;
+  });
+
+Element.addMethods = function(methods) {
+  Object.extend(Element.Methods, methods || {});
+
+  function copy(methods, destination, onlyIfAbsent) {
+    onlyIfAbsent = onlyIfAbsent || false;
+    var cache = Element.extend.cache;
+    for (var property in methods) {
+      var value = methods[property];
+      if (!onlyIfAbsent || !(property in destination))
+        destination[property] = cache.findOrStore(value);
+    }
+  }
+
+  if (typeof HTMLElement != 'undefined') {
+    copy(Element.Methods, HTMLElement.prototype);
+    copy(Element.Methods.Simulated, HTMLElement.prototype, true);
+    copy(Form.Methods, HTMLFormElement.prototype);
+    [HTMLInputElement, HTMLTextAreaElement, HTMLSelectElement].each(function(klass) {
+      copy(Form.Element.Methods, klass.prototype);
+    });
+    _nativeExtensions = true;
+  }
+}
+
+var Toggle = new Object();
+Toggle.display = Element.toggle;
+
+/*--------------------------------------------------------------------------*/
+
+Abstract.Insertion = function(adjacency) {
+  this.adjacency = adjacency;
+}
+
+Abstract.Insertion.prototype = {
+  initialize: function(element, content) {
+    this.element = $(element);
+    this.content = content.stripScripts();
+
+    if (this.adjacency && this.element.insertAdjacentHTML) {
+      try {
+        this.element.insertAdjacentHTML(this.adjacency, this.content);
+      } catch (e) {
+        var tagName = this.element.tagName.toUpperCase();
+        if (['TBODY', 'TR'].include(tagName)) {
+          this.insertContent(this.contentFromAnonymousTable());
+        } else {
+          throw e;
+        }
+      }
+    } else {
+      this.range = this.element.ownerDocument.createRange();
+      if (this.initializeRange) this.initializeRange();
+      this.insertContent([this.range.createContextualFragment(this.content)]);
+    }
+
+    setTimeout(function() {content.evalScripts()}, 10);
+  },
+
+  contentFromAnonymousTable: function() {
+    var div = document.createElement('div');
+    div.innerHTML = '<table><tbody>' + this.content + '</tbody></table>';
+    return $A(div.childNodes[0].childNodes[0].childNodes);
+  }
+}
+
+var Insertion = new Object();
+
+Insertion.Before = Class.create();
+Insertion.Before.prototype = Object.extend(new Abstract.Insertion('beforeBegin'), {
+  initializeRange: function() {
+    this.range.setStartBefore(this.element);
+  },
+
+  insertContent: function(fragments) {
+    fragments.each((function(fragment) {
+      this.element.parentNode.insertBefore(fragment, this.element);
+    }).bind(this));
+  }
+});
+
+Insertion.Top = Class.create();
+Insertion.Top.prototype = Object.extend(new Abstract.Insertion('afterBegin'), {
+  initializeRange: function() {
+    this.range.selectNodeContents(this.element);
+    this.range.collapse(true);
+  },
+
+  insertContent: function(fragments) {
+    fragments.reverse(false).each((function(fragment) {
+      this.element.insertBefore(fragment, this.element.firstChild);
+    }).bind(this));
+  }
+});
+
+Insertion.Bottom = Class.create();
+Insertion.Bottom.prototype = Object.extend(new Abstract.Insertion('beforeEnd'), {
+  initializeRange: function() {
+    this.range.selectNodeContents(this.element);
+    this.range.collapse(this.element);
+  },
+
+  insertContent: function(fragments) {
+    fragments.each((function(fragment) {
+      this.element.appendChild(fragment);
+    }).bind(this));
+  }
+});
+
+Insertion.After = Class.create();
+Insertion.After.prototype = Object.extend(new Abstract.Insertion('afterEnd'), {
+  initializeRange: function() {
+    this.range.setStartAfter(this.element);
+  },
+
+  insertContent: function(fragments) {
+    fragments.each((function(fragment) {
+      this.element.parentNode.insertBefore(fragment,
+        this.element.nextSibling);
+    }).bind(this));
+  }
+});
+
+/*--------------------------------------------------------------------------*/
+
+Element.ClassNames = Class.create();
+Element.ClassNames.prototype = {
+  initialize: function(element) {
+    this.element = $(element);
+  },
+
+  _each: function(iterator) {
+    this.element.className.split(/\s+/).select(function(name) {
+      return name.length > 0;
+    })._each(iterator);
+  },
+
+  set: function(className) {
+    this.element.className = className;
+  },
+
+  add: function(classNameToAdd) {
+    if (this.include(classNameToAdd)) return;
+    this.set($A(this).concat(classNameToAdd).join(' '));
+  },
+
+  remove: function(classNameToRemove) {
+    if (!this.include(classNameToRemove)) return;
+    this.set($A(this).without(classNameToRemove).join(' '));
+  },
+
+  toString: function() {
+    return $A(this).join(' ');
+  }
+};
+
+Object.extend(Element.ClassNames.prototype, Enumerable);
+var Selector = Class.create();
+Selector.prototype = {
+  initialize: function(expression) {
+    this.params = {classNames: []};
+    this.expression = expression.toString().strip();
+    this.parseExpression();
+    this.compileMatcher();
+  },
+
+  parseExpression: function() {
+    function abort(message) { throw 'Parse error in selector: ' + message; }
+
+    if (this.expression == '')  abort('empty expression');
+
+    var params = this.params, expr = this.expression, match, modifier, clause, rest;
+    while (match = expr.match(/^(.*)\[([a-z0-9_:-]+?)(?:([~\|!]?=)(?:"([^"]*)"|([^\]\s]*)))?\]$/i)) {
+      params.attributes = params.attributes || [];
+      params.attributes.push({name: match[2], operator: match[3], value: match[4] || match[5] || ''});
+      expr = match[1];
+    }
+
+    if (expr == '*') return this.params.wildcard = true;
+
+    while (match = expr.match(/^([^a-z0-9_-])?([a-z0-9_-]+)(.*)/i)) {
+      modifier = match[1], clause = match[2], rest = match[3];
+      switch (modifier) {
+        case '#':       params.id = clause; break;
+        case '.':       params.classNames.push(clause); break;
+        case '':
+        case undefined: params.tagName = clause.toUpperCase(); break;
+        default:        abort(expr.inspect());
+      }
+      expr = rest;
+    }
+
+    if (expr.length > 0) abort(expr.inspect());
+  },
+
+  buildMatchExpression: function() {
+    var params = this.params, conditions = [], clause;
+
+    if (params.wildcard)
+      conditions.push('true');
+    if (clause = params.id)
+      conditions.push('element.readAttribute("id") == ' + clause.inspect());
+    if (clause = params.tagName)
+      conditions.push('element.tagName.toUpperCase() == ' + clause.inspect());
+    if ((clause = params.classNames).length > 0)
+      for (var i = 0, length = clause.length; i < length; i++)
+        conditions.push('element.hasClassName(' + clause[i].inspect() + ')');
+    if (clause = params.attributes) {
+      clause.each(function(attribute) {
+        var value = 'element.readAttribute(' + attribute.name.inspect() + ')';
+        var splitValueBy = function(delimiter) {
+          return value + ' && ' + value + '.split(' + delimiter.inspect() + ')';
+        }
+
+        switch (attribute.operator) {
+          case '=':       conditions.push(value + ' == ' + attribute.value.inspect()); break;
+          case '~=':      conditions.push(splitValueBy(' ') + '.include(' + attribute.value.inspect() + ')'); break;
+          case '|=':      conditions.push(
+                            splitValueBy('-') + '.first().toUpperCase() == ' + attribute.value.toUpperCase().inspect()
+                          ); break;
+          case '!=':      conditions.push(value + ' != ' + attribute.value.inspect()); break;
+          case '':
+          case undefined: conditions.push('element.hasAttribute(' + attribute.name.inspect() + ')'); break;
+          default:        throw 'Unknown operator ' + attribute.operator + ' in selector';
+        }
+      });
+    }
+
+    return conditions.join(' && ');
+  },
+
+  compileMatcher: function() {
+    this.match = new Function('element', 'if (!element.tagName) return false; \
+      element = $(element); \
+      return ' + this.buildMatchExpression());
+  },
+
+  findElements: function(scope) {
+    var element;
+
+    if (element = $(this.params.id))
+      if (this.match(element))
+        if (!scope || Element.childOf(element, scope))
+          return [element];
+
+    scope = (scope || document).getElementsByTagName(this.params.tagName || '*');
+
+    var results = [];
+    for (var i = 0, length = scope.length; i < length; i++)
+      if (this.match(element = scope[i]))
+        results.push(Element.extend(element));
+
+    return results;
+  },
+
+  toString: function() {
+    return this.expression;
+  }
+}
+
+Object.extend(Selector, {
+  matchElements: function(elements, expression) {
+    var selector = new Selector(expression);
+    return elements.select(selector.match.bind(selector)).map(Element.extend);
+  },
+
+  findElement: function(elements, expression, index) {
+    if (typeof expression == 'number') index = expression, expression = false;
+    return Selector.matchElements(elements, expression || '*')[index || 0];
+  },
+
+  findChildElements: function(element, expressions) {
+    return expressions.map(function(expression) {
+      return expression.match(/[^\s"]+(?:"[^"]*"[^\s"]+)*/g).inject([null], function(results, expr) {
+        var selector = new Selector(expr);
+        return results.inject([], function(elements, result) {
+          return elements.concat(selector.findElements(result || element));
+        });
+      });
+    }).flatten();
+  }
+});
+
+function $$() {
+  return Selector.findChildElements(document, $A(arguments));
+}
+var Form = {
+  reset: function(form) {
+    $(form).reset();
+    return form;
+  },
+
+  serializeElements: function(elements, getHash) {
+    var data = elements.inject({}, function(result, element) {
+      if (!element.disabled && element.name) {
+        var key = element.name, value = $(element).getValue();
+        if (value != undefined) {
+          if (result[key]) {
+            if (result[key].constructor != Array) result[key] = [result[key]];
+            result[key].push(value);
+          }
+          else result[key] = value;
+        }
+      }
+      return result;
+    });
+
+    return getHash ? data : Hash.toQueryString(data);
+  }
+};
+
+Form.Methods = {
+  serialize: function(form, getHash) {
+    return Form.serializeElements(Form.getElements(form), getHash);
+  },
+
+  getElements: function(form) {
+    return $A($(form).getElementsByTagName('*')).inject([],
+      function(elements, child) {
+        if (Form.Element.Serializers[child.tagName.toLowerCase()])
+          elements.push(Element.extend(child));
+        return elements;
+      }
+    );
+  },
+
+  getInputs: function(form, typeName, name) {
+    form = $(form);
+    var inputs = form.getElementsByTagName('input');
+
+    if (!typeName && !name) return $A(inputs).map(Element.extend);
+
+    for (var i = 0, matchingInputs = [], length = inputs.length; i < length; i++) {
+      var input = inputs[i];
+      if ((typeName && input.type != typeName) || (name && input.name != name))
+        continue;
+      matchingInputs.push(Element.extend(input));
+    }
+
+    return matchingInputs;
+  },
+
+  disable: function(form) {
+    form = $(form);
+    form.getElements().each(function(element) {
+      element.blur();
+      element.disabled = 'true';
+    });
+    return form;
+  },
+
+  enable: function(form) {
+    form = $(form);
+    form.getElements().each(function(element) {
+      element.disabled = '';
+    });
+    return form;
+  },
+
+  findFirstElement: function(form) {
+    return $(form).getElements().find(function(element) {
+      return element.type != 'hidden' && !element.disabled &&
+        ['input', 'select', 'textarea'].include(element.tagName.toLowerCase());
+    });
+  },
+
+  focusFirstElement: function(form) {
+    form = $(form);
+    form.findFirstElement().activate();
+    return form;
+  }
+}
+
+Object.extend(Form, Form.Methods);
+
+/*--------------------------------------------------------------------------*/
+
+Form.Element = {
+  focus: function(element) {
+    $(element).focus();
+    return element;
+  },
+
+  select: function(element) {
+    $(element).select();
+    return element;
+  }
+}
+
+Form.Element.Methods = {
+  serialize: function(element) {
+    element = $(element);
+    if (!element.disabled && element.name) {
+      var value = element.getValue();
+      if (value != undefined) {
+        var pair = {};
+        pair[element.name] = value;
+        return Hash.toQueryString(pair);
+      }
+    }
+    return '';
+  },
+
+  getValue: function(element) {
+    element = $(element);
+    var method = element.tagName.toLowerCase();
+    return Form.Element.Serializers[method](element);
+  },
+
+  clear: function(element) {
+    $(element).value = '';
+    return element;
+  },
+
+  present: function(element) {
+    return $(element).value != '';
+  },
+
+  activate: function(element) {
+    element = $(element);
+    element.focus();
+    if (element.select && ( element.tagName.toLowerCase() != 'input' ||
+      !['button', 'reset', 'submit'].include(element.type) ) )
+      element.select();
+    return element;
+  },
+
+  disable: function(element) {
+    element = $(element);
+    element.disabled = true;
+    return element;
+  },
+
+  enable: function(element) {
+    element = $(element);
+    element.blur();
+    element.disabled = false;
+    return element;
+  }
+}
+
+Object.extend(Form.Element, Form.Element.Methods);
+var Field = Form.Element;
+var $F = Form.Element.getValue;
+
+/*--------------------------------------------------------------------------*/
+
+Form.Element.Serializers = {
+  input: function(element) {
+    switch (element.type.toLowerCase()) {
+      case 'checkbox':
+      case 'radio':
+        return Form.Element.Serializers.inputSelector(element);
+      default:
+        return Form.Element.Serializers.textarea(element);
+    }
+  },
+
+  inputSelector: function(element) {
+    return element.checked ? element.value : null;
+  },
+
+  textarea: function(element) {
+    return element.value;
+  },
+
+  select: function(element) {
+    return this[element.type == 'select-one' ?
+      'selectOne' : 'selectMany'](element);
+  },
+
+  selectOne: function(element) {
+    var index = element.selectedIndex;
+    return index >= 0 ? this.optionValue(element.options[index]) : null;
+  },
+
+  selectMany: function(element) {
+    var values, length = element.length;
+    if (!length) return null;
+
+    for (var i = 0, values = []; i < length; i++) {
+      var opt = element.options[i];
+      if (opt.selected) values.push(this.optionValue(opt));
+    }
+    return values;
+  },
+
+  optionValue: function(opt) {
+    // extend element because hasAttribute may not be native
+    return Element.extend(opt).hasAttribute('value') ? opt.value : opt.text;
+  }
+}
+
+/*--------------------------------------------------------------------------*/
+
+Abstract.TimedObserver = function() {}
+Abstract.TimedObserver.prototype = {
+  initialize: function(element, frequency, callback) {
+    this.frequency = frequency;
+    this.element   = $(element);
+    this.callback  = callback;
+
+    this.lastValue = this.getValue();
+    this.registerCallback();
+  },
+
+  registerCallback: function() {
+    setInterval(this.onTimerEvent.bind(this), this.frequency * 1000);
+  },
+
+  onTimerEvent: function() {
+    var value = this.getValue();
+    var changed = ('string' == typeof this.lastValue && 'string' == typeof value
+      ? this.lastValue != value : String(this.lastValue) != String(value));
+    if (changed) {
+      this.callback(this.element, value);
+      this.lastValue = value;
+    }
+  }
+}
+
+Form.Element.Observer = Class.create();
+Form.Element.Observer.prototype = Object.extend(new Abstract.TimedObserver(), {
+  getValue: function() {
+    return Form.Element.getValue(this.element);
+  }
+});
+
+Form.Observer = Class.create();
+Form.Observer.prototype = Object.extend(new Abstract.TimedObserver(), {
+  getValue: function() {
+    return Form.serialize(this.element);
+  }
+});
+
+/*--------------------------------------------------------------------------*/
+
+Abstract.EventObserver = function() {}
+Abstract.EventObserver.prototype = {
+  initialize: function(element, callback) {
+    this.element  = $(element);
+    this.callback = callback;
+
+    this.lastValue = this.getValue();
+    if (this.element.tagName.toLowerCase() == 'form')
+      this.registerFormCallbacks();
+    else
+      this.registerCallback(this.element);
+  },
+
+  onElementEvent: function() {
+    var value = this.getValue();
+    if (this.lastValue != value) {
+      this.callback(this.element, value);
+      this.lastValue = value;
+    }
+  },
+
+  registerFormCallbacks: function() {
+    Form.getElements(this.element).each(this.registerCallback.bind(this));
+  },
+
+  registerCallback: function(element) {
+    if (element.type) {
+      switch (element.type.toLowerCase()) {
+        case 'checkbox':
+        case 'radio':
+          Event.observe(element, 'click', this.onElementEvent.bind(this));
+          break;
+        default:
+          Event.observe(element, 'change', this.onElementEvent.bind(this));
+          break;
+      }
+    }
+  }
+}
+
+Form.Element.EventObserver = Class.create();
+Form.Element.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), {
+  getValue: function() {
+    return Form.Element.getValue(this.element);
+  }
+});
+
+Form.EventObserver = Class.create();
+Form.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), {
+  getValue: function() {
+    return Form.serialize(this.element);
+  }
+});
+if (!window.Event) {
+  var Event = new Object();
+}
+
+Object.extend(Event, {
+  KEY_BACKSPACE: 8,
+  KEY_TAB:       9,
+  KEY_RETURN:   13,
+  KEY_ESC:      27,
+  KEY_LEFT:     37,
+  KEY_UP:       38,
+  KEY_RIGHT:    39,
+  KEY_DOWN:     40,
+  KEY_DELETE:   46,
+  KEY_HOME:     36,
+  KEY_END:      35,
+  KEY_PAGEUP:   33,
+  KEY_PAGEDOWN: 34,
+
+  element: function(event) {
+    return event.target || event.srcElement;
+  },
+
+  isLeftClick: function(event) {
+    return (((event.which) && (event.which == 1)) ||
+            ((event.button) && (event.button == 1)));
+  },
+
+  pointerX: function(event) {
+    return event.pageX || (event.clientX +
+      (document.documentElement.scrollLeft || document.body.scrollLeft));
+  },
+
+  pointerY: function(event) {
+    return event.pageY || (event.clientY +
+      (document.documentElement.scrollTop || document.body.scrollTop));
+  },
+
+  stop: function(event) {
+    if (event.preventDefault) {
+      event.preventDefault();
+      event.stopPropagation();
+    } else {
+      event.returnValue = false;
+      event.cancelBubble = true;
+    }
+  },
+
+  // find the first node with the given tagName, starting from the
+  // node the event was triggered on; traverses the DOM upwards
+  findElement: function(event, tagName) {
+    var element = Event.element(event);
+    while (element.parentNode && (!element.tagName ||
+        (element.tagName.toUpperCase() != tagName.toUpperCase())))
+      element = element.parentNode;
+    return element;
+  },
+
+  observers: false,
+
+  _observeAndCache: function(element, name, observer, useCapture) {
+    if (!this.observers) this.observers = [];
+    if (element.addEventListener) {
+      this.observers.push([element, name, observer, useCapture]);
+      element.addEventListener(name, observer, useCapture);
+    } else if (element.attachEvent) {
+      this.observers.push([element, name, observer, useCapture]);
+      element.attachEvent('on' + name, observer);
+    }
+  },
+
+  unloadCache: function() {
+    if (!Event.observers) return;
+    for (var i = 0, length = Event.observers.length; i < length; i++) {
+      Event.stopObserving.apply(this, Event.observers[i]);
+      Event.observers[i][0] = null;
+    }
+    Event.observers = false;
+  },
+
+  observe: function(element, name, observer, useCapture) {
+    element = $(element);
+    useCapture = useCapture || false;
+
+    if (name == 'keypress' &&
+        (navigator.appVersion.match(/Konqueror|Safari|KHTML/)
+        || element.attachEvent))
+      name = 'keydown';
+
+    Event._observeAndCache(element, name, observer, useCapture);
+  },
+
+  stopObserving: function(element, name, observer, useCapture) {
+    element = $(element);
+    useCapture = useCapture || false;
+
+    if (name == 'keypress' &&
+        (navigator.appVersion.match(/Konqueror|Safari|KHTML/)
+        || element.detachEvent))
+      name = 'keydown';
+
+    if (element.removeEventListener) {
+      element.removeEventListener(name, observer, useCapture);
+    } else if (element.detachEvent) {
+      try {
+        element.detachEvent('on' + name, observer);
+      } catch (e) {}
+    }
+  }
+});
+
+/* prevent memory leaks in IE */
+if (navigator.appVersion.match(/\bMSIE\b/))
+  Event.observe(window, 'unload', Event.unloadCache, false);
+var Position = {
+  // set to true if needed, warning: firefox performance problems
+  // NOT neeeded for page scrolling, only if draggable contained in
+  // scrollable elements
+  includeScrollOffsets: false,
+
+  // must be called before calling withinIncludingScrolloffset, every time the
+  // page is scrolled
+  prepare: function() {
+    this.deltaX =  window.pageXOffset
+                || document.documentElement.scrollLeft
+                || document.body.scrollLeft
+                || 0;
+    this.deltaY =  window.pageYOffset
+                || document.documentElement.scrollTop
+                || document.body.scrollTop
+                || 0;
+  },
+
+  realOffset: function(element) {
+    var valueT = 0, valueL = 0;
+    do {
+      valueT += element.scrollTop  || 0;
+      valueL += element.scrollLeft || 0;
+      element = element.parentNode;
+    } while (element);
+    return [valueL, valueT];
+  },
+
+  cumulativeOffset: function(element) {
+    var valueT = 0, valueL = 0;
+    do {
+      valueT += element.offsetTop  || 0;
+      valueL += element.offsetLeft || 0;
+      element = element.offsetParent;
+    } while (element);
+    return [valueL, valueT];
+  },
+
+  positionedOffset: function(element) {
+    var valueT = 0, valueL = 0;
+    do {
+      valueT += element.offsetTop  || 0;
+      valueL += element.offsetLeft || 0;
+      element = element.offsetParent;
+      if (element) {
+        if(element.tagName=='BODY') break;
+        var p = Element.getStyle(element, 'position');
+        if (p == 'relative' || p == 'absolute') break;
+      }
+    } while (element);
+    return [valueL, valueT];
+  },
+
+  offsetParent: function(element) {
+    if (element.offsetParent) return element.offsetParent;
+    if (element == document.body) return element;
+
+    while ((element = element.parentNode) && element != document.body)
+      if (Element.getStyle(element, 'position') != 'static')
+        return element;
+
+    return document.body;
+  },
+
+  // caches x/y coordinate pair to use with overlap
+  within: function(element, x, y) {
+    if (this.includeScrollOffsets)
+      return this.withinIncludingScrolloffsets(element, x, y);
+    this.xcomp = x;
+    this.ycomp = y;
+    this.offset = this.cumulativeOffset(element);
+
+    return (y >= this.offset[1] &&
+            y <  this.offset[1] + element.offsetHeight &&
+            x >= this.offset[0] &&
+            x <  this.offset[0] + element.offsetWidth);
+  },
+
+  withinIncludingScrolloffsets: function(element, x, y) {
+    var offsetcache = this.realOffset(element);
+
+    this.xcomp = x + offsetcache[0] - this.deltaX;
+    this.ycomp = y + offsetcache[1] - this.deltaY;
+    this.offset = this.cumulativeOffset(element);
+
+    return (this.ycomp >= this.offset[1] &&
+            this.ycomp <  this.offset[1] + element.offsetHeight &&
+            this.xcomp >= this.offset[0] &&
+            this.xcomp <  this.offset[0] + element.offsetWidth);
+  },
+
+  // within must be called directly before
+  overlap: function(mode, element) {
+    if (!mode) return 0;
+    if (mode == 'vertical')
+      return ((this.offset[1] + element.offsetHeight) - this.ycomp) /
+        element.offsetHeight;
+    if (mode == 'horizontal')
+      return ((this.offset[0] + element.offsetWidth) - this.xcomp) /
+        element.offsetWidth;
+  },
+
+  page: function(forElement) {
+    var valueT = 0, valueL = 0;
+
+    var element = forElement;
+    do {
+      valueT += element.offsetTop  || 0;
+      valueL += element.offsetLeft || 0;
+
+      // Safari fix
+      if (element.offsetParent==document.body)
+        if (Element.getStyle(element,'position')=='absolute') break;
+
+    } while (element = element.offsetParent);
+
+    element = forElement;
+    do {
+      if (!window.opera || element.tagName=='BODY') {
+        valueT -= element.scrollTop  || 0;
+        valueL -= element.scrollLeft || 0;
+      }
+    } while (element = element.parentNode);
+
+    return [valueL, valueT];
+  },
+
+  clone: function(source, target) {
+    var options = Object.extend({
+      setLeft:    true,
+      setTop:     true,
+      setWidth:   true,
+      setHeight:  true,
+      offsetTop:  0,
+      offsetLeft: 0
+    }, arguments[2] || {})
+
+    // find page position of source
+    source = $(source);
+    var p = Position.page(source);
+
+    // find coordinate system to use
+    target = $(target);
+    var delta = [0, 0];
+    var parent = null;
+    // delta [0,0] will do fine with position: fixed elements,
+    // position:absolute needs offsetParent deltas
+    if (Element.getStyle(target,'position') == 'absolute') {
+      parent = Position.offsetParent(target);
+      delta = Position.page(parent);
+    }
+
+    // correct by body offsets (fixes Safari)
+    if (parent == document.body) {
+      delta[0] -= document.body.offsetLeft;
+      delta[1] -= document.body.offsetTop;
+    }
+
+    // set position
+    if(options.setLeft)   target.style.left  = (p[0] - delta[0] + options.offsetLeft) + 'px';
+    if(options.setTop)    target.style.top   = (p[1] - delta[1] + options.offsetTop) + 'px';
+    if(options.setWidth)  target.style.width = source.offsetWidth + 'px';
+    if(options.setHeight) target.style.height = source.offsetHeight + 'px';
+  },
+
+  absolutize: function(element) {
+    element = $(element);
+    if (element.style.position == 'absolute') return;
+    Position.prepare();
+
+    var offsets = Position.positionedOffset(element);
+    var top     = offsets[1];
+    var left    = offsets[0];
+    var width   = element.clientWidth;
+    var height  = element.clientHeight;
+
+    element._originalLeft   = left - parseFloat(element.style.left  || 0);
+    element._originalTop    = top  - parseFloat(element.style.top || 0);
+    element._originalWidth  = element.style.width;
+    element._originalHeight = element.style.height;
+
+    element.style.position = 'absolute';
+    element.style.top    = top + 'px';
+    element.style.left   = left + 'px';
+    element.style.width  = width + 'px';
+    element.style.height = height + 'px';
+  },
+
+  relativize: function(element) {
+    element = $(element);
+    if (element.style.position == 'relative') return;
+    Position.prepare();
+
+    element.style.position = 'relative';
+    var top  = parseFloat(element.style.top  || 0) - (element._originalTop || 0);
+    var left = parseFloat(element.style.left || 0) - (element._originalLeft || 0);
+
+    element.style.top    = top + 'px';
+    element.style.left   = left + 'px';
+    element.style.height = element._originalHeight;
+    element.style.width  = element._originalWidth;
+  }
+}
+
+// Safari returns margins on body which is incorrect if the child is absolutely
+// positioned.  For performance reasons, redefine Position.cumulativeOffset for
+// KHTML/WebKit only.
+if (/Konqueror|Safari|KHTML/.test(navigator.userAgent)) {
+  Position.cumulativeOffset = function(element) {
+    var valueT = 0, valueL = 0;
+    do {
+      valueT += element.offsetTop  || 0;
+      valueL += element.offsetLeft || 0;
+      if (element.offsetParent == document.body)
+        if (Element.getStyle(element, 'position') == 'absolute') break;
+
+      element = element.offsetParent;
+    } while (element);
+
+    return [valueL, valueT];
+  }
+}
+
+Element.addMethods();
\ No newline at end of file

Added: trunk/OzinoCMS/root/static/javascript/scriptaculous.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/scriptaculous.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/scriptaculous.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,45 @@
+// Copyright (c) 2005 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
+// 
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+var Scriptaculous = {
+  Version: '1.5.1',
+  require: function(libraryName) {
+    // inserting via DOM fails in Safari 2.0, so brute force approach
+    document.write('<script type="text/javascript" src="'+libraryName+'"></script>');
+  },
+  load: function() {
+    if((typeof Prototype=='undefined') ||
+      parseFloat(Prototype.Version.split(".")[0] + "." +
+                 Prototype.Version.split(".")[1]) < 1.4)
+      throw("script.aculo.us requires the Prototype JavaScript framework >= 1.4.0");
+    
+    $A(document.getElementsByTagName("script")).findAll( function(s) {
+      return (s.src && s.src.match(/scriptaculous\.js(\?.*)?$/))
+    }).each( function(s) {
+      var path = s.src.replace(/scriptaculous\.js(\?.*)?$/,'');
+      var includes = s.src.match(/\?.*load=([a-z,]*)/);
+      (includes ? includes[1] : 'builder,effects,dragdrop,controls,slider').split(',').each(
+       function(include) { Scriptaculous.require(path+include+'.js') });
+    });
+  }
+}
+
+Scriptaculous.load();
\ No newline at end of file

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/blank.htm
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/blank.htm	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/blank.htm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,9 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+	<title>blank_page</title>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+</head>
+<body class="mceContentBody">
+
+</body>
+</html>

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/langs/en.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/langs/en.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/langs/en.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,41 @@
+// UK lang variables
+
+tinyMCE.addToLang('',{
+bold_desc : 'Bold (Ctrl+B)',
+italic_desc : 'Italic (Ctrl+I)',
+underline_desc : 'Underline (Ctrl+U)',
+striketrough_desc : 'Strikethrough',
+justifyleft_desc : 'Align left',
+justifycenter_desc : 'Align center',
+justifyright_desc : 'Align right',
+justifyfull_desc : 'Align full',
+bullist_desc : 'Unordered list',
+numlist_desc : 'Ordered list',
+outdent_desc : 'Outdent',
+indent_desc : 'Indent',
+undo_desc : 'Undo (Ctrl+Z)',
+redo_desc : 'Redo (Ctrl+Y)',
+link_desc : 'Insert/edit link',
+unlink_desc : 'Unlink',
+image_desc : 'Insert/edit image',
+cleanup_desc : 'Cleanup messy code',
+focus_alert : 'A editor instance must be focused before using this command.',
+edit_confirm : 'Do you want to use the WYSIWYG mode for this textarea?',
+insert_link_title : 'Insert/edit link',
+insert : 'Insert',
+update : 'Update',
+cancel : 'Cancel',
+insert_link_url : 'Link URL',
+insert_link_target : 'Target',
+insert_link_target_same : 'Open link in the same window',
+insert_link_target_blank : 'Open link in a new window',
+insert_image_title : 'Insert/edit image',
+insert_image_src : 'Image URL',
+insert_image_alt : 'Image description',
+help_desc : 'Help',
+bold_img : "bold.gif",
+italic_img : "italic.gif",
+underline_img : "underline.gif",
+clipboard_msg : 'Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?',
+popup_blocked : 'Sorry, but we have noticed that your popup-blocker has disabled a window that provides application functionality. You will need to disable popup blocking on this site in order to fully utilize this tool.'
+});

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/langs/readme.txt
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/langs/readme.txt	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/langs/readme.txt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,7 @@
+Language packs are from version 2.0.5 removed from the core but can be downloadable from the TinyMCE website.
+http://tinymce.moxiecode.com/download.php
+
+The language pack codes are based on ISO-639-1
+http://www.loc.gov/standards/iso639-2/englangn.html
+
+Try using entires if possible. &aring; etc.

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/license.txt
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/license.txt	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/license.txt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,437 @@
+		  GNU LIBRARY GENERAL PUBLIC LICENSE
+		       Version 2, June 1991
+
+ Copyright (C) 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the library GPL.  It is
+ numbered 2 because it goes with version 2 of the ordinary GPL.]
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+  This license, the Library General Public License, applies to some
+specially designated Free Software Foundation software, and to any
+other libraries whose authors decide to use it.  You can use it for
+your libraries, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if
+you distribute copies of the library, or if you modify it.
+
+  For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you.  You must make sure that they, too, receive or can get the source
+code.  If you link a program with the library, you must provide
+complete object files to the recipients so that they can relink them
+with the library, after making changes to the library and recompiling
+it.  And you must show them these terms so they know their rights.
+
+  Our method of protecting your rights has two steps: (1) copyright
+the library, and (2) offer you this license which gives you legal
+permission to copy, distribute and/or modify the library.
+
+  Also, for each distributor's protection, we want to make certain
+that everyone understands that there is no warranty for this free
+library.  If the library is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original
+version, so that any problems introduced by others will not reflect on
+the original authors' reputations.
+.
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that companies distributing free
+software will individually obtain patent licenses, thus in effect
+transforming the program into proprietary software.  To prevent this,
+we have made it clear that any patent must be licensed for everyone's
+free use or not licensed at all.
+
+  Most GNU software, including some libraries, is covered by the ordinary
+GNU General Public License, which was designed for utility programs.  This
+license, the GNU Library General Public License, applies to certain
+designated libraries.  This license is quite different from the ordinary
+one; be sure to read it in full, and don't assume that anything in it is
+the same as in the ordinary license.
+
+  The reason we have a separate public license for some libraries is that
+they blur the distinction we usually make between modifying or adding to a
+program and simply using it.  Linking a program with a library, without
+changing the library, is in some sense simply using the library, and is
+analogous to running a utility program or application program.  However, in
+a textual and legal sense, the linked executable is a combined work, a
+derivative of the original library, and the ordinary General Public License
+treats it as such.
+
+  Because of this blurred distinction, using the ordinary General
+Public License for libraries did not effectively promote software
+sharing, because most developers did not use the libraries.  We
+concluded that weaker conditions might promote sharing better.
+
+  However, unrestricted linking of non-free programs would deprive the
+users of those programs of all benefit from the free status of the
+libraries themselves.  This Library General Public License is intended to
+permit developers of non-free programs to use free libraries, while
+preserving your freedom as a user of such programs to change the free
+libraries that are incorporated in them.  (We have not seen how to achieve
+this as regards changes in header files, but we have achieved it as regards
+changes in the actual functions of the Library.)  The hope is that this
+will lead to faster development of free libraries.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.  Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library".  The
+former contains code derived from the library, while the latter only
+works together with the library.
+
+  Note that it is possible for a library to be covered by the ordinary
+General Public License rather than by this special one.
+.
+		  GNU LIBRARY GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License Agreement applies to any software library which
+contains a notice placed by the copyright holder or other authorized
+party saying it may be distributed under the terms of this Library
+General Public License (also called "this License").  Each licensee is
+addressed as "you".
+
+  A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+  The "Library", below, refers to any such software library or work
+which has been distributed under these terms.  A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language.  (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+  "Source code" for a work means the preferred form of the work for
+making modifications to it.  For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+  Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it).  Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+  
+  1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+  You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+.
+  2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) The modified work must itself be a software library.
+
+    b) You must cause the files modified to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    c) You must cause the whole of the work to be licensed at no
+    charge to all third parties under the terms of this License.
+
+    d) If a facility in the modified Library refers to a function or a
+    table of data to be supplied by an application program that uses
+    the facility, other than as an argument passed when the facility
+    is invoked, then you must make a good faith effort to ensure that,
+    in the event an application does not supply such function or
+    table, the facility still operates, and performs whatever part of
+    its purpose remains meaningful.
+
+    (For example, a function in a library to compute square roots has
+    a purpose that is entirely well-defined independent of the
+    application.  Therefore, Subsection 2d requires that any
+    application-supplied function or table used by this function must
+    be optional: if the application does not supply it, the square
+    root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library.  To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License.  (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.)  Do not make any other change in
+these notices.
+.
+  Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+  This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+  4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+  If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library".  Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+  However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library".  The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+  When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library.  The
+threshold for this to be true is not precisely defined by law.
+
+  If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work.  (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+  Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+.
+  6. As an exception to the Sections above, you may also compile or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+  You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License.  You must supply a copy of this License.  If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License.  Also, you must do one
+of these things:
+
+    a) Accompany the work with the complete corresponding
+    machine-readable source code for the Library including whatever
+    changes were used in the work (which must be distributed under
+    Sections 1 and 2 above); and, if the work is an executable linked
+    with the Library, with the complete machine-readable "work that
+    uses the Library", as object code and/or source code, so that the
+    user can modify the Library and then relink to produce a modified
+    executable containing the modified Library.  (It is understood
+    that the user who changes the contents of definitions files in the
+    Library will not necessarily be able to recompile the application
+    to use the modified definitions.)
+
+    b) Accompany the work with a written offer, valid for at
+    least three years, to give the same user the materials
+    specified in Subsection 6a, above, for a charge no more
+    than the cost of performing this distribution.
+
+    c) If distribution of the work is made by offering access to copy
+    from a designated place, offer equivalent access to copy the above
+    specified materials from the same place.
+
+    d) Verify that the user has already received a copy of these
+    materials or that you have already sent this user a copy.
+
+  For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it.  However, as a special exception,
+the source code distributed need not include anything that is normally
+distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+  It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system.  Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+.
+  7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+    a) Accompany the combined library with a copy of the same work
+    based on the Library, uncombined with any other library
+    facilities.  This must be distributed under the terms of the
+    Sections above.
+
+    b) Give prominent notice with the combined library of the fact
+    that part of it is a work based on the Library, and explaining
+    where to find the accompanying uncombined form of the same work.
+
+  8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License.  Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License.  However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+  9. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Library or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+  10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+.
+  11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded.  In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+  13. The Free Software Foundation may publish revised and/or new
+versions of the Library General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation.  If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+.
+  14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission.  For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this.  Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+			    NO WARRANTY
+
+  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+		     END OF TERMS AND CONDITIONS

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/_template/editor_plugin.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/_template/editor_plugin.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/_template/editor_plugin.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1 @@
+tinyMCE.importPluginLanguagePack('template','en,tr,he,nb,ru,ru_KOI8-R,ru_UTF-8,nn,fi,cy,es,is,pl');var TinyMCE_TemplatePlugin={getInfo:function(){return{longname:'Template plugin',author:'Your name',authorurl:'http://www.yoursite.com',infourl:'http://www.yoursite.com/docs/template.html',version:"1.0"};},initInstance:function(inst){alert("Initialization parameter:"+tinyMCE.getParam("template_someparam",false));inst.addShortcut('ctrl','t','lang_template_desc','mceTemplate');},getControlHTML:function(cn){switch(cn){case"template":return tinyMCE.getButtonHTML(cn,'lang_template_desc','{$pluginurl}/images/template.gif','mceTemplate',true);}return"";},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case"mceTemplate":if(user_interface){var template=new Array();template['file']='../../plugins/template/popup.htm';template['width']=300;template['height']=200;tinyMCE.openWindow(template,{editor_id:editor_id,some_custom_arg:"somecustomdata"});tinyMCE.triggerNodeChange(false);}else{alert("execCommand: mceTemplate gets called from popup.");}return true;}return false;},handleNodeChange:function(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){if(node.parentNode.nodeName=="STRONG"||node.parentNode.nodeName=="B"){tinyMCE.switchClass(editor_id+'_template','mceButtonSelected');return true;}tinyMCE.switchClass(editor_id+'_template','mceButtonNormal');},setupContent:function(editor_id,body,doc){},onChange:function(inst){},handleEvent:function(e){top.status="template plugin event: "+e.type;return true;},cleanup:function(type,content,inst){switch(type){case"get_from_editor":alert("[FROM] Value HTML string: "+content);break;case"insert_to_editor":alert("[TO] Value HTML string: "+content);break;case"get_from_editor_dom":alert("[FROM] Value DOM Element "+content.innerHTML);break;case"insert_to_editor_dom":alert("[TO] Value DOM Element: "+content.innerHTML);break;}return content;},_someInternalFunction:function(a,b){return 1;}};tinyMCE.addPlugin("template",TinyMCE_TemplatePlugin);
\ No newline at end of file

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/_template/editor_plugin_src.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/_template/editor_plugin_src.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/_template/editor_plugin_src.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,238 @@
+/**
+ * $RCSfile: editor_plugin_src.js,v $
+ * $Revision: 1.12 $
+ * $Date: 2006/02/22 20:06:23 $
+ *
+ * @author Moxiecode
+ * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
+ */
+
+/* Import plugin specific language pack */
+tinyMCE.importPluginLanguagePack('template', 'en,tr,he,nb,ru,ru_KOI8-R,ru_UTF-8,nn,fi,cy,es,is,pl'); // <- Add a comma separated list of all supported languages
+
+/****
+ * Steps for creating a plugin from this template:
+ *
+ * 1. Change all "template" to the name of your plugin.
+ * 2. Remove all the callbacks in this file that you don't need.
+ * 3. Remove the popup.htm file if you don't need any popups.
+ * 4. Add your custom logic to the callbacks you needed.
+ * 5. Write documentation in a readme.txt file on how to use the plugin.
+ * 6. Upload it under the "Plugins" section at sourceforge.
+ *
+ ****/
+
+// Singleton class
+var TinyMCE_TemplatePlugin = {
+	/**
+	 * Returns information about the plugin as a name/value array.
+	 * The current keys are longname, author, authorurl, infourl and version.
+	 *
+	 * @returns Name/value array containing information about the plugin.
+	 * @type Array 
+	 */
+	getInfo : function() {
+		return {
+			longname : 'Template plugin',
+			author : 'Your name',
+			authorurl : 'http://www.yoursite.com',
+			infourl : 'http://www.yoursite.com/docs/template.html',
+			version : "1.0"
+		};
+	},
+
+	/**
+	 * Gets executed when a TinyMCE editor instance is initialized.
+	 *
+	 * @param {TinyMCE_Control} Initialized TinyMCE editor control instance. 
+	 */
+	initInstance : function(inst) {
+		// You can take out plugin specific parameters
+		alert("Initialization parameter:" + tinyMCE.getParam("template_someparam", false));
+
+		// Register custom keyboard shortcut
+		inst.addShortcut('ctrl', 't', 'lang_template_desc', 'mceTemplate');
+	},
+
+	/**
+	 * Returns the HTML code for a specific control or empty string if this plugin doesn't have that control.
+	 * A control can be a button, select list or any other HTML item to present in the TinyMCE user interface.
+	 * The variable {$editor_id} will be replaced with the current editor instance id and {$pluginurl} will be replaced
+	 * with the URL of the plugin. Language variables such as {$lang_somekey} will also be replaced with contents from
+	 * the language packs.
+	 *
+	 * @param {string} cn Editor control/button name to get HTML for.
+	 * @return HTML code for a specific control or empty string.
+	 * @type string
+	 */
+	getControlHTML : function(cn) {
+		switch (cn) {
+			case "template":
+				return tinyMCE.getButtonHTML(cn, 'lang_template_desc', '{$pluginurl}/images/template.gif', 'mceTemplate', true);
+		}
+
+		return "";
+	},
+
+	/**
+	 * Executes a specific command, this function handles plugin commands.
+	 *
+	 * @param {string} editor_id TinyMCE editor instance id that issued the command.
+	 * @param {HTMLElement} element Body or root element for the editor instance.
+	 * @param {string} command Command name to be executed.
+	 * @param {string} user_interface True/false if a user interface should be presented.
+	 * @param {mixed} value Custom value argument, can be anything.
+	 * @return true/false if the command was executed by this plugin or not.
+	 * @type
+	 */
+	execCommand : function(editor_id, element, command, user_interface, value) {
+		// Handle commands
+		switch (command) {
+			// Remember to have the "mce" prefix for commands so they don't intersect with built in ones in the browser.
+			case "mceTemplate":
+				// Show UI/Popup
+				if (user_interface) {
+					// Open a popup window and send in some custom data in a window argument
+					var template = new Array();
+
+					template['file'] = '../../plugins/template/popup.htm'; // Relative to theme
+					template['width'] = 300;
+					template['height'] = 200;
+
+					tinyMCE.openWindow(template, {editor_id : editor_id, some_custom_arg : "somecustomdata"});
+
+					// Let TinyMCE know that something was modified
+					tinyMCE.triggerNodeChange(false);
+				} else {
+					// Do a command this gets called from the template popup
+					alert("execCommand: mceTemplate gets called from popup.");
+				}
+
+				return true;
+		}
+
+		// Pass to next handler in chain
+		return false;
+	},
+
+	/**
+	 * Gets called ones the cursor/selection in a TinyMCE instance changes. This is useful to enable/disable
+	 * button controls depending on where the user are and what they have selected. This method gets executed
+	 * alot and should be as performance tuned as possible.
+	 *
+	 * @param {string} editor_id TinyMCE editor instance id that was changed.
+	 * @param {HTMLNode} node Current node location, where the cursor is in the DOM tree.
+	 * @param {int} undo_index The current undo index, if this is -1 custom undo/redo is disabled.
+	 * @param {int} undo_levels The current undo levels, if this is -1 custom undo/redo is disabled.
+	 * @param {boolean} visual_aid Is visual aids enabled/disabled ex: dotted lines on tables.
+	 * @param {boolean} any_selection Is there any selection at all or is there only a cursor.
+	 */
+	handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {
+		// Select template button if parent node is a strong or b
+		if (node.parentNode.nodeName == "STRONG" || node.parentNode.nodeName == "B") {
+			tinyMCE.switchClass(editor_id + '_template', 'mceButtonSelected');
+			return true;
+		}
+
+		// Deselect template button
+		tinyMCE.switchClass(editor_id + '_template', 'mceButtonNormal');
+	},
+
+	/**
+	 * Gets called when a TinyMCE editor instance gets filled with content on startup.
+	 *
+	 * @param {string} editor_id TinyMCE editor instance id that was filled with content.
+	 * @param {HTMLElement} body HTML body element of editor instance.
+	 * @param {HTMLDocument} doc HTML document instance.
+	 */
+	setupContent : function(editor_id, body, doc) {
+	},
+
+	/**
+	 * Gets called when the contents of a TinyMCE area is modified, in other words when a undo level is
+	 * added.
+	 *
+	 * @param {TinyMCE_Control} inst TinyMCE editor area control instance that got modified.
+	 */
+	onChange : function(inst) {
+	},
+
+	/**
+	 * Gets called when TinyMCE handles events such as keydown, mousedown etc. TinyMCE
+	 * doesn't listen on all types of events so custom event handling may be required for
+	 * some purposes.
+	 *
+	 * @param {Event} e HTML editor event reference.
+	 * @return true - pass to next handler in chain, false - stop chain execution
+	 * @type boolean
+	 */
+	handleEvent : function(e) {
+		// Display event type in statusbar
+		top.status = "template plugin event: " + e.type;
+
+		return true; // Pass to next handler
+	},
+
+	/**
+	 * Gets called when HTML contents is inserted or retrived from a TinyMCE editor instance.
+	 * The type parameter contains what type of event that was performed and what format the content is in.
+	 * Possible valuses for type is get_from_editor, insert_to_editor, get_from_editor_dom, insert_to_editor_dom.
+	 *
+	 * @param {string} type Cleanup event type.
+	 * @param {mixed} content Editor contents that gets inserted/extracted can be a string or DOM element.
+	 * @param {TinyMCE_Control} inst TinyMCE editor instance control that performes the cleanup.
+	 * @return New content or the input content depending on action.
+	 * @type string
+	 */
+	cleanup : function(type, content, inst) {
+		switch (type) {
+			case "get_from_editor":
+				alert("[FROM] Value HTML string: " + content);
+
+				// Do custom cleanup code here
+
+				break;
+
+			case "insert_to_editor":
+				alert("[TO] Value HTML string: " + content);
+
+				// Do custom cleanup code here
+
+				break;
+
+			case "get_from_editor_dom":
+				alert("[FROM] Value DOM Element " + content.innerHTML);
+
+				// Do custom cleanup code here
+
+				break;
+
+			case "insert_to_editor_dom":
+				alert("[TO] Value DOM Element: " + content.innerHTML);
+
+				// Do custom cleanup code here
+
+				break;
+		}
+
+		return content;
+	},
+
+	// Private plugin internal methods
+
+	/**
+	 * This is just a internal plugin method, prefix all internal methods with a _ character.
+	 * The prefix is needed so they doesn't collide with future TinyMCE callback functions.
+	 *
+	 * @param {string} a Some arg1.
+	 * @param {string} b Some arg2.
+	 * @return Some return.
+	 * @type string
+	 */
+	_someInternalFunction : function(a, b) {
+		return 1;
+	}
+};
+
+// Adds the plugin class to the list of available TinyMCE plugins
+tinyMCE.addPlugin("template", TinyMCE_TemplatePlugin);

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/_template/images/template.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/_template/images/template.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/_template/langs/en.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/_template/langs/en.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/_template/langs/en.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,8 @@
+// UK lang variables
+
+/* Remember to namespace the language parameters lang_<your plugin>_<some name> */
+
+tinyMCE.addToLang('',{
+template_title : 'This is just a template popup',
+template_desc : 'This is just a template button'
+});

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/_template/popup.htm
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/_template/popup.htm	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/_template/popup.htm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,48 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+	<title>{$lang_template_title}</title>
+	<script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
+	<script language="javascript" type="text/javascript">
+	<!--
+		function init() {
+			var inst = tinyMCE.selectedInstance;
+			var elm = inst.getFocusElement();
+
+			alert("Got a window argument from plugin: " + tinyMCE.getWindowArg('some_custom_arg'));
+
+			// Set the form item value to the selected node element name
+			document.forms[0].nodename.value = elm.nodeName;
+		}
+
+		function insertSomething() {
+			// Execute the mceTemplate command without UI this time
+			tinyMCEPopup.execCommand('mceTemplate');
+
+			// Close the dialog
+			tinyMCEPopup.close();
+		}
+	//-->
+	</script>
+	<base target="_self" />
+</head>
+<body onload="tinyMCEPopup.executeOnLoad('init();');"> 
+	<form onsubmit="insert();return false;">
+		<h3>{$lang_template_title}</h3>
+
+		<!-- Gets filled with the selected elements name -->
+		<div style="margin-top: 10px; margin-bottom: 10px">
+			The selected element name: <input type="text" name="nodename" />
+		</div>
+
+		<div class="mceActionPanel">
+			<div style="float: left">
+				<input type="button" id="insert" name="insert" value="{$lang_insert}" onclick="insertSomething();" />
+			</div>
+
+			<div style="float: right">
+				<input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onclick="tinyMCEPopup.close();" />
+			</div>
+		</div>
+	</form>
+</body> 
+</html> 

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/_template/readme.txt
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/_template/readme.txt	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/_template/readme.txt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1 @@
+This is a template/tutorial plugin that where created to help you in the development of own plugins for TinyMCE.
\ No newline at end of file

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advhr/css/advhr.css
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advhr/css/advhr.css	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advhr/css/advhr.css	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,23 @@
+input.radio {
+	border: 1px none #000000;
+	background-color: transparent;
+	vertical-align: middle;
+}
+
+.panel_wrapper div.current {
+	height: 80px;
+}
+
+#width {
+	width: 50px;
+	vertical-align: middle;
+}
+
+#width2 {
+	width: 50px;
+	vertical-align: middle;
+}
+
+#size {
+	width: 100px;
+}

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advhr/editor_plugin.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advhr/editor_plugin.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advhr/editor_plugin.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1 @@
+tinyMCE.importPluginLanguagePack('advhr','en,tr,de,sv,zh_cn,cs,fa,fr_ca,fr,pl,pt_br,nl,da,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,fi,es,cy,is,zh_tw,zh_tw_utf8,sk');var TinyMCE_AdvancedHRPlugin={getInfo:function(){return{longname:'Advanced HR',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_advhr.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion}},getControlHTML:function(cn){switch(cn){case"advhr":return tinyMCE.getButtonHTML(cn,'lang_insert_advhr_desc','{$pluginurl}/images/advhr.gif','mceAdvancedHr');}return"";},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case"mceAdvancedHr":var template=new Array();template['file']='../../plugins/advhr/rule.htm';template['width']=250;template['height']=160;template['width']+=tinyMCE.getLang('lang_advhr_delta_width',0);template['height']+=tinyMCE.getLang('lang_advhr_delta_height',0);var size="",width="",noshade="";if(tinyMCE.selectedElement!=null&&tinyMCE.selectedElement.nodeName.toLowerCase()=="hr"){tinyMCE.hrElement=tinyMCE.selectedElement;if(tinyMCE.hrElement){size=tinyMCE.hrElement.getAttribute('size')?tinyMCE.hrElement.getAttribute('size'):"";width=tinyMCE.hrElement.getAttribute('width')?tinyMCE.hrElement.getAttribute('width'):"";noshade=tinyMCE.hrElement.getAttribute('noshade')?tinyMCE.hrElement.getAttribute('noshade'):"";}tinyMCE.openWindow(template,{editor_id:editor_id,size:size,width:width,noshade:noshade,mceDo:'update'});}else{if(tinyMCE.isMSIE){tinyMCE.execInstanceCommand(editor_id,'mceInsertContent',false,'<hr />');}else{tinyMCE.openWindow(template,{editor_id:editor_id,inline:"yes",size:size,width:width,noshade:noshade,mceDo:'insert'});}}return true;}return false;},handleNodeChange:function(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){if(node==null)return;do{if(node.nodeName=="HR"){tinyMCE.switchClass(editor_id+'_advhr','mceButtonSelected');return true;}}while((node=node.parentNode));tinyMCE.switchClass(editor_id+'_advhr','mceButtonNormal');return true;}};tinyMCE.addPlugin("advhr",TinyMCE_AdvancedHRPlugin);
\ No newline at end of file

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advhr/editor_plugin_src.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advhr/editor_plugin_src.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advhr/editor_plugin_src.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,92 @@
+/**
+ * $RCSfile: editor_plugin_src.js,v $
+ * $Revision: 1.19 $
+ * $Date: 2006/02/10 16:29:37 $
+ *
+ * @author Moxiecode
+ * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
+ */
+
+/* Import plugin specific language pack */
+tinyMCE.importPluginLanguagePack('advhr', 'en,tr,de,sv,zh_cn,cs,fa,fr_ca,fr,pl,pt_br,nl,da,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,fi,es,cy,is,zh_tw,zh_tw_utf8,sk');
+
+var TinyMCE_AdvancedHRPlugin = {
+	getInfo : function() {
+		return {
+			longname : 'Advanced HR',
+			author : 'Moxiecode Systems',
+			authorurl : 'http://tinymce.moxiecode.com',
+			infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_advhr.html',
+			version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
+		}
+	},
+
+	getControlHTML : function(cn) {
+		switch (cn) {
+			case "advhr":
+				return tinyMCE.getButtonHTML(cn, 'lang_insert_advhr_desc', '{$pluginurl}/images/advhr.gif', 'mceAdvancedHr');
+		}
+
+		return "";
+	},
+
+	/**
+	 * Executes the mceAdvanceHr command.
+	 */
+	execCommand : function(editor_id, element, command, user_interface, value) {
+		// Handle commands
+		switch (command) {
+			case "mceAdvancedHr":
+				var template = new Array();
+
+				template['file']   = '../../plugins/advhr/rule.htm'; // Relative to theme
+				template['width']  = 250;
+				template['height'] = 160;
+
+				template['width']  += tinyMCE.getLang('lang_advhr_delta_width', 0);
+				template['height'] += tinyMCE.getLang('lang_advhr_delta_height', 0);
+
+				var size = "", width = "", noshade = "";
+				if (tinyMCE.selectedElement != null && tinyMCE.selectedElement.nodeName.toLowerCase() == "hr") {
+					tinyMCE.hrElement = tinyMCE.selectedElement;
+
+					if (tinyMCE.hrElement) {
+						size    = tinyMCE.hrElement.getAttribute('size') ? tinyMCE.hrElement.getAttribute('size') : "";
+						width   = tinyMCE.hrElement.getAttribute('width') ? tinyMCE.hrElement.getAttribute('width') : "";
+						noshade = tinyMCE.hrElement.getAttribute('noshade') ? tinyMCE.hrElement.getAttribute('noshade') : "";
+					}
+
+					tinyMCE.openWindow(template, {editor_id : editor_id, size : size, width : width, noshade : noshade, mceDo : 'update'});
+				} else {
+					if (tinyMCE.isMSIE) {
+						tinyMCE.execInstanceCommand(editor_id, 'mceInsertContent', false,'<hr />');
+					} else {
+						tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes", size : size, width : width, noshade : noshade, mceDo : 'insert'});
+					}
+				}
+
+				return true;
+		}
+
+		// Pass to next handler in chain
+		return false;
+	},
+
+	handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {
+		if (node == null)
+			return;
+
+		do {
+			if (node.nodeName == "HR") {
+				tinyMCE.switchClass(editor_id + '_advhr', 'mceButtonSelected');
+				return true;
+			}
+		} while ((node = node.parentNode));
+
+		tinyMCE.switchClass(editor_id + '_advhr', 'mceButtonNormal');
+
+		return true;
+	}
+};
+
+tinyMCE.addPlugin("advhr", TinyMCE_AdvancedHRPlugin);

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advhr/images/advhr.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advhr/images/advhr.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advhr/jscripts/rule.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advhr/jscripts/rule.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advhr/jscripts/rule.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,41 @@
+function init() {
+	var formObj = document.forms[0];
+	formObj.width.value  = tinyMCE.getWindowArg('width');
+	formObj.size.value   = tinyMCE.getWindowArg('size');
+	formObj.insert.value = tinyMCE.getLang('lang_' + tinyMCE.getWindowArg('mceDo'),'Insert',true);
+	if (tinyMCE.getWindowArg('noshade')) {
+		formObj.noshade.checked = true;
+	}
+	if (tinyMCE.getWindowArg('width').lastIndexOf('%')!=-1) {
+		formObj.width2.value = "%";
+		formObj.width.value  = formObj.width.value.substring(0,formObj.width.value.length-1);
+	}
+}
+
+function insertHR() {
+	var formObj = document.forms[0];
+	var width   = formObj.width.value;
+	var size    = formObj.size.value;
+	var html = '<hr';
+	if (size!='' && size!=0) {
+		html += ' size="' + size + '"';
+	}
+	if (width!='' && width!=0) {
+		html += ' width="' + width;
+		if (formObj.width2.value=='%') {
+			html += '%';
+		}
+		html += '"';
+	}
+	if (formObj.noshade.checked==true) {
+		html += ' noshade="noshade"';
+	}
+	html += ' />';
+
+	tinyMCEPopup.execCommand("mceInsertContent", true, html);
+	tinyMCEPopup.close();
+}
+
+function cancelAction() {
+	tinyMCEPopup.close();
+}

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advhr/langs/en.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advhr/langs/en.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advhr/langs/en.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,8 @@
+// UK lang variables
+
+tinyMCE.addToLang('',{
+insert_advhr_desc : 'Horizontale rule',
+insert_advhr_width : 'Width',
+insert_advhr_size : 'Height',
+insert_advhr_noshade : 'No shadow'
+});

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advhr/readme.txt
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advhr/readme.txt	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advhr/readme.txt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1 @@
+Check the TinyMCE documentation for details on this plugin.

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advhr/rule.htm
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advhr/rule.htm	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advhr/rule.htm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,61 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+	<title>{$lang_insert_advhr_desc}</title>
+	<script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
+	<script language="javascript" type="text/javascript" src="jscripts/rule.js"></script>
+	<script language="javascript" type="text/javascript" src="../../utils/mctabs.js"></script>
+	<link href="css/advhr.css" rel="stylesheet" type="text/css" />
+	<base target="_self" />
+</head>
+<body onload="tinyMCEPopup.executeOnLoad('init();');">
+<form onsubmit="insertHR();return false;" action="#">
+	<div class="tabs">
+		<ul>
+			<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{$lang_insert_advhr_desc}</a></span></li>
+		</ul>
+	</div>
+
+	<div class="panel_wrapper">
+		<div id="general_panel" class="panel current">
+			<table border="0" cellpadding="4" cellspacing="0">
+                    <tr>
+                        <td><label for="width">{$lang_insert_advhr_width}</label></td>
+                        <td nowrap="nowrap">
+                            <input id="width" name="width" type="text" value="" />
+                            <select name="width2" id="width2">
+                                <option value="">px</option>
+                                <option value="%">%</option>
+                            </select>
+                        </td>
+                    </tr>
+                    <tr>
+                        <td><label for="size">{$lang_insert_advhr_size}</label></td>
+                        <td><select id="size" name="size">
+                            <option value="">Normal</option>
+                            <option value="1">1</option>
+                            <option value="2">2</option>
+                            <option value="3">3</option>
+                            <option value="4">4</option>
+                            <option value="5">5</option>
+                        </select></td>
+                    </tr>
+                    <tr>
+                        <td><label for="noshade">{$lang_insert_advhr_noshade}</label></td>
+                        <td><input type="checkbox" name="noshade" id="noshade" class="radio" /></td>
+                    </tr>
+            </table>
+		</div>
+	</div>
+
+	<div class="mceActionPanel">
+		<div style="float: left">
+			<input type="button" id="insert" name="insert" value="{$lang_insert}" onclick="insertHR();" />
+		</div>
+
+		<div style="float: right">
+			<input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onclick="tinyMCEPopup.close();" />
+		</div>
+	</div>
+</form>
+</body>
+</html>

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advimage/css/advimage.css
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advimage/css/advimage.css	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advimage/css/advimage.css	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,66 @@
+/* CSS file for advimage plugin popup */
+
+.mceImageList {
+	width: 280px;
+}
+
+.mceActionPanel {
+	margin-top: 7px;
+}
+
+.alignPreview {
+	border: 1px solid black;
+	width: 140px;
+	height: 140px;
+	overflow: hidden;
+	padding: 5px;
+}
+
+.checkbox {
+	border: 0;
+}
+
+.panel_wrapper div.current {
+	height: 305px;
+}
+
+#prev {
+	margin: 0;
+	border: 1px
+	solid black;
+	width: 99%;
+	height: 150px;
+	overflow: auto;
+}
+
+#align, #classlist {
+	width: 150px;
+}
+
+#width, #height {
+	vertical-align: middle;
+	width: 50px;
+	text-align: center;
+}
+
+#vspace, #hspace, #border {
+	vertical-align: middle;
+	width: 30px;
+	text-align: center;
+}
+
+#classlist {
+	width: 180px;
+}
+
+input {
+	width: 280px;
+}
+
+#constrain, #onmousemovecheck {
+	width: auto;
+}
+
+#id, #dir, #lang, #usemap, #longdesc {
+	width: 200px;
+}

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advimage/editor_plugin.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advimage/editor_plugin.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advimage/editor_plugin.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1 @@
+tinyMCE.importPluginLanguagePack('advimage','en,tr,de,sv,zh_cn,cs,fa,fr_ca,fr,pl,pt_br,nl,he,nb,ru,ru_KOI8-R,ru_UTF-8,nn,cy,es,is,zh_tw,zh_tw_utf8,sk,da');var TinyMCE_AdvancedImagePlugin={getInfo:function(){return{longname:'Advanced image',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_advimage.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};},getControlHTML:function(cn){switch(cn){case"image":return tinyMCE.getButtonHTML(cn,'lang_image_desc','{$themeurl}/images/image.gif','mceAdvImage');}return"";},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case"mceAdvImage":var template=new Array();template['file']='../../plugins/advimage/image.htm';template['width']=480;template['height']=380;template['width']+=tinyMCE.getLang('lang_advimage_delta_width',0);template['height']+=tinyMCE.getLang('lang_advimage_delta_height',0);var inst=tinyMCE.getInstanceById(editor_id);var elm=inst.getFocusElement();if(elm!=null&&tinyMCE.getAttrib(elm,'class').indexOf('mceItem')!=-1)return true;tinyMCE.openWindow(template,{editor_id:editor_id,inline:"yes"});return true;}return false;},cleanup:function(type,content){switch(type){case"insert_to_editor_dom":var imgs=content.getElementsByTagName("img");for(var i=0;i<imgs.length;i++){var onmouseover=tinyMCE.cleanupEventStr(tinyMCE.getAttrib(imgs[i],'onmouseover'));var onmouseout=tinyMCE.cleanupEventStr(tinyMCE.getAttrib(imgs[i],'onmouseout'));if((src=this._getImageSrc(onmouseover))!=""){if(tinyMCE.getParam('convert_urls'))src=tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'],src);imgs[i].setAttribute('onmouseover',"this.src='"+src+"';");}if((src=this._getImageSrc(onmouseout))!=""){if(tinyMCE.getParam('convert_urls'))src=tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'],src);imgs[i].setAttribute('onmouseout',"this.src='"+src+"';");}}break;case"get_from_editor_dom":var imgs=content.getElementsByTagName("img");for(var i=0;i<imgs.length;i++){var onmouseover=tinyMCE.cleanupEventStr(tinyMCE.getAttrib(imgs[i],'onmouseover'));var onmouseout=tinyMCE.cleanupEventStr(tinyMCE.getAttrib(imgs[i],'onmouseout'));if((src=this._getImageSrc(onmouseover))!=""){if(tinyMCE.getParam('convert_urls'))src=eval(tinyMCE.settings['urlconverter_callback']+"(src, null, true);");imgs[i].setAttribute('onmouseover',"this.src='"+src+"';");}if((src=this._getImageSrc(onmouseout))!=""){if(tinyMCE.getParam('convert_urls'))src=eval(tinyMCE.settings['urlconverter_callback']+"(src, null, true);");imgs[i].setAttribute('onmouseout',"this.src='"+src+"';");}}break;}return content;},handleNodeChange:function(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){if(node==null)return;do{if(node.nodeName=="IMG"&&tinyMCE.getAttrib(node,'class').indexOf('mceItem')==-1){tinyMCE.switchClass(editor_id+'_advimage','mceButtonSelected');return true;}}while((node=node.parentNode));tinyMCE.switchClass(editor_id+'_advimage','mceButtonNormal');return true;},_getImageSrc:function(s){var sr,p=-1;if(!s)return"";if((p=s.indexOf('this.src='))!=-1){sr=s.substring(p+10);sr=sr.substring(0,sr.indexOf('\''));return sr;}return"";}};tinyMCE.addPlugin("advimage",TinyMCE_AdvancedImagePlugin);
\ No newline at end of file

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advimage/editor_plugin_src.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advimage/editor_plugin_src.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advimage/editor_plugin_src.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,150 @@
+/**
+ * $RCSfile: editor_plugin_src.js,v $
+ * $Revision: 1.30 $
+ * $Date: 2006/02/10 16:29:37 $
+ *
+ * @author Moxiecode
+ * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
+ */
+
+/* Import plugin specific language pack */
+tinyMCE.importPluginLanguagePack('advimage', 'en,tr,de,sv,zh_cn,cs,fa,fr_ca,fr,pl,pt_br,nl,he,nb,ru,ru_KOI8-R,ru_UTF-8,nn,cy,es,is,zh_tw,zh_tw_utf8,sk,da');
+
+var TinyMCE_AdvancedImagePlugin = {
+	getInfo : function() {
+		return {
+			longname : 'Advanced image',
+			author : 'Moxiecode Systems',
+			authorurl : 'http://tinymce.moxiecode.com',
+			infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_advimage.html',
+			version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
+		};
+	},
+
+	getControlHTML : function(cn) {
+		switch (cn) {
+			case "image":
+				return tinyMCE.getButtonHTML(cn, 'lang_image_desc', '{$themeurl}/images/image.gif', 'mceAdvImage');
+		}
+
+		return "";
+	},
+
+	execCommand : function(editor_id, element, command, user_interface, value) {
+		switch (command) {
+			case "mceAdvImage":
+				var template = new Array();
+
+				template['file']   = '../../plugins/advimage/image.htm';
+				template['width']  = 480;
+				template['height'] = 380;
+
+				// Language specific width and height addons
+				template['width']  += tinyMCE.getLang('lang_advimage_delta_width', 0);
+				template['height'] += tinyMCE.getLang('lang_advimage_delta_height', 0);
+
+				var inst = tinyMCE.getInstanceById(editor_id);
+				var elm = inst.getFocusElement();
+
+				if (elm != null && tinyMCE.getAttrib(elm, 'class').indexOf('mceItem') != -1)
+					return true;
+
+				tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes"});
+
+				return true;
+		}
+
+		return false;
+	},
+
+	cleanup : function(type, content) {
+		switch (type) {
+			case "insert_to_editor_dom":
+				var imgs = content.getElementsByTagName("img");
+				for (var i=0; i<imgs.length; i++) {
+					var onmouseover = tinyMCE.cleanupEventStr(tinyMCE.getAttrib(imgs[i], 'onmouseover'));
+					var onmouseout = tinyMCE.cleanupEventStr(tinyMCE.getAttrib(imgs[i], 'onmouseout'));
+
+					if ((src = this._getImageSrc(onmouseover)) != "") {
+						if (tinyMCE.getParam('convert_urls'))
+							src = tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'], src);
+
+						imgs[i].setAttribute('onmouseover', "this.src='" + src + "';");
+					}
+
+					if ((src = this._getImageSrc(onmouseout)) != "") {
+						if (tinyMCE.getParam('convert_urls'))
+							src = tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'], src);
+
+						imgs[i].setAttribute('onmouseout', "this.src='" + src + "';");
+					}
+				}
+				break;
+
+			case "get_from_editor_dom":
+				var imgs = content.getElementsByTagName("img");
+				for (var i=0; i<imgs.length; i++) {
+					var onmouseover = tinyMCE.cleanupEventStr(tinyMCE.getAttrib(imgs[i], 'onmouseover'));
+					var onmouseout = tinyMCE.cleanupEventStr(tinyMCE.getAttrib(imgs[i], 'onmouseout'));
+
+					if ((src = this._getImageSrc(onmouseover)) != "") {
+						if (tinyMCE.getParam('convert_urls'))
+							src = eval(tinyMCE.settings['urlconverter_callback'] + "(src, null, true);");
+
+						imgs[i].setAttribute('onmouseover', "this.src='" + src + "';");
+					}
+
+					if ((src = this._getImageSrc(onmouseout)) != "") {
+						if (tinyMCE.getParam('convert_urls'))
+							src = eval(tinyMCE.settings['urlconverter_callback'] + "(src, null, true);");
+
+						imgs[i].setAttribute('onmouseout', "this.src='" + src + "';");
+					}
+				}
+				break;
+		}
+
+		return content;
+	},
+
+	handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {
+		if (node == null)
+			return;
+
+		do {
+			if (node.nodeName == "IMG" && tinyMCE.getAttrib(node, 'class').indexOf('mceItem') == -1) {
+				tinyMCE.switchClass(editor_id + '_advimage', 'mceButtonSelected');
+				return true;
+			}
+		} while ((node = node.parentNode));
+
+		tinyMCE.switchClass(editor_id + '_advimage', 'mceButtonNormal');
+
+		return true;
+	},
+
+	/**
+	 * Returns the image src from a scripted mouse over image str.
+	 *
+	 * @param {string} s String to get real src from.
+	 * @return Image src from a scripted mouse over image str.
+	 * @type string
+	 */
+	_getImageSrc : function(s) {
+		var sr, p = -1;
+
+		if (!s)
+			return "";
+
+		if ((p = s.indexOf('this.src=')) != -1) {
+			sr = s.substring(p + 10);
+			sr = sr.substring(0, sr.indexOf('\''));
+
+			return sr;
+		}
+
+		return "";
+	}
+};
+
+tinyMCE.addPlugin("advimage", TinyMCE_AdvancedImagePlugin);

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advimage/image.htm
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advimage/image.htm	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advimage/image.htm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,240 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+	<title>{$lang_insert_image_title}</title>
+	<script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
+	<script language="javascript" type="text/javascript" src="../../utils/mctabs.js"></script>
+	<script language="javascript" type="text/javascript" src="../../utils/form_utils.js"></script>
+	<script language="javascript" type="text/javascript" src="jscripts/functions.js"></script>
+	<link href="css/advimage.css" rel="stylesheet" type="text/css" />
+	<base target="_self" />
+</head>
+<body id="advimage" onload="tinyMCEPopup.executeOnLoad('init();');" style="display: none">
+    <form onsubmit="insertAction();return false;" action="#"> 
+		<div class="tabs">
+			<ul>
+				<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{$lang_advimage_tab_general}</a></span></li>
+				<li id="appearance_tab"><span><a href="javascript:mcTabs.displayTab('appearance_tab','appearance_panel');" onmousedown="return false;">{$lang_advimage_tab_appearance}</a></span></li>
+				<li id="advanced_tab"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{$lang_advimage_tab_advanced}</a></span></li>
+			</ul>
+		</div>
+
+		<div class="panel_wrapper">
+			<div id="general_panel" class="panel current">
+				<fieldset>
+						<legend>{$lang_advimage_general}</legend>
+
+						<table class="properties">
+							<tr>
+								<td class="column1"><label id="srclabel" for="src">{$lang_insert_image_src}</label></td>
+								<td colspan="2"><table border="0" cellspacing="0" cellpadding="0">
+									<tr> 
+									  <td><input name="src" type="text" id="src" value="" onchange="showPreviewImage(this.value);" /></td> 
+									  <td id="srcbrowsercontainer">&nbsp;</td>
+									</tr>
+								  </table></td>
+							</tr>
+							<tr id="imagelistsrcrow">
+								<td class="column1"><label for="imagelistsrc">{$lang_image_list}</label></td>
+								<td colspan="2" id="imagelistsrccontainer">&nbsp;</td>
+							</tr>
+							<tr> 
+								<td class="column1"><label id="altlabel" for="alt">{$lang_insert_image_alt}</label></td> 
+								<td colspan="2"><input id="alt" name="alt" type="text" value="" /></td> 
+							</tr> 
+							<tr> 
+								<td class="column1"><label id="titlelabel" for="title">{$lang_advimage_title}</label></td> 
+								<td colspan="2"><input id="title" name="title" type="text" value="" /></td> 
+							</tr>
+						</table>
+				</fieldset>
+
+				<fieldset>
+					<legend>{$lang_advimage_preview}</legend>
+					<div id="prev"></div>
+				</fieldset>
+			</div>
+
+			<div id="appearance_panel" class="panel">
+				<fieldset>
+					<legend>{$lang_advimage_tab_appearance}</legend>
+
+					<table border="0" cellpadding="4" cellspacing="0">
+						<tr> 
+							<td class="column1"><label id="alignlabel" for="align">{$lang_insert_image_align}</label></td> 
+							<td><select id="align" name="align" onchange="changeAppearance();"> 
+									<option value="">{$lang_insert_image_align_default}</option> 
+									<option value="baseline">{$lang_insert_image_align_baseline}</option> 
+									<option value="top">{$lang_insert_image_align_top}</option> 
+									<option value="middle">{$lang_insert_image_align_middle}</option> 
+									<option value="bottom">{$lang_insert_image_align_bottom}</option> 
+									<option value="texttop">{$lang_insert_image_align_texttop}</option> 
+									<option value="absmiddle">{$lang_insert_image_align_absmiddle}</option> 
+									<option value="absbottom">{$lang_insert_image_align_absbottom}</option> 
+									<option value="left">{$lang_insert_image_align_left}</option> 
+									<option value="right">{$lang_insert_image_align_right}</option> 
+								</select> 
+							</td>
+							<td rowspan="6" valign="top">
+								<div class="alignPreview">
+									<img id="alignSampleImg" src="images/sample.gif" alt="{$lang_advimage_example_img}" />
+									Lorem ipsum, Dolor sit amet, consectetuer adipiscing loreum ipsum edipiscing elit, sed diam
+									nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.Loreum ipsum
+									edipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam
+									erat volutpat.
+								</div>
+							</td>
+						</tr>
+
+						<tr>
+							<td class="column1"><label id="widthlabel" for="width">{$lang_insert_image_dimensions}</label></td>
+							<td nowrap="nowrap">
+								<input name="width" type="text" id="width" value="" size="5" maxlength="5" onchange="changeHeight();" /> x 
+								<input name="height" type="text" id="height" value="" size="5" maxlength="5" onchange="changeWidth();" /> px
+							</td>
+						</tr>
+
+						<tr>
+							<td>&nbsp;</td>
+							<td><table border="0" cellpadding="0" cellspacing="0">
+									<tr>
+										<td><input id="constrain" type="checkbox" name="constrain" class="checkbox" /></td>
+										<td><label id="constrainlabel" for="constrain">{$lang_advimage_constrain_proportions}</label></td>
+									</tr>
+								</table></td>
+						</tr>
+
+						<tr>
+							<td class="column1"><label id="vspacelabel" for="vspace">{$lang_insert_image_vspace}</label></td> 
+							<td><input name="vspace" type="text" id="vspace" value="" size="3" maxlength="3" onchange="changeAppearance();updateStyle();" />
+							</td>
+						</tr>
+
+						<tr> 
+							<td class="column1"><label id="hspacelabel" for="hspace">{$lang_insert_image_hspace}</label></td> 
+							<td><input name="hspace" type="text" id="hspace" value="" size="3" maxlength="3" onchange="changeAppearance();updateStyle();" /></td> 
+						</tr>
+
+						<tr>
+							<td class="column1"><label id="borderlabel" for="border">{$lang_insert_image_border}</label></td> 
+							<td><input id="border" name="border" type="text" value="" size="3" maxlength="3" onchange="changeAppearance();updateStyle();" /></td> 
+						</tr>
+
+						<tr>
+							<td><label id="classlabel" for="classlist">{$lang_class_name}</label></td>
+							<td colspan="2">
+								 <select id="classlist" name="classlist">
+									<option value="" selected>{$lang_not_set}</option>
+								 </select>
+							</td>
+						</tr>
+
+						<tr>
+							<td class="column1"><label id="stylelabel" for="style">{$lang_advimage_style}</label></td> 
+							<td colspan="2"><input id="style" name="style" type="text" value="" onchange="styleUpdated();" /></td> 
+						</tr>
+
+						<!-- <tr>
+							<td class="column1"><label id="classeslabel" for="classes">{$lang_advimage_classes}</label></td> 
+							<td colspan="2"><input id="classes" name="classes" type="text" value="" onchange="selectByValue(this.form,'classlist',this.value,true);" /></td> 
+						</tr> -->
+					</table>
+				</fieldset>
+			</div>
+
+			<div id="advanced_panel" class="panel">
+				<fieldset>
+					<legend>{$lang_advimage_swap_image}</legend>
+
+					<input type="checkbox" id="onmousemovecheck" name="onmousemovecheck" class="checkbox" onclick="changeMouseMove();" />
+					<label id="onmousemovechecklabel" for="onmousemovecheck">{$lang_advimage_alt_image}</label>
+
+					<table border="0" cellpadding="4" cellspacing="0" width="100%">
+							<tr>
+								<td class="column1"><label id="onmouseoversrclabel" for="onmouseoversrc">{$lang_advimage_mouseover}</label></td> 
+								<td><table border="0" cellspacing="0" cellpadding="0"> 
+									<tr> 
+									  <td><input id="onmouseoversrc" name="onmouseoversrc" type="text" value="" /></td> 
+									  <td id="onmouseoversrccontainer">&nbsp;</td>
+									</tr>
+								  </table></td>
+							</tr>
+							<tr id="imagelistoverrow">
+								<td class="column1"><label for="imagelistover">{$lang_image_list}</label></td>
+								<td id="imagelistovercontainer">&nbsp;</td>
+							</tr>
+							<tr> 
+								<td class="column1"><label id="onmouseoutsrclabel" for="onmouseoutsrc">{$lang_advimage_mouseout}</label></td> 
+								<td class="column2"><table border="0" cellspacing="0" cellpadding="0"> 
+									<tr> 
+									  <td><input id="onmouseoutsrc" name="onmouseoutsrc" type="text" value="" /></td> 
+									  <td id="onmouseoutsrccontainer">&nbsp;</td>
+									</tr> 
+								  </table></td> 
+							</tr>
+							<tr id="imagelistoutrow">
+								<td class="column1"><label for="imagelistout">{$lang_image_list}</label></td>
+								<td id="imagelistoutcontainer">&nbsp;</td>
+							</tr>
+					</table>
+				</fieldset>
+
+				<fieldset>
+					<legend>{$lang_advimage_misc}</legend>
+
+					<table border="0" cellpadding="4" cellspacing="0">
+						<tr>
+							<td class="column1"><label id="idlabel" for="id">{$lang_advimage_id}</label></td> 
+							<td><input id="id" name="id" type="text" value="" /></td> 
+						</tr>
+
+						<tr>
+							<td class="column1"><label id="dirlabel" for="dir">{$lang_advimage_langdir}</label></td> 
+							<td>
+								<select id="dir" name="dir" onchange="changeAppearance();"> 
+										<option value="">{$lang_not_set}</option> 
+										<option value="ltr">{$lang_advimage_ltr}</option> 
+										<option value="rtl">{$lang_advimage_rtl}</option> 
+								</select>
+							</td> 
+						</tr>
+
+						<tr>
+							<td class="column1"><label id="langlabel" for="lang">{$lang_advimage_langcode}</label></td> 
+							<td>
+								<input id="lang" name="lang" type="text" value="" />
+							</td> 
+						</tr>
+
+						<tr>
+							<td class="column1"><label id="usemaplabel" for="usemap">{$lang_advimage_image_map}</label></td> 
+							<td>
+								<input id="usemap" name="usemap" type="text" value="" />
+							</td> 
+						</tr>
+
+						<tr>
+							<td class="column1"><label id="longdesclabel" for="longdesc">{$lang_advimage_long_desc}</label></td>
+							<td><table border="0" cellspacing="0" cellpadding="0">
+									<tr>
+									  <td><input id="longdesc" name="longdesc" type="text" value="" /></td>
+									  <td id="longdesccontainer">&nbsp;</td>
+									</tr>
+								</table></td> 
+						</tr>
+					</table>
+				</fieldset>
+			</div>
+		</div>
+
+		<div class="mceActionPanel">
+			<div style="float: left">
+				<input type="button" id="insert" name="insert" value="{$lang_insert}" onclick="insertAction();" />
+			</div>
+
+			<div style="float: right">
+				<input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onclick="cancelAction();" />
+			</div>
+		</div>
+    </form>
+</body> 
+</html> 

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advimage/images/sample.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advimage/images/sample.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advimage/jscripts/functions.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advimage/jscripts/functions.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advimage/jscripts/functions.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,545 @@
+/* Functions for the advimage plugin popup */
+
+var preloadImg = null;
+var orgImageWidth, orgImageHeight;
+
+function preinit() {
+	// Initialize
+	tinyMCE.setWindowArg('mce_windowresize', false);
+
+	// Import external list url javascript
+	var url = tinyMCE.getParam("external_image_list_url");
+	if (url != null) {
+		// Fix relative
+		if (url.charAt(0) != '/' && url.indexOf('://') == -1)
+			url = tinyMCE.documentBasePath + "/" + url;
+
+		document.write('<sc'+'ript language="javascript" type="text/javascript" src="' + url + '"></sc'+'ript>');
+	}
+}
+
+function convertURL(url, node, on_save) {
+	return eval("tinyMCEPopup.windowOpener." + tinyMCE.settings['urlconverter_callback'] + "(url, node, on_save);");
+}
+
+function getImageSrc(str) {
+	var pos = -1;
+
+	if (!str)
+		return "";
+
+	if ((pos = str.indexOf('this.src=')) != -1) {
+		var src = str.substring(pos + 10);
+
+		src = src.substring(0, src.indexOf('\''));
+
+		if (tinyMCE.getParam('convert_urls'))
+			src = convertURL(src, null, true);
+
+		return src;
+	}
+
+	return "";
+}
+
+function init() {
+	tinyMCEPopup.resizeToInnerSize();
+
+	var formObj = document.forms[0];
+	var inst = tinyMCE.getInstanceById(tinyMCE.getWindowArg('editor_id'));
+	var elm = inst.getFocusElement();
+	var action = "insert";
+	var html = "";
+
+	// Image list src
+	html = getImageListHTML('imagelistsrc','src','onSelectMainImage');
+	if (html == "")
+		document.getElementById("imagelistsrcrow").style.display = 'none';
+	else
+		document.getElementById("imagelistsrccontainer").innerHTML = html;
+
+	// Image list oversrc
+	html = getImageListHTML('imagelistover','onmouseoversrc');
+	if (html == "")
+		document.getElementById("imagelistoverrow").style.display = 'none';
+	else
+		document.getElementById("imagelistovercontainer").innerHTML = html;
+
+	// Image list outsrc
+	html = getImageListHTML('imagelistout','onmouseoutsrc');
+	if (html == "")
+		document.getElementById("imagelistoutrow").style.display = 'none';
+	else
+		document.getElementById("imagelistoutcontainer").innerHTML = html;
+
+	// Src browser
+	html = getBrowserHTML('srcbrowser','src','image','advimage');
+	document.getElementById("srcbrowsercontainer").innerHTML = html;
+
+	// Over browser
+	html = getBrowserHTML('oversrcbrowser','onmouseoversrc','image','advimage');
+	document.getElementById("onmouseoversrccontainer").innerHTML = html;
+
+	// Out browser
+	html = getBrowserHTML('outsrcbrowser','onmouseoutsrc','image','advimage');
+	document.getElementById("onmouseoutsrccontainer").innerHTML = html;
+
+	// Longdesc browser
+	html = getBrowserHTML('longdescbrowser','longdesc','file','advimage');
+	document.getElementById("longdesccontainer").innerHTML = html;
+
+	// Resize some elements
+	if (isVisible('srcbrowser'))
+		document.getElementById('src').style.width = '260px';
+
+	if (isVisible('oversrcbrowser'))
+		document.getElementById('onmouseoversrc').style.width = '260px';
+
+	if (isVisible('outsrcbrowser'))
+		document.getElementById('onmouseoutsrc').style.width = '260px';
+
+	if (isVisible('longdescbrowser'))
+		document.getElementById('longdesc').style.width = '180px';
+
+	// Check action
+	if (elm != null && elm.nodeName == "IMG")
+		action = "update";
+
+	formObj.insert.value = tinyMCE.getLang('lang_' + action, 'Insert', true); 
+
+	if (action == "update") {
+		var src = tinyMCE.getAttrib(elm, 'src');
+		var onmouseoversrc = getImageSrc(tinyMCE.cleanupEventStr(tinyMCE.getAttrib(elm, 'onmouseover')));
+		var onmouseoutsrc = getImageSrc(tinyMCE.cleanupEventStr(tinyMCE.getAttrib(elm, 'onmouseout')));
+
+		src = convertURL(src, elm, true);
+
+		// Use mce_src if found
+		var mceRealSrc = tinyMCE.getAttrib(elm, 'mce_src');
+		if (mceRealSrc != "") {
+			src = mceRealSrc;
+
+			if (tinyMCE.getParam('convert_urls'))
+				src = convertURL(src, elm, true);
+		}
+
+		if (onmouseoversrc != "" && tinyMCE.getParam('convert_urls'))
+			onmouseoversrc = convertURL(onmouseoversrc, elm, true);
+
+		if (onmouseoutsrc != "" && tinyMCE.getParam('convert_urls'))
+			onmouseoutsrc = convertURL(onmouseoutsrc, elm, true);
+
+		// Setup form data
+		var style = tinyMCE.parseStyle(tinyMCE.getAttrib(elm, "style"));
+
+		// Store away old size
+		orgImageWidth = trimSize(getStyle(elm, 'width'))
+		orgImageHeight = trimSize(getStyle(elm, 'height'));
+
+		formObj.src.value    = src;
+		formObj.alt.value    = tinyMCE.getAttrib(elm, 'alt');
+		formObj.title.value  = tinyMCE.getAttrib(elm, 'title');
+		formObj.border.value = trimSize(getStyle(elm, 'border', 'borderWidth'));
+		formObj.vspace.value = tinyMCE.getAttrib(elm, 'vspace');
+		formObj.hspace.value = tinyMCE.getAttrib(elm, 'hspace');
+		formObj.width.value  = orgImageWidth;
+		formObj.height.value = orgImageHeight;
+		formObj.onmouseoversrc.value = onmouseoversrc;
+		formObj.onmouseoutsrc.value  = onmouseoutsrc;
+		formObj.id.value  = tinyMCE.getAttrib(elm, 'id');
+		formObj.dir.value  = tinyMCE.getAttrib(elm, 'dir');
+		formObj.lang.value  = tinyMCE.getAttrib(elm, 'lang');
+		formObj.longdesc.value  = tinyMCE.getAttrib(elm, 'longdesc');
+		formObj.usemap.value  = tinyMCE.getAttrib(elm, 'usemap');
+		formObj.style.value  = tinyMCE.serializeStyle(style);
+
+		// Select by the values
+		if (tinyMCE.isMSIE)
+			selectByValue(formObj, 'align', getStyle(elm, 'align', 'styleFloat'));
+		else
+			selectByValue(formObj, 'align', getStyle(elm, 'align', 'cssFloat'));
+
+		addClassesToList('classlist', 'advimage_styles');
+
+		selectByValue(formObj, 'classlist', tinyMCE.getAttrib(elm, 'class'));
+		selectByValue(formObj, 'imagelistsrc', src);
+		selectByValue(formObj, 'imagelistover', onmouseoversrc);
+		selectByValue(formObj, 'imagelistout', onmouseoutsrc);
+
+		updateStyle();
+		showPreviewImage(src, true);
+		changeAppearance();
+
+		window.focus();
+	} else
+		addClassesToList('classlist', 'advimage_styles');
+
+	// If option enabled default contrain proportions to checked
+	if (tinyMCE.getParam("advimage_constrain_proportions", true))
+		formObj.constrain.checked = true;
+
+	// Check swap image if valid data
+	if (formObj.onmouseoversrc.value != "" || formObj.onmouseoutsrc.value != "")
+		setSwapImageDisabled(false);
+	else
+		setSwapImageDisabled(true);
+}
+
+function setSwapImageDisabled(state) {
+	var formObj = document.forms[0];
+
+	formObj.onmousemovecheck.checked = !state;
+
+	setBrowserDisabled('overbrowser', state);
+	setBrowserDisabled('outbrowser', state);
+
+	if (formObj.imagelistover)
+		formObj.imagelistover.disabled = state;
+
+	if (formObj.imagelistout)
+		formObj.imagelistout.disabled = state;
+
+	formObj.onmouseoversrc.disabled = state;
+	formObj.onmouseoutsrc.disabled  = state;
+}
+
+function setAttrib(elm, attrib, value) {
+	var formObj = document.forms[0];
+	var valueElm = formObj.elements[attrib];
+
+	if (typeof(value) == "undefined" || value == null) {
+		value = "";
+
+		if (valueElm)
+			value = valueElm.value;
+	}
+
+	if (value != "") {
+		elm.setAttribute(attrib, value);
+
+		if (attrib == "style")
+			attrib = "style.cssText";
+
+		if (attrib == "longdesc")
+			attrib = "longDesc";
+
+		if (attrib == "width") {
+			attrib = "style.width";
+			value = value + "px";
+		}
+
+		if (attrib == "height") {
+			attrib = "style.height";
+			value = value + "px";
+		}
+
+		if (attrib == "class")
+			attrib = "className";
+
+		eval('elm.' + attrib + "=value;");
+	} else
+		elm.removeAttribute(attrib);
+}
+
+function makeAttrib(attrib, value) {
+	var formObj = document.forms[0];
+	var valueElm = formObj.elements[attrib];
+
+	if (typeof(value) == "undefined" || value == null) {
+		value = "";
+
+		if (valueElm)
+			value = valueElm.value;
+	}
+
+	if (value == "")
+		return "";
+
+	// XML encode it
+	value = value.replace(/&/g, '&amp;');
+	value = value.replace(/\"/g, '&quot;');
+	value = value.replace(/</g, '&lt;');
+	value = value.replace(/>/g, '&gt;');
+
+	return ' ' + attrib + '="' + value + '"';
+}
+
+function insertAction() {
+	var inst = tinyMCE.getInstanceById(tinyMCE.getWindowArg('editor_id'));
+	var elm = inst.getFocusElement();
+	var formObj = document.forms[0];
+	var src = formObj.src.value;
+	var onmouseoversrc = formObj.onmouseoversrc.value;
+	var onmouseoutsrc = formObj.onmouseoutsrc.value;
+
+	if (tinyMCE.getParam("accessibility_warnings")) {
+		if (formObj.alt.value == "") {
+			var answer = confirm(tinyMCE.getLang('lang_advimage_missing_alt', '', true));
+			if (answer == true) {
+				formObj.alt.value = " ";
+			}
+		} else {
+			var answer = true;
+		}
+
+		if (!answer)
+			return;
+	}
+
+	if (onmouseoversrc && onmouseoversrc != "")
+		onmouseoversrc = "this.src='" + convertURL(onmouseoversrc, tinyMCE.imgElement) + "';";
+
+	if (onmouseoutsrc && onmouseoutsrc != "")
+		onmouseoutsrc = "this.src='" + convertURL(onmouseoutsrc, tinyMCE.imgElement) + "';";
+
+	if (elm != null && elm.nodeName == "IMG") {
+		setAttrib(elm, 'src', convertURL(src, tinyMCE.imgElement));
+		setAttrib(elm, 'mce_src', src);
+		setAttrib(elm, 'alt');
+		setAttrib(elm, 'title');
+		setAttrib(elm, 'border');
+		setAttrib(elm, 'vspace');
+		setAttrib(elm, 'hspace');
+		setAttrib(elm, 'width');
+		setAttrib(elm, 'height');
+		setAttrib(elm, 'onmouseover', onmouseoversrc);
+		setAttrib(elm, 'onmouseout', onmouseoutsrc);
+		setAttrib(elm, 'id');
+		setAttrib(elm, 'dir');
+		setAttrib(elm, 'lang');
+		setAttrib(elm, 'longdesc');
+		setAttrib(elm, 'usemap');
+		setAttrib(elm, 'style');
+		setAttrib(elm, 'class', getSelectValue(formObj, 'classlist'));
+		setAttrib(elm, 'align', getSelectValue(formObj, 'align'));
+
+		//tinyMCEPopup.execCommand("mceRepaint");
+
+		// Repaint if dimensions changed
+		if (formObj.width.value != orgImageWidth || formObj.height.value != orgImageHeight)
+			inst.repaint();
+
+		// Refresh in old MSIE
+		if (tinyMCE.isMSIE5)
+			elm.outerHTML = elm.outerHTML;
+	} else {
+		var html = "<img";
+
+		html += makeAttrib('src', convertURL(src, tinyMCE.imgElement));
+		html += makeAttrib('mce_src', src);
+		html += makeAttrib('alt');
+		html += makeAttrib('title');
+		html += makeAttrib('border');
+		html += makeAttrib('vspace');
+		html += makeAttrib('hspace');
+		html += makeAttrib('width');
+		html += makeAttrib('height');
+		html += makeAttrib('onmouseover', onmouseoversrc);
+		html += makeAttrib('onmouseout', onmouseoutsrc);
+		html += makeAttrib('id');
+		html += makeAttrib('dir');
+		html += makeAttrib('lang');
+		html += makeAttrib('longdesc');
+		html += makeAttrib('usemap');
+		html += makeAttrib('style');
+		html += makeAttrib('class', getSelectValue(formObj, 'classlist'));
+		html += makeAttrib('align', getSelectValue(formObj, 'align'));
+		html += " />";
+
+		tinyMCEPopup.execCommand("mceInsertContent", false, html);
+	}
+
+	tinyMCE._setEventsEnabled(inst.getBody(), false);
+	tinyMCEPopup.close();
+}
+
+function cancelAction() {
+	tinyMCEPopup.close();
+}
+
+function changeAppearance() {
+	var formObj = document.forms[0];
+	var img = document.getElementById('alignSampleImg');
+
+	if (img) {
+		img.align = formObj.align.value;
+		img.border = formObj.border.value;
+		img.hspace = formObj.hspace.value;
+		img.vspace = formObj.vspace.value;
+	}
+}
+
+function changeMouseMove() {
+	var formObj = document.forms[0];
+
+	setSwapImageDisabled(!formObj.onmousemovecheck.checked);
+}
+
+function updateStyle() {
+	var formObj = document.forms[0];
+	var st = tinyMCE.parseStyle(formObj.style.value);
+
+	if (tinyMCE.getParam('inline_styles', false)) {
+		st['width'] = formObj.width.value == '' ? '' : formObj.width.value + "px";
+		st['height'] = formObj.height.value == '' ? '' : formObj.height.value + "px";
+		st['border-width'] = formObj.border.value == '' ? '' : formObj.border.value + "px";
+		st['margin-top'] = formObj.vspace.value == '' ? '' : formObj.vspace.value + "px";
+		st['margin-bottom'] = formObj.vspace.value == '' ? '' : formObj.vspace.value + "px";
+		st['margin-left'] = formObj.hspace.value == '' ? '' : formObj.hspace.value + "px";
+		st['margin-right'] = formObj.hspace.value == '' ? '' : formObj.hspace.value + "px";
+	} else {
+		st['width'] = st['height'] = st['border-width'] = null;
+
+		if (st['margin-top'] == st['margin-bottom'])
+			st['margin-top'] = st['margin-bottom'] = null;
+
+		if (st['margin-left'] == st['margin-right'])
+			st['margin-left'] = st['margin-right'] = null;
+	}
+
+	formObj.style.value = tinyMCE.serializeStyle(st);
+}
+
+function styleUpdated() {
+	var formObj = document.forms[0];
+	var st = tinyMCE.parseStyle(formObj.style.value);
+
+	if (st['width'])
+		formObj.width.value = st['width'].replace('px', '');
+
+	if (st['height'])
+		formObj.height.value = st['height'].replace('px', '');
+
+	if (st['margin-top'] && st['margin-top'] == st['margin-bottom'])
+		formObj.vspace.value = st['margin-top'].replace('px', '');
+
+	if (st['margin-left'] && st['margin-left'] == st['margin-right'])
+		formObj.hspace.value = st['margin-left'].replace('px', '');
+
+	if (st['border-width'])
+		formObj.border.value = st['border-width'].replace('px', '');
+}
+
+function changeHeight() {
+	var formObj = document.forms[0];
+
+	if (!formObj.constrain.checked || !preloadImg) {
+		updateStyle();
+		return;
+	}
+
+	if (formObj.width.value == "" || formObj.height.value == "")
+		return;
+
+	var temp = (formObj.width.value / preloadImg.width) * preloadImg.height;
+	formObj.height.value = temp.toFixed(0);
+	updateStyle();
+}
+
+function changeWidth() {
+	var formObj = document.forms[0];
+
+	if (!formObj.constrain.checked || !preloadImg) {
+		updateStyle();
+		return;
+	}
+
+	if (formObj.width.value == "" || formObj.height.value == "")
+		return;
+
+	var temp = (formObj.height.value / preloadImg.height) * preloadImg.width;
+	formObj.width.value = temp.toFixed(0);
+	updateStyle();
+}
+
+function onSelectMainImage(target_form_element, name, value) {
+	var formObj = document.forms[0];
+
+	formObj.alt.value = name;
+	formObj.title.value = name;
+
+	resetImageData();
+	showPreviewImage(formObj.elements[target_form_element].value, false);
+}
+
+function showPreviewImage(src, start) {
+	var formObj = document.forms[0];
+
+	selectByValue(document.forms[0], 'imagelistsrc', src);
+
+	var elm = document.getElementById('prev');
+	var src = src == "" ? src : tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'], src);
+
+	if (!start && tinyMCE.getParam("advimage_update_dimensions_onchange", true))
+		resetImageData();
+
+	if (src == "")
+		elm.innerHTML = "";
+	else
+		elm.innerHTML = '<img src="' + src + '" border="0" />'
+
+	getImageData(src);
+}
+
+function getImageData(src) {
+	preloadImg = new Image();
+
+	tinyMCE.addEvent(preloadImg, "load", updateImageData);
+	tinyMCE.addEvent(preloadImg, "error", resetImageData);
+
+	preloadImg.src = src;
+}
+
+function updateImageData() {
+	var formObj = document.forms[0];
+
+	if (formObj.width.value == "")
+		formObj.width.value = preloadImg.width;
+
+	if (formObj.height.value == "")
+		formObj.height.value = preloadImg.height;
+
+	updateStyle();
+}
+
+function resetImageData() {
+	var formObj = document.forms[0];
+	formObj.width.value = formObj.height.value = "";	
+}
+
+function getSelectValue(form_obj, field_name) {
+	var elm = form_obj.elements[field_name];
+
+	if (elm == null || elm.options == null)
+		return "";
+
+	return elm.options[elm.selectedIndex].value;
+}
+
+function getImageListHTML(elm_id, target_form_element, onchange_func) {
+	if (typeof(tinyMCEImageList) == "undefined" || tinyMCEImageList.length == 0)
+		return "";
+
+	var html = "";
+
+	html += '<select id="' + elm_id + '" name="' + elm_id + '"';
+	html += ' class="mceImageList" onfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="this.form.' + target_form_element + '.value=';
+	html += 'this.options[this.selectedIndex].value;';
+
+	if (typeof(onchange_func) != "undefined")
+		html += onchange_func + '(\'' + target_form_element + '\',this.options[this.selectedIndex].text,this.options[this.selectedIndex].value);';
+
+	html += '"><option value="">---</option>';
+
+	for (var i=0; i<tinyMCEImageList.length; i++)
+		html += '<option value="' + tinyMCEImageList[i][1] + '">' + tinyMCEImageList[i][0] + '</option>';
+
+	html += '</select>';
+
+	return html;
+
+	// tinyMCE.debug('-- image list start --', html, '-- image list end --');
+}
+
+// While loading
+preinit();

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advimage/langs/en.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advimage/langs/en.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advimage/langs/en.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,27 @@
+// UK lang variables
+
+tinyMCE.addToLang('advimage',{
+tab_general : 'General',
+tab_appearance : 'Appearance',
+tab_advanced : 'Advanced',
+general : 'General',
+title : 'Title',
+preview : 'Preview',
+constrain_proportions : 'Constrain proportions',
+langdir : 'Language direction',
+langcode : 'Language code',
+long_desc : 'Long description link',
+style : 'Style',
+classes : 'Classes',
+ltr : 'Left to right',
+rtl : 'Right to left',
+id : 'Id',
+image_map : 'Image map',
+swap_image : 'Swap image',
+alt_image : 'Alternative image',
+mouseover : 'for mouse over',
+mouseout : 'for mouse out',
+misc : 'Miscellaneous',
+example_img : 'Appearance&nbsp;preview&nbsp;image',
+missing_alt : 'Are you sure you want to continue without including an Image Description? Without  it the image may not be accessible to some users with disabilities, or to those using a text browser, or browsing the Web with images turned off.'
+});

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advimage/readme.txt
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advimage/readme.txt	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advimage/readme.txt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1 @@
+Check the TinyMCE documentation for details on this plugin.

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advlink/css/advlink.css
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advlink/css/advlink.css	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advlink/css/advlink.css	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,35 @@
+/* CSS file for advimage plugin popup */
+
+.mceLinkList, .mceAnchorList, #targetlist {
+	width: 280px;
+}
+
+.mceActionPanel {
+	margin-top: 7px;
+}
+
+.panel_wrapper div.current {
+	height: 320px;
+}
+
+#classlist, #title, #href {
+	width: 280px;
+}
+
+#popupurl, #popupname {
+	width: 200px;
+}
+
+#popupwidth, #popupheight, #popupleft, #popuptop {
+	width: 30px;
+	vertical-align: middle;
+	text-align: center;
+}
+
+#id, #style, #classes, #target, #dir, #hreflang, #lang, #charset, #type, #rel, #rev, #tabindex, #accesskey {
+	width: 200px;
+}
+
+#events_panel input {
+	width: 200px;
+}

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advlink/editor_plugin.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advlink/editor_plugin.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advlink/editor_plugin.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1 @@
+tinyMCE.importPluginLanguagePack('advlink','en,tr,de,sv,zh_cn,cs,fa,fr_ca,fr,pl,pt_br,nl,he,nb,ru,ru_KOI8-R,ru_UTF-8,nn,cy,es,is,zh_tw,zh_tw_utf8,sk,da');var TinyMCE_AdvancedLinkPlugin={getInfo:function(){return{longname:'Advanced link',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_advlink.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};},initInstance:function(inst){inst.addShortcut('ctrl','k','lang_advlink_desc','mceAdvLink');},getControlHTML:function(cn){switch(cn){case"link":return tinyMCE.getButtonHTML(cn,'lang_link_desc','{$themeurl}/images/link.gif','mceAdvLink');}return"";},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case"mceAdvLink":var anySelection=false;var inst=tinyMCE.getInstanceById(editor_id);var focusElm=inst.getFocusElement();var selectedText=inst.selection.getSelectedText();if(tinyMCE.selectedElement)anySelection=(tinyMCE.selectedElement.nodeName.toLowerCase()=="img")||(selectedText&&selectedText.length>0);if(anySelection||(focusElm!=null&&focusElm.nodeName=="A")){var template=new Array();template['file']='../../plugins/advlink/link.htm';template['width']=480;template['height']=400;template['width']+=tinyMCE.getLang('lang_advlink_delta_width',0);template['height']+=tinyMCE.getLang('lang_advlink_delta_height',0);tinyMCE.openWindow(template,{editor_id:editor_id,inline:"yes"});}return true;}return false;},handleNodeChange:function(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){if(node==null)return;do{if(node.nodeName=="A"&&tinyMCE.getAttrib(node,'href')!=""){tinyMCE.switchClass(editor_id+'_advlink','mceButtonSelected');return true;}}while((node=node.parentNode));if(any_selection){tinyMCE.switchClass(editor_id+'_advlink','mceButtonNormal');return true;}tinyMCE.switchClass(editor_id+'_advlink','mceButtonDisabled');return true;}};tinyMCE.addPlugin("advlink",TinyMCE_AdvancedLinkPlugin);
\ No newline at end of file

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advlink/editor_plugin_src.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advlink/editor_plugin_src.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advlink/editor_plugin_src.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,90 @@
+/**
+ * $RCSfile: editor_plugin_src.js,v $
+ * $Revision: 1.24 $
+ * $Date: 2006/02/10 16:29:38 $
+ *
+ * @author Moxiecode
+ * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
+ */
+
+/* Import plugin specific language pack */
+tinyMCE.importPluginLanguagePack('advlink', 'en,tr,de,sv,zh_cn,cs,fa,fr_ca,fr,pl,pt_br,nl,he,nb,ru,ru_KOI8-R,ru_UTF-8,nn,cy,es,is,zh_tw,zh_tw_utf8,sk,da');
+
+var TinyMCE_AdvancedLinkPlugin = {
+	getInfo : function() {
+		return {
+			longname : 'Advanced link',
+			author : 'Moxiecode Systems',
+			authorurl : 'http://tinymce.moxiecode.com',
+			infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_advlink.html',
+			version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
+		};
+	},
+
+	initInstance : function(inst) {
+		inst.addShortcut('ctrl', 'k', 'lang_advlink_desc', 'mceAdvLink');
+	},
+
+	getControlHTML : function(cn) {
+		switch (cn) {
+			case "link":
+				return tinyMCE.getButtonHTML(cn, 'lang_link_desc', '{$themeurl}/images/link.gif', 'mceAdvLink');
+		}
+
+		return "";
+	},
+
+	execCommand : function(editor_id, element, command, user_interface, value) {
+		switch (command) {
+			case "mceAdvLink":
+				var anySelection = false;
+				var inst = tinyMCE.getInstanceById(editor_id);
+				var focusElm = inst.getFocusElement();
+				var selectedText = inst.selection.getSelectedText();
+
+				if (tinyMCE.selectedElement)
+					anySelection = (tinyMCE.selectedElement.nodeName.toLowerCase() == "img") || (selectedText && selectedText.length > 0);
+
+				if (anySelection || (focusElm != null && focusElm.nodeName == "A")) {
+					var template = new Array();
+
+					template['file']   = '../../plugins/advlink/link.htm';
+					template['width']  = 480;
+					template['height'] = 400;
+
+					// Language specific width and height addons
+					template['width']  += tinyMCE.getLang('lang_advlink_delta_width', 0);
+					template['height'] += tinyMCE.getLang('lang_advlink_delta_height', 0);
+
+					tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes"});
+				}
+
+				return true;
+		}
+
+		return false;
+	},
+
+	handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {
+		if (node == null)
+			return;
+
+		do {
+			if (node.nodeName == "A" && tinyMCE.getAttrib(node, 'href') != "") {
+				tinyMCE.switchClass(editor_id + '_advlink', 'mceButtonSelected');
+				return true;
+			}
+		} while ((node = node.parentNode));
+
+		if (any_selection) {
+			tinyMCE.switchClass(editor_id + '_advlink', 'mceButtonNormal');
+			return true;
+		}
+
+		tinyMCE.switchClass(editor_id + '_advlink', 'mceButtonDisabled');
+
+		return true;
+	}
+};
+
+tinyMCE.addPlugin("advlink", TinyMCE_AdvancedLinkPlugin);

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advlink/jscripts/functions.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advlink/jscripts/functions.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advlink/jscripts/functions.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,568 @@
+/* Functions for the advlink plugin popup */
+
+var templates = {
+	"window.open" : "window.open('${url}','${target}','${options}')"
+};
+
+function preinit() {
+	// Initialize
+	tinyMCE.setWindowArg('mce_windowresize', false);
+
+	// Import external list url javascript
+	var url = tinyMCE.getParam("external_link_list_url");
+	if (url != null) {
+		// Fix relative
+		if (url.charAt(0) != '/' && url.indexOf('://') == -1)
+			url = tinyMCE.documentBasePath + "/" + url;
+
+		document.write('<sc'+'ript language="javascript" type="text/javascript" src="' + url + '"></sc'+'ript>');
+	}
+}
+
+function changeClass() {
+	var formObj = document.forms[0];
+	formObj.classes.value = getSelectValue(formObj, 'classlist');
+}
+
+function init() {
+	tinyMCEPopup.resizeToInnerSize();
+
+	var formObj = document.forms[0];
+	var inst = tinyMCE.getInstanceById(tinyMCE.getWindowArg('editor_id'));
+	var elm = inst.getFocusElement();
+	var action = "insert";
+	var html;
+
+	document.getElementById('hrefbrowsercontainer').innerHTML = getBrowserHTML('hrefbrowser','href','file','advlink');
+	document.getElementById('popupurlbrowsercontainer').innerHTML = getBrowserHTML('popupurlbrowser','popupurl','file','advlink');
+	document.getElementById('linklisthrefcontainer').innerHTML = getLinkListHTML('linklisthref','href');
+	document.getElementById('anchorlistcontainer').innerHTML = getAnchorListHTML('anchorlist','href');
+	document.getElementById('targetlistcontainer').innerHTML = getTargetListHTML('targetlist','target');
+
+	// Link list
+	html = getLinkListHTML('linklisthref','href');
+	if (html == "")
+		document.getElementById("linklisthrefrow").style.display = 'none';
+	else
+		document.getElementById("linklisthrefcontainer").innerHTML = html;
+
+	// Resize some elements
+	if (isVisible('hrefbrowser'))
+		document.getElementById('href').style.width = '260px';
+
+	if (isVisible('popupurlbrowser'))
+		document.getElementById('popupurl').style.width = '180px';
+
+	elm = tinyMCE.getParentElement(elm, "a");
+	if (elm != null && elm.nodeName == "A")
+		action = "update";
+
+	formObj.insert.value = tinyMCE.getLang('lang_' + action, 'Insert', true); 
+
+	setPopupControlsDisabled(true);
+
+	if (action == "update") {
+		var href = tinyMCE.getAttrib(elm, 'href');
+
+		href = convertURL(href, elm, true);
+
+		// Use mce_href if found
+		var mceRealHref = tinyMCE.getAttrib(elm, 'mce_href');
+		if (mceRealHref != "") {
+			href = mceRealHref;
+
+			if (tinyMCE.getParam('convert_urls'))
+				href = convertURL(href, elm, true);
+		}
+
+		var onclick = tinyMCE.cleanupEventStr(tinyMCE.getAttrib(elm, 'onclick'));
+
+		// Setup form data
+		setFormValue('href', href);
+		setFormValue('title', tinyMCE.getAttrib(elm, 'title'));
+		setFormValue('id', tinyMCE.getAttrib(elm, 'id'));
+		setFormValue('style', tinyMCE.serializeStyle(tinyMCE.parseStyle(tinyMCE.getAttrib(elm, "style"))));
+		setFormValue('rel', tinyMCE.getAttrib(elm, 'rel'));
+		setFormValue('rev', tinyMCE.getAttrib(elm, 'rev'));
+		setFormValue('charset', tinyMCE.getAttrib(elm, 'charset'));
+		setFormValue('hreflang', tinyMCE.getAttrib(elm, 'hreflang'));
+		setFormValue('dir', tinyMCE.getAttrib(elm, 'dir'));
+		setFormValue('lang', tinyMCE.getAttrib(elm, 'lang'));
+		setFormValue('tabindex', tinyMCE.getAttrib(elm, 'tabindex', typeof(elm.tabindex) != "undefined" ? elm.tabindex : ""));
+		setFormValue('accesskey', tinyMCE.getAttrib(elm, 'accesskey', typeof(elm.accesskey) != "undefined" ? elm.accesskey : ""));
+		setFormValue('type', tinyMCE.getAttrib(elm, 'type'));
+		setFormValue('onfocus', tinyMCE.cleanupEventStr(tinyMCE.getAttrib(elm, 'onfocus')));
+		setFormValue('onblur', tinyMCE.cleanupEventStr(tinyMCE.getAttrib(elm, 'onblur')));
+		setFormValue('onclick', onclick);
+		setFormValue('ondblclick', tinyMCE.cleanupEventStr(tinyMCE.getAttrib(elm, 'ondblclick')));
+		setFormValue('onmousedown', tinyMCE.cleanupEventStr(tinyMCE.getAttrib(elm, 'onmousedown')));
+		setFormValue('onmouseup', tinyMCE.cleanupEventStr(tinyMCE.getAttrib(elm, 'onmouseup')));
+		setFormValue('onmouseover', tinyMCE.cleanupEventStr(tinyMCE.getAttrib(elm, 'onmouseover')));
+		setFormValue('onmousemove', tinyMCE.cleanupEventStr(tinyMCE.getAttrib(elm, 'onmousemove')));
+		setFormValue('onmouseout', tinyMCE.cleanupEventStr(tinyMCE.getAttrib(elm, 'onmouseout')));
+		setFormValue('onkeypress', tinyMCE.cleanupEventStr(tinyMCE.getAttrib(elm, 'onkeypress')));
+		setFormValue('onkeydown', tinyMCE.cleanupEventStr(tinyMCE.getAttrib(elm, 'onkeydown')));
+		setFormValue('onkeyup', tinyMCE.cleanupEventStr(tinyMCE.getAttrib(elm, 'onkeyup')));
+		setFormValue('target', tinyMCE.getAttrib(elm, 'target'));
+		setFormValue('classes', tinyMCE.getAttrib(elm, 'class'));
+
+		// Parse onclick data
+		if (onclick != null && onclick.indexOf('window.open') != -1)
+			parseWindowOpen(onclick);
+		else
+			parseFunction(onclick);
+
+		// Select by the values
+		selectByValue(formObj, 'dir', tinyMCE.getAttrib(elm, 'dir'));
+		selectByValue(formObj, 'rel', tinyMCE.getAttrib(elm, 'rel'));
+		selectByValue(formObj, 'rev', tinyMCE.getAttrib(elm, 'rev'));
+		selectByValue(formObj, 'linklisthref', href);
+
+		if (href.charAt(0) == '#')
+			selectByValue(formObj, 'anchorlist', href);
+
+		addClassesToList('classlist', 'advlink_styles');
+
+		selectByValue(formObj, 'classlist', tinyMCE.getAttrib(elm, 'class'), true);
+		selectByValue(formObj, 'targetlist', tinyMCE.getAttrib(elm, 'target'), true);
+	} else
+		addClassesToList('classlist', 'advlink_styles');
+
+	window.focus();
+}
+
+function setFormValue(name, value) {
+	document.forms[0].elements[name].value = value;
+}
+
+function convertURL(url, node, on_save) {
+	return eval("tinyMCEPopup.windowOpener." + tinyMCE.settings['urlconverter_callback'] + "(url, node, on_save);");
+}
+
+function parseWindowOpen(onclick) {
+	var formObj = document.forms[0];
+
+	// Preprocess center code
+	if (onclick.indexOf('return false;') != -1) {
+		formObj.popupreturn.checked = true;
+		onclick = onclick.replace('return false;', '');
+	} else
+		formObj.popupreturn.checked = false;
+
+	var onClickData = parseLink(onclick);
+
+	if (onClickData != null) {
+		formObj.ispopup.checked = true;
+		setPopupControlsDisabled(false);
+
+		var onClickWindowOptions = parseOptions(onClickData['options']);
+		var url = onClickData['url'];
+
+		if (tinyMCE.getParam('convert_urls'))
+			url = convertURL(url, null, true);
+
+		formObj.popupname.value = onClickData['target'];
+		formObj.popupurl.value = url;
+		formObj.popupwidth.value = getOption(onClickWindowOptions, 'width');
+		formObj.popupheight.value = getOption(onClickWindowOptions, 'height');
+
+		formObj.popupleft.value = getOption(onClickWindowOptions, 'left');
+		formObj.popuptop.value = getOption(onClickWindowOptions, 'top');
+
+		if (formObj.popupleft.value.indexOf('screen') != -1)
+			formObj.popupleft.value = "c";
+
+		if (formObj.popuptop.value.indexOf('screen') != -1)
+			formObj.popuptop.value = "c";
+
+		formObj.popuplocation.checked = getOption(onClickWindowOptions, 'location') == "yes";
+		formObj.popupscrollbars.checked = getOption(onClickWindowOptions, 'scrollbars') == "yes";
+		formObj.popupmenubar.checked = getOption(onClickWindowOptions, 'menubar') == "yes";
+		formObj.popupresizable.checked = getOption(onClickWindowOptions, 'resizable') == "yes";
+		formObj.popuptoolbar.checked = getOption(onClickWindowOptions, 'toolbar') == "yes";
+		formObj.popupstatus.checked = getOption(onClickWindowOptions, 'status') == "yes";
+		formObj.popupdependent.checked = getOption(onClickWindowOptions, 'dependent') == "yes";
+
+		buildOnClick();
+	}
+}
+
+function parseFunction(onclick) {
+	var formObj = document.forms[0];
+	var onClickData = parseLink(onclick);
+
+	// TODO: Add stuff here
+}
+
+function getOption(opts, name) {
+	return typeof(opts[name]) == "undefined" ? "" : opts[name];
+}
+
+function setPopupControlsDisabled(state) {
+	var formObj = document.forms[0];
+
+	formObj.popupname.disabled = state;
+	formObj.popupurl.disabled = state;
+	formObj.popupwidth.disabled = state;
+	formObj.popupheight.disabled = state;
+	formObj.popupleft.disabled = state;
+	formObj.popuptop.disabled = state;
+	formObj.popuplocation.disabled = state;
+	formObj.popupscrollbars.disabled = state;
+	formObj.popupmenubar.disabled = state;
+	formObj.popupresizable.disabled = state;
+	formObj.popuptoolbar.disabled = state;
+	formObj.popupstatus.disabled = state;
+	formObj.popupreturn.disabled = state;
+	formObj.popupdependent.disabled = state;
+
+	setBrowserDisabled('popupurlbrowser', state);
+}
+
+function parseLink(link) {
+	link = link.replace(new RegExp('&#39;', 'g'), "'");
+
+	var fnName = link.replace(new RegExp("\\s*([A-Za-z0-9\.]*)\\s*\\(.*", "gi"), "$1");
+
+	// Is function name a template function
+	var template = templates[fnName];
+	if (template) {
+		// Build regexp
+		var variableNames = template.match(new RegExp("'?\\$\\{[A-Za-z0-9\.]*\\}'?", "gi"));
+		var regExp = "\\s*[A-Za-z0-9\.]*\\s*\\(";
+		var replaceStr = "";
+		for (var i=0; i<variableNames.length; i++) {
+			// Is string value
+			if (variableNames[i].indexOf("'${") != -1)
+				regExp += "'(.*)'";
+			else // Number value
+				regExp += "([0-9]*)";
+
+			replaceStr += "$" + (i+1);
+
+			// Cleanup variable name
+			variableNames[i] = variableNames[i].replace(new RegExp("[^A-Za-z0-9]", "gi"), "");
+
+			if (i != variableNames.length-1) {
+				regExp += "\\s*,\\s*";
+				replaceStr += "<delim>";
+			} else
+				regExp += ".*";
+		}
+
+		regExp += "\\);?";
+
+		// Build variable array
+		var variables = new Array();
+		variables["_function"] = fnName;
+		var variableValues = link.replace(new RegExp(regExp, "gi"), replaceStr).split('<delim>');
+		for (var i=0; i<variableNames.length; i++)
+			variables[variableNames[i]] = variableValues[i];
+
+		return variables;
+	}
+
+	return null;
+}
+
+function parseOptions(opts) {
+	if (opts == null || opts == "")
+		return new Array();
+
+	// Cleanup the options
+	opts = opts.toLowerCase();
+	opts = opts.replace(/;/g, ",");
+	opts = opts.replace(/[^0-9a-z=,]/g, "");
+
+	var optionChunks = opts.split(',');
+	var options = new Array();
+
+	for (var i=0; i<optionChunks.length; i++) {
+		var parts = optionChunks[i].split('=');
+
+		if (parts.length == 2)
+			options[parts[0]] = parts[1];
+	}
+
+	return options;
+}
+
+function buildOnClick() {
+	var formObj = document.forms[0];
+
+	if (!formObj.ispopup.checked) {
+		formObj.onclick.value = "";
+		return;
+	}
+
+	var onclick = "window.open('";
+	var url = formObj.popupurl.value;
+
+	if (tinyMCE.getParam('convert_urls'))
+		url = convertURL(url, null, true);
+
+	onclick += url + "','";
+	onclick += formObj.popupname.value + "','";
+
+	if (formObj.popuplocation.checked)
+		onclick += "location=yes,";
+
+	if (formObj.popupscrollbars.checked)
+		onclick += "scrollbars=yes,";
+
+	if (formObj.popupmenubar.checked)
+		onclick += "menubar=yes,";
+
+	if (formObj.popupresizable.checked)
+		onclick += "resizable=yes,";
+
+	if (formObj.popuptoolbar.checked)
+		onclick += "toolbar=yes,";
+
+	if (formObj.popupstatus.checked)
+		onclick += "status=yes,";
+
+	if (formObj.popupdependent.checked)
+		onclick += "dependent=yes,";
+
+	if (formObj.popupwidth.value != "")
+		onclick += "width=" + formObj.popupwidth.value + ",";
+
+	if (formObj.popupheight.value != "")
+		onclick += "height=" + formObj.popupheight.value + ",";
+
+	if (formObj.popupleft.value != "") {
+		if (formObj.popupleft.value != "c")
+			onclick += "left=" + formObj.popupleft.value + ",";
+		else
+			onclick += "left='+(screen.availWidth/2-" + (formObj.popupwidth.value/2) + ")+',";
+	}
+
+	if (formObj.popuptop.value != "") {
+		if (formObj.popuptop.value != "c")
+			onclick += "top=" + formObj.popuptop.value + ",";
+		else
+			onclick += "top='+(screen.availHeight/2-" + (formObj.popupheight.value/2) + ")+',";
+	}
+
+	if (onclick.charAt(onclick.length-1) == ',')
+		onclick = onclick.substring(0, onclick.length-1);
+
+	onclick += "');";
+
+	if (formObj.popupreturn.checked)
+		onclick += "return false;";
+
+	// tinyMCE.debug(onclick);
+
+	formObj.onclick.value = onclick;
+
+	if (formObj.href.value == "")
+		formObj.href.value = url;
+}
+
+function setAttrib(elm, attrib, value) {
+	var formObj = document.forms[0];
+	var valueElm = formObj.elements[attrib.toLowerCase()];
+
+	if (typeof(value) == "undefined" || value == null) {
+		value = "";
+
+		if (valueElm)
+			value = valueElm.value;
+	}
+
+	if (value != "") {
+		elm.setAttribute(attrib.toLowerCase(), value);
+
+		if (attrib == "style")
+			attrib = "style.cssText";
+
+		if (attrib.substring(0, 2) == 'on')
+			value = 'return true;' + value;
+
+		if (attrib == "class")
+			attrib = "className";
+
+		eval('elm.' + attrib + "=value;");
+	} else
+		elm.removeAttribute(attrib);
+}
+
+function getAnchorListHTML(id, target) {
+	var inst = tinyMCE.getInstanceById(tinyMCE.getWindowArg('editor_id'));
+	var nodes = inst.getBody().getElementsByTagName("a");
+
+	var html = "";
+
+	html += '<select id="' + id + '" name="' + id + '" class="mceAnchorList" onfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="this.form.' + target + '.value=';
+	html += 'this.options[this.selectedIndex].value;">';
+	html += '<option value="">---</option>';
+
+	for (var i=0; i<nodes.length; i++) {
+		if ((name = tinyMCE.getAttrib(nodes[i], "name")) != "")
+			html += '<option value="#' + name + '">' + name + '</option>';
+	}
+
+	html += '</select>';
+
+	return html;
+}
+
+function insertAction() {
+	var inst = tinyMCE.getInstanceById(tinyMCE.getWindowArg('editor_id'));
+	var elm = inst.getFocusElement();
+
+	elm = tinyMCE.getParentElement(elm, "a");
+
+	tinyMCEPopup.execCommand("mceBeginUndoLevel");
+
+	// Create new anchor elements
+	if (elm == null) {
+		if (tinyMCE.isSafari)
+			tinyMCEPopup.execCommand("mceInsertContent", false, '<a href="#mce_temp_url#">' + inst.selection.getSelectedHTML() + '</a>');
+		else
+			tinyMCEPopup.execCommand("createlink", false, "#mce_temp_url#");
+
+		var elementArray = tinyMCE.getElementsByAttributeValue(inst.getBody(), "a", "href", "#mce_temp_url#");
+		for (var i=0; i<elementArray.length; i++) {
+			var elm = elementArray[i];
+
+			// Move cursor behind the new anchor
+			if (tinyMCE.isGecko) {
+				var sp = inst.getDoc().createTextNode(" ");
+
+				if (elm.nextSibling)
+					elm.parentNode.insertBefore(sp, elm.nextSibling);
+				else
+					elm.parentNode.appendChild(sp);
+
+				// Set range after link
+				var rng = inst.getDoc().createRange();
+				rng.setStartAfter(elm);
+				rng.setEndAfter(elm);
+
+				// Update selection
+				var sel = inst.getSel();
+				sel.removeAllRanges();
+				sel.addRange(rng);
+			}
+
+			setAllAttribs(elm);
+		}
+	} else
+		setAllAttribs(elm);
+
+	tinyMCE._setEventsEnabled(inst.getBody(), false);
+	tinyMCEPopup.execCommand("mceEndUndoLevel");
+	tinyMCEPopup.close();
+}
+
+function setAllAttribs(elm) {
+	var formObj = document.forms[0];
+	var href = formObj.href.value;
+	var target = getSelectValue(formObj, 'targetlist');
+
+	// Make anchors absolute
+	if (href.charAt(0) == '#' && tinyMCE.getParam('convert_urls'))
+		href = tinyMCE.settings['document_base_url'] + href;
+
+	setAttrib(elm, 'href', convertURL(href, elm));
+	setAttrib(elm, 'mce_href', href);
+	setAttrib(elm, 'title');
+	setAttrib(elm, 'target', target == '_self' ? '' : target);
+	setAttrib(elm, 'id');
+	setAttrib(elm, 'style');
+	setAttrib(elm, 'class', getSelectValue(formObj, 'classlist'));
+	setAttrib(elm, 'rel');
+	setAttrib(elm, 'rev');
+	setAttrib(elm, 'charset');
+	setAttrib(elm, 'hreflang');
+	setAttrib(elm, 'dir');
+	setAttrib(elm, 'lang');
+	setAttrib(elm, 'tabindex');
+	setAttrib(elm, 'accesskey');
+	setAttrib(elm, 'type');
+	setAttrib(elm, 'onfocus');
+	setAttrib(elm, 'onblur');
+	setAttrib(elm, 'onclick');
+	setAttrib(elm, 'ondblclick');
+	setAttrib(elm, 'onmousedown');
+	setAttrib(elm, 'onmouseup');
+	setAttrib(elm, 'onmouseover');
+	setAttrib(elm, 'onmousemove');
+	setAttrib(elm, 'onmouseout');
+	setAttrib(elm, 'onkeypress');
+	setAttrib(elm, 'onkeydown');
+	setAttrib(elm, 'onkeyup');
+
+	// Refresh in old MSIE
+	if (tinyMCE.isMSIE5)
+		elm.outerHTML = elm.outerHTML;
+}
+
+function getSelectValue(form_obj, field_name) {
+	var elm = form_obj.elements[field_name];
+
+	if (elm == null || elm.options == null)
+		return "";
+
+	return elm.options[elm.selectedIndex].value;
+}
+
+function getLinkListHTML(elm_id, target_form_element, onchange_func) {
+	if (typeof(tinyMCELinkList) == "undefined" || tinyMCELinkList.length == 0)
+		return "";
+
+	var html = "";
+
+	html += '<select id="' + elm_id + '" name="' + elm_id + '"';
+	html += ' class="mceLinkList" onfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="this.form.' + target_form_element + '.value=';
+	html += 'this.options[this.selectedIndex].value;';
+
+	if (typeof(onchange_func) != "undefined")
+		html += onchange_func + '(\'' + target_form_element + '\',this.options[this.selectedIndex].text,this.options[this.selectedIndex].value);';
+
+	html += '"><option value="">---</option>';
+
+	for (var i=0; i<tinyMCELinkList.length; i++)
+		html += '<option value="' + tinyMCELinkList[i][1] + '">' + tinyMCELinkList[i][0] + '</option>';
+
+	html += '</select>';
+
+	return html;
+
+	// tinyMCE.debug('-- image list start --', html, '-- image list end --');
+}
+
+function getTargetListHTML(elm_id, target_form_element) {
+	var targets = tinyMCE.getParam('theme_advanced_link_targets', '').split(';');
+	var html = '';
+
+	html += '<select id="' + elm_id + '" name="' + elm_id + '" onfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="this.form.' + target_form_element + '.value=';
+	html += 'this.options[this.selectedIndex].value;">';
+
+	html += '<option value="_self">' + tinyMCE.getLang('lang_advlink_target_same') + '</option>';
+	html += '<option value="_blank">' + tinyMCE.getLang('lang_advlink_target_blank') + ' (_blank)</option>';
+	html += '<option value="_parent">' + tinyMCE.getLang('lang_advlink_target_parent') + ' (_parent)</option>';
+	html += '<option value="_top">' + tinyMCE.getLang('lang_advlink_target_top') + ' (_top)</option>';
+
+	for (var i=0; i<targets.length; i++) {
+		var key, value;
+
+		if (targets[i] == "")
+			continue;
+
+		key = targets[i].split('=')[0];
+		value = targets[i].split('=')[1];
+
+		html += '<option value="' + key + '">' + value + ' (' + key + ')</option>';
+	}
+
+	html += '</select>';
+
+	return html;
+}
+
+// While loading
+preinit();

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advlink/langs/en.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advlink/langs/en.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advlink/langs/en.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,46 @@
+// UK lang variables
+
+tinyMCE.addToLang('advlink',{
+general_tab : 'General',
+popup_tab : 'Popup',
+events_tab : 'Events',
+advanced_tab : 'Advanced',
+general_props : 'General properties',
+popup_props : 'Popup properties',
+event_props : 'Events',
+advanced_props : 'Advanced properties',
+popup_opts : 'Options',
+anchor_names : 'Anchors',
+target_same : 'Open in this window / frame',
+target_parent : 'Open in parent window / frame',
+target_top : 'Open in top frame (replaces all frames)',
+target_blank : 'Open in new window',
+popup : 'Javascript popup',
+popup_url : 'Popup URL',
+popup_name : 'Window name',
+popup_return : 'Insert \'return false\'',
+popup_scrollbars : 'Show scrollbars',
+popup_statusbar : 'Show status bar',
+popup_toolbar : 'Show toolbars',
+popup_menubar : 'Show menu bar',
+popup_location : 'Show location bar',
+popup_resizable : 'Make window resizable',
+popup_dependent : 'Dependent (Mozilla/Firefox only)',
+popup_size : 'Size',
+popup_position : 'Position (X/Y)',
+id : 'Id',
+style: 'Style',
+classes : 'Classes',
+target_name : 'Target name',
+langdir : 'Language direction',
+target_langcode : 'Target language',
+langcode : 'Language code',
+encoding : 'Target character encoding',
+mime : 'Target MIME type',
+rel : 'Relationship page to target',
+rev : 'Relationship target to page',
+tabindex : 'Tabindex',
+accesskey : 'Accesskey',
+ltr : 'Left to right',
+rtl : 'Right to left'
+});

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advlink/link.htm
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advlink/link.htm	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advlink/link.htm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,334 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+	<title>{$lang_insert_link_title}</title>
+	<script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
+	<script language="javascript" type="text/javascript" src="../../utils/mctabs.js"></script>
+	<script language="javascript" type="text/javascript" src="../../utils/form_utils.js"></script>
+	<script language="javascript" type="text/javascript" src="jscripts/functions.js"></script>
+	<link href="css/advlink.css" rel="stylesheet" type="text/css" />
+	<base target="_self" />
+</head>
+<body id="advlink" onload="tinyMCEPopup.executeOnLoad('init();');" style="display: none">
+    <form onsubmit="insertAction();return false;" action="#">
+		<div class="tabs">
+			<ul>
+				<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{$lang_advlink_general_tab}</a></span></li>
+				<li id="popup_tab"><span><a href="javascript:mcTabs.displayTab('popup_tab','popup_panel');" onmousedown="return false;">{$lang_advlink_popup_tab}</a></span></li>
+				<li id="events_tab"><span><a href="javascript:mcTabs.displayTab('events_tab','events_panel');" onmousedown="return false;">{$lang_advlink_events_tab}</a></span></li>
+				<li id="advanced_tab"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{$lang_advlink_advanced_tab}</a></span></li>
+			</ul>
+		</div>
+
+		<div class="panel_wrapper">
+			<div id="general_panel" class="panel current">
+				<fieldset>
+					<legend>{$lang_advlink_general_props}</legend>
+
+					<table border="0" cellpadding="4" cellspacing="0">
+						<tr>
+						  <td nowrap="nowrap"><label id="hreflabel" for="href">{$lang_insert_link_url}</label></td>
+						  <td><table border="0" cellspacing="0" cellpadding="0">
+								<tr>
+								  <td><input id="href" name="href" type="text" value="" onchange="selectByValue(this.form,'linklisthref',this.value);" /></td>
+								  <td id="hrefbrowsercontainer">&nbsp;</td>
+								</tr>
+							  </table></td>
+						</tr>
+						<tr id="linklisthrefrow">
+							<td class="column1"><label for="linklisthref">{$lang_link_list}</label></td>
+							<td colspan="2" id="linklisthrefcontainer">&nbsp;</td>
+						</tr>
+						<tr>
+							<td class="column1"><label for="anchorlist">{$lang_advlink_anchor_names}</label></td>
+							<td colspan="2" id="anchorlistcontainer">&nbsp;</td>
+						</tr>
+						<tr>
+							<td><label id="targetlistlabel" for="targetlist">{$lang_insert_link_target}</label></td>
+							<td id="targetlistcontainer">&nbsp;</td>
+						</tr>
+						<tr>
+							<td nowrap="nowrap"><label id="titlelabel" for="title">{$lang_theme_insert_link_titlefield}</label></td>
+							<td><input id="title" name="title" type="text" value="" /></td>
+						</tr>
+						<tr>
+							<td><label id="classlabel" for="classlist">{$lang_class_name}</label></td>
+							<td>
+								 <select id="classlist" name="classlist" onchange="changeClass();">
+									<option value="" selected>{$lang_not_set}</option>
+								 </select>
+							</td>
+						</tr>
+					</table>
+				</fieldset>
+			</div>
+
+			<div id="popup_panel" class="panel">
+				<fieldset>
+					<legend>{$lang_advlink_popup_props}</legend>
+
+					<input type="checkbox" id="ispopup" name="ispopup" class="radio" onclick="setPopupControlsDisabled(!this.checked);buildOnClick();" />
+					<label id="ispopuplabel" for="ispopup">{$lang_advlink_popup}</label>
+
+					<table border="0" cellpadding="0" cellspacing="4">
+						<tr>
+							<td nowrap="nowrap"><label for="popupurl">{$lang_advlink_popup_url}</label>&nbsp;</td>
+							<td>
+								<table border="0" cellspacing="0" cellpadding="0">
+									<tr>
+										<td><input type="text" name="popupurl" id="popupurl" value="" onchange="buildOnClick();" /></td>
+										<td id="popupurlbrowsercontainer">&nbsp;</td>
+									</tr>
+								</table>
+							</td>
+						</tr>
+						<tr>
+							<td nowrap="nowrap"><label for="popupname">{$lang_advlink_popup_name}</label>&nbsp;</td>
+							<td><input type="text" name="popupname" id="popupname" value="" onchange="buildOnClick();" /></td>
+						</tr>
+						<tr>
+							<td nowrap="nowrap"><label>{$lang_advlink_popup_size}</label>&nbsp;</td>
+							<td nowrap="nowrap">
+								<input type="text" id="popupwidth" name="popupwidth" value="" onchange="buildOnClick();" /> x
+								<input type="text" id="popupheight" name="popupheight" value="" onchange="buildOnClick();" /> px
+							</td>
+						</tr>
+						<tr>
+							<td nowrap="nowrap" id="labelleft"><label>{$lang_advlink_popup_position}</label>&nbsp;</td>
+							<td nowrap="nowrap">
+								<input type="text" id="popupleft" name="popupleft" value="" onchange="buildOnClick();" /> /                                
+								<input type="text" id="popuptop" name="popuptop" value="" onchange="buildOnClick();" /> (c /c = center)
+							</td>
+						</tr>
+					</table>
+
+					<fieldset>
+						<legend>{$lang_advlink_popup_opts}</legend>
+
+						<table border="0" cellpadding="0" cellspacing="4">
+							<tr>
+								<td><input type="checkbox" id="popuplocation" name="popuplocation" class="checkbox" onchange="buildOnClick();" /></td>
+								<td nowrap="nowrap"><label id="popuplocationlabel" for="popuplocation">{$lang_advlink_popup_location}</label></td>
+								<td><input type="checkbox" id="popupscrollbars" name="popupscrollbars" class="checkbox" onchange="buildOnClick();" /></td>
+								<td nowrap="nowrap"><label id="popupscrollbarslabel" for="popupscrollbars">{$lang_advlink_popup_scrollbars}</label></td>
+							</tr>
+							<tr>
+								<td><input type="checkbox" id="popupmenubar" name="popupmenubar" class="checkbox" onchange="buildOnClick();" /></td>
+								<td nowrap="nowrap"><label id="popupmenubarlabel" for="popupmenubar">{$lang_advlink_popup_menubar}</label></td>
+								<td><input type="checkbox" id="popupresizable" name="popupresizable" class="checkbox" onchange="buildOnClick();" /></td>
+								<td nowrap="nowrap"><label id="popupresizablelabel" for="popupresizable">{$lang_advlink_popup_resizable}</label></td>
+							</tr>
+							<tr>
+								<td><input type="checkbox" id="popuptoolbar" name="popuptoolbar" class="checkbox" onchange="buildOnClick();" /></td>
+								<td nowrap="nowrap"><label id="popuptoolbarlabel" for="popuptoolbar">{$lang_advlink_popup_toolbar}</label></td>
+								<td><input type="checkbox" id="popupdependent" name="popupdependent" class="checkbox" onchange="buildOnClick();" /></td>
+								<td nowrap="nowrap"><label id="popupdependentlabel" for="popupdependent">{$lang_advlink_popup_dependent}</label></td>
+							</tr>
+							<tr>
+								<td><input type="checkbox" id="popupstatus" name="popupstatus" class="checkbox" onchange="buildOnClick();" /></td>
+								<td nowrap="nowrap"><label id="popupstatuslabel" for="popupstatus">{$lang_advlink_popup_statusbar}</label></td>
+								<td><input type="checkbox" id="popupreturn" name="popupreturn" class="checkbox" onchange="buildOnClick();" checked="checked" /></td>
+								<td nowrap="nowrap"><label id="popupreturnlabel" for="popupreturn">{$lang_advlink_popup_return}</label></td>
+							</tr>
+						</table>
+					</fieldset>
+				</fieldset>
+			</div>
+
+			<div id="advanced_panel" class="panel">
+			<fieldset>
+					<legend>{$lang_advlink_advanced_props}</legend>
+
+					<table border="0" cellpadding="0" cellspacing="4">
+						<tr>
+							<td class="column1"><label id="idlabel" for="id">{$lang_advlink_id}</label></td> 
+							<td><input id="id" name="id" type="text" value="" /></td> 
+						</tr>
+
+						<tr>
+							<td><label id="stylelabel" for="style">{$lang_advlink_style}</label></td>
+							<td><input type="text" id="style" name="style" value="" /></td>
+						</tr>
+
+						<tr>
+							<td><label id="classeslabel" for="classes">{$lang_advlink_classes}</label></td>
+							<td><input type="text" id="classes" name="classes" value="" onchange="selectByValue(this.form,'classlist',this.value,true);" /></td>
+						</tr>
+
+						<tr>
+							<td><label id="targetlabel" for="target">{$lang_advlink_target_name}</label></td>
+							<td><input type="text" id="target" name="target" value="" onchange="selectByValue(this.form,'targetlist',this.value,true);" /></td>
+						</tr>
+
+						<tr>
+							<td class="column1"><label id="dirlabel" for="dir">{$lang_advlink_langdir}</label></td> 
+							<td>
+								<select id="dir" name="dir"> 
+										<option value="">{$lang_not_set}</option> 
+										<option value="ltr">{$lang_advlink_ltr}</option> 
+										<option value="rtl">{$lang_advlink_rtl}</option> 
+								</select>
+							</td> 
+						</tr>
+
+						<tr>
+							<td><label id="hreflanglabel" for="hreflang">{$lang_advlink_target_langcode}</label></td>
+							<td><input type="text" id="hreflang" name="hreflang" value="" /></td>
+						</tr>
+
+						<tr>
+							<td class="column1"><label id="langlabel" for="lang">{$lang_advlink_langcode}</label></td> 
+							<td>
+								<input id="lang" name="lang" type="text" value="" />
+							</td> 
+						</tr>
+
+						<tr>
+							<td><label id="charsetlabel" for="charset">{$lang_advlink_encoding}</label></td>
+							<td><input type="text" id="charset" name="charset" value="" /></td>
+						</tr>
+
+						<tr>
+							<td><label id="typelabel" for="type">{$lang_advlink_mime}</label></td>
+							<td><input type="text" id="type" name="type" value="" /></td>
+						</tr>
+
+						<tr>
+							<td><label id="rellabel" for="rel">{$lang_advlink_rel}</label></td>
+							<td><select id="rel" name="rel"> 
+									<option value="">{$lang_not_set}</option> 
+									<option value="alternate">Alternate</option> 
+									<option value="designates">Designates</option> 
+									<option value="stylesheet">Stylesheet</option> 
+									<option value="start">Start</option> 
+									<option value="next">Next</option> 
+									<option value="prev">Prev</option> 
+									<option value="contents">Contents</option> 
+									<option value="index">Index</option> 
+									<option value="glossary">Glossary</option> 
+									<option value="copyright">Copyright</option> 
+									<option value="chapter">Chapter</option> 
+									<option value="subsection">Subsection</option> 
+									<option value="appendix">Appendix</option> 
+									<option value="help">Help</option> 
+									<option value="bookmark">Bookmark</option> 
+								</select> 
+							</td>
+						</tr>
+
+						<tr>
+							<td><label id="revlabel" for="rev">{$lang_advlink_rev}</label></td>
+							<td><select id="rev" name="rev"> 
+									<option value="">{$lang_not_set}</option> 
+									<option value="alternate">Alternate</option> 
+									<option value="designates">Designates</option> 
+									<option value="stylesheet">Stylesheet</option> 
+									<option value="start">Start</option> 
+									<option value="next">Next</option> 
+									<option value="prev">Prev</option> 
+									<option value="contents">Contents</option> 
+									<option value="index">Index</option> 
+									<option value="glossary">Glossary</option> 
+									<option value="copyright">Copyright</option> 
+									<option value="chapter">Chapter</option> 
+									<option value="subsection">Subsection</option> 
+									<option value="appendix">Appendix</option> 
+									<option value="help">Help</option> 
+									<option value="bookmark">Bookmark</option> 
+								</select> 
+							</td>
+						</tr>
+
+						<tr>
+							<td><label id="tabindexlabel" for="tabindex">{$lang_advlink_tabindex}</label></td>
+							<td><input type="text" id="tabindex" name="tabindex" value="" /></td>
+						</tr>
+
+						<tr>
+							<td><label id="accesskeylabel" for="accesskey">{$lang_advlink_accesskey}</label></td>
+							<td><input type="text" id="accesskey" name="accesskey" value="" /></td>
+						</tr>
+					</table>
+				</fieldset>
+			</div>
+
+			<div id="events_panel" class="panel">
+			<fieldset>
+					<legend>{$lang_advlink_event_props}</legend>
+
+					<table border="0" cellpadding="0" cellspacing="4">
+						<tr>
+							<td class="column1"><label for="onfocus">onfocus</label></td> 
+							<td><input id="onfocus" name="onfocus" type="text" value="" /></td> 
+						</tr>
+
+						<tr>
+							<td class="column1"><label for="onblur">onblur</label></td> 
+							<td><input id="onblur" name="onblur" type="text" value="" /></td> 
+						</tr>
+
+						<tr>
+							<td class="column1"><label for="onclick">onclick</label></td> 
+							<td><input id="onclick" name="onclick" type="text" value="" /></td> 
+						</tr>
+
+						<tr>
+							<td class="column1"><label for="ondblclick">ondblclick</label></td> 
+							<td><input id="ondblclick" name="ondblclick" type="text" value="" /></td> 
+						</tr>
+
+						<tr>
+							<td class="column1"><label for="onmousedown">onmousedown</label></td> 
+							<td><input id="onmousedown" name="onmousedown" type="text" value="" /></td> 
+						</tr>
+
+						<tr>
+							<td class="column1"><label for="onmouseup">onmouseup</label></td> 
+							<td><input id="onmouseup" name="onmouseup" type="text" value="" /></td> 
+						</tr>
+
+						<tr>
+							<td class="column1"><label for="onmouseover">onmouseover</label></td> 
+							<td><input id="onmouseover" name="onmouseover" type="text" value="" /></td> 
+						</tr>
+
+						<tr>
+							<td class="column1"><label for="onmousemove">onmousemove</label></td> 
+							<td><input id="onmousemove" name="onmousemove" type="text" value="" /></td> 
+						</tr>
+
+						<tr>
+							<td class="column1"><label for="onmouseout">onmouseout</label></td> 
+							<td><input id="onmouseout" name="onmouseout" type="text" value="" /></td> 
+						</tr>
+
+						<tr>
+							<td class="column1"><label for="onkeypress">onkeypress</label></td> 
+							<td><input id="onkeypress" name="onkeypress" type="text" value="" /></td> 
+						</tr>
+
+						<tr>
+							<td class="column1"><label for="onkeydown">onkeydown</label></td> 
+							<td><input id="onkeydown" name="onkeydown" type="text" value="" /></td> 
+						</tr>
+
+						<tr>
+							<td class="column1"><label for="onkeyup">onkeyup</label></td> 
+							<td><input id="onkeyup" name="onkeyup" type="text" value="" /></td> 
+						</tr>
+					</table>
+				</fieldset>
+			</div>
+		</div>
+
+		<div class="mceActionPanel">
+			<div style="float: left">
+				<input type="button" id="insert" name="insert" value="{$lang_insert}" onclick="insertAction();" />
+			</div>
+
+			<div style="float: right">
+				<input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onclick="tinyMCEPopup.close();" />
+			</div>
+		</div>
+    </form>
+</body>
+</html>

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advlink/readme.txt
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advlink/readme.txt	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/advlink/readme.txt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1 @@
+Check the TinyMCE documentation for details on this plugin.

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/autosave/editor_plugin.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/autosave/editor_plugin.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/autosave/editor_plugin.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1 @@
+tinyMCE.importPluginLanguagePack('autosave','en,tr,sv,cs,he,nb,hu,de,da,ru,ru_KOI8-R,ru_UTF-8,nn,fi,cy,es,is,pl,pt_br');var TinyMCE_AutoSavePlugin={getInfo:function(){return{longname:'Auto save',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_autosave.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};},_beforeUnloadHandler:function(){var n,inst,anyDirty=false,msg=tinyMCE.getLang("lang_autosave_unload_msg");if(tinyMCE.getParam("fullscreen_is_enabled"))return;for(n in tinyMCE.instances){inst=tinyMCE.instances[n];if(!tinyMCE.isInstance(inst))continue;if(inst.isDirty())return msg;}return;}};window.onbeforeunload=TinyMCE_AutoSavePlugin._beforeUnloadHandler;tinyMCE.addPlugin("autosave",TinyMCE_AutoSavePlugin);
\ No newline at end of file

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/autosave/editor_plugin_src.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/autosave/editor_plugin_src.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/autosave/editor_plugin_src.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,48 @@
+/**
+ * $RCSfile: editor_plugin_src.js,v $
+ * $Revision: 1.11 $
+ * $Date: 2006/03/22 12:21:21 $
+ *
+ * @author Moxiecode
+ * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
+ */
+
+/* Import plugin specific language pack */
+tinyMCE.importPluginLanguagePack('autosave', 'en,tr,sv,cs,he,nb,hu,de,da,ru,ru_KOI8-R,ru_UTF-8,nn,fi,cy,es,is,pl,pt_br');
+
+var TinyMCE_AutoSavePlugin = {
+	getInfo : function() {
+		return {
+			longname : 'Auto save',
+			author : 'Moxiecode Systems',
+			authorurl : 'http://tinymce.moxiecode.com',
+			infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_autosave.html',
+			version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
+		};
+	},
+
+	// Private plugin internal methods
+
+	_beforeUnloadHandler : function() {
+		var n, inst, anyDirty = false, msg = tinyMCE.getLang("lang_autosave_unload_msg");
+
+		if (tinyMCE.getParam("fullscreen_is_enabled"))
+			return;
+
+		for (n in tinyMCE.instances) {
+			inst = tinyMCE.instances[n];
+
+			if (!tinyMCE.isInstance(inst))
+				continue;
+
+			if (inst.isDirty())
+				return msg;
+		}
+
+		return;
+	}
+};
+
+window.onbeforeunload = TinyMCE_AutoSavePlugin._beforeUnloadHandler;
+
+tinyMCE.addPlugin("autosave", TinyMCE_AutoSavePlugin);

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/autosave/langs/en.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/autosave/langs/en.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/autosave/langs/en.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,5 @@
+// EN lang variables
+
+tinyMCE.addToLang('',{
+autosave_unload_msg : 'The changes you made will be lost if you navigate away from this page.'
+});

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/autosave/readme.txt
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/autosave/readme.txt	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/autosave/readme.txt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1 @@
+Check the TinyMCE documentation for details on this plugin.

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/cleanup/editor_plugin.js
===================================================================

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/cleanup/editor_plugin_src.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/cleanup/editor_plugin_src.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/cleanup/editor_plugin_src.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,12 @@
+/**
+ * $RCSfile: editor_plugin_src.js,v $
+ * $Revision: 1.10 $
+ * $Date: 2006/02/10 16:29:38 $
+ *
+ * Experimental plugin for new Cleanup routine, this logic will be moved into the core ones it's stable enougth.
+ *
+ * @author Moxiecode
+ * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
+ */
+
+/* Dummy file since cleanup is now moved to core */

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/cleanup/readme.txt
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/cleanup/readme.txt	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/cleanup/readme.txt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1 @@
+Dummy plugin since cleanup is now moved into core.

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/contextmenu/css/contextmenu.css
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/contextmenu/css/contextmenu.css	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/contextmenu/css/contextmenu.css	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,74 @@
+.contextMenuIEPopup {
+	padding: 0;
+	margin: 0;
+	border: 0;
+	overflow: hidden;
+}
+
+.contextMenu {
+	position: absolute;
+	cursor: default;
+	z-index: 1000;
+	border: 1px solid #D4D0C8;
+	background-color: #FFFFFF;
+}
+
+.contextMenuItem, .contextMenuItemOver {
+}
+
+.contextMenuSeparator {
+	width: 100%;
+	background-color: #D4D0C8;
+	border: 0;
+}
+
+.contextMenuImage, .contextMenuItemDisabled {
+	border: 0;
+}
+
+.contextMenuIcon {
+	background-color: #F0F0EE;
+}
+
+.contextMenuItemOver .contextMenuIcon {
+	background-color: #B6BDD2;
+}
+
+.contextMenuIcon {
+	background-color: #F0F0EE;
+}
+
+.contextMenuItemDisabled img {
+	filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30);
+	-moz-opacity:0.3;
+	opacity: 0.3;
+}
+
+.contextMenuText {
+	font-family: Tahoma, Verdana, Arial, Helvetica;
+	font-size: 11px;
+	line-height: 20px;
+}
+
+.contextMenuItemDisabled {
+	color: #AAAAAA;
+}
+
+.contextMenuText a {
+	display: block;
+	line-height: 20px;
+	width: 100%;
+	text-decoration: none;
+	color: black;
+	font-weight: normal;
+	margin: 0;
+	padding: 0;
+}
+
+.contextMenuText a:hover {
+	background-color: #B6BDD2;
+	text-decoration: none !important;
+	font-weight: normal;
+	margin: 0;
+	padding: 0;
+}

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/contextmenu/editor_plugin.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/contextmenu/editor_plugin.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/contextmenu/editor_plugin.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1 @@
+if(!tinyMCE.settings['contextmenu_skip_plugin_css']){tinyMCE.loadCSS(tinyMCE.baseURL+"/plugins/contextmenu/css/contextmenu.css");}var TinyMCE_ContextMenuPlugin={_contextMenu:null,getInfo:function(){return{longname:'Context menus',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_contextmenu.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};},initInstance:function(inst){if(tinyMCE.isMSIE5_0&&tinyMCE.isOpera)return;TinyMCE_ContextMenuPlugin._contextMenu=new TinyMCE_ContextMenu({commandhandler:"TinyMCE_ContextMenuPlugin._commandHandler",spacer_image:tinyMCE.baseURL+"/plugins/contextmenu/images/spacer.gif"});tinyMCE.addEvent(inst.getDoc(),"click",TinyMCE_ContextMenuPlugin._hideContextMenu);tinyMCE.addEvent(inst.getDoc(),"keypress",TinyMCE_ContextMenuPlugin._hideContextMenu);tinyMCE.addEvent(inst.getDoc(),"keydown",TinyMCE_ContextMenuPlugin._hideContextMenu);tinyMCE.addEvent(document,"click",TinyMCE_ContextMenuPlugin._hideContextMenu);tinyMCE.addEvent(document,"keypress",TinyMCE_ContextMenuPlugin._hideContextMenu);tinyMCE.addEvent(document,"keydown",TinyMCE_ContextMenuPlugin._hideContextMenu);if(tinyMCE.isGecko){tinyMCE.addEvent(inst.getDoc(),"contextmenu",function(e){TinyMCE_ContextMenuPlugin._showContextMenu(tinyMCE.isMSIE?inst.contentWindow.event:e,inst);});}else tinyMCE.addEvent(inst.getDoc(),"contextmenu",TinyMCE_ContextMenuPlugin._onContextMenu);},_onContextMenu:function(e){var elm=tinyMCE.isMSIE?e.srcElement:e.target;var targetInst,body;if((body=tinyMCE.getParentElement(elm,"body"))!=null){for(var n in tinyMCE.instances){var inst=tinyMCE.instances[n];if(!tinyMCE.isInstance(inst))continue;if(body==inst.getBody()){targetInst=inst;break;}}return TinyMCE_ContextMenuPlugin._showContextMenu(tinyMCE.isMSIE?targetInst.contentWindow.event:e,targetInst);}},_showContextMenu:function(e,inst){function getAttrib(elm,name){return elm.getAttribute(name)?elm.getAttribute(name):"";}var x,y,elm,contextMenu;var pos=tinyMCE.getAbsPosition(inst.iframeElement);x=tinyMCE.isMSIE?e.screenX:pos.absLeft+(e.pageX-inst.getBody().scrollLeft);y=tinyMCE.isMSIE?e.screenY:pos.absTop+(e.pageY-inst.getBody().scrollTop);elm=tinyMCE.isMSIE?e.srcElement:e.target;contextMenu=this._contextMenu;contextMenu.inst=inst;window.setTimeout(function(){var theme=tinyMCE.getParam("theme");contextMenu.clearAll();var sel=inst.selection.getSelectedText().length!=0||elm.nodeName=="IMG";contextMenu.addItem(tinyMCE.baseURL+"/themes/"+theme+"/images/cut.gif","$lang_cut_desc","Cut","",!sel);contextMenu.addItem(tinyMCE.baseURL+"/themes/"+theme+"/images/copy.gif","$lang_copy_desc","Copy","",!sel);contextMenu.addItem(tinyMCE.baseURL+"/themes/"+theme+"/images/paste.gif","$lang_paste_desc","Paste","",false);if(sel||(elm?(elm.nodeName=='A')||(elm.nodeName=='IMG'):false)){contextMenu.addSeparator();contextMenu.addItem(tinyMCE.baseURL+"/themes/advanced/images/link.gif","$lang_link_desc",inst.hasPlugin("advlink")?"mceAdvLink":"mceLink");contextMenu.addItem(tinyMCE.baseURL+"/themes/advanced/images/unlink.gif","$lang_unlink_desc","unlink","",(elm?(elm.nodeName!='A')&&(elm.nodeName!='IMG'):true));}elm=tinyMCE.getParentElement(elm,"img,table,td"+(inst.hasPlugin("advhr")?',hr':''));if(elm){switch(elm.nodeName){case"IMG":contextMenu.addSeparator();if(tinyMCE.getAttrib(elm,'class').indexOf('mceItemFlash')!=-1)contextMenu.addItem(tinyMCE.baseURL+"/plugins/flash/images/flash.gif","$lang_flash_props","mceFlash");else contextMenu.addItem(tinyMCE.baseURL+"/themes/"+theme+"/images/image.gif","$lang_image_props_desc",inst.hasPlugin("advimage")?"mceAdvImage":"mceImage");break;case"HR":contextMenu.addSeparator();contextMenu.addItem(tinyMCE.baseURL+"/plugins/advhr/images/advhr.gif","$lang_insert_advhr_desc","mceAdvancedHr");break;case"TABLE":case"TD":if(inst.hasPlugin("table")){var colspan=(elm.nodeName=="TABLE")?"":getAttrib(elm,"colspan");var rowspan=(elm.nodeName=="TABLE")?"":getAttrib(elm,"rowspan");colspan=colspan==""?"1":colspan;rowspan=rowspan==""?"1":rowspan;contextMenu.addSeparator();contextMenu.addItem(tinyMCE.baseURL+"/themes/"+theme+"/images/cut.gif","$lang_table_cut_row_desc","mceTableCutRow");contextMenu.addItem(tinyMCE.baseURL+"/themes/"+theme+"/images/copy.gif","$lang_table_copy_row_desc","mceTableCopyRow");contextMenu.addItem(tinyMCE.baseURL+"/themes/"+theme+"/images/paste.gif","$lang_table_paste_row_before_desc","mceTablePasteRowBefore","",inst.tableRowClipboard==null);contextMenu.addItem(tinyMCE.baseURL+"/themes/"+theme+"/images/paste.gif","$lang_table_paste_row_after_desc","mceTablePasteRowAfter","",inst.tableRowClipboard==null);contextMenu.addSeparator();contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table.gif","$lang_table_desc","mceInsertTable","insert");contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table.gif","$lang_table_props_desc","mceInsertTable");contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table_cell_props.gif","$lang_table_cell_desc","mceTableCellProps");contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table_delete.gif","$lang_table_del","mceTableDelete");contextMenu.addSeparator();contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table_row_props.gif","$lang_table_row_desc","mceTableRowProps");contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table_insert_row_before.gif","$lang_table_row_before_desc","mceTableInsertRowBefore");contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table_insert_row_after.gif","$lang_table_row_after_desc","mceTableInsertRowAfter");contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table_delete_row.gif","$lang_table_delete_row_desc","mceTableDeleteRow");contextMenu.addSeparator();contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table_insert_col_before.gif","$lang_table_col_before_desc","mceTableInsertColBefore");contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table_insert_col_after.gif","$lang_table_col_after_desc","mceTableInsertColAfter");contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table_delete_col.gif","$lang_table_delete_col_desc","mceTableDeleteCol");contextMenu.addSeparator();contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table_split_cells.gif","$lang_table_split_cells_desc","mceTableSplitCells","",(colspan=="1"&&rowspan=="1"));contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table_merge_cells.gif","$lang_table_merge_cells_desc","mceTableMergeCells","",false);}break;}}else{if(inst.hasPlugin("table")){contextMenu.addSeparator();contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table.gif","$lang_table_desc","mceInsertTable","insert");}}contextMenu.show(x,y);},10);tinyMCE.cancelEvent(e);return false;},_hideContextMenu:function(){if(TinyMCE_ContextMenuPlugin._contextMenu)TinyMCE_ContextMenuPlugin._contextMenu.hide();},_commandHandler:function(command,value){var cm=TinyMCE_ContextMenuPlugin._contextMenu;cm.hide();var ui=false;if(command=="mceInsertTable"||command=="mceTableCellProps"||command=="mceTableRowProps"||command=="mceTableMergeCells")ui=true;if(command=="Paste")value=null;if(tinyMCE.getParam("dialog_type")=="modal"&&tinyMCE.isMSIE){window.setTimeout(function(){cm.inst.execCommand(command,ui,value);},100);}else cm.inst.execCommand(command,ui,value);}};tinyMCE.addPlugin("contextmenu",TinyMCE_ContextMenuPlugin);function TinyMCE_ContextMenu(settings){function defParam(key,def_val){settings[key]=typeof(settings[key])!="undefined"?settings[key]:def_val;}var self=this;this.isMSIE=(navigator.appName=="Microsoft Internet Explorer");this.contextMenuDiv=document.createElement("div");this.contextMenuDiv.className="contextMenu";this.contextMenuDiv.setAttribute("class","contextMenu");this.contextMenuDiv.style.display="none";this.contextMenuDiv.style.position='absolute';this.contextMenuDiv.style.zindex=1000;this.contextMenuDiv.style.left='0';this.contextMenuDiv.style.top='0';this.contextMenuDiv.unselectable="on";document.body.appendChild(this.contextMenuDiv);defParam("commandhandler","");defParam("spacer_image","images/spacer.gif");this.items=new Array();this.settings=settings;this.html="";if(tinyMCE.isMSIE&&!tinyMCE.isMSIE5_0&&!tinyMCE.isOpera){this.pop=window.createPopup();doc=this.pop.document;doc.open();doc.write('<html><head><link href="'+tinyMCE.baseURL+'/plugins/contextmenu/css/contextmenu.css" rel="stylesheet" type="text/css" /></head><body unselectable="yes" class="contextMenuIEPopup"></body></html>');doc.close();}};TinyMCE_ContextMenu.prototype={clearAll:function(){this.html="";this.contextMenuDiv.innerHTML="";},addSeparator:function(){this.html+='<tr class="contextMenuItem"><td class="contextMenuIcon"><img src="'+this.settings['spacer_image']+'" width="20" height="1" class="contextMenuImage" /></td><td><img class="contextMenuSeparator" width="1" height="1" src="'+this.settings['spacer_image']+'" /></td></tr>';},addItem:function(icon,title,command,value,disabled){if(title.charAt(0)=='$')title=tinyMCE.getLang(title.substring(1));var onMouseDown='';var html='';if(tinyMCE.isMSIE&&!tinyMCE.isMSIE5_0)onMouseDown='contextMenu.execCommand(\''+command+'\', \''+value+'\');return false;';else onMouseDown=this.settings['commandhandler']+'(\''+command+'\', \''+value+'\');return false;';if(icon=="")icon=this.settings['spacer_image'];if(!disabled)html+='<tr class="contextMenuItem">';else html+='<tr class="contextMenuItemDisabled">';html+='<td class="contextMenuIcon"><img src="'+icon+'" width="20" height="20" class="contextMenuImage" /></td>';html+='<td><div class="contextMenuText">';html+='<a href="javascript:void(0);" onclick="'+onMouseDown+'" onmousedown="return false;">&#160;';html+=title;html+='&#160;</a>';html+='</div></td>';html+='</tr>';this.html+=html;},show:function(x,y){var vp,width,height;if(this.html=="")return;var html='';html+='<a href="#"></a><table border="0" cellpadding="0" cellspacing="0">';html+=this.html;html+='</table>';this.contextMenuDiv.innerHTML=html;this.contextMenuDiv.style.display="block";width=this.contextMenuDiv.offsetWidth;height=this.contextMenuDiv.offsetHeight;this.contextMenuDiv.style.display="none";if(tinyMCE.isMSIE&&!tinyMCE.isMSIE5_0&&!tinyMCE.isOpera){this.pop.document.body.innerHTML='<div class="contextMenu">'+html+"</div>";this.pop.document.tinyMCE=tinyMCE;this.pop.document.contextMenu=this;this.pop.show(x,y,width,height);}else{vp=this.getViewPort();this.contextMenuDiv.style.left=(x>vp.width-width?vp.width-width:x)+'px';this.contextMenuDiv.style.top=(y>vp.height-height?vp.height-height:y)+'px';this.contextMenuDiv.style.display="block";}},getViewPort:function(){return{width:document.documentElement.offsetWidth||document.body.offsetWidth,height:self.innerHeight||document.documentElement.clientHeight||document.body.clientHeight};},hide:function(){if(tinyMCE.isMSIE&&!tinyMCE.isMSIE5_0&&!tinyMCE.isOpera)this.pop.hide();else this.contextMenuDiv.style.display="none";},execCommand:function(command,value){eval(this.settings['commandhandler']+"(command, value);");}};
\ No newline at end of file

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/contextmenu/editor_plugin_src.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/contextmenu/editor_plugin_src.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/contextmenu/editor_plugin_src.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,356 @@
+/**
+ * $RCSfile: editor_plugin_src.js,v $
+ * $Revision: 1.31 $
+ * $Date: 2006/05/03 10:46:41 $
+ *
+ * @author Moxiecode
+ * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
+ */
+
+/* Import plugin specific language pack */
+//tinyMCE.importPluginLanguagePack('contextmenu', 'en,tr,zh_cn,cs,fa,fr_ca,fr,de,nb');
+if (!tinyMCE.settings['contextmenu_skip_plugin_css']) {
+	tinyMCE.loadCSS(tinyMCE.baseURL + "/plugins/contextmenu/css/contextmenu.css");
+}
+
+var TinyMCE_ContextMenuPlugin = {
+	// Private fields
+	_contextMenu : null,
+
+	getInfo : function() {
+		return {
+			longname : 'Context menus',
+			author : 'Moxiecode Systems',
+			authorurl : 'http://tinymce.moxiecode.com',
+			infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_contextmenu.html',
+			version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
+		};
+	},
+
+	initInstance : function(inst) {
+		// Is not working on MSIE 5.0 or Opera no contextmenu event
+		if (tinyMCE.isMSIE5_0 && tinyMCE.isOpera)
+			return;
+
+		TinyMCE_ContextMenuPlugin._contextMenu = new TinyMCE_ContextMenu({
+			commandhandler : "TinyMCE_ContextMenuPlugin._commandHandler",
+			spacer_image : tinyMCE.baseURL + "/plugins/contextmenu/images/spacer.gif"
+		});
+
+		// Add hide event handles
+		tinyMCE.addEvent(inst.getDoc(), "click", TinyMCE_ContextMenuPlugin._hideContextMenu);
+		tinyMCE.addEvent(inst.getDoc(), "keypress", TinyMCE_ContextMenuPlugin._hideContextMenu);
+		tinyMCE.addEvent(inst.getDoc(), "keydown", TinyMCE_ContextMenuPlugin._hideContextMenu);
+		tinyMCE.addEvent(document, "click", TinyMCE_ContextMenuPlugin._hideContextMenu);
+		tinyMCE.addEvent(document, "keypress", TinyMCE_ContextMenuPlugin._hideContextMenu);
+		tinyMCE.addEvent(document, "keydown", TinyMCE_ContextMenuPlugin._hideContextMenu);
+
+		// Attach contextmenu event
+		if (tinyMCE.isGecko) {
+			tinyMCE.addEvent(inst.getDoc(), "contextmenu", function(e) {TinyMCE_ContextMenuPlugin._showContextMenu(tinyMCE.isMSIE ? inst.contentWindow.event : e, inst);});
+		} else
+			tinyMCE.addEvent(inst.getDoc(), "contextmenu", TinyMCE_ContextMenuPlugin._onContextMenu);
+	},
+
+	// Private plugin internal methods
+
+	_onContextMenu : function(e) {
+		var elm = tinyMCE.isMSIE ? e.srcElement : e.target;
+		var targetInst, body;
+
+		// Find instance
+		if ((body = tinyMCE.getParentElement(elm, "body")) != null) {
+			for (var n in tinyMCE.instances) {
+				var inst = tinyMCE.instances[n];
+				if (!tinyMCE.isInstance(inst))
+					continue;
+
+				if (body == inst.getBody()) {
+					targetInst = inst;
+					break;
+				}
+			}
+
+			return TinyMCE_ContextMenuPlugin._showContextMenu(tinyMCE.isMSIE ? targetInst.contentWindow.event : e, targetInst);
+		}
+	},
+
+	_showContextMenu : function(e, inst) {
+		function getAttrib(elm, name) {
+			return elm.getAttribute(name) ? elm.getAttribute(name) : "";
+		}
+
+		var x, y, elm, contextMenu;
+		var pos = tinyMCE.getAbsPosition(inst.iframeElement);
+
+		x = tinyMCE.isMSIE ? e.screenX : pos.absLeft + (e.pageX - inst.getBody().scrollLeft);
+		y = tinyMCE.isMSIE ? e.screenY : pos.absTop + (e.pageY - inst.getBody().scrollTop);
+		elm = tinyMCE.isMSIE ? e.srcElement : e.target;
+
+		contextMenu = this._contextMenu;
+		contextMenu.inst = inst;
+
+		// Mozilla needs some time
+		window.setTimeout(function () {
+			var theme = tinyMCE.getParam("theme");
+
+			contextMenu.clearAll();
+			var sel = inst.selection.getSelectedText().length != 0 || elm.nodeName == "IMG";
+
+			// Default items
+			contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/cut.gif", "$lang_cut_desc", "Cut", "", !sel);
+			contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/copy.gif", "$lang_copy_desc", "Copy", "", !sel);
+			contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/paste.gif", "$lang_paste_desc", "Paste", "", false);
+
+			if (sel || (elm ? (elm.nodeName == 'A') || (elm.nodeName == 'IMG') : false)) {
+				contextMenu.addSeparator();
+				contextMenu.addItem(tinyMCE.baseURL + "/themes/advanced/images/link.gif", "$lang_link_desc", inst.hasPlugin("advlink") ? "mceAdvLink" : "mceLink");
+				contextMenu.addItem(tinyMCE.baseURL + "/themes/advanced/images/unlink.gif", "$lang_unlink_desc", "unlink", "", (elm ? (elm.nodeName != 'A') && (elm.nodeName != 'IMG') : true));
+			}
+
+			// Get element
+			elm = tinyMCE.getParentElement(elm, "img,table,td" + (inst.hasPlugin("advhr") ? ',hr' : ''));
+			if (elm) {
+				switch (elm.nodeName) {
+					case "IMG":
+						contextMenu.addSeparator();
+
+						// If flash
+						if (tinyMCE.getAttrib(elm, 'class').indexOf('mceItemFlash') != -1)
+							contextMenu.addItem(tinyMCE.baseURL + "/plugins/flash/images/flash.gif", "$lang_flash_props", "mceFlash");
+						else
+							contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/image.gif", "$lang_image_props_desc", inst.hasPlugin("advimage") ? "mceAdvImage" : "mceImage");
+						break;
+
+					case "HR":
+						contextMenu.addSeparator();
+						contextMenu.addItem(tinyMCE.baseURL + "/plugins/advhr/images/advhr.gif", "$lang_insert_advhr_desc", "mceAdvancedHr");
+						break;
+
+					case "TABLE":
+					case "TD":
+						// Is table plugin loaded
+						if (inst.hasPlugin("table")) {
+							var colspan = (elm.nodeName == "TABLE") ? "" : getAttrib(elm, "colspan");
+							var rowspan = (elm.nodeName == "TABLE") ? "" : getAttrib(elm, "rowspan");
+
+							colspan = colspan == "" ? "1" : colspan;
+							rowspan = rowspan == "" ? "1" : rowspan;
+
+							contextMenu.addSeparator();
+							contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/cut.gif", "$lang_table_cut_row_desc", "mceTableCutRow");
+							contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/copy.gif", "$lang_table_copy_row_desc", "mceTableCopyRow");
+							contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/paste.gif", "$lang_table_paste_row_before_desc", "mceTablePasteRowBefore", "", inst.tableRowClipboard == null);
+							contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/paste.gif", "$lang_table_paste_row_after_desc", "mceTablePasteRowAfter", "", inst.tableRowClipboard == null);
+
+	/*						contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/justifyleft.gif", "$lang_justifyleft_desc", "JustifyLeft", "", false);
+							contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/justifycenter.gif", "$lang_justifycenter_desc", "JustifyCenter", "", false);
+							contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/justifyright.gif", "$lang_justifyright_desc", "JustifyRight", "", false);
+							contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/justifyfull.gif", "$lang_justifyfull_desc", "JustifyFull", "", false);*/
+							contextMenu.addSeparator();
+							contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table.gif", "$lang_table_desc", "mceInsertTable", "insert");
+							contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table.gif", "$lang_table_props_desc", "mceInsertTable");
+							contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_cell_props.gif", "$lang_table_cell_desc", "mceTableCellProps");
+							contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_delete.gif", "$lang_table_del", "mceTableDelete");
+							contextMenu.addSeparator();
+							contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_row_props.gif", "$lang_table_row_desc", "mceTableRowProps");
+							contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_insert_row_before.gif", "$lang_table_row_before_desc", "mceTableInsertRowBefore");
+							contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_insert_row_after.gif", "$lang_table_row_after_desc", "mceTableInsertRowAfter");
+							contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_delete_row.gif", "$lang_table_delete_row_desc", "mceTableDeleteRow");
+							contextMenu.addSeparator();
+							contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_insert_col_before.gif", "$lang_table_col_before_desc", "mceTableInsertColBefore");
+							contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_insert_col_after.gif", "$lang_table_col_after_desc", "mceTableInsertColAfter");
+							contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_delete_col.gif", "$lang_table_delete_col_desc", "mceTableDeleteCol");
+							contextMenu.addSeparator();
+							contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_split_cells.gif", "$lang_table_split_cells_desc", "mceTableSplitCells", "", (colspan == "1" && rowspan == "1"));
+							contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_merge_cells.gif", "$lang_table_merge_cells_desc", "mceTableMergeCells", "", false);
+						}
+						break;
+				}
+			}  else {
+				// Add table specific
+				if (inst.hasPlugin("table")) {
+					contextMenu.addSeparator();
+					contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table.gif", "$lang_table_desc", "mceInsertTable", "insert");
+				}
+			}
+
+			contextMenu.show(x, y);
+		}, 10);
+
+		// Cancel default handeling
+		tinyMCE.cancelEvent(e);
+		return false;
+	},
+
+	_hideContextMenu : function() {
+		if (TinyMCE_ContextMenuPlugin._contextMenu)
+			TinyMCE_ContextMenuPlugin._contextMenu.hide();
+	},
+
+	_commandHandler : function(command, value) {
+		var cm = TinyMCE_ContextMenuPlugin._contextMenu;
+
+		cm.hide();
+
+		// UI must be true on these
+		var ui = false;
+		if (command == "mceInsertTable" || command == "mceTableCellProps" || command == "mceTableRowProps" || command == "mceTableMergeCells")
+			ui = true;
+
+		if (command == "Paste")
+			value = null;
+
+		if (tinyMCE.getParam("dialog_type") == "modal" && tinyMCE.isMSIE) {
+			// Cell properties will generate access denied error is this isn't done?!
+			window.setTimeout(function() {
+				cm.inst.execCommand(command, ui, value);
+			}, 100);
+		} else
+			cm.inst.execCommand(command, ui, value);
+	}
+};
+
+tinyMCE.addPlugin("contextmenu", TinyMCE_ContextMenuPlugin);
+
+// Context menu class
+
+function TinyMCE_ContextMenu(settings) {
+	// Default value function
+	function defParam(key, def_val) {
+		settings[key] = typeof(settings[key]) != "undefined" ? settings[key] : def_val;
+	}
+
+	var self = this;
+
+	this.isMSIE = (navigator.appName == "Microsoft Internet Explorer");
+
+	// Setup contextmenu div
+	this.contextMenuDiv = document.createElement("div");
+	this.contextMenuDiv.className = "contextMenu";
+	this.contextMenuDiv.setAttribute("class", "contextMenu");
+	this.contextMenuDiv.style.display = "none";
+	this.contextMenuDiv.style.position = 'absolute';
+	this.contextMenuDiv.style.zindex = 1000;
+	this.contextMenuDiv.style.left = '0';
+	this.contextMenuDiv.style.top = '0';
+	this.contextMenuDiv.unselectable = "on";
+
+	document.body.appendChild(this.contextMenuDiv);
+
+	// Setup default values
+	defParam("commandhandler", "");
+	defParam("spacer_image", "images/spacer.gif");
+
+	this.items = new Array();
+	this.settings = settings;
+	this.html = "";
+
+	// IE Popup
+	if (tinyMCE.isMSIE && !tinyMCE.isMSIE5_0 && !tinyMCE.isOpera) {
+		this.pop = window.createPopup();
+		doc = this.pop.document;
+		doc.open();
+		doc.write('<html><head><link href="' + tinyMCE.baseURL + '/plugins/contextmenu/css/contextmenu.css" rel="stylesheet" type="text/css" /></head><body unselectable="yes" class="contextMenuIEPopup"></body></html>');
+		doc.close();
+	}
+};
+
+TinyMCE_ContextMenu.prototype = {
+	clearAll : function() {
+		this.html = "";
+		this.contextMenuDiv.innerHTML = "";
+	},
+
+	addSeparator : function() {
+		this.html += '<tr class="contextMenuItem"><td class="contextMenuIcon"><img src="' + this.settings['spacer_image'] + '" width="20" height="1" class="contextMenuImage" /></td><td><img class="contextMenuSeparator" width="1" height="1" src="' + this.settings['spacer_image'] + '" /></td></tr>';
+	},
+
+	addItem : function(icon, title, command, value, disabled) {
+		if (title.charAt(0) == '$')
+			title = tinyMCE.getLang(title.substring(1));
+
+		var onMouseDown = '';
+		var html = '';
+
+		if (tinyMCE.isMSIE && !tinyMCE.isMSIE5_0)
+			onMouseDown = 'contextMenu.execCommand(\'' + command + '\', \'' + value + '\');return false;';
+		else
+			onMouseDown = this.settings['commandhandler'] + '(\'' + command + '\', \'' + value + '\');return false;';
+
+		if (icon == "")
+			icon = this.settings['spacer_image'];
+
+		if (!disabled)
+			html += '<tr class="contextMenuItem">';
+		else
+			html += '<tr class="contextMenuItemDisabled">';
+
+		html += '<td class="contextMenuIcon"><img src="' + icon + '" width="20" height="20" class="contextMenuImage" /></td>';
+		html += '<td><div class="contextMenuText">';
+		html += '<a href="javascript:void(0);" onclick="' + onMouseDown + '" onmousedown="return false;">&#160;';
+
+		// Add text
+		html += title;
+
+		html += '&#160;</a>';
+		html += '</div></td>';
+		html += '</tr>';
+
+		// Add to main
+		this.html += html;
+	},
+
+	show : function(x, y) {
+		var vp, width, height;
+
+		if (this.html == "")
+			return;
+
+		var html = '';
+
+		html += '<a href="#"></a><table border="0" cellpadding="0" cellspacing="0">';
+		html += this.html;
+		html += '</table>';
+
+		this.contextMenuDiv.innerHTML = html;
+
+		// Get dimensions
+		this.contextMenuDiv.style.display = "block";
+		width = this.contextMenuDiv.offsetWidth;
+		height = this.contextMenuDiv.offsetHeight;
+		this.contextMenuDiv.style.display = "none";
+
+		if (tinyMCE.isMSIE && !tinyMCE.isMSIE5_0 && !tinyMCE.isOpera) {
+			// Setup popup and show
+			this.pop.document.body.innerHTML = '<div class="contextMenu">' + html + "</div>";
+			this.pop.document.tinyMCE = tinyMCE;
+			this.pop.document.contextMenu = this;
+			this.pop.show(x, y, width, height);
+		} else {
+			vp = this.getViewPort();
+
+			this.contextMenuDiv.style.left = (x > vp.width - width ? vp.width - width : x) + 'px';
+			this.contextMenuDiv.style.top = (y > vp.height - height ? vp.height - height : y) + 'px';
+			this.contextMenuDiv.style.display = "block";
+		}
+	},
+
+	getViewPort : function() {
+		return {
+			width : document.documentElement.offsetWidth || document.body.offsetWidth,
+			height : self.innerHeight || document.documentElement.clientHeight || document.body.clientHeight
+		};
+	},
+
+	hide : function() {
+		if (tinyMCE.isMSIE && !tinyMCE.isMSIE5_0 && !tinyMCE.isOpera)
+			this.pop.hide();
+		else
+			this.contextMenuDiv.style.display = "none";
+	},
+
+	execCommand : function(command, value) {
+		eval(this.settings['commandhandler'] + "(command, value);");
+	}
+};

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/contextmenu/images/spacer.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/contextmenu/images/spacer.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/contextmenu/readme.txt
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/contextmenu/readme.txt	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/contextmenu/readme.txt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1 @@
+Check the TinyMCE documentation for details on this plugin.

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/directionality/editor_plugin.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/directionality/editor_plugin.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/directionality/editor_plugin.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1 @@
+tinyMCE.importPluginLanguagePack('directionality','en,tr,sv,fr_ca,zh_cn,cs,da,he,nb,de,hu,ru,ru_KOI8-R,ru_UTF-8,nn,es,cy,is,pl,nl,fr,pt_br');var TinyMCE_DirectionalityPlugin={getInfo:function(){return{longname:'Directionality',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_directionality.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};},getControlHTML:function(cn){switch(cn){case"ltr":return tinyMCE.getButtonHTML(cn,'lang_directionality_ltr_desc','{$pluginurl}/images/ltr.gif','mceDirectionLTR');case"rtl":return tinyMCE.getButtonHTML(cn,'lang_directionality_rtl_desc','{$pluginurl}/images/rtl.gif','mceDirectionRTL');}return"";},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case"mceDirectionLTR":var inst=tinyMCE.getInstanceById(editor_id);var elm=tinyMCE.getParentElement(inst.getFocusElement(),"p,div,td,h1,h2,h3,h4,h5,h6,pre,address");if(elm)elm.setAttribute("dir","ltr");tinyMCE.triggerNodeChange(false);return true;case"mceDirectionRTL":var inst=tinyMCE.getInstanceById(editor_id);var elm=tinyMCE.getParentElement(inst.getFocusElement(),"p,div,td,h1,h2,h3,h4,h5,h6,pre,address");if(elm)elm.setAttribute("dir","rtl");tinyMCE.triggerNodeChange(false);return true;}return false;},handleNodeChange:function(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){function getAttrib(elm,name){return elm.getAttribute(name)?elm.getAttribute(name):"";}if(node==null)return;var elm=tinyMCE.getParentElement(node,"p,div,td,h1,h2,h3,h4,h5,h6,pre,address");if(!elm){tinyMCE.switchClass(editor_id+'_ltr','mceButtonDisabled');tinyMCE.switchClass(editor_id+'_rtl','mceButtonDisabled');return true;}tinyMCE.switchClass(editor_id+'_ltr','mceButtonNormal');tinyMCE.switchClass(editor_id+'_rtl','mceButtonNormal');var dir=getAttrib(elm,"dir");if(dir=="ltr"||dir=="")tinyMCE.switchClass(editor_id+'_ltr','mceButtonSelected');else tinyMCE.switchClass(editor_id+'_rtl','mceButtonSelected');return true;}};tinyMCE.addPlugin("directionality",TinyMCE_DirectionalityPlugin);
\ No newline at end of file

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/directionality/editor_plugin_src.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/directionality/editor_plugin_src.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/directionality/editor_plugin_src.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,92 @@
+/**
+ * $RCSfile: editor_plugin_src.js,v $
+ * $Revision: 1.16 $
+ * $Date: 2006/02/10 21:34:28 $
+ *
+ * @author Moxiecode
+ * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
+ */
+
+/* Import plugin specific language pack */
+tinyMCE.importPluginLanguagePack('directionality', 'en,tr,sv,fr_ca,zh_cn,cs,da,he,nb,de,hu,ru,ru_KOI8-R,ru_UTF-8,nn,es,cy,is,pl,nl,fr,pt_br');
+
+var TinyMCE_DirectionalityPlugin = {
+	getInfo : function() {
+		return {
+			longname : 'Directionality',
+			author : 'Moxiecode Systems',
+			authorurl : 'http://tinymce.moxiecode.com',
+			infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_directionality.html',
+			version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
+		};
+	},
+
+	getControlHTML : function(cn) {
+		switch (cn) {
+			case "ltr":
+				return tinyMCE.getButtonHTML(cn, 'lang_directionality_ltr_desc', '{$pluginurl}/images/ltr.gif', 'mceDirectionLTR');
+
+			case "rtl":
+				return tinyMCE.getButtonHTML(cn, 'lang_directionality_rtl_desc', '{$pluginurl}/images/rtl.gif', 'mceDirectionRTL');
+		}
+
+		return "";
+	},
+
+	execCommand : function(editor_id, element, command, user_interface, value) {
+		// Handle commands
+		switch (command) {
+			case "mceDirectionLTR":
+				var inst = tinyMCE.getInstanceById(editor_id);
+				var elm = tinyMCE.getParentElement(inst.getFocusElement(), "p,div,td,h1,h2,h3,h4,h5,h6,pre,address");
+
+				if (elm)
+					elm.setAttribute("dir", "ltr");
+
+				tinyMCE.triggerNodeChange(false);
+				return true;
+
+			case "mceDirectionRTL":
+				var inst = tinyMCE.getInstanceById(editor_id);
+				var elm = tinyMCE.getParentElement(inst.getFocusElement(), "p,div,td,h1,h2,h3,h4,h5,h6,pre,address");
+
+				if (elm)
+					elm.setAttribute("dir", "rtl");
+
+				tinyMCE.triggerNodeChange(false);
+				return true;
+		}
+
+		// Pass to next handler in chain
+		return false;
+	},
+
+	handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {
+		function getAttrib(elm, name) {
+			return elm.getAttribute(name) ? elm.getAttribute(name) : "";
+		}
+
+		if (node == null)
+			return;
+
+		var elm = tinyMCE.getParentElement(node, "p,div,td,h1,h2,h3,h4,h5,h6,pre,address");
+		if (!elm) {
+			tinyMCE.switchClass(editor_id + '_ltr', 'mceButtonDisabled');
+			tinyMCE.switchClass(editor_id + '_rtl', 'mceButtonDisabled');
+			return true;
+		}
+
+		tinyMCE.switchClass(editor_id + '_ltr', 'mceButtonNormal');
+		tinyMCE.switchClass(editor_id + '_rtl', 'mceButtonNormal');
+
+		var dir = getAttrib(elm, "dir");
+		if (dir == "ltr" || dir == "")
+			tinyMCE.switchClass(editor_id + '_ltr', 'mceButtonSelected');
+		else
+			tinyMCE.switchClass(editor_id + '_rtl', 'mceButtonSelected');
+
+		return true;
+	}
+};
+
+tinyMCE.addPlugin("directionality", TinyMCE_DirectionalityPlugin);

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/directionality/images/ltr.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/directionality/images/ltr.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/directionality/images/rtl.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/directionality/images/rtl.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/directionality/langs/en.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/directionality/langs/en.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/directionality/langs/en.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,6 @@
+// UK lang variables
+
+tinyMCE.addToLang('',{
+directionality_ltr_desc : 'Direction left to right',
+directionality_rtl_desc : 'Direction right to left'
+});

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/directionality/readme.txt
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/directionality/readme.txt	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/directionality/readme.txt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1 @@
+Check the TinyMCE documentation for details on this plugin.

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/editor_plugin.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/editor_plugin.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/editor_plugin.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1 @@
+tinyMCE.importPluginLanguagePack('emotions','en,tr,sv,zh_cn,cs,fa,fr_ca,fr,de,pl,pt_br,nl,da,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,es,cy,is,zh_tw,zh_tw_utf8,sk');var TinyMCE_EmotionsPlugin={getInfo:function(){return{longname:'Emotions',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_emotions.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};},getControlHTML:function(cn){switch(cn){case"emotions":return tinyMCE.getButtonHTML(cn,'lang_emotions_desc','{$pluginurl}/images/emotions.gif','mceEmotion');}return"";},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case"mceEmotion":var template=new Array();template['file']='../../plugins/emotions/emotions.htm';template['width']=160;template['height']=160;template['width']+=tinyMCE.getLang('lang_emotions_delta_width',0);template['height']+=tinyMCE.getLang('lang_emotions_delta_height',0);tinyMCE.openWindow(template,{editor_id:editor_id,inline:"yes"});return true;}return false;}};tinyMCE.addPlugin('emotions',TinyMCE_EmotionsPlugin);
\ No newline at end of file

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/editor_plugin_src.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/editor_plugin_src.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/editor_plugin_src.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,65 @@
+/**
+ * $RCSfile: editor_plugin_src.js,v $
+ * $Revision: 1.23 $
+ * $Date: 2006/02/10 16:29:38 $
+ *
+ * @author Moxiecode
+ * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
+ */
+
+/* Import plugin specific language pack */
+tinyMCE.importPluginLanguagePack('emotions', 'en,tr,sv,zh_cn,cs,fa,fr_ca,fr,de,pl,pt_br,nl,da,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,es,cy,is,zh_tw,zh_tw_utf8,sk');
+
+// Plucin static class
+var TinyMCE_EmotionsPlugin = {
+	getInfo : function() {
+		return {
+			longname : 'Emotions',
+			author : 'Moxiecode Systems',
+			authorurl : 'http://tinymce.moxiecode.com',
+			infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_emotions.html',
+			version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
+		};
+	},
+
+	/**
+	 * Returns the HTML contents of the emotions control.
+	 */
+	getControlHTML : function(cn) {
+		switch (cn) {
+			case "emotions":
+				return tinyMCE.getButtonHTML(cn, 'lang_emotions_desc', '{$pluginurl}/images/emotions.gif', 'mceEmotion');
+		}
+
+		return "";
+	},
+
+	/**
+	 * Executes the mceEmotion command.
+	 */
+	execCommand : function(editor_id, element, command, user_interface, value) {
+		// Handle commands
+		switch (command) {
+			case "mceEmotion":
+				var template = new Array();
+
+				template['file'] = '../../plugins/emotions/emotions.htm'; // Relative to theme
+				template['width'] = 160;
+				template['height'] = 160;
+
+				// Language specific width and height addons
+				template['width'] += tinyMCE.getLang('lang_emotions_delta_width', 0);
+				template['height'] += tinyMCE.getLang('lang_emotions_delta_height', 0);
+
+				tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes"});
+
+				return true;
+		}
+
+		// Pass to next handler in chain
+		return false;
+	}
+};
+
+// Register plugin
+tinyMCE.addPlugin('emotions', TinyMCE_EmotionsPlugin);

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/emotions.htm
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/emotions.htm	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/emotions.htm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,40 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+	<title>{$lang_emotions_title}</title>
+	<script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
+	<script language="javascript" type="text/javascript" src="jscripts/functions.js"></script>
+	<base target="_self" />
+</head>
+<body style="display: none">
+	<div align="center">
+		<div class="title">{$lang_emotions_title}:<br /><br /></div>
+
+		<table border="0" cellspacing="0" cellpadding="4">
+		  <tr>
+			<td><a href="javascript:insertEmotion('smiley-cool.gif','lang_emotions_cool');"><img src="images/smiley-cool.gif" width="18" height="18" border="0" alt="{$lang_emotions_cool}" title="{$lang_emotions_cool}" /></a></td>
+			<td><a href="javascript:insertEmotion('smiley-cry.gif','lang_emotions_cry');"><img src="images/smiley-cry.gif" width="18" height="18" border="0" alt="{$lang_emotions_cry}" title="{$lang_emotions_cry}" /></a></td>
+			<td><a href="javascript:insertEmotion('smiley-embarassed.gif','lang_emotions_embarassed');"><img src="images/smiley-embarassed.gif" width="18" height="18" border="0" alt="{$lang_emotions_embarassed}" title="{$lang_emotions_embarassed}" /></a></td>
+			<td><a href="javascript:insertEmotion('smiley-foot-in-mouth.gif','lang_emotions_foot_in_mouth');"><img src="images/smiley-foot-in-mouth.gif" width="18" height="18" border="0" alt="{$lang_emotions_foot_in_mouth}" title="{$lang_emotions_foot_in_mouth}" /></a></td>
+		  </tr>
+		  <tr>
+			<td><a href="javascript:insertEmotion('smiley-frown.gif','lang_emotions_frown');"><img src="images/smiley-frown.gif" width="18" height="18" border="0" alt="{$lang_emotions_frown}" title="{$lang_emotions_frown}" /></a></td>
+			<td><a href="javascript:insertEmotion('smiley-innocent.gif','lang_emotions_innocent');"><img src="images/smiley-innocent.gif" width="18" height="18" border="0" alt="{$lang_emotions_innocent}" title="{$lang_emotions_innocent}" /></a></td>
+			<td><a href="javascript:insertEmotion('smiley-kiss.gif','lang_emotions_kiss');"><img src="images/smiley-kiss.gif" width="18" height="18" border="0" alt="{$lang_emotions_kiss}" title="{$lang_emotions_kiss}" /></a></td>
+			<td><a href="javascript:insertEmotion('smiley-laughing.gif','lang_emotions_laughing');"><img src="images/smiley-laughing.gif" width="18" height="18" border="0" alt="{$lang_emotions_laughing}" title="{$lang_emotions_laughing}" /></a></td>
+		  </tr>
+		  <tr>
+			<td><a href="javascript:insertEmotion('smiley-money-mouth.gif','lang_emotions_money_mouth');"><img src="images/smiley-money-mouth.gif" width="18" height="18" border="0" alt="{$lang_emotions_money_mouth}" title="{$lang_emotions_money_mouth}" /></a></td>
+			<td><a href="javascript:insertEmotion('smiley-sealed.gif','lang_emotions_sealed');"><img src="images/smiley-sealed.gif" width="18" height="18" border="0" alt="{$lang_emotions_sealed}" title="{$lang_emotions_sealed}" /></a></td>
+			<td><a href="javascript:insertEmotion('smiley-smile.gif','lang_emotions_smile');"><img src="images/smiley-smile.gif" width="18" height="18" border="0" alt="{$lang_emotions_smile}" title="{$lang_emotions_smile}" /></a></td>
+			<td><a href="javascript:insertEmotion('smiley-surprised.gif','lang_emotions_surprised');"><img src="images/smiley-surprised.gif" width="18" height="18" border="0" alt="{$lang_emotions_surprised}" title="{$lang_emotions_surprised}" /></a></td>
+		  </tr>
+		  <tr>
+			<td><a href="javascript:insertEmotion('smiley-tongue-out.gif','lang_emotions_tongue_out');"><img src="images/smiley-tongue-out.gif" width="18" height="18" border="0" alt="{$lang_emotions_tongue-out}" title="{$lang_emotions_tongue_out}" /></a></td>
+			<td><a href="javascript:insertEmotion('smiley-undecided.gif','lang_emotions_undecided');"><img src="images/smiley-undecided.gif" width="18" height="18" border="0" alt="{$lang_emotions_undecided}" title="{$lang_emotions_undecided}" /></a></td>
+			<td><a href="javascript:insertEmotion('smiley-wink.gif','lang_emotions_wink');"><img src="images/smiley-wink.gif" width="18" height="18" border="0" alt="{$lang_emotions_wink}" title="{$lang_emotions_wink}" /></a></td>
+			<td><a href="javascript:insertEmotion('smiley-yell.gif','lang_emotions_yell');"><img src="images/smiley-yell.gif" width="18" height="18" border="0" alt="{$lang_emotions_yell}" title="{$lang_emotions_yell}" /></a></td>
+		  </tr>
+		</table>
+	</div>
+</body>
+</html>

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/images/emotions.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/images/emotions.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/images/readme.txt
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/images/readme.txt	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/images/readme.txt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,2 @@
+These emotions where taken from Mozilla Thunderbird.
+I hope they don't get angry if I use them here after all this is a open source project aswell.

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/images/smiley-cool.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/images/smiley-cool.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/images/smiley-cry.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/images/smiley-cry.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/images/smiley-embarassed.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/images/smiley-embarassed.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/images/smiley-foot-in-mouth.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/images/smiley-foot-in-mouth.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/images/smiley-frown.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/images/smiley-frown.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/images/smiley-innocent.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/images/smiley-innocent.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/images/smiley-kiss.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/images/smiley-kiss.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/images/smiley-laughing.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/images/smiley-laughing.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/images/smiley-money-mouth.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/images/smiley-money-mouth.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/images/smiley-sealed.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/images/smiley-sealed.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/images/smiley-smile.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/images/smiley-smile.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/images/smiley-surprised.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/images/smiley-surprised.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/images/smiley-tongue-out.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/images/smiley-tongue-out.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/images/smiley-undecided.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/images/smiley-undecided.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/images/smiley-wink.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/images/smiley-wink.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/images/smiley-yell.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/images/smiley-yell.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/jscripts/functions.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/jscripts/functions.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/jscripts/functions.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,21 @@
+function init() {
+	tinyMCEPopup.resizeToInnerSize();
+}
+
+function insertEmotion(file_name, title) {
+	title = tinyMCE.getLang(title);
+
+	if (title == null)
+		title = "";
+
+	// XML encode
+	title = title.replace(/&/g, '&amp;');
+	title = title.replace(/\"/g, '&quot;');
+	title = title.replace(/</g, '&lt;');
+	title = title.replace(/>/g, '&gt;');
+
+	var html = '<img src="' + tinyMCE.baseURL + "/plugins/emotions/images/" + file_name + '" mce_src="' + tinyMCE.baseURL + "/plugins/emotions/images/" + file_name + '" border="0" alt="' + title + '" title="' + title + '" />';
+
+	tinyMCE.execCommand('mceInsertContent', false, html);
+	tinyMCEPopup.close();
+}

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/langs/en.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/langs/en.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/langs/en.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,22 @@
+// UK lang variables
+
+tinyMCE.addToLang('emotions',{
+title : 'Insert emotion',
+desc : 'Emotions',
+cool : 'Cool',
+cry : 'Cry',
+embarassed : 'Embarassed',
+foot_in_mouth : 'Foot in mouth',
+frown : 'Frown',
+innocent : 'Innocent',
+kiss : 'Kiss',
+laughing : 'Laughing',
+money_mouth : 'Money mouth',
+sealed : 'Sealed',
+smile : 'Smile',
+surprised : 'Surprised',
+tongue_out : 'Tongue out',
+undecided : 'Undecided',
+wink : 'Wink',
+yell : 'Yell'
+});

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/readme.txt
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/readme.txt	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/emotions/readme.txt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1 @@
+Check the TinyMCE documentation for details on this plugin.

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/flash/css/content.css
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/flash/css/content.css	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/flash/css/content.css	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,7 @@
+.mceItemFlash {
+	border: 1px dotted #cc0000;
+	background-image: url('../images/flash.gif');
+	background-position: center;
+	background-repeat: no-repeat;
+	background-color: #ffffcc;
+}

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/flash/css/flash.css
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/flash/css/flash.css	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/flash/css/flash.css	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,11 @@
+.panel_wrapper div.current {
+	height: 100px;
+}
+
+#width, #height {
+	width: 50px;
+}
+
+#file {
+	width: 250px;
+}

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/flash/editor_plugin.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/flash/editor_plugin.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/flash/editor_plugin.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1 @@
+tinyMCE.importPluginLanguagePack('flash','en,tr,de,sv,zh_cn,cs,fa,fr_ca,fr,pl,pt_br,nl,da,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,es,cy,is,zh_tw,zh_tw_utf8,sk,pt_br');var TinyMCE_FlashPlugin={getInfo:function(){return{longname:'Flash',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_flash.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};},initInstance:function(inst){if(!tinyMCE.settings['flash_skip_plugin_css'])tinyMCE.importCSS(inst.getDoc(),tinyMCE.baseURL+"/plugins/flash/css/content.css");},getControlHTML:function(cn){switch(cn){case"flash":return tinyMCE.getButtonHTML(cn,'lang_flash_desc','{$pluginurl}/images/flash.gif','mceFlash');}return"";},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case"mceFlash":var name="",swffile="",swfwidth="",swfheight="",action="insert";var template=new Array();var inst=tinyMCE.getInstanceById(editor_id);var focusElm=inst.getFocusElement();template['file']='../../plugins/flash/flash.htm';template['width']=430;template['height']=175;template['width']+=tinyMCE.getLang('lang_flash_delta_width',0);template['height']+=tinyMCE.getLang('lang_flash_delta_height',0);if(focusElm!=null&&focusElm.nodeName.toLowerCase()=="img"){name=tinyMCE.getAttrib(focusElm,'class');if(name.indexOf('mceItemFlash')==-1)return true;swffile=tinyMCE.getAttrib(focusElm,'alt');if(tinyMCE.getParam('convert_urls'))swffile=eval(tinyMCE.settings['urlconverter_callback']+"(swffile, null, true);");swfwidth=tinyMCE.getAttrib(focusElm,'width');swfheight=tinyMCE.getAttrib(focusElm,'height');action="update";}tinyMCE.openWindow(template,{editor_id:editor_id,inline:"yes",swffile:swffile,swfwidth:swfwidth,swfheight:swfheight,action:action});return true;}return false;},cleanup:function(type,content){switch(type){case"insert_to_editor_dom":if(tinyMCE.getParam('convert_urls')){var imgs=content.getElementsByTagName("img");for(var i=0;i<imgs.length;i++){if(tinyMCE.getAttrib(imgs[i],"class")=="mceItemFlash"){var src=tinyMCE.getAttrib(imgs[i],"alt");if(tinyMCE.getParam('convert_urls'))src=eval(tinyMCE.settings['urlconverter_callback']+"(src, null, true);");imgs[i].setAttribute('alt',src);imgs[i].setAttribute('title',src);}}}break;case"get_from_editor_dom":var imgs=content.getElementsByTagName("img");for(var i=0;i<imgs.length;i++){if(tinyMCE.getAttrib(imgs[i],"class")=="mceItemFlash"){var src=tinyMCE.getAttrib(imgs[i],"alt");if(tinyMCE.getParam('convert_urls'))src=eval(tinyMCE.settings['urlconverter_callback']+"(src, null, true);");imgs[i].setAttribute('alt',src);imgs[i].setAttribute('title',src);}}break;case"insert_to_editor":var startPos=0;var embedList=new Array();content=content.replace(new RegExp('<[ ]*embed','gi'),'<embed');content=content.replace(new RegExp('<[ ]*/embed[ ]*>','gi'),'</embed>');content=content.replace(new RegExp('<[ ]*object','gi'),'<object');content=content.replace(new RegExp('<[ ]*/object[ ]*>','gi'),'</object>');while((startPos=content.indexOf('<embed',startPos+1))!=-1){var endPos=content.indexOf('>',startPos);var attribs=TinyMCE_FlashPlugin._parseAttributes(content.substring(startPos+6,endPos));embedList[embedList.length]=attribs;}var index=0;while((startPos=content.indexOf('<object',startPos))!=-1){if(index>=embedList.length)break;var attribs=embedList[index];endPos=content.indexOf('</object>',startPos);endPos+=9;var contentAfter=content.substring(endPos);content=content.substring(0,startPos);content+='<img width="'+attribs["width"]+'" height="'+attribs["height"]+'"';content+=' src="'+(tinyMCE.getParam("theme_href")+'/images/spacer.gif')+'" title="'+attribs["src"]+'"';content+=' alt="'+attribs["src"]+'" class="mceItemFlash" />'+content.substring(endPos);content+=contentAfter;index++;startPos++;}var index=0;while((startPos=content.indexOf('<embed',startPos))!=-1){if(index>=embedList.length)break;var attribs=embedList[index];endPos=content.indexOf('>',startPos);endPos+=9;var contentAfter=content.substring(endPos);content=content.substring(0,startPos);content+='<img width="'+attribs["width"]+'" height="'+attribs["height"]+'"';content+=' src="'+(tinyMCE.getParam("theme_href")+'/images/spacer.gif')+'" title="'+attribs["src"]+'"';content+=' alt="'+attribs["src"]+'" class="mceItemFlash" />'+content.substring(endPos);content+=contentAfter;index++;startPos++;}break;case"get_from_editor":var startPos=-1;while((startPos=content.indexOf('<img',startPos+1))!=-1){var endPos=content.indexOf('/>',startPos);var attribs=TinyMCE_FlashPlugin._parseAttributes(content.substring(startPos+4,endPos));if(attribs['class']!="mceItemFlash")continue;endPos+=2;var embedHTML='';var wmode=tinyMCE.getParam("flash_wmode","");var quality=tinyMCE.getParam("flash_quality","high");var menu=tinyMCE.getParam("flash_menu","false");embedHTML+='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"';embedHTML+=' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"';embedHTML+=' width="'+attribs["width"]+'" height="'+attribs["height"]+'">';embedHTML+='<param name="movie" value="'+attribs["title"]+'" />';embedHTML+='<param name="quality" value="'+quality+'" />';embedHTML+='<param name="menu" value="'+menu+'" />';embedHTML+='<param name="wmode" value="'+wmode+'" />';embedHTML+='<embed src="'+attribs["title"]+'" wmode="'+wmode+'" quality="'+quality+'" menu="'+menu+'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+attribs["width"]+'" height="'+attribs["height"]+'"></embed></object>';chunkBefore=content.substring(0,startPos);chunkAfter=content.substring(endPos);content=chunkBefore+embedHTML+chunkAfter;}break;}return content;},handleNodeChange:function(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){if(node==null)return;do{if(node.nodeName=="IMG"&&tinyMCE.getAttrib(node,'class').indexOf('mceItemFlash')==0){tinyMCE.switchClass(editor_id+'_flash','mceButtonSelected');return true;}}while((node=node.parentNode));tinyMCE.switchClass(editor_id+'_flash','mceButtonNormal');return true;},_parseAttributes:function(attribute_string){var attributeName="";var attributeValue="";var withInName;var withInValue;var attributes=new Array();var whiteSpaceRegExp=new RegExp('^[ \n\r\t]+','g');if(attribute_string==null||attribute_string.length<2)return null;withInName=withInValue=false;for(var i=0;i<attribute_string.length;i++){var chr=attribute_string.charAt(i);if((chr=='"'||chr=="'")&&!withInValue)withInValue=true;else if((chr=='"'||chr=="'")&&withInValue){withInValue=false;var pos=attributeName.lastIndexOf(' ');if(pos!=-1)attributeName=attributeName.substring(pos+1);attributes[attributeName.toLowerCase()]=attributeValue.substring(1);attributeName="";attributeValue="";}else if(!whiteSpaceRegExp.test(chr)&&!withInName&&!withInValue)withInName=true;if(chr=='='&&withInName)withInName=false;if(withInName)attributeName+=chr;if(withInValue)attributeValue+=chr;}return attributes;}};tinyMCE.addPlugin("flash",TinyMCE_FlashPlugin);
\ No newline at end of file

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/flash/editor_plugin_src.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/flash/editor_plugin_src.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/flash/editor_plugin_src.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,287 @@
+/**
+ * $RCSfile: editor_plugin_src.js,v $
+ * $Revision: 1.34 $
+ * $Date: 2006/02/10 16:29:39 $
+ *
+ * @author Moxiecode
+ * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
+ */
+
+/* Import plugin specific language pack */
+tinyMCE.importPluginLanguagePack('flash', 'en,tr,de,sv,zh_cn,cs,fa,fr_ca,fr,pl,pt_br,nl,da,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,es,cy,is,zh_tw,zh_tw_utf8,sk,pt_br');
+
+var TinyMCE_FlashPlugin = {
+	getInfo : function() {
+		return {
+			longname : 'Flash',
+			author : 'Moxiecode Systems',
+			authorurl : 'http://tinymce.moxiecode.com',
+			infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_flash.html',
+			version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
+		};
+	},
+
+	initInstance : function(inst) {
+		if (!tinyMCE.settings['flash_skip_plugin_css'])
+			tinyMCE.importCSS(inst.getDoc(), tinyMCE.baseURL + "/plugins/flash/css/content.css");
+	},
+
+	getControlHTML : function(cn) {
+		switch (cn) {
+			case "flash":
+				return tinyMCE.getButtonHTML(cn, 'lang_flash_desc', '{$pluginurl}/images/flash.gif', 'mceFlash');
+		}
+
+		return "";
+	},
+
+	execCommand : function(editor_id, element, command, user_interface, value) {
+		// Handle commands
+		switch (command) {
+			case "mceFlash":
+				var name = "", swffile = "", swfwidth = "", swfheight = "", action = "insert";
+				var template = new Array();
+				var inst = tinyMCE.getInstanceById(editor_id);
+				var focusElm = inst.getFocusElement();
+
+				template['file']   = '../../plugins/flash/flash.htm'; // Relative to theme
+				template['width']  = 430;
+				template['height'] = 175;
+
+				template['width'] += tinyMCE.getLang('lang_flash_delta_width', 0);
+				template['height'] += tinyMCE.getLang('lang_flash_delta_height', 0);
+
+				// Is selection a image
+				if (focusElm != null && focusElm.nodeName.toLowerCase() == "img") {
+					name = tinyMCE.getAttrib(focusElm, 'class');
+
+					if (name.indexOf('mceItemFlash') == -1) // Not a Flash
+						return true;
+
+					// Get rest of Flash items
+					swffile = tinyMCE.getAttrib(focusElm, 'alt');
+
+					if (tinyMCE.getParam('convert_urls'))
+						swffile = eval(tinyMCE.settings['urlconverter_callback'] + "(swffile, null, true);");
+
+					swfwidth = tinyMCE.getAttrib(focusElm, 'width');
+					swfheight = tinyMCE.getAttrib(focusElm, 'height');
+					action = "update";
+				}
+
+				tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes", swffile : swffile, swfwidth : swfwidth, swfheight : swfheight, action : action});
+			return true;
+	   }
+
+	   // Pass to next handler in chain
+	   return false;
+	},
+
+	cleanup : function(type, content) {
+		switch (type) {
+			case "insert_to_editor_dom":
+				// Force relative/absolute
+				if (tinyMCE.getParam('convert_urls')) {
+					var imgs = content.getElementsByTagName("img");
+					for (var i=0; i<imgs.length; i++) {
+						if (tinyMCE.getAttrib(imgs[i], "class") == "mceItemFlash") {
+							var src = tinyMCE.getAttrib(imgs[i], "alt");
+
+							if (tinyMCE.getParam('convert_urls'))
+								src = eval(tinyMCE.settings['urlconverter_callback'] + "(src, null, true);");
+
+							imgs[i].setAttribute('alt', src);
+							imgs[i].setAttribute('title', src);
+						}
+					}
+				}
+				break;
+
+			case "get_from_editor_dom":
+				var imgs = content.getElementsByTagName("img");
+				for (var i=0; i<imgs.length; i++) {
+					if (tinyMCE.getAttrib(imgs[i], "class") == "mceItemFlash") {
+						var src = tinyMCE.getAttrib(imgs[i], "alt");
+
+						if (tinyMCE.getParam('convert_urls'))
+							src = eval(tinyMCE.settings['urlconverter_callback'] + "(src, null, true);");
+
+						imgs[i].setAttribute('alt', src);
+						imgs[i].setAttribute('title', src);
+					}
+				}
+				break;
+
+			case "insert_to_editor":
+				var startPos = 0;
+				var embedList = new Array();
+
+				// Fix the embed and object elements
+				content = content.replace(new RegExp('<[ ]*embed','gi'),'<embed');
+				content = content.replace(new RegExp('<[ ]*/embed[ ]*>','gi'),'</embed>');
+				content = content.replace(new RegExp('<[ ]*object','gi'),'<object');
+				content = content.replace(new RegExp('<[ ]*/object[ ]*>','gi'),'</object>');
+
+				// Parse all embed tags
+				while ((startPos = content.indexOf('<embed', startPos+1)) != -1) {
+					var endPos = content.indexOf('>', startPos);
+					var attribs = TinyMCE_FlashPlugin._parseAttributes(content.substring(startPos + 6, endPos));
+					embedList[embedList.length] = attribs;
+				}
+
+				// Parse all object tags and replace them with images from the embed data
+				var index = 0;
+				while ((startPos = content.indexOf('<object', startPos)) != -1) {
+					if (index >= embedList.length)
+						break;
+
+					var attribs = embedList[index];
+
+					// Find end of object
+					endPos = content.indexOf('</object>', startPos);
+					endPos += 9;
+
+					// Insert image
+					var contentAfter = content.substring(endPos);
+					content = content.substring(0, startPos);
+					content += '<img width="' + attribs["width"] + '" height="' + attribs["height"] + '"';
+					content += ' src="' + (tinyMCE.getParam("theme_href") + '/images/spacer.gif') + '" title="' + attribs["src"] + '"';
+					content += ' alt="' + attribs["src"] + '" class="mceItemFlash" />' + content.substring(endPos);
+					content += contentAfter;
+					index++;
+
+					startPos++;
+				}
+
+				// Parse all embed tags and replace them with images from the embed data
+				var index = 0;
+				while ((startPos = content.indexOf('<embed', startPos)) != -1) {
+					if (index >= embedList.length)
+						break;
+
+					var attribs = embedList[index];
+
+					// Find end of embed
+					endPos = content.indexOf('>', startPos);
+					endPos += 9;
+
+					// Insert image
+					var contentAfter = content.substring(endPos);
+					content = content.substring(0, startPos);
+					content += '<img width="' + attribs["width"] + '" height="' + attribs["height"] + '"';
+					content += ' src="' + (tinyMCE.getParam("theme_href") + '/images/spacer.gif') + '" title="' + attribs["src"] + '"';
+					content += ' alt="' + attribs["src"] + '" class="mceItemFlash" />' + content.substring(endPos);
+					content += contentAfter;
+					index++;
+
+					startPos++;
+				}
+
+				break;
+
+			case "get_from_editor":
+				// Parse all img tags and replace them with object+embed
+				var startPos = -1;
+
+				while ((startPos = content.indexOf('<img', startPos+1)) != -1) {
+					var endPos = content.indexOf('/>', startPos);
+					var attribs = TinyMCE_FlashPlugin._parseAttributes(content.substring(startPos + 4, endPos));
+
+					// Is not flash, skip it
+					if (attribs['class'] != "mceItemFlash")
+						continue;
+
+					endPos += 2;
+
+					var embedHTML = '';
+					var wmode = tinyMCE.getParam("flash_wmode", "");
+					var quality = tinyMCE.getParam("flash_quality", "high");
+					var menu = tinyMCE.getParam("flash_menu", "false");
+
+					// Insert object + embed
+					embedHTML += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"';
+					embedHTML += ' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"';
+					embedHTML += ' width="' + attribs["width"] + '" height="' + attribs["height"] + '">';
+					embedHTML += '<param name="movie" value="' + attribs["title"] + '" />';
+					embedHTML += '<param name="quality" value="' + quality + '" />';
+					embedHTML += '<param name="menu" value="' + menu + '" />';
+					embedHTML += '<param name="wmode" value="' + wmode + '" />';
+					embedHTML += '<embed src="' + attribs["title"] + '" wmode="' + wmode + '" quality="' + quality + '" menu="' + menu + '" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + attribs["width"] + '" height="' + attribs["height"] + '"></embed></object>';
+
+					// Insert embed/object chunk
+					chunkBefore = content.substring(0, startPos);
+					chunkAfter = content.substring(endPos);
+					content = chunkBefore + embedHTML + chunkAfter;
+				}
+				break;
+		}
+
+		// Pass through to next handler in chain
+		return content;
+	},
+
+	handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {
+		if (node == null)
+			return;
+
+		do {
+			if (node.nodeName == "IMG" && tinyMCE.getAttrib(node, 'class').indexOf('mceItemFlash') == 0) {
+				tinyMCE.switchClass(editor_id + '_flash', 'mceButtonSelected');
+				return true;
+			}
+		} while ((node = node.parentNode));
+
+		tinyMCE.switchClass(editor_id + '_flash', 'mceButtonNormal');
+
+		return true;
+	},
+
+	// Private plugin internal functions
+
+	_parseAttributes : function(attribute_string) {
+		var attributeName = "";
+		var attributeValue = "";
+		var withInName;
+		var withInValue;
+		var attributes = new Array();
+		var whiteSpaceRegExp = new RegExp('^[ \n\r\t]+', 'g');
+
+		if (attribute_string == null || attribute_string.length < 2)
+			return null;
+
+		withInName = withInValue = false;
+
+		for (var i=0; i<attribute_string.length; i++) {
+			var chr = attribute_string.charAt(i);
+
+			if ((chr == '"' || chr == "'") && !withInValue)
+				withInValue = true;
+			else if ((chr == '"' || chr == "'") && withInValue) {
+				withInValue = false;
+
+				var pos = attributeName.lastIndexOf(' ');
+				if (pos != -1)
+					attributeName = attributeName.substring(pos+1);
+
+				attributes[attributeName.toLowerCase()] = attributeValue.substring(1);
+
+				attributeName = "";
+				attributeValue = "";
+			} else if (!whiteSpaceRegExp.test(chr) && !withInName && !withInValue)
+				withInName = true;
+
+			if (chr == '=' && withInName)
+				withInName = false;
+
+			if (withInName)
+				attributeName += chr;
+
+			if (withInValue)
+				attributeValue += chr;
+		}
+
+		return attributes;
+	}
+};
+
+tinyMCE.addPlugin("flash", TinyMCE_FlashPlugin);

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/flash/flash.htm
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/flash/flash.htm	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/flash/flash.htm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,70 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+	<title>{$lang_flash_title}</title>
+	<script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
+	<script language="javascript" type="text/javascript" src="jscripts/flash.js"></script>
+	<script language="javascript" type="text/javascript" src="../../utils/mctabs.js"></script>
+	<script language="javascript" type="text/javascript" src="../../utils/form_utils.js"></script>
+	<link href="css/flash.css" rel="stylesheet" type="text/css" />
+	<base target="_self" />
+</head>
+<body onload="tinyMCEPopup.executeOnLoad('init();');" style="display: none">
+    <form onsubmit="insertFlash();return false;" action="#">
+		<div class="tabs">
+			<ul>
+				<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{$lang_flash_general}</a></span></li>
+			</ul>
+		</div>
+
+		<div class="panel_wrapper">
+			<div id="general_panel" class="panel current">
+				<fieldset>
+					<legend>{$lang_flash_general}</legend>
+
+					<table border="0" cellpadding="4" cellspacing="0">
+							<tr>
+							<td nowrap="nowrap"><label for="file">{$lang_flash_file}</label></td>
+							  <td nowrap="nowrap">
+									<table border="0" cellspacing="0" cellpadding="0">
+									  <tr>
+										<td><input id="file" name="file" type="text" value="" onfocus="this.select();" /></td>
+										<td id="filebrowsercontainer">&nbsp;</td>
+									  </tr>
+									</table>
+								</td>
+							</tr>
+							<tr id="linklistrow">
+								<td><label for="linklist">{$lang_flash_list}</label></td>
+								<td id="linklistcontainer">&nbsp;</td>
+							</tr>
+							<tr>
+								<td nowrap="nowrap"><label>{$lang_flash_size}</label></td>
+								<td nowrap="nowrap">
+									<input type="text" id="width" name="width" value="" onfocus="this.select();" />
+									<select name="width2" id="width2" style="width: 50px">
+										<option value="">px</option>
+										<option value="%">%</option>
+									</select>&nbsp;x&nbsp;<input id="height" name="height" type="text"  value="" onfocus="this.select();" />
+									<select name="height2" id="height2" style="width: 50px">
+										<option value="">px</option>
+										<option value="%">%</option>
+									</select>
+								</td>
+							</tr>
+					</table>
+				</fieldset>
+			</div>
+		</div>
+
+		<div class="mceActionPanel">
+			<div style="float: left">
+				<input type="button" id="insert" name="insert" value="{$lang_insert}" onclick="insertFlash();" />
+			</div>
+
+			<div style="float: right">
+				<input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onclick="tinyMCEPopup.close();" />
+			</div>
+		</div>
+	</form>
+</body>
+</html>

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/flash/images/flash.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/flash/images/flash.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/flash/jscripts/flash.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/flash/jscripts/flash.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/flash/jscripts/flash.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,107 @@
+var url = tinyMCE.getParam("flash_external_list_url");
+if (url != null) {
+	// Fix relative
+	if (url.charAt(0) != '/' && url.indexOf('://') == -1)
+		url = tinyMCE.documentBasePath + "/" + url;
+
+	document.write('<sc'+'ript language="javascript" type="text/javascript" src="' + url + '"></sc'+'ript>');
+}
+
+function init() {
+	tinyMCEPopup.resizeToInnerSize();
+
+	document.getElementById("filebrowsercontainer").innerHTML = getBrowserHTML('filebrowser','file','flash','flash');
+
+	// Image list outsrc
+	var html = getFlashListHTML('filebrowser','file','flash','flash');
+	if (html == "")
+		document.getElementById("linklistrow").style.display = 'none';
+	else
+		document.getElementById("linklistcontainer").innerHTML = html;
+
+	var formObj = document.forms[0];
+	var swffile   = tinyMCE.getWindowArg('swffile');
+	var swfwidth  = '' + tinyMCE.getWindowArg('swfwidth');
+	var swfheight = '' + tinyMCE.getWindowArg('swfheight');
+
+	if (swfwidth.indexOf('%')!=-1) {
+		formObj.width2.value = "%";
+		formObj.width.value  = swfwidth.substring(0,swfwidth.length-1);
+	} else {
+		formObj.width2.value = "px";
+		formObj.width.value  = swfwidth;
+	}
+
+	if (swfheight.indexOf('%')!=-1) {
+		formObj.height2.value = "%";
+		formObj.height.value  = swfheight.substring(0,swfheight.length-1);
+	} else {
+		formObj.height2.value = "px";
+		formObj.height.value  = swfheight;
+	}
+
+	formObj.file.value = swffile;
+	formObj.insert.value = tinyMCE.getLang('lang_' + tinyMCE.getWindowArg('action'), 'Insert', true);
+
+	selectByValue(formObj, 'linklist', swffile);
+
+	// Handle file browser
+	if (isVisible('filebrowser'))
+		document.getElementById('file').style.width = '230px';
+
+	// Auto select flash in list
+	if (typeof(tinyMCEFlashList) != "undefined" && tinyMCEFlashList.length > 0) {
+		for (var i=0; i<formObj.linklist.length; i++) {
+			if (formObj.linklist.options[i].value == tinyMCE.getWindowArg('swffile'))
+				formObj.linklist.options[i].selected = true;
+		}
+	}
+}
+
+function getFlashListHTML() {
+	if (typeof(tinyMCEFlashList) != "undefined" && tinyMCEFlashList.length > 0) {
+		var html = "";
+
+		html += '<select id="linklist" name="linklist" style="width: 250px" onfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="this.form.file.value=this.options[this.selectedIndex].value;">';
+		html += '<option value="">---</option>';
+
+		for (var i=0; i<tinyMCEFlashList.length; i++)
+			html += '<option value="' + tinyMCEFlashList[i][1] + '">' + tinyMCEFlashList[i][0] + '</option>';
+
+		html += '</select>';
+
+		return html;
+	}
+
+	return "";
+}
+
+function insertFlash() {
+	var formObj = document.forms[0];
+	var html      = '';
+	var file      = formObj.file.value;
+	var width     = formObj.width.value;
+	var height    = formObj.height.value;
+	if (formObj.width2.value=='%') {
+		width = width + '%';
+	}
+	if (formObj.height2.value=='%') {
+		height = height + '%';
+	}
+
+	if (width == "")
+		width = 100;
+
+	if (height == "")
+		height = 100;
+
+	html += ''
+		+ '<img src="' + (tinyMCE.getParam("theme_href") + "/images/spacer.gif") + '" mce_src="' + (tinyMCE.getParam("theme_href") + "/images/spacer.gif") + '" '
+		+ 'width="' + width + '" height="' + height + '" '
+		+ 'border="0" alt="' + file + '" title="' + file + '" class="mceItemFlash" />';
+
+	tinyMCEPopup.execCommand("mceInsertContent", true, html);
+	tinyMCE.selectedInstance.repaint();
+
+	tinyMCEPopup.close();
+}

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/flash/langs/en.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/flash/langs/en.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/flash/langs/en.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,11 @@
+// UK lang variables
+
+tinyMCE.addToLang('flash',{
+title : 'Insert / edit Flash Movie',
+desc : 'Insert / edit Flash Movie',
+file : 'Flash-File (.swf)',
+size : 'Size',
+list : 'Flash files',
+props : 'Flash properties',
+general : 'General'
+});

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/flash/readme.txt
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/flash/readme.txt	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/flash/readme.txt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1 @@
+Check the TinyMCE documentation for details on this plugin.

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullpage/blank.htm
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullpage/blank.htm	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullpage/blank.htm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,9 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+	<title>blank_page</title>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+</head>
+<body onload="parent.setupIframe(document);">
+
+</body>
+</html>

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullpage/css/fullpage.css
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullpage/css/fullpage.css	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullpage/css/fullpage.css	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,172 @@
+/* Hide the advanced tab */
+#advanced_tab {
+	display: none;
+}
+
+#metatitle, #metakeywords, #metadescription, #metaauthor, #metacopyright {
+	width: 280px;
+}
+
+#doctype, #docencoding {
+	width: 200px;
+}
+
+#langcode {
+	width: 30px;
+}
+
+#bgimage {
+	width: 220px;	
+}
+
+#fontface {
+	width: 240px;
+}
+
+#leftmargin, #rightmargin, #topmargin, #bottommargin {
+	width: 50px;
+}
+
+.panel_wrapper div.current {
+	height: 400px;
+}
+
+#stylesheet, #style {
+	width: 240px;
+}
+
+/* Head list classes */
+
+.headlistwrapper {
+	width: 100%;
+}
+
+.addbutton, .removebutton, .moveupbutton, .movedownbutton {
+	border-top: 1px solid;
+	border-left: 1px solid;
+	border-bottom: 1px solid;
+	border-right: 1px solid;
+	border-color: #F0F0EE;
+	cursor: default;
+	display: block;
+	width: 20px;
+	height: 20px;
+}
+
+.addbutton:hover, .removebutton:hover, .moveupbutton:hover, .movedownbutton:hover {
+	border: 1px solid #0A246A;
+	background-color: #B6BDD2;
+}
+
+.addbutton {
+	background-image: url('../images/add.gif');
+	float: left;
+	margin-right: 3px;
+}
+
+.removebutton {
+	background-image: url('../images/remove.gif');
+	float: left;
+}
+
+.moveupbutton {
+	background-image: url('../images/move_up.gif');
+	float: left;
+	margin-right: 3px;
+}
+
+.movedownbutton {
+	background-image: url('../images/move_down.gif');
+	float: left;
+}
+
+.selected {
+	border: 1px solid #0A246A;
+	background-color: #B6BDD2;
+}
+
+.toolbar {
+	width: 100%;
+}
+
+#headlist {
+	width: 100%;
+	margin-top: 3px;
+	font-size: 11px;
+}
+
+#info, #title_element, #meta_element, #script_element, #style_element, #base_element, #link_element, #comment_element, #unknown_element {
+	display: none;
+}
+
+#addmenu {
+	position: absolute;
+	border: 1px solid gray;
+	display: none;
+	z-index: 100;
+	background-color: white;
+}
+
+#addmenu a {
+	display: block;
+	width: 100%;
+	line-height: 20px;
+	text-decoration: none;
+	background-color: white;
+}
+
+#addmenu a:hover {
+	background-color: #B6BDD2;
+	color: black;
+}
+
+#addmenu span {
+	padding-left: 10px;
+	padding-right: 10px;
+}
+
+#updateElementPanel {
+	display: none;
+}
+
+#script_element .panel_wrapper div.current {
+	height: 108px;
+}
+
+#style_element .panel_wrapper div.current {
+	height: 108px;
+}
+
+#link_element  .panel_wrapper div.current {
+	height: 140px;
+}
+
+#element_script_value {
+	width: 100%;
+	height: 100px;
+}
+
+#element_comment_value {
+	width: 100%;
+	height: 120px;
+}
+
+#element_style_value {
+	width: 100%;
+	height: 100px;
+}
+
+#element_title, #element_script_src, #element_meta_name, #element_meta_content, #element_base_href, #element_link_href, #element_link_title {
+	width: 250px;
+}
+
+.updateElementButton {
+	margin-top: 3px;
+}
+
+/* MSIE specific styles */
+
+* html .addbutton, * html .removebutton, * html .moveupbutton, * html .movedownbutton {
+	width: 22px;
+	height: 22px;
+}

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullpage/editor_plugin.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullpage/editor_plugin.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullpage/editor_plugin.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1 @@
+tinyMCE.importPluginLanguagePack('fullpage','en,tr,sv');var TinyMCE_FullPagePlugin={getInfo:function(){return{longname:'Fullpage',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_fullpage.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};},getControlHTML:function(cn){switch(cn){case"fullpage":return tinyMCE.getButtonHTML(cn,'lang_fullpage_desc','{$pluginurl}/images/fullpage.gif','mceFullPageProperties');}return"";},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case"mceFullPageProperties":var template=new Array();template['file']='../../plugins/fullpage/fullpage.htm';template['width']=430;template['height']=485+(tinyMCE.isOpera?5:0);template['width']+=tinyMCE.getLang('lang_fullpage_delta_width',0);template['height']+=tinyMCE.getLang('lang_fullpage_delta_height',0);tinyMCE.openWindow(template,{editor_id:editor_id,inline:"yes"});return true;case"mceFullPageUpdate":TinyMCE_FullPagePlugin._addToHead(tinyMCE.getInstanceById(editor_id));return true;}return false;},cleanup:function(type,content,inst){switch(type){case"insert_to_editor":var tmp=content.toLowerCase();var pos=tmp.indexOf('<body'),pos2;if(pos!=-1){pos=tmp.indexOf('>',pos);pos2=tmp.lastIndexOf('</body>');inst.fullpageTopContent=content.substring(0,pos+1);content=content.substring(pos+1,pos2);}else{if(!inst.fullpageTopContent){var docType=tinyMCE.getParam("fullpage_default_doctype",'<!DOCTYPE html PUBLIC "-/'+'/W3C//DTD XHTML 1.0 Transitional/'+'/EN" "http:/'+'/www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">');var enc=tinyMCE.getParam("fullpage_default_encoding",'utf-8');var title=tinyMCE.getParam("fullpage_default_title",'Untitled document');var lang=tinyMCE.getParam("fullpage_default_langcode",'en');var pi=tinyMCE.getParam("fullpage_default_xml_pi",true);var ff=tinyMCE.getParam("fullpage_default_font_family","");var fz=tinyMCE.getParam("fullpage_default_font_size","");var ds=tinyMCE.getParam("fullpage_default_style","");var dtc=tinyMCE.getParam("fullpage_default_text_color","");title=title.replace(/&/g,'&amp;');title=title.replace(/\"/g,'&quot;');title=title.replace(/</g,'&lt;');title=title.replace(/>/g,'&gt;');tmp='';if(pi)tmp+='<?xml version="1.0" encoding="'+enc+'"?>\n';tmp+=docType+'\n';tmp+='<html xmlns="http:/'+'/www.w3.org/1999/xhtml" lang="'+lang+'" xml:lang="'+lang+'">\n';tmp+='<head>\n';tmp+='\t<title>'+title+'</title>\n';tmp+='\t<meta http-equiv="Content-Type" content="text/html; charset='+enc+'" />\n';tmp+='</head>\n';tmp+='<body';if(ff!=''||fz!=''){tmp+=' style="';if(ds!='')tmp+=ds+";";if(ff!='')tmp+='font-family: '+ff+";";if(fz!='')tmp+='font-size: '+fz+";";tmp+='"';}if(dtc!='')tmp+=' text="'+dtc+'"';tmp+='>\n';inst.fullpageTopContent=tmp;}}this._addToHead(inst);break;case"get_from_editor":if(inst.fullpageTopContent)content=inst.fullpageTopContent+content+"\n</body>\n</html>";break;}return content;},_addToHead:function(inst){var doc=inst.getDoc();var head=doc.getElementsByTagName("head")[0];var body=doc.body;var h=inst.fullpageTopContent;var e=doc.createElement("body");var nl,i,le,tmp;h=h.replace(/(\r|\n)/gi,'');h=h.replace(/<\?[^\>]*\>/gi,'');h=h.replace(/<\/?(!DOCTYPE|head|html)[^\>]*\>/gi,'');h=h.replace(/<script(.*?)<\/script>/gi,'');h=h.replace(/<title(.*?)<\/title>/gi,'');h=h.replace(/<(meta|base)[^>]*>/gi,'');h=h.replace(/<link([^>]*)\/>/gi,'<pre mce_type="link" $1></pre>');h=h.replace(/<body/gi,'<div mce_type="body"');h+='</div>';e.innerHTML=h;body.vLink=body.aLink=body.link=body.text='';body.style.cssText='';nl=head.getElementsByTagName('link');for(i=0;i<nl.length;i++){if(tinyMCE.getAttrib(nl[i],'mce_head')=="true")nl[i].parentNode.removeChild(nl[i]);}nl=e.getElementsByTagName('pre');for(i=0;i<nl.length;i++){tmp=tinyMCE.getAttrib(nl[i],'media');if(tinyMCE.getAttrib(nl[i],'mce_type')=="link"&&(tmp==""||tmp=="screen"||tmp=="all")&&tinyMCE.getAttrib(nl[i],'rel')=="stylesheet"){le=doc.createElement("link");le.rel="stylesheet";le.href=tinyMCE.getAttrib(nl[i],'href');le.setAttribute("mce_head","true");head.appendChild(le);}}nl=e.getElementsByTagName('div');if(nl.length>0){body.style.cssText=tinyMCE.getAttrib(nl[0],'style');if((tmp=tinyMCE.getAttrib(nl[0],'leftmargin'))!=''&&body.style.marginLeft=='')body.style.marginLeft=tmp+"px";if((tmp=tinyMCE.getAttrib(nl[0],'rightmargin'))!=''&&body.style.marginRight=='')body.style.marginRight=tmp+"px";if((tmp=tinyMCE.getAttrib(nl[0],'topmargin'))!=''&&body.style.marginTop=='')body.style.marginTop=tmp+"px";if((tmp=tinyMCE.getAttrib(nl[0],'bottommargin'))!=''&&body.style.marginBottom=='')body.style.marginBottom=tmp+"px";body.dir=tinyMCE.getAttrib(nl[0],'dir');body.vLink=tinyMCE.getAttrib(nl[0],'vlink');body.aLink=tinyMCE.getAttrib(nl[0],'alink');body.link=tinyMCE.getAttrib(nl[0],'link');body.text=tinyMCE.getAttrib(nl[0],'text');if((tmp=tinyMCE.getAttrib(nl[0],'background'))!='')body.style.backgroundImage=tmp;if((tmp=tinyMCE.getAttrib(nl[0],'bgcolor'))!='')body.style.backgroundColor=tmp;}}};tinyMCE.addPlugin("fullpage",TinyMCE_FullPagePlugin);
\ No newline at end of file

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullpage/editor_plugin_src.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullpage/editor_plugin_src.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullpage/editor_plugin_src.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,229 @@
+/**
+ * $RCSfile: editor_plugin_src.js,v $
+ * $Revision: 1.12 $
+ * $Date: 2006/02/23 16:16:34 $
+ *
+ * @author Moxiecode
+ * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
+ */
+
+/* Import plugin specific language pack */
+tinyMCE.importPluginLanguagePack('fullpage', 'en,tr,sv');
+
+var TinyMCE_FullPagePlugin = {
+	getInfo : function() {
+		return {
+			longname : 'Fullpage',
+			author : 'Moxiecode Systems',
+			authorurl : 'http://tinymce.moxiecode.com',
+			infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_fullpage.html',
+			version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
+		};
+	},
+
+	getControlHTML : function(cn) {
+		switch (cn) {
+			case "fullpage":
+				return tinyMCE.getButtonHTML(cn, 'lang_fullpage_desc', '{$pluginurl}/images/fullpage.gif', 'mceFullPageProperties');
+		}
+
+		return "";
+	},
+
+	execCommand : function(editor_id, element, command, user_interface, value) {
+		// Handle commands
+		switch (command) {
+			case "mceFullPageProperties":
+				var template = new Array();
+
+				template['file']   = '../../plugins/fullpage/fullpage.htm';
+				template['width']  = 430;
+				template['height'] = 485 + (tinyMCE.isOpera ? 5 : 0);
+
+				template['width'] += tinyMCE.getLang('lang_fullpage_delta_width', 0);
+				template['height'] += tinyMCE.getLang('lang_fullpage_delta_height', 0);
+
+				tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes"});
+			return true;
+
+			case "mceFullPageUpdate":
+				TinyMCE_FullPagePlugin._addToHead(tinyMCE.getInstanceById(editor_id));
+				return true;
+	   }
+
+	   // Pass to next handler in chain
+	   return false;
+	},
+
+	cleanup : function(type, content, inst) {
+		switch (type) {
+			case "insert_to_editor":
+				var tmp = content.toLowerCase();
+				var pos = tmp.indexOf('<body'), pos2;
+
+				// Split page in header and body chunks
+				if (pos != -1) {
+					pos = tmp.indexOf('>', pos);
+					pos2 = tmp.lastIndexOf('</body>');
+					inst.fullpageTopContent = content.substring(0, pos + 1);
+					content = content.substring(pos + 1, pos2);
+					// tinyMCE.debug(inst.fullpageTopContent, content);
+				} else {
+					if (!inst.fullpageTopContent) {
+						var docType = tinyMCE.getParam("fullpage_default_doctype", '<!DOCTYPE html PUBLIC "-/'+'/W3C//DTD XHTML 1.0 Transitional/'+'/EN" "http:/'+'/www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">');
+						var enc = tinyMCE.getParam("fullpage_default_encoding", 'utf-8');
+						var title = tinyMCE.getParam("fullpage_default_title", 'Untitled document');
+						var lang = tinyMCE.getParam("fullpage_default_langcode", 'en');
+						var pi = tinyMCE.getParam("fullpage_default_xml_pi", true);
+						var ff = tinyMCE.getParam("fullpage_default_font_family", "");
+						var fz = tinyMCE.getParam("fullpage_default_font_size", "");
+						var ds = tinyMCE.getParam("fullpage_default_style", "");
+						var dtc = tinyMCE.getParam("fullpage_default_text_color", "");
+
+						// Xml encode it
+						title = title.replace(/&/g, '&amp;');
+						title = title.replace(/\"/g, '&quot;');
+						title = title.replace(/</g, '&lt;');
+						title = title.replace(/>/g, '&gt;');
+
+						tmp = '';
+
+						// Make default chunk
+						if (pi)
+							tmp += '<?xml version="1.0" encoding="' + enc + '"?>\n';
+
+						tmp += docType + '\n';
+						tmp += '<html xmlns="http:/'+'/www.w3.org/1999/xhtml" lang="' + lang + '" xml:lang="' + lang + '">\n';
+						tmp += '<head>\n';
+						tmp += '\t<title>' + title + '</title>\n';
+						tmp += '\t<meta http-equiv="Content-Type" content="text/html; charset=' + enc + '" />\n';
+						tmp += '</head>\n';
+						tmp += '<body';
+
+						if (ff != '' || fz != '') {
+							tmp += ' style="';
+
+							if (ds != '')
+								tmp += ds + ";";
+
+							if (ff != '')
+								tmp += 'font-family: ' + ff + ";";
+
+							if (fz != '')
+								tmp += 'font-size: ' + fz + ";";
+
+							tmp += '"';
+						}
+
+						if (dtc != '')
+							tmp += ' text="' + dtc + '"';
+
+						tmp += '>\n';
+
+						inst.fullpageTopContent = tmp;
+					}
+				}
+
+				this._addToHead(inst);
+
+				break;
+
+			case "get_from_editor":
+				if (inst.fullpageTopContent)
+					content = inst.fullpageTopContent + content + "\n</body>\n</html>";
+
+				break;
+		}
+
+		// Pass through to next handler in chain
+		return content;
+	},
+
+	// Private plugin internal methods
+
+	_addToHead : function(inst) {
+		var doc = inst.getDoc();
+		var head = doc.getElementsByTagName("head")[0];
+		var body = doc.body;
+		var h = inst.fullpageTopContent;
+		var e = doc.createElement("body");
+		var nl, i, le, tmp;
+
+		// Remove stuff we don't want
+		h = h.replace(/(\r|\n)/gi, '');
+		h = h.replace(/<\?[^\>]*\>/gi, '');
+		h = h.replace(/<\/?(!DOCTYPE|head|html)[^\>]*\>/gi, '');
+		h = h.replace(/<script(.*?)<\/script>/gi, '');
+		h = h.replace(/<title(.*?)<\/title>/gi, '');
+		h = h.replace(/<(meta|base)[^>]*>/gi, '');
+
+		// Make link and style elements into pre
+		h = h.replace(/<link([^>]*)\/>/gi, '<pre mce_type="link" $1></pre>');
+		//h = h.replace(/<style([^>]*)>(.*?)<\/style>/gi, '<pre mce_type="style" $1>$2</pre>');
+
+		// Make body a div
+		h = h.replace(/<body/gi, '<div mce_type="body"');
+		h += '</div>';
+
+		// Now crapy MSIE can parse it
+		e.innerHTML = h;
+
+		// Reset all body attributes
+		body.vLink = body.aLink = body.link = body.text = '';
+		body.style.cssText = '';
+
+		// Delete all old links
+		nl = head.getElementsByTagName('link');
+		for (i=0; i<nl.length; i++) {
+			if (tinyMCE.getAttrib(nl[i], 'mce_head') == "true")
+				nl[i].parentNode.removeChild(nl[i]);
+		}
+
+		// Add link elements
+		nl = e.getElementsByTagName('pre');
+		for (i=0; i<nl.length; i++) {
+			tmp = tinyMCE.getAttrib(nl[i], 'media');
+			if (tinyMCE.getAttrib(nl[i], 'mce_type') == "link" && (tmp == "" || tmp == "screen" || tmp == "all") && tinyMCE.getAttrib(nl[i], 'rel') == "stylesheet") {
+				le = doc.createElement("link");
+
+				le.rel = "stylesheet";
+				le.href = tinyMCE.getAttrib(nl[i], 'href');
+				le.setAttribute("mce_head", "true");
+
+				head.appendChild(le);
+			}
+		}
+
+		// Add body attributes
+		nl = e.getElementsByTagName('div');
+		if (nl.length > 0) {
+			body.style.cssText = tinyMCE.getAttrib(nl[0], 'style');
+
+			if ((tmp = tinyMCE.getAttrib(nl[0], 'leftmargin')) != '' && body.style.marginLeft == '')
+				body.style.marginLeft = tmp + "px";
+
+			if ((tmp = tinyMCE.getAttrib(nl[0], 'rightmargin')) != '' && body.style.marginRight == '')
+				body.style.marginRight = tmp + "px";
+
+			if ((tmp = tinyMCE.getAttrib(nl[0], 'topmargin')) != '' && body.style.marginTop == '')
+				body.style.marginTop = tmp + "px";
+
+			if ((tmp = tinyMCE.getAttrib(nl[0], 'bottommargin')) != '' && body.style.marginBottom == '')
+				body.style.marginBottom = tmp + "px";
+
+			body.dir = tinyMCE.getAttrib(nl[0], 'dir');
+			body.vLink = tinyMCE.getAttrib(nl[0], 'vlink');
+			body.aLink = tinyMCE.getAttrib(nl[0], 'alink');
+			body.link = tinyMCE.getAttrib(nl[0], 'link');
+			body.text = tinyMCE.getAttrib(nl[0], 'text');
+
+			if ((tmp = tinyMCE.getAttrib(nl[0], 'background')) != '')
+				body.style.backgroundImage = tmp;
+
+			if ((tmp = tinyMCE.getAttrib(nl[0], 'bgcolor')) != '')
+				body.style.backgroundColor = tmp;
+		}
+	}
+};
+
+tinyMCE.addPlugin("fullpage", TinyMCE_FullPagePlugin);

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullpage/fullpage.htm
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullpage/fullpage.htm	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullpage/fullpage.htm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,577 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+	<title>{$lang_fullpage_title}</title>
+	<script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
+	<script language="javascript" type="text/javascript" src="../../utils/mctabs.js"></script>
+	<script language="javascript" type="text/javascript" src="../../utils/mclayer.js"></script>
+	<script language="javascript" type="text/javascript" src="../../utils/form_utils.js"></script>
+	<script language="javascript" type="text/javascript" src="jscripts/fullpage.js"></script>
+	<link href="css/fullpage.css" rel="stylesheet" type="text/css" />
+	<base target="_self" />
+</head>
+<body id="advlink" onload="tinyMCEPopup.executeOnLoad('init();');" style="display: none">
+    <form onsubmit="updateAction();return false;" name="fullpage" action="#">
+		<div class="tabs">
+			<ul>
+				<li id="meta_tab" class="current"><span><a href="javascript:mcTabs.displayTab('meta_tab','meta_panel');" onmousedown="return false;">{$lang_fullpage_meta_tab}</a></span></li>
+				<li id="appearance_tab"><span><a href="javascript:mcTabs.displayTab('appearance_tab','appearance_panel');" onmousedown="return false;">{$lang_fullpage_appearance_tab}</a></span></li>
+				<li id="advanced_tab"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{$lang_fullpage_advanced_tab}</a></span></li>
+			</ul>
+		</div>
+
+		<div class="panel_wrapper">
+			<div id="meta_panel" class="panel current">
+				<fieldset>
+					<legend>{$lang_fullpage_meta_props}</legend>
+
+					<table border="0" cellpadding="4" cellspacing="0">
+						<tr>
+							<td nowrap="nowrap"><label for="metatitle">{$lang_fullpage_meta_title}</label>&nbsp;</td>
+							<td><input type="text" id="metatitle" name="metatitle" value="" /></td>
+						</tr>
+						<tr>
+							<td nowrap="nowrap"><label for="metakeywords">{$lang_fullpage_meta_keywords}</label>&nbsp;</td>
+							<td><textarea id="metakeywords" name="metakeywords" rows="3"></textarea></td>
+						</tr>
+						<tr>
+							<td nowrap="nowrap"><label for="metadescription">{$lang_fullpage_meta_description}</label>&nbsp;</td>
+							<td><textarea id="metadescription" name="metadescription" rows="3"></textarea></td>
+						</tr>
+						<tr>
+							<td nowrap="nowrap"><label for="metaauthor">{$lang_fullpage_author}</label>&nbsp;</td>
+							<td><input type="text" id="metaauthor" name="metaauthor" value="" /></td>
+						</tr>
+						<tr>
+							<td nowrap="nowrap"><label for="metacopyright">{$lang_fullpage_copyright}</label>&nbsp;</td>
+							<td><input type="text" id="metacopyright" name="metacopyright" value="" /></td>
+						</tr>
+						<tr>
+							<td nowrap="nowrap"><label for="metarobots">{$lang_fullpage_meta_robots}</label>&nbsp;</td>
+							<td>
+<select id="metarobots" name="metarobots">
+			<option value="">{$lang_not_set}</option> 
+			<option value="index,follow">{$lang_fullpage_meta_index_follow}</option>
+			<option value="index,nofollow">{$lang_fullpage_meta_index_nofollow}</option>
+			<option value="noindex,follow">{$lang_fullpage_meta_noindex_follow}</option>
+			<option value="noindex,nofollow">{$lang_fullpage_meta_noindex_nofollow}</option>
+</select>
+							</td>
+						</tr>
+					</table>
+				</fieldset>
+
+				<fieldset>
+					<legend>{$lang_fullpage_langprops}</legend>
+
+					<table border="0" cellpadding="4" cellspacing="0">
+						<tr>
+							<td class="column1"><label for="docencoding">{$lang_fullpage_encoding}</label></td> 
+							<td>
+								<select id="docencoding" name="docencoding"> 
+										<option value="">{$lang_not_set}</option>
+								</select>
+							</td> 
+						</tr>
+						<tr>
+							<td nowrap="nowrap"><label for="doctypes">{$lang_fullpage_doctypes}</label>&nbsp;</td>
+							<td>
+								<select id="doctypes" name="doctypes">
+										<option value="">{$lang_not_set}</option>
+								</select>
+							</td>
+						</tr>
+						<tr>
+							<td nowrap="nowrap"><label for="langcode">{$lang_fullpage_langcode}</label>&nbsp;</td>
+							<td><input type="text" id="langcode" name="langcode" value="" /></td>
+						</tr>
+						<tr>
+							<td class="column1"><label for="langdir">{$lang_fullpage_langdir}</label></td> 
+							<td>
+								<select id="langdir" name="langdir"> 
+										<option value="">{$lang_not_set}</option> 
+										<option value="ltr">{$lang_fullpage_ltr}</option> 
+										<option value="rtl">{$lang_fullpage_rtl}</option> 
+								</select>
+							</td> 
+						</tr>
+						<tr>
+							<td nowrap="nowrap"><label for="xml_pi">{$lang_fullpage_xml_pi}</label>&nbsp;</td>
+							<td><input type="checkbox" id="xml_pi" name="xml_pi" class="checkbox" /></td>
+						</tr>
+					</table>
+				</fieldset>
+			</div>
+
+			<div id="appearance_panel" class="panel">
+				<fieldset>
+					<legend>{$lang_fullpage_appearance_textprops}</legend>
+
+					<table border="0" cellpadding="4" cellspacing="0">
+						<tr>
+							<td class="column1"><label for="fontface">{$lang_fullpage_fontface}</label></td> 
+							<td>
+								<select id="fontface" name="fontface" onchange="changedStyleField(this);">
+										<option value="">{$lang_not_set}</option>
+								</select>
+							</td> 
+						</tr>
+
+						<tr>
+							<td class="column1"><label for="fontsize">{$lang_fullpage_fontsize}</label></td> 
+							<td>
+								<select id="fontsize" name="fontsize" onchange="changedStyleField(this);">
+										<option value="">{$lang_not_set}</option>
+								</select>
+							</td>
+						</tr>
+
+						<tr>
+							<td class="column1"><label for="textcolor">{$lang_fullpage_textcolor}</label></td> 
+							<td>
+								<table border="0" cellpadding="0" cellspacing="0">
+									<tr>
+										<td><input id="textcolor" name="textcolor" type="text" value="" size="9" onchange="updateColor('textcolor_pick','textcolor');changedStyleField(this);" /></td>
+										<td id="textcolor_pickcontainer">&nbsp;</td>
+									</tr>
+								</table>
+							</td>
+						</tr>
+					</table>
+				</fieldset>
+
+				<fieldset>
+					<legend>{$lang_fullpage_appearance_bgprops}</legend>
+
+					<table border="0" cellpadding="4" cellspacing="0">
+						<tr>
+							<td class="column1"><label for="bgimage">{$lang_fullpage_bgimage}</label></td> 
+							<td>
+								<table border="0" cellpadding="0" cellspacing="0">
+									<tr>
+										<td><input id="bgimage" name="bgimage" type="text" value="" onchange="changedStyleField(this);" /></td>
+										<td id="bgimage_pickcontainer">&nbsp;</td>
+									</tr>
+								</table>
+							</td>
+						</tr>
+						<tr>
+							<td class="column1"><label for="bgcolor">{$lang_fullpage_bgcolor}</label></td> 
+							<td>
+								<table border="0" cellpadding="0" cellspacing="0">
+									<tr>
+										<td><input id="bgcolor" name="bgcolor" type="text" value="" size="9" onchange="updateColor('bgcolor_pick','bgcolor');changedStyleField(this);" /></td>
+										<td id="bgcolor_pickcontainer">&nbsp;</td>
+									</tr>
+								</table>
+							</td> 
+						</tr>
+					</table>
+				</fieldset>
+
+				<fieldset>
+					<legend>{$lang_fullpage_appearance_marginprops}</legend>
+
+					<table border="0" cellpadding="4" cellspacing="0">
+						<tr>
+							<td class="column1"><label for="leftmargin">{$lang_fullpage_left_margin}</label></td> 
+							<td><input id="leftmargin" name="leftmargin" type="text" value="" onchange="changedStyleField(this);" /></td>
+							<td class="column1"><label for="rightmargin">{$lang_fullpage_right_margin}</label></td> 
+							<td><input id="rightmargin" name="rightmargin" type="text" value="" onchange="changedStyleField(this);" /></td>
+						</tr>
+						<tr>
+							<td class="column1"><label for="topmargin">{$lang_fullpage_top_margin}</label></td> 
+							<td><input id="topmargin" name="topmargin" type="text" value="" onchange="changedStyleField(this);" /></td>
+							<td class="column1"><label for="bottommargin">{$lang_fullpage_bottom_margin}</label></td> 
+							<td><input id="bottommargin" name="bottommargin" type="text" value="" onchange="changedStyleField(this);" /></td>
+						</tr>
+					</table>
+				</fieldset>
+
+				<fieldset>
+					<legend>{$lang_fullpage_appearance_linkprops}</legend>
+
+					<table border="0" cellpadding="4" cellspacing="0">
+						<tr>
+							<td class="column1"><label for="link_color">{$lang_fullpage_link_color}</label></td> 
+							<td>
+								<table border="0" cellpadding="0" cellspacing="0">
+									<tr>
+										<td><input id="link_color" name="link_color" type="text" value="" size="9" onchange="updateColor('link_color_pick','link_color');changedStyleField(this);" /></td>
+										<td id="link_color_pickcontainer">&nbsp;</td>
+									</tr>
+								</table>
+							</td>
+
+							<td class="column1"><label for="visited_color">{$lang_fullpage_visited_color}</label></td> 
+							<td>
+								<table border="0" cellpadding="0" cellspacing="0">
+									<tr>
+										<td><input id="visited_color" name="visited_color" type="text" value="" size="9" onchange="updateColor('visited_color_pick','visited_color');changedStyleField(this);" /></td>
+										<td id="visited_color_pickcontainer">&nbsp;</td>
+									</tr>
+								</table>
+							</td>
+						</tr>
+
+						<tr>
+							<td class="column1"><label for="active_color">{$lang_fullpage_active_color}</label></td> 
+							<td>
+								<table border="0" cellpadding="0" cellspacing="0">
+									<tr>
+										<td><input id="active_color" name="active_color" type="text" value="" size="9" onchange="updateColor('active_color_pick','active_color');changedStyleField(this);" /></td>
+										<td id="active_color_pickcontainer">&nbsp;</td>
+									</tr>
+								</table>
+							</td>
+
+							<td>&nbsp;</td>
+							<td>&nbsp;</td>
+
+<!--							<td class="column1"><label for="hover_color">{$lang_fullpage_hover_color}</label></td> 
+							<td>
+								<table border="0" cellpadding="0" cellspacing="0">
+									<tr>
+										<td><input id="hover_color" name="hover_color" type="text" value="" size="9" onchange="changedStyleField(this);" /></td>
+										<td id="hover_color_pickcontainer">&nbsp;</td>
+									</tr>
+								</table>
+							</td> -->
+						</tr>
+					</table>
+				</fieldset>
+
+				<fieldset>
+					<legend>{$lang_fullpage_appearance_style}</legend>
+
+					<table border="0" cellpadding="4" cellspacing="0">
+						<tr>
+							<td class="column1"><label for="stylesheet">{$lang_fullpage_stylesheet}</label></td> 
+							<td><table border="0" cellpadding="0" cellspacing="0">
+									<tr>
+										<td><input id="stylesheet" name="stylesheet" type="text" value="" /></td>
+										<td id="stylesheet_browsercontainer">&nbsp;</td>
+									</tr>
+								</table></td>
+						</tr>
+						<tr>
+							<td class="column1"><label for="style">{$lang_fullpage_style}</label></td> 
+							<td><input id="style" name="style" type="text" value="" onchange="changedStyleField(this);" /></td>
+						</tr>
+					</table>
+				</fieldset>
+			</div>
+
+			<div id="advanced_panel" class="panel">
+				<div id="addmenu">
+					<table border="0" cellpadding="0" cellspacing="0">
+						<tr><td><a href="javascript:addHeadElm('title');" onmousedown="return false;"><span>{$lang_fullpage_add_title}</span></a></td></tr>
+						<tr><td><a href="javascript:addHeadElm('meta');" onmousedown="return false;"><span>{$lang_fullpage_add_meta}</span></a></td></tr>
+						<tr><td><a href="javascript:addHeadElm('script');" onmousedown="return false;"><span>{$lang_fullpage_add_script}</span></a></td></tr>
+						<tr><td><a href="javascript:addHeadElm('style');" onmousedown="return false;"><span>{$lang_fullpage_add_style}</span></a></td></tr>
+						<tr><td><a href="javascript:addHeadElm('link');" onmousedown="return false;"><span>{$lang_fullpage_add_link}</span></a></td></tr>
+						<tr><td><a href="javascript:addHeadElm('base');" onmousedown="return false;"><span>{$lang_fullpage_add_base}</span></a></td></tr>
+						<tr><td><a href="javascript:addHeadElm('comment');" onmousedown="return false;"><span>{$lang_fullpage_add_comment}</span></a></td></tr>
+					</table>
+				</div>
+
+				<fieldset>
+					<legend>{$lang_fullpage_head_elements}</legend>
+
+					<div class="headlistwrapper">
+						<div class="toolbar">
+							<div style="float: left">
+								<a id="addbutton" href="javascript:showAddMenu();" onmousedown="return false;" class="addbutton" title="{$lang_fullpage_add}"></a>
+								<a href="#" onmousedown="return false;" class="removebutton" title="{$lang_fullpage_remove}"></a>
+							</div>
+							<div style="float: right">
+								<a href="#" onmousedown="return false;" class="moveupbutton" title="{$lang_fullpage_moveup}"></a>
+								<a href="#" onmousedown="return false;" class="movedownbutton" title="{$lang_fullpage_movedown}"></a>
+							</div>
+							<br style="clear: both" />
+						</div>
+						<select id="headlist" size="26" onchange="updateHeadElm(this.options[this.selectedIndex].value);">
+							<option value="title_0">&lt;title&gt;Some title bla bla bla&lt;/title&gt;</option>
+							<option value="meta_1">&lt;meta name="keywords"&gt;Some bla bla bla&lt;/meta&gt;</option>
+							<option value="meta_2">&lt;meta name="description"&gt;Some bla bla bla bla bla bla bla bla bla&lt;/meta&gt;</option>
+							<option value="script_3">&lt;script language=&quot;javascript&quot;&gt;...&lt;/script&gt;</option>
+							<option value="style_4">&lt;style&gt;...&lt;/style&gt;</option>
+							<option value="base_5">&lt;base href="." /&gt;</option>
+							<option value="comment_6">&lt;!-- ... --&gt;</option>
+							<option value="link_7">&lt;link href="." /&gt;</option>
+						</select>
+					</div>
+				</fieldset>
+
+				<fieldset id="meta_element">
+					<legend>{$lang_fullpage_meta_element}</legend>
+
+					<table border="0" cellpadding="4" cellspacing="0">
+						<tr>
+							<td class="column1"><label for="element_meta_type">{$lang_fullpage_type}</label></td> 
+							<td><select id="element_meta_type">
+										<option value="name">name</option>
+										<option value="http-equiv">http-equiv</option>
+								</select></td>
+						</tr>
+						<tr>
+							<td class="column1"><label for="element_meta_name">{$lang_fullpage_name}</label></td> 
+							<td><input id="element_meta_name" name="element_meta_name" type="text" value="" /></td>
+						</tr>
+						<tr>
+							<td class="column1"><label for="element_meta_content">{$lang_fullpage_content}</label></td> 
+							<td><input id="element_meta_content" name="element_meta_content" type="text" value="" /></td>
+						</tr>
+					</table>
+
+					<input type="button" id="meta_updateelement" class="updateElementButton" name="update" value="{$lang_update}" onclick="updateElement();" />
+				</fieldset>
+
+				<fieldset id="title_element">
+					<legend>{$lang_fullpage_title_element}</legend>
+
+					<table border="0" cellpadding="4" cellspacing="0">
+						<tr>
+							<td class="column1"><label for="element_title">{$lang_fullpage_meta_title}</label></td> 
+							<td><input id="element_title" name="element_title" type="text" value="" /></td>
+						</tr>
+					</table>
+
+					<input type="button" id="title_updateelement" class="updateElementButton" name="update" value="{$lang_update}" onclick="updateElement();" />
+				</fieldset>
+
+				<fieldset id="script_element">
+					<legend>{$lang_fullpage_script_element}</legend>
+
+					<div class="tabs">
+						<ul>
+							<li id="script_props_tab" class="current"><span><a href="javascript:mcTabs.displayTab('script_props_tab','script_props_panel');" onmousedown="return false;">{$lang_fullpage_properties}</a></span></li>
+							<li id="script_value_tab"><span><a href="javascript:mcTabs.displayTab('script_value_tab','script_value_panel');" onmousedown="return false;">{$lang_fullpage_value}</a></span></li>
+						</ul>
+					</div>
+
+					<br style="clear: both" />
+
+					<div class="panel_wrapper">
+						<div id="script_props_panel" class="panel current">
+							<table border="0" cellpadding="4" cellspacing="0">
+								<tr>
+									<td class="column1"><label for="element_script_type">{$lang_fullpage_type}</label></td> 
+									<td><select id="element_script_type">
+										<option value="text/javascript">text/javascript</option>
+										<option value="text/jscript">text/jscript</option>
+										<option value="text/vbscript">text/vbscript</option>
+										<option value="text/vbs">text/vbs</option>
+										<option value="text/ecmascript">text/ecmascript</option>
+										<option value="text/xml">text/xml</option>
+									</select></td>
+								</tr>
+								<tr>
+									<td class="column1"><label for="element_script_src">{$lang_fullpage_src}</label></td> 
+									<td><table border="0" cellpadding="0" cellspacing="0">
+									<tr>
+										<td><input id="element_script_src" name="element_script_src" type="text" value="" /></td>
+										<td id="script_src_pickcontainer">&nbsp;</td>
+									</tr>
+								</table></td>
+								</tr>
+								<tr>
+									<td class="column1"><label for="element_script_charset">{$lang_fullpage_charset}</label></td> 
+									<td><select id="element_script_charset"><option value="">{$lang_not_set}</option></select></td>
+								</tr>
+								<tr>
+									<td class="column1"><label for="element_script_defer">{$lang_fullpage_defer}</label></td> 
+									<td><input type="checkbox" id="element_script_defer" name="element_script_defer" class="checkbox" /></td>
+								</tr>
+							</table>
+						</div>
+
+						<div id="script_value_panel" class="panel">
+							<textarea id="element_script_value"></textarea>
+						</div>
+					</div>
+
+					<input type="button" id="script_updateelement" class="updateElementButton" name="update" value="{$lang_update}" onclick="updateElement();" />
+				</fieldset>
+
+				<fieldset id="style_element">
+					<legend>{$lang_fullpage_style_element}</legend>
+
+					<div class="tabs">
+						<ul>
+							<li id="style_props_tab" class="current"><span><a href="javascript:mcTabs.displayTab('style_props_tab','style_props_panel');" onmousedown="return false;">{$lang_fullpage_properties}</a></span></li>
+							<li id="style_value_tab"><span><a href="javascript:mcTabs.displayTab('style_value_tab','style_value_panel');" onmousedown="return false;">{$lang_fullpage_value}</a></span></li>
+						</ul>
+					</div>
+
+					<br style="clear: both" />
+
+					<div class="panel_wrapper">
+						<div id="style_props_panel" class="panel current">
+							<table border="0" cellpadding="4" cellspacing="0">
+								<tr>
+									<td class="column1"><label for="element_style_type">{$lang_fullpage_type}</label></td> 
+									<td><select id="element_style_type">
+										<option value="text/css">text/css</option>
+									</select></td>
+								</tr>
+								<tr>
+									<td class="column1"><label for="element_style_media">{$lang_fullpage_media}</label></td> 
+									<td><select id="element_style_media"></select></td>
+								</tr>
+							</table>
+						</div>
+
+						<div id="style_value_panel" class="panel">
+							<textarea id="element_style_value"></textarea>
+						</div>
+					</div>
+
+					<input type="button" id="style_updateelement" class="updateElementButton" name="update" value="{$lang_update}" onclick="updateElement();" />
+				</fieldset>
+
+				<fieldset id="base_element">
+					<legend>{$lang_fullpage_base_element}</legend>
+
+					<table border="0" cellpadding="4" cellspacing="0">
+						<tr>
+							<td class="column1"><label for="element_base_href">{$lang_fullpage_href}</label></td> 
+							<td><input id="element_base_href" name="element_base_href" type="text" value="" /></td>
+						</tr>
+						<tr>
+							<td class="column1"><label for="element_base_target">{$lang_fullpage_target}</label></td> 
+							<td><input id="element_base_target" name="element_base_target" type="text" value="" /></td>
+						</tr>
+					</table>
+
+					<input type="button" id="base_updateelement" class="updateElementButton" name="update" value="{$lang_update}" onclick="updateElement();" />
+				</fieldset>
+
+				<fieldset id="link_element">
+					<legend>{$lang_fullpage_link_element}</legend>
+
+					<div class="tabs">
+						<ul>
+							<li id="link_general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('link_general_tab','link_general_panel');" onmousedown="return false;">{$lang_fullpage_general_props}</a></span></li>
+							<li id="link_advanced_tab"><span><a href="javascript:mcTabs.displayTab('link_advanced_tab','link_advanced_panel');" onmousedown="return false;">{$lang_fullpage_advanced_props}</a></span></li>
+						</ul>
+					</div>
+
+					<br style="clear: both" />
+
+					<div class="panel_wrapper">
+						<div id="link_general_panel" class="panel current">
+							<table border="0" cellpadding="4" cellspacing="0">
+								<tr>
+									<td class="column1"><label for="element_link_href">{$lang_fullpage_href}</label></td> 
+									<td><table border="0" cellpadding="0" cellspacing="0">
+									<tr>
+										<td><input id="element_link_href" name="element_link_href" type="text" value="" /></td>
+										<td id="link_href_pickcontainer">&nbsp;</td>
+									</tr>
+								</table></td>
+								</tr>
+								<tr>
+									<td class="column1"><label for="element_link_title">{$lang_fullpage_meta_title}</label></td> 
+									<td><input id="element_link_title" name="element_link_title" type="text" value="" /></td>
+								</tr>
+								<tr>
+									<td class="column1"><label for="element_link_type">{$lang_fullpage_type}</label></td> 
+									<td><select id="element_link_type" name="element_link_type">
+										<option value="text/css">text/css</option>
+										<option value="text/javascript">text/javascript</option>
+									</select></td>
+								</tr>
+								<tr>
+									<td class="column1"><label for="element_link_media">{$lang_fullpage_media}</label></td> 
+									<td><select id="element_link_media" name="element_link_media"></select></td>
+								</tr>
+								<tr>
+									<td><label for="element_style_rel">{$lang_fullpage_rel}</label></td>
+									<td><select id="element_style_rel" name="element_style_rel"> 
+											<option value="">{$lang_not_set}</option> 
+											<option value="stylesheet">Stylesheet</option>
+											<option value="alternate">Alternate</option>
+											<option value="designates">Designates</option>
+											<option value="start">Start</option>
+											<option value="next">Next</option>
+											<option value="prev">Prev</option>
+											<option value="contents">Contents</option>
+											<option value="index">Index</option>
+											<option value="glossary">Glossary</option>
+											<option value="copyright">Copyright</option>
+											<option value="chapter">Chapter</option>
+											<option value="subsection">Subsection</option>
+											<option value="appendix">Appendix</option>
+											<option value="help">Help</option>
+											<option value="bookmark">Bookmark</option>
+										</select> 
+									</td>
+								</tr>
+							</table>
+						</div>
+
+						<div id="link_advanced_panel" class="panel">
+							<table border="0" cellpadding="4" cellspacing="0">
+								<tr>
+									<td class="column1"><label for="element_link_charset">{$lang_fullpage_charset}</label></td> 
+									<td><select id="element_link_charset"><option value="">{$lang_not_set}</option></select></td>
+								</tr>
+								<tr>
+									<td class="column1"><label for="element_link_hreflang">{$lang_fullpage_hreflang}</label></td> 
+									<td><input id="element_link_hreflang" name="element_link_hreflang" type="text" value="" /></td>
+								</tr>
+								<tr>
+									<td class="column1"><label for="element_link_target">{$lang_fullpage_target}</label></td> 
+									<td><input id="element_link_target" name="element_link_target" type="text" value="" /></td>
+								</tr>
+								<tr>
+									<td><label for="element_style_rev">{$lang_fullpage_rev}</label></td>
+									<td><select id="element_style_rev" name="element_style_rev"> 
+											<option value="">{$lang_not_set}</option> 
+											<option value="alternate">Alternate</option> 
+											<option value="designates">Designates</option> 
+											<option value="stylesheet">Stylesheet</option> 
+											<option value="start">Start</option> 
+											<option value="next">Next</option> 
+											<option value="prev">Prev</option> 
+											<option value="contents">Contents</option> 
+											<option value="index">Index</option> 
+											<option value="glossary">Glossary</option> 
+											<option value="copyright">Copyright</option> 
+											<option value="chapter">Chapter</option> 
+											<option value="subsection">Subsection</option> 
+											<option value="appendix">Appendix</option> 
+											<option value="help">Help</option> 
+											<option value="bookmark">Bookmark</option> 
+										</select> 
+									</td>
+								</tr>
+							</table>
+						</div>
+					</div>
+
+					<input type="button" id="link_updateelement" class="updateElementButton" name="update" value="{$lang_update}" onclick="updateElement();" />
+				</fieldset>
+
+				<fieldset id="comment_element">
+					<legend>{$lang_fullpage_comment_element}</legend>
+
+					<textarea id="element_comment_value"></textarea>
+
+					<input type="button" id="comment_updateelement" class="updateElementButton" name="update" value="{$lang_update}" onclick="updateElement();" />
+				</fieldset>
+			</div>
+		</div>
+
+		<div class="mceActionPanel">
+			<div style="float: left">
+				<input type="button" id="insert" name="update" value="{$lang_update}" onclick="updateAction();" />
+			</div>
+
+			<div style="float: right">
+				<input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onclick="tinyMCEPopup.close();" />
+			</div>
+		</div>
+    </form>
+</body>
+</html>

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullpage/images/add.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullpage/images/add.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullpage/images/fullpage.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullpage/images/fullpage.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullpage/images/move_down.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullpage/images/move_down.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullpage/images/move_up.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullpage/images/move_up.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullpage/images/remove.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullpage/images/remove.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullpage/jscripts/fullpage.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullpage/jscripts/fullpage.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullpage/jscripts/fullpage.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,580 @@
+//
+
+var defaultDocTypes = 
+	'XHTML 1.0 Transitional=<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">,' +
+	'XHTML 1.0 Frameset=<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">,' +
+	'XHTML 1.0 Strict=<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">,' +
+	'XHTML 1.1=<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">">,' +
+	'HTML 4.01 Transitional=<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">,' +
+	'HTML 4.01 Strict=<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">,' +
+	'HTML 4.01 Frameset=<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">';
+
+var defaultEncodings = 
+	'Western european (iso-8859-1)=iso-8859-1,' +
+	'Central European (iso-8859-2)=iso-8859-2,' +
+	'Unicode (UTF-8)=utf-8,' +
+	'Chinese traditional (Big5)=big5,' +
+	'Cyrillic (iso-8859-5)=iso-8859-5,' +
+	'Japanese (iso-2022-jp)=iso-2022-jp,' +
+	'Greek (iso-8859-7)=iso-8859-7,' +
+	'Korean (iso-2022-kr)=iso-2022-kr,' +
+	'ASCII (us-ascii)=us-ascii';
+
+var defaultMediaTypes = 
+	'all=all,' +
+	'screen=screen,' +
+	'print=print,' +
+	'tty=tty,' +
+	'tv=tv,' +
+	'projection=projection,' +
+	'handheld=handheld,' +
+	'braille=braille,' +
+	'aural=aural';
+
+var defaultFontNames = 'Arial=arial,helvetica,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,times new roman,times,serif;Tahoma=tahoma,arial,helvetica,sans-serif;Times New Roman=times new roman,times,serif;Verdana=verdana,arial,helvetica,sans-serif;Impact=impact;WingDings=wingdings';
+var defaultFontSizes = '10px,11px,12px,13px,14px,15px,16px';
+
+var addMenuLayer = new MCLayer("addmenu");
+var lastElementType = null;
+var topDoc;
+
+function init() {
+	var f = document.forms['fullpage'];
+	var i, p, doctypes, encodings, mediaTypes, fonts;
+	var inst = tinyMCE.getInstanceById(tinyMCE.getWindowArg('editor_id'));
+
+	// Setup doctype select box
+	doctypes = tinyMCE.getParam("fullpage_doctypes", defaultDocTypes).split(',');
+	for (i=0; i<doctypes.length; i++) {
+		p = doctypes[i].split('=');
+
+		if (p.length > 1)
+			addSelectValue(f, 'doctypes', p[0], p[1]);
+	}
+
+	// Setup fonts select box
+	fonts = tinyMCE.getParam("fullpage_fonts", defaultFontNames).split(';');
+	for (i=0; i<fonts.length; i++) {
+		p = fonts[i].split('=');
+
+		if (p.length > 1)
+			addSelectValue(f, 'fontface', p[0], p[1]);
+	}
+
+	// Setup fontsize select box
+	fonts = tinyMCE.getParam("fullpage_fontsizes", defaultFontSizes).split(',');
+	for (i=0; i<fonts.length; i++)
+		addSelectValue(f, 'fontsize', fonts[i], fonts[i]);
+
+	// Setup mediatype select boxs
+	mediaTypes = tinyMCE.getParam("fullpage_media_types", defaultMediaTypes).split(',');
+	for (i=0; i<mediaTypes.length; i++) {
+		p = mediaTypes[i].split('=');
+
+		if (p.length > 1) {
+			addSelectValue(f, 'element_style_media', p[0], p[1]);
+			addSelectValue(f, 'element_link_media', p[0], p[1]);
+		}
+	}
+
+	// Setup encodings select box
+	encodings = tinyMCE.getParam("fullpage_encodings", defaultEncodings).split(',');
+	for (i=0; i<encodings.length; i++) {
+		p = encodings[i].split('=');
+
+		if (p.length > 1) {
+			addSelectValue(f, 'docencoding', p[0], p[1]);
+			addSelectValue(f, 'element_script_charset', p[0], p[1]);
+			addSelectValue(f, 'element_link_charset', p[0], p[1]);
+		}
+	}
+
+	document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor');
+	document.getElementById('link_color_pickcontainer').innerHTML = getColorPickerHTML('link_color_pick','link_color');
+	//document.getElementById('hover_color_pickcontainer').innerHTML = getColorPickerHTML('hover_color_pick','hover_color');
+	document.getElementById('visited_color_pickcontainer').innerHTML = getColorPickerHTML('visited_color_pick','visited_color');
+	document.getElementById('active_color_pickcontainer').innerHTML = getColorPickerHTML('active_color_pick','active_color');
+	document.getElementById('textcolor_pickcontainer').innerHTML = getColorPickerHTML('textcolor_pick','textcolor');
+	document.getElementById('stylesheet_browsercontainer').innerHTML = getBrowserHTML('stylesheetbrowser','stylesheet','file','fullpage');
+	document.getElementById('link_href_pickcontainer').innerHTML = getBrowserHTML('link_href_browser','element_link_href','file','fullpage');
+	document.getElementById('script_src_pickcontainer').innerHTML = getBrowserHTML('script_src_browser','element_script_src','file','fullpage');
+	document.getElementById('bgimage_pickcontainer').innerHTML = getBrowserHTML('bgimage_browser','bgimage','image','fullpage');
+
+	// Resize some elements
+	if (isVisible('stylesheetbrowser'))
+		document.getElementById('stylesheet').style.width = '220px';
+
+	if (isVisible('link_href_browser'))
+		document.getElementById('element_link_href').style.width = '230px';
+
+	if (isVisible('bgimage_browser'))
+		document.getElementById('bgimage').style.width = '210px';
+
+	// Create iframe
+	var iframe = document.createElement('iframe');
+
+	iframe.id = 'tempFrame';
+	iframe.style.display = 'none';
+	iframe.src = tinyMCE.baseURL + "/plugins/fullpage/blank.htm";
+
+	document.body.appendChild(iframe);
+
+	tinyMCEPopup.resizeToInnerSize();
+}
+
+function setupIframe(doc) {
+	var inst = tinyMCE.getInstanceById(tinyMCE.getWindowArg('editor_id'));
+	var hc = inst.fullpageTopContent;
+	var f = document.forms[0];
+	var xmlVer, xmlEnc, docType;
+	var nodes, i, x, name, value, tmp, l;
+
+	// Keep it from not loading/executing stuff
+	hc = hc.replace(/<script>/gi, '<script type="text/javascript">');
+	hc = hc.replace(/\ssrc=/gi, " mce_src=");
+	hc = hc.replace(/\shref=/gi, " mce_href=");
+	hc = hc.replace(/\stype=/gi, " mce_type=");
+	hc = hc.replace(/<script/gi, '<script type="text/unknown" ');
+
+	// Add end to make it DOM parseable
+	hc += '</body></html>';
+
+	topDoc = doc;
+	doc.open();
+	doc.write(hc);
+	doc.close();
+
+	// ------- Setup options for genral tab
+
+	// Parse xml and doctype
+	xmlVer = getReItem(/<\?\s*?xml.*?version\s*?=\s*?"(.*?)".*?\?>/gi, hc, 1);
+	xmlEnc = getReItem(/<\?\s*?xml.*?encoding\s*?=\s*?"(.*?)".*?\?>/gi, hc, 1);
+	docType = getReItem(/<\!DOCTYPE.*?>/gi, hc, 0);
+	f.langcode.value = getReItem(/lang="(.*?)"/gi, hc, 1);
+
+	// Get title
+	f.metatitle.value = tinyMCE.entityDecode(getReItem(/<title>(.*?)<\/title>/gi, hc, 1));
+
+	// Check for meta encoding
+	nodes = doc.getElementsByTagName("meta");
+	for (i=0; i<nodes.length; i++) {
+		name = tinyMCE.getAttrib(nodes[i], 'name');
+		value = tinyMCE.getAttrib(nodes[i], 'content');
+		httpEquiv = tinyMCE.getAttrib(nodes[i], 'httpEquiv');
+
+		switch (name.toLowerCase()) {
+			case "keywords":
+				f.metakeywords.value = value;
+				break;
+
+			case "description":
+				f.metadescription.value = value;
+				break;
+
+			case "author":
+				f.metaauthor.value = value;
+				break;
+
+			case "copyright":
+				f.metacopyright.value = value;
+				break;
+
+			case "robots":
+				selectByValue(f, 'metarobots', value, true, true);
+				break;
+		}
+
+		switch (httpEquiv.toLowerCase()) {
+			case "content-type":
+				tmp = getReItem(/charset\s*=\s*(.*)\s*/gi, value, 1);
+
+				// Override XML encoding
+				if (tmp != "")
+					xmlEnc = tmp;
+
+				break;
+		}
+	}
+
+	selectByValue(f, 'doctypes', docType, true, true);
+	selectByValue(f, 'docencoding', xmlEnc, true, true);
+	selectByValue(f, 'langdir', tinyMCE.getAttrib(doc.body, 'dir'), true, true);
+
+	if (xmlVer != '')
+		f.xml_pi.checked = true;
+
+	// ------- Setup options for appearance tab
+
+	// Get primary stylesheet
+	nodes = doc.getElementsByTagName("link");
+	for (i=0; i<nodes.length; i++) {
+		l = nodes[i];
+		tmp = tinyMCE.getAttrib(l, 'media');
+
+		if (tinyMCE.getAttrib(l, 'mce_type') == "text/css" && (tmp == "" || tmp == "screen" || tmp == "all") && tinyMCE.getAttrib(l, 'rel') == "stylesheet") {
+			f.stylesheet.value = tinyMCE.getAttrib(l, 'mce_href');
+			break;
+		}
+	}
+
+	// Get from style elements
+	nodes = doc.getElementsByTagName("style");
+	for (i=0; i<nodes.length; i++) {
+		tmp = parseStyleElement(nodes[i]);
+
+		for (x=0; x<tmp.length; x++) {
+		//	if (tmp[x].rule.indexOf('a:hover') != -1 && tmp[x].data['color'])
+		//		f.hover_color.value = tmp[x].data['color'];
+
+			if (tmp[x].rule.indexOf('a:visited') != -1 && tmp[x].data['color'])
+				f.visited_color.value = tmp[x].data['color'];
+
+			if (tmp[x].rule.indexOf('a:link') != -1 && tmp[x].data['color'])
+				f.link_color.value = tmp[x].data['color'];
+
+			if (tmp[x].rule.indexOf('a:active') != -1 && tmp[x].data['color'])
+				f.active_color.value = tmp[x].data['color'];
+		}
+	}
+
+	// Get from body attribs
+
+/*	f.leftmargin.value = tinyMCE.getAttrib(doc.body, "leftmargin");
+	f.rightmargin.value = tinyMCE.getAttrib(doc.body, "rightmargin");
+	f.topmargin.value = tinyMCE.getAttrib(doc.body, "topmargin");
+	f.bottommargin.value = tinyMCE.getAttrib(doc.body, "bottommargin");*/
+	f.textcolor.value = convertRGBToHex(tinyMCE.getAttrib(doc.body, "text"));
+	f.active_color.value = convertRGBToHex(tinyMCE.getAttrib(doc.body, "alink"));
+	f.link_color.value = convertRGBToHex(tinyMCE.getAttrib(doc.body, "link"));
+	f.visited_color.value = convertRGBToHex(tinyMCE.getAttrib(doc.body, "vlink"));
+	f.bgcolor.value = convertRGBToHex(tinyMCE.getAttrib(doc.body, "bgcolor"));
+	f.bgimage.value = convertRGBToHex(tinyMCE.getAttrib(doc.body, "background"));
+
+	// Get from style info
+	var style = tinyMCE.parseStyle(tinyMCE.getAttrib(doc.body, 'style'));
+
+	if (style['font-family'])
+		selectByValue(f, 'fontface', style['font-family'], true, true);
+	else
+		selectByValue(f, 'fontface', tinyMCE.getParam("fullpage_default_fontface", ""), true, true);
+
+	if (style['font-size'])
+		selectByValue(f, 'fontsize', style['font-size'], true, true);
+	else
+		selectByValue(f, 'fontsize', tinyMCE.getParam("fullpage_default_fontsize", ""), true, true);
+
+	if (style['color'])
+		f.textcolor.value = convertRGBToHex(style['color']);
+
+	if (style['background-image'])
+		f.bgimage.value = style['background-image'].replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");
+
+	if (style['background-color'])
+		f.bgcolor.value = convertRGBToHex(style['background-color']);
+
+	if (style['margin']) {
+		tmp = style['margin'].replace(/[^0-9 ]/g, '');
+		tmp = tmp.split(/ +/);
+		f.topmargin.value = tmp.length > 0 ? tmp[0] : '';
+		f.rightmargin.value = tmp.length > 1 ? tmp[1] : tmp[0];
+		f.bottommargin.value = tmp.length > 2 ? tmp[2] : tmp[0];
+		f.leftmargin.value = tmp.length > 3 ? tmp[3] : tmp[0];
+	}
+
+	if (style['margin-left'])
+		f.leftmargin.value = style['margin-left'].replace(/[^0-9]/g, '');
+
+	if (style['margin-right'])
+		f.rightmargin.value = style['margin-right'].replace(/[^0-9]/g, '');
+
+	if (style['margin-top'])
+		f.topmargin.value = style['margin-top'].replace(/[^0-9]/g, '');
+
+	if (style['margin-bottom'])
+		f.bottommargin.value = style['margin-bottom'].replace(/[^0-9]/g, '');
+
+	f.style.value = tinyMCE.serializeStyle(style);
+
+	updateColor('textcolor_pick', 'textcolor');
+	updateColor('bgcolor_pick', 'bgcolor');
+	updateColor('visited_color_pick', 'visited_color');
+	updateColor('active_color_pick', 'active_color');
+	updateColor('link_color_pick', 'link_color');
+	//updateColor('hover_color_pick', 'hover_color');
+}
+
+function updateAction() {
+	var inst = tinyMCE.getInstanceById(tinyMCE.getWindowArg('editor_id'));
+	var f = document.forms[0];
+	var nl, i, h, v, s, head, html, l, tmp, addlink = true;
+
+	head = topDoc.getElementsByTagName('head')[0];
+
+	// Fix scripts without a type
+	nl = topDoc.getElementsByTagName('script');
+	for (i=0; i<nl.length; i++) {
+		if (tinyMCE.getAttrib(nl[i], 'mce_type') == '')
+			nl[i].setAttribute('mce_type', 'text/javascript');
+	}
+
+	// Get primary stylesheet
+	nl = topDoc.getElementsByTagName("link");
+	for (i=0; i<nl.length; i++) {
+		l = nl[i];
+
+		tmp = tinyMCE.getAttrib(l, 'media');
+
+		if (tinyMCE.getAttrib(l, 'mce_type') == "text/css" && (tmp == "" || tmp == "screen" || tmp == "all") && tinyMCE.getAttrib(l, 'rel') == "stylesheet") {
+			addlink = false;
+
+			if (f.stylesheet.value == '')
+				l.parentNode.removeChild(l);
+			else
+				l.setAttribute('mce_href', f.stylesheet.value);
+
+			break;
+		}
+	}
+
+	// Add new link
+	if (f.stylesheet.value != '') {
+		l = topDoc.createElement('link');
+
+		l.setAttribute('mce_type', 'text/css');
+		l.setAttribute('mce_href', f.stylesheet.value);
+		l.setAttribute('rel', 'stylesheet');
+
+		head.appendChild(l);
+	}
+
+	setMeta(head, 'keywords', f.metakeywords.value);
+	setMeta(head, 'description', f.metadescription.value);
+	setMeta(head, 'author', f.metaauthor.value);
+	setMeta(head, 'copyright', f.metacopyright.value);
+	setMeta(head, 'robots', getSelectValue(f, 'metarobots'));
+	setMeta(head, 'Content-Type', getSelectValue(f, 'docencoding'));
+
+	topDoc.body.dir = getSelectValue(f, 'langdir');
+	topDoc.body.style.cssText = f.style.value;
+
+	topDoc.body.setAttribute('vLink', f.visited_color.value);
+	topDoc.body.setAttribute('link', f.link_color.value);
+	topDoc.body.setAttribute('text', f.textcolor.value);
+	topDoc.body.setAttribute('aLink', f.active_color.value);
+
+	topDoc.body.style.fontFamily = getSelectValue(f, 'fontface');
+	topDoc.body.style.fontSize = getSelectValue(f, 'fontsize');
+	topDoc.body.style.backgroundColor = f.bgcolor.value;
+
+	if (f.leftmargin.value != '')
+		topDoc.body.style.marginLeft = f.leftmargin.value + 'px';
+
+	if (f.rightmargin.value != '')
+		topDoc.body.style.marginRight = f.rightmargin.value + 'px';
+
+	if (f.bottommargin.value != '')
+		topDoc.body.style.marginBottom = f.bottommargin.value + 'px';
+
+	if (f.topmargin.value != '')
+		topDoc.body.style.marginTop = f.topmargin.value + 'px';
+
+	html = topDoc.getElementsByTagName('html')[0];
+	html.setAttribute('lang', f.langcode.value);
+	html.setAttribute('xml:lang', f.langcode.value);
+
+	if (f.bgimage.value != '')
+		topDoc.body.style.backgroundImage = "url('" + f.bgimage.value + "')";
+	else
+		topDoc.body.style.backgroundImage = '';
+
+	inst.cleanup.addRuleStr('-title,meta[http-equiv|name|content],base[href|target],link[href|rel|type|title|media],style[type],script[type|language|src],html[lang|xml:lang|xmlns],body[style|dir|vlink|link|text|alink],head');
+
+	h = inst.cleanup.serializeNodeAsHTML(topDoc.documentElement);
+
+	h = h.substring(0, h.lastIndexOf('</body>'));
+
+	if (h.indexOf('<title>') == -1)
+		h = h.replace(/<head.*?>/, '$&\n' + '<title>' + inst.cleanup.xmlEncode(f.metatitle.value) + '</title>');
+	else
+		h = h.replace(/<title>(.*?)<\/title>/, '<title>' + inst.cleanup.xmlEncode(f.metatitle.value) + '</title>');
+
+	if ((v = getSelectValue(f, 'doctypes')) != '')
+		h = v + '\n' + h;
+
+	if (f.xml_pi.checked) {
+		s = '<?xml version="1.0"';
+
+		if ((v = getSelectValue(f, 'docencoding')) != '')
+			s += ' encoding="' + v + '"';
+
+		s += '?>\n';
+		h = s + h;
+	}
+
+	inst.fullpageTopContent = h;
+
+	tinyMCEPopup.execCommand('mceFullPageUpdate', false, '');
+	tinyMCEPopup.close();
+}
+
+function setMeta(he, k, v) {
+	var nl, i, m;
+
+	nl = he.getElementsByTagName('meta');
+	for (i=0; i<nl.length; i++) {
+		if (k == 'Content-Type' && tinyMCE.getAttrib(nl[i], 'http-equiv') == k) {
+			if (v == '')
+				nl[i].parentNode.removeChild(nl[i]);
+			else
+				nl[i].setAttribute('content', "text/html; charset=" + v);
+
+			return;
+		}
+
+		if (tinyMCE.getAttrib(nl[i], 'name') == k) {
+			if (v == '')
+				nl[i].parentNode.removeChild(nl[i]);
+			else
+				nl[i].setAttribute('content', v);
+			return;
+		}
+	}
+
+	if (v == '')
+		return;
+
+	m = topDoc.createElement('meta');
+
+	if (k == 'Content-Type')
+		m.httpEquiv = k;
+	else
+		m.setAttribute('name', k);
+
+	m.setAttribute('content', v);
+	he.appendChild(m);
+}
+
+function parseStyleElement(e) {
+	var v = e.innerHTML;
+	var p, i, r;
+
+	v = v.replace(/<!--/gi, '');
+	v = v.replace(/-->/gi, '');
+	v = v.replace(/[\n\r]/gi, '');
+	v = v.replace(/\s+/gi, ' ');
+
+	r = new Array();
+	p = v.split(/{|}/);
+
+	for (i=0; i<p.length; i+=2) {
+		if (p[i] != "")
+			r[r.length] = {rule : tinyMCE.trim(p[i]), data : tinyMCE.parseStyle(p[i+1])};
+	}
+
+	return r;
+}
+
+function serializeStyleElement(d) {
+	var i, s, st;
+
+	s = '<!--\n';
+
+	for (i=0; i<d.length; i++) {
+		s += d[i].rule + ' {\n';
+
+		st = tinyMCE.serializeStyle(d[i].data);
+
+		if (st != '')
+			st += ';';
+
+		s += st.replace(/;/g, ';\n');
+		s += '}\n';
+
+		if (i != d.length - 1)
+			s += '\n';
+	}
+
+	s += '\n-->';
+
+	return s;
+}
+
+function getReItem(r, s, i) {
+	var c = r.exec(s);
+
+	if (c && c.length > i)
+		return c[i];
+
+	return '';
+}
+
+function changedStyleField(field) {
+	//alert(field.id);
+}
+
+function showAddMenu() {
+	var re = document.getElementById('addbutton');
+
+	addMenuLayer.moveRelativeTo(re, 'tr');
+	if (addMenuLayer.isMSIE)
+		addMenuLayer.moveBy(2, 0);
+
+	addMenuLayer.show();
+	addMenuLayer.setAutoHide(true, hideAddMenu);
+	addMenuLayer.addCSSClass(re, 'selected');
+}
+
+function hideAddMenu(l, e, mx, my) {
+	var re = document.getElementById('addbutton');
+	addMenuLayer.removeCSSClass(re, 'selected');
+}
+
+function addHeadElm(type) {
+	var le = document.getElementById('headlist');
+	var re = document.getElementById('addbutton');
+	var te = document.getElementById(type + '_element');
+
+	if (lastElementType)
+		lastElementType.style.display = 'none';
+
+	te.style.display = 'block';
+
+	lastElementType = te;
+
+	addMenuLayer.hide();
+	addMenuLayer.removeCSSClass(re, 'selected');
+
+	document.getElementById(type + '_updateelement').value = tinyMCE.getLang('lang_insert', 'Insert', true);
+
+	le.size = 10;
+}
+
+function updateHeadElm(item) {
+	var type = item.substring(0, item.indexOf('_'));
+	var le = document.getElementById('headlist');
+	var re = document.getElementById('addbutton');
+	var te = document.getElementById(type + '_element');
+
+	if (lastElementType)
+		lastElementType.style.display = 'none';
+
+	te.style.display = 'block';
+
+	lastElementType = te;
+
+	addMenuLayer.hide();
+	addMenuLayer.removeCSSClass(re, 'selected');
+
+	document.getElementById(type + '_updateelement').value = tinyMCE.getLang('lang_update', 'Update', true);
+
+	le.size = 10;
+}
+
+function cancelElementUpdate() {
+	var le = document.getElementById('headlist');
+
+	if (lastElementType)
+		lastElementType.style.display = 'none';
+
+	le.size = 26;
+}
\ No newline at end of file

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullpage/langs/en.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullpage/langs/en.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullpage/langs/en.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,92 @@
+// UK lang variables
+
+tinyMCE.addToLang('fullpage',{
+	title : 'Document properties',
+	desc : 'Document properties',
+	meta_tab : 'General',
+	appearance_tab : 'Appearance',
+	advanced_tab : 'Advanced',
+	meta_props : 'Meta information',
+	langprops : 'Language and encoding',
+	meta_title : 'Title',
+	meta_keywords : 'Keywords',
+	meta_description : 'Description',
+	meta_robots : 'Robots',
+	doctypes : 'Doctype',
+	langcode : 'Language code',
+	langdir : 'Language direction',
+	ltr : 'Left to right',
+	rtl : 'Right to left',
+	xml_pi : 'XML declaration',
+	encoding : 'Character encoding',
+	appearance_bgprops : 'Background properties',
+	appearance_marginprops : 'Body margins',
+	appearance_linkprops : 'Link colors',
+	appearance_textprops : 'Text properties',
+	bgcolor : 'Background color',
+	bgimage : 'Background image',
+	left_margin : 'Left margin',
+	right_margin : 'Right margin',
+	top_margin : 'Top margin',
+	bottom_margin : 'Bottom margin',
+	text_color : 'Text color',
+	font_size : 'Font size',
+	font_face : 'Font face',
+	link_color : 'Link color',
+	hover_color : 'Hover color',
+	visited_color : 'Visited color',
+	active_color : 'Active color',
+	textcolor : 'Color',
+	fontsize : 'Font size',
+	fontface : 'Font family',
+	meta_index_follow : 'Index and follow the links',
+	meta_index_nofollow : 'Index and don\'t follow the links',
+	meta_noindex_follow : 'Do not index but follow the links',
+	meta_noindex_nofollow : 'Do not index and don\'t follow the links',
+	appearance_style : 'Stylesheet and style properties',
+	stylesheet : 'Stylesheet',
+	style : 'Style',
+	author : 'Author',
+	copyright : 'Copyright',
+	add : 'Add new element',
+	remove : 'Remove selected element',
+	moveup : 'Move selected element up',
+	movedown : 'Move selected element down',
+	head_elements : 'Head elements',
+	info : 'Information',
+	info_text : '',
+	add_title : 'Title element',
+	add_meta : 'Meta element',
+	add_script : 'Script element',
+	add_style : 'Style element',
+	add_link : 'Link element',
+	add_base : 'Base element',
+	add_comment : 'Comment node',
+	title_element : 'Title element',
+	script_element : 'Script element',
+	style_element : 'Style element',
+	base_element : 'Base element',
+	link_element : 'Link element',
+	meta_element : 'Meta element',
+	comment_element : 'Comment',
+	src : 'Src',
+	language : 'Language',
+	href : 'Href',
+	target : 'Target',
+	rel : 'Rel',
+	type : 'Type',
+	charset : 'Charset',
+	defer : 'Defer',
+	media : 'Media',
+	properties : 'Properties',
+	name : 'Name',
+	value : 'Value',
+	content : 'Content',
+	rel : 'Rel',
+	rev : 'Rev',
+	hreflang : 'Href lang',
+	general_props : 'General',
+	advanced_props : 'Advanced',
+	delta_width : 0,
+	delta_height : 0
+});

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullscreen/editor_plugin.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullscreen/editor_plugin.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullscreen/editor_plugin.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1 @@
+tinyMCE.importPluginLanguagePack('fullscreen','en,tr,sv,cs,fr_ca,zh_cn,da,he,nb,de,hu,ru,ru_KOI8-R,ru_UTF-8,nn,es,cy,is,pl,nl,fr,pt_br');var TinyMCE_FullScreenPlugin={getInfo:function(){return{longname:'Fullscreen',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_fullscreen.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};},getControlHTML:function(cn){switch(cn){case"fullscreen":return tinyMCE.getButtonHTML(cn,'lang_fullscreen_desc','{$pluginurl}/images/fullscreen.gif','mceFullScreen');}return"";},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case"mceFullScreen":if(tinyMCE.getParam('fullscreen_is_enabled')){window.opener.tinyMCE.execInstanceCommand(tinyMCE.getParam('fullscreen_editor_id'),'mceSetContent',false,tinyMCE.getContent(editor_id));top.close();}else{tinyMCE.setWindowArg('editor_id',editor_id);var win=window.open(tinyMCE.baseURL+"/plugins/fullscreen/fullscreen.htm","mceFullScreenPopup","fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width="+screen.availWidth+",height="+screen.availHeight);try{win.resizeTo(screen.availWidth,screen.availHeight);}catch(e){}}return true;}return false;},handleNodeChange:function(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){if(tinyMCE.getParam('fullscreen_is_enabled'))tinyMCE.switchClass(editor_id+'_fullscreen','mceButtonSelected');return true;}};tinyMCE.addPlugin("fullscreen",TinyMCE_FullScreenPlugin);
\ No newline at end of file

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullscreen/editor_plugin_src.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullscreen/editor_plugin_src.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullscreen/editor_plugin_src.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,63 @@
+/**
+ * $RCSfile: editor_plugin_src.js,v $
+ * $Revision: 1.16 $
+ * $Date: 2006/03/14 17:33:39 $
+ *
+ * @author Moxiecode
+ * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
+ */
+
+/* Import plugin specific language pack */
+tinyMCE.importPluginLanguagePack('fullscreen', 'en,tr,sv,cs,fr_ca,zh_cn,da,he,nb,de,hu,ru,ru_KOI8-R,ru_UTF-8,nn,es,cy,is,pl,nl,fr,pt_br');
+
+var TinyMCE_FullScreenPlugin = {
+	getInfo : function() {
+		return {
+			longname : 'Fullscreen',
+			author : 'Moxiecode Systems',
+			authorurl : 'http://tinymce.moxiecode.com',
+			infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_fullscreen.html',
+			version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
+		};
+	},
+
+	getControlHTML : function(cn) {
+		switch (cn) {
+			case "fullscreen":
+				return tinyMCE.getButtonHTML(cn, 'lang_fullscreen_desc', '{$pluginurl}/images/fullscreen.gif', 'mceFullScreen');
+		}
+
+		return "";
+	},
+
+	execCommand : function(editor_id, element, command, user_interface, value) {
+		// Handle commands
+		switch (command) {
+			case "mceFullScreen":
+				if (tinyMCE.getParam('fullscreen_is_enabled')) {
+					// In fullscreen mode
+					window.opener.tinyMCE.execInstanceCommand(tinyMCE.getParam('fullscreen_editor_id'), 'mceSetContent', false, tinyMCE.getContent(editor_id));
+					top.close();
+				} else {
+					tinyMCE.setWindowArg('editor_id', editor_id);
+
+					var win = window.open(tinyMCE.baseURL + "/plugins/fullscreen/fullscreen.htm", "mceFullScreenPopup", "fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width=" + screen.availWidth + ",height=" + screen.availHeight);
+					try { win.resizeTo(screen.availWidth, screen.availHeight); } catch (e) {}
+				}
+		
+				return true;
+		}
+
+		// Pass to next handler in chain
+		return false;
+	},
+
+	handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {
+		if (tinyMCE.getParam('fullscreen_is_enabled'))
+			tinyMCE.switchClass(editor_id + '_fullscreen', 'mceButtonSelected');
+
+		return true;
+	}
+};
+
+tinyMCE.addPlugin("fullscreen", TinyMCE_FullScreenPlugin);

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullscreen/fullscreen.htm
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullscreen/fullscreen.htm	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullscreen/fullscreen.htm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,91 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+	<title>{$lang_fullscreen_title}</title>
+	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+	<script language="javascript" type="text/javascript" src="../../tiny_mce.js"></script>
+	<script language="javascript" type="text/javascript">
+		function patchCallback(settings, key) {
+			if (settings[key])
+				settings[key] = "window.opener." + settings[key];
+		}
+
+		var settings = new Array();
+
+		// Clone array
+		for (var name in window.opener.tinyMCE.settings)
+			settings[name] = window.opener.tinyMCE.settings[name];
+
+		// Override options for fullscreen
+		for (var name in window.opener.tinyMCE.settings.fullscreen_settings)
+			settings[name] = window.opener.tinyMCE.settings.fullscreen_settings[name];
+
+		// Patch callbacks, make them point to window.opener
+		patchCallback(settings, 'urlconverter_callback');
+		patchCallback(settings, 'insertlink_callback');
+		patchCallback(settings, 'insertimage_callback');
+		patchCallback(settings, 'setupcontent_callback');
+		patchCallback(settings, 'save_callback');
+		patchCallback(settings, 'onchange_callback');
+		patchCallback(settings, 'init_instance_callback');
+		patchCallback(settings, 'file_browser_callback');
+		patchCallback(settings, 'cleanup_callback');
+		patchCallback(settings, 'execcommand_callback');
+		patchCallback(settings, 'oninit');
+
+		// Set options
+		settings['mode'] = 'exact';
+		settings['elements'] = 'fullscreenarea';
+		settings['ask'] = false;
+		settings['setupcontent_callback'] = 'setupContent';
+		settings['fullscreen_is_enabled'] = true;
+		settings['fullscreen_editor_id'] = window.opener.tinyMCE.getWindowArg("editor_id");
+		settings['theme_advanced_resizing'] = false;
+
+		// Init
+		tinyMCE.init(settings);
+		tinyMCE.documentBasePath = window.opener.tinyMCE.documentBasePath;
+
+		function setupContent(editor_id, body, doc) {
+			var inst = tinyMCE.getInstanceById(editor_id);
+			var content = window.opener.tinyMCE.getContent(tinyMCE.getParam('fullscreen_editor_id'));
+
+			// Setup title
+			var divElm = document.createElement("div");
+			divElm.innerHTML = tinyMCELang['lang_fullscreen_title'];
+			document.title = divElm.innerHTML;
+
+			// Get content
+			inst.execCommand('mceSetContent', false, content);
+		}
+
+		function unloadHandler(e) {
+			moveContent();
+		}
+
+		function moveContent() {
+			var doc = tinyMCE.isMSIE ? window.frames['mce_editor_0'].window.document : document.getElementById('mce_editor_0').contentDocument;
+			window.opener.tinyMCE.setInnerHTML(window.opener.tinyMCE.selectedInstance.getBody(), doc.body.innerHTML);
+		}
+
+		// Add onunload
+		tinyMCE.addEvent(window, "beforeunload", unloadHandler);
+
+		function doParentSubmit() {
+			moveContent();
+
+			if (window.opener.tinyMCE.selectedInstance.formElement.form)
+				window.opener.tinyMCE.selectedInstance.formElement.form.submit();
+
+			window.close();
+
+			return false;
+		}
+	</script>
+	<base target="_self" />
+</head>
+<body style="margin: 0; overflow: hidden; height: 100%" scrolling="no" scroll="no">
+<form onsubmit="doParentSubmit();" style="height: 100%">
+<textarea id="fullscreenarea" style="width: 100%; height: 100%"></textarea>
+</form>
+</body>
+</html>

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullscreen/images/fullscreen.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullscreen/images/fullscreen.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullscreen/langs/en.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullscreen/langs/en.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullscreen/langs/en.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,6 @@
+// UK lang variables
+
+tinyMCE.addToLang('',{
+fullscreen_title : 'Fullscreen mode',
+fullscreen_desc : 'Toggle fullscreen mode'
+});

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullscreen/readme.txt
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullscreen/readme.txt	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/fullscreen/readme.txt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1 @@
+Check the TinyMCE documentation for details on this plugin.

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/iespell/editor_plugin.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/iespell/editor_plugin.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/iespell/editor_plugin.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1 @@
+tinyMCE.importPluginLanguagePack('iespell','en,tr,cs,el,fr_ca,it,ko,sv,zh_cn,fr,de,pl,pt_br,nl,da,he,nb,ru,ru_KOI8-R,ru_UTF-8,nn,fi,cy,es,is,zh_tw,zh_tw_utf8,sk');var TinyMCE_IESpellPlugin={getInfo:function(){return{longname:'IESpell (MSIE Only)',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_iespell.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};},getControlHTML:function(cn){if(cn=="iespell"&&(tinyMCE.isMSIE&&!tinyMCE.isOpera))return tinyMCE.getButtonHTML(cn,'lang_iespell_desc','{$pluginurl}/images/iespell.gif','mceIESpell');return"";},execCommand:function(editor_id,element,command,user_interface,value){if(command=="mceIESpell"){try{var ieSpell=new ActiveXObject("ieSpell.ieSpellExtension");ieSpell.CheckDocumentNode(tinyMCE.getInstanceById(editor_id).contentDocument.documentElement);}catch(e){if(e.number==-2146827859){if(confirm(tinyMCE.getLang("lang_iespell_download","",true)))window.open('http://www.iespell.com/download.php','ieSpellDownload','');}else alert("Error Loading ieSpell: Exception "+e.number);}return true;}return false;}};tinyMCE.addPlugin("iespell",TinyMCE_IESpellPlugin);
\ No newline at end of file

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/iespell/editor_plugin_src.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/iespell/editor_plugin_src.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/iespell/editor_plugin_src.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,60 @@
+/**
+ * $RCSfile: editor_plugin_src.js,v $
+ * $Revision: 1.20 $
+ * $Date: 2006/02/10 16:29:39 $
+ *
+ * @author Moxiecode
+ * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
+ */
+
+/* Import plugin specific language pack */
+tinyMCE.importPluginLanguagePack('iespell', 'en,tr,cs,el,fr_ca,it,ko,sv,zh_cn,fr,de,pl,pt_br,nl,da,he,nb,ru,ru_KOI8-R,ru_UTF-8,nn,fi,cy,es,is,zh_tw,zh_tw_utf8,sk');
+
+var TinyMCE_IESpellPlugin = {
+	getInfo : function() {
+		return {
+			longname : 'IESpell (MSIE Only)',
+			author : 'Moxiecode Systems',
+			authorurl : 'http://tinymce.moxiecode.com',
+			infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_iespell.html',
+			version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
+		};
+	},
+
+	/**
+	 * Returns the HTML contents of the iespell control.
+	 */
+	getControlHTML : function(cn) {
+		// Is it the iespell control and is the brower MSIE.
+		if (cn == "iespell" && (tinyMCE.isMSIE && !tinyMCE.isOpera))
+			return tinyMCE.getButtonHTML(cn, 'lang_iespell_desc', '{$pluginurl}/images/iespell.gif', 'mceIESpell');
+
+		return "";
+	},
+
+	/**
+	 * Executes the mceIESpell command.
+	 */
+	execCommand : function(editor_id, element, command, user_interface, value) {
+		// Handle ieSpellCommand
+		if (command == "mceIESpell") {
+			try {
+				var ieSpell = new ActiveXObject("ieSpell.ieSpellExtension");
+				ieSpell.CheckDocumentNode(tinyMCE.getInstanceById(editor_id).contentDocument.documentElement);
+			} catch (e) {
+				if (e.number == -2146827859) {
+					if (confirm(tinyMCE.getLang("lang_iespell_download", "", true)))
+						window.open('http://www.iespell.com/download.php', 'ieSpellDownload', '');
+				} else
+					alert("Error Loading ieSpell: Exception " + e.number);
+			}
+
+			return true;
+		}
+
+		// Pass to next handler in chain
+		return false;
+	}
+};
+
+tinyMCE.addPlugin("iespell", TinyMCE_IESpellPlugin);

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/iespell/images/iespell.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/iespell/images/iespell.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/iespell/langs/en.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/iespell/langs/en.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/iespell/langs/en.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,7 @@
+// UK lang variables
+
+tinyMCE.addToLang('',{
+iespell_desc : 'Run spell checking',
+iespell_download : "ieSpell not detected. Click OK to go to download page."
+});
+

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/iespell/readme.txt
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/iespell/readme.txt	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/iespell/readme.txt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1 @@
+Check the TinyMCE documentation for details on this plugin.

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/inlinepopups/css/inlinepopup.css
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/inlinepopups/css/inlinepopup.css	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/inlinepopups/css/inlinepopup.css	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,69 @@
+/* Window classes */
+
+.mceWindow {
+	position: absolute;
+	left: 0;
+	top: 0;
+	border: 1px solid black;
+	background-color: #D4D0C8;
+}
+
+.mceWindowHead {
+	background-color: #334F8D;
+	width: 100%;
+	height: 18px;
+	cursor: move;
+	overflow: hidden;
+}
+
+.mceWindowBody {
+	clear: both;
+	background-color: white;
+}
+
+.mceWindowStatusbar {
+	background-color: #D4D0C8;
+	height: 12px;
+	border-top: 1px solid black;
+}
+
+.mceWindowTitle {
+	float: left;
+	font-family: "MS Sans Serif";
+	font-size: 9pt;
+	font-weight: bold;
+	line-height: 18px;
+	color: white;
+	margin-left: 2px;
+	overflow: hidden;
+}
+
+.mceWindowHeadTools {
+	margin-right: 2px;
+}
+
+.mceWindowClose, .mceWindowMinimize, .mceWindowMaximize {
+	display: block;
+	float: right;
+	overflow: hidden;
+	margin-top: 2px;
+}
+
+.mceWindowClose {
+	margin-left: 2px;
+}
+
+.mceWindowMinimize {
+}
+
+.mceWindowMaximize {
+}
+
+.mceWindowResize {
+	display: block;
+	float: right;
+	overflow: hidden;
+	cursor: se-resize;
+	width: 12px;
+	height: 12px;
+}

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/inlinepopups/editor_plugin.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/inlinepopups/editor_plugin.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/inlinepopups/editor_plugin.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1 @@
+var TinyMCE_InlinePopupsPlugin={getInfo:function(){return{longname:'Inline Popups',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_inlinepopups.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};}};tinyMCE.addPlugin("inlinepopups",TinyMCE_InlinePopupsPlugin);TinyMCE_Engine.prototype.orgOpenWindow=TinyMCE_Engine.prototype.openWindow;TinyMCE_Engine.prototype.openWindow=function(template,args){if(args['inline']!="yes"||tinyMCE.isOpera||tinyMCE.getParam("plugins").indexOf('inlinepopups')==-1){mcWindows.selectedWindow=null;args['mce_inside_iframe']=false;this.orgOpenWindow(template,args);return;}var url,resizable,scrollbars;args['mce_inside_iframe']=true;tinyMCE.windowArgs=args;if(template['file'].charAt(0)!='/'&&template['file'].indexOf('://')==-1)url=tinyMCE.baseURL+"/themes/"+tinyMCE.getParam("theme")+"/"+template['file'];else url=template['file'];if(!(width=parseInt(template['width'])))width=320;if(!(height=parseInt(template['height'])))height=200;resizable=(args&&args['resizable'])?args['resizable']:"no";scrollbars=(args&&args['scrollbars'])?args['scrollbars']:"no";height+=18;for(var name in args){if(typeof(args[name])=='function')continue;url=tinyMCE.replaceVar(url,name,escape(args[name]));}var elm=document.getElementById(this.selectedInstance.editorId+'_parent');var pos=tinyMCE.getAbsPosition(elm);pos.absLeft+=Math.round((elm.firstChild.clientWidth/2)-(width/2));pos.absTop+=Math.round((elm.firstChild.clientHeight/2)-(height/2));mcWindows.open(url,mcWindows.idCounter++,"modal=yes,width="+width+",height="+height+",resizable="+resizable+",scrollbars="+scrollbars+",statusbar="+resizable+",left="+pos.absLeft+",top="+pos.absTop);};TinyMCE_Engine.prototype.orgCloseWindow=TinyMCE_Engine.prototype.closeWindow;TinyMCE_Engine.prototype.closeWindow=function(win){if(mcWindows.selectedWindow!=null)mcWindows.selectedWindow.close();else this.orgCloseWindow(win);};TinyMCE_Engine.prototype.setWindowTitle=function(win_ref,title){for(var n in mcWindows.windows){var win=mcWindows.windows[n];if(typeof(win)=='function')continue;if(win_ref.name==win.id+"_iframe")window.frames[win.id+"_iframe"].document.getElementById(win.id+'_title').innerHTML=title;}};function TinyMCE_Windows(){this.settings=new Array();this.windows=new Array();this.isMSIE=(navigator.appName=="Microsoft Internet Explorer");this.isGecko=navigator.userAgent.indexOf('Gecko')!=-1;this.isSafari=navigator.userAgent.indexOf('Safari')!=-1;this.isMac=navigator.userAgent.indexOf('Mac')!=-1;this.isMSIE5_0=this.isMSIE&&(navigator.userAgent.indexOf('MSIE 5.0')!=-1);this.action="none";this.selectedWindow=null;this.lastSelectedWindow=null;this.zindex=100;this.mouseDownScreenX=0;this.mouseDownScreenY=0;this.mouseDownLayerX=0;this.mouseDownLayerY=0;this.mouseDownWidth=0;this.mouseDownHeight=0;this.idCounter=0;};TinyMCE_Windows.prototype.init=function(settings){this.settings=settings;if(this.isMSIE)this.addEvent(document,"mousemove",mcWindows.eventDispatcher);else this.addEvent(window,"mousemove",mcWindows.eventDispatcher);this.addEvent(document,"mouseup",mcWindows.eventDispatcher);this.doc=document;};TinyMCE_Windows.prototype.getParam=function(name,default_value){var value=null;value=(typeof(this.settings[name])=="undefined")?default_value:this.settings[name];if(value=="true"||value=="false")return(value=="true");return value;};TinyMCE_Windows.prototype.eventDispatcher=function(e){e=typeof(e)=="undefined"?window.event:e;if(mcWindows.selectedWindow==null)return;if(mcWindows.isGecko&&e.type=="mousedown"){var elm=e.currentTarget;for(var n in mcWindows.windows){var win=mcWindows.windows[n];if(win.headElement==elm||win.resizeElement==elm){win.focus();break;}}}switch(e.type){case"mousemove":mcWindows.selectedWindow.onMouseMove(e);break;case"mouseup":mcWindows.selectedWindow.onMouseUp(e);break;case"mousedown":mcWindows.selectedWindow.onMouseDown(e);break;case"focus":mcWindows.selectedWindow.onFocus(e);break;}};TinyMCE_Windows.prototype.addEvent=function(obj,name,handler){if(this.isMSIE)obj.attachEvent("on"+name,handler);else obj.addEventListener(name,handler,true);};TinyMCE_Windows.prototype.cancelEvent=function(e){if(this.isMSIE){e.returnValue=false;e.cancelBubble=true;}else e.preventDefault();};TinyMCE_Windows.prototype.parseFeatures=function(opts){opts=opts.toLowerCase();opts=opts.replace(/;/g,",");opts=opts.replace(/[^0-9a-z=,]/g,"");var optionChunks=opts.split(',');var options=new Array();options['left']="10";options['top']="10";options['width']="300";options['height']="300";options['resizable']="yes";options['minimizable']="yes";options['maximizable']="yes";options['close']="yes";options['movable']="yes";options['statusbar']="yes";options['scrollbars']="auto";options['modal']="no";if(opts=="")return options;for(var i=0;i<optionChunks.length;i++){var parts=optionChunks[i].split('=');if(parts.length==2)options[parts[0]]=parts[1];}options['left']=parseInt(options['left']);options['top']=parseInt(options['top']);options['width']=parseInt(options['width']);options['height']=parseInt(options['height']);return options;};TinyMCE_Windows.prototype.open=function(url,name,features){this.lastSelectedWindow=this.selectedWindow;var win=new TinyMCE_Window();var winDiv,html="",id;var imgPath=this.getParam("images_path");features=this.parseFeatures(features);id="mcWindow_"+name;win.deltaHeight=18;if(features['statusbar']=="yes"){win.deltaHeight+=13;if(this.isMSIE)win.deltaHeight+=1;}width=parseInt(features['width']);height=parseInt(features['height'])-win.deltaHeight;if(this.isMSIE)width-=2;win.id=id;win.url=url;win.name=name;win.features=features;this.windows[name]=win;iframeWidth=width;iframeHeight=height;html+='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">';html+='<html>';html+='<head>';html+='<title>Wrapper iframe</title>';html+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">';html+='<link href="'+this.getParam("css_file")+'" rel="stylesheet" type="text/css" />';html+='</head>';html+='<body onload="parent.mcWindows.onLoad(\''+name+'\');">';html+='<div id="'+id+'_container" class="mceWindow">';html+='<div id="'+id+'_head" class="mceWindowHead" onmousedown="parent.mcWindows.windows[\''+name+'\'].focus();">';html+='  <div id="'+id+'_title" class="mceWindowTitle"';html+='  onselectstart="return false;" unselectable="on" style="-moz-user-select: none !important;"></div>';html+='    <div class="mceWindowHeadTools">';html+='      <a href="javascript:parent.mcWindows.windows[\''+name+'\'].close();" target="_self" onmousedown="return false;" class="mceWindowClose"><img border="0" src="'+imgPath+'/window_close.gif" /></a>';html+='    </div>';html+='</div><div id="'+id+'_body" class="mceWindowBody" style="width: '+width+'px; height: '+height+'px;">';html+='<iframe id="'+id+'_iframe" name="'+id+'_iframe" frameborder="0" width="'+iframeWidth+'" height="'+iframeHeight+'" src="'+url+'" class="mceWindowBodyIframe" scrolling="'+features['scrollbars']+'"></iframe></div>';if(features['statusbar']=="yes"){html+='<div id="'+id+'_statusbar" class="mceWindowStatusbar" onmousedown="parent.mcWindows.windows[\''+name+'\'].focus();">';if(features['resizable']=="yes"){if(this.isGecko)html+='<div id="'+id+'_resize" class="mceWindowResize"><div style="background-image: url(\''+imgPath+'/window_resize.gif\'); width: 12px; height: 12px;"></div></div>';else html+='<div id="'+id+'_resize" class="mceWindowResize"><img onmousedown="parent.mcWindows.windows[\''+name+'\'].focus();" border="0" src="'+imgPath+'/window_resize.gif" /></div>';}html+='</div>';}html+='</div>';html+='</body>';html+='</html>';this.createFloatingIFrame(id,features['left'],features['top'],features['width'],features['height'],html);};TinyMCE_Windows.prototype.setDocumentLock=function(state){if(state){var elm=document.getElementById('mcWindowEventBlocker');if(elm==null){elm=document.createElement("div");elm.id="mcWindowEventBlocker";elm.style.position="absolute";elm.style.left="0";elm.style.top="0";document.body.appendChild(elm);}elm.style.display="none";var imgPath=this.getParam("images_path");var width=document.body.clientWidth;var height=document.body.clientHeight;elm.style.width=width;elm.style.height=height;elm.innerHTML='<img src="'+imgPath+'/spacer.gif" width="'+width+'" height="'+height+'" />';elm.style.zIndex=mcWindows.zindex-1;elm.style.display="block";}else{var elm=document.getElementById('mcWindowEventBlocker');if(mcWindows.windows.length==0)elm.parentNode.removeChild(elm);else elm.style.zIndex=mcWindows.zindex-1;}};TinyMCE_Windows.prototype.onLoad=function(name){var win=mcWindows.windows[name];var id="mcWindow_"+name;var wrapperIframe=window.frames[id+"_iframe"].frames[0];var wrapperDoc=window.frames[id+"_iframe"].document;var doc=window.frames[id+"_iframe"].document;var winDiv=document.getElementById("mcWindow_"+name+"_div");var realIframe=window.frames[id+"_iframe"].frames[0];win.id="mcWindow_"+name;win.winElement=winDiv;win.bodyElement=doc.getElementById(id+'_body');win.iframeElement=doc.getElementById(id+'_iframe');win.headElement=doc.getElementById(id+'_head');win.titleElement=doc.getElementById(id+'_title');win.resizeElement=doc.getElementById(id+'_resize');win.containerElement=doc.getElementById(id+'_container');win.left=win.features['left'];win.top=win.features['top'];win.frame=window.frames[id+'_iframe'].frames[0];win.wrapperFrame=window.frames[id+'_iframe'];win.wrapperIFrameElement=document.getElementById(id+"_iframe");mcWindows.addEvent(win.headElement,"mousedown",mcWindows.eventDispatcher);if(win.resizeElement!=null)mcWindows.addEvent(win.resizeElement,"mousedown",mcWindows.eventDispatcher);if(mcWindows.isMSIE){mcWindows.addEvent(realIframe.document,"mousemove",mcWindows.eventDispatcher);mcWindows.addEvent(realIframe.document,"mouseup",mcWindows.eventDispatcher);}else{mcWindows.addEvent(realIframe,"mousemove",mcWindows.eventDispatcher);mcWindows.addEvent(realIframe,"mouseup",mcWindows.eventDispatcher);mcWindows.addEvent(realIframe,"focus",mcWindows.eventDispatcher);}for(var i=0;i<window.frames.length;i++){if(!window.frames[i]._hasMouseHandlers){if(mcWindows.isMSIE){mcWindows.addEvent(window.frames[i].document,"mousemove",mcWindows.eventDispatcher);mcWindows.addEvent(window.frames[i].document,"mouseup",mcWindows.eventDispatcher);}else{mcWindows.addEvent(window.frames[i],"mousemove",mcWindows.eventDispatcher);mcWindows.addEvent(window.frames[i],"mouseup",mcWindows.eventDispatcher);}window.frames[i]._hasMouseHandlers=true;}}if(mcWindows.isMSIE){mcWindows.addEvent(win.frame.document,"mousemove",mcWindows.eventDispatcher);mcWindows.addEvent(win.frame.document,"mouseup",mcWindows.eventDispatcher);}else{mcWindows.addEvent(win.frame,"mousemove",mcWindows.eventDispatcher);mcWindows.addEvent(win.frame,"mouseup",mcWindows.eventDispatcher);mcWindows.addEvent(win.frame,"focus",mcWindows.eventDispatcher);}var func=this.getParam("on_open_window","");if(func!="")eval(func+"(win);");win.focus();if(win.features['modal']=="yes")mcWindows.setDocumentLock(true);};TinyMCE_Windows.prototype.createFloatingIFrame=function(id_prefix,left,top,width,height,html){var iframe=document.createElement("iframe");var div=document.createElement("div");width=parseInt(width);height=parseInt(height)+1;div.setAttribute("id",id_prefix+"_div");div.setAttribute("width",width);div.setAttribute("height",(height));div.style.position="absolute";div.style.left=left+"px";div.style.top=top+"px";div.style.width=width+"px";div.style.height=(height)+"px";div.style.backgroundColor="white";div.style.display="none";if(this.isGecko){iframeWidth=width+2;iframeHeight=height+2;}else{iframeWidth=width;iframeHeight=height+1;}iframe.setAttribute("id",id_prefix+"_iframe");iframe.setAttribute("name",id_prefix+"_iframe");iframe.setAttribute("border","0");iframe.setAttribute("frameBorder","0");iframe.setAttribute("marginWidth","0");iframe.setAttribute("marginHeight","0");iframe.setAttribute("leftMargin","0");iframe.setAttribute("topMargin","0");iframe.setAttribute("width",iframeWidth);iframe.setAttribute("height",iframeHeight);iframe.setAttribute("scrolling","no");iframe.style.width=iframeWidth+"px";iframe.style.height=iframeHeight+"px";iframe.style.backgroundColor="white";div.appendChild(iframe);document.body.appendChild(div);div.innerHTML=div.innerHTML;if(this.isSafari){window.setTimeout(function(){doc=window.frames[id_prefix+'_iframe'].document;doc.open();doc.write(html);doc.close();},10);}else{doc=window.frames[id_prefix+'_iframe'].window.document;doc.open();doc.write(html);doc.close();}div.style.display="block";return div;};function TinyMCE_Window(){};TinyMCE_Window.prototype.focus=function(){if(this!=mcWindows.selectedWindow){this.winElement.style.zIndex=++mcWindows.zindex;mcWindows.lastSelectedWindow=mcWindows.selectedWindow;mcWindows.selectedWindow=this;}};TinyMCE_Window.prototype.minimize=function(){};TinyMCE_Window.prototype.maximize=function(){};TinyMCE_Window.prototype.startResize=function(){mcWindows.action="resize";};TinyMCE_Window.prototype.startMove=function(e){mcWindows.action="move";};TinyMCE_Window.prototype.close=function(){if(this.frame&&this.frame['tinyMCEPopup'])this.frame['tinyMCEPopup'].restoreSelection();if(mcWindows.lastSelectedWindow!=null)mcWindows.lastSelectedWindow.focus();var mcWindowsNew=new Array();for(var n in mcWindows.windows){var win=mcWindows.windows[n];if(typeof(win)=='function')continue;if(win.name!=this.name)mcWindowsNew[n]=win;}mcWindows.windows=mcWindowsNew;var e=mcWindows.doc.getElementById(this.id+"_iframe");e.parentNode.removeChild(e);var e=mcWindows.doc.getElementById(this.id+"_div");e.parentNode.removeChild(e);mcWindows.setDocumentLock(false);};TinyMCE_Window.prototype.onMouseMove=function(e){var scrollX=0;var scrollY=0;var dx=e.screenX-mcWindows.mouseDownScreenX;var dy=e.screenY-mcWindows.mouseDownScreenY;switch(mcWindows.action){case"resize":width=mcWindows.mouseDownWidth+(e.screenX-mcWindows.mouseDownScreenX);height=mcWindows.mouseDownHeight+(e.screenY-mcWindows.mouseDownScreenY);width=width<100?100:width;height=height<100?100:height;this.wrapperIFrameElement.style.width=width+2;this.wrapperIFrameElement.style.height=height+2;this.wrapperIFrameElement.width=width+2;this.wrapperIFrameElement.height=height+2;this.winElement.style.width=width;this.winElement.style.height=height;height=height-this.deltaHeight;this.containerElement.style.width=width;this.iframeElement.style.width=width;this.iframeElement.style.height=height;this.bodyElement.style.width=width;this.bodyElement.style.height=height;this.headElement.style.width=width;mcWindows.cancelEvent(e);break;case"move":this.left=mcWindows.mouseDownLayerX+(e.screenX-mcWindows.mouseDownScreenX);this.top=mcWindows.mouseDownLayerY+(e.screenY-mcWindows.mouseDownScreenY);this.winElement.style.left=this.left+"px";this.winElement.style.top=this.top+"px";mcWindows.cancelEvent(e);break;}};function debug(msg){document.getElementById('debug').value+=msg+"\n";}TinyMCE_Window.prototype.onMouseUp=function(e){mcWindows.action="none";};TinyMCE_Window.prototype.onFocus=function(e){var winRef=e.currentTarget;for(var n in mcWindows.windows){var win=mcWindows.windows[n];if(typeof(win)=='function')continue;if(winRef.name==win.id+"_iframe"){win.focus();return;}}};TinyMCE_Window.prototype.onMouseDown=function(e){var elm=mcWindows.isMSIE?this.wrapperFrame.event.srcElement:e.target;var scrollX=0;var scrollY=0;mcWindows.mouseDownScreenX=e.screenX;mcWindows.mouseDownScreenY=e.screenY;mcWindows.mouseDownLayerX=this.left;mcWindows.mouseDownLayerY=this.top;mcWindows.mouseDownWidth=parseInt(this.winElement.style.width);mcWindows.mouseDownHeight=parseInt(this.winElement.style.height);if(this.resizeElement!=null&&elm==this.resizeElement.firstChild)this.startResize(e);else this.startMove(e);mcWindows.cancelEvent(e);};var mcWindows=new TinyMCE_Windows();mcWindows.init({images_path:tinyMCE.baseURL+"/plugins/inlinepopups/images",css_file:tinyMCE.baseURL+"/plugins/inlinepopups/css/inlinepopup.css"});
\ No newline at end of file

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/inlinepopups/editor_plugin_src.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/inlinepopups/editor_plugin_src.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/inlinepopups/editor_plugin_src.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,662 @@
+/**
+ * $RCSfile: editor_plugin_src.js,v $
+ * $Revision: 1.8 $
+ * $Date: 2006/02/06 20:02:38 $
+ *
+ * Moxiecode DHTML Windows script.
+ *
+ * @author Moxiecode
+ * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
+ */
+
+// Patch openWindow, closeWindow TinyMCE functions
+
+var TinyMCE_InlinePopupsPlugin = {
+	getInfo : function() {
+		return {
+			longname : 'Inline Popups',
+			author : 'Moxiecode Systems',
+			authorurl : 'http://tinymce.moxiecode.com',
+			infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_inlinepopups.html',
+			version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
+		};
+	}
+};
+
+tinyMCE.addPlugin("inlinepopups", TinyMCE_InlinePopupsPlugin);
+
+// Patch openWindow, closeWindow TinyMCE functions
+
+TinyMCE_Engine.prototype.orgOpenWindow = TinyMCE_Engine.prototype.openWindow;
+
+TinyMCE_Engine.prototype.openWindow = function(template, args) {
+	// Does the caller support inline
+	if (args['inline'] != "yes" || tinyMCE.isOpera || tinyMCE.getParam("plugins").indexOf('inlinepopups') == -1) {
+		mcWindows.selectedWindow = null;
+		args['mce_inside_iframe'] = false;
+		this.orgOpenWindow(template, args);
+		return;
+	}
+
+	var url, resizable, scrollbars;
+
+	args['mce_inside_iframe'] = true;
+	tinyMCE.windowArgs = args;
+
+	if (template['file'].charAt(0) != '/' && template['file'].indexOf('://') == -1)
+		url = tinyMCE.baseURL + "/themes/" + tinyMCE.getParam("theme") + "/" + template['file'];
+	else
+		url = template['file'];
+
+	if (!(width = parseInt(template['width'])))
+		width = 320;
+
+	if (!(height = parseInt(template['height'])))
+		height = 200;
+
+	resizable = (args && args['resizable']) ? args['resizable'] : "no";
+	scrollbars = (args && args['scrollbars']) ? args['scrollbars'] : "no";
+
+	height += 18;
+
+	// Replace all args as variables in URL
+	for (var name in args) {
+		if (typeof(args[name]) == 'function')
+			continue;
+
+		url = tinyMCE.replaceVar(url, name, escape(args[name]));
+	}
+
+	var elm = document.getElementById(this.selectedInstance.editorId + '_parent');
+	var pos = tinyMCE.getAbsPosition(elm);
+
+	// Center div in editor area
+	pos.absLeft += Math.round((elm.firstChild.clientWidth / 2) - (width / 2));
+	pos.absTop += Math.round((elm.firstChild.clientHeight / 2) - (height / 2));
+
+	mcWindows.open(url, mcWindows.idCounter++, "modal=yes,width=" + width+ ",height=" + height + ",resizable=" + resizable + ",scrollbars=" + scrollbars + ",statusbar=" + resizable + ",left=" + pos.absLeft + ",top=" + pos.absTop);
+};
+
+TinyMCE_Engine.prototype.orgCloseWindow = TinyMCE_Engine.prototype.closeWindow;
+
+TinyMCE_Engine.prototype.closeWindow = function(win) {
+	if (mcWindows.selectedWindow != null)
+		mcWindows.selectedWindow.close();
+	else
+		this.orgCloseWindow(win);
+};
+
+TinyMCE_Engine.prototype.setWindowTitle = function(win_ref, title) {
+	for (var n in mcWindows.windows) {
+		var win = mcWindows.windows[n];
+		if (typeof(win) == 'function')
+			continue;
+
+		if (win_ref.name == win.id + "_iframe")
+			window.frames[win.id + "_iframe"].document.getElementById(win.id + '_title').innerHTML = title;
+	}
+};
+
+// * * * * * TinyMCE_Windows classes below
+
+// Windows handler
+function TinyMCE_Windows() {
+	this.settings = new Array();
+	this.windows = new Array();
+	this.isMSIE = (navigator.appName == "Microsoft Internet Explorer");
+	this.isGecko = navigator.userAgent.indexOf('Gecko') != -1;
+	this.isSafari = navigator.userAgent.indexOf('Safari') != -1;
+	this.isMac = navigator.userAgent.indexOf('Mac') != -1;
+	this.isMSIE5_0 = this.isMSIE && (navigator.userAgent.indexOf('MSIE 5.0') != -1);
+	this.action = "none";
+	this.selectedWindow = null;
+	this.lastSelectedWindow = null;
+	this.zindex = 100;
+	this.mouseDownScreenX = 0;
+	this.mouseDownScreenY = 0;
+	this.mouseDownLayerX = 0;
+	this.mouseDownLayerY = 0;
+	this.mouseDownWidth = 0;
+	this.mouseDownHeight = 0;
+	this.idCounter = 0;
+};
+
+TinyMCE_Windows.prototype.init = function(settings) {
+	this.settings = settings;
+
+	if (this.isMSIE)
+		this.addEvent(document, "mousemove", mcWindows.eventDispatcher);
+	else
+		this.addEvent(window, "mousemove", mcWindows.eventDispatcher);
+
+	this.addEvent(document, "mouseup", mcWindows.eventDispatcher);
+
+	this.doc = document;
+};
+
+TinyMCE_Windows.prototype.getParam = function(name, default_value) {
+	var value = null;
+
+	value = (typeof(this.settings[name]) == "undefined") ? default_value : this.settings[name];
+
+	// Fix bool values
+	if (value == "true" || value == "false")
+		return (value == "true");
+
+	return value;
+};
+
+TinyMCE_Windows.prototype.eventDispatcher = function(e) {
+	e = typeof(e) == "undefined" ? window.event : e;
+
+	if (mcWindows.selectedWindow == null)
+		return;
+
+	// Switch focus
+	if (mcWindows.isGecko && e.type == "mousedown") {
+		var elm = e.currentTarget;
+
+		for (var n in mcWindows.windows) {
+			var win = mcWindows.windows[n];
+
+			if (win.headElement == elm || win.resizeElement == elm) {
+				win.focus();
+				break;
+			}
+		}
+	}
+
+	switch (e.type) {
+		case "mousemove":
+			mcWindows.selectedWindow.onMouseMove(e);
+			break;
+
+		case "mouseup":
+			mcWindows.selectedWindow.onMouseUp(e);
+			break;
+
+		case "mousedown":
+			mcWindows.selectedWindow.onMouseDown(e);
+			break;
+
+		case "focus":
+			mcWindows.selectedWindow.onFocus(e);
+			break;
+	}
+};
+
+TinyMCE_Windows.prototype.addEvent = function(obj, name, handler) {
+	if (this.isMSIE)
+		obj.attachEvent("on" + name, handler);
+	else
+		obj.addEventListener(name, handler, true);
+};
+
+TinyMCE_Windows.prototype.cancelEvent = function(e) {
+	if (this.isMSIE) {
+		e.returnValue = false;
+		e.cancelBubble = true;
+	} else
+		e.preventDefault();
+};
+
+TinyMCE_Windows.prototype.parseFeatures = function(opts) {
+	// Cleanup the options
+	opts = opts.toLowerCase();
+	opts = opts.replace(/;/g, ",");
+	opts = opts.replace(/[^0-9a-z=,]/g, "");
+
+	var optionChunks = opts.split(',');
+	var options = new Array();
+
+	options['left'] = "10";
+	options['top'] = "10";
+	options['width'] = "300";
+	options['height'] = "300";
+	options['resizable'] = "yes";
+	options['minimizable'] = "yes";
+	options['maximizable'] = "yes";
+	options['close'] = "yes";
+	options['movable'] = "yes";
+	options['statusbar'] = "yes";
+	options['scrollbars'] = "auto";
+	options['modal'] = "no";
+
+	if (opts == "")
+		return options;
+
+	for (var i=0; i<optionChunks.length; i++) {
+		var parts = optionChunks[i].split('=');
+
+		if (parts.length == 2)
+			options[parts[0]] = parts[1];
+	}
+
+	options['left'] = parseInt(options['left']);
+	options['top'] = parseInt(options['top']);
+	options['width'] = parseInt(options['width']);
+	options['height'] = parseInt(options['height']);
+
+	return options;
+};
+
+TinyMCE_Windows.prototype.open = function(url, name, features) {
+	this.lastSelectedWindow = this.selectedWindow;
+
+	var win = new TinyMCE_Window();
+	var winDiv, html = "", id;
+	var imgPath = this.getParam("images_path");
+
+	features = this.parseFeatures(features);
+
+	// Create div
+	id = "mcWindow_" + name;
+	win.deltaHeight = 18;
+
+	if (features['statusbar'] == "yes") {
+		win.deltaHeight += 13;
+
+		if (this.isMSIE)
+			win.deltaHeight += 1;
+	}
+
+	width = parseInt(features['width']);
+	height = parseInt(features['height'])-win.deltaHeight;
+
+	if (this.isMSIE)
+		width -= 2;
+
+	// Setup first part of window
+	win.id = id;
+	win.url = url;
+	win.name = name;
+	win.features = features;
+	this.windows[name] = win;
+
+	iframeWidth = width;
+	iframeHeight = height;
+
+	// Create inner content
+	html += '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">';
+	html += '<html>';
+	html += '<head>';
+	html += '<title>Wrapper iframe</title>';
+	html += '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">';
+	html += '<link href="' + this.getParam("css_file") + '" rel="stylesheet" type="text/css" />';
+	html += '</head>';
+	html += '<body onload="parent.mcWindows.onLoad(\'' + name + '\');">';
+
+	html += '<div id="' + id + '_container" class="mceWindow">';
+	html += '<div id="' + id + '_head" class="mceWindowHead" onmousedown="parent.mcWindows.windows[\'' + name + '\'].focus();">';
+	html += '  <div id="' + id + '_title" class="mceWindowTitle"';
+	html += '  onselectstart="return false;" unselectable="on" style="-moz-user-select: none !important;"></div>';
+	html += '    <div class="mceWindowHeadTools">';
+	html += '      <a href="javascript:parent.mcWindows.windows[\'' + name + '\'].close();" target="_self" onmousedown="return false;" class="mceWindowClose"><img border="0" src="' + imgPath + '/window_close.gif" /></a>';
+//	html += '      <a href="javascript:mcWindows.windows[\'' + name + '\'].maximize();" target="_self" onmousedown="return false;" class="mceWindowMaximize"></a>';
+//	html += '      <a href="javascript:mcWindows.windows[\'' + name + '\'].minimize();" target="_self" onmousedown="return false;" class="mceWindowMinimize"></a>';
+	html += '    </div>';
+	html += '</div><div id="' + id + '_body" class="mceWindowBody" style="width: ' + width + 'px; height: ' + height + 'px;">';
+	html += '<iframe id="' + id + '_iframe" name="' + id + '_iframe" frameborder="0" width="' + iframeWidth + '" height="' + iframeHeight + '" src="' + url + '" class="mceWindowBodyIframe" scrolling="' + features['scrollbars'] + '"></iframe></div>';
+
+	if (features['statusbar'] == "yes") {
+		html += '<div id="' + id + '_statusbar" class="mceWindowStatusbar" onmousedown="parent.mcWindows.windows[\'' + name + '\'].focus();">';
+
+		if (features['resizable'] == "yes") {
+			if (this.isGecko)
+				html += '<div id="' + id + '_resize" class="mceWindowResize"><div style="background-image: url(\'' + imgPath + '/window_resize.gif\'); width: 12px; height: 12px;"></div></div>';
+			else
+				html += '<div id="' + id + '_resize" class="mceWindowResize"><img onmousedown="parent.mcWindows.windows[\'' + name + '\'].focus();" border="0" src="' + imgPath + '/window_resize.gif" /></div>';
+		}
+
+		html += '</div>';
+	}
+
+	html += '</div>';
+
+	html += '</body>';
+	html += '</html>';
+
+	// Create iframe
+	this.createFloatingIFrame(id, features['left'], features['top'], features['width'], features['height'], html);
+};
+
+// Blocks the document events by placing a image over the whole document
+TinyMCE_Windows.prototype.setDocumentLock = function(state) {
+	if (state) {
+		var elm = document.getElementById('mcWindowEventBlocker');
+		if (elm == null) {
+			elm = document.createElement("div");
+
+			elm.id = "mcWindowEventBlocker";
+			elm.style.position = "absolute";
+			elm.style.left = "0";
+			elm.style.top = "0";
+
+			document.body.appendChild(elm);
+		}
+
+		elm.style.display = "none";
+
+		var imgPath = this.getParam("images_path");
+		var width = document.body.clientWidth;
+		var height = document.body.clientHeight;
+
+		elm.style.width = width;
+		elm.style.height = height;
+		elm.innerHTML = '<img src="' + imgPath + '/spacer.gif" width="' + width + '" height="' + height + '" />';
+
+		elm.style.zIndex = mcWindows.zindex-1;
+		elm.style.display = "block";
+	} else {
+		var elm = document.getElementById('mcWindowEventBlocker');
+
+		if (mcWindows.windows.length == 0)
+			elm.parentNode.removeChild(elm);
+		else
+			elm.style.zIndex = mcWindows.zindex-1;
+	}
+};
+
+// Gets called when wrapper iframe is initialized
+TinyMCE_Windows.prototype.onLoad = function(name) {
+	var win = mcWindows.windows[name];
+	var id = "mcWindow_" + name;
+	var wrapperIframe = window.frames[id + "_iframe"].frames[0];
+	var wrapperDoc = window.frames[id + "_iframe"].document;
+	var doc = window.frames[id + "_iframe"].document;
+	var winDiv = document.getElementById("mcWindow_" + name + "_div");
+	var realIframe = window.frames[id + "_iframe"].frames[0];
+
+	// Set window data
+	win.id = "mcWindow_" + name;
+	win.winElement = winDiv;
+	win.bodyElement = doc.getElementById(id + '_body');
+	win.iframeElement = doc.getElementById(id + '_iframe');
+	win.headElement = doc.getElementById(id + '_head');
+	win.titleElement = doc.getElementById(id + '_title');
+	win.resizeElement = doc.getElementById(id + '_resize');
+	win.containerElement = doc.getElementById(id + '_container');
+	win.left = win.features['left'];
+	win.top = win.features['top'];
+	win.frame = window.frames[id + '_iframe'].frames[0];
+	win.wrapperFrame = window.frames[id + '_iframe'];
+	win.wrapperIFrameElement = document.getElementById(id + "_iframe");
+
+	// Add event handlers
+	mcWindows.addEvent(win.headElement, "mousedown", mcWindows.eventDispatcher);
+
+	if (win.resizeElement != null)
+		mcWindows.addEvent(win.resizeElement, "mousedown", mcWindows.eventDispatcher);
+
+	if (mcWindows.isMSIE) {
+		mcWindows.addEvent(realIframe.document, "mousemove", mcWindows.eventDispatcher);
+		mcWindows.addEvent(realIframe.document, "mouseup", mcWindows.eventDispatcher);
+	} else {
+		mcWindows.addEvent(realIframe, "mousemove", mcWindows.eventDispatcher);
+		mcWindows.addEvent(realIframe, "mouseup", mcWindows.eventDispatcher);
+		mcWindows.addEvent(realIframe, "focus", mcWindows.eventDispatcher);
+	}
+
+	for (var i=0; i<window.frames.length; i++) {
+		if (!window.frames[i]._hasMouseHandlers) {
+			if (mcWindows.isMSIE) {
+				mcWindows.addEvent(window.frames[i].document, "mousemove", mcWindows.eventDispatcher);
+				mcWindows.addEvent(window.frames[i].document, "mouseup", mcWindows.eventDispatcher);
+			} else {
+				mcWindows.addEvent(window.frames[i], "mousemove", mcWindows.eventDispatcher);
+				mcWindows.addEvent(window.frames[i], "mouseup", mcWindows.eventDispatcher);
+			}
+
+			window.frames[i]._hasMouseHandlers = true;
+		}
+	}
+
+	if (mcWindows.isMSIE) {
+		mcWindows.addEvent(win.frame.document, "mousemove", mcWindows.eventDispatcher);
+		mcWindows.addEvent(win.frame.document, "mouseup", mcWindows.eventDispatcher);
+	} else {
+		mcWindows.addEvent(win.frame, "mousemove", mcWindows.eventDispatcher);
+		mcWindows.addEvent(win.frame, "mouseup", mcWindows.eventDispatcher);
+		mcWindows.addEvent(win.frame, "focus", mcWindows.eventDispatcher);
+	}
+
+	// Dispatch open window event
+	var func = this.getParam("on_open_window", "");
+	if (func != "")
+		eval(func + "(win);");
+
+	win.focus();
+
+	if (win.features['modal'] == "yes")
+		mcWindows.setDocumentLock(true);
+};
+
+TinyMCE_Windows.prototype.createFloatingIFrame = function(id_prefix, left, top, width, height, html) {
+	var iframe = document.createElement("iframe");
+	var div = document.createElement("div");
+
+	width = parseInt(width);
+	height = parseInt(height)+1;
+
+	// Create wrapper div
+	div.setAttribute("id", id_prefix + "_div");
+	div.setAttribute("width", width);
+	div.setAttribute("height", (height));
+	div.style.position = "absolute";
+	div.style.left = left + "px";
+	div.style.top = top + "px";
+	div.style.width = width + "px";
+	div.style.height = (height) + "px";
+	div.style.backgroundColor = "white";
+	div.style.display = "none";
+
+	if (this.isGecko) {
+		iframeWidth = width + 2;
+		iframeHeight = height + 2;
+	} else {
+		iframeWidth = width;
+		iframeHeight = height + 1;
+	}
+
+	// Create iframe
+	iframe.setAttribute("id", id_prefix + "_iframe");
+	iframe.setAttribute("name", id_prefix + "_iframe");
+	iframe.setAttribute("border", "0");
+	iframe.setAttribute("frameBorder", "0");
+	iframe.setAttribute("marginWidth", "0");
+	iframe.setAttribute("marginHeight", "0");
+	iframe.setAttribute("leftMargin", "0");
+	iframe.setAttribute("topMargin", "0");
+	iframe.setAttribute("width", iframeWidth);
+	iframe.setAttribute("height", iframeHeight);
+//	iframe.setAttribute("src", "../jscripts/tiny_mce/blank.htm");
+	// iframe.setAttribute("allowtransparency", "false");
+	iframe.setAttribute("scrolling", "no");
+	iframe.style.width = iframeWidth + "px";
+	iframe.style.height = iframeHeight + "px";
+	iframe.style.backgroundColor = "white";
+	div.appendChild(iframe);
+
+	document.body.appendChild(div);
+
+	// Fixed MSIE 5.0 issue
+	div.innerHTML = div.innerHTML;
+
+	if (this.isSafari) {
+		// Give Safari some time to setup
+		window.setTimeout(function() {
+			doc = window.frames[id_prefix + '_iframe'].document;
+			doc.open();
+			doc.write(html);
+			doc.close();
+		}, 10);
+	} else {
+		doc = window.frames[id_prefix + '_iframe'].window.document;
+		doc.open();
+		doc.write(html);
+		doc.close();
+	}
+
+	div.style.display = "block";
+
+	return div;
+};
+
+// Window instance
+function TinyMCE_Window() {
+};
+
+TinyMCE_Window.prototype.focus = function() {
+	if (this != mcWindows.selectedWindow) {
+		this.winElement.style.zIndex = ++mcWindows.zindex;
+		mcWindows.lastSelectedWindow = mcWindows.selectedWindow;
+		mcWindows.selectedWindow = this;
+	}
+};
+
+TinyMCE_Window.prototype.minimize = function() {
+};
+
+TinyMCE_Window.prototype.maximize = function() {
+	
+};
+
+TinyMCE_Window.prototype.startResize = function() {
+	mcWindows.action = "resize";
+};
+
+TinyMCE_Window.prototype.startMove = function(e) {
+	mcWindows.action = "move";
+};
+
+TinyMCE_Window.prototype.close = function() {
+	if (this.frame && this.frame['tinyMCEPopup'])
+		this.frame['tinyMCEPopup'].restoreSelection();
+
+	if (mcWindows.lastSelectedWindow != null)
+		mcWindows.lastSelectedWindow.focus();
+
+	var mcWindowsNew = new Array();
+	for (var n in mcWindows.windows) {
+		var win = mcWindows.windows[n];
+		if (typeof(win) == 'function')
+			continue;
+
+		if (win.name != this.name)
+			mcWindowsNew[n] = win;
+	}
+
+	mcWindows.windows = mcWindowsNew;
+
+//	alert(mcWindows.doc.getElementById(this.id + "_iframe"));
+
+	var e = mcWindows.doc.getElementById(this.id + "_iframe");
+	e.parentNode.removeChild(e);
+
+	var e = mcWindows.doc.getElementById(this.id + "_div");
+	e.parentNode.removeChild(e);
+
+	mcWindows.setDocumentLock(false);
+};
+
+TinyMCE_Window.prototype.onMouseMove = function(e) {
+	var scrollX = 0;//this.doc.body.scrollLeft;
+	var scrollY = 0;//this.doc.body.scrollTop;
+
+	// Calculate real X, Y
+	var dx = e.screenX - mcWindows.mouseDownScreenX;
+	var dy = e.screenY - mcWindows.mouseDownScreenY;
+
+	switch (mcWindows.action) {
+		case "resize":
+			width = mcWindows.mouseDownWidth + (e.screenX - mcWindows.mouseDownScreenX);
+			height = mcWindows.mouseDownHeight + (e.screenY - mcWindows.mouseDownScreenY);
+
+			width = width < 100 ? 100 : width;
+			height = height < 100 ? 100 : height;
+
+			this.wrapperIFrameElement.style.width = width+2;
+			this.wrapperIFrameElement.style.height = height+2;
+			this.wrapperIFrameElement.width = width+2;
+			this.wrapperIFrameElement.height = height+2;
+			this.winElement.style.width = width;
+			this.winElement.style.height = height;
+
+			height = height - this.deltaHeight;
+
+			this.containerElement.style.width = width;
+
+			this.iframeElement.style.width = width;
+			this.iframeElement.style.height = height;
+			this.bodyElement.style.width = width;
+			this.bodyElement.style.height = height;
+			this.headElement.style.width = width;
+			//this.statusElement.style.width = width;
+
+			mcWindows.cancelEvent(e);
+			break;
+
+		case "move":
+			this.left = mcWindows.mouseDownLayerX + (e.screenX - mcWindows.mouseDownScreenX);
+			this.top = mcWindows.mouseDownLayerY + (e.screenY - mcWindows.mouseDownScreenY);
+			this.winElement.style.left = this.left + "px";
+			this.winElement.style.top = this.top + "px";
+
+			mcWindows.cancelEvent(e);
+			break;
+	}
+};
+
+function debug(msg) {
+	document.getElementById('debug').value += msg + "\n";
+}
+
+TinyMCE_Window.prototype.onMouseUp = function(e) {
+	mcWindows.action = "none";
+};
+
+TinyMCE_Window.prototype.onFocus = function(e) {
+	// Gecko only handler
+	var winRef = e.currentTarget;
+
+	for (var n in mcWindows.windows) {
+		var win = mcWindows.windows[n];
+		if (typeof(win) == 'function')
+			continue;
+
+		if (winRef.name == win.id + "_iframe") {
+			win.focus();
+			return;
+		}
+	}
+};
+
+TinyMCE_Window.prototype.onMouseDown = function(e) {
+	var elm = mcWindows.isMSIE ? this.wrapperFrame.event.srcElement : e.target;
+
+	var scrollX = 0;//this.doc.body.scrollLeft;
+	var scrollY = 0;//this.doc.body.scrollTop;
+
+	mcWindows.mouseDownScreenX = e.screenX;
+	mcWindows.mouseDownScreenY = e.screenY;
+	mcWindows.mouseDownLayerX = this.left;
+	mcWindows.mouseDownLayerY = this.top;
+	mcWindows.mouseDownWidth = parseInt(this.winElement.style.width);
+	mcWindows.mouseDownHeight = parseInt(this.winElement.style.height);
+
+	if (this.resizeElement != null && elm == this.resizeElement.firstChild)
+		this.startResize(e);
+	else
+		this.startMove(e);
+
+	mcWindows.cancelEvent(e);
+};
+
+// Global instance
+var mcWindows = new TinyMCE_Windows();
+
+// Initialize windows
+mcWindows.init({
+	images_path : tinyMCE.baseURL + "/plugins/inlinepopups/images",
+	css_file : tinyMCE.baseURL + "/plugins/inlinepopups/css/inlinepopup.css"
+});

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/inlinepopups/images/spacer.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/inlinepopups/images/spacer.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/inlinepopups/images/window_close.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/inlinepopups/images/window_close.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/inlinepopups/images/window_maximize.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/inlinepopups/images/window_maximize.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/inlinepopups/images/window_minimize.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/inlinepopups/images/window_minimize.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/inlinepopups/images/window_resize.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/inlinepopups/images/window_resize.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/inlinepopups/jscripts/mcwindows.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/inlinepopups/jscripts/mcwindows.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/inlinepopups/jscripts/mcwindows.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,455 @@
+/**
+ * $RCSfile: mcwindows.js,v $
+ * $Revision: 1.2 $
+ * $Date: 2005/10/18 13:59:43 $
+ *
+ * Moxiecode DHTML Windows script.
+ *
+ * @author Moxiecode
+ * @copyright Copyright © 2004, Moxiecode Systems AB, All rights reserved.
+ */
+
+// Windows handler
+function MCWindows() {
+	this.settings = new Array();
+	this.windows = new Array();
+	this.isMSIE = (navigator.appName == "Microsoft Internet Explorer");
+	this.isGecko = navigator.userAgent.indexOf('Gecko') != -1;
+	this.isSafari = navigator.userAgent.indexOf('Safari') != -1;
+	this.isMac = navigator.userAgent.indexOf('Mac') != -1;
+	this.isMSIE5_0 = this.isMSIE && (navigator.userAgent.indexOf('MSIE 5.0') != -1);
+	this.action = "none";
+	this.selectedWindow = null;
+	this.zindex = 100;
+	this.mouseDownScreenX = 0;
+	this.mouseDownScreenY = 0;
+	this.mouseDownLayerX = 0;
+	this.mouseDownLayerY = 0;
+	this.mouseDownWidth = 0;
+	this.mouseDownHeight = 0;
+};
+
+MCWindows.prototype.init = function(settings) {
+	this.settings = settings;
+
+	if (this.isMSIE)
+		this.addEvent(document, "mousemove", mcWindows.eventDispatcher);
+	else
+		this.addEvent(window, "mousemove", mcWindows.eventDispatcher);
+
+	this.addEvent(document, "mouseup", mcWindows.eventDispatcher);
+};
+
+MCWindows.prototype.getParam = function(name, default_value) {
+	var value = null;
+
+	value = (typeof(this.settings[name]) == "undefined") ? default_value : this.settings[name];
+
+	// Fix bool values
+	if (value == "true" || value == "false")
+		return (value == "true");
+
+	return value;
+};
+
+MCWindows.prototype.eventDispatcher = function(e) {
+	e = typeof(e) == "undefined" ? window.event : e;
+
+	if (mcWindows.selectedWindow == null)
+		return;
+
+	// Switch focus
+	if (mcWindows.isGecko && e.type == "mousedown") {
+		var elm = e.currentTarget;
+
+		for (var n in mcWindows.windows) {
+			var win = mcWindows.windows[n];
+			if (typeof(win) == 'function')
+				continue;
+
+			if (win.headElement == elm || win.resizeElement == elm) {
+				win.focus();
+				break;
+			}
+		}
+	}
+
+	switch (e.type) {
+		case "mousemove":
+			mcWindows.selectedWindow.onMouseMove(e);
+			break;
+
+		case "mouseup":
+			mcWindows.selectedWindow.onMouseUp(e);
+			break;
+
+		case "mousedown":
+			mcWindows.selectedWindow.onMouseDown(e);
+			break;
+
+		case "focus":
+			mcWindows.selectedWindow.onFocus(e);
+			break;
+	}
+}
+
+MCWindows.prototype.addEvent = function(obj, name, handler) {
+	if (this.isMSIE)
+		obj.attachEvent("on" + name, handler);
+	else
+		obj.addEventListener(name, handler, true);
+};
+
+MCWindows.prototype.cancelEvent = function(e) {
+	if (this.isMSIE) {
+		e.returnValue = false;
+		e.cancelBubble = true;
+	} else
+		e.preventDefault();
+};
+
+MCWindows.prototype.parseFeatures = function(opts) {
+	// Cleanup the options
+	opts = opts.toLowerCase();
+	opts = opts.replace(/;/g, ",");
+	opts = opts.replace(/[^0-9a-z=,]/g, "");
+
+	var optionChunks = opts.split(',');
+	var options = new Array();
+
+	options['left'] = 10;
+	options['top'] = 10;
+	options['width'] = 300;
+	options['height'] = 300;
+	options['resizable'] = true;
+	options['minimizable'] = true;
+	options['maximizable'] = true;
+	options['close'] = true;
+	options['movable'] = true;
+
+	if (opts == "")
+		return options;
+
+	for (var i=0; i<optionChunks.length; i++) {
+		var parts = optionChunks[i].split('=');
+
+		if (parts.length == 2)
+			options[parts[0]] = parts[1];
+	}
+
+	return options;
+};
+
+MCWindows.prototype.open = function(url, name, features) {
+	var win = new MCWindow();
+	var winDiv, html = "", id;
+
+	features = this.parseFeatures(features);
+
+	// Create div
+	id = "mcWindow_" + name;
+
+	width = parseInt(features['width']);
+	height = parseInt(features['height'])-12-19;
+
+	if (this.isMSIE)
+		width -= 2;
+
+	// Setup first part of window
+	win.id = id;
+	win.url = url;
+	win.name = name;
+	win.features = features;
+	this.windows[name] = win;
+
+	iframeWidth = width;
+	iframeHeight = height;
+
+	// Create inner content
+	html += '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">';
+	html += '<html>';
+	html += '<head>';
+	html += '<title>Wrapper iframe</title>';
+	html += '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">';
+	html += '<link href="../jscripts/tiny_mce/themes/advanced/css/editor_ui.css" rel="stylesheet" type="text/css" />';
+	html += '</head>';
+	html += '<body onload="parent.mcWindows.onLoad(\'' + name + '\');">';
+
+	html += '<div id="' + id + '_container" class="mceWindow">';
+	html += '<div id="' + id + '_head" class="mceWindowHead" onmousedown="parent.mcWindows.windows[\'' + name + '\'].focus();">';
+	html += '  <div id="' + id + '_title" class="mceWindowTitle"';
+	html += '  onselectstart="return false;" unselectable="on" style="-moz-user-select: none !important;">No name window</div>';
+	html += '    <div class="mceWindowHeadTools">';
+	html += '      <a href="javascript:parent.mcWindows.windows[\'' + name + '\'].close();" onmousedown="return false;" class="mceWindowClose"><img border="0" src="../jscripts/tiny_mce/themes/advanced/images/window_close.gif" /></a>';
+//	html += '      <a href="javascript:mcWindows.windows[\'' + name + '\'].maximize();" onmousedown="return false;" class="mceWindowMaximize"></a>';
+//	html += '      <a href="javascript:mcWindows.windows[\'' + name + '\'].minimize();" onmousedown="return false;" class="mceWindowMinimize"></a>';
+	html += '    </div>';
+	html += '</div><div id="' + id + '_body" class="mceWindowBody" style="width: ' + width + 'px; height: ' + height + 'px;">';
+	html += '<iframe id="' + id + '_iframe" name="' + id + '_iframe" onfocus="parent.mcWindows.windows[\'' + name + '\'].focus();" frameborder="0" width="' + iframeWidth + '" height="' + iframeHeight + '" src="' + url + '" class="mceWindowBodyIframe"></iframe></div>';
+	html += '<div id="' + id + '_statusbar" class="mceWindowStatusbar" onmousedown="parent.mcWindows.windows[\'' + name + '\'].focus();">';
+	html += '<div id="' + id + '_resize" class="mceWindowResize"><img onmousedown="parent.mcWindows.windows[\'' + name + '\'].focus();" border="0" src="../jscripts/tiny_mce/themes/advanced/images/window_resize.gif" /></div>';
+	html += '</div>';
+	html += '</div>';
+
+	html += '</body>';
+	html += '</html>';
+
+	// Create iframe
+	this.createFloatingIFrame(id, features['left'], features['top'], features['width'], features['height'], html);
+};
+
+// Gets called when wrapper iframe is initialized
+MCWindows.prototype.onLoad = function(name) {
+	var win = mcWindows.windows[name];
+	var id = "mcWindow_" + name;
+	var wrapperIframe = window.frames[id + "_iframe"].frames[0];
+	var wrapperDoc = window.frames[id + "_iframe"].document;
+	var doc = window.frames[id + "_iframe"].document;
+	var winDiv = document.getElementById("mcWindow_" + name + "_div");
+	var realIframe = window.frames[id + "_iframe"].frames[0];
+
+	// Set window data
+	win.id = "mcWindow_" + name + "_iframe";
+	win.winElement = winDiv;
+	win.bodyElement = doc.getElementById(id + '_body');
+	win.iframeElement = doc.getElementById(id + '_iframe');
+	win.headElement = doc.getElementById(id + '_head');
+	win.titleElement = doc.getElementById(id + '_title');
+	win.resizeElement = doc.getElementById(id + '_resize');
+	win.containerElement = doc.getElementById(id + '_container');
+	win.left = win.features['left'];
+	win.top = win.features['top'];
+	win.frame = window.frames[id + '_iframe'].frames[0];
+	win.wrapperFrame = window.frames[id + '_iframe'];
+	win.wrapperIFrameElement = document.getElementById(id + "_iframe");
+
+	// Add event handlers
+	mcWindows.addEvent(win.headElement, "mousedown", mcWindows.eventDispatcher);
+	mcWindows.addEvent(win.resizeElement, "mousedown", mcWindows.eventDispatcher);
+
+	if (mcWindows.isMSIE) {
+		mcWindows.addEvent(realIframe.document, "mousemove", mcWindows.eventDispatcher);
+		mcWindows.addEvent(realIframe.document, "mouseup", mcWindows.eventDispatcher);
+	} else {
+		mcWindows.addEvent(realIframe, "mousemove", mcWindows.eventDispatcher);
+		mcWindows.addEvent(realIframe, "mouseup", mcWindows.eventDispatcher);
+		mcWindows.addEvent(realIframe, "focus", mcWindows.eventDispatcher);
+	}
+
+	for (var i=0; i<window.frames.length; i++) {
+		if (!window.frames[i]._hasMouseHandlers) {
+			if (mcWindows.isMSIE) {
+				mcWindows.addEvent(window.frames[i].document, "mousemove", mcWindows.eventDispatcher);
+				mcWindows.addEvent(window.frames[i].document, "mouseup", mcWindows.eventDispatcher);
+			} else {
+				mcWindows.addEvent(window.frames[i], "mousemove", mcWindows.eventDispatcher);
+				mcWindows.addEvent(window.frames[i], "mouseup", mcWindows.eventDispatcher);
+			}
+
+			window.frames[i]._hasMouseHandlers = true;
+		}
+	}
+
+	if (mcWindows.isMSIE) {
+		mcWindows.addEvent(win.frame.document, "mousemove", mcWindows.eventDispatcher);
+		mcWindows.addEvent(win.frame.document, "mouseup", mcWindows.eventDispatcher);
+	} else {
+		mcWindows.addEvent(win.frame, "mousemove", mcWindows.eventDispatcher);
+		mcWindows.addEvent(win.frame, "mouseup", mcWindows.eventDispatcher);
+		mcWindows.addEvent(win.frame, "focus", mcWindows.eventDispatcher);
+	}
+
+	this.selectedWindow = win;
+};
+
+MCWindows.prototype.createFloatingIFrame = function(id_prefix, left, top, width, height, html) {
+	var iframe = document.createElement("iframe");
+	var div = document.createElement("div");
+
+	width = parseInt(width);
+	height = parseInt(height)+1;
+
+	// Create wrapper div
+	div.setAttribute("id", id_prefix + "_div");
+	div.setAttribute("width", width);
+	div.setAttribute("height", (height));
+	div.style.position = "absolute";
+	div.style.left = left + "px";
+	div.style.top = top + "px";
+	div.style.width = width + "px";
+	div.style.height = (height) + "px";
+	div.style.backgroundColor = "white";
+	div.style.display = "none";
+
+	if (this.isGecko) {
+		iframeWidth = width + 2;
+		iframeHeight = height + 2;
+	} else {
+		iframeWidth = width;
+		iframeHeight = height + 1;
+	}
+
+	// Create iframe
+	iframe.setAttribute("id", id_prefix + "_iframe");
+	iframe.setAttribute("name", id_prefix + "_iframe");
+	iframe.setAttribute("border", "0");
+	iframe.setAttribute("frameBorder", "0");
+	iframe.setAttribute("marginWidth", "0");
+	iframe.setAttribute("marginHeight", "0");
+	iframe.setAttribute("leftMargin", "0");
+	iframe.setAttribute("topMargin", "0");
+	iframe.setAttribute("width", iframeWidth);
+	iframe.setAttribute("height", iframeHeight);
+//	iframe.setAttribute("src", "../jscripts/tiny_mce/blank.htm");
+	// iframe.setAttribute("allowtransparency", "false");
+	iframe.setAttribute("scrolling", "no");
+	iframe.style.width = iframeWidth + "px";
+	iframe.style.height = iframeHeight + "px";
+	iframe.style.backgroundColor = "white";
+	div.appendChild(iframe);
+
+	document.body.appendChild(div);
+
+	// Fixed MSIE 5.0 issue
+	div.innerHTML = div.innerHTML;
+
+	if (this.isSafari) {
+		// Give Safari some time to setup
+		window.setTimeout(function() {
+			doc = window.frames[id_prefix + '_iframe'].document;
+			doc.open();
+			doc.write(html);
+			doc.close();
+		}, 10);
+	} else {
+		doc = window.frames[id_prefix + '_iframe'].window.document
+		doc.open();
+		doc.write(html);
+		doc.close();
+	}
+
+	div.style.display = "block";
+
+	return div;
+};
+
+// Window instance
+function MCWindow() {
+};
+
+MCWindow.prototype.focus = function() {
+	this.winElement.style.zIndex = mcWindows.zindex++;
+	mcWindows.selectedWindow = this;
+};
+
+MCWindow.prototype.minimize = function() {
+};
+
+MCWindow.prototype.maximize = function() {
+	
+};
+
+MCWindow.prototype.startResize = function() {
+	mcWindows.action = "resize";
+};
+
+MCWindow.prototype.startMove = function(e) {
+	mcWindows.action = "move";
+};
+
+MCWindow.prototype.close = function() {
+	document.body.removeChild(this.winElement);
+	mcWindows.windows[this.name] = null;
+};
+
+MCWindow.prototype.onMouseMove = function(e) {
+	var scrollX = 0;//this.doc.body.scrollLeft;
+	var scrollY = 0;//this.doc.body.scrollTop;
+
+	// Calculate real X, Y
+	var dx = e.screenX - mcWindows.mouseDownScreenX;
+	var dy = e.screenY - mcWindows.mouseDownScreenY;
+
+	switch (mcWindows.action) {
+		case "resize":
+			width = mcWindows.mouseDownWidth + (e.screenX - mcWindows.mouseDownScreenX);
+			height = mcWindows.mouseDownHeight + (e.screenY - mcWindows.mouseDownScreenY);
+
+			width = width < 100 ? 100 : width;
+			height = height < 100 ? 100 : height;
+
+			this.wrapperIFrameElement.style.width = width+2;
+			this.wrapperIFrameElement.style.height = height+2;
+			this.wrapperIFrameElement.width = width+2;
+			this.wrapperIFrameElement.height = height+2;
+			this.winElement.style.width = width;
+			this.winElement.style.height = height;
+
+			height = height-12-19;
+
+			this.containerElement.style.width = width;
+
+			this.iframeElement.style.width = width;
+			this.iframeElement.style.height = height;
+			this.bodyElement.style.width = width;
+			this.bodyElement.style.height = height;
+			this.headElement.style.width = width;
+			//this.statusElement.style.width = width;
+
+			mcWindows.cancelEvent(e);
+			break;
+
+		case "move":
+			this.left = mcWindows.mouseDownLayerX + (e.screenX - mcWindows.mouseDownScreenX);
+			this.top = mcWindows.mouseDownLayerY + (e.screenY - mcWindows.mouseDownScreenY);
+			this.winElement.style.left = this.left + "px";
+			this.winElement.style.top = this.top + "px";
+
+			mcWindows.cancelEvent(e);
+			break;
+	}
+};
+
+MCWindow.prototype.onMouseUp = function(e) {
+	mcWindows.action = "none";
+};
+
+MCWindow.prototype.onFocus = function(e) {
+	// Gecko only handler
+	var winRef = e.currentTarget;
+
+	for (var n in mcWindows.windows) {
+		var win = mcWindows.windows[n];
+		if (typeof(win) == 'function')
+			continue;
+
+		if (winRef.name == win.id) {
+			win.focus();
+			return;
+		}
+	}
+};
+
+MCWindow.prototype.onMouseDown = function(e) {
+	var elm = mcWindows.isMSIE ? this.wrapperFrame.event.srcElement : e.target;
+
+	var scrollX = 0;//this.doc.body.scrollLeft;
+	var scrollY = 0;//this.doc.body.scrollTop;
+
+	mcWindows.mouseDownScreenX = e.screenX;
+	mcWindows.mouseDownScreenY = e.screenY;
+	mcWindows.mouseDownLayerX = this.left;
+	mcWindows.mouseDownLayerY = this.top;
+	mcWindows.mouseDownWidth = parseInt(this.winElement.style.width);
+	mcWindows.mouseDownHeight = parseInt(this.winElement.style.height);
+
+	if (elm == this.resizeElement.firstChild)
+		this.startResize(e);
+	else
+		this.startMove(e);
+
+	mcWindows.cancelEvent(e);
+};
+
+// Global instance
+var mcWindows = new MCWindows();

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/inlinepopups/readme.txt
===================================================================

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/insertdatetime/editor_plugin.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/insertdatetime/editor_plugin.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/insertdatetime/editor_plugin.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1 @@
+tinyMCE.importPluginLanguagePack('insertdatetime','en,tr,cs,el,fr_ca,it,ko,sv,zh_cn,fa,fr,de,pl,pt_br,nl,da,he,nb,ru,ru_KOI8-R,ru_UTF-8,nn,fi,es,cy,is,pl');var TinyMCE_InsertDateTimePlugin={getInfo:function(){return{longname:'Insert date/time',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_insertdatetime.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};},getControlHTML:function(cn){switch(cn){case"insertdate":return tinyMCE.getButtonHTML(cn,'lang_insertdate_desc','{$pluginurl}/images/insertdate.gif','mceInsertDate');case"inserttime":return tinyMCE.getButtonHTML(cn,'lang_inserttime_desc','{$pluginurl}/images/inserttime.gif','mceInsertTime');}return"";},execCommand:function(editor_id,element,command,user_interface,value){function addZeros(value,len){value=""+value;if(value.length<len){for(var i=0;i<(len-value.length);i++)value="0"+value;}return value;}function getDateTime(date,format){format=tinyMCE.regexpReplace(format,"%D","%m/%d/%y");format=tinyMCE.regexpReplace(format,"%r","%I:%M:%S %p");format=tinyMCE.regexpReplace(format,"%Y",""+date.getFullYear());format=tinyMCE.regexpReplace(format,"%y",""+date.getYear());format=tinyMCE.regexpReplace(format,"%m",addZeros(date.getMonth()+1,2));format=tinyMCE.regexpReplace(format,"%d",addZeros(date.getDate(),2));format=tinyMCE.regexpReplace(format,"%H",""+addZeros(date.getHours(),2));format=tinyMCE.regexpReplace(format,"%M",""+addZeros(date.getMinutes(),2));format=tinyMCE.regexpReplace(format,"%S",""+addZeros(date.getSeconds(),2));format=tinyMCE.regexpReplace(format,"%I",""+((date.getHours()+11)%12+1));format=tinyMCE.regexpReplace(format,"%p",""+(date.getHours()<12?"AM":"PM"));format=tinyMCE.regexpReplace(format,"%B",""+tinyMCE.getLang("lang_inserttime_months_long")[date.getMonth()]);format=tinyMCE.regexpReplace(format,"%b",""+tinyMCE.getLang("lang_inserttime_months_short")[date.getMonth()]);format=tinyMCE.regexpReplace(format,"%A",""+tinyMCE.getLang("lang_inserttime_day_long")[date.getDay()]);format=tinyMCE.regexpReplace(format,"%a",""+tinyMCE.getLang("lang_inserttime_day_short")[date.getDay()]);format=tinyMCE.regexpReplace(format,"%%","%");return format;}switch(command){case"mceInsertDate":tinyMCE.execInstanceCommand(editor_id,'mceInsertContent',false,getDateTime(new Date(),tinyMCE.getParam("plugin_insertdate_dateFormat",tinyMCE.getLang('lang_insertdate_def_fmt'))));return true;case"mceInsertTime":tinyMCE.execInstanceCommand(editor_id,'mceInsertContent',false,getDateTime(new Date(),tinyMCE.getParam("plugin_insertdate_timeFormat",tinyMCE.getLang('lang_inserttime_def_fmt'))));return true;}return false;}};tinyMCE.addPlugin("insertdatetime",TinyMCE_InsertDateTimePlugin);
\ No newline at end of file

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/insertdatetime/editor_plugin_src.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/insertdatetime/editor_plugin_src.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/insertdatetime/editor_plugin_src.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,93 @@
+/**
+ * $RCSfile: editor_plugin_src.js,v $
+ * $Revision: 1.22 $
+ * $Date: 2006/02/10 16:29:39 $
+ *
+ * @author Moxiecode
+ * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
+ */
+
+/* Import plugin specific language pack */
+tinyMCE.importPluginLanguagePack('insertdatetime', 'en,tr,cs,el,fr_ca,it,ko,sv,zh_cn,fa,fr,de,pl,pt_br,nl,da,he,nb,ru,ru_KOI8-R,ru_UTF-8,nn,fi,es,cy,is,pl');
+
+var TinyMCE_InsertDateTimePlugin = {
+	getInfo : function() {
+		return {
+			longname : 'Insert date/time',
+			author : 'Moxiecode Systems',
+			authorurl : 'http://tinymce.moxiecode.com',
+			infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_insertdatetime.html',
+			version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
+		};
+	},
+
+	/**
+	 * Returns the HTML contents of the insertdate, inserttime controls.
+	 */
+	getControlHTML : function(cn) {
+		switch (cn) {
+			case "insertdate":
+				return tinyMCE.getButtonHTML(cn, 'lang_insertdate_desc', '{$pluginurl}/images/insertdate.gif', 'mceInsertDate');
+
+			case "inserttime":
+				return tinyMCE.getButtonHTML(cn, 'lang_inserttime_desc', '{$pluginurl}/images/inserttime.gif', 'mceInsertTime');
+		}
+
+		return "";
+	},
+
+	/**
+	 * Executes the mceInsertDate command.
+	 */
+	execCommand : function(editor_id, element, command, user_interface, value) {
+		/* Adds zeros infront of value */
+		function addZeros(value, len) {
+			value = "" + value;
+
+			if (value.length < len) {
+				for (var i=0; i<(len-value.length); i++)
+					value = "0" + value;
+			}
+
+			return value;
+		}
+
+		/* Returns the date object in the specified format */
+		function getDateTime(date, format) {
+			format = tinyMCE.regexpReplace(format, "%D", "%m/%d/%y");
+			format = tinyMCE.regexpReplace(format, "%r", "%I:%M:%S %p");
+			format = tinyMCE.regexpReplace(format, "%Y", "" + date.getFullYear());
+			format = tinyMCE.regexpReplace(format, "%y", "" + date.getYear());
+			format = tinyMCE.regexpReplace(format, "%m", addZeros(date.getMonth()+1, 2));
+			format = tinyMCE.regexpReplace(format, "%d", addZeros(date.getDate(), 2));
+			format = tinyMCE.regexpReplace(format, "%H", "" + addZeros(date.getHours(), 2));
+			format = tinyMCE.regexpReplace(format, "%M", "" + addZeros(date.getMinutes(), 2));
+			format = tinyMCE.regexpReplace(format, "%S", "" + addZeros(date.getSeconds(), 2));
+			format = tinyMCE.regexpReplace(format, "%I", "" + ((date.getHours() + 11) % 12 + 1));
+			format = tinyMCE.regexpReplace(format, "%p", "" + (date.getHours() < 12 ? "AM" : "PM"));
+			format = tinyMCE.regexpReplace(format, "%B", "" + tinyMCE.getLang("lang_inserttime_months_long")[date.getMonth()]);
+			format = tinyMCE.regexpReplace(format, "%b", "" + tinyMCE.getLang("lang_inserttime_months_short")[date.getMonth()]);
+			format = tinyMCE.regexpReplace(format, "%A", "" + tinyMCE.getLang("lang_inserttime_day_long")[date.getDay()]);
+			format = tinyMCE.regexpReplace(format, "%a", "" + tinyMCE.getLang("lang_inserttime_day_short")[date.getDay()]);
+			format = tinyMCE.regexpReplace(format, "%%", "%");
+
+			return format;
+		}
+
+		// Handle commands
+		switch (command) {
+			case "mceInsertDate":
+				tinyMCE.execInstanceCommand(editor_id, 'mceInsertContent', false, getDateTime(new Date(), tinyMCE.getParam("plugin_insertdate_dateFormat", tinyMCE.getLang('lang_insertdate_def_fmt'))));
+				return true;
+
+			case "mceInsertTime":
+				tinyMCE.execInstanceCommand(editor_id, 'mceInsertContent', false, getDateTime(new Date(), tinyMCE.getParam("plugin_insertdate_timeFormat", tinyMCE.getLang('lang_inserttime_def_fmt'))));
+				return true;
+		}
+
+		// Pass to next handler in chain
+		return false;
+	}
+};
+
+tinyMCE.addPlugin("insertdatetime", TinyMCE_InsertDateTimePlugin);

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/insertdatetime/images/insertdate.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/insertdatetime/images/insertdate.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/insertdatetime/images/inserttime.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/insertdatetime/images/inserttime.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/insertdatetime/langs/en.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/insertdatetime/langs/en.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/insertdatetime/langs/en.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,12 @@
+// UK lang variables
+
+tinyMCE.addToLang('',{
+insertdate_def_fmt : '%Y-%m-%d',
+inserttime_def_fmt : '%H:%M:%S',
+insertdate_desc : 'Insert date',
+inserttime_desc : 'Insert time',
+inserttime_months_long : new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"),
+inserttime_months_short : new Array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"),
+inserttime_day_long : new Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"),
+inserttime_day_short : new Array("Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun")
+});

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/insertdatetime/readme.txt
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/insertdatetime/readme.txt	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/insertdatetime/readme.txt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1 @@
+Check the TinyMCE documentation for details on this plugin.

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/layer/editor_plugin.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/layer/editor_plugin.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/layer/editor_plugin.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1 @@
+tinyMCE.importPluginLanguagePack('layer','en');var TinyMCE_LayerPlugin={getInfo:function(){return{longname:'Layer',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_layer.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};},initInstance:function(inst){if(tinyMCE.isMSIE&&!tinyMCE.isOpera)inst.getDoc().execCommand('2D-Position');},handleEvent:function(e){var inst=tinyMCE.selectedInstance,self=TinyMCE_LayerPlugin;var w=inst.getWin(),le=inst._lastStyleElm,e;if(tinyMCE.isGecko){e=self._getParentLayer(inst.getFocusElement());if(e){if(!inst._lastStyleElm){e.style.overflow='auto';inst._lastStyleElm=e;}}else if(le){le=inst._lastStyleElm;le.style.width=le.scrollWidth+'px';le.style.height=le.scrollHeight+'px';le.style.overflow='';inst._lastStyleElm=null;}}return true;},handleVisualAid:function(el,deep,state,inst){var nl=inst.getDoc().getElementsByTagName("div"),i;for(i=0;i<nl.length;i++){if(new RegExp('absolute|relative|static','gi').test(nl[i].style.position)){if(state)tinyMCE.addCSSClass(nl[i],'mceVisualAid');else tinyMCE.removeCSSClass(nl[i],'mceVisualAid');}}},getControlHTML:function(cn){switch(cn){case"moveforward":return tinyMCE.getButtonHTML(cn,'lang_layer_forward_desc','{$pluginurl}/images/forward.gif','mceMoveForward',true);case"movebackward":return tinyMCE.getButtonHTML(cn,'lang_layer_backward_desc','{$pluginurl}/images/backward.gif','mceMoveBackward',true);case"absolute":return tinyMCE.getButtonHTML(cn,'lang_layer_absolute_desc','{$pluginurl}/images/absolute.gif','mceMakeAbsolute',true);case"insertlayer":return tinyMCE.getButtonHTML(cn,'lang_layer_insertlayer_desc','{$pluginurl}/images/insert_layer.gif','mceInsertLayer',true);}return"";},execCommand:function(editor_id,element,command,user_interface,value){var self=TinyMCE_LayerPlugin;switch(command){case"mceInsertLayer":self._insertLayer();return true;case"mceMoveForward":self._move(1);return true;case"mceMoveBackward":self._move(-1);return true;case"mceMakeAbsolute":self._toggleAbsolute();return true;}return false;},handleNodeChange:function(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){var inst=tinyMCE.getInstanceById(editor_id),self=TinyMCE_LayerPlugin;var le=self._getParentLayer(inst.getFocusElement());var p=tinyMCE.getParentElement(inst.getFocusElement(),'div,p,img');tinyMCE.switchClass(editor_id+'_absolute','mceButtonDisabled');tinyMCE.switchClass(editor_id+'_moveforward','mceButtonDisabled');tinyMCE.switchClass(editor_id+'_movebackward','mceButtonDisabled');if(p)tinyMCE.switchClass(editor_id+'_absolute','mceButtonNormal');if(le&&le.style.position.toLowerCase()=="absolute"){tinyMCE.switchClass(editor_id+'_absolute','mceButtonSelected');tinyMCE.switchClass(editor_id+'_moveforward','mceButtonNormal');tinyMCE.switchClass(editor_id+'_movebackward','mceButtonNormal');}},_move:function(d){var inst=tinyMCE.selectedInstance,self=TinyMCE_LayerPlugin,i,z=new Array();var le=self._getParentLayer(inst.getFocusElement()),ci=-1,fi=-1;var nl=tinyMCE.selectNodes(inst.getBody(),function(n){return n.nodeType==1&&new RegExp('absolute|relative|static','gi').test(n.style.position);});for(i=0;i<nl.length;i++){z[i]=nl[i].style.zIndex?parseInt(nl[i].style.zIndex):0;if(ci<0&&nl[i]==le)ci=i;}if(d<0){for(i=0;i<z.length;i++){if(z[i]<z[ci]){fi=i;break;}}if(fi>-1){nl[ci].style.zIndex=z[fi];nl[fi].style.zIndex=z[ci];}else{if(z[ci]>0)nl[ci].style.zIndex=z[ci]-1;}}else{for(i=0;i<z.length;i++){if(z[i]>z[ci]){fi=i;break;}}if(fi>-1){nl[ci].style.zIndex=z[fi];nl[fi].style.zIndex=z[ci];}else nl[ci].style.zIndex=z[ci]+1;}inst.repaint();},_getParentLayer:function(n){return tinyMCE.getParentNode(n,function(n){return n.nodeType==1&&new RegExp('absolute|relative|static','gi').test(n.style.position);});},_insertLayer:function(){var inst=tinyMCE.selectedInstance;var e=tinyMCE.getParentElement(inst.getFocusElement());var p=tinyMCE.getAbsPosition(e);var d=inst.getDoc();var ne=d.createElement('div');var h=inst.selection.getSelectedHTML();ne.style.position='absolute';ne.style.left=p.absLeft+'px';ne.style.top=(p.absTop>20?p.absTop:20)+'px';ne.style.width='100px';ne.style.height='100px';ne.className='mceVisualAid';if(!h)h=tinyMCE.getLang('lang_layer_content');ne.innerHTML=h;d.body.appendChild(ne);},_toggleAbsolute:function(){var inst=tinyMCE.selectedInstance,self=TinyMCE_LayerPlugin;var le=self._getParentLayer(inst.getFocusElement());if(le==null)le=tinyMCE.getParentElement(inst.getFocusElement(),'div,p,img');if(le){if(le.style.position.toLowerCase()=="absolute"){le.style.position="";le.style.left="";le.style.top="";}else{le.style.position="absolute";if(le.style.left=="")le.style.left=20+'px';if(le.style.top=="")le.style.top=20+'px';if(le.style.width=="")le.style.width=le.width?(le.width+'px'):'100px';if(le.style.height=="")le.style.height=le.height?(le.height+'px'):'100px';tinyMCE.handleVisualAid(inst.getBody(),true,inst.visualAid,inst);}inst.repaint();tinyMCE.triggerNodeChange();}}};tinyMCE.addPlugin("layer",TinyMCE_LayerPlugin);
\ No newline at end of file

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/layer/editor_plugin_src.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/layer/editor_plugin_src.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/layer/editor_plugin_src.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,252 @@
+/**
+ * $RCSfile: editor_plugin_src.js,v $
+ * $Revision: 1.2 $
+ * $Date: 2006/05/03 14:12:12 $
+ *
+ * @author Moxiecode
+ * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
+ */
+
+/* Import plugin specific language pack */
+tinyMCE.importPluginLanguagePack('layer', 'en');
+
+var TinyMCE_LayerPlugin = {
+	getInfo : function() {
+		return {
+			longname : 'Layer',
+			author : 'Moxiecode Systems',
+			authorurl : 'http://tinymce.moxiecode.com',
+			infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_layer.html',
+			version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
+		};
+	},
+
+	initInstance : function(inst) {
+		if (tinyMCE.isMSIE && !tinyMCE.isOpera)
+			inst.getDoc().execCommand('2D-Position');
+	},
+
+	handleEvent : function(e) {
+		var inst = tinyMCE.selectedInstance, self = TinyMCE_LayerPlugin;
+		var w = inst.getWin(), le = inst._lastStyleElm, e;
+
+		if (tinyMCE.isGecko) {
+			e = self._getParentLayer(inst.getFocusElement());
+
+			if (e) {
+				if (!inst._lastStyleElm) {
+					e.style.overflow = 'auto';
+					inst._lastStyleElm = e;
+				}
+			} else if (le) {
+				le = inst._lastStyleElm;
+				le.style.width = le.scrollWidth + 'px';
+				le.style.height = le.scrollHeight + 'px';
+				le.style.overflow = '';
+				inst._lastStyleElm = null;
+			}
+		}
+
+		return true;
+	},
+
+	handleVisualAid : function(el, deep, state, inst) {
+		var nl = inst.getDoc().getElementsByTagName("div"), i;
+
+		for (i=0; i<nl.length; i++) {
+			if (new RegExp('absolute|relative|static', 'gi').test(nl[i].style.position)) {
+				if (state)
+					tinyMCE.addCSSClass(nl[i], 'mceVisualAid');
+				else
+					tinyMCE.removeCSSClass(nl[i], 'mceVisualAid');					
+			}
+		}
+	},
+
+	getControlHTML : function(cn) {
+		switch (cn) {
+			case "moveforward":
+				return tinyMCE.getButtonHTML(cn, 'lang_layer_forward_desc', '{$pluginurl}/images/forward.gif', 'mceMoveForward', true);
+
+			case "movebackward":
+				return tinyMCE.getButtonHTML(cn, 'lang_layer_backward_desc', '{$pluginurl}/images/backward.gif', 'mceMoveBackward', true);
+
+			case "absolute":
+				return tinyMCE.getButtonHTML(cn, 'lang_layer_absolute_desc', '{$pluginurl}/images/absolute.gif', 'mceMakeAbsolute', true);
+
+			case "insertlayer":
+				return tinyMCE.getButtonHTML(cn, 'lang_layer_insertlayer_desc', '{$pluginurl}/images/insert_layer.gif', 'mceInsertLayer', true);
+		}
+
+		return "";
+	},
+
+	execCommand : function(editor_id, element, command, user_interface, value) {
+		var self = TinyMCE_LayerPlugin;
+
+		// Handle commands
+		switch (command) {
+			case "mceInsertLayer":
+				self._insertLayer();
+				return true;
+
+			case "mceMoveForward":
+				self._move(1);
+				return true;
+
+			case "mceMoveBackward":
+				self._move(-1);
+				return true;
+
+			case "mceMakeAbsolute":
+				self._toggleAbsolute();
+				return true;
+		}
+
+		// Pass to next handler in chain
+		return false;
+	},
+
+	handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {
+		var inst = tinyMCE.getInstanceById(editor_id), self = TinyMCE_LayerPlugin;
+		var le = self._getParentLayer(inst.getFocusElement());
+		var p = tinyMCE.getParentElement(inst.getFocusElement(), 'div,p,img');
+
+		tinyMCE.switchClass(editor_id + '_absolute', 'mceButtonDisabled');
+		tinyMCE.switchClass(editor_id + '_moveforward', 'mceButtonDisabled');
+		tinyMCE.switchClass(editor_id + '_movebackward', 'mceButtonDisabled');
+
+		if (p)
+			tinyMCE.switchClass(editor_id + '_absolute', 'mceButtonNormal');
+
+		if (le && le.style.position.toLowerCase() == "absolute") {
+			tinyMCE.switchClass(editor_id + '_absolute', 'mceButtonSelected');
+			tinyMCE.switchClass(editor_id + '_moveforward', 'mceButtonNormal');
+			tinyMCE.switchClass(editor_id + '_movebackward', 'mceButtonNormal');
+		}
+	},
+
+	// Private plugin specific methods
+
+	_move : function(d) {
+		var inst = tinyMCE.selectedInstance, self = TinyMCE_LayerPlugin, i, z = new Array();
+		var le = self._getParentLayer(inst.getFocusElement()), ci = -1, fi = -1;
+		var nl = tinyMCE.selectNodes(inst.getBody(), function(n) {
+			return n.nodeType == 1 && new RegExp('absolute|relative|static', 'gi').test(n.style.position);
+		});
+
+		// Find z-indexes
+		for (i=0; i<nl.length; i++) {
+			z[i] = nl[i].style.zIndex ? parseInt(nl[i].style.zIndex) : 0;
+
+			if (ci < 0 && nl[i] == le)
+				ci = i;
+		}
+
+		if (d < 0) {
+			// Move back
+
+			// Try find a lower one
+			for (i=0; i<z.length; i++) {
+				if (z[i] < z[ci]) {
+					fi = i;
+					break;
+				}
+			}
+
+			if (fi > -1) {
+				nl[ci].style.zIndex = z[fi];
+				nl[fi].style.zIndex = z[ci];
+			} else {
+				if (z[ci] > 0)
+					nl[ci].style.zIndex = z[ci] - 1;
+			}
+		} else {
+			// Move forward
+
+			// Try find a higher one
+			for (i=0; i<z.length; i++) {
+				if (z[i] > z[ci]) {
+					fi = i;
+					break;
+				}
+			}
+
+			if (fi > -1) {
+				nl[ci].style.zIndex = z[fi];
+				nl[fi].style.zIndex = z[ci];
+			} else
+				nl[ci].style.zIndex = z[ci] + 1;
+		}
+
+		inst.repaint();
+	},
+
+	_getParentLayer : function(n) {
+		return tinyMCE.getParentNode(n, function(n) {
+			return n.nodeType == 1 && new RegExp('absolute|relative|static', 'gi').test(n.style.position);
+		});
+	},
+
+	_insertLayer : function() {
+		var inst = tinyMCE.selectedInstance;
+		var e = tinyMCE.getParentElement(inst.getFocusElement());
+		var p = tinyMCE.getAbsPosition(e);
+		var d = inst.getDoc();
+		var ne = d.createElement('div');
+		var h = inst.selection.getSelectedHTML();
+
+		// Move div
+		ne.style.position = 'absolute';
+		ne.style.left = p.absLeft + 'px';
+		ne.style.top = (p.absTop > 20 ? p.absTop : 20) + 'px';
+		ne.style.width = '100px';
+		ne.style.height = '100px';
+		ne.className = 'mceVisualAid';
+
+		if (!h)
+			h = tinyMCE.getLang('lang_layer_content');
+
+		ne.innerHTML = h;
+
+		// Add it
+		d.body.appendChild(ne);
+	},
+
+	_toggleAbsolute : function() {
+		var inst = tinyMCE.selectedInstance, self = TinyMCE_LayerPlugin;
+		var le = self._getParentLayer(inst.getFocusElement());
+
+		if (le == null)
+			le = tinyMCE.getParentElement(inst.getFocusElement(), 'div,p,img');
+
+		if (le) {
+			if (le.style.position.toLowerCase() == "absolute") {
+				le.style.position = "";
+				le.style.left = "";
+				le.style.top = "";
+			} else {
+				le.style.position = "absolute";
+
+				if (le.style.left == "")
+					le.style.left = 20 + 'px';
+
+				if (le.style.top == "")
+					le.style.top = 20 + 'px';
+
+				if (le.style.width == "")
+					le.style.width = le.width ? (le.width + 'px') : '100px';
+
+				if (le.style.height == "")
+					le.style.height = le.height ? (le.height + 'px') : '100px';
+
+				tinyMCE.handleVisualAid(inst.getBody(), true, inst.visualAid, inst);
+			}
+
+			inst.repaint();
+			tinyMCE.triggerNodeChange();
+		}
+	}
+};
+
+tinyMCE.addPlugin("layer", TinyMCE_LayerPlugin);

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/layer/images/absolute.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/layer/images/absolute.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/layer/images/backward.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/layer/images/backward.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/layer/images/forward.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/layer/images/forward.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/layer/images/insert_layer.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/layer/images/insert_layer.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/layer/langs/en.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/layer/langs/en.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/layer/langs/en.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,9 @@
+// UK lang variables
+
+tinyMCE.addToLang('layer',{
+insertlayer_desc : 'Insert new layer',
+forward_desc : 'Move forward',
+backward_desc : 'Move backward',
+absolute_desc : 'Toggle absolute positioning',
+content : 'New layer...'
+});

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/layer/readme.txt
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/layer/readme.txt	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/layer/readme.txt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1 @@
+Check the TinyMCE documentation for details on this plugin.

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/noneditable/css/noneditable.css
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/noneditable/css/noneditable.css	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/noneditable/css/noneditable.css	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,17 @@
+/* This is the CSS file for the noneditable elements plugin */
+
+.mceEditable {
+	/*border: 1px dotted #0000cc;*/
+	-moz-user-focus: none;
+	-moz-user-input: auto;
+	-moz-user-modify: auto;
+	-moz-user-select: text;
+}
+
+.mceNonEditable {
+	/*border: 1px dotted #cc0000;*/
+	-moz-user-focus: ignore;
+	/*-moz-user-input: disabled;*/
+	-moz-user-modify: read-only;
+	-moz-user-select: all;
+}

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/noneditable/editor_plugin.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/noneditable/editor_plugin.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/noneditable/editor_plugin.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1 @@
+var TinyMCE_NonEditablePlugin={getInfo:function(){return{longname:'Non editable elements',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_noneditable.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};},initInstance:function(inst){tinyMCE.importCSS(inst.getDoc(),tinyMCE.baseURL+"/plugins/noneditable/css/noneditable.css");if(tinyMCE.isMSIE5_0)tinyMCE.settings['plugins']=tinyMCE.settings['plugins'].replace(/noneditable/gi,'Noneditable');if(tinyMCE.isGecko){tinyMCE.addEvent(inst.getDoc(),"keyup",TinyMCE_NonEditablePlugin._fixKeyUp);}},cleanup:function(type,content,inst){switch(type){case"insert_to_editor_dom":var nodes=tinyMCE.getNodeTree(content,new Array(),1);var editClass=tinyMCE.getParam("noneditable_editable_class","mceEditable");var nonEditClass=tinyMCE.getParam("noneditable_noneditable_class","mceNonEditable");for(var i=0;i<nodes.length;i++){var elm=nodes[i];var editable=tinyMCE.getAttrib(elm,"contenteditable");if(new RegExp("true|false","gi").test(editable))TinyMCE_NonEditablePlugin._setEditable(elm,editable=="true");if(tinyMCE.isMSIE){var className=elm.className?elm.className:"";if(className.indexOf(editClass)!=-1)elm.contentEditable=true;if(className.indexOf(nonEditClass)!=-1)elm.contentEditable=false;}}break;case"insert_to_editor":if(tinyMCE.isMSIE){var editClass=tinyMCE.getParam("noneditable_editable_class","mceEditable");var nonEditClass=tinyMCE.getParam("noneditable_noneditable_class","mceNonEditable");content=content.replace(new RegExp("class=\"(.*)("+editClass+")([^\"]*)\"","gi"),'class="$1$2$3" contenteditable="true"');content=content.replace(new RegExp("class=\"(.*)("+nonEditClass+")([^\"]*)\"","gi"),'class="$1$2$3" contenteditable="false"');}break;case"get_from_editor_dom":if(tinyMCE.getParam("noneditable_leave_contenteditable",false)){var nodes=tinyMCE.getNodeTree(content,new Array(),1);for(var i=0;i<nodes.length;i++)nodes[i].removeAttribute("contenteditable");}break;}return content;},_fixKeyUp:function(e){var inst=tinyMCE.selectedInstance;var sel=inst.getSel();var rng=inst.getRng();var an=sel.anchorNode;if((e.keyCode==38||e.keyCode==37||e.keyCode==40||e.keyCode==39)&&(elm=TinyMCE_NonEditablePlugin._isNonEditable(an))!=null){rng=inst.getDoc().createRange();rng.selectNode(elm);rng.collapse(true);sel.removeAllRanges();sel.addRange(rng);tinyMCE.cancelEvent(e);}},_isNonEditable:function(elm){var editClass=tinyMCE.getParam("noneditable_editable_class","mceEditable");var nonEditClass=tinyMCE.getParam("noneditable_noneditable_class","mceNonEditable");if(!elm)return;do{var className=elm.className?elm.className:"";if(className.indexOf(editClass)!=-1)return null;if(className.indexOf(nonEditClass)!=-1)return elm;}while(elm=elm.parentNode);return null;},_setEditable:function(elm,state){var editClass=tinyMCE.getParam("noneditable_editable_class","mceEditable");var nonEditClass=tinyMCE.getParam("noneditable_noneditable_class","mceNonEditable");var className=elm.className?elm.className:"";if(className.indexOf(editClass)!=-1||className.indexOf(nonEditClass)!=-1)return;if((className=tinyMCE.getAttrib(elm,"class"))!="")className+=" ";className+=state?editClass:nonEditClass;elm.setAttribute("class",className);elm.className=className;}};tinyMCE.addPlugin("noneditable",TinyMCE_NonEditablePlugin);
\ No newline at end of file

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/noneditable/editor_plugin_src.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/noneditable/editor_plugin_src.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/noneditable/editor_plugin_src.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,164 @@
+/**
+ * $RCSfile: editor_plugin_src.js,v $
+ * $Revision: 1.7 $
+ * $Date: 2006/02/06 20:02:38 $
+ *
+ * @author Moxiecode
+ * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
+ */
+
+var TinyMCE_NonEditablePlugin = {
+	getInfo : function() {
+		return {
+			longname : 'Non editable elements',
+			author : 'Moxiecode Systems',
+			authorurl : 'http://tinymce.moxiecode.com',
+			infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_noneditable.html',
+			version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
+		};
+	},
+
+	initInstance : function(inst) {
+		tinyMCE.importCSS(inst.getDoc(), tinyMCE.baseURL + "/plugins/noneditable/css/noneditable.css");
+
+		// Ugly hack
+		if (tinyMCE.isMSIE5_0)
+			tinyMCE.settings['plugins'] = tinyMCE.settings['plugins'].replace(/noneditable/gi, 'Noneditable');
+
+		if (tinyMCE.isGecko) {
+			tinyMCE.addEvent(inst.getDoc(), "keyup", TinyMCE_NonEditablePlugin._fixKeyUp);
+	//		tinyMCE.addEvent(inst.getDoc(), "keypress", TinyMCE_NonEditablePlugin._selectAll);
+	//		tinyMCE.addEvent(inst.getDoc(), "mouseup", TinyMCE_NonEditablePlugin._selectAll);
+		}
+	},
+
+	cleanup : function(type, content, inst) {
+		switch (type) {
+			case "insert_to_editor_dom":
+				var nodes = tinyMCE.getNodeTree(content, new Array(), 1);
+				var editClass = tinyMCE.getParam("noneditable_editable_class", "mceEditable");
+				var nonEditClass = tinyMCE.getParam("noneditable_noneditable_class", "mceNonEditable");
+
+				for (var i=0; i<nodes.length; i++) {
+					var elm = nodes[i];
+
+					// Convert contenteditable to classes
+					var editable = tinyMCE.getAttrib(elm, "contenteditable");
+					if (new RegExp("true|false","gi").test(editable))
+						TinyMCE_NonEditablePlugin._setEditable(elm, editable == "true");
+
+					if (tinyMCE.isMSIE) {
+						var className = elm.className ? elm.className : "";
+
+						if (className.indexOf(editClass) != -1)
+							elm.contentEditable = true;
+
+						if (className.indexOf(nonEditClass) != -1)
+							elm.contentEditable = false;
+					}
+				}
+
+				break;
+
+			case "insert_to_editor":
+				if (tinyMCE.isMSIE) {
+					var editClass = tinyMCE.getParam("noneditable_editable_class", "mceEditable");
+					var nonEditClass = tinyMCE.getParam("noneditable_noneditable_class", "mceNonEditable");
+
+					content = content.replace(new RegExp("class=\"(.*)(" + editClass + ")([^\"]*)\"", "gi"), 'class="$1$2$3" contenteditable="true"');
+					content = content.replace(new RegExp("class=\"(.*)(" + nonEditClass + ")([^\"]*)\"", "gi"), 'class="$1$2$3" contenteditable="false"');
+				}
+
+				break;
+
+			case "get_from_editor_dom":
+				if (tinyMCE.getParam("noneditable_leave_contenteditable", false)) {
+					var nodes = tinyMCE.getNodeTree(content, new Array(), 1);
+
+					for (var i=0; i<nodes.length; i++)
+						nodes[i].removeAttribute("contenteditable");
+				}
+
+				break;
+		}
+
+		return content;
+	},
+
+	// Private internal plugin methods
+
+	_fixKeyUp : function(e) {
+		var inst = tinyMCE.selectedInstance;
+		var sel = inst.getSel();
+		var rng = inst.getRng();
+		var an = sel.anchorNode;
+
+		// Move cursor outside non editable fields
+		if ((e.keyCode == 38 || e.keyCode == 37 || e.keyCode == 40 || e.keyCode == 39) && (elm = TinyMCE_NonEditablePlugin._isNonEditable(an)) != null) {
+			rng = inst.getDoc().createRange();
+			rng.selectNode(elm);
+			rng.collapse(true);
+			sel.removeAllRanges();
+			sel.addRange(rng);
+			tinyMCE.cancelEvent(e);
+		}
+	},
+/*
+	_selectAll : function(e) {
+		var inst = tinyMCE.selectedInstance;
+		var sel = inst.getSel();
+		var doc = inst.getDoc();
+
+		if ((elm = TinyMCE_NonEditablePlugin._isNonEditable(sel.focusNode)) != null) {
+			inst.selection.selectNode(elm, false);
+			tinyMCE.cancelEvent(e);
+			return;
+		}
+
+		if ((elm = TinyMCE_NonEditablePlugin._isNonEditable(sel.anchorNode)) != null) {
+			inst.selection.selectNode(elm, false);
+			tinyMCE.cancelEvent(e);
+			return;
+		}
+	},*/
+
+	_isNonEditable : function(elm) {
+		var editClass = tinyMCE.getParam("noneditable_editable_class", "mceEditable");
+		var nonEditClass = tinyMCE.getParam("noneditable_noneditable_class", "mceNonEditable");
+
+		if (!elm)
+			return;
+
+		do {
+			var className = elm.className ? elm.className : "";
+
+			if (className.indexOf(editClass) != -1)
+				return null;
+
+			if (className.indexOf(nonEditClass) != -1)
+				return elm;
+		} while (elm = elm.parentNode);
+
+		return null;
+	},
+
+	_setEditable : function(elm, state) {
+		var editClass = tinyMCE.getParam("noneditable_editable_class", "mceEditable");
+		var nonEditClass = tinyMCE.getParam("noneditable_noneditable_class", "mceNonEditable");
+
+		var className = elm.className ? elm.className : "";
+
+		if (className.indexOf(editClass) != -1 || className.indexOf(nonEditClass) != -1)
+			return;
+
+		if ((className = tinyMCE.getAttrib(elm, "class")) != "")
+			className += " ";
+
+		className += state ? editClass : nonEditClass;
+
+		elm.setAttribute("class", className);
+		elm.className = className;
+	}
+};
+
+tinyMCE.addPlugin("noneditable", TinyMCE_NonEditablePlugin);

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/noneditable/readme.txt
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/noneditable/readme.txt	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/noneditable/readme.txt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1 @@
+Check the TinyMCE documentation for details on this plugin.

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/paste/blank.htm
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/paste/blank.htm	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/paste/blank.htm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,19 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+	<title>blank_page</title>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+	<script language="javascript">
+		function init() {
+			document.body.contentEditable = true;
+			document.designMode = 'on';
+			parent.initIframe(document);
+			window.focus();
+		}
+	</script>
+	<link href="css/blank.css" rel="stylesheet" type="text/css" />
+	<base target="_self" />
+</head>
+<body onload="init();">
+
+</body>
+</html>

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/paste/css/blank.css
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/paste/css/blank.css	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/paste/css/blank.css	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,13 @@
+body {
+	background-color: #FFFFFF;
+	font-family: Verdana, Arial, Helvetica, sans-serif;
+	font-size: 10px;
+	scrollbar-3dlight-color: #F0F0EE;
+	scrollbar-arrow-color: #676662;
+	scrollbar-base-color: #F0F0EE;
+	scrollbar-darkshadow-color: #DDDDDD;
+	scrollbar-face-color: #E0E0DD;
+	scrollbar-highlight-color: #F0F0EE;
+	scrollbar-shadow-color: #F0F0EE;
+	scrollbar-track-color: #F5F5F5;
+}

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/paste/css/pasteword.css
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/paste/css/pasteword.css	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/paste/css/pasteword.css	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,3 @@
+.sourceIframe {
+	border: 1px solid #808080;
+}

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/paste/editor_plugin.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/paste/editor_plugin.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/paste/editor_plugin.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1 @@
+tinyMCE.importPluginLanguagePack('paste','en,tr,sv,cs,zh_cn,fr_ca,da,he,nb,de,hu,ru,ru_KOI8-R,ru_UTF-8,nn,fi,es,cy,is,pl,nl,fr,pt_br');var TinyMCE_PastePlugin={getInfo:function(){return{longname:'Paste text/word',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_paste.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};},initInstance:function(inst){if(tinyMCE.isMSIE&&tinyMCE.getParam("paste_auto_cleanup_on_paste",false))tinyMCE.addEvent(inst.getBody(),"paste",TinyMCE_PastePlugin._handlePasteEvent);},getControlHTML:function(cn){switch(cn){case"pastetext":return tinyMCE.getButtonHTML(cn,'lang_paste_text_desc','{$pluginurl}/images/pastetext.gif','mcePasteText',true);case"pasteword":return tinyMCE.getButtonHTML(cn,'lang_paste_word_desc','{$pluginurl}/images/pasteword.gif','mcePasteWord',true);case"selectall":return tinyMCE.getButtonHTML(cn,'lang_selectall_desc','{$pluginurl}/images/selectall.gif','mceSelectAll',true);}return'';},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case"mcePasteText":if(user_interface){if((tinyMCE.isMSIE&&!tinyMCE.isOpera)&&!tinyMCE.getParam('paste_use_dialog',false))TinyMCE_PastePlugin._insertText(clipboardData.getData("Text"),true);else{var template=new Array();template['file']='../../plugins/paste/pastetext.htm';template['width']=450;template['height']=400;var plain_text="";tinyMCE.openWindow(template,{editor_id:editor_id,plain_text:plain_text,resizable:"yes",scrollbars:"no",inline:"yes",mceDo:'insert'});}}else TinyMCE_PastePlugin._insertText(value['html'],value['linebreaks']);return true;case"mcePasteWord":if(user_interface){if((tinyMCE.isMSIE&&!tinyMCE.isOpera)&&!tinyMCE.getParam('paste_use_dialog',false)){var html=TinyMCE_PastePlugin._clipboardHTML();if(html&&html.length>0)TinyMCE_PastePlugin._insertWordContent(html);}else{var template=new Array();template['file']='../../plugins/paste/pasteword.htm';template['width']=450;template['height']=400;var plain_text="";tinyMCE.openWindow(template,{editor_id:editor_id,plain_text:plain_text,resizable:"yes",scrollbars:"no",inline:"yes",mceDo:'insert'});}}else TinyMCE_PastePlugin._insertWordContent(value);return true;case"mceSelectAll":tinyMCE.execInstanceCommand(editor_id,'selectall');return true;}return false;},_handlePasteEvent:function(e){switch(e.type){case"paste":var html=TinyMCE_PastePlugin._clipboardHTML();var r,inst=tinyMCE.selectedInstance;if(inst&&(r=inst.getRng())&&r.text.length>0)tinyMCE.execCommand('delete');if(html&&html.length>0)tinyMCE.execCommand('mcePasteWord',false,html);tinyMCE.cancelEvent(e);return false;}return true;},_insertText:function(content,bLinebreaks){if(content&&content.length>0){if(bLinebreaks){if(tinyMCE.getParam("paste_create_paragraphs",true)){var rl=tinyMCE.getParam("paste_replace_list",'\u2122,<sup>TM</sup>,\u2026,...,\u201c|\u201d,",\u2019,\',\u2013|\u2014|\u2015|\u2212,-').split(',');for(var i=0;i<rl.length;i+=2)content=content.replace(new RegExp(rl[i],'gi'),rl[i+1]);content=tinyMCE.regexpReplace(content,"\r\n\r\n","</p><p>","gi");content=tinyMCE.regexpReplace(content,"\r\r","</p><p>","gi");content=tinyMCE.regexpReplace(content,"\n\n","</p><p>","gi");if((pos=content.indexOf('</p><p>'))!=-1){tinyMCE.execCommand("Delete");var node=tinyMCE.selectedInstance.getFocusElement();var breakElms=new Array();do{if(node.nodeType==1){if(node.nodeName=="TD"||node.nodeName=="BODY")break;breakElms[breakElms.length]=node;}}while(node=node.parentNode);var before="",after="</p>";before+=content.substring(0,pos);for(var i=0;i<breakElms.length;i++){before+="</"+breakElms[i].nodeName+">";after+="<"+breakElms[(breakElms.length-1)-i].nodeName+">";}before+="<p>";content=before+content.substring(pos+7)+after;}}if(tinyMCE.getParam("paste_create_linebreaks",true)){content=tinyMCE.regexpReplace(content,"\r\n","<br />","gi");content=tinyMCE.regexpReplace(content,"\r","<br />","gi");content=tinyMCE.regexpReplace(content,"\n","<br />","gi");}}tinyMCE.execCommand("mceInsertRawHTML",false,content);}},_insertWordContent:function(content){if(content&&content.length>0){var bull=String.fromCharCode(8226);var middot=String.fromCharCode(183);var cb;if((cb=tinyMCE.getParam("paste_insert_word_content_callback",""))!="")content=eval(cb+"('before', content)");var rl=tinyMCE.getParam("paste_replace_list",'\u2122,<sup>TM</sup>,\u2026,...,\u201c|\u201d,",\u2019,\',\u2013|\u2014|\u2015|\u2212,-').split(',');for(var i=0;i<rl.length;i+=2)content=content.replace(new RegExp(rl[i],'gi'),rl[i+1]);if(tinyMCE.getParam("paste_convert_headers_to_strong",false)){content=content.replace(new RegExp('<p class=MsoHeading.*?>(.*?)<\/p>','gi'),'<p><b>$1</b></p>');}content=content.replace(new RegExp('tab-stops: list [0-9]+.0pt">','gi'),'">'+"--list--");content=content.replace(new RegExp(bull+"(.*?)<BR>","gi"),"<p>"+middot+"$1</p>");content=content.replace(new RegExp('<SPAN style="mso-list: Ignore">','gi'),"<span>"+bull);content=content.replace(/<o:p><\/o:p>/gi,"");content=content.replace(new RegExp('<br style="page-break-before: always;.*>','gi'),'-- page break --');content=content.replace(new RegExp('<(!--)([^>]*)(--)>','g'),"");if(tinyMCE.getParam("paste_remove_spans",true))content=content.replace(/<\/?span[^>]*>/gi,"");if(tinyMCE.getParam("paste_remove_styles",true))content=content.replace(new RegExp('<(\\w[^>]*) style="([^"]*)"([^>]*)','gi'),"<$1$3");content=content.replace(/<\/?font[^>]*>/gi,"");switch(tinyMCE.getParam("paste_strip_class_attributes","all")){case"all":content=content.replace(/<(\w[^>]*) class=([^ |>]*)([^>]*)/gi,"<$1$3");break;case"mso":content=content.replace(new RegExp('<(\\w[^>]*) class="?mso([^ |>]*)([^>]*)','gi'),"<$1$3");break;}content=content.replace(new RegExp('href="?'+TinyMCE_PastePlugin._reEscape(""+document.location)+'','gi'),'href="'+tinyMCE.settings['document_base_url']);content=content.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi,"<$1$3");content=content.replace(/<\\?\?xml[^>]*>/gi,"");content=content.replace(/<\/?\w+:[^>]*>/gi,"");content=content.replace(/-- page break --\s*<p>&nbsp;<\/p>/gi,"");content=content.replace(/-- page break --/gi,"");if(!tinyMCE.settings['force_p_newlines']){content=content.replace('','','gi');content=content.replace('</p>','<br /><br />','gi');}if(!tinyMCE.isMSIE&&!tinyMCE.settings['force_p_newlines']){content=content.replace(/<\/?p[^>]*>/gi,"");}content=content.replace(/<\/?div[^>]*>/gi,"");if(tinyMCE.getParam("paste_convert_middot_lists",true)){var div=document.createElement("div");div.innerHTML=content;var className=tinyMCE.getParam("paste_unindented_list_class","unIndentedList");while(TinyMCE_PastePlugin._convertMiddots(div,"--list--"));while(TinyMCE_PastePlugin._convertMiddots(div,middot,className));while(TinyMCE_PastePlugin._convertMiddots(div,bull));content=div.innerHTML;}if(tinyMCE.getParam("paste_convert_headers_to_strong",false)){content=content.replace(/<h[1-6]>&nbsp;<\/h[1-6]>/gi,'<p>&nbsp;&nbsp;</p>');content=content.replace(/<h[1-6]>/gi,'<p><b>');content=content.replace(/<\/h[1-6]>/gi,'</b></p>');content=content.replace(/<b>&nbsp;<\/b>/gi,'<b>&nbsp;&nbsp;</b>');content=content.replace(/^(&nbsp;)*/gi,'');}content=content.replace(/--list--/gi,"");if((cb=tinyMCE.getParam("paste_insert_word_content_callback",""))!="")content=eval(cb+"('after', content)");tinyMCE.execCommand("mceInsertContent",false,content);window.setTimeout('tinyMCE.execCommand("mceCleanup");',1);}},_reEscape:function(s){var l="?.\\*[](){}+^$:";var o="";for(var i=0;i<s.length;i++){var c=s.charAt(i);if(l.indexOf(c)!=-1)o+='\\'+c;else o+=c;}return o;},_convertMiddots:function(div,search,class_name){var mdot=String.fromCharCode(183);var bull=String.fromCharCode(8226);var nodes=div.getElementsByTagName("p");var prevul;for(var i=0;i<nodes.length;i++){var p=nodes[i];if(p.innerHTML.indexOf(search)==0){var ul=document.createElement("ul");if(class_name)ul.className=class_name;var li=document.createElement("li");li.innerHTML=p.innerHTML.replace(new RegExp(''+mdot+'|'+bull+'|--list--|&nbsp;',"gi"),'');ul.appendChild(li);var np=p.nextSibling;while(np){if(np.nodeType==3&&new RegExp('^\\s$','m').test(np.nodeValue)){np=np.nextSibling;continue;}if(search==mdot){if(np.nodeType==1&&new RegExp('^o(\\s+|&nbsp;)').test(np.innerHTML)){if(!prevul){prevul=ul;ul=document.createElement("ul");prevul.appendChild(ul);}np.innerHTML=np.innerHTML.replace(/^o/,'');}else{if(prevul){ul=prevul;prevul=null;}if(np.nodeType!=1||np.innerHTML.indexOf(search)!=0)break;}}else{if(np.nodeType!=1||np.innerHTML.indexOf(search)!=0)break;}var cp=np.nextSibling;var li=document.createElement("li");li.innerHTML=np.innerHTML.replace(new RegExp(''+mdot+'|'+bull+'|--list--|&nbsp;',"gi"),'');np.parentNode.removeChild(np);ul.appendChild(li);np=cp;}p.parentNode.replaceChild(ul,p);return true;}}return false;},_clipboardHTML:function(){var div=document.getElementById('_TinyMCE_clipboardHTML');if(!div){var div=document.createElement('DIV');div.id='_TinyMCE_clipboardHTML';with(div.style){visibility='hidden';overflow='hidden';position='absolute';width=1;height=1;}document.body.appendChild(div);}div.innerHTML='';var rng=document.body.createTextRange();rng.moveToElementText(div);rng.execCommand('Paste');var html=div.innerHTML;div.innerHTML='';return html;}};tinyMCE.addPlugin("paste",TinyMCE_PastePlugin);
\ No newline at end of file

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/paste/editor_plugin_src.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/paste/editor_plugin_src.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/paste/editor_plugin_src.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,388 @@
+/**
+ * $RCSfile: editor_plugin_src.js,v $
+ * $Revision: 1.37 $
+ * $Date: 2006/03/27 10:07:08 $
+ *
+ * @author Moxiecode
+ * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
+ */
+
+/* Import plugin specific language pack */ 
+tinyMCE.importPluginLanguagePack('paste', 'en,tr,sv,cs,zh_cn,fr_ca,da,he,nb,de,hu,ru,ru_KOI8-R,ru_UTF-8,nn,fi,es,cy,is,pl,nl,fr,pt_br');
+
+var TinyMCE_PastePlugin = {
+	getInfo : function() {
+		return {
+			longname : 'Paste text/word',
+			author : 'Moxiecode Systems',
+			authorurl : 'http://tinymce.moxiecode.com',
+			infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_paste.html',
+			version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
+		};
+	},
+
+	initInstance : function(inst) {
+		if (tinyMCE.isMSIE && tinyMCE.getParam("paste_auto_cleanup_on_paste", false))
+			tinyMCE.addEvent(inst.getBody(), "paste", TinyMCE_PastePlugin._handlePasteEvent);
+	},
+
+	getControlHTML : function(cn) { 
+		switch (cn) { 
+			case "pastetext":
+				return tinyMCE.getButtonHTML(cn, 'lang_paste_text_desc', '{$pluginurl}/images/pastetext.gif', 'mcePasteText', true);
+
+			case "pasteword":
+				return tinyMCE.getButtonHTML(cn, 'lang_paste_word_desc', '{$pluginurl}/images/pasteword.gif', 'mcePasteWord', true);
+
+			case "selectall":
+				return tinyMCE.getButtonHTML(cn, 'lang_selectall_desc', '{$pluginurl}/images/selectall.gif', 'mceSelectAll', true);
+		} 
+
+		return ''; 
+	},
+
+	execCommand : function(editor_id, element, command, user_interface, value) { 
+		switch (command) { 
+			case "mcePasteText": 
+				if (user_interface) {
+					if ((tinyMCE.isMSIE && !tinyMCE.isOpera) && !tinyMCE.getParam('paste_use_dialog', false))
+						TinyMCE_PastePlugin._insertText(clipboardData.getData("Text"), true); 
+					else { 
+						var template = new Array(); 
+						template['file']	= '../../plugins/paste/pastetext.htm'; // Relative to theme 
+						template['width']  = 450; 
+						template['height'] = 400; 
+						var plain_text = ""; 
+						tinyMCE.openWindow(template, {editor_id : editor_id, plain_text: plain_text, resizable : "yes", scrollbars : "no", inline : "yes", mceDo : 'insert'}); 
+					}
+				} else
+					TinyMCE_PastePlugin._insertText(value['html'], value['linebreaks']);
+
+				return true;
+
+			case "mcePasteWord": 
+				if (user_interface) {
+					if ((tinyMCE.isMSIE && !tinyMCE.isOpera) && !tinyMCE.getParam('paste_use_dialog', false)) {
+						var html = TinyMCE_PastePlugin._clipboardHTML();
+
+						if (html && html.length > 0)
+							TinyMCE_PastePlugin._insertWordContent(html);
+					} else { 
+						var template = new Array(); 
+						template['file']	= '../../plugins/paste/pasteword.htm'; // Relative to theme 
+						template['width']  = 450; 
+						template['height'] = 400; 
+						var plain_text = ""; 
+						tinyMCE.openWindow(template, {editor_id : editor_id, plain_text: plain_text, resizable : "yes", scrollbars : "no", inline : "yes", mceDo : 'insert'});
+					}
+				} else
+					TinyMCE_PastePlugin._insertWordContent(value);
+
+				return true;
+
+			case "mceSelectAll":
+				tinyMCE.execInstanceCommand(editor_id, 'selectall'); 
+				return true; 
+
+		} 
+
+		// Pass to next handler in chain 
+		return false; 
+	},
+
+	// Private plugin internal methods
+
+	_handlePasteEvent : function(e) {
+		switch (e.type) {
+			case "paste":
+				var html = TinyMCE_PastePlugin._clipboardHTML();
+				var r, inst = tinyMCE.selectedInstance;
+
+				// Removes italic, strong etc, the if was needed due to bug #1437114
+				if (inst && (r = inst.getRng()) && r.text.length > 0)
+					tinyMCE.execCommand('delete');
+
+				if (html && html.length > 0)
+					tinyMCE.execCommand('mcePasteWord', false, html);
+
+				tinyMCE.cancelEvent(e);
+				return false;
+		}
+
+		return true;
+	},
+
+	_insertText : function(content, bLinebreaks) { 
+		if (content && content.length > 0) {
+			if (bLinebreaks) { 
+				// Special paragraph treatment 
+				if (tinyMCE.getParam("paste_create_paragraphs", true)) {
+					var rl = tinyMCE.getParam("paste_replace_list", '\u2122,<sup>TM</sup>,\u2026,...,\u201c|\u201d,",\u2019,\',\u2013|\u2014|\u2015|\u2212,-').split(',');
+					for (var i=0; i<rl.length; i+=2)
+						content = content.replace(new RegExp(rl[i], 'gi'), rl[i+1]);
+
+					content = tinyMCE.regexpReplace(content, "\r\n\r\n", "</p><p>", "gi"); 
+					content = tinyMCE.regexpReplace(content, "\r\r", "</p><p>", "gi"); 
+					content = tinyMCE.regexpReplace(content, "\n\n", "</p><p>", "gi"); 
+
+					// Has paragraphs 
+					if ((pos = content.indexOf('</p><p>')) != -1) { 
+						tinyMCE.execCommand("Delete"); 
+
+						var node = tinyMCE.selectedInstance.getFocusElement(); 
+
+						// Get list of elements to break 
+						var breakElms = new Array(); 
+
+						do { 
+							if (node.nodeType == 1) { 
+								// Don't break tables and break at body 
+								if (node.nodeName == "TD" || node.nodeName == "BODY") 
+									break; 
+		
+								breakElms[breakElms.length] = node; 
+							} 
+						} while(node = node.parentNode); 
+
+						var before = "", after = "</p>"; 
+						before += content.substring(0, pos); 
+
+						for (var i=0; i<breakElms.length; i++) { 
+							before += "</" + breakElms[i].nodeName + ">"; 
+							after += "<" + breakElms[(breakElms.length-1)-i].nodeName + ">"; 
+						} 
+
+						before += "<p>"; 
+						content = before + content.substring(pos+7) + after; 
+					} 
+				} 
+
+				if (tinyMCE.getParam("paste_create_linebreaks", true)) {
+					content = tinyMCE.regexpReplace(content, "\r\n", "<br />", "gi"); 
+					content = tinyMCE.regexpReplace(content, "\r", "<br />", "gi"); 
+					content = tinyMCE.regexpReplace(content, "\n", "<br />", "gi"); 
+				}
+			} 
+		
+			tinyMCE.execCommand("mceInsertRawHTML", false, content); 
+		}
+	},
+
+	_insertWordContent : function(content) { 
+		if (content && content.length > 0) {
+			// Cleanup Word content
+			var bull = String.fromCharCode(8226);
+			var middot = String.fromCharCode(183);
+			var cb;
+
+			if ((cb = tinyMCE.getParam("paste_insert_word_content_callback", "")) != "")
+				content = eval(cb + "('before', content)");
+
+			var rl = tinyMCE.getParam("paste_replace_list", '\u2122,<sup>TM</sup>,\u2026,...,\u201c|\u201d,",\u2019,\',\u2013|\u2014|\u2015|\u2212,-').split(',');
+			for (var i=0; i<rl.length; i+=2)
+				content = content.replace(new RegExp(rl[i], 'gi'), rl[i+1]);
+
+			if (tinyMCE.getParam("paste_convert_headers_to_strong", false)) {
+				content = content.replace(new RegExp('<p class=MsoHeading.*?>(.*?)<\/p>', 'gi'), '<p><b>$1</b></p>');
+			}
+
+			content = content.replace(new RegExp('tab-stops: list [0-9]+.0pt">', 'gi'), '">' + "--list--");
+			content = content.replace(new RegExp(bull + "(.*?)<BR>", "gi"), "<p>" + middot + "$1</p>");
+			content = content.replace(new RegExp('<SPAN style="mso-list: Ignore">', 'gi'), "<span>" + bull); // Covert to bull list
+			content = content.replace(/<o:p><\/o:p>/gi, "");
+			content = content.replace(new RegExp('<br style="page-break-before: always;.*>', 'gi'), '-- page break --'); // Replace pagebreaks
+			content = content.replace(new RegExp('<(!--)([^>]*)(--)>', 'g'), "");  // Word comments
+
+			if (tinyMCE.getParam("paste_remove_spans", true))
+				content = content.replace(/<\/?span[^>]*>/gi, "");
+
+			if (tinyMCE.getParam("paste_remove_styles", true))
+				content = content.replace(new RegExp('<(\\w[^>]*) style="([^"]*)"([^>]*)', 'gi'), "<$1$3");
+
+			content = content.replace(/<\/?font[^>]*>/gi, "");
+
+			// Strips class attributes.
+			switch (tinyMCE.getParam("paste_strip_class_attributes", "all")) {
+				case "all":
+					content = content.replace(/<(\w[^>]*) class=([^ |>]*)([^>]*)/gi, "<$1$3");
+					break;
+
+				case "mso":
+					content = content.replace(new RegExp('<(\\w[^>]*) class="?mso([^ |>]*)([^>]*)', 'gi'), "<$1$3");
+					break;
+			}
+
+			content = content.replace(new RegExp('href="?' + TinyMCE_PastePlugin._reEscape("" + document.location) + '', 'gi'), 'href="' + tinyMCE.settings['document_base_url']);
+			content = content.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi, "<$1$3");
+			content = content.replace(/<\\?\?xml[^>]*>/gi, "");
+			content = content.replace(/<\/?\w+:[^>]*>/gi, "");
+			content = content.replace(/-- page break --\s*<p>&nbsp;<\/p>/gi, ""); // Remove pagebreaks
+			content = content.replace(/-- page break --/gi, ""); // Remove pagebreaks
+
+	//		content = content.replace(/\/?&nbsp;*/gi, ""); &nbsp;
+	//		content = content.replace(/<p>&nbsp;<\/p>/gi, '');
+
+			if (!tinyMCE.settings['force_p_newlines']) {
+				content = content.replace('', '' ,'gi');
+				content = content.replace('</p>', '<br /><br />' ,'gi');
+			}
+
+			if (!tinyMCE.isMSIE && !tinyMCE.settings['force_p_newlines']) {
+				content = content.replace(/<\/?p[^>]*>/gi, "");
+			}
+
+			content = content.replace(/<\/?div[^>]*>/gi, "");
+
+			// Convert all middlot lists to UL lists
+			if (tinyMCE.getParam("paste_convert_middot_lists", true)) {
+				var div = document.createElement("div");
+				div.innerHTML = content;
+
+				// Convert all middot paragraphs to li elements
+				var className = tinyMCE.getParam("paste_unindented_list_class", "unIndentedList");
+
+				while (TinyMCE_PastePlugin._convertMiddots(div, "--list--")) ; // bull
+				while (TinyMCE_PastePlugin._convertMiddots(div, middot, className)) ; // Middot
+				while (TinyMCE_PastePlugin._convertMiddots(div, bull)) ; // bull
+
+				content = div.innerHTML;
+			}
+
+			// Replace all headers with strong and fix some other issues
+			if (tinyMCE.getParam("paste_convert_headers_to_strong", false)) {
+				content = content.replace(/<h[1-6]>&nbsp;<\/h[1-6]>/gi, '<p>&nbsp;&nbsp;</p>');
+				content = content.replace(/<h[1-6]>/gi, '<p><b>');
+				content = content.replace(/<\/h[1-6]>/gi, '</b></p>');
+				content = content.replace(/<b>&nbsp;<\/b>/gi, '<b>&nbsp;&nbsp;</b>');
+				content = content.replace(/^(&nbsp;)*/gi, '');
+			}
+
+			content = content.replace(/--list--/gi, ""); // Remove --list--
+
+			if ((cb = tinyMCE.getParam("paste_insert_word_content_callback", "")) != "")
+				content = eval(cb + "('after', content)");
+
+			// Insert cleaned content
+			tinyMCE.execCommand("mceInsertContent", false, content);
+			window.setTimeout('tinyMCE.execCommand("mceCleanup");', 1); // Do normal cleanup detached from this thread
+		}
+	},
+
+	_reEscape : function(s) {
+		var l = "?.\\*[](){}+^$:";
+		var o = "";
+
+		for (var i=0; i<s.length; i++) {
+			var c = s.charAt(i);
+
+			if (l.indexOf(c) != -1)
+				o += '\\' + c;
+			else
+				o += c;
+		}
+
+		return o;
+	},
+
+	_convertMiddots : function(div, search, class_name) {
+		var mdot = String.fromCharCode(183);
+		var bull = String.fromCharCode(8226);
+
+		var nodes = div.getElementsByTagName("p");
+		var prevul;
+		for (var i=0; i<nodes.length; i++) {
+			var p = nodes[i];
+
+			// Is middot
+			if (p.innerHTML.indexOf(search) == 0) {
+				var ul = document.createElement("ul");
+
+				if (class_name)
+					ul.className = class_name;
+
+				// Add the first one
+				var li = document.createElement("li");
+				li.innerHTML = p.innerHTML.replace(new RegExp('' + mdot + '|' + bull + '|--list--|&nbsp;', "gi"), '');
+				ul.appendChild(li);
+
+				// Add the rest
+				var np = p.nextSibling;
+				while (np) {
+			        // If the node is whitespace, then
+			        // ignore it and continue on.
+			        if (np.nodeType == 3 && new RegExp('^\\s$', 'm').test(np.nodeValue)) {
+			                np = np.nextSibling;
+			                continue;
+			        }
+
+					if (search == mdot) {
+					        if (np.nodeType == 1 && new RegExp('^o(\\s+|&nbsp;)').test(np.innerHTML)) {
+					                // Second level of nesting
+					                if (!prevul) {
+					                        prevul = ul;
+					                        ul = document.createElement("ul");
+					                        prevul.appendChild(ul);
+					                }
+					                np.innerHTML = np.innerHTML.replace(/^o/, '');
+					        } else {
+					                // Pop the stack if we're going back up to the first level
+					                if (prevul) {
+					                        ul = prevul;
+					                        prevul = null;
+					                }
+					                // Not element or middot paragraph
+					                if (np.nodeType != 1 || np.innerHTML.indexOf(search) != 0)
+					                        break;
+					        }
+					} else {
+					        // Not element or middot paragraph
+					        if (np.nodeType != 1 || np.innerHTML.indexOf(search) != 0)
+					                break;
+				        }
+
+					var cp = np.nextSibling;
+					var li = document.createElement("li");
+					li.innerHTML = np.innerHTML.replace(new RegExp('' + mdot + '|' + bull + '|--list--|&nbsp;', "gi"), '');
+					np.parentNode.removeChild(np);
+					ul.appendChild(li);
+					np = cp;
+				}
+
+				p.parentNode.replaceChild(ul, p);
+
+				return true;
+			}
+		}
+
+		return false;
+	},
+
+	_clipboardHTML : function() {
+		var div = document.getElementById('_TinyMCE_clipboardHTML');
+
+		if (!div) {
+			var div = document.createElement('DIV');
+			div.id = '_TinyMCE_clipboardHTML';
+
+			with (div.style) {
+				visibility = 'hidden';
+				overflow = 'hidden';
+				position = 'absolute';
+				width = 1;
+				height = 1;
+			}
+
+			document.body.appendChild(div);
+		}
+
+		div.innerHTML = '';
+		var rng = document.body.createTextRange();
+		rng.moveToElementText(div);
+		rng.execCommand('Paste');
+		var html = div.innerHTML;
+		div.innerHTML = '';
+		return html;
+	}
+};
+
+tinyMCE.addPlugin("paste", TinyMCE_PastePlugin);

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/paste/images/pastetext.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/paste/images/pastetext.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/paste/images/pasteword.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/paste/images/pasteword.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/paste/images/selectall.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/paste/images/selectall.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/paste/jscripts/pastetext.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/paste/jscripts/pastetext.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/paste/jscripts/pastetext.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,34 @@
+function saveContent() {
+	if (document.forms[0].htmlSource.value == '') {
+		tinyMCEPopup.close();
+		return false;
+	}
+
+	tinyMCEPopup.execCommand('mcePasteText', false, {
+		html : document.forms[0].htmlSource.value,
+		linebreaks : document.forms[0].linebreaks.checked
+	});
+
+	tinyMCEPopup.close();
+}
+
+function onLoadInit() {
+	tinyMCEPopup.resizeToInnerSize();
+
+	resizeInputs();
+}
+
+var wHeight=0, wWidth=0, owHeight=0, owWidth=0;
+
+function resizeInputs() {
+	if (!tinyMCE.isMSIE) {
+		wHeight = self.innerHeight-80;
+		wWidth = self.innerWidth-17;
+	} else {
+		wHeight = document.body.clientHeight-80;
+		wWidth = document.body.clientWidth-17;
+	}
+
+	document.forms[0].htmlSource.style.height = Math.abs(wHeight) + 'px';
+	document.forms[0].htmlSource.style.width  = Math.abs(wWidth) + 'px';
+}

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/paste/jscripts/pasteword.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/paste/jscripts/pasteword.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/paste/jscripts/pasteword.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,46 @@
+function saveContent() {
+	var html = document.getElementById("frmData").contentWindow.document.body.innerHTML;
+
+	if (html == ''){
+		tinyMCEPopup.close();
+		return false;
+	}
+
+	tinyMCEPopup.execCommand('mcePasteWord', false, html);
+	tinyMCEPopup.close();
+}
+
+function onLoadInit() {
+	tinyMCEPopup.resizeToInnerSize();
+
+	// Fix for endless reloading in FF
+	window.setTimeout('createIFrame();', 10);
+}
+
+function createIFrame() {
+	document.getElementById('iframecontainer').innerHTML = '<iframe id="frmData" name="frmData" class="sourceIframe" src="blank.htm" height="280" width="400" frameborder="0" style="background-color:#FFFFFF; width:100%;" dir="ltr" wrap="soft"></iframe>';
+}
+
+var wHeight=0, wWidth=0, owHeight=0, owWidth=0;
+
+function initIframe(doc) {
+	var dir = tinyMCE.selectedInstance.settings['directionality'];
+	doc.body.dir = dir;
+	resizeInputs();
+}
+
+function resizeInputs() {
+	if (!tinyMCE.isMSIE) {
+		wHeight = self.innerHeight - 80;
+		wWidth = self.innerWidth - 18;
+	} else {
+		wHeight = document.body.clientHeight - 80;
+		wWidth = document.body.clientWidth - 18;
+	}
+
+	var elm = document.getElementById('frmData');
+	if (elm) {
+		elm.style.height = Math.abs(wHeight) + 'px';
+		elm.style.width  = Math.abs(wWidth) + 'px';
+	}
+}

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/paste/langs/en.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/paste/langs/en.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/paste/langs/en.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,10 @@
+// UK lang variables
+
+tinyMCE.addToLang('',{
+paste_text_desc : 'Paste as Plain Text',
+paste_text_title : 'Use CTRL+V on your keyboard to paste the text into the window.',
+paste_text_linebreaks : 'Keep linebreaks',
+paste_word_desc : 'Paste from Word',
+paste_word_title : 'Use CTRL+V on your keyboard to paste the text into the window.',
+selectall_desc : 'Select All'
+});

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/paste/pastetext.htm
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/paste/pastetext.htm	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/paste/pastetext.htm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,34 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+	<title>{$lang_paste_text_desc}</title>
+	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+	<script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
+	<script language="javascript" type="text/javascript" src="jscripts/pastetext.js"></script>
+	<base target="_self" />
+</head>
+<body onload="tinyMCEPopup.executeOnLoad('onLoadInit();');" onresize="resizeInputs();" style="display: none">
+<form name="source" onsubmit="saveContent();">
+	<div style="float: left" class="title">{$lang_paste_text_desc}</div>
+
+	<div style="float: right">
+		<input type="checkbox" name="linebreaks" id="linebreaks" class="wordWrapCode" checked="checked" /><label for="linebreaks">{$lang_paste_text_linebreaks}</label>
+	</div>
+
+	<br style="clear: both" />
+
+	<div>{$lang_paste_text_title}</div>
+
+	<textarea name="htmlSource" id="htmlSource" rows="15" cols="100" style="width: 100%; height: 100%; font-family: 'Courier New',Courier,mono; font-size: 12px;" dir="ltr" wrap="soft"></textarea>
+
+	<div class="mceActionPanel">
+		<div style="float: left">
+			<input type="button" name="insert" value="{$lang_insert}" onclick="saveContent();" id="insert" />
+		</div>
+
+		<div style="float: right">
+			<input type="button" name="cancel" value="{$lang_cancel}" onclick="tinyMCEPopup.close();" id="cancel" />
+		</div>
+	</div>
+</form>
+</body> 
+</html>
\ No newline at end of file

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/paste/pasteword.htm
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/paste/pasteword.htm	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/paste/pasteword.htm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,29 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+	<title>{$lang_paste_word_desc}</title>
+	<script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
+	<script language="javascript" type="text/javascript" src="jscripts/pasteword.js"></script>
+	<link href="css/pasteword.css" rel="stylesheet" type="text/css" />
+	<base target="_self" />
+</head>
+<body onload="tinyMCEPopup.executeOnLoad('onLoadInit();');" onresize="resizeInputs();" style="display: none">
+	<form name="source" onsubmit="saveContent();" action="#">
+		<div class="title">{$lang_paste_word_desc}</div>
+
+		<div>{$lang_paste_word_title}</div>
+
+		<div id="iframecontainer"></div>
+
+		<div class="mceActionPanel">
+			<div style="float: left">
+				<input type="button" id="insert" name="insert" value="{$lang_insert}" onclick="saveContent();" />
+			</div>
+
+			<div style="float: right">
+				<input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onclick="tinyMCEPopup.close();" />
+			</div>
+		</div>
+	</form>
+</body>
+</html>

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/paste/readme.txt
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/paste/readme.txt	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/paste/readme.txt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1 @@
+Check the TinyMCE documentation for details on this plugin.

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/preview/editor_plugin.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/preview/editor_plugin.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/preview/editor_plugin.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1 @@
+tinyMCE.importPluginLanguagePack('preview','en,tr,cs,de,el,fr_ca,it,ko,pt,sv,zh_cn,fa,fr,pl,pt_br,nl,da,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,es,cy,is,zh_tw,zh_tw_utf8,sk');var TinyMCE_PreviewPlugin={getInfo:function(){return{longname:'Preview',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_preview.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};},getControlHTML:function(cn){switch(cn){case"preview":return tinyMCE.getButtonHTML(cn,'lang_preview_desc','{$pluginurl}/images/preview.gif','mcePreview');}return"";},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case"mcePreview":var previewPage=tinyMCE.getParam("plugin_preview_pageurl",null);var previewWidth=tinyMCE.getParam("plugin_preview_width","550");var previewHeight=tinyMCE.getParam("plugin_preview_height","600");if(previewPage){var template=new Array();template['file']=previewPage;template['width']=previewWidth;template['height']=previewHeight;tinyMCE.openWindow(template,{editor_id:editor_id,resizable:"yes",scrollbars:"yes",inline:"yes",content:tinyMCE.getContent(),content_css:tinyMCE.getParam("content_css")});}else{var win=window.open("","mcePreview","menubar=no,toolbar=no,scrollbars=yes,resizable=yes,left=20,top=20,width="+previewWidth+",height="+previewHeight);var html="";var c=tinyMCE.getContent();var pos=c.indexOf('<body'),pos2;if(pos!=-1){pos=c.indexOf('>',pos);pos2=c.lastIndexOf('</body>');c=c.substring(pos+1,pos2);}html+=tinyMCE.getParam('doctype');html+='<html xmlns="http://www.w3.org/1999/xhtml">';html+='<head>';html+='<title>'+tinyMCE.getLang('lang_preview_desc')+'</title>';html+='<base href="'+tinyMCE.settings['base_href']+'" />';html+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';html+='<link href="'+tinyMCE.getParam("content_css")+'" rel="stylesheet" type="text/css" />';html+='</head>';html+='<body dir="'+tinyMCE.getParam("directionality")+'">';html+=c;html+='</body>';html+='</html>';win.document.write(html);win.document.close();}return true;}return false;}};tinyMCE.addPlugin("preview",TinyMCE_PreviewPlugin);
\ No newline at end of file

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/preview/editor_plugin_src.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/preview/editor_plugin_src.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/preview/editor_plugin_src.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,92 @@
+/**
+ * $RCSfile: editor_plugin_src.js,v $
+ * $Revision: 1.23 $
+ * $Date: 2006/03/20 12:03:44 $
+ *
+ * @author Moxiecode
+ * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
+ */
+
+/* Import plugin specific language pack */
+tinyMCE.importPluginLanguagePack('preview', 'en,tr,cs,de,el,fr_ca,it,ko,pt,sv,zh_cn,fa,fr,pl,pt_br,nl,da,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,es,cy,is,zh_tw,zh_tw_utf8,sk');
+
+var TinyMCE_PreviewPlugin = {
+	getInfo : function() {
+		return {
+			longname : 'Preview',
+			author : 'Moxiecode Systems',
+			authorurl : 'http://tinymce.moxiecode.com',
+			infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_preview.html',
+			version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
+		};
+	},
+
+	/**
+	 * Returns the HTML contents of the preview control.
+	 */
+	getControlHTML : function(cn) {
+		switch (cn) {
+			case "preview":
+				return tinyMCE.getButtonHTML(cn, 'lang_preview_desc', '{$pluginurl}/images/preview.gif', 'mcePreview');
+		}
+
+		return "";
+	},
+
+	/**
+	 * Executes the mcePreview command.
+	 */
+	execCommand : function(editor_id, element, command, user_interface, value) {
+		// Handle commands
+		switch (command) {
+			case "mcePreview":
+				var previewPage = tinyMCE.getParam("plugin_preview_pageurl", null);
+				var previewWidth = tinyMCE.getParam("plugin_preview_width", "550");
+				var previewHeight = tinyMCE.getParam("plugin_preview_height", "600");
+
+				// Use a custom preview page
+				if (previewPage) {
+					var template = new Array();
+
+					template['file'] = previewPage;
+					template['width'] = previewWidth;
+					template['height'] = previewHeight;
+
+					tinyMCE.openWindow(template, {editor_id : editor_id, resizable : "yes", scrollbars : "yes", inline : "yes", content : tinyMCE.getContent(), content_css : tinyMCE.getParam("content_css")});
+				} else {
+					var win = window.open("", "mcePreview", "menubar=no,toolbar=no,scrollbars=yes,resizable=yes,left=20,top=20,width=" + previewWidth + ",height="  + previewHeight);
+					var html = "";
+					var c = tinyMCE.getContent();
+					var pos = c.indexOf('<body'), pos2;
+
+					if (pos != -1) {
+						pos = c.indexOf('>', pos);
+						pos2 = c.lastIndexOf('</body>');
+						c = c.substring(pos + 1, pos2);
+					}
+
+					html += tinyMCE.getParam('doctype');
+					html += '<html xmlns="http://www.w3.org/1999/xhtml">';
+					html += '<head>';
+					html += '<title>' + tinyMCE.getLang('lang_preview_desc') + '</title>';
+					html += '<base href="' + tinyMCE.settings['base_href'] + '" />';
+					html += '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';
+					html += '<link href="' + tinyMCE.getParam("content_css") + '" rel="stylesheet" type="text/css" />';
+					html += '</head>';
+					html += '<body dir="' + tinyMCE.getParam("directionality") + '">';
+					html += c;
+					html += '</body>';
+					html += '</html>';
+
+					win.document.write(html);
+					win.document.close();
+				}
+
+				return true;
+		}
+
+		return false;
+	}
+};
+
+tinyMCE.addPlugin("preview", TinyMCE_PreviewPlugin);

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/preview/example.html
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/preview/example.html	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/preview/example.html	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,13 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<script language="javascript" src="../../tiny_mce_popup.js"></script>
+<title>Example of a custom preview page</title>
+<link href="{$content_css}" rel="stylesheet" type="text/css" />
+</head>
+<body>
+
+Editor contents: <br />
+{$content}
+
+</body>
+</html>

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/preview/images/preview.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/preview/images/preview.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/preview/langs/en.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/preview/langs/en.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/preview/langs/en.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,5 @@
+// UK lang variables
+
+tinyMCE.addToLang('',{
+preview_desc : 'Preview'
+});

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/preview/readme.txt
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/preview/readme.txt	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/preview/readme.txt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1 @@
+Check the TinyMCE documentation for details on this plugin.

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/print/editor_plugin.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/print/editor_plugin.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/print/editor_plugin.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1 @@
+tinyMCE.importPluginLanguagePack('print','en,tr,sv,zh_cn,fa,fr_ca,fr,de,pl,pt_br,cs,nl,da,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,fi,es,cy,is,zh_tw,zh_tw_utf8,sk');var TinyMCE_PrintPlugin={getInfo:function(){return{longname:'Print',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_print.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};},getControlHTML:function(cn){switch(cn){case"print":return tinyMCE.getButtonHTML(cn,'lang_print_desc','{$pluginurl}/images/print.gif','mcePrint');}return"";},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case"mcePrint":tinyMCE.getInstanceById(editor_id).contentWindow.print();return true;}return false;}};tinyMCE.addPlugin("print",TinyMCE_PrintPlugin);
\ No newline at end of file

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/print/editor_plugin_src.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/print/editor_plugin_src.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/print/editor_plugin_src.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,49 @@
+/**
+ * $RCSfile: editor_plugin_src.js,v $
+ * $Revision: 1.19 $
+ * $Date: 2006/02/10 16:29:40 $
+ *
+ * @author Moxiecode
+ * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
+ */
+
+/* Import theme	specific language pack */
+tinyMCE.importPluginLanguagePack('print', 'en,tr,sv,zh_cn,fa,fr_ca,fr,de,pl,pt_br,cs,nl,da,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,fi,es,cy,is,zh_tw,zh_tw_utf8,sk');
+
+var TinyMCE_PrintPlugin = {
+	getInfo : function() {
+		return {
+			longname : 'Print',
+			author : 'Moxiecode Systems',
+			authorurl : 'http://tinymce.moxiecode.com',
+			infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_print.html',
+			version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
+		};
+	},
+
+	getControlHTML : function(cn)	{
+		switch (cn) {
+			case "print":
+				return tinyMCE.getButtonHTML(cn, 'lang_print_desc', '{$pluginurl}/images/print.gif', 'mcePrint');
+		}
+
+		return "";
+	},
+
+	/**
+	 * Executes	the	search/replace commands.
+	 */
+	execCommand : function(editor_id, element, command,	user_interface,	value) {
+		// Handle commands
+		switch (command) {
+			case "mcePrint":
+				tinyMCE.getInstanceById(editor_id).contentWindow.print();
+				return true;
+		}
+
+		// Pass to next handler in chain
+		return false;
+	}
+};
+
+tinyMCE.addPlugin("print", TinyMCE_PrintPlugin);

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/print/images/print.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/print/images/print.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/print/langs/en.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/print/langs/en.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/print/langs/en.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,5 @@
+// UK lang variables
+
+tinyMCE.addToLang('',{
+print_desc : 'Print'
+});

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/print/readme.txt
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/print/readme.txt	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/print/readme.txt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1 @@
+Check the TinyMCE documentation for details on this plugin.

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/readme.txt
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/readme.txt	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/readme.txt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1 @@
+This is the location you place TinyMCE plugins.

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/save/editor_plugin.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/save/editor_plugin.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/save/editor_plugin.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1 @@
+tinyMCE.importPluginLanguagePack('save','en,tr,sv,zh_cn,cs,fa,fr_ca,fr,de,pl,pt_br,nl,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,fi,da,es,cy,is,zh_tw,zh_tw_utf8,sk');var TinyMCE_SavePlugin={getInfo:function(){return{longname:'Save',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_save.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};},initInstance:function(inst){inst.addShortcut('ctrl','s','lang_save_desc','mceSave');},getControlHTML:function(cn){switch(cn){case"save":return tinyMCE.getButtonHTML(cn,'lang_save_desc','{$pluginurl}/images/save.gif','mceSave');}return"";},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case"mceSave":if(tinyMCE.getParam("fullscreen_is_enabled"))return true;var inst=tinyMCE.selectedInstance;var formObj=inst.formElement.form;if(tinyMCE.getParam("save_enablewhendirty")&&!inst.isDirty())return true;if(formObj){tinyMCE.triggerSave();var os;if((os=tinyMCE.getParam("save_onsavecallback"))){if(eval(os+'(inst);')){inst.startContent=tinyMCE.trim(inst.getBody().innerHTML);tinyMCE.triggerNodeChange(false,true);}return true;}for(var i=0;i<formObj.elements.length;i++){var elementId=formObj.elements[i].name?formObj.elements[i].name:formObj.elements[i].id;if(elementId.indexOf('mce_editor_')==0)formObj.elements[i].disabled=true;}tinyMCE.isNotDirty=true;if(formObj.onsubmit==null||formObj.onsubmit()!=false)inst.formElement.form.submit();}else alert("Error: No form element found.");return true;}return false;},handleNodeChange:function(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){if(tinyMCE.getParam("fullscreen_is_enabled")){tinyMCE.switchClass(editor_id+'_save','mceButtonDisabled');return true;}if(tinyMCE.getParam("save_enablewhendirty")){var inst=tinyMCE.getInstanceById(editor_id);if(inst.isDirty()){tinyMCE.switchClass(editor_id+'_save','mceButtonNormal');return true;}tinyMCE.switchClass(editor_id+'_save','mceButtonDisabled');}return true;}};tinyMCE.addPlugin("save",TinyMCE_SavePlugin);
\ No newline at end of file

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/save/editor_plugin_src.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/save/editor_plugin_src.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/save/editor_plugin_src.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,117 @@
+/**
+ * $RCSfile: editor_plugin_src.js,v $
+ * $Revision: 1.26 $
+ * $Date: 2006/02/13 15:09:28 $
+ *
+ * @author Moxiecode
+ * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
+ */
+
+/* Import plugin specific language pack */
+tinyMCE.importPluginLanguagePack('save', 'en,tr,sv,zh_cn,cs,fa,fr_ca,fr,de,pl,pt_br,nl,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,fi,da,es,cy,is,zh_tw,zh_tw_utf8,sk');
+
+var TinyMCE_SavePlugin = {
+	getInfo : function() {
+		return {
+			longname : 'Save',
+			author : 'Moxiecode Systems',
+			authorurl : 'http://tinymce.moxiecode.com',
+			infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_save.html',
+			version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
+		};
+	},
+
+	initInstance : function(inst) {
+		inst.addShortcut('ctrl', 's', 'lang_save_desc', 'mceSave');
+	},
+
+	/**
+	 * Returns the HTML contents of the save control.
+	 */
+	getControlHTML : function(cn) {
+		switch (cn) {
+			case "save":
+				return tinyMCE.getButtonHTML(cn, 'lang_save_desc', '{$pluginurl}/images/save.gif', 'mceSave');
+		}
+
+		return "";
+	},
+
+	/**
+	 * Executes the save command.
+	 */
+	execCommand : function(editor_id, element, command, user_interface, value) {
+		// Handle commands
+		switch (command) {
+			case "mceSave":
+				if (tinyMCE.getParam("fullscreen_is_enabled"))
+					return true;
+
+				var inst = tinyMCE.selectedInstance;
+				var formObj = inst.formElement.form;
+
+				if (tinyMCE.getParam("save_enablewhendirty") && !inst.isDirty())
+					return true;
+
+				if (formObj) {
+					tinyMCE.triggerSave();
+
+					// Use callback instead
+					var os;
+					if ((os = tinyMCE.getParam("save_onsavecallback"))) {
+						if (eval(os + '(inst);')) {
+							inst.startContent = tinyMCE.trim(inst.getBody().innerHTML);
+							/*inst.undoLevels = new Array();
+							inst.undoIndex = 0;
+							inst.typingUndoIndex = -1;
+							inst.undoRedo = true;
+							inst.undoLevels[inst.undoLevels.length] = inst.startContent;*/
+							tinyMCE.triggerNodeChange(false, true);
+						}
+
+						return true;
+					}
+
+					// Disable all UI form elements that TinyMCE created
+					for (var i=0; i<formObj.elements.length; i++) {
+						var elementId = formObj.elements[i].name ? formObj.elements[i].name : formObj.elements[i].id;
+
+						if (elementId.indexOf('mce_editor_') == 0)
+							formObj.elements[i].disabled = true;
+					}
+
+					tinyMCE.isNotDirty = true;
+
+					if (formObj.onsubmit == null || formObj.onsubmit() != false)
+						inst.formElement.form.submit();
+				} else
+					alert("Error: No form element found.");
+
+				return true;
+		}
+		// Pass to next handler in chain
+		return false;
+	},
+
+	handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {
+		if (tinyMCE.getParam("fullscreen_is_enabled")) {
+			tinyMCE.switchClass(editor_id + '_save', 'mceButtonDisabled');
+			return true;
+		}
+
+		if (tinyMCE.getParam("save_enablewhendirty")) {
+			var inst = tinyMCE.getInstanceById(editor_id);
+
+			if (inst.isDirty()) {
+				tinyMCE.switchClass(editor_id + '_save', 'mceButtonNormal');
+				return true;
+			}
+
+			tinyMCE.switchClass(editor_id + '_save', 'mceButtonDisabled');
+		}
+
+		return true;
+	}
+};
+
+tinyMCE.addPlugin("save", TinyMCE_SavePlugin);

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/save/images/save.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/save/images/save.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/save/langs/en.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/save/langs/en.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/save/langs/en.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,5 @@
+// UK lang variables
+
+tinyMCE.addToLang('',{
+save_desc : 'Save'
+});

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/save/readme.txt
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/save/readme.txt	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/save/readme.txt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1 @@
+Check the TinyMCE documentation for details on this plugin.

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/searchreplace/editor_plugin.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/searchreplace/editor_plugin.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/searchreplace/editor_plugin.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1 @@
+tinyMCE.importPluginLanguagePack('searchreplace','en,tr,sv,zh_cn,fa,fr_ca,fr,de,pl,pt_br,cs,nl,da,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,fi,cy,es,is,zh_tw,zh_tw_utf8,sk');var TinyMCE_SearchReplacePlugin={getInfo:function(){return{longname:'Search/Replace',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_searchreplace.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};},initInstance:function(inst){inst.addShortcut('ctrl','f','lang_searchreplace_search_desc','mceSearch',true);},getControlHTML:function(cn){switch(cn){case"search":return tinyMCE.getButtonHTML(cn,'lang_searchreplace_search_desc','{$pluginurl}/images/search.gif','mceSearch',true);case"replace":return tinyMCE.getButtonHTML(cn,'lang_searchreplace_replace_desc','{$pluginurl}/images/replace.gif','mceSearchReplace',true);}return"";},execCommand:function(editor_id,element,command,user_interface,value){var instance=tinyMCE.getInstanceById(editor_id);function defValue(key,default_value){value[key]=typeof(value[key])=="undefined"?default_value:value[key];}function replaceSel(search_str,str,back){instance.execCommand('mceInsertContent',false,str);}if(!value)value=new Array();defValue("editor_id",editor_id);defValue("searchstring","");defValue("replacestring",null);defValue("replacemode","none");defValue("casesensitive",false);defValue("backwards",false);defValue("wrap",false);defValue("wholeword",false);defValue("inline","yes");switch(command){case"mceResetSearch":tinyMCE.lastSearchRng=null;return true;case"mceSearch":if(user_interface){var template=new Array();if(value['replacestring']!=null){template['file']='../../plugins/searchreplace/replace.htm';template['width']=320;template['height']=100+(tinyMCE.isNS7?20:0);template['width']+=tinyMCE.getLang('lang_searchreplace_replace_delta_width',0);template['height']+=tinyMCE.getLang('lang_searchreplace_replace_delta_height',0);}else{template['file']='../../plugins/searchreplace/search.htm';template['width']=310;template['height']=105+(tinyMCE.isNS7?25:0);template['width']+=tinyMCE.getLang('lang_searchreplace_search_delta_width',0);template['height']+=tinyMCE.getLang('lang_searchreplace_replace_delta_height',0);}instance.execCommand('SelectAll');if(tinyMCE.isMSIE){var r=instance.selection.getRng();r.collapse(true);r.select();}else instance.selection.getSel().collapseToStart();tinyMCE.openWindow(template,value);}else{var win=tinyMCE.getInstanceById(editor_id).contentWindow;var doc=tinyMCE.getInstanceById(editor_id).contentWindow.document;var body=tinyMCE.getInstanceById(editor_id).contentWindow.document.body;if(body.innerHTML==""){alert(tinyMCE.getLang('lang_searchreplace_notfound'));return true;}if(value['replacemode']=="current"){replaceSel(value['string'],value['replacestring'],value['backwards']);value['replacemode']="none";tinyMCE.execInstanceCommand(editor_id,'mceSearch',user_interface,value,false);return true;}if(tinyMCE.isMSIE){var rng=tinyMCE.lastSearchRng?tinyMCE.lastSearchRng:doc.selection.createRange();var flags=0;if(value['wholeword'])flags=flags|2;if(value['casesensitive'])flags=flags|4;if(!rng.findText){alert('This operation is currently not supported by this browser.');return true;}if(value['replacemode']=="all"){while(rng.findText(value['string'],value['backwards']?-1:1,flags)){rng.scrollIntoView();rng.select();rng.collapse(false);replaceSel(value['string'],value['replacestring'],value['backwards']);}alert(tinyMCE.getLang('lang_searchreplace_allreplaced'));return true;}if(rng.findText(value['string'],value['backwards']?-1:1,flags)){rng.scrollIntoView();rng.select();rng.collapse(value['backwards']);tinyMCE.lastSearchRng=rng;}else alert(tinyMCE.getLang('lang_searchreplace_notfound'));}else{if(value['replacemode']=="all"){while(win.find(value['string'],value['casesensitive'],value['backwards'],value['wrap'],value['wholeword'],false,false))replaceSel(value['string'],value['replacestring'],value['backwards']);alert(tinyMCE.getLang('lang_searchreplace_allreplaced'));return true;}if(!win.find(value['string'],value['casesensitive'],value['backwards'],value['wrap'],value['wholeword'],false,false))alert(tinyMCE.getLang('lang_searchreplace_notfound'));}}return true;case"mceSearchReplace":value['replacestring']="";tinyMCE.execInstanceCommand(editor_id,'mceSearch',user_interface,value,false);return true;}return false;}};tinyMCE.addPlugin("searchreplace",TinyMCE_SearchReplacePlugin);
\ No newline at end of file

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/searchreplace/editor_plugin_src.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/searchreplace/editor_plugin_src.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/searchreplace/editor_plugin_src.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,185 @@
+/**
+ * $RCSfile: editor_plugin_src.js,v $
+ * $Revision: 1.27 $
+ * $Date: 2006/02/13 15:09:28 $
+ *
+ * @author Moxiecode
+ * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
+ */
+
+/* Import theme	specific language pack */
+tinyMCE.importPluginLanguagePack('searchreplace', 'en,tr,sv,zh_cn,fa,fr_ca,fr,de,pl,pt_br,cs,nl,da,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,fi,cy,es,is,zh_tw,zh_tw_utf8,sk');
+
+var TinyMCE_SearchReplacePlugin = {
+	getInfo : function() {
+		return {
+			longname : 'Search/Replace',
+			author : 'Moxiecode Systems',
+			authorurl : 'http://tinymce.moxiecode.com',
+			infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_searchreplace.html',
+			version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
+		};
+	},
+
+	initInstance : function(inst) {
+		inst.addShortcut('ctrl', 'f', 'lang_searchreplace_search_desc', 'mceSearch', true);
+	},
+
+	getControlHTML : function(cn)	{
+		switch (cn) {
+			case "search":
+				return tinyMCE.getButtonHTML(cn, 'lang_searchreplace_search_desc', '{$pluginurl}/images/search.gif', 'mceSearch', true);
+			case "replace":
+				return tinyMCE.getButtonHTML(cn, 'lang_searchreplace_replace_desc', '{$pluginurl}/images/replace.gif', 'mceSearchReplace', true);
+		}
+		return "";
+	},
+
+	/**
+	 * Executes	the	search/replace commands.
+	 */
+	execCommand : function(editor_id, element, command,	user_interface,	value) {
+		var instance = tinyMCE.getInstanceById(editor_id);
+
+		function defValue(key, default_value) {
+			value[key] = typeof(value[key]) == "undefined" ? default_value : value[key];
+		}
+
+		function replaceSel(search_str, str, back) {
+			instance.execCommand('mceInsertContent', false, str);
+		}
+
+		if (!value)
+			value = new Array();
+
+		// Setup defualt values
+		defValue("editor_id", editor_id);
+		defValue("searchstring", "");
+		defValue("replacestring", null);
+		defValue("replacemode", "none");
+		defValue("casesensitive", false);
+		defValue("backwards", false);
+		defValue("wrap", false);
+		defValue("wholeword", false);
+		defValue("inline", "yes");
+
+		// Handle commands
+		switch (command) {
+			case "mceResetSearch":
+				tinyMCE.lastSearchRng = null;
+				return true;
+
+			case "mceSearch":
+				if (user_interface) {
+					// Open search dialog
+					var template = new Array();
+
+					if (value['replacestring'] != null) {
+						template['file'] = '../../plugins/searchreplace/replace.htm'; // Relative to theme
+						template['width'] = 320;
+						template['height'] = 100 + (tinyMCE.isNS7 ? 20 : 0);
+						template['width'] += tinyMCE.getLang('lang_searchreplace_replace_delta_width', 0);
+						template['height'] += tinyMCE.getLang('lang_searchreplace_replace_delta_height', 0);
+					} else {
+						template['file'] = '../../plugins/searchreplace/search.htm'; // Relative to theme
+						template['width'] = 310;
+						template['height'] = 105 + (tinyMCE.isNS7 ? 25 : 0);
+						template['width'] += tinyMCE.getLang('lang_searchreplace_search_delta_width', 0);
+						template['height'] += tinyMCE.getLang('lang_searchreplace_replace_delta_height', 0);
+					}
+
+					instance.execCommand('SelectAll');
+
+					if (tinyMCE.isMSIE) {
+						var r = instance.selection.getRng();
+						r.collapse(true);
+						r.select();
+					} else
+						instance.selection.getSel().collapseToStart();
+
+					tinyMCE.openWindow(template, value);
+				} else {
+					var win = tinyMCE.getInstanceById(editor_id).contentWindow;
+					var doc = tinyMCE.getInstanceById(editor_id).contentWindow.document;
+					var body = tinyMCE.getInstanceById(editor_id).contentWindow.document.body;
+
+					// Whats the point
+					if (body.innerHTML == "") {
+						alert(tinyMCE.getLang('lang_searchreplace_notfound'));
+						return true;
+					}
+
+					// Handle replace current
+					if (value['replacemode'] == "current") {
+						replaceSel(value['string'], value['replacestring'], value['backwards']);
+
+						// Search next one
+						value['replacemode'] = "none";
+						tinyMCE.execInstanceCommand(editor_id, 'mceSearch', user_interface, value, false);
+
+						return true;
+					}
+
+					if (tinyMCE.isMSIE) {
+						var rng = tinyMCE.lastSearchRng ? tinyMCE.lastSearchRng : doc.selection.createRange();
+						var flags = 0;
+
+						if (value['wholeword'])
+							flags = flags | 2;
+
+						if (value['casesensitive'])
+							flags = flags | 4;
+
+						if (!rng.findText) {
+							alert('This operation is currently not supported by this browser.');
+							return true;
+						}
+
+						// Handle replace all mode
+						if (value['replacemode'] == "all") {
+							while (rng.findText(value['string'], value['backwards'] ? -1 : 1, flags)) {
+								rng.scrollIntoView();
+								rng.select();
+								rng.collapse(false);
+								replaceSel(value['string'], value['replacestring'], value['backwards']);
+							}
+
+							alert(tinyMCE.getLang('lang_searchreplace_allreplaced'));
+							return true;
+						}
+
+						if (rng.findText(value['string'], value['backwards'] ? -1 : 1, flags)) {
+							rng.scrollIntoView();
+							rng.select();
+							rng.collapse(value['backwards']);
+							tinyMCE.lastSearchRng = rng;
+						} else
+							alert(tinyMCE.getLang('lang_searchreplace_notfound'));
+					} else {
+						if (value['replacemode'] == "all") {
+							while (win.find(value['string'], value['casesensitive'], value['backwards'], value['wrap'], value['wholeword'], false, false))
+								replaceSel(value['string'], value['replacestring'], value['backwards']);
+
+							alert(tinyMCE.getLang('lang_searchreplace_allreplaced'));
+							return true;
+						}
+
+						if (!win.find(value['string'], value['casesensitive'], value['backwards'], value['wrap'], value['wholeword'], false, false))
+							alert(tinyMCE.getLang('lang_searchreplace_notfound'));
+					}
+				}
+				return true;
+
+			case "mceSearchReplace":
+				value['replacestring'] = "";
+
+				tinyMCE.execInstanceCommand(editor_id, 'mceSearch', user_interface, value, false);
+				return true;
+		}
+
+		// Pass to next handler in chain
+		return false;
+	}
+};
+
+tinyMCE.addPlugin("searchreplace", TinyMCE_SearchReplacePlugin);

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/searchreplace/images/replace.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/searchreplace/images/replace.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/searchreplace/images/search.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/searchreplace/images/search.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/searchreplace/jscripts/replace.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/searchreplace/jscripts/replace.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/searchreplace/jscripts/replace.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,40 @@
+function init() {
+	tinyMCEPopup.resizeToInnerSize();
+
+	var formObj = document.forms[0];
+
+	formObj.searchstring.value = tinyMCE.getWindowArg("searchstring");
+	formObj.replacestring.value = tinyMCE.getWindowArg("replacestring");
+	formObj.casesensitivebox.checked = tinyMCE.getWindowArg("casesensitive");
+//	formObj.backwards[0].checked = tinyMCE.getWindowArg("backwards");
+//	formObj.backwards[1].checked = !tinyMCE.getWindowArg("backwards");
+//		formObj.wrapatend.checked = tinyMCE.getWindowArg("wrap");
+//		formObj.wholeword.checked = tinyMCE.getWindowArg("wholeword");
+
+	tinyMCEPopup.execCommand("mceResetSearch", false, {dummy : ""}, false);
+}
+
+function searchNext(replacemode) {
+	var formObj = document.forms[0];
+
+	// Whats the point?
+	if (formObj.searchstring.value == "" || formObj.searchstring.value == formObj.replacestring.value)
+		return;
+
+	// Do search
+	tinyMCEPopup.execCommand('mceSearch', false, { 
+		string : formObj.searchstring.value,
+		replacestring : formObj.replacestring.value,
+		replacemode : replacemode,
+		casesensitive : formObj.casesensitivebox.checked,
+		backwards : false
+//			wrap : formObj.wrapatend.checked,
+//			wholeword : formObj.wholeword.checked
+		}, false);
+
+	window.focus();
+}
+
+function cancelAction() {
+	tinyMCEPopup.close();
+}

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/searchreplace/jscripts/search.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/searchreplace/jscripts/search.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/searchreplace/jscripts/search.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,36 @@
+function init() {
+	tinyMCEPopup.resizeToInnerSize();
+
+	var formObj = document.forms[0];
+
+	formObj.searchstring.value = tinyMCE.getWindowArg("searchstring");
+	formObj.casesensitivebox.checked = tinyMCE.getWindowArg("casesensitive");
+	formObj.backwards[0].checked = tinyMCE.getWindowArg("backwards");
+	formObj.backwards[1].checked = !tinyMCE.getWindowArg("backwards");
+//		formObj.wrapatend.checked = tinyMCE.getWindowArg("wrap");
+//		formObj.wholeword.checked = tinyMCE.getWindowArg("wholeword");
+
+	tinyMCEPopup.execCommand("mceResetSearch", false, {dummy : ""}, false);
+}
+
+function searchNext() {
+	var formObj = document.forms[0];
+
+	if (formObj.searchstring.value == "")
+		return;
+
+	// Do search
+	tinyMCEPopup.execCommand('mceSearch', false, { 
+		string : formObj.searchstring.value,
+		casesensitive : formObj.casesensitivebox.checked,
+		backwards : formObj.backwards[0].checked
+//			wrap : formObj.wrapatend.checked,
+//			wholeword : formObj.wholeword.checked
+		}, false);
+
+	window.focus();
+}
+
+function cancelAction() {
+	tinyMCEPopup.close();
+}

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/searchreplace/langs/en.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/searchreplace/langs/en.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/searchreplace/langs/en.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,21 @@
+// UK lang variables
+
+tinyMCE.addToLang('',{
+searchreplace_search_desc : 'Find',
+searchreplace_searchnext_desc : 'Find again',
+searchreplace_replace_desc : 'Find/Replace',
+searchreplace_notfound : 'The search has been completed. The search string could not be found.',
+searchreplace_search_title : 'Find',
+searchreplace_replace_title : 'Find/Replace',
+searchreplace_allreplaced : 'All occurrences of the search string were replaced.',
+searchreplace_findwhat : 'Find what',
+searchreplace_replacewith : 'Replace with',
+searchreplace_direction : 'Direction',
+searchreplace_up : 'Up',
+searchreplace_down : 'Down',
+searchreplace_case : 'Match case',
+searchreplace_findnext : 'Find&nbsp;next',
+searchreplace_replace : 'Replace',
+searchreplace_replaceall : 'Replace&nbsp;all',
+searchreplace_cancel : 'Cancel'
+});

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/searchreplace/readme.txt
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/searchreplace/readme.txt	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/searchreplace/readme.txt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1 @@
+Check the TinyMCE documentation for details on this plugin.

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/searchreplace/replace.htm
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/searchreplace/replace.htm	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/searchreplace/replace.htm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,49 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+	<title>{$lang_searchreplace_replace_title}</title>
+	<script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
+	<script language="javascript" type="text/javascript" src="jscripts/replace.js"></script>
+	<base target="_self" />
+</head>
+<body onload="tinyMCEPopup.executeOnLoad('init();');" style="display: none; margin: 4px;">
+<form onsubmit="searchNext('none');return false;" action="#">
+  <table border="0" cellspacing="0" cellpadding="2">
+	  <tr>
+		<td><label for="searchstring">{$lang_searchreplace_findwhat}</label></td>
+		<td><input type="text" id="searchstring" name="searchstring" style="width: 200px" /></td>
+	  </tr>
+	  <tr>
+		<td><label for="replacestring">{$lang_searchreplace_replacewith}</label></td>
+		<td><input type="text" id="replacestring" name="replacestring" style="width: 200px" /></td>
+	  </tr>
+        <tr>
+          <td colspan="2"><!--<table border="0" cellspacing="0" cellpadding="0">
+            <tr>
+              <td><label>{$lang_searchreplace_direction}</label></td>
+              <td><input id="backwardsu" name="backwards" class="radio" type="radio" value="true" /></td>
+              <td><label for="backwardsu">{$lang_searchreplace_up}</label></td>
+              <td><input id="backwardsd" name="backwards" class="radio" type="radio" value="false" /></td>
+              <td><label for="backwardsd">{$lang_searchreplace_down}</label></td>
+            </tr>
+          </table>--></td>
+        </tr>
+        <tr>
+<td colspan="2"><table border="0" cellspacing="0" cellpadding="0">
+  <tr>
+    <td><input id="casesensitivebox" name="casesensitivebox" class="checkbox" type="checkbox" value="true" /></td>
+    <td><label for="casesensitivebox">{$lang_searchreplace_case}</label></td>
+  </tr>
+</table></td>
+</tr>
+      </table>
+  <table border="0" width="300" cellspacing="0" cellpadding="4">
+    <tr>
+      <td><input id="insertBtn" name="insertBtn" type="button" value="{$lang_searchreplace_findnext}" onclick="searchNext('none');" /></td>
+      <td><input name="replaceBtn" type="button" id="replaceBtn" value="{$lang_searchreplace_replace}" onclick="searchNext('current');" /></td>
+      <td><input name="replaceBtn" type="button" id="replaceAllBtn" value="{$lang_searchreplace_replaceall}" onclick="searchNext('all');" /></td>
+     <td align="right"><input name="cancelBtn" type="button" id="cancelBtn" value="{$lang_searchreplace_cancel}" onclick="cancelAction();" /></td>
+    </tr>
+  </table>
+</form>
+</body>
+</html>

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/searchreplace/search.htm
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/searchreplace/search.htm	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/searchreplace/search.htm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,42 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+	<title>{$lang_searchreplace_search_title}</title>
+	<script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
+	<script language="javascript" type="text/javascript" src="jscripts/search.js"></script>
+	<base target="_self" />
+</head>
+<body onload="tinyMCEPopup.executeOnLoad('init();');" style="display: none; margin: 4px;">
+<form onsubmit="searchNext();return false;" action="#">
+  <table border="0" cellspacing="0" cellpadding="2">
+        <tr>
+          <td><label for="searchstring">{$lang_searchreplace_findwhat}</label>&nbsp;<input type="text" id="searchstring" name="searchstring" style="width: 200px" /></td>
+        </tr>
+        <tr>
+          <td><table border="0" cellspacing="0" cellpadding="0">
+            <tr>
+              <td><label>{$lang_searchreplace_direction}</label></td>
+              <td><input id="backwardsu" name="backwards" class="radio" type="radio" value="true" /></td>
+              <td><label for="backwardsu">{$lang_searchreplace_up}</label></td>
+              <td><input id="backwardsd" name="backwards" class="radio" type="radio" value="false" /></td>
+              <td><label for="backwardsd">{$lang_searchreplace_down}</label></td>
+            </tr>
+          </table></td>
+        </tr>
+        <tr>
+<td><table border="0" cellspacing="0" cellpadding="0">
+  <tr>
+    <td><input id="casesensitivebox" name="casesensitivebox" class="checkbox" type="checkbox" value="true" /></td>
+    <td><label for="casesensitivebox">{$lang_searchreplace_case}</label></td>
+  </tr>
+</table></td>
+</tr>
+      </table>
+  <table border="0" width="300" cellspacing="0" cellpadding="4">
+    <tr>
+      <td><input id="insert" name="insert" type="submit" value="{$lang_searchreplace_findnext}" /></td>
+      <td align="right"><input id="cancel" name="cancel" type="button" value="{$lang_searchreplace_cancel}" onclick="cancelAction();" /></td>
+    </tr>
+  </table>
+</form>
+</body>
+</html>

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/style/css/props.css
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/style/css/props.css	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/style/css/props.css	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,63 @@
+#text_font {
+	width: 250px;
+}
+
+#text_size {
+	width: 70px;
+}
+
+.mceAddSelectValue {
+	background-color: #DDDDDD;
+}
+
+select, #block_text_indent, #box_width, #box_height, #box_padding_top, #box_padding_right, #box_padding_bottom, #box_padding_left {
+	width: 70px;
+}
+
+#box_margin_top, #box_margin_right, #box_margin_bottom, #box_margin_left, #positioning_width, #positioning_height, #positioning_zindex {
+	width: 70px;
+}
+
+#positioning_placement_top, #positioning_placement_right, #positioning_placement_bottom, #positioning_placement_left {
+	width: 70px;
+}
+
+#positioning_clip_top, #positioning_clip_right, #positioning_clip_bottom, #positioning_clip_left {
+	width: 70px;
+}
+
+.panel_wrapper div.current {
+	padding-top: 10px;
+	height: 230px;
+}
+
+.delim {
+	b2ackground-color: #DDDDDD;
+	border-left: 1px solid gray;
+}
+
+.tdelim {
+	border-bottom: 1px solid gray;	
+}
+
+#block_display {
+	width: 145px;
+}
+
+#list_type {
+	width: 115px;
+}
+
+.disabled {
+	background-color: #EEEEEE;
+}
+
+#apply {
+	font-weight: bold;
+	width: 78px;
+	height: 21px;
+	border: 0;
+	background-image: url('../images/apply_button_bg.gif');
+	cursor: pointer;
+}
+

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/style/editor_plugin.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/style/editor_plugin.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/style/editor_plugin.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1 @@
+tinyMCE.importPluginLanguagePack('style','en');var TinyMCE_StylePlugin={getInfo:function(){return{longname:'Style',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_style.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};},getControlHTML:function(cn){switch(cn){case"styleprops":return tinyMCE.getButtonHTML(cn,'lang_style_styleinfo_desc','{$pluginurl}/images/style_info.gif','mceStyleProps',true);}return"";},execCommand:function(editor_id,element,command,user_interface,value){var e,inst;switch(command){case"mceStyleProps":TinyMCE_StylePlugin._styleProps();return true;case"mceSetElementStyle":inst=tinyMCE.getInstanceById(editor_id);e=inst.selection.getFocusElement();if(e){e.style.cssText=value;inst.repaint();}return true;}return false;},handleNodeChange:function(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){},_styleProps:function(){var e=tinyMCE.selectedInstance.selection.getFocusElement();if(!e)return;tinyMCE.openWindow({file:'../../plugins/style/props.htm',width:480+tinyMCE.getLang('lang_style_props_delta_width',0),height:320+tinyMCE.getLang('lang_style_props_delta_height',0)},{editor_id:tinyMCE.selectedInstance.editorId,inline:"yes",style_text:e.style.cssText});}};tinyMCE.addPlugin("style",TinyMCE_StylePlugin);
\ No newline at end of file

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/style/editor_plugin_src.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/style/editor_plugin_src.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/style/editor_plugin_src.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,81 @@
+/**
+ * $RCSfile: editor_plugin_src.js,v $
+ * $Revision: 1.1 $
+ * $Date: 2006/05/03 10:46:42 $
+ *
+ * @author Moxiecode
+ * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
+ */
+
+/* Import plugin specific language pack */
+tinyMCE.importPluginLanguagePack('style', 'en');
+
+var TinyMCE_StylePlugin = {
+	getInfo : function() {
+		return {
+			longname : 'Style',
+			author : 'Moxiecode Systems',
+			authorurl : 'http://tinymce.moxiecode.com',
+			infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_style.html',
+			version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
+		};
+	},
+
+	getControlHTML : function(cn) {
+		switch (cn) {
+			case "styleprops":
+				return tinyMCE.getButtonHTML(cn, 'lang_style_styleinfo_desc', '{$pluginurl}/images/style_info.gif', 'mceStyleProps', true);
+		}
+
+		return "";
+	},
+
+	execCommand : function(editor_id, element, command, user_interface, value) {
+		var e, inst;
+
+		// Handle commands
+		switch (command) {
+			case "mceStyleProps":
+				TinyMCE_StylePlugin._styleProps();
+				return true;
+
+			case "mceSetElementStyle":
+				inst = tinyMCE.getInstanceById(editor_id);
+				e = inst.selection.getFocusElement();
+
+				if (e) {
+					e.style.cssText = value;
+					inst.repaint();
+				}
+
+				return true;
+		}
+
+		// Pass to next handler in chain
+		return false;
+	},
+
+	handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {
+	},
+
+	// Private plugin specific methods
+
+	_styleProps : function() {
+		var e = tinyMCE.selectedInstance.selection.getFocusElement();
+
+		if (!e)
+			return;
+
+		tinyMCE.openWindow({
+			file : '../../plugins/style/props.htm',
+			width : 480 + tinyMCE.getLang('lang_style_props_delta_width', 0),
+			height : 320 + tinyMCE.getLang('lang_style_props_delta_height', 0)
+		}, {
+			editor_id : tinyMCE.selectedInstance.editorId,
+			inline : "yes",
+			style_text : e.style.cssText
+		});
+	}
+};
+
+tinyMCE.addPlugin("style", TinyMCE_StylePlugin);

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/style/images/apply_button_bg.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/style/images/apply_button_bg.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/style/images/style_info.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/style/images/style_info.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/style/jscripts/props.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/style/jscripts/props.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/style/jscripts/props.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,630 @@
+var defaultFonts = "" + 
+	"Arial, Helvetica, sans-serif=Arial, Helvetica, sans-serif;" + 
+	"Times New Roman, Times, serif=Times New Roman, Times, serif;" + 
+	"Courier New, Courier, mono=Courier New, Courier, mono;" + 
+	"Times New Roman, Times, serif=Times New Roman, Times, serif;" + 
+	"Georgia, Times New Roman, Times, serif=Georgia, Times New Roman, Times, serif;" + 
+	"Verdana, Arial, Helvetica, sans-serif=Verdana, Arial, Helvetica, sans-serif;" + 
+	"Geneva, Arial, Helvetica, sans-serif=Geneva, Arial, Helvetica, sans-serif";
+
+var defaultSizes = "9;10;12;14;16;18;24;xx-small;x-small;small;medium;large;x-large;xx-large;smaller;larger";
+var defaultMeasurement = "+pixels=px;points=pt;in;cm;mm;picas;ems;exs;%";
+var defaultSpacingMeasurement = "pixels=px;points=pt;in;cm;mm;picas;+ems;exs;%";
+var defaultIndentMeasurement = "pixels=px;+points=pt;in;cm;mm;picas;ems;exs;%";
+var defaultWeight = "normal;bold;bolder;lighter;100;200;300;400;500;600;700;800;900";
+var defaultTextStyle = "normal;italic;oblique";
+var defaultVariant = "normal;small-caps";
+var defaultLineHeight = "normal";
+var defaultAttachment = "fixed;scroll";
+var defaultRepeat = "no-repeat;repeat;repeat-x;repeat-y";
+var defaultPosH = "left;center;right";
+var defaultPosV = "top;center;bottom";
+var defaultVAlign = "baseline;sub;super;top;text-top;middle;bottom;text-bottom";
+var defaultDisplay = "inline;block;list-item;run-in;compact;marker;table;inline-table;table-row-group;table-header-group;table-footer-group;table-row;table-column-group;table-column;table-cell;table-caption;none";
+var defaultBorderStyle = "none;solid;dashed;dotted;double;groove;ridge;inset;outset";
+var defaultBorderWidth = "thin;medium;thick";
+var defaultListType = "disc;circle;square;decimal;lower-roman;upper-roman;lower-alpha;upper-alpha;none";
+
+function init() {
+	var ce = document.getElementById('container');
+
+	ce.style.cssText = tinyMCEPopup.getWindowArg('style_text');
+
+	tinyMCEPopup.resizeToInnerSize();
+
+	document.getElementById('text_color_pickcontainer').innerHTML = getColorPickerHTML('text_color_pick','text_color');
+	document.getElementById('background_color_pickcontainer').innerHTML = getColorPickerHTML('background_color_pick','background_color');
+	document.getElementById('border_color_top_pickcontainer').innerHTML = getColorPickerHTML('border_color_top_pick','border_color_top');
+	document.getElementById('border_color_right_pickcontainer').innerHTML = getColorPickerHTML('border_color_right_pick','border_color_right');
+	document.getElementById('border_color_bottom_pickcontainer').innerHTML = getColorPickerHTML('border_color_bottom_pick','border_color_bottom');
+	document.getElementById('border_color_left_pickcontainer').innerHTML = getColorPickerHTML('border_color_left_pick','border_color_left');
+
+	fillSelect(0, 'text_font', 'style_font', defaultFonts, ';', true);
+	fillSelect(0, 'text_size', 'style_font_size', defaultSizes, ';', true);
+	fillSelect(0, 'text_size_measurement', 'style_font_size_measurement', defaultMeasurement, ';', true);
+	fillSelect(0, 'text_case', 'style_text_case', "capitalize;uppercase;lowercase", ';', true);
+	fillSelect(0, 'text_weight', 'style_font_weight', defaultWeight, ';', true);
+	fillSelect(0, 'text_style', 'style_font_style', defaultTextStyle, ';', true);
+	fillSelect(0, 'text_variant', 'style_font_variant', defaultVariant, ';', true);
+	fillSelect(0, 'text_lineheight', 'style_font_line_height', defaultLineHeight, ';', true);
+	fillSelect(0, 'text_lineheight_measurement', 'style_font_line_height_measurement', defaultMeasurement, ';', true);
+
+	fillSelect(0, 'background_attachment', 'style_background_attachment', defaultAttachment, ';', true);
+	fillSelect(0, 'background_repeat', 'style_background_repeat', defaultRepeat, ';', true);
+
+	fillSelect(0, 'background_hpos_measurement', 'style_background_hpos_measurement', defaultMeasurement, ';', true);
+	fillSelect(0, 'background_vpos_measurement', 'style_background_vpos_measurement', defaultMeasurement, ';', true);
+
+	fillSelect(0, 'background_hpos', 'style_background_hpos', defaultPosH, ';', true);
+	fillSelect(0, 'background_vpos', 'style_background_vpos', defaultPosV, ';', true);
+
+	fillSelect(0, 'block_wordspacing', 'style_wordspacing', 'normal', ';', true);
+	fillSelect(0, 'block_wordspacing_measurement', 'style_wordspacing_measurement', defaultSpacingMeasurement, ';', true);
+	fillSelect(0, 'block_letterspacing', 'style_letterspacing', 'normal', ';', true);
+	fillSelect(0, 'block_letterspacing_measurement', 'style_letterspacing_measurement', defaultSpacingMeasurement, ';', true);
+	fillSelect(0, 'block_vertical_alignment', 'style_vertical_alignment', defaultVAlign, ';', true);
+	fillSelect(0, 'block_text_align', 'style_text_align', "left;right;center;justify", ';', true);
+	fillSelect(0, 'block_whitespace', 'style_whitespace', "normal;pre;nowrap", ';', true);
+	fillSelect(0, 'block_display', 'style_display', defaultDisplay, ';', true);
+	fillSelect(0, 'block_text_indent_measurement', 'style_text_indent_measurement', defaultIndentMeasurement, ';', true);
+
+	fillSelect(0, 'box_width_measurement', 'style_box_width_measurement', defaultMeasurement, ';', true);
+	fillSelect(0, 'box_height_measurement', 'style_box_height_measurement', defaultMeasurement, ';', true);
+	fillSelect(0, 'box_float', 'style_float', 'left;right;none', ';', true);
+	fillSelect(0, 'box_clear', 'style_clear', 'left;right;both;none', ';', true);
+	fillSelect(0, 'box_padding_left_measurement', 'style_padding_left_measurement', defaultMeasurement, ';', true);
+	fillSelect(0, 'box_padding_top_measurement', 'style_padding_top_measurement', defaultMeasurement, ';', true);
+	fillSelect(0, 'box_padding_bottom_measurement', 'style_padding_bottom_measurement', defaultMeasurement, ';', true);
+	fillSelect(0, 'box_padding_right_measurement', 'style_padding_right_measurement', defaultMeasurement, ';', true);
+	fillSelect(0, 'box_margin_left_measurement', 'style_margin_left_measurement', defaultMeasurement, ';', true);
+	fillSelect(0, 'box_margin_top_measurement', 'style_margin_top_measurement', defaultMeasurement, ';', true);
+	fillSelect(0, 'box_margin_bottom_measurement', 'style_margin_bottom_measurement', defaultMeasurement, ';', true);
+	fillSelect(0, 'box_margin_right_measurement', 'style_margin_right_measurement', defaultMeasurement, ';', true);
+
+	fillSelect(0, 'border_style_top', 'style_border_style_top', defaultBorderStyle, ';', true);
+	fillSelect(0, 'border_style_right', 'style_border_style_right', defaultBorderStyle, ';', true);
+	fillSelect(0, 'border_style_bottom', 'style_border_style_bottom', defaultBorderStyle, ';', true);
+	fillSelect(0, 'border_style_left', 'style_border_style_left', defaultBorderStyle, ';', true);
+
+	fillSelect(0, 'border_width_top', 'style_border_width_top', defaultBorderWidth, ';', true);
+	fillSelect(0, 'border_width_right', 'style_border_width_right', defaultBorderWidth, ';', true);
+	fillSelect(0, 'border_width_bottom', 'style_border_width_bottom', defaultBorderWidth, ';', true);
+	fillSelect(0, 'border_width_left', 'style_border_width_left', defaultBorderWidth, ';', true);
+
+	fillSelect(0, 'border_width_top_measurement', 'style_border_width_top_measurement', defaultMeasurement, ';', true);
+	fillSelect(0, 'border_width_right_measurement', 'style_border_width_right_measurement', defaultMeasurement, ';', true);
+	fillSelect(0, 'border_width_bottom_measurement', 'style_border_width_bottom_measurement', defaultMeasurement, ';', true);
+	fillSelect(0, 'border_width_left_measurement', 'style_border_width_left_measurement', defaultMeasurement, ';', true);
+
+	fillSelect(0, 'list_type', 'style_list_type', defaultListType, ';', true);
+	fillSelect(0, 'list_position', 'style_list_position', "inside;outside", ';', true);
+
+	fillSelect(0, 'positioning_type', 'style_positioning_type', "absolute;relative;static", ';', true);
+	fillSelect(0, 'positioning_visibility', 'style_positioning_visibility', "inherit;visible;hidden", ';', true);
+
+	fillSelect(0, 'positioning_width_measurement', 'style_positioning_width_measurement', defaultMeasurement, ';', true);
+	fillSelect(0, 'positioning_height_measurement', 'style_positioning_height_measurement', defaultMeasurement, ';', true);
+	fillSelect(0, 'positioning_overflow', 'style_positioning_overflow', "visible;hidden;scroll;auto", ';', true);
+
+	fillSelect(0, 'positioning_placement_top_measurement', 'style_positioning_placement_top_measurement', defaultMeasurement, ';', true);
+	fillSelect(0, 'positioning_placement_right_measurement', 'style_positioning_placement_right_measurement', defaultMeasurement, ';', true);
+	fillSelect(0, 'positioning_placement_bottom_measurement', 'style_positioning_placement_bottom_measurement', defaultMeasurement, ';', true);
+	fillSelect(0, 'positioning_placement_left_measurement', 'style_positioning_placement_left_measurement', defaultMeasurement, ';', true);
+
+	fillSelect(0, 'positioning_clip_top_measurement', 'style_positioning_clip_top_measurement', defaultMeasurement, ';', true);
+	fillSelect(0, 'positioning_clip_right_measurement', 'style_positioning_clip_right_measurement', defaultMeasurement, ';', true);
+	fillSelect(0, 'positioning_clip_bottom_measurement', 'style_positioning_clip_bottom_measurement', defaultMeasurement, ';', true);
+	fillSelect(0, 'positioning_clip_left_measurement', 'style_positioning_clip_left_measurement', defaultMeasurement, ';', true);
+
+	TinyMCE_EditableSelects.init();
+	setupFormData();
+	showDisabledControls();
+}
+
+function setupFormData() {
+	var ce = document.getElementById('container'), f = document.forms[0], s, b, i;
+
+	// Setup text fields
+
+	selectByValue(f, 'text_font', ce.style.fontFamily, true, true);
+	selectByValue(f, 'text_size', getNum(ce.style.fontSize), true, true);
+	selectByValue(f, 'text_size_measurement', getMeasurement(ce.style.fontSize));
+	selectByValue(f, 'text_weight', ce.style.fontWeight, true, true);
+	selectByValue(f, 'text_style', ce.style.fontStyle, true, true);
+	selectByValue(f, 'text_lineheight', getNum(ce.style.lineHeight), true, true);
+	selectByValue(f, 'text_lineheight_measurement', getMeasurement(ce.style.lineHeight));
+	selectByValue(f, 'text_case', ce.style.textTransform, true, true);
+	selectByValue(f, 'text_variant', ce.style.fontVariant, true, true);
+	f.text_color.value = ce.style.color;
+	updateColor('text_color_pick', 'text_color');
+	f.text_underline.checked = inStr(ce.style.textDecoration, 'underline');
+	f.text_overline.checked = inStr(ce.style.textDecoration, 'overline');
+	f.text_linethrough.checked = inStr(ce.style.textDecoration, 'line-through');
+	f.text_blink.checked = inStr(ce.style.textDecoration, 'blink');
+
+	// Setup background fields
+
+	f.background_color.value = ce.style.backgroundColor;
+	updateColor('background_color_pick', 'background_color');
+	f.background_image.value = ce.style.backgroundImage.replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");
+	selectByValue(f, 'background_repeat', ce.style.backgroundRepeat, true, true);
+	selectByValue(f, 'background_attachment', ce.style.backgroundAttachment, true, true);
+	selectByValue(f, 'background_hpos', getNum(getVal(ce.style.backgroundPosition, 0)), true, true);
+	selectByValue(f, 'background_hpos_measurement', getMeasurement(getVal(ce.style.backgroundPosition, 0)));
+	selectByValue(f, 'background_vpos', getNum(getVal(ce.style.backgroundPosition, 1)), true, true);
+	selectByValue(f, 'background_vpos_measurement', getMeasurement(getVal(ce.style.backgroundPosition, 1)));
+
+	// Setup block fields
+
+	selectByValue(f, 'block_wordspacing', getNum(ce.style.wordSpacing), true, true);
+	selectByValue(f, 'block_wordspacing_measurement', getMeasurement(ce.style.wordSpacing));
+	selectByValue(f, 'block_letterspacing', getNum(ce.style.letterSpacing), true, true);
+	selectByValue(f, 'block_letterspacing_measurement', getMeasurement(ce.style.letterSpacing));
+	selectByValue(f, 'block_vertical_alignment', ce.style.verticalAlign, true, true);
+	selectByValue(f, 'block_text_align', ce.style.textAlign, true, true);
+	f.block_text_indent.value = getNum(ce.style.textIndent);
+	selectByValue(f, 'block_text_indent_measurement', getMeasurement(ce.style.textIndent));
+	selectByValue(f, 'block_whitespace', ce.style.whiteSpace, true, true);
+	selectByValue(f, 'block_display', ce.style.display, true, true);
+
+	// Setup box fields
+
+	f.box_width.value = getNum(ce.style.width);
+	selectByValue(f, 'box_width_measurement', getMeasurement(ce.style.width));
+
+	f.box_height.value = getNum(ce.style.height);
+	selectByValue(f, 'box_height_measurement', getMeasurement(ce.style.height));
+
+	if (tinyMCE.isGecko)
+		selectByValue(f, 'box_float', ce.style.cssFloat, true, true);
+	else
+		selectByValue(f, 'box_float', ce.style.styleFloat, true, true);
+
+	selectByValue(f, 'box_clear', ce.style.clear, true, true);
+
+	setupBox(f, ce, 'box_padding', 'padding', '');
+	setupBox(f, ce, 'box_margin', 'margin', '');
+
+	// Setup border fields
+
+	setupBox(f, ce, 'border_style', 'border', 'Style');
+	setupBox(f, ce, 'border_width', 'border', 'Width');
+	setupBox(f, ce, 'border_color', 'border', 'Color');
+
+	updateColor('border_color_top_pick', 'border_color_top');
+	updateColor('border_color_right_pick', 'border_color_right');
+	updateColor('border_color_bottom_pick', 'border_color_bottom');
+	updateColor('border_color_left_pick', 'border_color_left');
+
+	// Setup list fields
+
+	selectByValue(f, 'list_type', ce.style.listStyleType, true, true);
+	selectByValue(f, 'list_position', ce.style.listStylePosition, true, true);
+	f.list_bullet_image.value = ce.style.listStyleImage.replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");
+
+	// Setup box fields
+
+	selectByValue(f, 'positioning_type', ce.style.position, true, true);
+	selectByValue(f, 'positioning_visibility', ce.style.visibility, true, true);
+	selectByValue(f, 'positioning_overflow', ce.style.overflow, true, true);
+	f.positioning_zindex.value = ce.style.zIndex ? ce.style.zIndex : "";
+
+	f.positioning_width.value = getNum(ce.style.width);
+	selectByValue(f, 'positioning_width_measurement', getMeasurement(ce.style.width));
+
+	f.positioning_height.value = getNum(ce.style.height);
+	selectByValue(f, 'positioning_height_measurement', getMeasurement(ce.style.height));
+
+	setupBox(f, ce, 'positioning_placement', '', '', new Array('top', 'right', 'bottom', 'left'));
+
+	s = ce.style.clip.replace(new RegExp("rect\\('?([^']*)'?\\)", 'gi'), "$1");
+	s = s.replace(/,/g, ' ');
+
+	if (!hasEqualValues(new Array(getVal(s, 0), getVal(s, 1), getVal(s, 2), getVal(s, 3)))) {
+		f.positioning_clip_top.value = getNum(getVal(s, 0));
+		selectByValue(f, 'positioning_clip_top_measurement', getMeasurement(getVal(s, 0)));
+		f.positioning_clip_right.value = getNum(getVal(s, 1));
+		selectByValue(f, 'positioning_clip_right_measurement', getMeasurement(getVal(s, 1)));
+		f.positioning_clip_bottom.value = getNum(getVal(s, 2));
+		selectByValue(f, 'positioning_clip_bottom_measurement', getMeasurement(getVal(s, 2)));
+		f.positioning_clip_left.value = getNum(getVal(s, 3));
+		selectByValue(f, 'positioning_clip_left_measurement', getMeasurement(getVal(s, 3)));
+	} else {
+		f.positioning_clip_top.value = getNum(getVal(s, 0));
+		selectByValue(f, 'positioning_clip_top_measurement', getMeasurement(getVal(s, 0)));
+		f.positioning_clip_right.value = f.positioning_clip_bottom.value = f.positioning_clip_left.value;
+	}
+
+//	setupBox(f, ce, '', 'border', 'Color');
+}
+
+function getMeasurement(s) {
+	return s.replace(/^([0-9]+)(.*)$/, "$2");
+}
+
+function getNum(s) {
+	if (new RegExp('^[0-9]+[a-z%]+$', 'gi').test(s))
+		return s.replace(/[^0-9]/g, '');
+
+	return s;
+}
+
+function inStr(s, n) {
+	return new RegExp(n, 'gi').test(s);
+}
+
+function getVal(s, i) {
+	var a = tinyMCE.explode(' ', s);
+
+	if (a.length > 1)
+		return a[i];
+
+	return "";
+}
+
+function setValue(f, n, v) {
+	if (f.elements[n].type == "text")
+		f.elements[n].value = v;
+	else
+		selectByValue(f, n, v, true, true);
+}
+
+function setupBox(f, ce, fp, pr, sf, b) {
+	if (typeof(b) == "undefined")
+		b = new Array('Top', 'Right', 'Bottom', 'Left');
+
+	if (isSame(ce, pr, sf, b)) {
+		f.elements[fp + "_same"].checked = true;
+
+		setValue(f, fp + "_top", getNum(ce.style[pr + b[0] + sf]));
+		f.elements[fp + "_top"].disabled = false;
+
+		f.elements[fp + "_right"].value = "";
+		f.elements[fp + "_right"].disabled = true;
+		f.elements[fp + "_bottom"].value = "";
+		f.elements[fp + "_bottom"].disabled = true;
+		f.elements[fp + "_left"].value = "";
+		f.elements[fp + "_left"].disabled = true;
+
+		if (f.elements[fp + "_top_measurement"]) {
+			selectByValue(f, fp + '_top_measurement', getMeasurement(ce.style[pr + b[0] + sf]));
+			f.elements[fp + "_left_measurement"].disabled = true;
+			f.elements[fp + "_bottom_measurement"].disabled = true;
+			f.elements[fp + "_right_measurement"].disabled = true;
+		}
+	} else {
+		f.elements[fp + "_same"].checked = false;
+
+		setValue(f, fp + "_top", getNum(ce.style[pr + b[0] + sf]));
+		f.elements[fp + "_top"].disabled = false;
+
+		setValue(f, fp + "_right", getNum(ce.style[pr + b[1] + sf]));
+		f.elements[fp + "_right"].disabled = false;
+
+		setValue(f, fp + "_bottom", getNum(ce.style[pr + b[2] + sf]));
+		f.elements[fp + "_bottom"].disabled = false;
+
+		setValue(f, fp + "_left", getNum(ce.style[pr + b[3] + sf]));
+		f.elements[fp + "_left"].disabled = false;
+
+		if (f.elements[fp + "_top_measurement"]) {
+			selectByValue(f, fp + '_top_measurement', getMeasurement(ce.style[pr + b[0] + sf]));
+			selectByValue(f, fp + '_right_measurement', getMeasurement(ce.style[pr + b[1] + sf]));
+			selectByValue(f, fp + '_bottom_measurement', getMeasurement(ce.style[pr + b[2] + sf]));
+			selectByValue(f, fp + '_left_measurement', getMeasurement(ce.style[pr + b[3] + sf]));
+			f.elements[fp + "_left_measurement"].disabled = false;
+			f.elements[fp + "_bottom_measurement"].disabled = false;
+			f.elements[fp + "_right_measurement"].disabled = false;
+		}
+	}
+}
+
+function isSame(e, pr, sf, b) {
+	var a = new Array(), i, x;
+
+	if (typeof(b) == "undefined")
+		b = new Array('Top', 'Right', 'Bottom', 'Left');
+
+	if (typeof(sf) == "undefined" || sf == null)
+		sf = "";
+
+	a[0] = e.style[pr + b[0] + sf];
+	a[1] = e.style[pr + b[1] + sf];
+	a[2] = e.style[pr + b[2] + sf];
+	a[3] = e.style[pr + b[3] + sf];
+
+	for (i=0; i<a.length; i++) {
+		if (a[i] == null)
+			return false;
+
+		for (x=0; x<a.length; x++) {
+			if (a[x] != a[i])
+				return false;
+		}
+	}
+
+	return true;
+};
+
+function hasEqualValues(a) {
+	var i, x;
+
+	for (i=0; i<a.length; i++) {
+		if (a[i] == null)
+			return false;
+
+		for (x=0; x<a.length; x++) {
+			if (a[x] != a[i])
+				return false;
+		}
+	}
+
+	return true;
+}
+
+function applyAction() {
+	var ce = document.getElementById('container');
+
+	generateCSS();
+
+	tinyMCEPopup.execCommand('mceSetElementStyle', false, tinyMCE.serializeStyle(tinyMCE.parseStyle(ce.style.cssText)));
+}
+
+function updateAction() {
+	applyAction();
+	tinyMCEPopup.close();
+}
+
+function generateCSS() {
+	var ce = document.getElementById('container'), f = document.forms[0], num = new RegExp('[0-9]+', 'g'), s, t;
+
+	ce.style.cssText = "";
+
+	// Build text styles
+	ce.style.fontFamily = f.text_font.value;
+	ce.style.fontSize = f.text_size.value + (isNum(f.text_size.value) ? f.text_size_measurement.value : "");
+	ce.style.fontStyle = f.text_style.value;
+	ce.style.lineHeight = f.text_lineheight.value + (isNum(f.text_lineheight.value) ? f.text_lineheight_measurement.value : "");
+	ce.style.textTransform = f.text_case.value;
+	ce.style.fontWeight = f.text_weight.value;
+	ce.style.fontVariant = f.text_variant.value;
+	ce.style.color = f.text_color.value;
+
+	s = "";
+	s += f.text_underline.checked ? " underline" : "";
+	s += f.text_overline.checked ? " overline" : "";
+	s += f.text_linethrough.checked ? " line-through" : "";
+	s += f.text_blink.checked ? " blink" : "";
+	s = s.length > 0 ? s.substring(1) : s;
+
+	if (f.text_none.checked)
+		s = "none";
+
+	ce.style.textDecoration = s;
+
+	// Build background styles
+
+	ce.style.backgroundColor = f.background_color.value;
+	ce.style.backgroundImage = f.background_image.value != "" ? "url(" + f.background_image.value + ")" : "";
+	ce.style.backgroundRepeat = f.background_repeat.value;
+	ce.style.backgroundAttachment = f.background_attachment.value;
+
+	if (f.background_hpos.value != "") {
+		s = "";
+		s += f.background_hpos.value + (isNum(f.background_hpos.value) ? f.background_hpos_measurement.value : "") + " ";
+		s += f.background_vpos.value + (isNum(f.background_vpos.value) ? f.background_vpos_measurement.value : "");
+		ce.style.backgroundPosition = s;
+	}
+
+	// Build block styles
+
+	ce.style.wordSpacing = f.block_wordspacing.value + (isNum(f.block_wordspacing.value) ? f.block_wordspacing_measurement.value : "");
+	ce.style.letterSpacing = f.block_letterspacing.value + (isNum(f.block_letterspacing.value) ? f.block_letterspacing_measurement.value : "");
+	ce.style.verticalAlign = f.block_vertical_alignment.value;
+	ce.style.textAlign = f.block_text_align.value;
+	ce.style.textIndent = f.block_text_indent.value + (isNum(f.block_text_indent.value) ? f.block_text_indent_measurement.value : "");
+	ce.style.whiteSpace = f.block_whitespace.value;
+	ce.style.display = f.block_display.value;
+
+	// Build box styles
+
+	ce.style.width = f.box_width.value + (isNum(f.box_width.value) ? f.box_width_measurement.value : "");
+	ce.style.height = f.box_height.value + (isNum(f.box_height.value) ? f.box_height_measurement.value : "");
+	ce.style.styleFloat = f.box_float.value;
+
+	if (tinyMCE.isGecko)
+		ce.style.cssFloat = f.box_float.value;
+
+	ce.style.clear = f.box_clear.value;
+
+	if (!f.box_padding_same.checked) {
+		ce.style.paddingTop = f.box_padding_top.value + (isNum(f.box_padding_top.value) ? f.box_padding_top_measurement.value : "");
+		ce.style.paddingRight = f.box_padding_right.value + (isNum(f.box_padding_right.value) ? f.box_padding_right_measurement.value : "");
+		ce.style.paddingBottom = f.box_padding_bottom.value + (isNum(f.box_padding_bottom.value) ? f.box_padding_bottom_measurement.value : "");
+		ce.style.paddingLeft = f.box_padding_left.value + (isNum(f.box_padding_left.value) ? f.box_padding_left_measurement.value : "");
+	} else
+		ce.style.padding = f.box_padding_top.value + (isNum(f.box_padding_top.value) ? f.box_padding_top_measurement.value : "");		
+
+	if (!f.box_margin_same.checked) {
+		ce.style.marginTop = f.box_margin_top.value + (isNum(f.box_margin_top.value) ? f.box_margin_top_measurement.value : "");
+		ce.style.marginRight = f.box_margin_right.value + (isNum(f.box_margin_right.value) ? f.box_margin_right_measurement.value : "");
+		ce.style.marginBottom = f.box_margin_bottom.value + (isNum(f.box_margin_bottom.value) ? f.box_margin_bottom_measurement.value : "");
+		ce.style.marginLeft = f.box_margin_left.value + (isNum(f.box_margin_left.value) ? f.box_margin_left_measurement.value : "");
+	} else
+		ce.style.margin = f.box_margin_top.value + (isNum(f.box_margin_top.value) ? f.box_margin_top_measurement.value : "");		
+
+	// Build border styles
+
+	if (!f.border_style_same.checked) {
+		ce.style.borderTopStyle = f.border_style_top.value;
+		ce.style.borderRightStyle = f.border_style_right.value;
+		ce.style.borderBottomStyle = f.border_style_bottom.value;
+		ce.style.borderLeftStyle = f.border_style_left.value;
+	} else
+		ce.style.borderStyle = f.border_style_top.value;
+
+	if (!f.border_width_same.checked) {
+		ce.style.borderTopWidth = f.border_width_top.value + (isNum(f.border_width_top.value) ? f.border_width_top_measurement.value : "");
+		ce.style.borderRightWidth = f.border_width_right.value + (isNum(f.border_width_right.value) ? f.border_width_right_measurement.value : "");
+		ce.style.borderBottomWidth = f.border_width_bottom.value + (isNum(f.border_width_bottom.value) ? f.border_width_bottom_measurement.value : "");
+		ce.style.borderLeftWidth = f.border_width_left.value + (isNum(f.border_width_left.value) ? f.border_width_left_measurement.value : "");
+	} else
+		ce.style.borderWidth = f.border_width_top.value;
+
+	if (!f.border_color_same.checked) {
+		ce.style.borderTopColor = f.border_color_top.value;
+		ce.style.borderRightColor = f.border_color_right.value;
+		ce.style.borderBottomColor = f.border_color_bottom.value;
+		ce.style.borderLeftColor = f.border_color_left.value;
+	} else
+		ce.style.borderColor = f.border_color_top.value;
+
+	// Build list styles
+
+	ce.style.listStyleType = f.list_type.value;
+	ce.style.listStylePosition = f.list_position.value;
+	ce.style.listStyleImage = f.list_bullet_image.value != "" ? "url(" + f.list_bullet_image.value + ")" : "";
+
+	// Build positioning styles
+
+	ce.style.position = f.positioning_type.value;
+	ce.style.visibility = f.positioning_visibility.value;
+
+	if (ce.style.width == "")
+		ce.style.width = f.positioning_width.value + (isNum(f.positioning_width.value) ? f.positioning_width_measurement.value : "");
+
+	if (ce.style.height == "")
+		ce.style.height = f.positioning_height.value + (isNum(f.positioning_height.value) ? f.positioning_height_measurement.value : "");
+
+	ce.style.zIndex = f.positioning_zindex.value;
+	ce.style.overflow = f.positioning_overflow.value;
+
+	if (!f.positioning_placement_same.checked) {
+		ce.style.top = f.positioning_placement_top.value + (isNum(f.positioning_placement_top.value) ? f.positioning_placement_top_measurement.value : "");
+		ce.style.right = f.positioning_placement_right.value + (isNum(f.positioning_placement_right.value) ? f.positioning_placement_right_measurement.value : "");
+		ce.style.bottom = f.positioning_placement_bottom.value + (isNum(f.positioning_placement_bottom.value) ? f.positioning_placement_bottom_measurement.value : "");
+		ce.style.left = f.positioning_placement_left.value + (isNum(f.positioning_placement_left.value) ? f.positioning_placement_left_measurement.value : "");
+	} else {
+		s = f.positioning_placement_top.value + (isNum(f.positioning_placement_top.value) ? f.positioning_placement_top_measurement.value : "");
+		ce.style.top = s;
+		ce.style.right = s;
+		ce.style.bottom = s;
+		ce.style.left = s;
+	}
+
+	if (!f.positioning_clip_same.checked) {
+		s = "rect(";
+		s += (isNum(f.positioning_clip_top.value) ? f.positioning_clip_top.value + f.positioning_clip_top_measurement.value : "auto") + " ";
+		s += (isNum(f.positioning_clip_right.value) ? f.positioning_clip_right.value + f.positioning_clip_right_measurement.value : "auto") + " ";
+		s += (isNum(f.positioning_clip_bottom.value) ? f.positioning_clip_bottom.value + f.positioning_clip_bottom_measurement.value : "auto") + " ";
+		s += (isNum(f.positioning_clip_left.value) ? f.positioning_clip_left.value + f.positioning_clip_left_measurement.value : "auto");
+		s += ")";
+
+		if (s != "rect(auto auto auto auto)")
+			ce.style.clip = s;
+	} else {
+		s = "rect(";
+		t = isNum(f.positioning_clip_top.value) ? f.positioning_clip_top.value + f.positioning_clip_top_measurement.value : "auto";
+		s += t + " ";
+		s += t + " ";
+		s += t + " ";
+		s += t + ")";
+
+		if (s != "rect(auto auto auto auto)")
+			ce.style.clip = s;
+	}
+
+	ce.style.cssText = tinyMCE.serializeStyle(tinyMCE.parseStyle(ce.style.cssText));
+}
+
+function isNum(s) {
+	return new RegExp('[0-9]+', 'g').test(s);
+}
+
+function showDisabledControls() {
+	var f = document.forms, i, a;
+
+	for (i=0; i<f.length; i++) {
+		for (a=0; a<f[i].elements.length; a++) {
+			if (f[i].elements[a].disabled)
+				tinyMCE.addCSSClass(f[i].elements[a], "disabled");
+			else
+				tinyMCE.removeCSSClass(f[i].elements[a], "disabled");
+		}
+	}
+}
+
+function fillSelect(f, s, param, dval, sep, em) {
+	var i, ar, p, se;
+
+	f = document.forms[f];
+	sep = typeof(sep) == "undefined" ? ";" : sep;
+
+	if (em)
+		addSelectValue(f, s, "", "");
+
+	ar = tinyMCE.getParam(param, dval).split(sep);
+	for (i=0; i<ar.length; i++) {
+		se = false;
+
+		if (ar[i].charAt(0) == '+') {
+			ar[i] = ar[i].substring(1);
+			se = true;
+		}
+
+		p = ar[i].split('=');
+
+		if (p.length > 1) {
+			addSelectValue(f, s, p[0], p[1]);
+
+			if (se)
+				selectByValue(f, s, p[1]);
+		} else {
+			addSelectValue(f, s, p[0], p[0]);
+
+			if (se)
+				selectByValue(f, s, p[0]);
+		}
+	}
+}
+
+function toggleSame(ce, pre) {
+	var el = document.forms[0].elements, i;
+
+	if (ce.checked) {
+		el[pre + "_top"].disabled = false;
+		el[pre + "_right"].disabled = true;
+		el[pre + "_bottom"].disabled = true;
+		el[pre + "_left"].disabled = true;
+
+		if (el[pre + "_top_measurement"]) {
+			el[pre + "_top_measurement"].disabled = false;
+			el[pre + "_right_measurement"].disabled = true;
+			el[pre + "_bottom_measurement"].disabled = true;
+			el[pre + "_left_measurement"].disabled = true;
+		}
+	} else {
+		el[pre + "_top"].disabled = false;
+		el[pre + "_right"].disabled = false;
+		el[pre + "_bottom"].disabled = false;
+		el[pre + "_left"].disabled = false;
+
+		if (el[pre + "_top_measurement"]) {
+			el[pre + "_top_measurement"].disabled = false;
+			el[pre + "_right_measurement"].disabled = false;
+			el[pre + "_bottom_measurement"].disabled = false;
+			el[pre + "_left_measurement"].disabled = false;
+		}
+	}
+
+	showDisabledControls();
+}
+
+function synch(fr, to) {
+	var f = document.forms[0];
+
+	f.elements[to].value = f.elements[fr].value;
+
+	if (f.elements[fr + "_measurement"])
+		selectByValue(f, to + "_measurement", f.elements[fr + "_measurement"].value);
+}

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/style/langs/en.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/style/langs/en.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/style/langs/en.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,60 @@
+// UK lang variables
+
+tinyMCE.addToLang('style',{
+title : 'Edit CSS Style',
+styleinfo_desc : 'Edit CSS Style',
+text_tab : 'Text',
+background_tab : 'Background',
+block_tab : 'Block',
+box_tab : 'Box',
+border_tab : 'Border',
+list_tab : 'List',
+positioning_tab : 'Positioning',
+text_props : 'Text',
+text_font : 'Font',
+text_size : 'Size',
+text_weight : 'Weight',
+text_style : 'Style',
+text_variant : 'Variant',
+text_lineheight : 'Line height',
+text_case : 'Case',
+text_color : 'Color',
+text_decoration : 'Decoration',
+background_color : 'Background color',
+background_image : 'Background image',
+background_repeat : 'Repeat',
+background_attachment : 'Attachment',
+background_hpos : 'Horizontal position',
+background_vpos : 'Vertical position',
+block_wordspacing : 'Word spacing',
+block_letterspacing : 'Letter spacing',
+block_vertical_alignment : 'Vertical alignment',
+block_text_align : 'Text align',
+block_text_indent : 'Text indent',
+block_whitespace : 'Whitespace',
+block_display : 'Display',
+box_width : 'Width',
+box_height : 'Height',
+box_float : 'Float',
+box_clear : 'Clear',
+padding : 'Padding',
+same : 'Same for all',
+top : 'Top',
+right : 'Right',
+bottom : 'Bottom',
+left : 'Left',
+margin : 'Margin',
+style : 'Style',
+width : 'Width',
+height : 'Height',
+color : 'Color',
+list_type : 'Type',
+bullet_image : 'Bullet image',
+position : 'Position',
+positioning_type : 'Type',
+visibility : 'Visibility',
+zindex : 'Z-index',
+overflow : 'Overflow',
+placement : 'Placement',
+clip : 'Clip'
+});

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/style/props.htm
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/style/props.htm	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/style/props.htm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,580 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+	<title>{$lang_style_title}</title>
+	<script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
+	<script language="javascript" type="text/javascript" src="../../utils/mctabs.js"></script>
+	<script language="javascript" type="text/javascript" src="../../utils/editable_selects.js"></script>
+	<script language="javascript" type="text/javascript" src="../../utils/form_utils.js"></script>
+	<script language="javascript" type="text/javascript" src="jscripts/props.js"></script>
+	<link href="css/props.css" rel="stylesheet" type="text/css" />
+	<base target="_self" />
+</head>
+<body id="styleprops" onload="tinyMCEPopup.executeOnLoad('init();');" style="display: none">
+	<form onsubmit="updateAction();return false;" action="#">
+		<div class="tabs">
+			<ul>
+				<li id="text_tab" class="current"><span><a href="javascript:mcTabs.displayTab('text_tab','text_panel');" onmousedown="return false;">{$lang_style_text_tab}</a></span></li>
+				<li id="background_tab"><span><a href="javascript:mcTabs.displayTab('background_tab','background_panel');" onmousedown="return false;">{$lang_style_background_tab}</a></span></li>
+				<li id="block_tab"><span><a href="javascript:mcTabs.displayTab('block_tab','block_panel');" onmousedown="return false;">{$lang_style_block_tab}</a></span></li>
+				<li id="box_tab"><span><a href="javascript:mcTabs.displayTab('box_tab','box_panel');" onmousedown="return false;">{$lang_style_box_tab}</a></span></li>
+				<li id="border_tab"><span><a href="javascript:mcTabs.displayTab('border_tab','border_panel');" onmousedown="return false;">{$lang_style_border_tab}</a></span></li>
+				<li id="list_tab"><span><a href="javascript:mcTabs.displayTab('list_tab','list_panel');" onmousedown="return false;">{$lang_style_list_tab}</a></span></li>
+				<li id="positioning_tab"><span><a href="javascript:mcTabs.displayTab('positioning_tab','positioning_panel');" onmousedown="return false;">{$lang_style_positioning_tab}</a></span></li>
+			</ul>
+		</div>
+
+		<div class="panel_wrapper">
+			<div id="text_panel" class="panel current">
+				<table border="0" width="100%">
+					<tr>
+						<td><label for="text_font">{$lang_style_text_font}</label></td>
+						<td colspan="3">
+							<select id="text_font" name="text_font" class="mceEditableSelect" onchange="alert(this.options[this.selectedIndex].value);"></select>
+						</td>
+					</tr>
+					<tr>
+						<td><label for="text_size">{$lang_style_text_size}</label></td>
+						<td>
+							<table border="0" cellspacing="0" cellpadding="0"><tr>
+								<td><select id="text_size" name="text_size" class="mceEditableSelect"></select></td>
+								<td>&nbsp;<select id="text_size_measurement" name="text_size_measurement"></select>
+							</tr></table>
+						</td>
+						<td><label for="text_weight">{$lang_style_text_weight}</label></td>
+						<td>
+							<select id="text_weight" name="text_weight"></select>
+						</td>
+					</tr>
+					<tr>
+						<td><label for="text_style">{$lang_style_text_style}</label></td>
+						<td>
+							<select id="text_style" name="text_style" class="mceEditableSelect"></select>
+						</td>
+						<td><label for="text_variant">{$lang_style_text_variant}</label></td>
+						<td>
+							<select id="text_variant" name="text_variant"></select>
+						</td>
+					</tr>
+					<tr>
+						<td><label for="text_lineheight">{$lang_style_text_lineheight}</label></td>
+						<td>
+							<table border="0" cellspacing="0" cellpadding="0"><tr><td>
+							<select id="text_lineheight" name="text_lineheight" class="mceEditableSelect"></select>
+							</td><td>&nbsp;<select id="text_lineheight_measurement" name="text_lineheight_measurement"></select>
+							</tr></table>
+						</td>
+						<td><label for="text_case">{$lang_style_text_case}</label></td>
+						<td>
+							<select id="text_case" name="text_case"></select>
+						</td>
+					</tr>
+					<tr>
+						<td><label for="text_color">{$lang_style_text_color}</label></td>
+						<td colspan="2">
+							<table border="0" cellpadding="0" cellspacing="0">
+								<tr>
+									<td><input id="text_color" name="text_color" type="text" value="" size="9" onchange="updateColor('text_color_pick','text_color');" /></td>
+									<td id="text_color_pickcontainer">&nbsp;</td>
+								</tr>
+							</table>
+						</td>
+					</tr>
+					<tr>
+						<td>{$lang_style_text_decoration}</td>
+						<td colspan="2">
+							<table border="0" cellspacing="0" cellpadding="0">
+								<tr><td><input id="text_underline" name="text_underline" class="checkbox" type="checkbox" /></td><td><label for="text_underline">underline</label></td></tr>
+								<tr><td><input id="text_overline" name="text_overline" class="checkbox" type="checkbox" /></td><td><label for="text_overline">overline</label></td></tr>
+								<tr><td><input id="text_linethrough" name="text_linethrough" class="checkbox" type="checkbox" /></td><td><label for="text_linethrough">line-through</label></td></tr>
+								<tr><td><input id="text_blink" name="text_blink" class="checkbox" type="checkbox" /></td><td><label for="text_blink">blink</label></td></tr>
+								<tr><td><input id="text_none" name="text_none" class="checkbox" type="checkbox" /></td><td><label for="text_none">none</label></td></tr>
+							</table>
+						</td>
+					</tr>
+				</table>
+			</div>
+
+			<div id="background_panel" class="panel">
+				<table border="0">
+					<tr>
+						<td><label for="background_color">{$lang_style_background_color}</label></td>
+						<td>
+							<table border="0" cellpadding="0" cellspacing="0">
+								<tr>
+									<td><input id="background_color" name="background_color" type="text" value="" size="9" onchange="updateColor('background_color_pick','background_color');" /></td>
+									<td id="background_color_pickcontainer">&nbsp;</td>
+								</tr>
+							</table>
+						</td>	
+					</tr>
+
+					<tr>
+						<td><label for="background_image">{$lang_style_background_image}</label></td>
+						<td><input id="background_image" name="background_image" type="text" /></td>	
+					</tr>
+
+					<tr>
+						<td><label for="background_repeat">{$lang_style_background_repeat}</label></td>
+						<td><select id="background_repeat" name="background_repeat" class="mceEditableSelect"></select></td>	
+					</tr>
+
+					<tr>
+						<td><label for="background_attachment">{$lang_style_background_attachment}</label></td>
+						<td><select id="background_attachment" name="background_attachment" class="mceEditableSelect"></select></td>	
+					</tr>
+
+					<tr>
+						<td><label for="background_hpos">{$lang_style_background_hpos}</label></td>
+						<td><table border="0" cellspacing="0" cellpadding="0"><tr>
+								<td><select id="background_hpos" name="background_hpos" class="mceEditableSelect"></select></td>
+								<td>&nbsp;<select id="background_hpos_measurement" name="background_hpos_measurement"></select>
+							</tr></table>
+						</td>
+					</tr>
+
+					<tr>
+						<td><label for="background_vpos">{$lang_style_background_vpos}</label></td>
+						<td><table border="0" cellspacing="0" cellpadding="0"><tr>
+								<td><select id="background_vpos" name="background_vpos" class="mceEditableSelect"></select></td>
+								<td>&nbsp;<select id="background_vpos_measurement" name="background_vpos_measurement"></select>
+							</tr></table>
+						</td>
+					</tr>
+				</table>
+			</div>
+
+			<div id="block_panel" class="panel">
+				<table border="0">
+					<tr>
+						<td><label for="block_wordspacing">{$lang_style_block_wordspacing}</label></td>
+						<td><table border="0" cellspacing="0" cellpadding="0"><tr>
+								<td><select id="block_wordspacing" name="block_wordspacing" class="mceEditableSelect"></select></td>
+								<td>&nbsp;<select id="block_wordspacing_measurement" name="block_wordspacing_measurement"></select>
+							</tr></table>
+						</td>
+					</tr>
+
+					<tr>
+						<td><label for="block_letterspacing">{$lang_style_block_letterspacing}</label></td>
+						<td><table border="0" cellspacing="0" cellpadding="0"><tr>
+								<td><select id="block_letterspacing" name="block_letterspacing" class="mceEditableSelect"></select></td>
+								<td>&nbsp;<select id="block_letterspacing_measurement" name="block_letterspacing_measurement"></select>
+							</tr></table>
+						</td>
+					</tr>
+
+					<tr>
+						<td><label for="block_vertical_alignment">{$lang_style_block_vertical_alignment}</label></td>
+						<td><select id="block_vertical_alignment" name="block_vertical_alignment" class="mceEditableSelect"></select></td>	
+					</tr>
+
+					<tr>
+						<td><label for="block_text_align">{$lang_style_block_text_align}</label></td>
+						<td><select id="block_text_align" name="block_text_align" class="mceEditableSelect"></select></td>	
+					</tr>
+
+					<tr>
+						<td><label for="block_text_indent">{$lang_style_block_text_indent}</label></td>
+						<td><table border="0" cellspacing="0" cellpadding="0"><tr>
+								<td><input type="text" id="block_text_indent" name="block_text_indent" /></td>
+								<td>&nbsp;<select id="block_text_indent_measurement" name="block_text_indent_measurement"></select>
+							</tr></table>
+						</td>
+					</tr>
+
+					<tr>
+						<td><label for="block_whitespace">{$lang_style_block_whitespace}</label></td>
+						<td><select id="block_whitespace" name="block_whitespace" class="mceEditableSelect"></select></td>	
+					</tr>
+
+					<tr>
+						<td><label for="block_display">{$lang_style_block_display}</label></td>
+						<td><select id="block_display" name="block_display" class="mceEditableSelect"></select></td>	
+					</tr>
+				</table>
+			</div>
+
+			<div id="box_panel" class="panel">
+				<table border="0">
+					<tr>
+						<td><label for="box_width">{$lang_style_box_width}</label></td>
+						<td><table border="0" cellspacing="0" cellpadding="0"><tr>
+								<td><input type="text" id="box_width" name="box_width" class="mceEditableSelect" onchange="synch('box_width','positioning_width');" /></td>
+								<td>&nbsp;<select id="box_width_measurement" name="box_width_measurement"></select>
+							</tr></table>
+						</td>
+						<td>&nbsp;&nbsp;&nbsp;<label for="box_float">{$lang_style_box_float}</label></td>
+						<td><select id="box_float" name="box_float" class="mceEditableSelect"></select></td>							
+					</tr>
+
+					<tr>
+						<td><label for="box_height">{$lang_style_box_height}</label></td>
+						<td><table border="0" cellspacing="0" cellpadding="0"><tr>
+								<td><input type="text" id="box_height" name="box_height" class="mceEditableSelect" onchange="synch('box_height','positioning_height');" /></td>
+								<td>&nbsp;<select id="box_height_measurement" name="box_height_measurement"></select>
+							</tr></table>
+						</td>
+						<td>&nbsp;&nbsp;&nbsp;<label for="box_clear">{$lang_style_box_clear}</label></td>
+						<td><select id="box_clear" name="box_clear" class="mceEditableSelect"></select></td>							
+					</tr>					
+				</table>
+				<div style="float: left; width: 49%">
+					<fieldset>
+						<legend>{$lang_style_padding}</legend>
+
+						<table border="0">
+							<tr>
+								<td>&nbsp;</td>
+								<td><input type="checkbox" id="box_padding_same" name="box_padding_same" class="checkbox" checked="checked" onclick="toggleSame(this,'box_padding');" /> <label for="box_padding_same">{$lang_style_same}</label></td>
+							</tr>
+							<tr>
+								<td><label for="box_padding_top">{$lang_style_top}</label></td>
+								<td><table border="0" cellspacing="0" cellpadding="0"><tr>
+										<td><input type="text" id="box_padding_top" name="box_padding_top" class="mceEditableSelect" /></td>
+										<td>&nbsp;<select id="box_padding_top_measurement" name="box_padding_top_measurement"></select>
+									</tr></table>
+								</td>
+							</tr>
+							<tr>
+								<td><label for="box_padding_right">{$lang_style_right}</label></td>
+								<td><table border="0" cellspacing="0" cellpadding="0"><tr>
+										<td><input type="text" id="box_padding_right" name="box_padding_right" class="mceEditableSelect" disabled="disabled" /></td>
+										<td>&nbsp;<select id="box_padding_right_measurement" name="box_padding_right_measurement" disabled="disabled"></select>
+									</tr></table>
+								</td>
+							</tr>
+							<tr>
+								<td><label for="box_padding_bottom">{$lang_style_bottom}</label></td>
+								<td><table border="0" cellspacing="0" cellpadding="0"><tr>
+										<td><input type="text" id="box_padding_bottom" name="box_padding_bottom" class="mceEditableSelect" disabled="disabled" /></td>
+										<td>&nbsp;<select id="box_padding_bottom_measurement" name="box_padding_bottom_measurement" disabled="disabled"></select>
+									</tr></table>
+								</td>
+							</tr>
+							<tr>
+								<td><label for="box_padding_left">{$lang_style_left}</label></td>
+								<td><table border="0" cellspacing="0" cellpadding="0"><tr>
+										<td><input type="text" id="box_padding_left" name="box_padding_left" class="mceEditableSelect" disabled="disabled" /></td>
+										<td>&nbsp;<select id="box_padding_left_measurement" name="box_padding_left_measurement" disabled="disabled"></select>
+									</tr></table>
+								</td>
+							</tr>
+						</table>
+					</fieldset>
+				</div>
+				<div style="float: right; width: 49%">
+					<fieldset>
+						<legend>{$lang_style_margin}</legend>
+
+						<table border="0">
+							<tr>
+								<td>&nbsp;</td>
+								<td><input type="checkbox" id="box_margin_same" name="box_margin_same" class="checkbox" checked="checked" onclick="toggleSame(this,'box_margin');" /> <label for="box_margin_same">{$lang_style_same}</label></td>
+							</tr>
+							<tr>
+								<td><label for="box_margin_top">{$lang_style_top}</label></td>
+								<td><table border="0" cellspacing="0" cellpadding="0"><tr>
+										<td><input type="text" id="box_margin_top" name="box_margin_top" class="mceEditableSelect" /></td>
+										<td>&nbsp;<select id="box_margin_top_measurement" name="box_margin_top_measurement"></select>
+									</tr></table>
+								</td>
+							</tr>
+							<tr>
+								<td><label for="box_margin_right">{$lang_style_right}</label></td>
+								<td><table border="0" cellspacing="0" cellpadding="0"><tr>
+										<td><input type="text" id="box_margin_right" name="box_margin_right" class="mceEditableSelect" disabled="disabled" /></td>
+										<td>&nbsp;<select id="box_margin_right_measurement" name="box_margin_right_measurement" disabled="disabled"></select>
+									</tr></table>
+								</td>
+							</tr>
+							<tr>
+								<td><label for="box_margin_bottom">{$lang_style_bottom}</label></td>
+								<td><table border="0" cellspacing="0" cellpadding="0"><tr>
+										<td><input type="text" id="box_margin_bottom" name="box_margin_bottom" class="mceEditableSelect" disabled="disabled" /></td>
+										<td>&nbsp;<select id="box_margin_bottom_measurement" name="box_margin_bottom_measurement" disabled="disabled"></select>
+									</tr></table>
+								</td>
+							</tr>
+							<tr>
+								<td><label for="box_margin_left">{$lang_style_left}</label></td>
+								<td><table border="0" cellspacing="0" cellpadding="0"><tr>
+										<td><input type="text" id="box_margin_left" name="box_margin_left" class="mceEditableSelect" disabled="disabled" /></td>
+										<td>&nbsp;<select id="box_margin_left_measurement" name="box_margin_left_measurement" disabled="disabled"></select>
+									</tr></table>
+								</td>
+							</tr>
+						</table>
+					</fieldset>
+				</div>
+				<br style="clear: both" />
+			</div>
+
+			<div id="border_panel" class="panel">
+				<table border="0" cellspacing="0" cellp2adding="0" width="100%">
+					<tr>
+						<td class="tdelim">&nbsp;</td>
+						<td class="tdelim delim">&nbsp;</td>
+						<td class="tdelim">{$lang_style_style}</td>
+						<td class="tdelim delim">&nbsp;</td>
+						<td class="tdelim">{$lang_style_width}</td>
+						<td class="tdelim delim">&nbsp;</td>
+						<td class="tdelim">{$lang_style_color}</td>
+					</tr>
+
+					<tr>
+						<td>&nbsp;</td>
+						<td class="delim">&nbsp;</td>
+						<td><input type="checkbox" id="border_style_same" name="border_style_same" class="checkbox" checked="checked" onclick="toggleSame(this,'border_style');" /> <label for="border_style_same">{$lang_style_same}</label></td>
+						<td class="delim">&nbsp;</td>
+						<td><input type="checkbox" id="border_width_same" name="border_width_same" class="checkbox" checked="checked" onclick="toggleSame(this,'border_width');" /> <label for="border_width_same">{$lang_style_same}</label></td>
+						<td class="delim">&nbsp;</td>
+						<td><input type="checkbox" id="border_color_same" name="border_color_same" class="checkbox" checked="checked" onclick="toggleSame(this,'border_color');" /> <label for="border_color_same">{$lang_style_same}</label></td>
+					</tr>
+
+					<tr>
+						<td>{$lang_style_top}</td>
+						<td class="delim">&nbsp;</td>
+						<td><select id="border_style_top" name="border_style_top" class="mceEditableSelect"></select></td>
+						<td class="delim">&nbsp;</td>
+						<td>
+							<table border="0" cellspacing="0" cellpadding="0"><tr>
+								<td><select id="border_width_top" name="border_width_top" class="mceEditableSelect"></select></td>
+								<td>&nbsp;<select id="border_width_top_measurement" name="border_width_top_measurement"></select>
+							</tr></table>
+						</td>
+						<td class="delim">&nbsp;</td>
+						<td><table border="0" cellpadding="0" cellspacing="0">
+								<tr>
+									<td><input id="border_color_top" name="border_color_top" type="text" value="" size="9" onchange="updateColor('border_color_top_pick','border_color_top');" /></td>
+									<td id="border_color_top_pickcontainer">&nbsp;</td>
+								</tr>
+							</table>
+						</td>
+					</tr>
+
+					<tr>
+						<td>{$lang_style_right}</td>
+						<td class="delim">&nbsp;</td>
+						<td><select id="border_style_right" name="border_style_right" class="mceEditableSelect" disabled="disabled"></select></td>
+						<td class="delim">&nbsp;</td>
+						<td>
+							<table border="0" cellspacing="0" cellpadding="0"><tr>
+								<td><select id="border_width_right" name="border_width_right" class="mceEditableSelect" disabled="disabled"></select></td>
+								<td>&nbsp;<select id="border_width_right_measurement" name="border_width_right_measurement" disabled="disabled"></select>
+							</tr></table>
+						</td>
+						<td class="delim">&nbsp;</td>
+						<td><table border="0" cellpadding="0" cellspacing="0">
+								<tr>
+									<td><input id="border_color_right" name="border_color_right" type="text" value="" size="9" onchange="updateColor('border_color_right_pick','border_color_right');" disabled="disabled" /></td>
+									<td id="border_color_right_pickcontainer">&nbsp;</td>
+								</tr>
+							</table>
+						</td>
+					</tr>
+
+					<tr>
+						<td>{$lang_style_bottom}</td>
+						<td class="delim">&nbsp;</td>
+						<td><select id="border_style_bottom" name="border_style_bottom" class="mceEditableSelect" disabled="disabled"></select></td>
+						<td class="delim">&nbsp;</td>
+						<td>
+							<table border="0" cellspacing="0" cellpadding="0"><tr>
+								<td><select id="border_width_bottom" name="border_width_bottom" class="mceEditableSelect" disabled="disabled"></select></td>
+								<td>&nbsp;<select id="border_width_bottom_measurement" name="border_width_bottom_measurement" disabled="disabled"></select>
+							</tr></table>
+						</td>
+						<td class="delim">&nbsp;</td>
+						<td><table border="0" cellpadding="0" cellspacing="0">
+								<tr>
+									<td><input id="border_color_bottom" name="border_color_bottom" type="text" value="" size="9" onchange="updateColor('border_color_bottom_pick','border_color_bottom');" disabled="disabled" /></td>
+									<td id="border_color_bottom_pickcontainer">&nbsp;</td>
+								</tr>
+							</table>
+						</td>
+					</tr>
+
+					<tr>
+						<td>{$lang_style_left}</td>
+						<td class="delim">&nbsp;</td>
+						<td><select id="border_style_left" name="border_style_left" class="mceEditableSelect" disabled="disabled"></select></td>
+						<td class="delim">&nbsp;</td>
+						<td>
+							<table border="0" cellspacing="0" cellpadding="0"><tr>
+								<td><select id="border_width_left" name="border_width_left" class="mceEditableSelect" disabled="disabled"></select></td>
+								<td>&nbsp;<select id="border_width_left_measurement" name="border_width_left_measurement" disabled="disabled"></select>
+							</tr></table>
+						</td>
+						<td class="delim">&nbsp;</td>
+						<td><table border="0" cellpadding="0" cellspacing="0">
+								<tr>
+									<td><input id="border_color_left" name="border_color_left" type="text" value="" size="9" onchange="updateColor('border_color_left_pick','border_color_left');" disabled="disabled" /></td>
+									<td id="border_color_left_pickcontainer">&nbsp;</td>
+								</tr>
+							</table>
+						</td>
+					</tr>
+				</table>
+			</div>
+
+			<div id="list_panel" class="panel">
+				<table border="0">
+					<tr>
+						<td><label for="list_type">{$lang_style_list_type}</label></td>
+						<td><select id="list_type" name="list_type" class="mceEditableSelect"></select></td>	
+					</tr>
+
+					<tr>
+						<td><label for="list_bullet_image">{$lang_style_bullet_image}</label></td>
+						<td><input id="list_bullet_image" name="list_bullet_image" type="text" /></td>	
+					</tr>
+
+					<tr>
+						<td><label for="list_position">{$lang_style_position}</label></td>
+						<td><select id="list_position" name="list_position" class="mceEditableSelect"></select></td>	
+					</tr>
+				</table>
+			</div>
+
+			<div id="positioning_panel" class="panel">
+				<table border="0">
+					<tr>
+						<td><label for="positioning_type">{$lang_style_positioning_type}</label></td>
+						<td><select id="positioning_type" name="positioning_type" class="mceEditableSelect"></select></td>
+						<td>&nbsp;&nbsp;&nbsp;<label for="positioning_visibility">{$lang_style_visibility}</label></td>
+						<td><select id="positioning_visibility" name="positioning_visibility" class="mceEditableSelect"></select></td>							
+					</tr>
+
+					<tr>
+						<td><label for="positioning_width">{$lang_style_width}</label></td>
+						<td><table border="0" cellspacing="0" cellpadding="0"><tr>
+								<td><input type="text" id="positioning_width" name="positioning_width" onchange="synch('positioning_width','box_width');" /></td>
+								<td>&nbsp;<select id="positioning_width_measurement" name="positioning_width_measurement"></select>
+							</tr></table>
+						</td>
+						<td>&nbsp;&nbsp;&nbsp;<label for="positioning_zindex">{$lang_style_zindex}</label></td>
+						<td><input type="text" id="positioning_zindex" name="positioning_zindex" /></td>							
+					</tr>
+
+					<tr>
+						<td><label for="positioning_height">{$lang_style_height}</label></td>
+						<td><table border="0" cellspacing="0" cellpadding="0"><tr>
+								<td><input type="text" id="positioning_height" name="positioning_height" onchange="synch('positioning_height','box_height');" /></td>
+								<td>&nbsp;<select id="positioning_height_measurement" name="positioning_height_measurement"></select>
+							</tr></table>
+						</td>
+						<td>&nbsp;&nbsp;&nbsp;<label for="positioning_overflow">{$lang_style_overflow}</label></td>
+						<td><select id="positioning_overflow" name="positioning_overflow" class="mceEditableSelect"></select></td>							
+					</tr>					
+				</table>
+
+				<div style="float: left; width: 49%">
+					<fieldset>
+						<legend>{$lang_style_placement}</legend>
+
+						<table border="0">
+							<tr>
+								<td>&nbsp;</td>
+								<td><input type="checkbox" id="positioning_placement_same" name="positioning_placement_same" class="checkbox" checked="checked" onclick="toggleSame(this,'positioning_placement');" /> <label for="positioning_placement_same">{$lang_style_same}</label></td>
+							</tr>
+							<tr>
+								<td>{$lang_style_top}</td>
+								<td><table border="0" cellspacing="0" cellpadding="0"><tr>
+										<td><input type="text" id="positioning_placement_top" name="positioning_placement_top" /></td>
+										<td>&nbsp;<select id="positioning_placement_top_measurement" name="positioning_placement_top_measurement"></select>
+									</tr></table>
+								</td>
+							</tr>
+							<tr>
+								<td>{$lang_style_right}</td>
+								<td><table border="0" cellspacing="0" cellpadding="0"><tr>
+										<td><input type="text" id="positioning_placement_right" name="positioning_placement_right" disabled="disabled" /></td>
+										<td>&nbsp;<select id="positioning_placement_right_measurement" name="positioning_placement_right_measurement" disabled="disabled"></select>
+									</tr></table>
+								</td>
+							</tr>
+							<tr>
+								<td>{$lang_style_bottom}</td>
+								<td><table border="0" cellspacing="0" cellpadding="0"><tr>
+										<td><input type="text" id="positioning_placement_bottom" name="positioning_placement_bottom" disabled="disabled" /></td>
+										<td>&nbsp;<select id="positioning_placement_bottom_measurement" name="positioning_placement_bottom_measurement" disabled="disabled"></select>
+									</tr></table>
+								</td>
+							</tr>
+							<tr>
+								<td>{$lang_style_left}</td>
+								<td><table border="0" cellspacing="0" cellpadding="0"><tr>
+										<td><input type="text" id="positioning_placement_left" name="positioning_placement_left" disabled="disabled" /></td>
+										<td>&nbsp;<select id="positioning_placement_left_measurement" name="positioning_placement_left_measurement" disabled="disabled"></select>
+									</tr></table>
+								</td>
+							</tr>
+						</table>
+					</fieldset>
+				</div>
+				<div style="float: right; width: 49%">
+					<fieldset>
+						<legend>{$lang_style_clip}</legend>
+
+						<table border="0">
+							<tr>
+								<td>&nbsp;</td>
+								<td><input type="checkbox" id="positioning_clip_same" name="positioning_clip_same" class="checkbox" checked="checked" onclick="toggleSame(this,'positioning_clip');" /> <label for="positioning_clip_same">{$lang_style_same}</label></td>
+							</tr>
+							<tr>
+								<td>{$lang_style_top}</td>
+								<td><table border="0" cellspacing="0" cellpadding="0"><tr>
+										<td><input type="text" id="positioning_clip_top" name="positioning_clip_top" /></td>
+										<td>&nbsp;<select id="positioning_clip_top_measurement" name="positioning_clip_top_measurement"></select>
+									</tr></table>
+								</td>
+							</tr>
+							<tr>
+								<td>{$lang_style_right}</td>
+								<td><table border="0" cellspacing="0" cellpadding="0"><tr>
+										<td><input type="text" id="positioning_clip_right" name="positioning_clip_right" disabled="disabled" /></td>
+										<td>&nbsp;<select id="positioning_clip_right_measurement" name="positioning_clip_right_measurement" disabled="disabled" ></select>
+									</tr></table>
+								</td>
+							</tr>
+							<tr>
+								<td>{$lang_style_bottom}</td>
+								<td><table border="0" cellspacing="0" cellpadding="0"><tr>
+										<td><input type="text" id="positioning_clip_bottom" name="positioning_clip_bottom" disabled="disabled" /></td>
+										<td>&nbsp;<select id="positioning_clip_bottom_measurement" name="positioning_clip_bottom_measurement" disabled="disabled"></select>
+									</tr></table>
+								</td>
+							</tr>
+							<tr>
+								<td>{$lang_style_left}</td>
+								<td><table border="0" cellspacing="0" cellpadding="0"><tr>
+										<td><input type="text" id="positioning_clip_left" name="positioning_clip_left" disabled="disabled" /></td>
+										<td>&nbsp;<select id="positioning_clip_left_measurement" name="positioning_clip_left_measurement" disabled="disabled"></select>
+									</tr></table>
+								</td>
+							</tr>
+						</table>
+					</fieldset>
+				</div>
+				<br style="clear: both" />
+			</div>
+		</div>
+
+		<div class="mceActionPanel">
+			<div style="float: left">
+				<div style="float: left"><input type="button" id="insert" name="insert" value="{$lang_update}" onclick="updateAction();" /></div>
+				<div style="float: left">&nbsp;<input type="button" id="apply" name="apply" value="Apply" onclick="applyAction();" class="updateButton" /></div>
+				<br style="clear: both" />
+			</div>
+
+			<div style="float: right">
+				<input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onclick="tinyMCEPopup.close();" />
+			</div>
+		</div>
+	</form>
+
+	<div style="display: none">
+		<div id="container"></div>
+	</div>
+</body>
+</html>

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/style/readme.txt
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/style/readme.txt	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/style/readme.txt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1 @@
+Check the TinyMCE documentation for details on this plugin.

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/cell.htm
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/cell.htm	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/cell.htm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,182 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+	<title>{$lang_table_cell_title}</title>
+	<script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
+	<script language="javascript" type="text/javascript" src="../../utils/mctabs.js"></script>
+	<script language="javascript" type="text/javascript" src="../../utils/form_utils.js"></script>
+	<script language="javascript" type="text/javascript" src="jscripts/cell.js"></script>
+	<link href="css/cell.css" rel="stylesheet" type="text/css" />
+	<base target="_self" />
+</head>
+<body id="tablecell" onload="tinyMCEPopup.executeOnLoad('init();');" style="display: none">
+	<form onsubmit="updateAction();return false;" action="#">
+		<div class="tabs">
+			<ul>
+				<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{$lang_table_general_tab}</a></span></li>
+				<li id="advanced_tab"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{$lang_table_advanced_tab}</a></span></li>
+			</ul>
+		</div>
+
+		<div class="panel_wrapper">
+			<div id="general_panel" class="panel current">
+				<fieldset>
+					<legend>{$lang_table_general_props}</legend>
+
+					<table border="0" cellpadding="4" cellspacing="0">
+						<tr>
+							<td><label for="align">{$lang_table_align}</label></td>
+							<td>
+								<select id="align" name="align">
+									<option value="">{$lang_not_set}</option>
+									<option value="center">{$lang_table_align_middle}</option>
+									<option value="left">{$lang_table_align_left}</option>
+									<option value="right">{$lang_table_align_right}</option>
+								</select>
+							</td>
+		
+							<td><label for="celltype">{$lang_table_cell_type}</label></td>
+							<td>
+								<select id="celltype" name="celltype">
+									<option value="td">{$lang_table_td}</option>
+									<option value="th">{$lang_table_th}</option>
+								</select>
+							</td>
+						</tr>
+
+						<tr>
+							<td><label for="valign">{$lang_table_valign}</label></td>
+							<td>
+								<select id="valign" name="valign">
+									<option value="">{$lang_not_set}</option>
+									<option value="top">{$lang_table_align_top}</option>
+									<option value="middle">{$lang_table_align_middle}</option>
+									<option value="bottom">{$lang_table_align_bottom}</option>
+								</select>
+							</td>
+
+							<td><label for="scope">{$lang_table_scope}</label></td>
+							<td>
+								<select id="scope" name="scope">
+									<option value="">{$lang_not_set}</option>
+									<option value="col">{$lang_table_col}</option>
+									<option value="row">{$lang_table_row}</option>
+									<option value="rowgroup">{$lang_table_rowgroup}</option>
+									<option value="colgroup">{$lang_table_colgroup}</option>
+								</select>
+							</td>
+
+						</tr>
+
+						<tr>
+							<td><label for="width">{$lang_table_width}</label></td>
+							<td><input id="width" name="width" type="text" value="" size="4" maxlength="4" onchange="changedSize();" /></td>
+
+							<td><label for="height">{$lang_table_height}</label></td>
+							<td><input id="height" name="height" type="text" value="" size="4" maxlength="4" onchange="changedSize();" /></td>
+						</tr>
+
+						<tr id="styleSelectRow">
+							<td><label for="class">{$lang_class_name}</label></td>
+							<td colspan="3">
+								<select id="class" name="class">
+									<option value="" selected="selected">{$lang_not_set}</option>
+								</select>
+							</td>
+						</tr>
+					</table>
+				</fieldset>
+			</div>
+
+			<div id="advanced_panel" class="panel">
+				<fieldset>
+					<legend>{$lang_table_advanced_props}</legend>
+
+					<table border="0" cellpadding="0" cellspacing="4">
+						<tr>
+							<td class="column1"><label for="id">{$lang_table_id}</label></td> 
+							<td><input id="id" name="id" type="text" value="" style="width: 200px" /></td> 
+						</tr>
+
+						<tr>
+							<td><label for="style">{$lang_table_style}</label></td>
+							<td><input type="text" id="style" name="style" value="" style="width: 200px;" onchange="changedStyle();" /></td>
+						</tr>
+
+						<tr>
+							<td class="column1"><label for="dir">{$lang_table_langdir}</label></td> 
+							<td>
+								<select id="dir" name="dir" style="width: 200px"> 
+										<option value="">{$lang_not_set}</option> 
+										<option value="ltr">{$lang_table_ltr}</option> 
+										<option value="rtl">{$lang_table_rtl}</option> 
+								</select>
+							</td> 
+						</tr>
+
+						<tr>
+							<td class="column1"><label for="lang">{$lang_table_langcode}</label></td> 
+							<td>
+								<input id="lang" name="lang" type="text" value="" style="width: 200px" />
+							</td> 
+						</tr>
+
+						<tr>
+							<td class="column1"><label for="backgroundimage">{$lang_table_bgimage}</label></td> 
+							<td>
+								<table border="0" cellpadding="0" cellspacing="0">
+									<tr>
+										<td><input id="backgroundimage" name="backgroundimage" type="text" value="" style="width: 200px" onchange="changedBackgroundImage();" /></td>
+										<td id="backgroundimagebrowsercontainer">&nbsp;</td>
+									</tr>
+								</table>
+							</td> 
+						</tr>
+
+						<tr>
+							<td class="column1"><label for="bordercolor">{$lang_table_bordercolor}</label></td> 
+							<td>
+								<table border="0" cellpadding="0" cellspacing="0">
+									<tr>
+										<td><input id="bordercolor" name="bordercolor" type="text" value="" size="9" onchange="updateColor('bordercolor_pick','bordercolor');changedColor();" /></td>
+										<td id="bordercolor_pickcontainer">&nbsp;</td>
+									</tr>
+								</table>
+							</td> 
+						</tr>
+
+						<tr>
+							<td class="column1"><label for="bgcolor">{$lang_table_bgcolor}</label></td> 
+							<td>
+								<table border="0" cellpadding="0" cellspacing="0">
+									<tr>
+										<td><input id="bgcolor" name="bgcolor" type="text" value="" size="9" onchange="updateColor('bgcolor_pick','bgcolor');changedColor();" /></td>
+										<td id="bgcolor_pickcontainer">&nbsp;</td>
+									</tr>
+								</table>
+							</td> 
+						</tr>
+					</table>
+				</fieldset>
+			</div>
+		</div>
+
+		<div class="mceActionPanel">
+			<div>
+				<select id="action" name="action">
+					<option value="cell">{$lang_table_cell_cell}</option>
+					<option value="row">{$lang_table_cell_row}</option>
+					<option value="all">{$lang_table_cell_all}</option>
+				</select>
+			</div>
+
+			<div style="float: left">
+				<div><input type="button" id="insert" name="insert" value="{$lang_update}" onclick="updateAction();" /></div>
+			</div>
+
+			<div style="float: right">
+				<input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onclick="tinyMCEPopup.close();" />
+			</div>
+		</div>
+	</form>
+</body>
+</html>

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/css/cell.css
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/css/cell.css	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/css/cell.css	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,17 @@
+/* CSS file for cell dialog in the table plugin */
+
+.panel_wrapper div.current {
+	height: 200px;
+}
+
+.advfield {
+	width: 200px;
+}
+
+#action {
+	margin-bottom: 3px;
+}
+
+#class {
+	width: 150px;
+}
\ No newline at end of file

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/css/row.css
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/css/row.css	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/css/row.css	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,25 @@
+/* CSS file for row dialog in the table plugin */
+
+.panel_wrapper div.current {
+	height: 200px;
+}
+
+.advfield {
+	width: 200px;
+}
+
+#action {
+	margin-bottom: 3px;
+}
+
+#rowtype,#align,#valign,#class,#height {
+	width: 150px;
+}
+
+#height {
+	width: 50px;	
+}
+
+.col2 {
+	padding-left: 20px;
+}

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/css/table.css
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/css/table.css	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/css/table.css	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,13 @@
+/* CSS file for table dialog in the table plugin */
+
+.panel_wrapper div.current {
+	height: 220px;
+}
+
+.advfield {
+	width: 200px;
+}
+
+#class {
+	width: 150px;
+}

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/editor_plugin.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/editor_plugin.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/editor_plugin.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1 @@
+tinyMCE.importPluginLanguagePack('table','en,tr,ar,cs,da,de,el,es,fi,fr_ca,hu,it,ja,ko,nl,nb,pl,pt,pt_br,sv,tw,zh_cn,fr,de,he,nb,ru,ru_KOI8-R,ru_UTF-8,nn,cy,is,zh_tw,zh_tw_utf8,sk');var TinyMCE_TablePlugin={getInfo:function(){return{longname:'Tables',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_table.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};},initInstance:function(inst){if(tinyMCE.isGecko){var doc=inst.getDoc();tinyMCE.addEvent(doc,"mouseup",TinyMCE_TablePlugin._mouseDownHandler);}inst.tableRowClipboard=null;},getControlHTML:function(control_name){var controls=new Array(['table','table.gif','lang_table_desc','mceInsertTable',true],['delete_col','table_delete_col.gif','lang_table_delete_col_desc','mceTableDeleteCol'],['delete_row','table_delete_row.gif','lang_table_delete_row_desc','mceTableDeleteRow'],['col_after','table_insert_col_after.gif','lang_table_col_after_desc','mceTableInsertColAfter'],['col_before','table_insert_col_before.gif','lang_table_col_before_desc','mceTableInsertColBefore'],['row_after','table_insert_row_after.gif','lang_table_row_after_desc','mceTableInsertRowAfter'],['row_before','table_insert_row_before.gif','lang_table_row_before_desc','mceTableInsertRowBefore'],['row_props','table_row_props.gif','lang_table_row_desc','mceTableRowProps',true],['cell_props','table_cell_props.gif','lang_table_cell_desc','mceTableCellProps',true],['split_cells','table_split_cells.gif','lang_table_split_cells_desc','mceTableSplitCells',true],['merge_cells','table_merge_cells.gif','lang_table_merge_cells_desc','mceTableMergeCells',true]);for(var i=0;i<controls.length;i++){var but=controls[i];var cmd='tinyMCE.execInstanceCommand(\'{$editor_id}\',\''+but[3]+'\', '+(but.length>4?but[4]:false)+(but.length>5?', \''+but[5]+'\'':'')+');return false;';if(but[0]==control_name)return tinyMCE.getButtonHTML(control_name,but[2],'{$pluginurl}/images/'+but[1],but[3],(but.length>4?but[4]:false));}if(control_name=="tablecontrols"){var html="";html+=tinyMCE.getControlHTML("table");html+=tinyMCE.getControlHTML("separator");html+=tinyMCE.getControlHTML("row_props");html+=tinyMCE.getControlHTML("cell_props");html+=tinyMCE.getControlHTML("separator");html+=tinyMCE.getControlHTML("row_before");html+=tinyMCE.getControlHTML("row_after");html+=tinyMCE.getControlHTML("delete_row");html+=tinyMCE.getControlHTML("separator");html+=tinyMCE.getControlHTML("col_before");html+=tinyMCE.getControlHTML("col_after");html+=tinyMCE.getControlHTML("delete_col");html+=tinyMCE.getControlHTML("separator");html+=tinyMCE.getControlHTML("split_cells");html+=tinyMCE.getControlHTML("merge_cells");return html;}return"";},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case"mceInsertTable":case"mceTableRowProps":case"mceTableCellProps":case"mceTableSplitCells":case"mceTableMergeCells":case"mceTableInsertRowBefore":case"mceTableInsertRowAfter":case"mceTableDeleteRow":case"mceTableInsertColBefore":case"mceTableInsertColAfter":case"mceTableDeleteCol":case"mceTableCutRow":case"mceTableCopyRow":case"mceTablePasteRowBefore":case"mceTablePasteRowAfter":case"mceTableDelete":var inst=tinyMCE.getInstanceById(editor_id);inst.execCommand('mceBeginUndoLevel');TinyMCE_TablePlugin._doExecCommand(editor_id,element,command,user_interface,value);inst.execCommand('mceEndUndoLevel');return true;}return false;},handleNodeChange:function(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){var colspan="1",rowspan="1";var inst=tinyMCE.getInstanceById(editor_id);tinyMCE.switchClass(editor_id+'_table','mceButtonNormal');tinyMCE.switchClass(editor_id+'_row_props','mceButtonDisabled');tinyMCE.switchClass(editor_id+'_cell_props','mceButtonDisabled');tinyMCE.switchClass(editor_id+'_row_before','mceButtonDisabled');tinyMCE.switchClass(editor_id+'_row_after','mceButtonDisabled');tinyMCE.switchClass(editor_id+'_delete_row','mceButtonDisabled');tinyMCE.switchClass(editor_id+'_col_before','mceButtonDisabled');tinyMCE.switchClass(editor_id+'_col_after','mceButtonDisabled');tinyMCE.switchClass(editor_id+'_delete_col','mceButtonDisabled');tinyMCE.switchClass(editor_id+'_split_cells','mceButtonDisabled');tinyMCE.switchClass(editor_id+'_merge_cells','mceButtonDisabled');if(tdElm=tinyMCE.getParentElement(node,"td,th")){tinyMCE.switchClass(editor_id+'_cell_props','mceButtonSelected');tinyMCE.switchClass(editor_id+'_row_before','mceButtonNormal');tinyMCE.switchClass(editor_id+'_row_after','mceButtonNormal');tinyMCE.switchClass(editor_id+'_delete_row','mceButtonNormal');tinyMCE.switchClass(editor_id+'_col_before','mceButtonNormal');tinyMCE.switchClass(editor_id+'_col_after','mceButtonNormal');tinyMCE.switchClass(editor_id+'_delete_col','mceButtonNormal');colspan=tinyMCE.getAttrib(tdElm,"colspan");rowspan=tinyMCE.getAttrib(tdElm,"rowspan");colspan=colspan==""?"1":colspan;rowspan=rowspan==""?"1":rowspan;if(colspan!="1"||rowspan!="1")tinyMCE.switchClass(editor_id+'_split_cells','mceButtonNormal');}if(tinyMCE.getParentElement(node,"tr"))tinyMCE.switchClass(editor_id+'_row_props','mceButtonSelected');if(tinyMCE.getParentElement(node,"table")){tinyMCE.switchClass(editor_id+'_table','mceButtonSelected');tinyMCE.switchClass(editor_id+'_merge_cells','mceButtonNormal');}},_mouseDownHandler:function(e){var elm=tinyMCE.isMSIE?event.srcElement:e.target;var focusElm=tinyMCE.selectedInstance.getFocusElement();if(elm.nodeName=="BODY"&&(focusElm.nodeName=="TD"||focusElm.nodeName=="TH"||(focusElm.parentNode&&focusElm.parentNode.nodeName=="TD")||(focusElm.parentNode&&focusElm.parentNode.nodeName=="TH"))){window.setTimeout(function(){var tableElm=tinyMCE.getParentElement(focusElm,"table");tinyMCE.handleVisualAid(tableElm,true,tinyMCE.settings['visual'],tinyMCE.selectedInstance);},10);}},_doExecCommand:function(editor_id,element,command,user_interface,value){var inst=tinyMCE.getInstanceById(editor_id);var focusElm=inst.getFocusElement();var trElm=tinyMCE.getParentElement(focusElm,"tr");var tdElm=tinyMCE.getParentElement(focusElm,"td,th");var tableElm=tinyMCE.getParentElement(focusElm,"table");var doc=inst.contentWindow.document;var tableBorder=tableElm?tableElm.getAttribute("border"):"";if(trElm&&tdElm==null)tdElm=trElm.cells[0];function inArray(ar,v){for(var i=0;i<ar.length;i++){if(ar[i].length>0&&inArray(ar[i],v))return true;if(ar[i]==v)return true;}return false;}function makeTD(){var newTD=doc.createElement("td");newTD.innerHTML="&nbsp;";}function getColRowSpan(td){var colspan=tinyMCE.getAttrib(td,"colspan");var rowspan=tinyMCE.getAttrib(td,"rowspan");colspan=colspan==""?1:parseInt(colspan);rowspan=rowspan==""?1:parseInt(rowspan);return{colspan:colspan,rowspan:rowspan};}function getCellPos(grid,td){for(var y=0;y<grid.length;y++){for(var x=0;x<grid[y].length;x++){if(grid[y][x]==td)return{cellindex:x,rowindex:y};}}return null;}function getCell(grid,row,col){if(grid[row]&&grid[row][col])return grid[row][col];return null;}function getTableGrid(table){var grid=new Array();var rows=table.rows;for(var y=0;y<rows.length;y++){for(var x=0;x<rows[y].cells.length;x++){var td=rows[y].cells[x];var sd=getColRowSpan(td);for(xstart=x;grid[y]&&grid[y][xstart];xstart++);for(var y2=y;y2<y+sd['rowspan'];y2++){if(!grid[y2])grid[y2]=new Array();for(var x2=xstart;x2<xstart+sd['colspan'];x2++){grid[y2][x2]=td;}}}}return grid;}function trimRow(table,tr,td,new_tr){var grid=getTableGrid(table);var cpos=getCellPos(grid,td);if(new_tr.cells.length!=tr.childNodes.length){var cells=tr.childNodes;var lastElm=null;for(var x=0;td=getCell(grid,cpos.rowindex,x);x++){var remove=true;var sd=getColRowSpan(td);if(inArray(cells,td)){new_tr.childNodes[x]._delete=true;}else if((lastElm==null||td!=lastElm)&&sd.colspan>1){for(var i=x;i<x+td.colSpan;i++)new_tr.childNodes[i]._delete=true;}if((lastElm==null||td!=lastElm)&&sd.rowspan>1)td.rowSpan=sd.rowspan+1;lastElm=td;}deleteMarked(tableElm);}}function prevElm(node,name){while((node=node.previousSibling)!=null){if(node.nodeName==name)return node;}return null;}function nextElm(node,names){var namesAr=names.split(',');while((node=node.nextSibling)!=null){for(var i=0;i<namesAr.length;i++){if(node.nodeName.toLowerCase()==namesAr[i].toLowerCase())return node;}}return null;}function deleteMarked(tbl){if(tbl.rows==0)return;var tr=tbl.rows[0];do{var next=nextElm(tr,"TR");if(tr._delete){tr.parentNode.removeChild(tr);continue;}var td=tr.cells[0];if(td.cells>1){do{var nexttd=nextElm(td,"TD,TH");if(td._delete)td.parentNode.removeChild(td);}while((td=nexttd)!=null);}}while((tr=next)!=null);}function addRows(td_elm,tr_elm,rowspan){td_elm.rowSpan=1;var trNext=nextElm(tr_elm,"TR");for(var i=1;i<rowspan&&trNext;i++){var newTD=doc.createElement("td");newTD.innerHTML="&nbsp;";if(tinyMCE.isMSIE)trNext.insertBefore(newTD,trNext.cells(td_elm.cellIndex));else trNext.insertBefore(newTD,trNext.cells[td_elm.cellIndex]);trNext=nextElm(trNext,"TR");}}function copyRow(doc,table,tr){var grid=getTableGrid(table);var newTR=tr.cloneNode(false);var cpos=getCellPos(grid,tr.cells[0]);var lastCell=null;var tableBorder=tinyMCE.getAttrib(table,"border");var tdElm=null;for(var x=0;tdElm=getCell(grid,cpos.rowindex,x);x++){var newTD=null;if(lastCell!=tdElm){for(var i=0;i<tr.cells.length;i++){if(tdElm==tr.cells[i]){newTD=tdElm.cloneNode(true);break;}}}if(newTD==null){newTD=doc.createElement("td");newTD.innerHTML="&nbsp;";}newTD.colSpan=1;newTD.rowSpan=1;newTR.appendChild(newTD);lastCell=tdElm;}return newTR;}switch(command){case"mceTableRowProps":if(trElm==null)return true;if(user_interface){var template=new Array();template['file']='../../plugins/table/row.htm';template['width']=380;template['height']=295;template['width']+=tinyMCE.getLang('lang_table_rowprops_delta_width',0);template['height']+=tinyMCE.getLang('lang_table_rowprops_delta_height',0);tinyMCE.openWindow(template,{editor_id:inst.editorId,inline:"yes"});}return true;case"mceTableCellProps":if(tdElm==null)return true;if(user_interface){var template=new Array();template['file']='../../plugins/table/cell.htm';template['width']=380;template['height']=295;template['width']+=tinyMCE.getLang('lang_table_cellprops_delta_width',0);template['height']+=tinyMCE.getLang('lang_table_cellprops_delta_height',0);tinyMCE.openWindow(template,{editor_id:inst.editorId,inline:"yes"});}return true;case"mceInsertTable":if(user_interface){var template=new Array();template['file']='../../plugins/table/table.htm';template['width']=380;template['height']=295;template['width']+=tinyMCE.getLang('lang_table_table_delta_width',0);template['height']+=tinyMCE.getLang('lang_table_table_delta_height',0);tinyMCE.openWindow(template,{editor_id:inst.editorId,inline:"yes",action:value});}return true;case"mceTableDelete":var table=tinyMCE.getParentElement(inst.getFocusElement(),"table");if(table){table.parentNode.removeChild(table);inst.repaint();}return true;case"mceTableSplitCells":case"mceTableMergeCells":case"mceTableInsertRowBefore":case"mceTableInsertRowAfter":case"mceTableDeleteRow":case"mceTableInsertColBefore":case"mceTableInsertColAfter":case"mceTableDeleteCol":case"mceTableCutRow":case"mceTableCopyRow":case"mceTablePasteRowBefore":case"mceTablePasteRowAfter":if(!tableElm)return true;if(tableElm!=trElm.parentNode)tableElm=trElm.parentNode;if(tableElm&&trElm){switch(command){case"mceTableInsertRowBefore":if(!trElm||!tdElm)return true;var grid=getTableGrid(tableElm);var cpos=getCellPos(grid,tdElm);var newTR=doc.createElement("tr");var lastTDElm=null;cpos.rowindex--;if(cpos.rowindex<0)cpos.rowindex=0;for(var x=0;tdElm=getCell(grid,cpos.rowindex,x);x++){if(tdElm!=lastTDElm){var sd=getColRowSpan(tdElm);if(sd['rowspan']==1){var newTD=doc.createElement("td");newTD.innerHTML="&nbsp;";newTD.colSpan=tdElm.colSpan;newTR.appendChild(newTD);}else tdElm.rowSpan=sd['rowspan']+1;lastTDElm=tdElm;}}trElm.parentNode.insertBefore(newTR,trElm);break;case"mceTableCutRow":if(!trElm||!tdElm)return true;inst.tableRowClipboard=copyRow(doc,tableElm,trElm);inst.execCommand("mceTableDeleteRow");break;case"mceTableCopyRow":if(!trElm||!tdElm)return true;inst.tableRowClipboard=copyRow(doc,tableElm,trElm);break;case"mceTablePasteRowBefore":if(!trElm||!tdElm)return true;var newTR=inst.tableRowClipboard.cloneNode(true);var prevTR=prevElm(trElm,"TR");if(prevTR!=null)trimRow(tableElm,prevTR,prevTR.cells[0],newTR);trElm.parentNode.insertBefore(newTR,trElm);break;case"mceTablePasteRowAfter":if(!trElm||!tdElm)return true;var nextTR=nextElm(trElm,"TR");var newTR=inst.tableRowClipboard.cloneNode(true);trimRow(tableElm,trElm,tdElm,newTR);if(nextTR==null)trElm.parentNode.appendChild(newTR);else nextTR.parentNode.insertBefore(newTR,nextTR);break;case"mceTableInsertRowAfter":if(!trElm||!tdElm)return true;var grid=getTableGrid(tableElm);var cpos=getCellPos(grid,tdElm);var newTR=doc.createElement("tr");var lastTDElm=null;for(var x=0;tdElm=getCell(grid,cpos.rowindex,x);x++){if(tdElm!=lastTDElm){var sd=getColRowSpan(tdElm);if(sd['rowspan']==1){var newTD=doc.createElement("td");newTD.innerHTML="&nbsp;";newTD.colSpan=tdElm.colSpan;newTR.appendChild(newTD);}else tdElm.rowSpan=sd['rowspan']+1;lastTDElm=tdElm;}}if(newTR.hasChildNodes()){var nextTR=nextElm(trElm,"TR");if(nextTR)nextTR.parentNode.insertBefore(newTR,nextTR);else tableElm.appendChild(newTR);}break;case"mceTableDeleteRow":if(!trElm||!tdElm)return true;var grid=getTableGrid(tableElm);var cpos=getCellPos(grid,tdElm);if(grid.length==1){tableElm.parentNode.removeChild(tableElm);return true;}var cells=trElm.cells;var nextTR=nextElm(trElm,"TR");for(var x=0;x<cells.length;x++){if(cells[x].rowSpan>1){var newTD=cells[x].cloneNode(true);var sd=getColRowSpan(cells[x]);newTD.rowSpan=sd.rowspan-1;var nextTD=nextTR.cells[x];if(nextTD==null)nextTR.appendChild(newTD);else nextTR.insertBefore(newTD,nextTD);}}var lastTDElm=null;for(var x=0;tdElm=getCell(grid,cpos.rowindex,x);x++){if(tdElm!=lastTDElm){var sd=getColRowSpan(tdElm);if(sd.rowspan>1){tdElm.rowSpan=sd.rowspan-1;}else{trElm=tdElm.parentNode;if(trElm.parentNode)trElm._delete=true;}lastTDElm=tdElm;}}deleteMarked(tableElm);cpos.rowindex--;if(cpos.rowindex<0)cpos.rowindex=0;inst.selection.selectNode(getCell(grid,cpos.rowindex,0),true,true);break;case"mceTableInsertColBefore":if(!trElm||!tdElm)return true;var grid=getTableGrid(tableElm);var cpos=getCellPos(grid,tdElm);var lastTDElm=null;for(var y=0;tdElm=getCell(grid,y,cpos.cellindex);y++){if(tdElm!=lastTDElm){var sd=getColRowSpan(tdElm);if(sd['colspan']==1){var newTD=doc.createElement(tdElm.nodeName);newTD.innerHTML="&nbsp;";newTD.rowSpan=tdElm.rowSpan;tdElm.parentNode.insertBefore(newTD,tdElm);}else tdElm.colSpan++;lastTDElm=tdElm;}}break;case"mceTableInsertColAfter":if(!trElm||!tdElm)return true;var grid=getTableGrid(tableElm);var cpos=getCellPos(grid,tdElm);var lastTDElm=null;for(var y=0;tdElm=getCell(grid,y,cpos.cellindex);y++){if(tdElm!=lastTDElm){var sd=getColRowSpan(tdElm);if(sd['colspan']==1){var newTD=doc.createElement(tdElm.nodeName);newTD.innerHTML="&nbsp;";newTD.rowSpan=tdElm.rowSpan;var nextTD=nextElm(tdElm,"TD,TH");if(nextTD==null)tdElm.parentNode.appendChild(newTD);else nextTD.parentNode.insertBefore(newTD,nextTD);}else tdElm.colSpan++;lastTDElm=tdElm;}}break;case"mceTableDeleteCol":if(!trElm||!tdElm)return true;var grid=getTableGrid(tableElm);var cpos=getCellPos(grid,tdElm);var lastTDElm=null;if(grid.length>1&&grid[0].length<=1){tableElm.parentNode.removeChild(tableElm);return true;}for(var y=0;tdElm=getCell(grid,y,cpos.cellindex);y++){if(tdElm!=lastTDElm){var sd=getColRowSpan(tdElm);if(sd['colspan']>1)tdElm.colSpan=sd['colspan']-1;else{if(tdElm.parentNode)tdElm.parentNode.removeChild(tdElm);}lastTDElm=tdElm;}}cpos.cellindex--;if(cpos.cellindex<0)cpos.cellindex=0;inst.selection.selectNode(getCell(grid,0,cpos.cellindex),true,true);break;case"mceTableSplitCells":if(!trElm||!tdElm)return true;var spandata=getColRowSpan(tdElm);var colspan=spandata["colspan"];var rowspan=spandata["rowspan"];if(colspan>1||rowspan>1){tdElm.colSpan=1;for(var i=1;i<colspan;i++){var newTD=doc.createElement("td");newTD.innerHTML="&nbsp;";trElm.insertBefore(newTD,nextElm(tdElm,"TD,TH"));if(rowspan>1)addRows(newTD,trElm,rowspan);}addRows(tdElm,trElm,rowspan);}tableElm=tinyMCE.getParentElement(inst.getFocusElement(),"table");break;case"mceTableMergeCells":var rows=new Array();var sel=inst.getSel();var grid=getTableGrid(tableElm);if(tinyMCE.isMSIE||sel.rangeCount==1){if(user_interface){var template=new Array();var sp=getColRowSpan(tdElm);template['file']='../../plugins/table/merge_cells.htm';template['width']=250;template['height']=105+(tinyMCE.isNS7?25:0);template['width']+=tinyMCE.getLang('lang_table_merge_cells_delta_width',0);template['height']+=tinyMCE.getLang('lang_table_merge_cells_delta_height',0);tinyMCE.openWindow(template,{editor_id:inst.editorId,inline:"yes",action:"update",numcols:sp.colspan,numrows:sp.rowspan});return true;}else{var numRows=parseInt(value['numrows']);var numCols=parseInt(value['numcols']);var cpos=getCellPos(grid,tdElm);if((""+numRows)=="NaN")numRows=1;if((""+numCols)=="NaN")numCols=1;var tRows=tableElm.rows;for(var y=cpos.rowindex;y<grid.length;y++){var rowCells=new Array();for(var x=cpos.cellindex;x<grid[y].length;x++){var td=getCell(grid,y,x);if(td&&!inArray(rows,td)&&!inArray(rowCells,td)){var cp=getCellPos(grid,td);if(cp.cellindex<cpos.cellindex+numCols&&cp.rowindex<cpos.rowindex+numRows)rowCells[rowCells.length]=td;}}if(rowCells.length>0)rows[rows.length]=rowCells;}}}else{var cells=new Array();var sel=inst.getSel();var lastTR=null;var curRow=null;var x1=-1,y1=-1,x2,y2;if(sel.rangeCount<2)return true;for(var i=0;i<sel.rangeCount;i++){var rng=sel.getRangeAt(i);var tdElm=rng.startContainer.childNodes[rng.startOffset];if(!tdElm)break;if(tdElm.nodeName=="TD")cells[cells.length]=tdElm;}var tRows=tableElm.rows;for(var y=0;y<tRows.length;y++){var rowCells=new Array();for(var x=0;x<tRows[y].cells.length;x++){var td=tRows[y].cells[x];for(var i=0;i<cells.length;i++){if(td==cells[i]){rowCells[rowCells.length]=td;}}}if(rowCells.length>0)rows[rows.length]=rowCells;}var curRow=new Array();var lastTR=null;for(var y=0;y<grid.length;y++){for(var x=0;x<grid[y].length;x++){grid[y][x]._selected=false;for(var i=0;i<cells.length;i++){if(grid[y][x]==cells[i]){if(x1==-1){x1=x;y1=y;}x2=x;y2=y;grid[y][x]._selected=true;}}}}for(var y=y1;y<=y2;y++){for(var x=x1;x<=x2;x++){if(!grid[y][x]._selected){alert("Invalid selection for merge.");return true;}}}}var rowSpan=1,colSpan=1;var lastRowSpan=-1;for(var y=0;y<rows.length;y++){var rowColSpan=0;for(var x=0;x<rows[y].length;x++){var sd=getColRowSpan(rows[y][x]);rowColSpan+=sd['colspan'];if(lastRowSpan!=-1&&sd['rowspan']!=lastRowSpan){alert("Invalid selection for merge.");return true;}lastRowSpan=sd['rowspan'];}if(rowColSpan>colSpan)colSpan=rowColSpan;lastRowSpan=-1;}var lastColSpan=-1;for(var x=0;x<rows[0].length;x++){var colRowSpan=0;for(var y=0;y<rows.length;y++){var sd=getColRowSpan(rows[y][x]);colRowSpan+=sd['rowspan'];if(lastColSpan!=-1&&sd['colspan']!=lastColSpan){alert("Invalid selection for merge.");return true;}lastColSpan=sd['colspan'];}if(colRowSpan>rowSpan)rowSpan=colRowSpan;lastColSpan=-1;}tdElm=rows[0][0];tdElm.rowSpan=rowSpan;tdElm.colSpan=colSpan;for(var y=0;y<rows.length;y++){for(var x=0;x<rows[y].length;x++){var html=rows[y][x].innerHTML;var chk=tinyMCE.regexpReplace(html,"[ \t\r\n]","");if(chk!="<br/>"&&chk!="<br>"&&chk!="&nbsp;"&&(x+y>0))tdElm.innerHTML+=html;if(rows[y][x]!=tdElm&&!rows[y][x]._deleted){var cpos=getCellPos(grid,rows[y][x]);var tr=rows[y][x].parentNode;tr.removeChild(rows[y][x]);rows[y][x]._deleted=true;if(!tr.hasChildNodes()){tr.parentNode.removeChild(tr);var lastCell=null;for(var x=0;cellElm=getCell(grid,cpos.rowindex,x);x++){if(cellElm!=lastCell&&cellElm.rowSpan>1)cellElm.rowSpan--;lastCell=cellElm;}if(tdElm.rowSpan>1)tdElm.rowSpan--;}}}}break;}tableElm=tinyMCE.getParentElement(inst.getFocusElement(),"table");tinyMCE.handleVisualAid(tableElm,true,tinyMCE.settings['visual'],tinyMCE.selectedInstance);tinyMCE.triggerNodeChange();inst.repaint();}return true;}return false;}};tinyMCE.addPlugin("table",TinyMCE_TablePlugin);
\ No newline at end of file

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/editor_plugin_src.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/editor_plugin_src.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/editor_plugin_src.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,1054 @@
+/**
+ * $RCSfile: editor_plugin_src.js,v $
+ * $Revision: 1.38 $
+ * $Date: 2006/02/11 18:53:51 $
+ *
+ * @author Moxiecode
+ * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
+ */
+
+/* Import plugin specific language pack */
+tinyMCE.importPluginLanguagePack('table', 'en,tr,ar,cs,da,de,el,es,fi,fr_ca,hu,it,ja,ko,nl,nb,pl,pt,pt_br,sv,tw,zh_cn,fr,de,he,nb,ru,ru_KOI8-R,ru_UTF-8,nn,cy,is,zh_tw,zh_tw_utf8,sk');
+
+var TinyMCE_TablePlugin = {
+	getInfo : function() {
+		return {
+			longname : 'Tables',
+			author : 'Moxiecode Systems',
+			authorurl : 'http://tinymce.moxiecode.com',
+			infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_table.html',
+			version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
+		};
+	},
+
+	initInstance : function(inst) {
+		if (tinyMCE.isGecko) {
+			var doc = inst.getDoc();
+			tinyMCE.addEvent(doc, "mouseup", TinyMCE_TablePlugin._mouseDownHandler);
+		}
+
+		inst.tableRowClipboard = null;
+	},
+
+	/**
+	 * Returns the HTML contents of the table control.
+	 */
+	getControlHTML : function(control_name) {
+		var controls = new Array(
+			['table', 'table.gif', 'lang_table_desc', 'mceInsertTable', true],
+			['delete_col', 'table_delete_col.gif', 'lang_table_delete_col_desc', 'mceTableDeleteCol'],
+			['delete_row', 'table_delete_row.gif', 'lang_table_delete_row_desc', 'mceTableDeleteRow'],
+			['col_after', 'table_insert_col_after.gif', 'lang_table_col_after_desc', 'mceTableInsertColAfter'],
+			['col_before', 'table_insert_col_before.gif', 'lang_table_col_before_desc', 'mceTableInsertColBefore'],
+			['row_after', 'table_insert_row_after.gif', 'lang_table_row_after_desc', 'mceTableInsertRowAfter'],
+			['row_before', 'table_insert_row_before.gif', 'lang_table_row_before_desc', 'mceTableInsertRowBefore'],
+			['row_props', 'table_row_props.gif', 'lang_table_row_desc', 'mceTableRowProps', true],
+			['cell_props', 'table_cell_props.gif', 'lang_table_cell_desc', 'mceTableCellProps', true],
+			['split_cells', 'table_split_cells.gif', 'lang_table_split_cells_desc', 'mceTableSplitCells', true],
+			['merge_cells', 'table_merge_cells.gif', 'lang_table_merge_cells_desc', 'mceTableMergeCells', true]);
+
+		// Render table control
+		for (var i=0; i<controls.length; i++) {
+			var but = controls[i];
+			var cmd = 'tinyMCE.execInstanceCommand(\'{$editor_id}\',\'' + but[3] + '\', ' + (but.length > 4 ? but[4] : false) + (but.length > 5 ? ', \'' + but[5] + '\'' : '') + ');return false;';
+
+			if (but[0] == control_name)
+				return tinyMCE.getButtonHTML(control_name, but[2], '{$pluginurl}/images/'+ but[1], but[3], (but.length > 4 ? but[4] : false));
+		}
+
+		// Special tablecontrols
+		if (control_name == "tablecontrols") {
+			var html = "";
+
+			html += tinyMCE.getControlHTML("table");
+			html += tinyMCE.getControlHTML("separator");
+			html += tinyMCE.getControlHTML("row_props");
+			html += tinyMCE.getControlHTML("cell_props");
+			html += tinyMCE.getControlHTML("separator");
+			html += tinyMCE.getControlHTML("row_before");
+			html += tinyMCE.getControlHTML("row_after");
+			html += tinyMCE.getControlHTML("delete_row");
+			html += tinyMCE.getControlHTML("separator");
+			html += tinyMCE.getControlHTML("col_before");
+			html += tinyMCE.getControlHTML("col_after");
+			html += tinyMCE.getControlHTML("delete_col");
+			html += tinyMCE.getControlHTML("separator");
+			html += tinyMCE.getControlHTML("split_cells");
+			html += tinyMCE.getControlHTML("merge_cells");
+
+			return html;
+		}
+
+		return "";
+	},
+
+	/**
+	 * Executes the table commands.
+	 */
+	execCommand : function(editor_id, element, command, user_interface, value) {
+		// Is table command
+		switch (command) {
+			case "mceInsertTable":
+			case "mceTableRowProps":
+			case "mceTableCellProps":
+			case "mceTableSplitCells":
+			case "mceTableMergeCells":
+			case "mceTableInsertRowBefore":
+			case "mceTableInsertRowAfter":
+			case "mceTableDeleteRow":
+			case "mceTableInsertColBefore":
+			case "mceTableInsertColAfter":
+			case "mceTableDeleteCol":
+			case "mceTableCutRow":
+			case "mceTableCopyRow":
+			case "mceTablePasteRowBefore":
+			case "mceTablePasteRowAfter":
+			case "mceTableDelete":
+				var inst = tinyMCE.getInstanceById(editor_id);
+
+				inst.execCommand('mceBeginUndoLevel');
+				TinyMCE_TablePlugin._doExecCommand(editor_id, element, command, user_interface, value);
+				inst.execCommand('mceEndUndoLevel');
+
+				return true;
+		}
+
+		// Pass to next handler in chain
+		return false;
+	},
+
+	handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {
+		var colspan = "1", rowspan = "1";
+
+		var inst = tinyMCE.getInstanceById(editor_id);
+
+		// Reset table controls
+		tinyMCE.switchClass(editor_id + '_table', 'mceButtonNormal');
+		tinyMCE.switchClass(editor_id + '_row_props', 'mceButtonDisabled');
+		tinyMCE.switchClass(editor_id + '_cell_props', 'mceButtonDisabled');
+		tinyMCE.switchClass(editor_id + '_row_before', 'mceButtonDisabled');
+		tinyMCE.switchClass(editor_id + '_row_after', 'mceButtonDisabled');
+		tinyMCE.switchClass(editor_id + '_delete_row', 'mceButtonDisabled');
+		tinyMCE.switchClass(editor_id + '_col_before', 'mceButtonDisabled');
+		tinyMCE.switchClass(editor_id + '_col_after', 'mceButtonDisabled');
+		tinyMCE.switchClass(editor_id + '_delete_col', 'mceButtonDisabled');
+		tinyMCE.switchClass(editor_id + '_split_cells', 'mceButtonDisabled');
+		tinyMCE.switchClass(editor_id + '_merge_cells', 'mceButtonDisabled');
+
+		// Within a td element
+		if (tdElm = tinyMCE.getParentElement(node, "td,th")) {
+			tinyMCE.switchClass(editor_id + '_cell_props', 'mceButtonSelected');
+			tinyMCE.switchClass(editor_id + '_row_before', 'mceButtonNormal');
+			tinyMCE.switchClass(editor_id + '_row_after', 'mceButtonNormal');
+			tinyMCE.switchClass(editor_id + '_delete_row', 'mceButtonNormal');
+			tinyMCE.switchClass(editor_id + '_col_before', 'mceButtonNormal');
+			tinyMCE.switchClass(editor_id + '_col_after', 'mceButtonNormal');
+			tinyMCE.switchClass(editor_id + '_delete_col', 'mceButtonNormal');
+
+			colspan = tinyMCE.getAttrib(tdElm, "colspan");
+			rowspan = tinyMCE.getAttrib(tdElm, "rowspan");
+
+			colspan = colspan == "" ? "1" : colspan;
+			rowspan = rowspan == "" ? "1" : rowspan;
+
+			if (colspan != "1" || rowspan != "1")
+				tinyMCE.switchClass(editor_id + '_split_cells', 'mceButtonNormal');
+		}
+
+		// Within a tr element
+		if (tinyMCE.getParentElement(node, "tr"))
+			tinyMCE.switchClass(editor_id + '_row_props', 'mceButtonSelected');
+
+		// Within table
+		if (tinyMCE.getParentElement(node, "table")) {
+			tinyMCE.switchClass(editor_id + '_table', 'mceButtonSelected');
+			tinyMCE.switchClass(editor_id + '_merge_cells', 'mceButtonNormal');
+		}
+	},
+
+	// Private plugin internal methods
+
+	_mouseDownHandler : function(e) {
+		var elm = tinyMCE.isMSIE ? event.srcElement : e.target;
+		var focusElm = tinyMCE.selectedInstance.getFocusElement();
+
+		// If press on special Mozilla create TD/TR thingie
+		if (elm.nodeName == "BODY" && (focusElm.nodeName == "TD" || focusElm.nodeName == "TH" || (focusElm.parentNode && focusElm.parentNode.nodeName == "TD") ||(focusElm.parentNode && focusElm.parentNode.nodeName == "TH") )) {
+			window.setTimeout(function() {
+				var tableElm = tinyMCE.getParentElement(focusElm, "table");
+				tinyMCE.handleVisualAid(tableElm, true, tinyMCE.settings['visual'], tinyMCE.selectedInstance);
+			}, 10);
+		}
+	},
+
+	/**
+	 * Executes the table commands.
+	 */
+	_doExecCommand : function(editor_id, element, command, user_interface, value) {
+		var inst = tinyMCE.getInstanceById(editor_id);
+		var focusElm = inst.getFocusElement();
+		var trElm = tinyMCE.getParentElement(focusElm, "tr");
+		var tdElm = tinyMCE.getParentElement(focusElm, "td,th");
+		var tableElm = tinyMCE.getParentElement(focusElm, "table");
+		var doc = inst.contentWindow.document;
+		var tableBorder = tableElm ? tableElm.getAttribute("border") : "";
+
+		// Get first TD if no TD found
+		if (trElm && tdElm == null)
+			tdElm = trElm.cells[0];
+
+		// ------- Inner functions ---------
+		function inArray(ar, v) {
+			for (var i=0; i<ar.length; i++) {
+				// Is array
+				if (ar[i].length > 0 && inArray(ar[i], v))
+					return true;
+
+				// Found value
+				if (ar[i] == v)
+					return true;
+			}
+
+			return false;
+		}
+
+		function makeTD() {
+			var newTD = doc.createElement("td");
+			newTD.innerHTML = "&nbsp;";
+		}
+
+		function getColRowSpan(td) {
+			var colspan = tinyMCE.getAttrib(td, "colspan");
+			var rowspan = tinyMCE.getAttrib(td, "rowspan");
+
+			colspan = colspan == "" ? 1 : parseInt(colspan);
+			rowspan = rowspan == "" ? 1 : parseInt(rowspan);
+
+			return {colspan : colspan, rowspan : rowspan};
+		}
+
+		function getCellPos(grid, td) {
+			for (var y=0; y<grid.length; y++) {
+				for (var x=0; x<grid[y].length; x++) {
+					if (grid[y][x] == td)
+						return {cellindex : x, rowindex : y};
+				}
+			}
+
+			return null;
+		}
+
+		function getCell(grid, row, col) {
+			if (grid[row] && grid[row][col])
+				return grid[row][col];
+
+			return null;
+		}
+
+		function getTableGrid(table) {
+			var grid = new Array();
+			var rows = table.rows;
+
+			for (var y=0; y<rows.length; y++) {
+				for (var x=0; x<rows[y].cells.length; x++) {
+					var td = rows[y].cells[x];
+					var sd = getColRowSpan(td);
+
+					// All ready filled
+					for (xstart = x; grid[y] && grid[y][xstart]; xstart++) ;
+
+					// Fill box
+					for (var y2=y; y2<y+sd['rowspan']; y2++) {
+						if (!grid[y2])
+							grid[y2] = new Array();
+
+						for (var x2=xstart; x2<xstart+sd['colspan']; x2++) {
+							grid[y2][x2] = td;
+						}
+					}
+				}
+			}
+
+			return grid;
+		}
+
+		function trimRow(table, tr, td, new_tr) {
+			var grid = getTableGrid(table);
+			var cpos = getCellPos(grid, td);
+
+			// Time to crop away some
+			if (new_tr.cells.length != tr.childNodes.length) {
+				var cells = tr.childNodes;
+				var lastElm = null;
+
+				for (var x=0; td = getCell(grid, cpos.rowindex, x); x++) {
+					var remove = true;
+					var sd = getColRowSpan(td);
+
+					// Remove due to rowspan
+					if (inArray(cells, td)) {
+						new_tr.childNodes[x]._delete = true;
+					} else if ((lastElm == null || td != lastElm) && sd.colspan > 1) { // Remove due to colspan
+						for (var i=x; i<x+td.colSpan; i++)
+							new_tr.childNodes[i]._delete = true;
+					}
+
+					if ((lastElm == null || td != lastElm) && sd.rowspan > 1)
+						td.rowSpan = sd.rowspan + 1;
+
+					lastElm = td;
+				}
+
+				deleteMarked(tableElm);
+			}
+		}
+
+		function prevElm(node, name) {
+			while ((node = node.previousSibling) != null) {
+				if (node.nodeName == name)
+					return node;
+			}
+
+			return null;
+		}
+
+		function nextElm(node, names) {
+			var namesAr = names.split(',');
+
+			while ((node = node.nextSibling) != null) {
+				for (var i=0; i<namesAr.length; i++) {
+					if (node.nodeName.toLowerCase() == namesAr[i].toLowerCase() )
+						return node;
+				}
+			}
+
+			return null;
+		}
+
+		function deleteMarked(tbl) {
+			if (tbl.rows == 0)
+				return;
+
+			var tr = tbl.rows[0];
+			do {
+				var next = nextElm(tr, "TR");
+
+				// Delete row
+				if (tr._delete) {
+					tr.parentNode.removeChild(tr);
+					continue;
+				}
+
+				// Delete cells
+				var td = tr.cells[0];
+				if (td.cells > 1) {
+					do {
+						var nexttd = nextElm(td, "TD,TH");
+
+						if (td._delete)
+							td.parentNode.removeChild(td);
+					} while ((td = nexttd) != null);
+				}
+			} while ((tr = next) != null);
+		}
+
+		function addRows(td_elm, tr_elm, rowspan) {
+			// Add rows
+			td_elm.rowSpan = 1;
+			var trNext = nextElm(tr_elm, "TR");
+			for (var i=1; i<rowspan && trNext; i++) {
+				var newTD = doc.createElement("td");
+				newTD.innerHTML = "&nbsp;";
+
+				if (tinyMCE.isMSIE)
+					trNext.insertBefore(newTD, trNext.cells(td_elm.cellIndex));
+				else
+					trNext.insertBefore(newTD, trNext.cells[td_elm.cellIndex]);
+
+				trNext = nextElm(trNext, "TR");
+			}
+		}
+
+		function copyRow(doc, table, tr) {
+			var grid = getTableGrid(table);
+			var newTR = tr.cloneNode(false);
+			var cpos = getCellPos(grid, tr.cells[0]);
+			var lastCell = null;
+			var tableBorder = tinyMCE.getAttrib(table, "border");
+			var tdElm = null;
+
+			for (var x=0; tdElm = getCell(grid, cpos.rowindex, x); x++) {
+				var newTD = null;
+
+				if (lastCell != tdElm) {
+					for (var i=0; i<tr.cells.length; i++) {
+						if (tdElm == tr.cells[i]) {
+							newTD = tdElm.cloneNode(true);
+							break;
+						}
+					}
+				}
+
+				if (newTD == null) {
+					newTD = doc.createElement("td");
+					newTD.innerHTML = "&nbsp;";
+				}
+
+				// Reset col/row span
+				newTD.colSpan = 1;
+				newTD.rowSpan = 1;
+
+				newTR.appendChild(newTD);
+
+				lastCell = tdElm;
+			}
+
+			return newTR;
+		}
+
+		// ---- Commands -----
+
+		// Handle commands
+		switch (command) {
+			case "mceTableRowProps":
+				if (trElm == null)
+					return true;
+
+				if (user_interface) {
+					// Setup template
+					var template = new Array();
+
+					template['file'] = '../../plugins/table/row.htm';
+					template['width'] = 380;
+					template['height'] = 295;
+
+					// Language specific width and height addons
+					template['width'] += tinyMCE.getLang('lang_table_rowprops_delta_width', 0);
+					template['height'] += tinyMCE.getLang('lang_table_rowprops_delta_height', 0);
+
+					// Open window
+					tinyMCE.openWindow(template, {editor_id : inst.editorId, inline : "yes"});
+				}
+
+				return true;
+
+			case "mceTableCellProps":
+				if (tdElm == null)
+					return true;
+
+				if (user_interface) {
+					// Setup template
+					var template = new Array();
+
+					template['file'] = '../../plugins/table/cell.htm';
+					template['width'] = 380;
+					template['height'] = 295;
+
+					// Language specific width and height addons
+					template['width'] += tinyMCE.getLang('lang_table_cellprops_delta_width', 0);
+					template['height'] += tinyMCE.getLang('lang_table_cellprops_delta_height', 0);
+
+					// Open window
+					tinyMCE.openWindow(template, {editor_id : inst.editorId, inline : "yes"});
+				}
+
+				return true;
+
+			case "mceInsertTable":
+				if (user_interface) {
+					// Setup template
+					var template = new Array();
+
+					template['file'] = '../../plugins/table/table.htm';
+					template['width'] = 380;
+					template['height'] = 295;
+
+					// Language specific width and height addons
+					template['width'] += tinyMCE.getLang('lang_table_table_delta_width', 0);
+					template['height'] += tinyMCE.getLang('lang_table_table_delta_height', 0);
+
+					// Open window
+					tinyMCE.openWindow(template, {editor_id : inst.editorId, inline : "yes", action : value});
+				}
+
+				return true;
+
+			case "mceTableDelete":
+				var table = tinyMCE.getParentElement(inst.getFocusElement(), "table");
+				if (table) {
+					table.parentNode.removeChild(table);
+					inst.repaint();
+				}
+				return true;
+
+			case "mceTableSplitCells":
+			case "mceTableMergeCells":
+			case "mceTableInsertRowBefore":
+			case "mceTableInsertRowAfter":
+			case "mceTableDeleteRow":
+			case "mceTableInsertColBefore":
+			case "mceTableInsertColAfter":
+			case "mceTableDeleteCol":
+			case "mceTableCutRow":
+			case "mceTableCopyRow":
+			case "mceTablePasteRowBefore":
+			case "mceTablePasteRowAfter":
+				// No table just return (invalid command)
+				if (!tableElm)
+					return true;
+
+				// Table has a tbody use that reference
+				// Changed logic by ApTest 2005.07.12 (www.aptest.com)
+				// Now lookk at the focused element and take its parentNode.  That will be a tbody or a table.
+				if (tableElm != trElm.parentNode)
+					tableElm = trElm.parentNode;
+
+				if (tableElm && trElm) {
+					switch (command) {
+						case "mceTableInsertRowBefore":
+							if (!trElm || !tdElm)
+								return true;
+
+							var grid = getTableGrid(tableElm);
+							var cpos = getCellPos(grid, tdElm);
+							var newTR = doc.createElement("tr");
+							var lastTDElm = null;
+
+							cpos.rowindex--;
+							if (cpos.rowindex < 0)
+								cpos.rowindex = 0;
+
+							// Create cells
+							for (var x=0; tdElm = getCell(grid, cpos.rowindex, x); x++) {
+								if (tdElm != lastTDElm) {
+									var sd = getColRowSpan(tdElm);
+
+									if (sd['rowspan'] == 1) {
+										var newTD = doc.createElement("td");
+
+										newTD.innerHTML = "&nbsp;";
+										newTD.colSpan = tdElm.colSpan;
+
+										newTR.appendChild(newTD);
+									} else
+										tdElm.rowSpan = sd['rowspan'] + 1;
+
+									lastTDElm = tdElm;
+								}
+							}
+
+							trElm.parentNode.insertBefore(newTR, trElm);
+						break;
+
+						case "mceTableCutRow":
+							if (!trElm || !tdElm)
+								return true;
+
+							inst.tableRowClipboard = copyRow(doc, tableElm, trElm);
+							inst.execCommand("mceTableDeleteRow");
+							break;
+
+						case "mceTableCopyRow":
+							if (!trElm || !tdElm)
+								return true;
+
+							inst.tableRowClipboard = copyRow(doc, tableElm, trElm);
+							break;
+
+						case "mceTablePasteRowBefore":
+							if (!trElm || !tdElm)
+								return true;
+
+							var newTR = inst.tableRowClipboard.cloneNode(true);
+
+							var prevTR = prevElm(trElm, "TR");
+							if (prevTR != null)
+								trimRow(tableElm, prevTR, prevTR.cells[0], newTR);
+
+							trElm.parentNode.insertBefore(newTR, trElm);
+							break;
+
+						case "mceTablePasteRowAfter":
+							if (!trElm || !tdElm)
+								return true;
+							
+							var nextTR = nextElm(trElm, "TR");
+							var newTR = inst.tableRowClipboard.cloneNode(true);
+
+							trimRow(tableElm, trElm, tdElm, newTR);
+
+							if (nextTR == null)
+								trElm.parentNode.appendChild(newTR);
+							else
+								nextTR.parentNode.insertBefore(newTR, nextTR);
+
+							break;
+
+						case "mceTableInsertRowAfter":
+							if (!trElm || !tdElm)
+								return true;
+
+							var grid = getTableGrid(tableElm);
+							var cpos = getCellPos(grid, tdElm);
+							var newTR = doc.createElement("tr");
+							var lastTDElm = null;
+
+							// Create cells
+							for (var x=0; tdElm = getCell(grid, cpos.rowindex, x); x++) {
+								if (tdElm != lastTDElm) {
+									var sd = getColRowSpan(tdElm);
+
+									if (sd['rowspan'] == 1) {
+										var newTD = doc.createElement("td");
+
+										newTD.innerHTML = "&nbsp;";
+										newTD.colSpan = tdElm.colSpan;
+
+										newTR.appendChild(newTD);
+									} else
+										tdElm.rowSpan = sd['rowspan'] + 1;
+
+									lastTDElm = tdElm;
+								}
+							}
+
+							if (newTR.hasChildNodes()) {
+								var nextTR = nextElm(trElm, "TR");
+								if (nextTR)
+									nextTR.parentNode.insertBefore(newTR, nextTR);
+								else
+									tableElm.appendChild(newTR);
+							}
+						break;
+
+						case "mceTableDeleteRow":
+							if (!trElm || !tdElm)
+								return true;
+		
+							var grid = getTableGrid(tableElm);
+							var cpos = getCellPos(grid, tdElm);
+
+							// Only one row, remove whole table
+							if (grid.length == 1) {
+								tableElm.parentNode.removeChild(tableElm);
+								return true;
+							}
+
+							// Move down row spanned cells
+							var cells = trElm.cells;
+							var nextTR = nextElm(trElm, "TR");
+							for (var x=0; x<cells.length; x++) {
+								if (cells[x].rowSpan > 1) {
+									var newTD = cells[x].cloneNode(true);
+									var sd = getColRowSpan(cells[x]);
+
+									newTD.rowSpan = sd.rowspan - 1;
+
+									var nextTD = nextTR.cells[x];
+
+									if (nextTD == null)
+										nextTR.appendChild(newTD);
+									else
+										nextTR.insertBefore(newTD, nextTD);
+								}
+							}
+
+							// Delete cells
+							var lastTDElm = null;
+							for (var x=0; tdElm = getCell(grid, cpos.rowindex, x); x++) {
+								if (tdElm != lastTDElm) {
+									var sd = getColRowSpan(tdElm);
+
+									if (sd.rowspan > 1) {
+										tdElm.rowSpan = sd.rowspan - 1;
+									} else {
+										trElm = tdElm.parentNode;
+
+										if (trElm.parentNode)
+											trElm._delete = true;
+									}
+
+									lastTDElm = tdElm;
+								}
+							}
+
+							deleteMarked(tableElm);
+
+							cpos.rowindex--;
+							if (cpos.rowindex < 0)
+								cpos.rowindex = 0;
+
+							inst.selection.selectNode(getCell(grid, cpos.rowindex, 0), true, true);
+						break;
+
+						case "mceTableInsertColBefore":
+							if (!trElm || !tdElm)
+								return true;
+
+							var grid = getTableGrid(tableElm);
+							var cpos = getCellPos(grid, tdElm);
+							var lastTDElm = null;
+
+							for (var y=0; tdElm = getCell(grid, y, cpos.cellindex); y++) {
+								if (tdElm != lastTDElm) {
+									var sd = getColRowSpan(tdElm);
+
+									if (sd['colspan'] == 1) {
+										var newTD = doc.createElement(tdElm.nodeName);
+
+										newTD.innerHTML = "&nbsp;";
+										newTD.rowSpan = tdElm.rowSpan;
+
+										tdElm.parentNode.insertBefore(newTD, tdElm);
+									} else
+										tdElm.colSpan++;
+
+									lastTDElm = tdElm;
+								}
+							}
+						break;
+
+						case "mceTableInsertColAfter":
+							if (!trElm || !tdElm)
+								return true;
+
+							var grid = getTableGrid(tableElm);
+							var cpos = getCellPos(grid, tdElm);
+							var lastTDElm = null;
+
+							for (var y=0; tdElm = getCell(grid, y, cpos.cellindex); y++) {
+								if (tdElm != lastTDElm) {
+									var sd = getColRowSpan(tdElm);
+
+									if (sd['colspan'] == 1) {
+										var newTD = doc.createElement(tdElm.nodeName);
+
+										newTD.innerHTML = "&nbsp;";
+										newTD.rowSpan = tdElm.rowSpan;
+
+										var nextTD = nextElm(tdElm, "TD,TH");
+										if (nextTD == null)
+											tdElm.parentNode.appendChild(newTD);
+										else
+											nextTD.parentNode.insertBefore(newTD, nextTD);
+									} else
+										tdElm.colSpan++;
+
+									lastTDElm = tdElm;
+								}
+							}
+						break;
+
+						case "mceTableDeleteCol":
+							if (!trElm || !tdElm)
+								return true;
+
+							var grid = getTableGrid(tableElm);
+							var cpos = getCellPos(grid, tdElm);
+							var lastTDElm = null;
+
+							// Only one col, remove whole table
+							if (grid.length > 1 && grid[0].length <= 1) {
+								tableElm.parentNode.removeChild(tableElm);
+								return true;
+							}
+
+							// Delete cells
+							for (var y=0; tdElm = getCell(grid, y, cpos.cellindex); y++) {
+								if (tdElm != lastTDElm) {
+									var sd = getColRowSpan(tdElm);
+
+									if (sd['colspan'] > 1)
+										tdElm.colSpan = sd['colspan'] - 1;
+									else {
+										if (tdElm.parentNode)
+											tdElm.parentNode.removeChild(tdElm);
+									}
+
+									lastTDElm = tdElm;
+								}
+							}
+
+							cpos.cellindex--;
+							if (cpos.cellindex < 0)
+								cpos.cellindex = 0;
+
+							inst.selection.selectNode(getCell(grid, 0, cpos.cellindex), true, true);
+						break;
+
+					case "mceTableSplitCells":
+						if (!trElm || !tdElm)
+							return true;
+
+						var spandata = getColRowSpan(tdElm);
+
+						var colspan = spandata["colspan"];
+						var rowspan = spandata["rowspan"];
+
+						// Needs splitting
+						if (colspan > 1 || rowspan > 1) {
+							// Generate cols
+							tdElm.colSpan = 1;
+							for (var i=1; i<colspan; i++) {
+								var newTD = doc.createElement("td");
+
+								newTD.innerHTML = "&nbsp;";
+
+								trElm.insertBefore(newTD, nextElm(tdElm, "TD,TH"));
+
+								if (rowspan > 1)
+									addRows(newTD, trElm, rowspan);
+							}
+
+							addRows(tdElm, trElm, rowspan);
+						}
+
+						// Apply visual aids
+						tableElm = tinyMCE.getParentElement(inst.getFocusElement(), "table");
+						break;
+
+					case "mceTableMergeCells":
+						var rows = new Array();
+						var sel = inst.getSel();
+						var grid = getTableGrid(tableElm);
+
+						if (tinyMCE.isMSIE || sel.rangeCount == 1) {
+							if (user_interface) {
+								// Setup template
+								var template = new Array();
+								var sp = getColRowSpan(tdElm);
+
+								template['file'] = '../../plugins/table/merge_cells.htm';
+								template['width'] = 250;
+								template['height'] = 105 + (tinyMCE.isNS7 ? 25 : 0);
+
+								// Language specific width and height addons
+								template['width'] += tinyMCE.getLang('lang_table_merge_cells_delta_width', 0);
+								template['height'] += tinyMCE.getLang('lang_table_merge_cells_delta_height', 0);
+
+								// Open window
+								tinyMCE.openWindow(template, {editor_id : inst.editorId, inline : "yes", action : "update", numcols : sp.colspan, numrows : sp.rowspan});
+
+								return true;
+							} else {
+								var numRows = parseInt(value['numrows']);
+								var numCols = parseInt(value['numcols']);
+								var cpos = getCellPos(grid, tdElm);
+
+								if (("" + numRows) == "NaN")
+									numRows = 1;
+
+								if (("" + numCols) == "NaN")
+									numCols = 1;
+
+								// Get rows and cells
+								var tRows = tableElm.rows;
+								for (var y=cpos.rowindex; y<grid.length; y++) {
+									var rowCells = new Array();
+
+									for (var x=cpos.cellindex; x<grid[y].length; x++) {
+										var td = getCell(grid, y, x);
+
+										if (td && !inArray(rows, td) && !inArray(rowCells, td)) {
+											var cp = getCellPos(grid, td);
+
+											// Within range
+											if (cp.cellindex < cpos.cellindex+numCols && cp.rowindex < cpos.rowindex+numRows)
+												rowCells[rowCells.length] = td;
+										}
+									}
+
+									if (rowCells.length > 0)
+										rows[rows.length] = rowCells;
+								}
+
+								//return true;
+							}
+						} else {
+							var cells = new Array();
+							var sel = inst.getSel();
+							var lastTR = null;
+							var curRow = null;
+							var x1 = -1, y1 = -1, x2, y2;
+
+							// Only one cell selected, whats the point?
+							if (sel.rangeCount < 2)
+								return true;
+
+							// Get all selected cells
+							for (var i=0; i<sel.rangeCount; i++) {
+								var rng = sel.getRangeAt(i);
+								var tdElm = rng.startContainer.childNodes[rng.startOffset];
+
+								if (!tdElm)
+									break;
+
+								if (tdElm.nodeName == "TD")
+									cells[cells.length] = tdElm;
+							}
+
+							// Get rows and cells
+							var tRows = tableElm.rows;
+							for (var y=0; y<tRows.length; y++) {
+								var rowCells = new Array();
+
+								for (var x=0; x<tRows[y].cells.length; x++) {
+									var td = tRows[y].cells[x];
+
+									for (var i=0; i<cells.length; i++) {
+										if (td == cells[i]) {
+											rowCells[rowCells.length] = td;
+										}
+									}
+								}
+
+								if (rowCells.length > 0)
+									rows[rows.length] = rowCells;
+							}
+
+							// Find selected cells in grid and box
+							var curRow = new Array();
+							var lastTR = null;
+							for (var y=0; y<grid.length; y++) {
+								for (var x=0; x<grid[y].length; x++) {
+									grid[y][x]._selected = false;
+
+									for (var i=0; i<cells.length; i++) {
+										if (grid[y][x] == cells[i]) {
+											// Get start pos
+											if (x1 == -1) {
+												x1 = x;
+												y1 = y;
+											}
+
+											// Get end pos
+											x2 = x;
+											y2 = y;
+
+											grid[y][x]._selected = true;
+										}
+									}
+								}
+							}
+
+							// Is there gaps, if so deny
+							for (var y=y1; y<=y2; y++) {
+								for (var x=x1; x<=x2; x++) {
+									if (!grid[y][x]._selected) {
+										alert("Invalid selection for merge.");
+										return true;
+									}
+								}
+							}
+						}
+
+						// Validate selection and get total rowspan and colspan
+						var rowSpan = 1, colSpan = 1;
+
+						// Validate horizontal and get total colspan
+						var lastRowSpan = -1;
+						for (var y=0; y<rows.length; y++) {
+							var rowColSpan = 0;
+
+							for (var x=0; x<rows[y].length; x++) {
+								var sd = getColRowSpan(rows[y][x]);
+
+								rowColSpan += sd['colspan'];
+
+								if (lastRowSpan != -1 && sd['rowspan'] != lastRowSpan) {
+									alert("Invalid selection for merge.");
+									return true;
+								}
+
+								lastRowSpan = sd['rowspan'];
+							}
+
+							if (rowColSpan > colSpan)
+								colSpan = rowColSpan;
+
+							lastRowSpan = -1;
+						}
+
+						// Validate vertical and get total rowspan
+						var lastColSpan = -1;
+						for (var x=0; x<rows[0].length; x++) {
+							var colRowSpan = 0;
+
+							for (var y=0; y<rows.length; y++) {
+								var sd = getColRowSpan(rows[y][x]);
+
+								colRowSpan += sd['rowspan'];
+
+								if (lastColSpan != -1 && sd['colspan'] != lastColSpan) {
+									alert("Invalid selection for merge.");
+									return true;
+								}
+
+								lastColSpan = sd['colspan'];
+							}
+
+							if (colRowSpan > rowSpan)
+								rowSpan = colRowSpan;
+
+							lastColSpan = -1;
+						}
+
+						// Setup td
+						tdElm = rows[0][0];
+						tdElm.rowSpan = rowSpan;
+						tdElm.colSpan = colSpan;
+
+						// Merge cells
+						for (var y=0; y<rows.length; y++) {
+							for (var x=0; x<rows[y].length; x++) {
+								var html = rows[y][x].innerHTML;
+								var chk = tinyMCE.regexpReplace(html, "[ \t\r\n]", "");
+
+								if (chk != "<br/>" && chk != "<br>" && chk != "&nbsp;" && (x+y > 0))
+									tdElm.innerHTML += html;
+
+								// Not current cell
+								if (rows[y][x] != tdElm && !rows[y][x]._deleted) {
+									var cpos = getCellPos(grid, rows[y][x]);
+									var tr = rows[y][x].parentNode;
+
+									tr.removeChild(rows[y][x]);
+									rows[y][x]._deleted = true;
+
+									// Empty TR, remove it
+									if (!tr.hasChildNodes()) {
+										tr.parentNode.removeChild(tr);
+
+										var lastCell = null;
+										for (var x=0; cellElm = getCell(grid, cpos.rowindex, x); x++) {
+											if (cellElm != lastCell && cellElm.rowSpan > 1)
+												cellElm.rowSpan--;
+
+											lastCell = cellElm;
+										}
+
+										if (tdElm.rowSpan > 1)
+											tdElm.rowSpan--;
+									}
+								}
+							}
+						}
+
+						break;
+					}
+
+					tableElm = tinyMCE.getParentElement(inst.getFocusElement(), "table");
+					tinyMCE.handleVisualAid(tableElm, true, tinyMCE.settings['visual'], tinyMCE.selectedInstance);
+					tinyMCE.triggerNodeChange();
+					inst.repaint();
+				}
+
+			return true;
+		}
+
+		// Pass to next handler in chain
+		return false;
+	}
+};
+
+tinyMCE.addPlugin("table", TinyMCE_TablePlugin);

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/images/buttons.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/images/buttons.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/images/table.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/images/table.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/images/table_cell_props.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/images/table_cell_props.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/images/table_delete.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/images/table_delete.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/images/table_delete_col.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/images/table_delete_col.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/images/table_delete_row.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/images/table_delete_row.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/images/table_insert_col_after.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/images/table_insert_col_after.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/images/table_insert_col_before.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/images/table_insert_col_before.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/images/table_insert_row_after.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/images/table_insert_row_after.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/images/table_insert_row_before.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/images/table_insert_row_before.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/images/table_merge_cells.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/images/table_merge_cells.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/images/table_row_props.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/images/table_row_props.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/images/table_split_cells.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/images/table_split_cells.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/jscripts/cell.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/jscripts/cell.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/jscripts/cell.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,249 @@
+function init() {
+	tinyMCEPopup.resizeToInnerSize();
+
+	document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table');
+	document.getElementById('bordercolor_pickcontainer').innerHTML = getColorPickerHTML('bordercolor_pick','bordercolor');
+	document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor')
+
+	var inst = tinyMCE.selectedInstance;
+	var tdElm = tinyMCE.getParentElement(inst.getFocusElement(), "td,th");
+	var formObj = document.forms[0];
+	var st = tinyMCE.parseStyle(tinyMCE.getAttrib(tdElm, "style"));
+
+	// Get table cell data
+	var celltype = tdElm.nodeName.toLowerCase();
+	var align = tinyMCE.getAttrib(tdElm, 'align');
+	var valign = tinyMCE.getAttrib(tdElm, 'valign');
+	var width = trimSize(getStyle(tdElm, 'width', 'width'));
+	var height = trimSize(getStyle(tdElm, 'height', 'height'));
+	var bordercolor = convertRGBToHex(getStyle(tdElm, 'bordercolor', 'borderLeftColor'));
+	var bgcolor = convertRGBToHex(getStyle(tdElm, 'bgcolor', 'backgroundColor'));
+	var className = tinyMCE.getVisualAidClass(tinyMCE.getAttrib(tdElm, 'class'), false);
+	var backgroundimage = getStyle(tdElm, 'background', 'backgroundImage').replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");;
+	var id = tinyMCE.getAttrib(tdElm, 'id');
+	var lang = tinyMCE.getAttrib(tdElm, 'lang');
+	var dir = tinyMCE.getAttrib(tdElm, 'dir');
+	var scope = tinyMCE.getAttrib(tdElm, 'scope');
+
+	// Setup form
+	addClassesToList('class', 'table_cell_styles');
+	formObj.bordercolor.value = bordercolor;
+	formObj.bgcolor.value = bgcolor;
+	formObj.backgroundimage.value = backgroundimage;
+	formObj.width.value = width;
+	formObj.height.value = height;
+	formObj.id.value = id;
+	formObj.lang.value = lang;
+	formObj.style.value = tinyMCE.serializeStyle(st);
+	selectByValue(formObj, 'align', align);
+	selectByValue(formObj, 'valign', valign);
+	selectByValue(formObj, 'class', className);
+	selectByValue(formObj, 'celltype', celltype);
+	selectByValue(formObj, 'dir', dir);
+	selectByValue(formObj, 'scope', scope);
+
+	// Resize some elements
+	if (isVisible('backgroundimagebrowser'))
+		document.getElementById('backgroundimage').style.width = '180px';
+
+	updateColor('bordercolor_pick', 'bordercolor');
+	updateColor('bgcolor_pick', 'bgcolor');
+}
+
+function updateAction() {
+	tinyMCEPopup.restoreSelection();
+
+	var inst = tinyMCE.selectedInstance;
+	var tdElm = tinyMCE.getParentElement(inst.getFocusElement(), "td,th");
+	var trElm = tinyMCE.getParentElement(inst.getFocusElement(), "tr");
+	var tableElm = tinyMCE.getParentElement(inst.getFocusElement(), "table");
+	var formObj = document.forms[0];
+
+	inst.execCommand('mceBeginUndoLevel');
+
+	switch (getSelectValue(formObj, 'action')) {
+		case "cell":
+			var celltype = getSelectValue(formObj, 'celltype');
+			var scope = getSelectValue(formObj, 'scope');
+
+			if (tinyMCE.getParam("accessibility_warnings")) {
+				if (celltype == "th" && scope == "")
+					var answer = confirm(tinyMCE.getLang('lang_table_missing_scope', '', true));
+				else
+					var answer = true;
+
+				if (!answer)
+					return;
+			}
+
+			updateCell(tdElm);
+			break;
+
+		case "row":
+			var cell = trElm.firstChild;
+
+			if (cell.nodeName != "TD" && cell.nodeName != "TH")
+				cell = nextCell(cell);
+
+			do {
+				cell = updateCell(cell, true);
+			} while ((cell = nextCell(cell)) != null);
+
+			break;
+
+		case "all":
+			var rows = tableElm.getElementsByTagName("tr");
+
+			for (var i=0; i<rows.length; i++) {
+				var cell = rows[i].firstChild;
+
+				if (cell.nodeName != "TD" && cell.nodeName != "TH")
+					cell = nextCell(cell);
+
+				do {
+					cell = updateCell(cell, true);
+				} while ((cell = nextCell(cell)) != null);
+			}
+
+			break;
+	}
+
+	tinyMCE.handleVisualAid(inst.getBody(), true, inst.visualAid, inst);
+	tinyMCE.triggerNodeChange();
+	inst.execCommand('mceEndUndoLevel');
+	tinyMCEPopup.close();
+}
+
+function nextCell(elm) {
+	while ((elm = elm.nextSibling) != null) {
+		if (elm.nodeName == "TD" || elm.nodeName == "TH")
+			return elm;
+	}
+
+	return null;
+}
+
+function updateCell(td, skip_id) {
+	var inst = tinyMCE.selectedInstance;
+	var formObj = document.forms[0];
+	var curCellType = td.nodeName.toLowerCase();
+	var celltype = getSelectValue(formObj, 'celltype');
+	var doc = inst.getDoc();
+
+	if (!skip_id)
+		td.setAttribute('id', formObj.id.value);
+
+	td.setAttribute('align', formObj.align.value);
+	td.setAttribute('vAlign', formObj.valign.value);
+	td.setAttribute('lang', formObj.lang.value);
+	td.setAttribute('dir', getSelectValue(formObj, 'dir'));
+	td.setAttribute('style', tinyMCE.serializeStyle(tinyMCE.parseStyle(formObj.style.value)));
+	td.setAttribute('scope', formObj.scope.value);
+	tinyMCE.setAttrib(td, 'class', getSelectValue(formObj, 'class'));
+
+	// Clear deprecated attributes
+	tinyMCE.setAttrib(td, 'width', '');
+	tinyMCE.setAttrib(td, 'height', '');
+	tinyMCE.setAttrib(td, 'bgColor', '');
+	tinyMCE.setAttrib(td, 'borderColor', '');
+	tinyMCE.setAttrib(td, 'background', '');
+
+	// Set styles
+	td.style.width = getCSSSize(formObj.width.value);
+	td.style.height = getCSSSize(formObj.height.value);
+	if (formObj.bordercolor.value != "") {
+		td.style.borderColor = formObj.bordercolor.value;
+		td.style.borderStyle = td.style.borderStyle == "" ? "solid" : td.style.borderStyle;
+		td.style.borderWidth = td.style.borderWidth == "" ? "1px" : td.style.borderWidth;
+	} else
+		td.style.borderColor = '';
+
+	td.style.backgroundColor = formObj.bgcolor.value;
+
+	if (formObj.backgroundimage.value != "")
+		td.style.backgroundImage = "url('" + formObj.backgroundimage.value + "')";
+	else
+		td.style.backgroundImage = '';
+
+	if (curCellType != celltype) {
+		// changing to a different node type
+		var newCell = doc.createElement(celltype);
+
+		for (var c=0; c<td.childNodes.length; c++)
+			newCell.appendChild(td.childNodes[c].cloneNode(1));
+
+		for (var a=0; a<td.attributes.length; a++) {
+			var attr = td.attributes[a];
+			newCell.setAttribute(attr.name, attr.value);
+		}
+
+		td.parentNode.replaceChild(newCell, td);
+		td = newCell;
+	}
+
+	return td;
+}
+
+function changedBackgroundImage() {
+	var formObj = document.forms[0];
+	var st = tinyMCE.parseStyle(formObj.style.value);
+
+	st['background-image'] = "url('" + formObj.backgroundimage.value + "')";
+
+	formObj.style.value = tinyMCE.serializeStyle(st);
+}
+
+function changedSize() {
+	var formObj = document.forms[0];
+	var st = tinyMCE.parseStyle(formObj.style.value);
+
+	var width = formObj.width.value;
+	if (width != "")
+		st['width'] = getCSSSize(width);
+	else
+		st['width'] = "";
+
+	var height = formObj.height.value;
+	if (height != "")
+		st['height'] = getCSSSize(height);
+	else
+		st['height'] = "";
+
+	formObj.style.value = tinyMCE.serializeStyle(st);
+}
+
+function changedColor() {
+	var formObj = document.forms[0];
+	var st = tinyMCE.parseStyle(formObj.style.value);
+
+	st['background-color'] = formObj.bgcolor.value;
+	st['border-color'] = formObj.bordercolor.value;
+
+	formObj.style.value = tinyMCE.serializeStyle(st);
+}
+
+function changedStyle() {
+	var formObj = document.forms[0];
+	var st = tinyMCE.parseStyle(formObj.style.value);
+
+	if (st['background-image'])
+		formObj.backgroundimage.value = st['background-image'].replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");
+	else
+		formObj.backgroundimage.value = '';
+
+	if (st['width'])
+		formObj.width.value = trimSize(st['width']);
+
+	if (st['height'])
+		formObj.height.value = trimSize(st['height']);
+
+	if (st['background-color']) {
+		formObj.bgcolor.value = st['background-color'];
+		updateColor('bgcolor_pick','bgcolor');
+	}
+
+	if (st['border-color']) {
+		formObj.bordercolor.value = st['border-color'];
+		updateColor('bordercolor_pick','bordercolor');
+	}
+}

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/jscripts/merge_cells.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/jscripts/merge_cells.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/jscripts/merge_cells.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,19 @@
+function init() {
+	tinyMCEPopup.resizeToInnerSize();
+
+	var formObj = document.forms[0];
+
+	formObj.numcols.value = tinyMCE.getWindowArg('numcols', 1);
+	formObj.numrows.value = tinyMCE.getWindowArg('numrows', 1);
+}
+
+function mergeCells() {
+	var args = new Array();
+	var formObj = document.forms[0];
+
+	args["numcols"] = formObj.numcols.value;
+	args["numrows"] = formObj.numrows.value;
+
+	tinyMCEPopup.execCommand("mceTableMergeCells", false, args);
+	tinyMCEPopup.close();
+}

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/jscripts/row.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/jscripts/row.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/jscripts/row.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,200 @@
+function init() {
+	tinyMCEPopup.resizeToInnerSize();
+
+	document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table');
+	document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor');
+
+	var inst = tinyMCE.selectedInstance;
+	var trElm = tinyMCE.getParentElement(inst.getFocusElement(), "tr");
+	var formObj = document.forms[0];
+	var st = tinyMCE.parseStyle(tinyMCE.getAttrib(trElm, "style"));
+
+	// Get table row data
+	var rowtype = trElm.parentNode.nodeName.toLowerCase();
+	var align = tinyMCE.getAttrib(trElm, 'align');
+	var valign = tinyMCE.getAttrib(trElm, 'valign');
+	var height = trimSize(getStyle(trElm, 'height', 'height'));
+	var className = tinyMCE.getVisualAidClass(tinyMCE.getAttrib(trElm, 'class'), false);
+	var bgcolor = convertRGBToHex(getStyle(trElm, 'bgcolor', 'backgroundColor'));
+	var backgroundimage = getStyle(trElm, 'background', 'backgroundImage').replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");;
+	var id = tinyMCE.getAttrib(trElm, 'id');
+	var lang = tinyMCE.getAttrib(trElm, 'lang');
+	var dir = tinyMCE.getAttrib(trElm, 'dir');
+
+	// Setup form
+	addClassesToList('class', 'table_row_styles');
+	formObj.bgcolor.value = bgcolor;
+	formObj.backgroundimage.value = backgroundimage;
+	formObj.height.value = height;
+	formObj.id.value = id;
+	formObj.lang.value = lang;
+	formObj.style.value = tinyMCE.serializeStyle(st);
+	selectByValue(formObj, 'align', align);
+	selectByValue(formObj, 'valign', valign);
+	selectByValue(formObj, 'class', className);
+	selectByValue(formObj, 'rowtype', rowtype);
+	selectByValue(formObj, 'dir', dir);
+
+	// Resize some elements
+	if (isVisible('backgroundimagebrowser'))
+		document.getElementById('backgroundimage').style.width = '180px';
+
+	updateColor('bgcolor_pick', 'bgcolor');
+}
+
+function updateAction() {
+	tinyMCEPopup.restoreSelection();
+
+	var inst = tinyMCE.selectedInstance;
+	var trElm = tinyMCE.getParentElement(inst.getFocusElement(), "tr");
+	var tableElm = tinyMCE.getParentElement(inst.getFocusElement(), "table");
+	var formObj = document.forms[0];
+	var action = getSelectValue(formObj, 'action');
+
+	inst.execCommand('mceBeginUndoLevel');
+
+	switch (action) {
+		case "row":
+			updateRow(trElm);
+			break;
+
+		case "all":
+			var rows = tableElm.getElementsByTagName("tr");
+
+			for (var i=0; i<rows.length; i++)
+				updateRow(rows[i], true);
+
+			break;
+
+		case "odd":
+		case "even":
+			var rows = tableElm.getElementsByTagName("tr");
+
+			for (var i=0; i<rows.length; i++) {
+				if ((i % 2 == 0 && action == "odd") || (i % 2 != 0 && action == "even"))
+					updateRow(rows[i], true, true);
+			}
+
+			break;
+	}
+
+	tinyMCE.handleVisualAid(inst.getBody(), true, inst.visualAid, inst);
+	tinyMCE.triggerNodeChange();
+	inst.execCommand('mceEndUndoLevel');
+	tinyMCEPopup.close();
+}
+
+function updateRow(tr_elm, skip_id, skip_parent) {
+	var inst = tinyMCE.selectedInstance;
+	var formObj = document.forms[0];
+	var curRowType = tr_elm.parentNode.nodeName.toLowerCase();
+	var rowtype = getSelectValue(formObj, 'rowtype');
+	var doc = inst.getDoc();
+
+	// Update row element
+	if (!skip_id)
+		tr_elm.setAttribute('id', formObj.id.value);
+
+	tr_elm.setAttribute('align', getSelectValue(formObj, 'align'));
+	tr_elm.setAttribute('vAlign', getSelectValue(formObj, 'valign'));
+	tr_elm.setAttribute('lang', formObj.lang.value);
+	tr_elm.setAttribute('dir', getSelectValue(formObj, 'dir'));
+	tr_elm.setAttribute('style', tinyMCE.serializeStyle(tinyMCE.parseStyle(formObj.style.value)));
+	tinyMCE.setAttrib(tr_elm, 'class', getSelectValue(formObj, 'class'));
+
+	// Clear deprecated attributes
+	tr_elm.setAttribute('background', '');
+	tr_elm.setAttribute('bgColor', '');
+	tr_elm.setAttribute('height', '');
+
+	// Set styles
+	tr_elm.style.height = getCSSSize(formObj.height.value);
+	tr_elm.style.backgroundColor = formObj.bgcolor.value;
+
+	if (formObj.backgroundimage.value != "")
+		tr_elm.style.backgroundImage = "url('" + formObj.backgroundimage.value + "')";
+	else
+		tr_elm.style.backgroundImage = '';
+
+	// Setup new rowtype
+	if (curRowType != rowtype && !skip_parent) {
+		// first, clone the node we are working on
+		var newRow = tr_elm.cloneNode(1);
+
+		// next, find the parent of its new destination (creating it if necessary)
+		var theTable = tinyMCE.getParentElement(tr_elm, "table");
+		var dest = rowtype;
+		var newParent = null;
+		for (var i = 0; i < theTable.childNodes.length; i++) {
+			if (theTable.childNodes[i].nodeName.toLowerCase() == dest)
+				newParent = theTable.childNodes[i];
+		}
+
+		if (newParent == null) {
+			newParent = doc.createElement(dest);
+
+			if (dest == "thead")
+				theTable.insertBefore(newParent, theTable.firstChild);
+			else
+				theTable.appendChild(newParent);
+		}
+
+		// append the row to the new parent
+		newParent.appendChild(newRow);
+
+		// remove the original
+		tr_elm.parentNode.removeChild(tr_elm);
+
+		// set tr_elm to the new node
+		tr_elm = newRow;
+	}
+}
+
+function changedBackgroundImage() {
+	var formObj = document.forms[0];
+	var st = tinyMCE.parseStyle(formObj.style.value);
+
+	st['background-image'] = "url('" + formObj.backgroundimage.value + "')";
+
+	formObj.style.value = tinyMCE.serializeStyle(st);
+}
+
+function changedStyle() {
+	var formObj = document.forms[0];
+	var st = tinyMCE.parseStyle(formObj.style.value);
+
+	if (st['background-image'])
+		formObj.backgroundimage.value = st['background-image'].replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");
+	else
+		formObj.backgroundimage.value = '';
+
+	if (st['height'])
+		formObj.height.value = trimSize(st['height']);
+
+	if (st['background-color']) {
+		formObj.bgcolor.value = st['background-color'];
+		updateColor('bgcolor_pick','bgcolor');
+	}
+}
+
+function changedSize() {
+	var formObj = document.forms[0];
+	var st = tinyMCE.parseStyle(formObj.style.value);
+
+	var height = formObj.height.value;
+	if (height != "")
+		st['height'] = getCSSSize(height);
+	else
+		st['height'] = "";
+
+	formObj.style.value = tinyMCE.serializeStyle(st);
+}
+
+function changedColor() {
+	var formObj = document.forms[0];
+	var st = tinyMCE.parseStyle(formObj.style.value);
+
+	st['background-color'] = formObj.bgcolor.value;
+
+	formObj.style.value = tinyMCE.serializeStyle(st);
+}

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/jscripts/table.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/jscripts/table.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/jscripts/table.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,344 @@
+var action, orgTableWidth, orgTableHeight;
+
+function insertTable() {
+	var formObj = document.forms[0];
+	var inst = tinyMCE.selectedInstance;
+	var cols = 2, rows = 2, border = 0, cellpadding = -1, cellspacing = -1, align, width, height, className;
+	var html = '';
+	var elm = tinyMCE.tableElm;
+	var cellLimit, rowLimit, colLimit;
+
+	tinyMCEPopup.restoreSelection();
+
+	// Get form data
+	cols = formObj.elements['cols'].value;
+	rows = formObj.elements['rows'].value;
+	border = formObj.elements['border'].value != "" ? formObj.elements['border'].value  : 0;
+	cellpadding = formObj.elements['cellpadding'].value != "" ? formObj.elements['cellpadding'].value : "";
+	cellspacing = formObj.elements['cellspacing'].value != "" ? formObj.elements['cellspacing'].value : "";
+	align = formObj.elements['align'].options[formObj.elements['align'].selectedIndex].value;
+	width = formObj.elements['width'].value;
+	height = formObj.elements['height'].value;
+	bordercolor = formObj.elements['bordercolor'].value;
+	bgcolor = formObj.elements['bgcolor'].value;
+	className = formObj.elements['class'].options[formObj.elements['class'].selectedIndex].value;
+	id = formObj.elements['id'].value;
+	summary = formObj.elements['summary'].value;
+	style = formObj.elements['style'].value;
+	dir = formObj.elements['dir'].value;
+	lang = formObj.elements['lang'].value;
+	background = formObj.elements['backgroundimage'].value;
+
+	cellLimit = tinyMCE.getParam('table_cell_limit', false);
+	rowLimit = tinyMCE.getParam('table_row_limit', false);
+	colLimit = tinyMCE.getParam('table_col_limit', false);
+
+	// Validate table size
+	if (colLimit && cols > colLimit) {
+		alert(tinyMCE.getLang('lang_table_col_limit', '', true, {cols : colLimit}));
+		return false;
+	} else if (rowLimit && rows > rowLimit) {
+		alert(tinyMCE.getLang('lang_table_row_limit', '', true, {rows : rowLimit}));
+		return false;
+	} else if (cellLimit && cols * rows > cellLimit) {
+		alert(tinyMCE.getLang('lang_table_cell_limit', '', true, {cells : cellLimit}));
+		return false;
+	}
+
+	// Update table
+	if (action == "update") {
+		inst.execCommand('mceBeginUndoLevel');
+
+		tinyMCE.setAttrib(elm, 'cellPadding', cellpadding, true);
+		tinyMCE.setAttrib(elm, 'cellSpacing', cellspacing, true);
+		tinyMCE.setAttrib(elm, 'border', border, true);
+		tinyMCE.setAttrib(elm, 'align', align);
+		tinyMCE.setAttrib(elm, 'class', className);
+		tinyMCE.setAttrib(elm, 'style', style);
+		tinyMCE.setAttrib(elm, 'id', id);
+		tinyMCE.setAttrib(elm, 'summary', summary);
+		tinyMCE.setAttrib(elm, 'dir', dir);
+		tinyMCE.setAttrib(elm, 'lang', lang);
+
+		// Not inline styles
+		if (!tinyMCE.getParam("inline_styles"))
+			tinyMCE.setAttrib(elm, 'width', width, true);
+
+		// Remove these since they are not valid XHTML
+		tinyMCE.setAttrib(elm, 'borderColor', '');
+		tinyMCE.setAttrib(elm, 'bgColor', '');
+		tinyMCE.setAttrib(elm, 'background', '');
+		tinyMCE.setAttrib(elm, 'height', '');
+
+		if (background != '')
+			elm.style.backgroundImage = "url('" + background + "')";
+		else
+			elm.style.backgroundImage = '';
+
+		if (tinyMCE.getParam("inline_styles"))
+			elm.style.borderWidth = border + "px";
+
+		if (tinyMCE.getParam("inline_styles")) {
+			if (width != '')
+				elm.style.width = getCSSSize(width);
+		}
+
+		if (bordercolor != "") {
+			elm.style.borderColor = bordercolor;
+			elm.style.borderStyle = elm.style.borderStyle == "" ? "solid" : elm.style.borderStyle;
+			elm.style.borderWidth = border == "" ? "1px" : border;
+		} else
+			elm.style.borderColor = '';
+
+		elm.style.backgroundColor = bgcolor;
+		elm.style.height = getCSSSize(height);
+
+		tinyMCE.handleVisualAid(tinyMCE.tableElm, false, inst.visualAid, inst);
+
+		// Fix for stange MSIE align bug
+		tinyMCE.tableElm.outerHTML = tinyMCE.tableElm.outerHTML;
+
+		tinyMCE.handleVisualAid(inst.getBody(), true, inst.visualAid, inst);
+		tinyMCE.triggerNodeChange();
+		inst.execCommand('mceEndUndoLevel');
+
+		// Repaint if dimensions changed
+		if (formObj.width.value != orgTableWidth || formObj.height.value != orgTableHeight)
+			inst.repaint();
+
+		tinyMCEPopup.close();
+		return true;
+	}
+
+	// Create new table
+	html += '<table';
+
+	html += makeAttrib('id', id);
+	html += makeAttrib('border', border);
+	html += makeAttrib('cellpadding', cellpadding);
+	html += makeAttrib('cellspacing', cellspacing);
+	html += makeAttrib('width', width);
+	//html += makeAttrib('height', height);
+	//html += makeAttrib('bordercolor', bordercolor);
+	//html += makeAttrib('bgcolor', bgcolor);
+	html += makeAttrib('align', align);
+	html += makeAttrib('class', tinyMCE.getVisualAidClass(className, border == 0));
+	html += makeAttrib('style', style);
+	html += makeAttrib('summary', summary);
+	html += makeAttrib('dir', dir);
+	html += makeAttrib('lang', lang);
+
+	html += '>';
+
+	for (var y=0; y<rows; y++) {
+		html += "<tr>";
+
+		for (var x=0; x<cols; x++)
+			html += '<td>&nbsp;</td>';
+
+		html += "</tr>";
+	}
+
+	html += "</table>";
+
+	inst.execCommand('mceBeginUndoLevel');
+	inst.execCommand('mceInsertContent', false, html);
+	tinyMCE.handleVisualAid(inst.getBody(), true, tinyMCE.settings['visual']);
+	inst.execCommand('mceEndUndoLevel');
+
+	tinyMCEPopup.close();
+}
+
+function makeAttrib(attrib, value) {
+	var formObj = document.forms[0];
+	var valueElm = formObj.elements[attrib];
+
+	if (typeof(value) == "undefined" || value == null) {
+		value = "";
+
+		if (valueElm)
+			value = valueElm.value;
+	}
+
+	if (value == "")
+		return "";
+
+	// XML encode it
+	value = value.replace(/&/g, '&amp;');
+	value = value.replace(/\"/g, '&quot;');
+	value = value.replace(/</g, '&lt;');
+	value = value.replace(/>/g, '&gt;');
+
+	return ' ' + attrib + '="' + value + '"';
+}
+
+function init() {
+	tinyMCEPopup.resizeToInnerSize();
+
+	document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table');
+	document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table');
+	document.getElementById('bordercolor_pickcontainer').innerHTML = getColorPickerHTML('bordercolor_pick','bordercolor');
+	document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor');
+
+	var cols = 2, rows = 2, border = 0, cellpadding = "", cellspacing = "";
+	var align = "", width = "", height = "", bordercolor = "", bgcolor = "", className = "";
+	var id = "", summary = "", style = "", dir = "", lang = "", background = "", bgcolor = "", bordercolor = "";
+	var inst = tinyMCE.selectedInstance;
+	var formObj = document.forms[0];
+	var elm = tinyMCE.getParentElement(inst.getFocusElement(), "table");
+
+	tinyMCE.tableElm = elm;
+	action = tinyMCE.getWindowArg('action');
+	if (action == null)
+		action = tinyMCE.tableElm ? "update" : "insert";
+
+	if (tinyMCE.tableElm && action != "insert") {
+		var rowsAr = tinyMCE.tableElm.rows;
+		var cols = 0;
+		for (var i=0; i<rowsAr.length; i++)
+			if (rowsAr[i].cells.length > cols)
+				cols = rowsAr[i].cells.length;
+
+		cols = cols;
+		rows = rowsAr.length;
+
+		st = tinyMCE.parseStyle(tinyMCE.getAttrib(tinyMCE.tableElm, "style"));
+		border = trimSize(getStyle(elm, 'border', 'borderWidth'));
+		cellpadding = tinyMCE.getAttrib(tinyMCE.tableElm, 'cellpadding', "");
+		cellspacing = tinyMCE.getAttrib(tinyMCE.tableElm, 'cellspacing', "");
+		width = trimSize(getStyle(elm, 'width', 'width'));
+		height = trimSize(getStyle(elm, 'height', 'height'));
+		bordercolor = convertRGBToHex(getStyle(elm, 'bordercolor', 'borderLeftColor'));
+		bgcolor = convertRGBToHex(getStyle(elm, 'bgcolor', 'backgroundColor'));
+		align = tinyMCE.getAttrib(tinyMCE.tableElm, 'align', align);
+		className = tinyMCE.getVisualAidClass(tinyMCE.getAttrib(tinyMCE.tableElm, 'class'), false);
+		id = tinyMCE.getAttrib(tinyMCE.tableElm, 'id');
+		summary = tinyMCE.getAttrib(tinyMCE.tableElm, 'summary');
+		style = tinyMCE.serializeStyle(st);
+		dir = tinyMCE.getAttrib(tinyMCE.tableElm, 'dir');
+		lang = tinyMCE.getAttrib(tinyMCE.tableElm, 'lang');
+		background = getStyle(elm, 'background', 'backgroundImage').replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");
+
+		orgTableWidth = width;
+		orgTableHeight = height;
+
+		action = "update";
+	}
+
+	addClassesToList('class', "table_styles");
+
+	// Update form
+	selectByValue(formObj, 'align', align);
+	selectByValue(formObj, 'class', className);
+	formObj.cols.value = cols;
+	formObj.rows.value = rows;
+	formObj.border.value = border;
+	formObj.cellpadding.value = cellpadding;
+	formObj.cellspacing.value = cellspacing;
+	formObj.width.value = width;
+	formObj.height.value = height;
+	formObj.bordercolor.value = bordercolor;
+	formObj.bgcolor.value = bgcolor;
+	formObj.id.value = id;
+	formObj.summary.value = summary;
+	formObj.style.value = style;
+	formObj.dir.value = dir;
+	formObj.lang.value = lang;
+	formObj.backgroundimage.value = background;
+	formObj.insert.value = tinyMCE.getLang('lang_' + action, 'Insert', true); 
+
+	updateColor('bordercolor_pick', 'bordercolor');
+	updateColor('bgcolor_pick', 'bgcolor');
+
+	// Resize some elements
+	if (isVisible('backgroundimagebrowser'))
+		document.getElementById('backgroundimage').style.width = '180px';
+
+	// Disable some fields in update mode
+	if (action == "update") {
+		formObj.cols.disabled = true;
+		formObj.rows.disabled = true;
+	}
+}
+
+function changedSize() {
+	var formObj = document.forms[0];
+	var st = tinyMCE.parseStyle(formObj.style.value);
+
+	var width = formObj.width.value;
+	if (width != "")
+		st['width'] = tinyMCE.getParam("inline_styles") ? getCSSSize(width) : "";
+	else
+		st['width'] = "";
+
+	var height = formObj.height.value;
+	if (height != "")
+		st['height'] = getCSSSize(height);
+	else
+		st['height'] = "";
+
+	formObj.style.value = tinyMCE.serializeStyle(st);
+}
+
+function changedBackgroundImage() {
+	var formObj = document.forms[0];
+	var st = tinyMCE.parseStyle(formObj.style.value);
+
+	st['background-image'] = "url('" + formObj.backgroundimage.value + "')";
+
+	formObj.style.value = tinyMCE.serializeStyle(st);
+}
+
+function changedBorder() {
+	var formObj = document.forms[0];
+	var st = tinyMCE.parseStyle(formObj.style.value);
+
+	// Update border width if the element has a color
+	if (formObj.border.value != "" && formObj.bordercolor.value != "")
+		st['border-width'] = formObj.border.value + "px";
+
+	formObj.style.value = tinyMCE.serializeStyle(st);
+}
+
+function changedColor() {
+	var formObj = document.forms[0];
+	var st = tinyMCE.parseStyle(formObj.style.value);
+
+	st['background-color'] = formObj.bgcolor.value;
+
+	if (formObj.bordercolor.value != "") {
+		st['border-color'] = formObj.bordercolor.value;
+
+		// Add border-width if it's missing
+		if (!st['border-width'])
+			st['border-width'] = formObj.border.value == "" ? "1px" : formObj.border.value + "px";
+	}
+
+	formObj.style.value = tinyMCE.serializeStyle(st);
+}
+
+function changedStyle() {
+	var formObj = document.forms[0];
+	var st = tinyMCE.parseStyle(formObj.style.value);
+
+	if (st['background-image'])
+		formObj.backgroundimage.value = st['background-image'].replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");
+	else
+		formObj.backgroundimage.value = '';
+
+	if (st['width'])
+		formObj.width.value = trimSize(st['width']);
+
+	if (st['height'])
+		formObj.height.value = trimSize(st['height']);
+
+	if (st['background-color']) {
+		formObj.bgcolor.value = st['background-color'];
+		updateColor('bgcolor_pick','bgcolor');
+	}
+
+	if (st['border-color']) {
+		formObj.bordercolor.value = st['border-color'];
+		updateColor('bordercolor_pick','bordercolor');
+	}
+}

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/langs/en.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/langs/en.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/langs/en.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,78 @@
+// UK lang variables
+
+tinyMCE.addToLang('table',{
+general_tab : 'General',
+advanced_tab : 'Advanced',
+general_props : 'General properties',
+advanced_props : 'Advanced properties',
+desc : 'Inserts a new table',
+row_before_desc : 'Insert row before',
+row_after_desc : 'Insert row after',
+delete_row_desc : 'Delete row',
+col_before_desc : 'Insert column before',
+col_after_desc : 'Insert column after',
+delete_col_desc : 'Remove column',
+rowtype : 'Row in table part',
+title : 'Insert/Modify table',
+width : 'Width',
+height : 'Height',
+cols : 'Columns',
+rows : 'Rows',
+cellspacing : 'Cellspacing',
+cellpadding : 'Cellpadding',
+border : 'Border',
+align : 'Alignment',
+align_default : 'Default',
+align_left : 'Left',
+align_right : 'Right',
+align_middle : 'Center',
+row_title : 'Table row properties',
+cell_title : 'Table cell properties',
+cell_type : 'Cell type',
+row_desc : 'Table row properties',
+cell_desc : 'Table cell properties',
+valign : 'Vertical alignment',
+align_top : 'Top',
+align_bottom : 'Bottom',
+props_desc : 'Table properties',
+bordercolor : 'Border color',
+bgcolor : 'Background color',
+merge_cells_title : 'Merge table cells',
+split_cells_desc : 'Split table cells',
+merge_cells_desc : 'Merge table cells',
+cut_row_desc : 'Cut table row',
+copy_row_desc : 'Copy table row',
+paste_row_before_desc : 'Paste table row before',
+paste_row_after_desc : 'Paste table row after',
+id : 'Id',
+style: 'Style',
+langdir : 'Language direction',
+langcode : 'Language code',
+mime : 'Target MIME type',
+ltr : 'Left to right',
+rtl : 'Right to left',
+bgimage : 'Background image',
+summary : 'Summary',
+td : "Data",
+th : "Header",
+cell_cell : 'Update current cell',
+cell_row : 'Update all cells in row',
+cell_all : 'Update all cells in table',
+row_row : 'Update current row',
+row_odd : 'Update odd rows in table',
+row_even : 'Update even rows in table',
+row_all : 'Update all rows in table',
+thead : 'Table Head',
+tbody : 'Table Body',
+tfoot : 'Table Foot',
+del : 'Delete table',
+scope : 'Scope',
+row : 'Row',
+col : 'Col',
+rowgroup : 'Row Group',
+colgroup : 'Col Group',
+col_limit : 'You\'ve exceeded the maximum number of columns of {$cols}.',
+row_limit : 'You\'ve exceeded the maximum number of rows of {$rows}.',
+cell_limit : 'You\'ve exceeded the maximum number of cells of {$cells}.',
+missing_scope: 'Are you sure you want to continue without specifying a scope for this table header cell. Without it, it may be difficult for some users with disabilities to understand the content or data displayed of the table.'
+});

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/merge_cells.htm
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/merge_cells.htm	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/merge_cells.htm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,37 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+	<title>{$lang_table_merge_cells_title}</title>
+	<script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
+	<script language="javascript" type="text/javascript" src="../../utils/mctabs.js"></script>
+	<script language="javascript" type="text/javascript" src="jscripts/merge_cells.js"></script>
+	<base target="_self" />
+</head>
+<body onload="tinyMCEPopup.executeOnLoad('init();');" style="margin: 8px" style="display: none">
+<form onsubmit="insertTable();return false;" action="#">
+	<fieldset>
+		<legend>{$lang_table_merge_cells_title}</legend>
+		  <table border="0" cellpadding="0" cellspacing="3" width="100%">
+			  <tr>
+				<td>{$lang_table_cols}:</td>
+				<td align="right"><input type="text" name="numcols" value="" style="width: 30px" /></td>
+				<td>
+			  </tr>
+			  <tr>
+				<td>{$lang_table_rows}:</td>
+				<td align="right"><input type="text" name="numrows" value="" style="width: 30px" /></td>
+			  </tr>
+		  </table>
+	</fieldset>
+
+	<div class="mceActionPanel">
+		<div style="float: left">
+			<input type="button" id="insert" name="insert" value="{$lang_update}" onclick="mergeCells();" />
+		</div>
+
+		<div style="float: right">
+			<input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onclick="tinyMCEPopup.close();" />
+		</div>
+	</div>
+</form>
+</body>
+</html>

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/readme.txt
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/readme.txt	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/readme.txt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1 @@
+Check the TinyMCE documentation for details on this plugin.

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/row.htm
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/row.htm	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/row.htm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,159 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+	<title>{$lang_table_row_title}</title>
+	<script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
+	<script language="javascript" type="text/javascript" src="../../utils/mctabs.js"></script>
+	<script language="javascript" type="text/javascript" src="../../utils/form_utils.js"></script>
+	<script language="javascript" type="text/javascript" src="jscripts/row.js"></script>
+	<link href="css/row.css" rel="stylesheet" type="text/css" />
+	<base target="_self" />
+</head>
+<body id="tablerow" onload="tinyMCEPopup.executeOnLoad('init();');" style="display: none">
+	<form onsubmit="updateAction();return false;">
+		<div class="tabs">
+			<ul>
+				<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{$lang_table_general_tab}</a></span></li>
+				<li id="advanced_tab"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{$lang_table_advanced_tab}</a></span></li>
+			</ul>
+		</div>
+
+		<div class="panel_wrapper">
+			<div id="general_panel" class="panel current">
+				<fieldset>
+					<legend>{$lang_table_general_props}</legend>
+
+					<table border="0" cellpadding="4" cellspacing="0">
+						<tr>
+							<td><label for="rowtype">{$lang_table_rowtype}</label></td>
+							<td class="col2">
+								<select id="rowtype" name="rowtype">
+									<option value="thead">{$lang_table_thead}</option>
+									<option value="tbody">{$lang_table_tbody}</option>
+									<option value="tfoot">{$lang_table_tfoot}</option>
+								</select>
+							</td>
+						</tr>
+
+						<tr>
+							<td><label for="align">{$lang_table_align}</label></td>
+							<td class="col2">
+								<select id="align" name="align">
+									<option value="">{$lang_not_set}</option>
+									<option value="center">{$lang_table_align_middle}</option>
+									<option value="left">{$lang_table_align_left}</option>
+									<option value="right">{$lang_table_align_right}</option>
+								</select>
+							</td>
+						</tr>
+
+						<tr>
+							<td><label for="valign">{$lang_table_valign}</label></td>
+							<td class="col2">
+								<select id="valign" name="valign">
+									<option value="">{$lang_not_set}</option>
+									<option value="top">{$lang_table_align_top}</option>
+									<option value="middle">{$lang_table_align_middle}</option>
+									<option value="bottom">{$lang_table_align_bottom}</option>
+								</select>
+							</td>
+						</tr>
+
+						<tr id="styleSelectRow">
+							<td><label for="class">{$lang_class_name}</label></td>
+							<td class="col2">
+								<select id="class" name="class">
+									<option value="" selected="selected">{$lang_not_set}</option>
+								</select>
+							</td>
+						</tr>
+
+						<tr>
+							<td><label for="height">{$lang_table_height}</label></td>
+							<td class="col2"><input name="height" type="text" id="height" value="" size="4" maxlength="4" onchange="changedSize();" /></td>
+						</tr>
+					</table>
+				</fieldset>
+			</div>
+
+			<div id="advanced_panel" class="panel">
+				<fieldset>
+					<legend>{$lang_table_advanced_props}</legend>
+
+					<table border="0" cellpadding="0" cellspacing="4">
+						<tr>
+							<td class="column1"><label for="id">{$lang_table_id}</label></td> 
+							<td><input id="id" name="id" type="text" value="" style="width: 200px" /></td> 
+						</tr>
+
+						<tr>
+							<td><label for="style">{$lang_table_style}</label></td>
+							<td><input type="text" id="style" name="style" value="" style="width: 200px;" onchange="changedStyle();" /></td>
+						</tr>
+
+						<tr>
+							<td class="column1"><label for="dir">{$lang_table_langdir}</label></td> 
+							<td>
+								<select id="dir" name="dir" style="width: 200px"> 
+										<option value="">{$lang_not_set}</option> 
+										<option value="ltr">{$lang_table_ltr}</option> 
+										<option value="rtl">{$lang_table_rtl}</option> 
+								</select>
+							</td> 
+						</tr>
+
+						<tr>
+							<td class="column1"><label for="lang">{$lang_table_langcode}</label></td> 
+							<td>
+								<input id="lang" name="lang" type="text" value="" style="width: 200px" />
+							</td> 
+						</tr>
+
+						<tr>
+							<td class="column1"><label for="backgroundimage">{$lang_table_bgimage}</label></td> 
+							<td>
+								<table border="0" cellpadding="0" cellspacing="0">
+									<tr>
+										<td><input id="backgroundimage" name="backgroundimage" type="text" value="" style="width: 200px" onchange="changedBackgroundImage();" /></td>
+										<td id="backgroundimagebrowsercontainer">&nbsp;</td>
+									</tr>
+								</table>
+							</td> 
+						</tr>
+
+						<tr>
+							<td class="column1"><label for="bgcolor">{$lang_table_bgcolor}</label></td> 
+							<td>
+								<table border="0" cellpadding="0" cellspacing="0">
+									<tr>
+										<td><input id="bgcolor" name="bgcolor" type="text" value="" size="9" onchange="updateColor('bgcolor_pick','bgcolor');changedColor();" /></td>
+										<td id="bgcolor_pickcontainer">&nbsp;</td>
+									</tr>
+								</table>
+							</td> 
+						</tr>
+					</table>
+				</fieldset>
+			</div>
+		</div>
+
+		<div class="mceActionPanel">
+			<div>
+				<select id="action" name="action">
+					<option value="row">{$lang_table_row_row}</option>
+					<option value="odd">{$lang_table_row_odd}</option>
+					<option value="even">{$lang_table_row_even}</option>
+					<option value="all">{$lang_table_row_all}</option>
+				</select>
+			</div>
+
+			<div style="float: left">
+				<div><input type="button" id="insert" name="insert" value="{$lang_update}" onclick="updateAction();" /></div>
+			</div>
+
+			<div style="float: right">
+				<input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onclick="tinyMCEPopup.close();" />
+			</div>
+		</div>
+	</form>
+</body>
+</html>

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/table.htm
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/table.htm	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/table/table.htm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,155 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+	<title>{$lang_table_title}</title>
+	<script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
+	<script language="javascript" type="text/javascript" src="../../utils/mctabs.js"></script>
+	<script language="javascript" type="text/javascript" src="../../utils/form_utils.js"></script>
+	<script language="javascript" type="text/javascript" src="jscripts/table.js"></script>
+	<link href="css/table.css" rel="stylesheet" type="text/css" />
+	<base target="_self" />
+</head>
+<body id="table" onload="tinyMCEPopup.executeOnLoad('init();');" style="display: none">
+	<form onsubmit="insertTable();return false;" action="#">
+		<div class="tabs">
+			<ul>
+				<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{$lang_table_general_tab}</a></span></li>
+				<li id="advanced_tab"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{$lang_table_advanced_tab}</a></span></li>
+			</ul>
+		</div>
+
+		<div class="panel_wrapper">
+			<div id="general_panel" class="panel current">
+				<fieldset>
+					<legend>{$lang_table_general_props}</legend>
+
+					  <table border="0" cellpadding="4" cellspacing="0" width="100%">
+							  <tr>
+								<td><label id="colslabel" for="cols">{$lang_table_cols}</label></td>
+								<td><input id="cols" name="cols" type="text" value="" size="3" maxlength="3" /></td>
+								<td><label id="rowslabel" for="rows">{$lang_table_rows}</label></td>
+								<td><input id="rows" name="rows" type="text" value="" size="3" maxlength="3" /></td>
+							  </tr>
+							  <tr>
+								<td><label id="cellpaddinglabel" for="cellpadding">{$lang_table_cellpadding}</label></td>
+								<td><input id="cellpadding" name="cellpadding" type="text" value="" size="3" maxlength="3" /></td>
+								<td><label id="cellspacinglabel" for="cellspacing">{$lang_table_cellspacing}</label></td>
+								<td><input id="cellspacing" name="cellspacing" type="text" value="" size="3" maxlength="3" /></td>
+							  </tr>
+							  <tr>
+								<td><label id="alignlabel" for="align">{$lang_table_align}</label></td>
+								<td><select id="align" name="align">
+									<option value="">{$lang_not_set}</option>
+									<option value="center">{$lang_table_align_middle}</option>
+									<option value="left">{$lang_table_align_left}</option>
+									<option value="right">{$lang_table_align_right}</option>
+								  </select></td>
+								<td><label id="borderlabel" for="border">{$lang_table_border}</label></td>
+								<td><input id="border" name="border" type="text" value="" size="3" maxlength="3" onchange="changedBorder();" /></td>
+							  </tr>
+							  <tr>
+								<td><label id="widthlabel" for="width">{$lang_table_width}</label></td>
+								<td><input name="width" type="text" id="width" value="" size="4" maxlength="4" onchange="changedSize();" /></td>
+								<td><label id="heightlabel" for="height">{$lang_table_height}</label></td>
+								<td><input name="height" type="text" id="height" value="" size="4" maxlength="4" onchange="changedSize();" /></td>
+							  </tr>
+							  <tr id="styleSelectRow">
+								<td><label id="classlabel" for="class">{$lang_class_name}</label></td>
+								<td colspan="3">
+								 <select id="class" name="class">
+									<option value="" selected>{$lang_not_set}</option>
+								 </select></td>
+							  </tr>
+							</table>
+				</fieldset>
+			</div>
+
+			<div id="advanced_panel" class="panel">
+				<fieldset>
+					<legend>{$lang_table_advanced_props}</legend>
+
+					<table border="0" cellpadding="0" cellspacing="4">
+						<tr>
+							<td class="column1"><label for="id">{$lang_table_id}</label></td> 
+							<td><input id="id" name="id" type="text" value="" class="advfield" /></td> 
+						</tr>
+
+						<tr>
+							<td class="column1"><label for="summary">{$lang_table_summary}</label></td> 
+							<td><input id="summary" name="summary" type="text" value="" class="advfield" /></td> 
+						</tr>
+
+						<tr>
+							<td><label for="style">{$lang_table_style}</label></td>
+							<td><input type="text" id="style" name="style" value="" class="advfield" onchange="changedStyle();" /></td>
+						</tr>
+
+						<tr>
+							<td class="column1"><label for="dir">{$lang_table_langdir}</label></td> 
+							<td>
+								<select id="dir" name="dir" class="advfield"> 
+										<option value="">{$lang_not_set}</option> 
+										<option value="ltr">{$lang_table_ltr}</option> 
+										<option value="rtl">{$lang_table_rtl}</option> 
+								</select>
+							</td> 
+						</tr>
+
+						<tr>
+							<td class="column1"><label id="langlabel" for="lang">{$lang_table_langcode}</label></td> 
+							<td>
+								<input id="lang" name="lang" type="text" value="" class="advfield" />
+							</td> 
+						</tr>
+
+						<tr>
+							<td class="column1"><label for="backgroundimage">{$lang_table_bgimage}</label></td> 
+							<td>
+								<table border="0" cellpadding="0" cellspacing="0">
+									<tr>
+										<td><input id="backgroundimage" name="backgroundimage" type="text" value="" class="advfield" onchange="changedBackgroundImage();" /></td>
+										<td id="backgroundimagebrowsercontainer">&nbsp;</td>
+									</tr>
+								</table>
+							</td> 
+						</tr>
+
+						<tr>
+							<td class="column1"><label for="bordercolor">{$lang_table_bordercolor}</label></td> 
+							<td>
+								<table border="0" cellpadding="0" cellspacing="0">
+									<tr>
+										<td><input id="bordercolor" name="bordercolor" type="text" value="" size="9" onchange="updateColor('bordercolor_pick','bordercolor');changedColor();" /></td>
+										<td id="bordercolor_pickcontainer">&nbsp;</td>
+									</tr>
+								</table>
+							</td> 
+						</tr>
+
+						<tr>
+							<td class="column1"><label for="bgcolor">{$lang_table_bgcolor}</label></td> 
+							<td>
+								<table border="0" cellpadding="0" cellspacing="0">
+									<tr>
+										<td><input id="bgcolor" name="bgcolor" type="text" value="" size="9" onchange="updateColor('bgcolor_pick','bgcolor');changedColor();" /></td>
+										<td id="bgcolor_pickcontainer">&nbsp;</td>
+									</tr>
+								</table>
+							</td> 
+						</tr>
+					</table>
+				</fieldset>
+			</div>
+		</div>
+
+		<div class="mceActionPanel">
+			<div style="float: left">
+				<input type="button" id="insert" name="insert" value="{$lang_insert}" onclick="insertTable();" />
+			</div>
+
+			<div style="float: right">
+				<input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onclick="tinyMCEPopup.close();" />
+			</div>
+		</div>
+	</form>
+</body>
+</html>

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/zoom/editor_plugin.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/zoom/editor_plugin.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/zoom/editor_plugin.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1 @@
+var TinyMCE_ZoomPlugin={getInfo:function(){return{longname:'Zoom',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_zoom.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};},getControlHTML:function(control_name){if(!tinyMCE.isMSIE||tinyMCE.isMSIE5_0||tinyMCE.isOpera)return"";switch(control_name){case"zoom":return'<select id="{$editor_id}_zoomSelect" name="{$editor_id}_zoomSelect" onfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceZoom\',false,this.options[this.selectedIndex].value);" class="mceSelectList">'+'<option value="100%">+ 100%</option>'+'<option value="150%">+ 150%</option>'+'<option value="200%">+ 200%</option>'+'<option value="250%">+ 250%</option>'+'</select>';}return"";},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case"mceZoom":tinyMCE.getInstanceById(editor_id).contentDocument.body.style.zoom=value;tinyMCE.getInstanceById(editor_id).contentDocument.body.style.mozZoom=value;return true;}return false;}};tinyMCE.addPlugin("zoom",TinyMCE_ZoomPlugin);
\ No newline at end of file

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/zoom/editor_plugin_src.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/zoom/editor_plugin_src.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/zoom/editor_plugin_src.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,58 @@
+/**
+ * $RCSfile: editor_plugin_src.js,v $
+ * $Revision: 1.10 $
+ * $Date: 2006/04/07 15:52:50 $
+ *
+ * @author Moxiecode
+ * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
+ */
+
+var TinyMCE_ZoomPlugin = {
+	getInfo : function() {
+		return {
+			longname : 'Zoom',
+			author : 'Moxiecode Systems',
+			authorurl : 'http://tinymce.moxiecode.com',
+			infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_zoom.html',
+			version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
+		};
+	},
+
+	/**
+	 * Returns the HTML contents of the zoom control.
+	 */
+	getControlHTML : function(control_name) {
+		if (!tinyMCE.isMSIE || tinyMCE.isMSIE5_0 || tinyMCE.isOpera)
+			return "";
+
+		switch (control_name) {
+			case "zoom":
+				return '<select id="{$editor_id}_zoomSelect" name="{$editor_id}_zoomSelect" onfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceZoom\',false,this.options[this.selectedIndex].value);" class="mceSelectList">' + 
+						'<option value="100%">+ 100%</option>' + 
+						'<option value="150%">+ 150%</option>' + 
+						'<option value="200%">+ 200%</option>' + 
+						'<option value="250%">+ 250%</option>' + 
+						'</select>';
+		}
+
+		return "";
+	},
+
+	/**
+	 * Executes the mceZoom command.
+	 */
+	execCommand : function(editor_id, element, command, user_interface, value) {
+		// Handle commands
+		switch (command) {
+			case "mceZoom":
+				tinyMCE.getInstanceById(editor_id).contentDocument.body.style.zoom = value;
+				tinyMCE.getInstanceById(editor_id).contentDocument.body.style.mozZoom = value;
+				return true;
+		}
+
+		// Pass to next handler in chain
+		return false;
+	}
+};
+
+tinyMCE.addPlugin("zoom", TinyMCE_ZoomPlugin);

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/zoom/readme.txt
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/zoom/readme.txt	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/plugins/zoom/readme.txt	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1 @@
+Check the TinyMCE documentation for details on this plugin.

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/about.htm
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/about.htm	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/about.htm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,52 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+	<title>{$lang_about_title}</title>
+	<script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
+	<script language="javascript" type="text/javascript" src="../../utils/mctabs.js"></script>
+	<script language="javascript" type="text/javascript" src="jscripts/about.js"></script>
+	<base target="_self" />
+</head>
+<body id="about" onload="tinyMCEPopup.executeOnLoad('init();');" style="display: none">
+		<div class="tabs">
+			<ul>
+				<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{$lang_about}</a></span></li>
+				<li id="help_tab"><span><a href="javascript:mcTabs.displayTab('help_tab','help_panel');" onmousedown="return false;">{$lang_help}</a></span></li>
+				<li id="plugins_tab"><span><a href="javascript:mcTabs.displayTab('plugins_tab','plugins_panel');" onmousedown="return false;">{$lang_plugins}</a></span></li>
+			</ul>
+		</div>
+
+		<div class="panel_wrapper">
+			<div id="general_panel" class="panel current">
+				<h3>{$lang_about_title}</h3>
+				<p>Version: {$tinymce_version} ({$tinymce_releasedate})</p>
+				<p>TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor control released as Open Source under <a href="../../license.txt" target="_blank">LGPL</a>
+				by Moxiecode Systems AB. It has the ability to convert HTML TEXTAREA fields or other HTML elements to editor instances.</p>
+				<p>Copyright &copy; 2003-2006, <a href="http://www.moxiecode.com" target="_blank">Moxiecode Systems AB</a>, All rights reserved.</p>
+				<p>For more information about this software visit the <a href="http://tinymce.moxiecode.com" target="_blank">TinyMCE website</a>.</p>
+
+				<div id="buttoncontainer"></div>
+			</div>
+
+			<div id="plugins_panel" class="panel">
+				<div id="pluginscontainer">
+					<h3>{$lang_loaded_plugins}</h3>
+
+					<div id="plugintablecontainer">
+					</div>
+
+					<p>&nbsp;</p>
+				</div>
+			</div>
+
+			<div id="help_panel" class="panel noscroll" style="overflow: visible;">
+				<div id="iframecontainer"></div>
+			</div>
+		</div>
+
+		<div class="mceActionPanel">
+			<div style="float: right">
+				<input type="button" id="cancel" name="cancel" value="{$lang_close}" onclick="tinyMCEPopup.close();" />
+			</div>
+		</div>
+</body>
+</html>

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/anchor.htm
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/anchor.htm	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/anchor.htm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,33 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+	<title>{$lang_insert_anchor_title}</title>
+	<script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
+	<script language="javascript" type="text/javascript" src="jscripts/anchor.js"></script>
+	<base target="_self" />
+</head>
+<body onload="tinyMCEPopup.executeOnLoad('init();');" style="display: none">
+<form onsubmit="insertAnchor();return false;" action="#">
+
+	<table border="0" cellpadding="4" cellspacing="0">
+		<tr>
+			<td colspan="2" class="title">{$lang_insert_anchor_title}</td>
+		</tr>
+		<tr>
+			<td nowrap="nowrap">{$lang_insert_anchor_name}:</td>
+			<td><input name="anchorName" type="text" id="anchorName" value="" style="width: 200px" /></td>
+		</tr>
+	</table>
+
+	<div class="mceActionPanel">
+		<div style="float: left">
+			<input type="button" id="insert" name="insert" value="{$lang_update}" onclick="insertAnchor();" />
+		</div>
+
+		<div style="float: right">
+			<input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onclick="tinyMCEPopup.close();" />
+		</div>
+	</div>
+
+</form>
+</body>
+</html>

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/charmap.htm
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/charmap.htm	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/charmap.htm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,53 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+	<title>{$lang_theme_charmap_title}</title>
+	<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+	<script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
+	<script language="javascript" type="text/javascript" src="jscripts/charmap.js"></script>
+	<base target="_self" />
+</head>
+<body onload="tinyMCEPopup.executeOnLoad('init();');" style="display: none">
+<table align="center" border="0" cellspacing="0" cellpadding="2">
+    <tr>
+        <td colspan="2" class="title">{$lang_theme_charmap_title}</td>
+    </tr>
+    <tr>
+        <td rowspan="2" align="left" valign="top">
+            <script language="javascript" type="text/javascript">renderCharMapHTML();</script>
+        </td>
+        <td width="100" align="center" valign="top">
+            <table border="0" cellpadding="0" cellspacing="0" width="100" style="height: 100px">
+                <tr>
+                    <td class="charmapOver" style="font-size: 40px; height:80px;" id="codeV">&nbsp;</td>
+                </tr>
+                <tr>
+                    <td style="font-size: 10px; font-family: Arial, Helvetica, sans-serif; text-align:center;" id="codeN">&nbsp;</td>
+                </tr>
+            </table>
+        </td>
+    </tr>
+    <tr>
+        <td valign="bottom" style="padding-bottom: 3px;">
+            <table width="100" align="center" border="0" cellpadding="2" cellspacing="0">
+                <tr>
+                    <td align="center" style="border-left: 1px solid #666699; border-top: 1px solid #666699; border-right: 1px solid #666699;">HTML-Code</td>
+                </tr>
+                <tr>
+                    <td style="font-size: 16px; font-weight: bold; border-left: 1px solid #666699; border-bottom: 1px solid #666699; border-right: 1px solid #666699;" id="codeA" align="center">&nbsp;</td>
+                </tr>
+                <tr>
+                    <td style="font-size: 1px;">&nbsp;</td>
+                </tr>
+                <tr>
+                    <td align="center" style="border-left: 1px solid #666699; border-top: 1px solid #666699; border-right: 1px solid #666699;">NUM-Code</td>
+                </tr>
+                <tr>
+                    <td style="font-size: 16px; font-weight: bold; border-left: 1px solid #666699; border-bottom: 1px solid #666699; border-right: 1px solid #666699;" id="codeB" align="center">&nbsp;</td>
+                </tr>
+            </table>
+        </td>
+    </tr>
+</table>
+
+</body>
+</html>

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/color_picker.htm
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/color_picker.htm	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/color_picker.htm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,13 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+	<title>{$lang_theme_colorpicker_title}</title>
+	<script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
+	<script language="javascript" type="text/javascript" src="jscripts/color_picker.js"></script>
+	<base target="_self" />
+</head>
+<body onload="tinyMCEPopup.executeOnLoad('init();');" style="margin: 3px; display: none">
+	<div align="center">
+	   <script language="javascript" type="text/javascript">renderColorMap();</script>
+	</div>
+</body>
+</html>

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/css/editor_content.css
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/css/editor_content.css	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/css/editor_content.css	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,58 @@
+/* This file contains the CSS data for the editable area(iframe) of TinyMCE */
+/* You can extend this CSS by adding your own CSS file with the the content_css option */
+
+body, td, pre {
+	font-family: Verdana, Arial, Helvetica, sans-serif;
+	font-size: 10px;
+}
+
+body {
+	background-color: #FFFFFF;
+}
+
+.mceVisualAid {
+	border: 1px dashed #BBBBBB !important;
+}
+
+div.mceVisualAid {
+	background-image:url('../images/spacer.gif');
+	visibility: visible !important;
+}
+
+.mceItemAnchor {
+	width: 12px;
+	line-height: 6px;
+	overflow: hidden;
+	padding-left: 12px;
+	background-image: url('../images/anchor_symbol.gif');
+	background-position: bottom;
+	background-repeat: no-repeat;
+}
+
+/* Important is needed in Gecko browsers inorder to style links */
+/*
+a {
+	color: green !important;
+}
+*/
+
+/* Style selection range colors in Gecko browsers */
+/*
+::-moz-selection {
+	background-color: red;
+	color: green;
+}
+*/
+
+/* MSIE specific */
+
+* html body {
+	scrollbar-3dlight-color: #F0F0EE;
+	scrollbar-arrow-color: #676662;
+	scrollbar-base-color: #F0F0EE;
+	scrollbar-darkshadow-color: #DDDDDD;
+	scrollbar-face-color: #E0E0DD;
+	scrollbar-highlight-color: #F0F0EE;
+	scrollbar-shadow-color: #F0F0EE;
+	scrollbar-track-color: #F5F5F5;
+}

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/css/editor_popup.css
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/css/editor_popup.css	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/css/editor_popup.css	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,327 @@
+/* This file contains the CSS data for all popups in TinyMCE */
+
+body {
+	background-color: #F0F0EE;
+	font-family: Verdana, Arial, Helvetica, sans-serif;
+	font-size: 11px;
+	scrollbar-3dlight-color: #F0F0EE;
+	scrollbar-arrow-color: #676662;
+	scrollbar-base-color: #F0F0EE;
+	scrollbar-darkshadow-color: #DDDDDD;
+	scrollbar-face-color: #E0E0DD;
+	scrollbar-highlight-color: #F0F0EE;
+	scrollbar-shadow-color: #F0F0EE;
+	scrollbar-track-color: #F5F5F5;
+	margin: 8px;
+}
+
+td {
+	font-family: Verdana, Arial, Helvetica, sans-serif;
+	font-size: 11px;
+}
+
+input {
+	background: #FFFFFF;
+	border: 1px solid #cccccc;
+}
+
+td, input, select, textarea {
+	font-family: Verdana, Arial, Helvetica, sans-serif;
+	font-size: 10px;
+}
+
+input, select, textarea {
+	border: 1px solid #808080;
+}
+
+.input_noborder {
+	border: 0;
+}
+
+#insert, .updateButton {
+   font-weight: bold;
+   width: 90px;
+   height: 21px;
+   border: 0;
+   background-image: url('../images/insert_button_bg.gif');
+   cursor: pointer;
+}
+
+#cancel {
+   font-weight: bold;
+   width: 90px;
+   height: 21px;
+   border: 0;
+   background-image: url('../images/cancel_button_bg.gif');
+   cursor: pointer;
+}
+
+/* Mozilla only style */
+html>body #insert, html>body #cancel {
+	padding-bottom: 2px;
+}
+
+.title {
+	font-size: 12px;
+	font-weight: bold;
+	color: #2B6FB6;
+}
+
+table.charmap {
+	border-style: solid;
+	border-width: 1px;
+	border-color: #AAAAAA;
+}
+
+td.charmap, td.charmapOver {
+	color: #000000;
+	border-color: #AAAAAA;
+	border-style: solid;
+	border-width: 1px;
+	text-align: center;
+	font-size: 12px;
+}
+
+td.charmapOver {
+	background-color: #CCCCCC;
+	cursor: default;
+}
+
+a.charmap {
+	color: #000000;
+	text-decoration: none
+}
+
+.wordWrapCode {
+	vertical-align: middle;
+	border: 1px none #000000;
+	background-color: transparent;
+}
+
+input.radio {
+	border: 1px none #000000;
+	background-color: transparent;
+	vertical-align: middle;
+}
+
+input.checkbox {
+	border: 1px none #000000;
+	background-color: transparent;
+	vertical-align: middle;
+}
+
+.mceButtonNormal, .mceButtonOver, .mceButtonDown, .mceSeparator, .mceButtonDisabled, .mceButtonSelected {
+	margin-left: 1px;
+}
+
+.mceButtonNormal {
+	border-top: 1px solid;
+	border-left: 1px solid;
+	border-bottom: 1px solid;
+	border-right: 1px solid;
+	border-color: #F0F0EE;
+	cursor: default;
+}
+
+.mceButtonOver {
+	border: 1px solid #0A246A;
+	cursor: default;
+	background-color: #B6BDD2;
+}
+
+.mceButtonDown {
+	cursor: default;
+	border: 1px solid #0A246A;
+	background-color: #8592B5;
+}
+
+.mceButtonDisabled {
+	filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30);
+	-moz-opacity:0.3;
+	opacity: 0.3;
+	border-top: 1px solid;
+	border-left: 1px solid;
+	border-bottom: 1px solid;
+	border-right: 1px solid;
+	border-color: #F0F0EE;
+	cursor: default;
+}
+
+.mceActionPanel {
+	margin-top: 5px;
+}
+
+/* Tabs classes */
+
+.tabs {
+	float: left;
+	width: 100%;
+	line-height: normal;
+	background-image: url("../images/xp/tabs_bg.gif");
+}
+
+.tabs ul {
+	margin: 0;
+	padding: 0 0 0;
+	list-style: none;
+}
+
+.tabs li {
+	float: left;
+	background: url("../images/xp/tab_bg.gif") no-repeat left top;
+	margin: 0;
+	margin-left: 0;
+	margin-right: 2px;
+	padding: 0 0 0 10px;
+	line-height: 18px;
+}
+
+.tabs li.current {
+	background: url("../images/xp/tab_sel_bg.gif") no-repeat left top;
+	margin-right: 2px;
+}
+
+.tabs span {
+	float: left;
+	display: block;
+	background: url("../images/xp/tab_end.gif") no-repeat right top;
+	padding: 0px 10px 0 0;
+}
+
+.tabs .current span {
+	background: url("../images/xp/tab_sel_end.gif") no-repeat right top;
+}
+
+.tabs a {
+	text-decoration: none;
+	font-family: Verdana, Arial;
+	font-size: 10px;
+}
+
+.tabs a:link, .tabs a:visited, .tabs a:hover {
+	color: black;
+}
+
+.tabs a:hover {
+}
+
+.tabs .current {
+}
+
+.tabs .current a, .tabs .current a:link, .tabs .current a:visited {
+}
+
+.panel_wrapper div.panel {
+	display: none;
+}
+
+.panel_wrapper div.current {
+	display: block;
+	width: 100%;
+	height: 300px;
+	overflow: visible; /* Should be auto but that breaks Safari */
+}
+
+.panel_wrapper {
+	border: 1px solid #919B9C;
+	border-top: 0px;
+	padding: 10px;
+	padding-top: 5px;
+	clear: both;
+	background-color: white;
+}
+
+fieldset {
+	border: 1px solid #919B9C;
+	font-family: Verdana, Arial;
+	font-size: 10px;
+	padding: 0;
+	margin: 0;
+	padding: 4px;
+}
+
+legend {
+	color: #2B6FB6;
+	font-weight: bold;
+}
+
+.properties {
+	width: 100%;
+}
+
+.properties .column1 {
+}
+
+.properties .column2 {
+	text-align: left;
+}
+
+a:link, a:visited {
+	color: black;
+}
+
+a:hover {
+	color: #2B6FB6;
+}
+
+#plugintable thead {
+	font-weight: bold;
+	background-color: #DDDDDD;
+}
+
+#plugintable, #about #plugintable td {
+	border: 1px solid #919B9C;
+}
+
+#plugintable {
+	width: 99%;
+	margin-top: 10px;
+}
+
+#pluginscontainer {
+	height: 290px;
+	overflow: auto;
+}
+
+/* MSIE Specific styles */
+
+* html .panel_wrapper {
+	width: 100%;
+}
+
+.column {
+	float: left;
+}
+
+h1, h2, h3, h4 {
+	color: #2B6FB6;
+	margin: 0;
+	padding: 0;
+	padding-top: 5px;
+}
+
+h3 {
+	font-size: 14px;
+}
+
+#link .panel_wrapper, #link div.current {
+	height: 125px;
+}
+
+#image .panel_wrapper, #image div.current {
+	height: 190px;
+}
+
+/* Disables the advanced tab in the table plugin. */
+/*
+#table #advanced_tab {
+	display: none;
+}
+*/
+
+/* Disables the border input field and label in the table plugin. */
+/*
+#table #border, #table #borderlabel {
+	display: none;
+}
+*/

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/css/editor_ui.css
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/css/editor_ui.css	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/css/editor_ui.css	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,353 @@
+/* This file contains the CSS data for the editor UI of TinyMCE instances */
+
+.mceToolbarTop a, .mceToolbarTop a:visited, .mceToolbarTop a:hover, .mceToolbarBottom a, .mceToolbarBottom a:visited, .mceToolbarBottom a:hover {
+	border: 0; margin: 0; padding: 0; background: transparent;
+}
+
+.mceSeparatorLine {
+	border: 0;
+	padding: 0;
+	margin-left: 4px;
+	margin-right: 2px;
+}
+
+.mceSelectList {
+	font-family: 'MS Sans Serif', sans-serif, Verdana, Arial;
+	font-size: 7pt !important;
+	font-weight: normal;
+	margin-top: 3px;
+	padding: 0;
+	display: inline;
+	vertical-align: top;
+	background-color: #F0F0EE;
+}
+
+.mceLabel, .mceLabelDisabled {
+	font-family: 'MS Sans Serif', sans-serif, Verdana, Arial;
+	font-size: 9pt;
+}
+
+.mceLabel {
+	color: #000000;
+}
+
+.mceLabelDisabled {
+	cursor: text;
+	color: #999999;
+}
+
+.mceEditor {
+	background: #F0F0EE;
+	border: 1px solid #cccccc;
+	padding: 0;
+	margin: 0;
+}
+
+.mceEditorArea {
+	font-family: 'MS Sans Serif', sans-serif, Verdana, Arial;
+	background: #FFFFFF;
+	padding: 0;
+	margin: 0;
+}
+
+.mceToolbarTop, .mceToolbarBottom {
+	background: #F0F0EE;
+	line-height: 1px;
+	font-size: 1px;
+}
+
+.mceToolbarTop {
+	border-bottom: 1px solid #cccccc;
+	padding-bottom: 1px;
+}
+
+.mceToolbarBottom {
+	border-top: 1px solid #cccccc;
+}
+
+.mceStatusbarTop, .mceStatusbarBottom, .mceStatusbar {
+	height: 20px;
+}
+
+.mceStatusbarTop .mceStatusbarPathText, .mceStatusbarBottom .mceStatusbarPathText, .mceStatusbar .mceStatusbarPathText {
+	font-family: 'MS Sans Serif', sans-serif, Verdana, Arial;
+	font-size: 9pt;
+	padding: 2px;
+	line-height: 16px;
+	overflow: visible;
+}
+
+.mceStatusbarTop {
+	border-bottom: 1px solid #cccccc;
+}
+
+.mceStatusbarBottom {
+	border-top: 1px solid #cccccc;
+}
+
+.mceStatusbar {
+	border-bottom: 1px solid #cccccc;
+}
+
+.mcePathItem, .mcePathItem:link, .mcePathItem:visited, .mcePathItem:hover {
+	text-decoration: none;
+	font-family: 'MS Sans Serif', sans-serif, Verdana, Arial;
+	font-size: 9pt;
+	color: #000000;
+}
+
+.mcePathItem:hover {
+	text-decoration: underline;
+}
+
+.mceStatusbarPathText {
+	float: left;
+}
+
+.mceStatusbarResize {
+	float: right;
+	background-image: url('../images/statusbar_resize.gif');
+	background-repeat: no-repeat;
+	width: 11px;
+	height: 20px;
+	cursor: se-resize;
+}
+
+.mceResizeBox {
+	width: 10px;
+	height: 10px;
+	display: none;
+	border: 1px dotted gray;
+	margin: 0;
+	padding: 0;
+}
+
+.mceEditorIframe {
+	border: 0;
+}
+
+/* Button CSS rules */
+
+a.mceButtonDisabled img, a.mceButtonNormal img, a.mceButtonSelected img {
+	width: 20px;
+	height: 20px;
+	cursor: default;
+	margin-top: 1px;
+	margin-left: 1px;
+}
+
+a.mceButtonDisabled img {
+	border: 0 !important;
+}
+
+a.mceButtonNormal img, a.mceButtonSelected img {
+	border: 1px solid #F0F0EE !important;
+}
+
+a.mceButtonSelected img {
+	border: 1px solid #6779AA !important;
+	background-color: #D4D5D8;
+}
+
+a.mceButtonNormal img:hover, a.mceButtonSelected img:hover {
+	border: 1px solid #0A246A !important;
+	cursor: default;
+	background-color: #B6BDD2;
+}
+
+a.mceButtonDisabled img {
+	-moz-opacity:0.3;
+	opacity: 0.3;
+	border: 1px solid #F0F0EE !important;
+	cursor: default;
+}
+
+a.mceTiledButton img {
+	background-image: url('../images/buttons.gif');
+	background-repeat: no-repeat;
+}
+
+/* MSIE specific rules */
+
+* html a.mceButtonNormal img, * html a.mceButtonSelected img, * html a.mceButtonDisabled img {
+	border: 0 !important;
+	margin-top: 2px;
+	margin-bottom: 1px;
+}
+
+* html a.mceButtonDisabled img {
+	filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30);
+	border: 0 !important;
+}
+
+* html a.mceButtonDisabled {
+	border: 1px solid #F0F0EE !important;
+}
+
+* html a.mceButtonNormal, * html a.mceButtonSelected {
+	border: 1px solid #F0F0EE !important;
+	cursor: default;
+}
+
+* html a.mceButtonSelected {
+	border: 1px solid #6779AA !important;
+	background-color: #D4D5D8;
+}
+
+* html a.mceButtonNormal:hover, * html a.mceButtonSelected:hover {
+	border: 1px solid #0A246A !important;
+	cursor: default;
+	background-color: #B6BDD2;
+}
+
+* html .mceSelectList {
+	margin-top: 2px;
+}
+
+/* Menu button CSS rules */
+
+span.mceMenuButton img, span.mceMenuButtonSelected img {
+	border: 1px solid #F0F0EE;
+	margin-left: 1px;
+}
+
+span.mceMenuButtonSelected img {
+	border: 1px solid #6779AA;
+	background-color: #B6BDD2;
+}
+
+span.mceMenuButtonSelected img.mceMenuButton {
+	border: 1px solid #F0F0EE;
+	background-color: transparent;
+}
+
+span.mceMenuButton img.mceMenuButton, span.mceMenuButtonSelected img.mceMenuButton {
+	border-left: 0;
+	margin-left: 0;
+}
+
+span.mceMenuButton:hover img, span.mceMenuButtonSelected:hover img {
+	border: 1px solid #0A246A;
+	background-color: #B6BDD2;
+}
+
+span.mceMenuButton:hover img.mceMenuButton, span.mceMenuButtonSelected:hover img.mceMenuButton {
+	border-left: 0;
+}
+
+span.mceMenuButtonFocus img {
+	border: 1px solid gray;
+	border-right: 0;
+	margin-left: 1px;
+	background-color: #F5F4F2;
+}
+
+span.mceMenuButtonFocus img.mceMenuButton {
+	border: 1px solid gray;
+	border-left: 1px solid #F5F4F2;
+	margin-left: 0;
+}
+
+/* Menu button MSIE specific rules */
+
+* html span.mceMenuButton, * html span.mceMenuButtonFocus {
+	position: relative;
+	left: 0;
+	top: 0;
+}
+
+* html span.mceMenuButton img, * html span.mceMenuButtonSelected img, * html span.mceMenuButtonFocus img {
+	position: relative;
+	top: 1px;
+}
+
+* html span.mceMenuHover img {
+	border: 1px solid #0A246A;
+	background-color: #B6BDD2;
+}
+
+* html span.mceMenuButtonSelected.mceMenuHover img.mceMenuButton {
+	border: 1px solid #0A246A;
+	background-color: #B6BDD2;
+	border-left: 0;
+}
+
+/* Menu */
+
+.mceMenu {
+	position: absolute;
+	left: 0;
+	top: 0;
+	display: none;
+	z-index: 100;
+	background-color: white;
+	border: 1px solid gray;
+	font-weight: normal;
+}
+
+.mceMenu a, .mceMenuTitle, .mceMenuDisabled {
+	display: block;
+	width: 100%;
+	text-decoration: none;
+	background-color: white;
+	font-family: Tahoma, Verdana, Arial, Helvetica;
+	font-size: 11px;
+	line-height: 20px;
+	color: black;
+}
+
+.mceMenu a:hover {
+	background-color: #B6BDD2;
+	color: black;
+	text-decoration: none !important;
+}
+
+.mceMenu span {
+	padding-left: 10px;
+	padding-right: 10px;
+	display: block;
+	line-height: 20px;
+}
+
+.mceMenuSeparator {
+	border-bottom: 1px solid gray;
+	background-color: gray;
+	height: 1px;
+}
+
+.mceMenuTitle span {
+	padding-left: 5px;
+}
+
+.mceMenuTitle {
+	background-color: #DDDDDD;
+	font-weight: bold;
+}
+
+.mceMenuDisabled {
+	color: gray;
+}
+
+span.mceMenuSelectedItem {
+	background-image: url('../images/menu_check.gif');
+	background-repeat: no-repeat;
+	background-position: 5px 8px;
+	padding-left: 20px;
+}
+
+span.mceMenuCheckItem {
+	padding-left: 20px;
+}
+
+span.mceMenuLine {
+	display: block;
+	position: absolute;
+	left: 0;
+	top: -1px;
+	background-color: #F5F4F2;
+	width: 30px;
+	height: 1px;
+	overflow: hidden;
+	padding-left: 0;
+	padding-right: 0;
+}

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/docs/en/about.htm
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/docs/en/about.htm	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/docs/en/about.htm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,31 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<HEAD>
+<TITLE>About TinyMCE</TITLE>
+<link href="style.css" rel="stylesheet" type="text/css">
+</HEAD>
+
+<BODY>
+
+<table width="100%" border="0" cellpadding="1" cellspacing="3" class="pageheader">
+  <tr> 
+    <td><span class="title">About TinyMCE</span></td>
+    <td align="right"><a href="index.htm"><acronym title="Table of contents">TOC</acronym></a></td>
+  </tr>
+</table>
+<hr noshade>
+<br>
+TinyMCE is a small WYSIWYG editor control for web browsers such as MSIE or Mozilla 
+that enables you to edit HTML contents in a more user friendly way. It has common 
+features that are found in most word processors and should not be difficult to 
+use.<br>
+<br>
+<hr noshade>
+<table width="100%" border="0" cellpadding="1" cellspacing="3" class="pagefooter">
+  <tr> 
+    <td>Go to: <a href="index.htm">Table of contents</a></td>
+    <td align="right"><a href="#">Top</a></td>
+  </tr>
+</table>
+<br>
+</BODY>
+</HTML>

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/docs/en/common_buttons.htm
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/docs/en/common_buttons.htm	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/docs/en/common_buttons.htm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,162 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<HEAD>
+<TITLE>Common buttons</TITLE>
+<link href="style.css" rel="stylesheet" type="text/css">
+</HEAD>
+
+<BODY>
+
+<table width="100%" border="0" cellpadding="1" cellspacing="3" class="pageheader">
+  <tr> 
+    <td><span class="title">Common buttons</span></td>
+    <td align="right"><a href="index.htm"><acronym title="Table of contents">TOC</acronym></a></td>
+  </tr>
+</table>
+<hr noshade>
+<br>
+Below is a short description about each button.
+<br>
+<br>
+<table border="1" cellpadding="3" cellspacing="0">
+  <tr>
+    <td><img src="../../images/bold.gif" width="20" height="20" alt="Bold text icon" /></td>
+    <td>Bold text style (Ctrl+B).</td>
+  </tr>
+  <tr>
+    <td><img src="../../images/italic.gif" width="20" height="20" alt="Italic text icon" /></td>
+    <td>Italic text style (Ctrl+I).</td>
+  </tr>
+  <tr>
+    <td><img src="../../images/underline.gif" width="20" height="20" alt="Underline text icon." /></td>
+    <td>Underline text style (Ctrl+U).</td>
+  </tr>
+  <tr>
+    <td><img src="../../images/strikethrough.gif" width="20" height="20" alt="Strikethrough text icon." /></td>
+    <td>Strikethrough text style.</td>
+  </tr>
+  <tr>
+    <td><img src="../../images/justifyleft.gif" width="20" height="20" alt="Align left icon." /></td>
+    <td>Align left.</td>
+  </tr>
+  <tr>
+    <td><img src="../../images/justifycenter.gif" width="20" height="20" alt="Align center icon." /></td>
+    <td>Align center.</td>
+  </tr>
+  <tr>
+    <td><img src="../../images/justifyright.gif" width="20" height="20" alt="Align right icon." /></td>
+    <td>Align right.</td>
+  </tr>
+  <tr>
+    <td><img src="../../images/justifyfull.gif" width="20" height="20" alt="Align full icon." /></td>
+    <td>Align full.</td>
+  </tr>
+  <tr>
+    <td><img src="../../images/bullist.gif" width="20" height="20" alt="Unordered list/bullet list icon." /></td>
+    <td>Unordered list/bullet list.</td>
+  </tr>
+  <tr>
+    <td><img src="../../images/numlist.gif" width="20" height="20" alt="Ordered list/numbered list icon." /></td>
+    <td>Ordered list/numbered list</td>
+  </tr>
+  <tr>
+    <td><img src="../../images/outdent.gif" width="20" height="20" alt="Outdent/decrease indentation icon." /></td>
+    <td>Outdent/decrease indentation.</td>
+  </tr>
+  <tr>
+    <td><img src="../../images/indent.gif" width="20" height="20" alt="Indent/increase indentation icon." /></td>
+    <td>Indent/increase indentation.</td>
+  </tr>
+  <tr>
+    <td><img src="../../images/undo.gif" width="20" height="20" alt="Undo the last operation." /></td>
+    <td>Undo the last operation (Ctrl+Z).</td>
+  </tr>
+  <tr>
+    <td><img src="../../images/redo.gif" width="20" height="20" alt="Redo the last operation icon." /></td>
+    <td>Redo the last operation (Ctrl+Y).</td>
+  </tr>
+  <tr>
+    <td><img src="../../images/link.gif" width="20" height="20" alt="Insert a new link icon." /></td>
+    <td>Insert a new link, read more about this function in the <a href="insert_link_button.htm">Insert 
+      link section</a>.</td>
+  </tr>
+  <tr>
+    <td><img src="../../images/unlink.gif" width="20" height="20" alt="Unlinks the current selection icon." /></td>
+    <td>Unlinks the current selection/removes all selected links.</td>
+  </tr>
+  <tr>
+    <td><img src="../../images/anchor.gif" width="20" height="20" alt="Insert a new anchor icon." /></td>
+    <td>Insert a new anchor, read more about this function in the <a href="insert_anchor_button.htm">Insert anchor section.</a></td>
+  </tr>
+  <tr>
+    <td><img src="../../images/image.gif" width="20" height="20" alt="Insert a new image icon." /></td>
+    <td>Insert a new image, read more about this function in the <a href="insert_image_button.htm">Insert 
+      image section</a>.</td>
+  </tr>
+  <tr>
+    <td><img src="../../images/cleanup.gif" width="20" height="20" alt="Cleanup code icon." /></td>
+    <td>Cleanup code/Removes unwanted formating. This function is useful when 
+      you copy contents from for example a office product.</td>
+  </tr>
+  <tr>
+    <td><img src="../../images/help.gif" width="20" height="20" alt="Show help icon." /></td>
+    <td>Shows this help window.</td>
+  </tr>
+  <tr>
+    <td><img src="../../images/code.gif" width="20" height="20" alt="Source code editor icon." /></td>
+    <td>Opens HTML source code editor. </td>
+  </tr>
+  <tr>
+    <td><img src="../../../../plugins/table/images/table.gif" width="20" height="20" alt="Insert table icon." /></td>
+    <td>Inserts a new table at the current location. </td>
+  </tr>
+  <tr>
+    <td><img src="../../../../plugins/table/images/table_insert_row_before.gif" width="20" height="20" alt="Adds a row above icon." /></td>
+    <td>Adds a row above the current one. </td>
+  </tr>
+  <tr>
+    <td><img src="../../../../plugins/table/images/table_insert_row_after.gif" width="20" height="20" alt="Adds a row under icon." /></td>
+    <td>Adds a row under the current one. </td>
+  </tr>
+  <tr>
+    <td><img src="../../../../plugins/table/images/table_delete_row.gif" width="20" height="20" alt="Remove row icon." /></td>
+    <td>Removes the row. </td>
+  </tr>
+  <tr>
+    <td><img src="../../../../plugins/table/images/table_insert_col_before.gif" width="20" height="20" alt="Add column before icon." /></td>
+    <td>Adds a column before the current one.</td>
+  </tr>
+  <tr>
+    <td><img src="../../../../plugins/table/images/table_insert_col_after.gif" width="20" height="20" alt="Add column after icon." /></td>
+    <td>Adds a column after the current one.</td>
+  </tr>
+  <tr>
+    <td><img src="../../../../plugins/table/images/table_delete_col.gif" width="20" height="20" alt="Remove column icon." /></td>
+    <td>Removes the current column.</td>
+  </tr>
+  <tr>
+    <td><img src="../../images/hr.gif" width="20" height="20" alt="Insert horizontal ruler icon." /></td>
+    <td>Inserts a new horizontal ruler </td>
+  </tr>
+  <tr>
+    <td><img src="../../images/removeformat.gif" width="20" height="20" alt="Remove formatting icon." /></td>
+    <td>Removes formatting from the selection. </td>
+  </tr>
+  <tr>
+    <td><img src="../../images/sub.gif" width="20" height="20" alt="Subscript icon." /></td>
+    <td>Makes the selection to be subscript. </td>
+  </tr>
+  <tr>
+    <td><img src="../../images/sup.gif" width="20" height="20" alt="Superscript icon." /></td>
+    <td>Makes the selection to be superscripted. </td>
+  </tr>
+</table>
+<br>
+<hr noshade="noshade" />
+<table width="100%" border="0" cellpadding="1" cellspacing="3" class="pagefooter">
+  <tr> 
+    <td>Go to: <a href="index.htm">Table of contents</a></td>
+    <td align="right"><a href="#">Top</a></td>
+  </tr>
+</table>
+</BODY>
+</HTML>

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/docs/en/create_accessible_content.htm
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/docs/en/create_accessible_content.htm	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/docs/en/create_accessible_content.htm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,45 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<HEAD>
+<TITLE>Insert table button</TITLE>
+<link href="style.css" rel="stylesheet" type="text/css">
+</HEAD>
+
+<BODY>
+
+<table width="100%" border="0" cellpadding="1" cellspacing="3" class="pageheader">
+  <tr> 
+    <td><span class="title">Create accessible content</span></td>
+    <td align="right"><a href="index.htm"><acronym title="Table of contents">TOC</acronym></a></td>
+  </tr>
+</table>
+<hr noshade>
+<p>TinyMCE can create HTML content that will be accessible to all users, including those with disabilities using assistive technologies, as well as those using text-based browsers, or those browsing the Web with images turned off. </p>
+
+<p><strong>Things you can do to make your content accessible:</strong></p>
+<ol>
+<li><strong>Include an Image Description:</strong> Blind users, or others who are unable to view images, will rely on the Image Description (or Alt text) to take the place of the image. If an image contains no meaning, such as a decoration or a spacer image, leave the Image Description empty. TinyMCE will then insert an empty Alt text attribute that will force assistive technologies to ignore the image. <br /><br /></li>
+
+<li> <strong>Add Scope to data table header cells:</strong> In the table cell editor dialog window, choose a Scope when creating Header cells so the column or row label in that cell becomes explicitely associated with its data cells. Table cell headers will then be announced with each data cell, making it easier for blind users using a screen reader to understand what the content of each cell represents. <br /><br /></li>
+
+<li><strong> Structure content with properly nested headings:</strong> In the format selection menu choose Heading 1 to Heading 6 to represent headings in your content,  rather than using other font formating options. Blind users using a screen reader can then extract the headings from the page to generate a summary of the content it contains, and use those headings to navigate quickly to subsections within the page.<br /><br /></li>
+
+<li><strong> Include alternate content:</strong> Create an alternate page for non-HTML content such as Flash, Java applets, or  embedded movies. This might be a static image, with a description of the image, and a description of the content that would have appeared in its place. An alternate HTML page could also be created, and a link to it included next to the non-HTML object. This will ensure that the content will be accessible to users of assistive technologies that can not view or play the content, and ensure the content will be available to those who do not have the appropriate plugin or helper application installed.<br /><br /></li>
+
+<li><strong> Check accessbility: </strong> When the AChecker plugin is installed with TinyMCE, click on the Check Accessibility button to generate a report of potential accessibility problems.<br /><br /></li>
+
+</ol>
+
+<p>See the <a href="http://checker.atrc.utoronto.ca" target="_new">AChecker Web Site</a> for further details about creating content that will be accessible to all users.<br />
+</p>
+
+<hr noshade>
+<table width="100%" border="0" cellpadding="1" cellspacing="3" class="pagefooter">
+  <tr> 
+    <td>Go to: <a href="index.htm">Table of contents</a></td>
+    <td align="right"><a href="#">Top</a></td>
+  </tr>
+</table>
+
+<br>
+</BODY>
+</HTML>

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/docs/en/images/insert_anchor_window.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/docs/en/images/insert_anchor_window.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/docs/en/images/insert_image_window.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/docs/en/images/insert_image_window.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/docs/en/images/insert_link_window.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/docs/en/images/insert_link_window.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/docs/en/images/insert_table_window.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/docs/en/images/insert_table_window.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/docs/en/index.htm
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/docs/en/index.htm	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/docs/en/index.htm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,27 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<HEAD>
+<TITLE>Help Index</TITLE>
+<link href="style.css" rel="stylesheet" type="text/css">
+</HEAD>
+<BODY onload="window.focus();">
+<table width="100%" border="0" cellpadding="1" cellspacing="3" class="pageheader">
+  <tr> 
+    <td><span class="title">Table of contents</span></td>
+    <td align="right">&nbsp;</td>
+  </tr>
+</table>
+<hr noshade>
+<br>
+Click the links below to go to the different help sections. 
+<ul class="toc_ul">
+  <li class="toc_li"><a href="about.htm">About TinyMCE</a></li>
+  <li class="toc_li"><a href="common_buttons.htm">Common buttons</a></li>
+  <li class="toc_li"><a href="insert_image_button.htm">Insert image button</a></li>
+  <li class="toc_li"><a href="insert_link_button.htm">Insert link button</a></li>
+  <li class="toc_li"><a href="insert_anchor_button.htm">Insert anchor button</a></li>
+  <li class="toc_li"><a href="insert_table_button.htm">Insert table button</a></li>
+ <li class="toc_li"><a href="create_accessible_content.htm">Create accessible content</a></li>
+</ul>
+<hr noshade>
+</BODY>
+</HTML>

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/docs/en/insert_anchor_button.htm
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/docs/en/insert_anchor_button.htm	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/docs/en/insert_anchor_button.htm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,32 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<HEAD>
+<TITLE>Insert anchor button</TITLE>
+<link href="style.css" rel="stylesheet" type="text/css">
+</HEAD>
+
+<BODY>
+
+<table width="100%" border="0" cellpadding="1" cellspacing="3" class="pageheader">
+  <tr> 
+    <td><span class="title">Insert anchor button</span></td>
+    <td align="right"><a href="index.htm"><acronym title="Table of contents">TOC</acronym></a></td>
+  </tr>
+</table>
+<hr noshade>
+<br>
+This button opens a new window with the insert/edit anchor function.<br>
+<br>
+<img src="images/insert_anchor_window.gif" width="330" height="139" alt="Anchor dialog/window" /><br>
+<br>
+There are one field in this window, this is where you enter the name of you anchor point. Remember the anchor name needs to be unique. <br>
+<br>
+<hr noshade>
+<table width="100%" border="0" cellpadding="1" cellspacing="3" class="pagefooter">
+  <tr> 
+    <td>Go to: <a href="index.htm">Table of contents</a></td>
+    <td align="right"><a href="#">Top</a></td>
+  </tr>
+</table>
+<br>
+</BODY>
+</HTML>

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/docs/en/insert_image_button.htm
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/docs/en/insert_image_button.htm	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/docs/en/insert_image_button.htm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,65 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<HEAD>
+<TITLE>Insert image button</TITLE>
+<link href="style.css" rel="stylesheet" type="text/css">
+</HEAD>
+
+<BODY>
+
+<table width="100%" border="0" cellpadding="1" cellspacing="3" class="pageheader">
+  <tr> 
+    <td><span class="title">Insert image button</span></td>
+    <td align="right"><a href="index.htm"><acronym title="Table of contents">TOC</acronym></a></td>
+  </tr>
+</table>
+<hr noshade>
+<br>
+The insert image button opens the window shown below.<br>
+<br>
+<img src="images/insert_image_window.gif" alt="Insert image dialog/window" /><br>
+<br>
+You simply enter a URL to the image you want to link to and enter a image description, 
+this is then displayed as an alternative text descripton of the image on the page.<br>
+<br>
+<strong>Field descriptions:</strong><br>
+<table border="1" cellspacing="0">
+  <tr>
+    <td width="150"><strong>Image URL </strong></td>
+    <td>URL/path to the image.</td>
+  </tr>
+  <tr>
+    <td width="150"><strong>Image description </strong></td>
+    <td>Alternative description of image contents.</td>
+  </tr>
+  <tr>
+    <td><strong>Dimentions</strong></td>
+    <td>Image width/height. </td>
+  </tr>
+  <tr>
+    <td><strong>Alignment</strong></td>
+    <td>Image alignment, useful when wrapping text around images.</td>
+  </tr>
+  <tr>
+    <td><strong>Border</strong></td>
+    <td>Border thickness. </td>
+  </tr>
+  <tr>
+    <td><strong>VSpace</strong></td>
+    <td>Vertical space, useful when wrapping text around images.</td>
+  </tr>
+  <tr>
+    <td><strong>HSpace</strong></td>
+    <td>Horizontal space, useful when wrapping text around images.</td>
+  </tr>
+</table>
+<br>
+<hr noshade>
+<table width="100%" border="0" cellpadding="1" cellspacing="3" class="pagefooter">
+  <tr> 
+    <td>Go to: <a href="index.htm">Table of contents</a></td>
+    <td align="right"><a href="#">Top</a></td>
+  </tr>
+</table>
+<br>
+</BODY>
+</HTML>

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/docs/en/insert_link_button.htm
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/docs/en/insert_link_button.htm	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/docs/en/insert_link_button.htm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,33 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<HEAD>
+<TITLE>Insert link button</TITLE>
+<link href="style.css" rel="stylesheet" type="text/css">
+</HEAD>
+
+<BODY>
+
+<table width="100%" border="0" cellpadding="1" cellspacing="3" class="pageheader">
+  <tr> 
+    <td><span class="title">Insert link button</span></td>
+    <td align="right"><a href="index.htm"><acronym title="Table of contents">TOC</acronym></a></td>
+  </tr>
+</table>
+<hr noshade>
+<br>
+This button opens a new window with the insert/edit link function.<br>
+<br>
+<img src="images/insert_link_window.gif" width="330" height="159" alt="Insert link dialog/window" /><br>
+<br>
+There are two fields in this window the first one &quot;Link URL&quot; is the 
+URL of the link. The target enables you to select how the link is to be opened.<br>
+<br>
+<hr noshade>
+<table width="100%" border="0" cellpadding="1" cellspacing="3" class="pagefooter">
+  <tr> 
+    <td>Go to: <a href="index.htm">Table of contents</a></td>
+    <td align="right"><a href="#">Top</a></td>
+  </tr>
+</table>
+<br>
+</BODY>
+</HTML>

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/docs/en/insert_table_button.htm
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/docs/en/insert_table_button.htm	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/docs/en/insert_table_button.htm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,71 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<HEAD>
+<TITLE>Insert table button</TITLE>
+<link href="style.css" rel="stylesheet" type="text/css">
+</HEAD>
+
+<BODY>
+
+<table width="100%" border="0" cellpadding="1" cellspacing="3" class="pageheader">
+  <tr> 
+    <td><span class="title">Insert table button</span></td>
+    <td align="right"><a href="index.htm"><acronym title="Table of contents">TOC</acronym></a></td>
+  </tr>
+</table>
+<hr noshade>
+<br>
+The insert table button opens the window shown below. This action enables you to create tables. <br>
+<br>
+<img src="images/insert_table_window.gif" width="340" height="229" alt="Image of table window" /><br>
+<br>
+<strong>Field descriptions:</strong><br>
+<table border="1" cellspacing="0">
+  <tr>
+    <td width="150"><strong>Columns</strong></td>
+    <td>Number of columns in the  table. </td>
+  </tr>
+  <tr>
+    <td width="150"><strong>Rows</strong></td>
+    <td>Number of rows in the new table.</td>
+  </tr>
+  <tr>
+    <td><strong>Cellpadding</strong></td>
+    <td>Cellpadding of the table . </td>
+  </tr>
+  <tr>
+    <td><strong>Cellspacing</strong></td>
+    <td>Cellspacing of the table .</td>
+  </tr>
+  <tr>
+    <td><strong>Alignment</strong></td>
+    <td>Table alignment . </td>
+  </tr>
+  <tr>
+    <td><strong>Border</strong></td>
+    <td>Border thinkness of table.</td>
+  </tr>
+  <tr>
+    <td><strong>Width</strong></td>
+    <td>Width in pixels of table .</td>
+  </tr>
+  <tr>
+    <td><strong>Height</strong></td>
+    <td>Height in pixels of table.</td>
+  </tr>
+  <tr>
+    <td><strong>Class</strong></td>
+    <td>Style or CSS class of table.</td>
+  </tr>
+</table>
+<br>
+<br>
+<hr noshade>
+<table width="100%" border="0" cellpadding="1" cellspacing="3" class="pagefooter">
+  <tr> 
+    <td>Go to: <a href="index.htm">Table of contents</a></td>
+    <td align="right"><a href="#">Top</a></td>
+  </tr>
+</table>
+<br>
+</BODY>
+</HTML>

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/docs/en/style.css
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/docs/en/style.css	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/docs/en/style.css	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,28 @@
+body { background-color: #FFFFFF; }
+body, td, .content { font-family: Verdana, Arial, helvetica, sans-serif; font-size: 12px; }
+.title { font-family: Verdana, Arial, helvetica, sans-serif; font-size: 16px; font-weight: bold; }
+.subtitle { font-size: 12px; font-weight: bold; }
+
+.toc_ul, .toc_li { margin-left: 8px; line-height: 16px; }
+.step_ol, .step_li { margin-left: 11px; line-height: 16px; }
+img { border: #000000 solid 1px; }
+
+a:visited { color: #666666; text-decoration: underline; }
+a:active { color: #666666; text-decoration: underline; }
+a:hover { color: #666666; text-decoration: underline; }
+a { color: #666666; text-decoration: underline; }
+
+.pageheader { border: #E0E0E0 solid 1px; }
+.pagefooter { border: #E0E0E0 solid 1px; }
+.sample { background-color: #FFFFFF; border: #000000 solid 1px; }
+.samplecontent { font-size: 10px; }
+
+.code { background-color: #FFFFFF; border: #000000 solid 1px; }
+.codecontent { font-size: 10px; }
+.codecontent a:visited { color: #666666; text-decoration: none; font-weight: bold }
+.codecontent a:active { color: #666666; text-decoration: none; font-weight: bold  }
+.codecontent a:hover { color: #666666; text-decoration: none; font-weight: bold  }
+.codecontent a { color: #666666; text-decoration: none; font-weight: bold  }
+
+hr { height: 1px; }
+

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/editor_template.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/editor_template.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/editor_template.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1 @@
+tinyMCE.importThemeLanguagePack('advanced');var TinyMCE_AdvancedTheme={_autoImportCSSClasses:true,_resizer:{},_buttons:[['bold','{$lang_bold_img}','lang_bold_desc','Bold'],['italic','{$lang_italic_img}','lang_italic_desc','Italic'],['underline','{$lang_underline_img}','lang_underline_desc','Underline'],['strikethrough','strikethrough.gif','lang_striketrough_desc','Strikethrough'],['justifyleft','justifyleft.gif','lang_justifyleft_desc','JustifyLeft'],['justifycenter','justifycenter.gif','lang_justifycenter_desc','JustifyCenter'],['justifyright','justifyright.gif','lang_justifyright_desc','JustifyRight'],['justifyfull','justifyfull.gif','lang_justifyfull_desc','JustifyFull'],['bullist','bullist.gif','lang_bullist_desc','InsertUnorderedList'],['numlist','numlist.gif','lang_numlist_desc','InsertOrderedList'],['outdent','outdent.gif','lang_outdent_desc','Outdent'],['indent','indent.gif','lang_indent_desc','Indent'],['cut','cut.gif','lang_cut_desc','Cut'],['copy','copy.gif','lang_copy_desc','Copy'],['paste','paste.gif','lang_paste_desc','Paste'],['undo','undo.gif','lang_undo_desc','Undo'],['redo','redo.gif','lang_redo_desc','Redo'],['link','link.gif','lang_link_desc','mceLink',true],['unlink','unlink.gif','lang_unlink_desc','unlink'],['image','image.gif','lang_image_desc','mceImage',true],['cleanup','cleanup.gif','lang_cleanup_desc','mceCleanup'],['help','help.gif','lang_help_desc','mceHelp'],['code','code.gif','lang_theme_code_desc','mceCodeEditor'],['hr','hr.gif','lang_theme_hr_desc','inserthorizontalrule'],['removeformat','removeformat.gif','lang_theme_removeformat_desc','removeformat'],['sub','sub.gif','lang_theme_sub_desc','subscript'],['sup','sup.gif','lang_theme_sup_desc','superscript'],['forecolor','forecolor.gif','lang_theme_forecolor_desc','mceForeColor',true],['backcolor','backcolor.gif','lang_theme_backcolor_desc','mceBackColor',true],['charmap','charmap.gif','lang_theme_charmap_desc','mceCharMap'],['visualaid','visualaid.gif','lang_theme_visualaid_desc','mceToggleVisualAid'],['anchor','anchor.gif','lang_theme_anchor_desc','mceInsertAnchor'],['newdocument','newdocument.gif','lang_newdocument_desc','mceNewDocument']],_buttonMap:'anchor,backcolor,bold,bullist,charmap,cleanup,code,copy,cut,forecolor,help,hr,image,indent,italic,justifycenter,justifyfull,justifyleft,justifyright,link,newdocument,numlist,outdent,paste,redo,removeformat,strikethrough,sub,sup,underline,undo,unlink,visualaid,advhr,ltr,rtl,emotions,flash,fullpage,fullscreen,iespell,insertdate,inserttime,pastetext,pasteword,selectall,preview,print,save,replace,search,table,cell_props,delete_col,delete_row,col_after,col_before,row_after,row_before,merge_cells,row_props,split_cells',getControlHTML:function(button_name){var i,x;for(i=0;i<TinyMCE_AdvancedTheme._buttons.length;i++){var but=TinyMCE_AdvancedTheme._buttons[i];if(but[0]==button_name)return tinyMCE.getButtonHTML(but[0],but[2],'{$themeurl}/images/'+but[1],but[3],(but.length>4?but[4]:false),(but.length>5?but[5]:null));}switch(button_name){case"formatselect":var html='<select id="{$editor_id}_formatSelect" name="{$editor_id}_formatSelect" onfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'FormatBlock\',false,this.options[this.selectedIndex].value);" class="mceSelectList">';var formats=tinyMCE.getParam("theme_advanced_blockformats","p,address,pre,h1,h2,h3,h4,h5,h6",true).split(',');var lookup=[['p','{$lang_theme_paragraph}'],['address','{$lang_theme_address}'],['pre','{$lang_theme_pre}'],['h1','{$lang_theme_h1}'],['h2','{$lang_theme_h2}'],['h3','{$lang_theme_h3}'],['h4','{$lang_theme_h4}'],['h5','{$lang_theme_h5}'],['h6','{$lang_theme_h6}'],['div','{$lang_theme_div}'],['blockquote','{$lang_theme_blockquote}'],['code','{$lang_theme_code}'],['dt','{$lang_theme_dt}'],['dd','{$lang_theme_dd}'],['samp','{$lang_theme_samp}']];html+='<option value="">{$lang_theme_block}</option>';for(var i=0;i<formats.length;i++){for(var x=0;x<lookup.length;x++){if(formats[i]==lookup[x][0])html+='<option value="&lt;'+lookup[x][0]+'&gt;">'+lookup[x][1]+'</option>';}}html+='</select>';return html;case"styleselect":return'<select id="{$editor_id}_styleSelect" onmousedown="tinyMCE.themes.advanced._setupCSSClasses(\'{$editor_id}\');" name="{$editor_id}_styleSelect" onfocus="tinyMCE.addSelectAccessibility(event,this,window);" onchange="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceSetCSSClass\',false,this.options[this.selectedIndex].value);" class="mceSelectList">{$style_select_options}</select>';case"fontselect":var fontHTML='<select id="{$editor_id}_fontNameSelect" name="{$editor_id}_fontNameSelect" onfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'FontName\',false,this.options[this.selectedIndex].value);" class="mceSelectList"><option value="">{$lang_theme_fontdefault}</option>';var iFonts='Arial=arial,helvetica,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,times new roman,times,serif;Tahoma=tahoma,arial,helvetica,sans-serif;Times New Roman=times new roman,times,serif;Verdana=verdana,arial,helvetica,sans-serif;Impact=impact;WingDings=wingdings';var nFonts='Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sand;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats';var fonts=tinyMCE.getParam("theme_advanced_fonts",nFonts).split(';');for(i=0;i<fonts.length;i++){if(fonts[i]!=''){var parts=fonts[i].split('=');fontHTML+='<option value="'+parts[1]+'">'+parts[0]+'</option>';}}fontHTML+='</select>';return fontHTML;case"fontsizeselect":return'<select id="{$editor_id}_fontSizeSelect" name="{$editor_id}_fontSizeSelect" onfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'FontSize\',false,this.options[this.selectedIndex].value);" class="mceSelectList">'+'<option value="0">{$lang_theme_font_size}</option>'+'<option value="1">1 (8 pt)</option>'+'<option value="2">2 (10 pt)</option>'+'<option value="3">3 (12 pt)</option>'+'<option value="4">4 (14 pt)</option>'+'<option value="5">5 (18 pt)</option>'+'<option value="6">6 (24 pt)</option>'+'<option value="7">7 (36 pt)</option>'+'</select>';case"|":case"separator":return'<img src="{$themeurl}/images/separator.gif" width="2" height="20" class="mceSeparatorLine" />';case"spacer":return'<img src="{$themeurl}/images/separator.gif" width="2" height="15" border="0" class="mceSeparatorLine" style="vertical-align: middle" />';case"rowseparator":return'<br />';}return"";},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case"mceLink":var inst=tinyMCE.getInstanceById(editor_id);var doc=inst.getDoc();var selectedText="";if(tinyMCE.isMSIE){var rng=doc.selection.createRange();selectedText=rng.text;}else selectedText=inst.getSel().toString();if(!tinyMCE.linkElement){if((tinyMCE.selectedElement.nodeName.toLowerCase()!="img")&&(selectedText.length<=0))return true;}var href="",target="",title="",onclick="",action="insert",style_class="";if(tinyMCE.selectedElement.nodeName.toLowerCase()=="a")tinyMCE.linkElement=tinyMCE.selectedElement;if(tinyMCE.linkElement!=null&&tinyMCE.getAttrib(tinyMCE.linkElement,'href')=="")tinyMCE.linkElement=null;if(tinyMCE.linkElement){href=tinyMCE.getAttrib(tinyMCE.linkElement,'href');target=tinyMCE.getAttrib(tinyMCE.linkElement,'target');title=tinyMCE.getAttrib(tinyMCE.linkElement,'title');onclick=tinyMCE.getAttrib(tinyMCE.linkElement,'onclick');style_class=tinyMCE.getAttrib(tinyMCE.linkElement,'class');if(onclick=="")onclick=tinyMCE.getAttrib(tinyMCE.linkElement,'onclick');onclick=tinyMCE.cleanupEventStr(onclick);href=eval(tinyMCE.settings['urlconverter_callback']+"(href, tinyMCE.linkElement, true);");mceRealHref=tinyMCE.getAttrib(tinyMCE.linkElement,'mce_href');if(mceRealHref!=""){href=mceRealHref;if(tinyMCE.getParam('convert_urls'))href=eval(tinyMCE.settings['urlconverter_callback']+"(href, tinyMCE.linkElement, true);");}action="update";}var template=new Array();template['file']='link.htm';template['width']=310;template['height']=200;template['width']+=tinyMCE.getLang('lang_insert_link_delta_width',0);template['height']+=tinyMCE.getLang('lang_insert_link_delta_height',0);if(inst.settings['insertlink_callback']){var returnVal=eval(inst.settings['insertlink_callback']+"(href, target, title, onclick, action, style_class);");if(returnVal&&returnVal['href'])TinyMCE_AdvancedTheme._insertLink(returnVal['href'],returnVal['target'],returnVal['title'],returnVal['onclick'],returnVal['style_class']);}else{tinyMCE.openWindow(template,{href:href,target:target,title:title,onclick:onclick,action:action,className:style_class,inline:"yes"});}return true;case"mceImage":var src="",alt="",border="",hspace="",vspace="",width="",height="",align="";var title="",onmouseover="",onmouseout="",action="insert";var img=tinyMCE.imgElement;var inst=tinyMCE.getInstanceById(editor_id);if(tinyMCE.selectedElement!=null&&tinyMCE.selectedElement.nodeName.toLowerCase()=="img"){img=tinyMCE.selectedElement;tinyMCE.imgElement=img;}if(img){if(tinyMCE.getAttrib(img,'name').indexOf('mce_')==0)return true;src=tinyMCE.getAttrib(img,'src');alt=tinyMCE.getAttrib(img,'alt');if(alt=="")alt=tinyMCE.getAttrib(img,'title');if(tinyMCE.isGecko){var w=img.style.width;if(w!=null&&w!="")img.setAttribute("width",w);var h=img.style.height;if(h!=null&&h!="")img.setAttribute("height",h);}border=tinyMCE.getAttrib(img,'border');hspace=tinyMCE.getAttrib(img,'hspace');vspace=tinyMCE.getAttrib(img,'vspace');width=tinyMCE.getAttrib(img,'width');height=tinyMCE.getAttrib(img,'height');align=tinyMCE.getAttrib(img,'align');onmouseover=tinyMCE.getAttrib(img,'onmouseover');onmouseout=tinyMCE.getAttrib(img,'onmouseout');title=tinyMCE.getAttrib(img,'title');if(tinyMCE.isMSIE){width=img.attributes['width'].specified?width:"";height=img.attributes['height'].specified?height:"";}src=eval(tinyMCE.settings['urlconverter_callback']+"(src, img, true);");mceRealSrc=tinyMCE.getAttrib(img,'mce_src');if(mceRealSrc!=""){src=mceRealSrc;if(tinyMCE.getParam('convert_urls'))src=eval(tinyMCE.settings['urlconverter_callback']+"(src, img, true);");}action="update";}var template=new Array();template['file']='image.htm?src={$src}';template['width']=355;template['height']=265+(tinyMCE.isMSIE?25:0);template['width']+=tinyMCE.getLang('lang_insert_image_delta_width',0);template['height']+=tinyMCE.getLang('lang_insert_image_delta_height',0);if(inst.settings['insertimage_callback']){var returnVal=eval(inst.settings['insertimage_callback']+"(src, alt, border, hspace, vspace, width, height, align, title, onmouseover, onmouseout, action);");if(returnVal&&returnVal['src'])TinyMCE_AdvancedTheme._insertImage(returnVal['src'],returnVal['alt'],returnVal['border'],returnVal['hspace'],returnVal['vspace'],returnVal['width'],returnVal['height'],returnVal['align'],returnVal['title'],returnVal['onmouseover'],returnVal['onmouseout']);}else tinyMCE.openWindow(template,{src:src,alt:alt,border:border,hspace:hspace,vspace:vspace,width:width,height:height,align:align,title:title,onmouseover:onmouseover,onmouseout:onmouseout,action:action,inline:"yes"});return true;case"mceForeColor":var template=new Array();var elm=tinyMCE.selectedInstance.getFocusElement();var inputColor=tinyMCE.getAttrib(elm,"color");if(inputColor=='')inputColor=elm.style.color;if(!inputColor)inputColor="#000000";template['file']='color_picker.htm';template['width']=220;template['height']=190;tinyMCE.openWindow(template,{editor_id:editor_id,inline:"yes",command:"forecolor",input_color:inputColor});return true;case"mceBackColor":var template=new Array();var elm=tinyMCE.selectedInstance.getFocusElement();var inputColor=elm.style.backgroundColor;if(!inputColor)inputColor="#000000";template['file']='color_picker.htm';template['width']=220;template['height']=190;template['width']+=tinyMCE.getLang('lang_theme_advanced_backcolor_delta_width',0);template['height']+=tinyMCE.getLang('lang_theme_advanced_backcolor_delta_height',0);tinyMCE.openWindow(template,{editor_id:editor_id,inline:"yes",command:"HiliteColor",input_color:inputColor});return true;case"mceColorPicker":if(user_interface){var template=new Array();var inputColor=value['document'].getElementById(value['element_id']).value;template['file']='color_picker.htm';template['width']=220;template['height']=190;template['close_previous']="no";template['width']+=tinyMCE.getLang('lang_theme_advanced_colorpicker_delta_width',0);template['height']+=tinyMCE.getLang('lang_theme_advanced_colorpicker_delta_height',0);if(typeof(value['store_selection'])=="undefined")value['store_selection']=true;tinyMCE.lastColorPickerValue=value;tinyMCE.openWindow(template,{editor_id:editor_id,mce_store_selection:value['store_selection'],inline:"yes",command:"mceColorPicker",input_color:inputColor});}else{var savedVal=tinyMCE.lastColorPickerValue;var elm=savedVal['document'].getElementById(savedVal['element_id']);elm.value=value;if(elm.onchange!=null&&elm.onchange!='')eval('elm.onchange();');}return true;case"mceCodeEditor":var template=new Array();template['file']='source_editor.htm';template['width']=parseInt(tinyMCE.getParam("theme_advanced_source_editor_width",720));template['height']=parseInt(tinyMCE.getParam("theme_advanced_source_editor_height",580));tinyMCE.openWindow(template,{editor_id:editor_id,resizable:"yes",scrollbars:"no",inline:"yes"});return true;case"mceCharMap":var template=new Array();template['file']='charmap.htm';template['width']=550+(tinyMCE.isOpera?40:0);template['height']=250;template['width']+=tinyMCE.getLang('lang_theme_advanced_charmap_delta_width',0);template['height']+=tinyMCE.getLang('lang_theme_advanced_charmap_delta_height',0);tinyMCE.openWindow(template,{editor_id:editor_id,inline:"yes"});return true;case"mceInsertAnchor":var template=new Array();template['file']='anchor.htm';template['width']=320;template['height']=90+(tinyMCE.isNS7?30:0);template['width']+=tinyMCE.getLang('lang_theme_advanced_anchor_delta_width',0);template['height']+=tinyMCE.getLang('lang_theme_advanced_anchor_delta_height',0);tinyMCE.openWindow(template,{editor_id:editor_id,inline:"yes"});return true;case"mceNewDocument":if(confirm(tinyMCE.getLang('lang_newdocument')))tinyMCE.execInstanceCommand(editor_id,'mceSetContent',false,' ');return true;}return false;},getEditorTemplate:function(settings,editorId){function removeFromArray(in_array,remove_array){var outArray=new Array();for(var i=0;i<in_array.length;i++){skip=false;for(var j=0;j<remove_array.length;j++){if(in_array[i]==remove_array[j]){skip=true;}}if(!skip){outArray[outArray.length]=in_array[i];}}return outArray;}function addToArray(in_array,add_array){for(var i=0;i<add_array.length;i++){in_array[in_array.length]=add_array[i];}return in_array;}var template=new Array();var deltaHeight=0;var resizing=tinyMCE.getParam("theme_advanced_resizing",false);var path=tinyMCE.getParam("theme_advanced_path",true);var statusbarHTML='<div id="{$editor_id}_path" class="mceStatusbarPathText" style="display: '+(path?"block":"none")+'">&#160;</div><div id="{$editor_id}_resize" class="mceStatusbarResize" style="display: '+(resizing?"block":"none")+'" onmousedown="tinyMCE.themes.advanced._setResizing(event,\'{$editor_id}\',true);"></div><br style="clear: both" />';var layoutManager=tinyMCE.getParam("theme_advanced_layout_manager","SimpleLayout");var styleSelectHTML='<option value="">{$lang_theme_style_select}</option>';if(settings['theme_advanced_styles']){var stylesAr=settings['theme_advanced_styles'].split(';');for(var i=0;i<stylesAr.length;i++){var key,value;key=stylesAr[i].split('=')[0];value=stylesAr[i].split('=')[1];styleSelectHTML+='<option value="'+value+'">'+key+'</option>';}TinyMCE_AdvancedTheme._autoImportCSSClasses=false;}switch(layoutManager){case"SimpleLayout":var toolbarHTML="";var toolbarLocation=tinyMCE.getParam("theme_advanced_toolbar_location","bottom");var toolbarAlign=tinyMCE.getParam("theme_advanced_toolbar_align","center");var pathLocation=tinyMCE.getParam("theme_advanced_path_location","none");var statusbarLocation=tinyMCE.getParam("theme_advanced_statusbar_location",pathLocation);var defVals={theme_advanced_buttons1:"bold,italic,underline,strikethrough,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,styleselect,formatselect",theme_advanced_buttons2:"bullist,numlist,separator,outdent,indent,separator,undo,redo,separator,link,unlink,anchor,image,cleanup,help,code",theme_advanced_buttons3:"hr,removeformat,visualaid,separator,sub,sup,separator,charmap"};toolbarHTML+='<a href="#" accesskey="q" title="'+tinyMCE.getLang("lang_toolbar_focus")+'"';if(!tinyMCE.getParam("accessibility_focus"))toolbarHTML+=' onfocus="tinyMCE.getInstanceById(\''+editorId+'\').getWin().focus();"';toolbarHTML+='></a>';for(var i=1;i<100;i++){var def=defVals["theme_advanced_buttons"+i];var buttons=tinyMCE.getParam("theme_advanced_buttons"+i,def==null?'':def,true,',');if(buttons.length==0)break;buttons=removeFromArray(buttons,tinyMCE.getParam("theme_advanced_disable","",true,','));buttons=addToArray(buttons,tinyMCE.getParam("theme_advanced_buttons"+i+"_add","",true,','));buttons=addToArray(tinyMCE.getParam("theme_advanced_buttons"+i+"_add_before","",true,','),buttons);for(var b=0;b<buttons.length;b++)toolbarHTML+=tinyMCE.getControlHTML(buttons[b]);if(buttons.length>0){toolbarHTML+="<br />";deltaHeight-=23;}}toolbarHTML+='<a href="#" accesskey="z" onfocus="tinyMCE.getInstanceById(\''+editorId+'\').getWin().focus();"></a>';template['html']='<table class="mceEditor" border="0" cellpadding="0" cellspacing="0" width="{$width}" height="{$height}" style="width:{$width}px;height:{$height}px"><tbody>';if(toolbarLocation=="top"){template['html']+='<tr><td class="mceToolbarTop" align="'+toolbarAlign+'" height="1" nowrap="nowrap">'+toolbarHTML+'</td></tr>';}if(statusbarLocation=="top"){template['html']+='<tr><td class="mceStatusbarTop" height="1">'+statusbarHTML+'</td></tr>';deltaHeight-=23;}template['html']+='<tr><td align="center"><span id="{$editor_id}"></span></td></tr>';if(toolbarLocation=="bottom"){template['html']+='<tr><td class="mceToolbarBottom" align="'+toolbarAlign+'" height="1">'+toolbarHTML+'</td></tr>';}if(toolbarLocation=="external"){var bod=document.body;var elm=document.createElement("div");toolbarHTML=tinyMCE.replaceVar(toolbarHTML,'style_select_options',styleSelectHTML);toolbarHTML=tinyMCE.applyTemplate(toolbarHTML,{editor_id:editorId});elm.className="mceToolbarExternal";elm.id=editorId+"_toolbar";elm.innerHTML='<table width="100%" border="0" align="center"><tr><td align="center">'+toolbarHTML+'</td></tr></table>';bod.appendChild(elm);deltaHeight=0;tinyMCE.getInstanceById(editorId).toolbarElement=elm;}else{tinyMCE.getInstanceById(editorId).toolbarElement=null;}if(statusbarLocation=="bottom"){template['html']+='<tr><td class="mceStatusbarBottom" height="1">'+statusbarHTML+'</td></tr>';deltaHeight-=23;}template['html']+='</tbody></table>';break;case"RowLayout":template['html']='<table class="mceEditor" border="0" cellpadding="0" cellspacing="0" width="{$width}" height="{$height}" style="width:{$width}px;height:{$height}px"><tbody>';var containers=tinyMCE.getParam("theme_advanced_containers","",true,",");var defaultContainerCSS=tinyMCE.getParam("theme_advanced_containers_default_class","container");var defaultContainerAlign=tinyMCE.getParam("theme_advanced_containers_default_align","center");for(var i=0;i<containers.length;i++){if(containers[i]=="mceEditor")template['html']+='<tr><td align="center" class="mceEditor_border"><span id="{$editor_id}"></span></td></tr>';else if(containers[i]=="mceElementpath"||containers[i]=="mceStatusbar"){var pathClass="mceStatusbar";if(i==containers.length-1){pathClass="mceStatusbarBottom";}else if(i==0){pathClass="mceStatusbar";}else{deltaHeight-=2;}template['html']+='<tr><td class="'+pathClass+'" height="1">'+statusbarHTML+'</td></tr>';deltaHeight-=22;}else{var curContainer=tinyMCE.getParam("theme_advanced_container_"+containers[i],"",true,',');var curContainerHTML="";var curAlign=tinyMCE.getParam("theme_advanced_container_"+containers[i]+"_align",defaultContainerAlign);var curCSS=tinyMCE.getParam("theme_advanced_container_"+containers[i]+"_class",defaultContainerCSS);for(var j=0;j<curContainer.length;j++){curContainerHTML+=tinyMCE.getControlHTML(curContainer[j]);}if(curContainer.length>0){curContainerHTML+="<br />";deltaHeight-=23;}template['html']+='<tr><td class="'+curCSS+'" align="'+curAlign+'" height="1">'+curContainerHTML+'</td></tr>';}}template['html']+='</tbody></table>';break;case"CustomLayout":var customLayout=tinyMCE.getParam("theme_advanced_custom_layout","");if(customLayout!=""&&eval("typeof("+customLayout+")")!="undefined"){template=eval(customLayout+"(template);");}break;}if(resizing)template['html']+='<span id="{$editor_id}_resize_box" class="mceResizeBox"></span>';template['html']=tinyMCE.replaceVar(template['html'],'style_select_options',styleSelectHTML);template['delta_width']=0;template['delta_height']=deltaHeight;return template;},initInstance:function(inst){if(tinyMCE.getParam("theme_advanced_resizing",false)){if(tinyMCE.getParam("theme_advanced_resizing_use_cookie",true)){var w=TinyMCE_AdvancedTheme._getCookie("TinyMCE_"+inst.editorId+"_width");var h=TinyMCE_AdvancedTheme._getCookie("TinyMCE_"+inst.editorId+"_height");TinyMCE_AdvancedTheme._resizeTo(inst,w,h,tinyMCE.getParam("theme_advanced_resize_horizontal",true));}}inst.addShortcut('ctrl','k','lang_link_desc','mceLink');},handleNodeChange:function(editor_id,node,undo_index,undo_levels,visual_aid,any_selection,setup_content){function selectByValue(select_elm,value,first_index){first_index=typeof(first_index)=="undefined"?false:true;if(select_elm){for(var i=0;i<select_elm.options.length;i++){var ov=""+select_elm.options[i].value;if(first_index&&ov.toLowerCase().indexOf(value.toLowerCase())==0){select_elm.selectedIndex=i;return true;}if(ov==value){select_elm.selectedIndex=i;return true;}}}return false;};function getAttrib(elm,name){return elm.getAttribute(name)?elm.getAttribute(name):"";};if(node==null)return;var pathElm=document.getElementById(editor_id+"_path");var inst=tinyMCE.getInstanceById(editor_id);var doc=inst.getDoc();if(pathElm){var parentNode=node;var path=new Array();while(parentNode!=null){if(parentNode.nodeName.toUpperCase()=="BODY"){break;}if(parentNode.nodeType==1&&tinyMCE.getAttrib(parentNode,"class").indexOf('mceItemHidden')==-1){path[path.length]=parentNode;}parentNode=parentNode.parentNode;}var html="";for(var i=path.length-1;i>=0;i--){var nodeName=path[i].nodeName.toLowerCase();var nodeData="";if(nodeName=="b"){nodeName="strong";}if(nodeName=="i"){nodeName="em";}if(nodeName=="span"){var cn=tinyMCE.getAttrib(path[i],"class");if(cn!=""&&cn.indexOf('mceItem')==-1)nodeData+="class: "+cn+" ";var st=tinyMCE.getAttrib(path[i],"style");if(st!=""){st=tinyMCE.serializeStyle(tinyMCE.parseStyle(st));nodeData+="style: "+st+" ";}}if(nodeName=="font"){if(tinyMCE.getParam("convert_fonts_to_spans"))nodeName="span";var face=tinyMCE.getAttrib(path[i],"face");if(face!="")nodeData+="font: "+face+" ";var size=tinyMCE.getAttrib(path[i],"size");if(size!="")nodeData+="size: "+size+" ";var color=tinyMCE.getAttrib(path[i],"color");if(color!="")nodeData+="color: "+color+" ";}if(getAttrib(path[i],'id')!=""){nodeData+="id: "+path[i].getAttribute('id')+" ";}var className=tinyMCE.getVisualAidClass(tinyMCE.getAttrib(path[i],"class"),false);if(className!=""&&className.indexOf('mceItem')==-1)nodeData+="class: "+className+" ";if(getAttrib(path[i],'src')!=""){var src=tinyMCE.getAttrib(path[i],"mce_src");if(src=="")src=tinyMCE.getAttrib(path[i],"src");nodeData+="src: "+src+" ";}if(getAttrib(path[i],'href')!=""){var href=tinyMCE.getAttrib(path[i],"mce_href");if(href=="")href=tinyMCE.getAttrib(path[i],"href");nodeData+="href: "+href+" ";}if(nodeName=="img"&&tinyMCE.getAttrib(path[i],"class").indexOf('mceItemFlash')!=-1){nodeName="flash";nodeData="src: "+path[i].getAttribute('title');}if(nodeName=="a"&&(anchor=tinyMCE.getAttrib(path[i],"name"))!=""){nodeName="a";nodeName+="#"+anchor;nodeData="";}if(getAttrib(path[i],'name').indexOf("mce_")!=0){var className=tinyMCE.getVisualAidClass(tinyMCE.getAttrib(path[i],"class"),false);if(className!=""&&className.indexOf('mceItem')==-1){nodeName+="."+className;}}var cmd='tinyMCE.execInstanceCommand(\''+editor_id+'\',\'mceSelectNodeDepth\',false,\''+i+'\');';html+='<a title="'+nodeData+'" href="javascript:'+cmd+'" onclick="'+cmd+'return false;" onmousedown="return false;" target="_self" class="mcePathItem">'+nodeName+'</a>';if(i>0){html+=" &raquo; ";}}pathElm.innerHTML='<a href="#" accesskey="x"></a>'+tinyMCE.getLang('lang_theme_path')+": "+html+'&#160;';}tinyMCE.switchClass(editor_id+'_justifyleft','mceButtonNormal');tinyMCE.switchClass(editor_id+'_justifyright','mceButtonNormal');tinyMCE.switchClass(editor_id+'_justifycenter','mceButtonNormal');tinyMCE.switchClass(editor_id+'_justifyfull','mceButtonNormal');tinyMCE.switchClass(editor_id+'_bold','mceButtonNormal');tinyMCE.switchClass(editor_id+'_italic','mceButtonNormal');tinyMCE.switchClass(editor_id+'_underline','mceButtonNormal');tinyMCE.switchClass(editor_id+'_strikethrough','mceButtonNormal');tinyMCE.switchClass(editor_id+'_bullist','mceButtonNormal');tinyMCE.switchClass(editor_id+'_numlist','mceButtonNormal');tinyMCE.switchClass(editor_id+'_sub','mceButtonNormal');tinyMCE.switchClass(editor_id+'_sup','mceButtonNormal');tinyMCE.switchClass(editor_id+'_anchor','mceButtonNormal');tinyMCE.switchClass(editor_id+'_link','mceButtonDisabled');tinyMCE.switchClass(editor_id+'_unlink','mceButtonDisabled');tinyMCE.switchClass(editor_id+'_outdent','mceButtonDisabled');tinyMCE.switchClass(editor_id+'_image','mceButtonNormal');tinyMCE.switchClass(editor_id+'_hr','mceButtonNormal');if(node.nodeName=="A"&&tinyMCE.getAttrib(node,"class").indexOf('mceItemAnchor')!=-1)tinyMCE.switchClass(editor_id+'_anchor','mceButtonSelected');var anchorLink=tinyMCE.getParentElement(node,"a","href");if(anchorLink||any_selection){tinyMCE.switchClass(editor_id+'_link',anchorLink?'mceButtonSelected':'mceButtonNormal');tinyMCE.switchClass(editor_id+'_unlink',anchorLink?'mceButtonSelected':'mceButtonNormal');}tinyMCE.switchClass(editor_id+'_visualaid',visual_aid?'mceButtonSelected':'mceButtonNormal');if(undo_levels!=-1){tinyMCE.switchClass(editor_id+'_undo','mceButtonDisabled');tinyMCE.switchClass(editor_id+'_redo','mceButtonDisabled');}if(tinyMCE.getParentElement(node,"li,blockquote"))tinyMCE.switchClass(editor_id+'_outdent','mceButtonNormal');if(undo_index!=-1&&(undo_index<undo_levels-1&&undo_levels>0))tinyMCE.switchClass(editor_id+'_redo','mceButtonNormal');if(undo_index!=-1&&(undo_index>0&&undo_levels>0))tinyMCE.switchClass(editor_id+'_undo','mceButtonNormal');var selectElm=document.getElementById(editor_id+"_styleSelect");if(selectElm){TinyMCE_AdvancedTheme._setupCSSClasses(editor_id);classNode=node;breakOut=false;var index=0;do{if(classNode&&classNode.className){for(var i=0;i<selectElm.options.length;i++){if(selectElm.options[i].value==classNode.className){index=i;breakOut=true;break;}}}}while(!breakOut&&classNode!=null&&(classNode=classNode.parentNode)!=null);selectElm.selectedIndex=index;}var selectElm=document.getElementById(editor_id+"_formatSelect");if(selectElm){var elm=tinyMCE.getParentElement(node,"p,div,h1,h2,h3,h4,h5,h6,pre,address");if(elm)selectByValue(selectElm,"<"+elm.nodeName.toLowerCase()+">");else selectByValue(selectElm,"");}var selectElm=document.getElementById(editor_id+"_fontNameSelect");if(selectElm){if(!tinyMCE.isSafari&&!(tinyMCE.isMSIE&&!tinyMCE.isOpera)){var face=inst.queryCommandValue('FontName');face=face==null||face==""?"":face;selectByValue(selectElm,face,face!="");}else{var elm=tinyMCE.getParentElement(node,"font","face");if(elm){var family=tinyMCE.getAttrib(elm,"face");if(family=='')family=''+elm.style.fontFamily;if(!selectByValue(selectElm,family,family!=""))selectByValue(selectElm,"");}else selectByValue(selectElm,"");}}var selectElm=document.getElementById(editor_id+"_fontSizeSelect");if(selectElm){if(!tinyMCE.isSafari&&!tinyMCE.isOpera){var size=inst.queryCommandValue('FontSize');selectByValue(selectElm,size==null||size==""?"0":size);}else{var elm=tinyMCE.getParentElement(node,"font","size");if(elm){var size=tinyMCE.getAttrib(elm,"size");if(size==''){var sizes=new Array('','8px','10px','12px','14px','18px','24px','36px');size=''+elm.style.fontSize;for(var i=0;i<sizes.length;i++){if((''+sizes[i])==size){size=i;break;}}}if(!selectByValue(selectElm,size))selectByValue(selectElm,"");}else selectByValue(selectElm,"0");}}alignNode=node;breakOut=false;do{if(!alignNode.getAttribute||!alignNode.getAttribute('align'))continue;switch(alignNode.getAttribute('align').toLowerCase()){case"left":tinyMCE.switchClass(editor_id+'_justifyleft','mceButtonSelected');breakOut=true;break;case"right":tinyMCE.switchClass(editor_id+'_justifyright','mceButtonSelected');breakOut=true;break;case"middle":case"center":tinyMCE.switchClass(editor_id+'_justifycenter','mceButtonSelected');breakOut=true;break;case"justify":tinyMCE.switchClass(editor_id+'_justifyfull','mceButtonSelected');breakOut=true;break;}}while(!breakOut&&(alignNode=alignNode.parentNode)!=null);var div=tinyMCE.getParentElement(node,"div");if(div&&div.style.textAlign=="center")tinyMCE.switchClass(editor_id+'_justifycenter','mceButtonSelected');if(!setup_content){var ar=new Array("Bold","_bold","Italic","_italic","Strikethrough","_strikethrough","superscript","_sup","subscript","_sub");for(var i=0;i<ar.length;i+=2){if(inst.queryCommandState(ar[i]))tinyMCE.switchClass(editor_id+ar[i+1],'mceButtonSelected');}if(inst.queryCommandState("Underline")&&(node.parentNode==null||node.parentNode.nodeName!="A"))tinyMCE.switchClass(editor_id+'_underline','mceButtonSelected');}do{switch(node.nodeName){case"UL":tinyMCE.switchClass(editor_id+'_bullist','mceButtonSelected');break;case"OL":tinyMCE.switchClass(editor_id+'_numlist','mceButtonSelected');break;case"HR":tinyMCE.switchClass(editor_id+'_hr','mceButtonSelected');break;case"IMG":if(getAttrib(node,'name').indexOf('mce_')!=0){tinyMCE.switchClass(editor_id+'_image','mceButtonSelected');}break;}}while((node=node.parentNode)!=null);},_setupCSSClasses:function(editor_id){var i,selectElm;if(!TinyMCE_AdvancedTheme._autoImportCSSClasses)return;selectElm=document.getElementById(editor_id+'_styleSelect');if(selectElm&&selectElm.getAttribute('cssImported')!='true'){var csses=tinyMCE.getCSSClasses(editor_id);if(csses&&selectElm){for(i=0;i<csses.length;i++)selectElm.options[selectElm.options.length]=new Option(csses[i],csses[i]);}if(csses!=null&&csses.length>0)selectElm.setAttribute('cssImported','true');}},_setCookie:function(name,value,expires,path,domain,secure){var curCookie=name+"="+escape(value)+((expires)?"; expires="+expires.toGMTString():"")+((path)?"; path="+escape(path):"")+((domain)?"; domain="+domain:"")+((secure)?"; secure":"");document.cookie=curCookie;},_getCookie:function(name){var dc=document.cookie;var prefix=name+"=";var begin=dc.indexOf("; "+prefix);if(begin==-1){begin=dc.indexOf(prefix);if(begin!=0)return null;}else begin+=2;var end=document.cookie.indexOf(";",begin);if(end==-1)end=dc.length;return unescape(dc.substring(begin+prefix.length,end));},_resizeTo:function(inst,w,h,set_w){var editorContainer=document.getElementById(inst.editorId+'_parent');var tableElm=editorContainer.firstChild;var iframe=inst.iframeElement;if(w==null||w=="null"){set_w=false;w=0;}if(h==null||h=="null")return;w=parseInt(w);h=parseInt(h);if(tinyMCE.isGecko){w+=2;h+=2;}var dx=w-tableElm.clientWidth;var dy=h-tableElm.clientHeight;w=w<1?30:w;h=h<1?30:h;if(set_w)tableElm.style.width=w+"px";tableElm.style.height=h+"px";iw=iframe.clientWidth+dx;ih=iframe.clientHeight+dy;iw=iw<1?30:iw;ih=ih<1?30:ih;if(tinyMCE.isGecko){iw-=2;ih-=2;}if(set_w)iframe.style.width=iw+"px";iframe.style.height=ih+"px";if(set_w){var tableBodyElm=tableElm.firstChild;var minIframeWidth=tableBodyElm.scrollWidth;if(inst.iframeElement.clientWidth<minIframeWidth){dx=minIframeWidth-inst.iframeElement.clientWidth;inst.iframeElement.style.width=(iw+dx)+"px";}}},_resizeEventHandler:function(e){var resizer=TinyMCE_AdvancedTheme._resizer;if(!resizer.resizing)return;e=typeof(e)=="undefined"?window.event:e;var dx=e.screenX-resizer.downX;var dy=e.screenY-resizer.downY;var resizeBox=resizer.resizeBox;var editorId=resizer.editorId;switch(e.type){case"mousemove":var w,h;w=resizer.width+dx;h=resizer.height+dy;w=w<1?1:w;h=h<1?1:h;if(resizer.horizontal)resizeBox.style.width=w+"px";resizeBox.style.height=h+"px";break;case"mouseup":TinyMCE_AdvancedTheme._setResizing(e,editorId,false);TinyMCE_AdvancedTheme._resizeTo(tinyMCE.getInstanceById(editorId),resizer.width+dx,resizer.height+dy,resizer.horizontal);if(tinyMCE.getParam("theme_advanced_resizing_use_cookie",true)){var expires=new Date();expires.setTime(expires.getTime()+3600000*24*30);TinyMCE_AdvancedTheme._setCookie("TinyMCE_"+editorId+"_width",""+(resizer.horizontal?resizer.width+dx:""),expires);TinyMCE_AdvancedTheme._setCookie("TinyMCE_"+editorId+"_height",""+(resizer.height+dy),expires);}break;}},_setResizing:function(e,editor_id,state){e=typeof(e)=="undefined"?window.event:e;var resizer=TinyMCE_AdvancedTheme._resizer;var editorContainer=document.getElementById(editor_id+'_parent');var editorArea=document.getElementById(editor_id+'_parent').firstChild;var resizeBox=document.getElementById(editor_id+'_resize_box');var inst=tinyMCE.getInstanceById(editor_id);if(state){var width=editorArea.clientWidth;var height=editorArea.clientHeight;resizeBox.style.width=width+"px";resizeBox.style.height=height+"px";resizer.iframeWidth=inst.iframeElement.clientWidth;resizer.iframeHeight=inst.iframeElement.clientHeight;editorArea.style.display="none";resizeBox.style.display="block";if(!resizer.eventHandlers){if(tinyMCE.isMSIE)tinyMCE.addEvent(document,"mousemove",TinyMCE_AdvancedTheme._resizeEventHandler);else tinyMCE.addEvent(window,"mousemove",TinyMCE_AdvancedTheme._resizeEventHandler);tinyMCE.addEvent(document,"mouseup",TinyMCE_AdvancedTheme._resizeEventHandler);resizer.eventHandlers=true;}resizer.resizing=true;resizer.downX=e.screenX;resizer.downY=e.screenY;resizer.width=parseInt(resizeBox.style.width);resizer.height=parseInt(resizeBox.style.height);resizer.editorId=editor_id;resizer.resizeBox=resizeBox;resizer.horizontal=tinyMCE.getParam("theme_advanced_resize_horizontal",true);}else{resizer.resizing=false;resizeBox.style.display="none";editorArea.style.display=tinyMCE.isMSIE&&!tinyMCE.isOpera?"block":"table";tinyMCE.execCommand('mceResetDesignMode');}},_insertImage:function(src,alt,border,hspace,vspace,width,height,align,title,onmouseover,onmouseout){tinyMCE.execCommand('mceBeginUndoLevel');if(src=="")return;if(!tinyMCE.imgElement&&tinyMCE.isSafari){var html="";html+='<img src="'+src+'" alt="'+alt+'"';html+=' border="'+border+'" hspace="'+hspace+'"';html+=' vspace="'+vspace+'" width="'+width+'"';html+=' height="'+height+'" align="'+align+'" title="'+title+'" onmouseover="'+onmouseover+'" onmouseout="'+onmouseout+'" />';tinyMCE.execCommand("mceInsertContent",false,html);}else{if(!tinyMCE.imgElement&&tinyMCE.selectedInstance){if(tinyMCE.isSafari)tinyMCE.execCommand("mceInsertContent",false,'<img src="'+tinyMCE.uniqueURL+'" />');else tinyMCE.selectedInstance.contentDocument.execCommand("insertimage",false,tinyMCE.uniqueURL);tinyMCE.imgElement=tinyMCE.getElementByAttributeValue(tinyMCE.selectedInstance.contentDocument.body,"img","src",tinyMCE.uniqueURL);}}if(tinyMCE.imgElement){var needsRepaint=false;var msrc=src;src=eval(tinyMCE.settings['urlconverter_callback']+"(src, tinyMCE.imgElement);");if(tinyMCE.getParam('convert_urls'))msrc=src;if(onmouseover&&onmouseover!="")onmouseover="this.src='"+eval(tinyMCE.settings['urlconverter_callback']+"(onmouseover, tinyMCE.imgElement);")+"';";if(onmouseout&&onmouseout!="")onmouseout="this.src='"+eval(tinyMCE.settings['urlconverter_callback']+"(onmouseout, tinyMCE.imgElement);")+"';";if(typeof(title)=="undefined")title=alt;if(width!=tinyMCE.imgElement.getAttribute("width")||height!=tinyMCE.imgElement.getAttribute("height")||align!=tinyMCE.imgElement.getAttribute("align"))needsRepaint=true;tinyMCE.setAttrib(tinyMCE.imgElement,'src',src);tinyMCE.setAttrib(tinyMCE.imgElement,'mce_src',msrc);tinyMCE.setAttrib(tinyMCE.imgElement,'alt',alt);tinyMCE.setAttrib(tinyMCE.imgElement,'title',title);tinyMCE.setAttrib(tinyMCE.imgElement,'align',align);tinyMCE.setAttrib(tinyMCE.imgElement,'border',border,true);tinyMCE.setAttrib(tinyMCE.imgElement,'hspace',hspace,true);tinyMCE.setAttrib(tinyMCE.imgElement,'vspace',vspace,true);tinyMCE.setAttrib(tinyMCE.imgElement,'width',width,true);tinyMCE.setAttrib(tinyMCE.imgElement,'height',height,true);tinyMCE.setAttrib(tinyMCE.imgElement,'onmouseover',onmouseover);tinyMCE.setAttrib(tinyMCE.imgElement,'onmouseout',onmouseout);if(width&&width!="")tinyMCE.imgElement.style.pixelWidth=width;if(height&&height!="")tinyMCE.imgElement.style.pixelHeight=height;if(needsRepaint)tinyMCE.selectedInstance.repaint();}tinyMCE.execCommand('mceEndUndoLevel');},_insertLink:function(href,target,title,onclick,style_class){tinyMCE.execCommand('mceBeginUndoLevel');if(tinyMCE.selectedInstance&&tinyMCE.selectedElement&&tinyMCE.selectedElement.nodeName.toLowerCase()=="img"){var doc=tinyMCE.selectedInstance.getDoc();var linkElement=tinyMCE.getParentElement(tinyMCE.selectedElement,"a");var newLink=false;if(!linkElement){linkElement=doc.createElement("a");newLink=true;}var mhref=href;var thref=eval(tinyMCE.settings['urlconverter_callback']+"(href, linkElement);");mhref=tinyMCE.getParam('convert_urls')?href:mhref;tinyMCE.setAttrib(linkElement,'href',thref);tinyMCE.setAttrib(linkElement,'mce_href',mhref);tinyMCE.setAttrib(linkElement,'target',target);tinyMCE.setAttrib(linkElement,'title',title);tinyMCE.setAttrib(linkElement,'onclick',onclick);tinyMCE.setAttrib(linkElement,'class',style_class);if(newLink){linkElement.appendChild(tinyMCE.selectedElement.cloneNode(true));tinyMCE.selectedElement.parentNode.replaceChild(linkElement,tinyMCE.selectedElement);}return;}if(!tinyMCE.linkElement&&tinyMCE.selectedInstance){if(tinyMCE.isSafari){tinyMCE.execCommand("mceInsertContent",false,'<a href="'+tinyMCE.uniqueURL+'">'+tinyMCE.selectedInstance.selection.getSelectedHTML()+'</a>');}else tinyMCE.selectedInstance.contentDocument.execCommand("createlink",false,tinyMCE.uniqueURL);tinyMCE.linkElement=tinyMCE.getElementByAttributeValue(tinyMCE.selectedInstance.contentDocument.body,"a","href",tinyMCE.uniqueURL);var elementArray=tinyMCE.getElementsByAttributeValue(tinyMCE.selectedInstance.contentDocument.body,"a","href",tinyMCE.uniqueURL);for(var i=0;i<elementArray.length;i++){var mhref=href;var thref=eval(tinyMCE.settings['urlconverter_callback']+"(href, elementArray[i]);");mhref=tinyMCE.getParam('convert_urls')?href:mhref;tinyMCE.setAttrib(elementArray[i],'href',thref);tinyMCE.setAttrib(elementArray[i],'mce_href',mhref);tinyMCE.setAttrib(elementArray[i],'target',target);tinyMCE.setAttrib(elementArray[i],'title',title);tinyMCE.setAttrib(elementArray[i],'onclick',onclick);tinyMCE.setAttrib(elementArray[i],'class',style_class);}tinyMCE.linkElement=elementArray[0];}if(tinyMCE.linkElement){var mhref=href;href=eval(tinyMCE.settings['urlconverter_callback']+"(href, tinyMCE.linkElement);");mhref=tinyMCE.getParam('convert_urls')?href:mhref;tinyMCE.setAttrib(tinyMCE.linkElement,'href',href);tinyMCE.setAttrib(tinyMCE.linkElement,'mce_href',mhref);tinyMCE.setAttrib(tinyMCE.linkElement,'target',target);tinyMCE.setAttrib(tinyMCE.linkElement,'title',title);tinyMCE.setAttrib(tinyMCE.linkElement,'onclick',onclick);tinyMCE.setAttrib(tinyMCE.linkElement,'class',style_class);}tinyMCE.execCommand('mceEndUndoLevel');}};tinyMCE.addTheme("advanced",TinyMCE_AdvancedTheme);tinyMCE.addButtonMap(TinyMCE_AdvancedTheme._buttonMap);
\ No newline at end of file

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/editor_template_src.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/editor_template_src.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/editor_template_src.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,1411 @@
+/**
+ * $RCSfile: editor_template_src.js,v $
+ * $Revision: 1.96 $
+ * $Date: 2006/04/18 13:32:52 $
+ *
+ * @author Moxiecode
+ * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
+ */
+
+/* Import theme specific language pack */
+tinyMCE.importThemeLanguagePack('advanced');
+
+var TinyMCE_AdvancedTheme = {
+	// Private theme fields
+	_autoImportCSSClasses : true,
+	_resizer : {},
+	_buttons : [
+		// Control id, button img, button title, command, user_interface, value
+		['bold', '{$lang_bold_img}', 'lang_bold_desc', 'Bold'],
+		['italic', '{$lang_italic_img}', 'lang_italic_desc', 'Italic'],
+		['underline', '{$lang_underline_img}', 'lang_underline_desc', 'Underline'],
+		['strikethrough', 'strikethrough.gif', 'lang_striketrough_desc', 'Strikethrough'],
+		['justifyleft', 'justifyleft.gif', 'lang_justifyleft_desc', 'JustifyLeft'],
+		['justifycenter', 'justifycenter.gif', 'lang_justifycenter_desc', 'JustifyCenter'],
+		['justifyright', 'justifyright.gif', 'lang_justifyright_desc', 'JustifyRight'],
+		['justifyfull', 'justifyfull.gif', 'lang_justifyfull_desc', 'JustifyFull'],
+		['bullist', 'bullist.gif', 'lang_bullist_desc', 'InsertUnorderedList'],
+		['numlist', 'numlist.gif', 'lang_numlist_desc', 'InsertOrderedList'],
+		['outdent', 'outdent.gif', 'lang_outdent_desc', 'Outdent'],
+		['indent', 'indent.gif', 'lang_indent_desc', 'Indent'],
+		['cut', 'cut.gif', 'lang_cut_desc', 'Cut'],
+		['copy', 'copy.gif', 'lang_copy_desc', 'Copy'],
+		['paste', 'paste.gif', 'lang_paste_desc', 'Paste'],
+		['undo', 'undo.gif', 'lang_undo_desc', 'Undo'],
+		['redo', 'redo.gif', 'lang_redo_desc', 'Redo'],
+		['link', 'link.gif', 'lang_link_desc', 'mceLink', true],
+		['unlink', 'unlink.gif', 'lang_unlink_desc', 'unlink'],
+		['image', 'image.gif', 'lang_image_desc', 'mceImage', true],
+		['cleanup', 'cleanup.gif', 'lang_cleanup_desc', 'mceCleanup'],
+		['help', 'help.gif', 'lang_help_desc', 'mceHelp'],
+		['code', 'code.gif', 'lang_theme_code_desc', 'mceCodeEditor'],
+		['hr', 'hr.gif', 'lang_theme_hr_desc', 'inserthorizontalrule'],
+		['removeformat', 'removeformat.gif', 'lang_theme_removeformat_desc', 'removeformat'],
+		['sub', 'sub.gif', 'lang_theme_sub_desc', 'subscript'],
+		['sup', 'sup.gif', 'lang_theme_sup_desc', 'superscript'],
+		['forecolor', 'forecolor.gif', 'lang_theme_forecolor_desc', 'mceForeColor', true],
+		['backcolor', 'backcolor.gif', 'lang_theme_backcolor_desc', 'mceBackColor', true],
+		['charmap', 'charmap.gif', 'lang_theme_charmap_desc', 'mceCharMap'],
+		['visualaid', 'visualaid.gif', 'lang_theme_visualaid_desc', 'mceToggleVisualAid'],
+		['anchor', 'anchor.gif', 'lang_theme_anchor_desc', 'mceInsertAnchor'],
+		['newdocument', 'newdocument.gif', 'lang_newdocument_desc', 'mceNewDocument']
+	],
+
+	_buttonMap : 'anchor,backcolor,bold,bullist,charmap,cleanup,code,copy,cut,forecolor,help,hr,image,indent,italic,justifycenter,justifyfull,justifyleft,justifyright,link,newdocument,numlist,outdent,paste,redo,removeformat,strikethrough,sub,sup,underline,undo,unlink,visualaid,advhr,ltr,rtl,emotions,flash,fullpage,fullscreen,iespell,insertdate,inserttime,pastetext,pasteword,selectall,preview,print,save,replace,search,table,cell_props,delete_col,delete_row,col_after,col_before,row_after,row_before,merge_cells,row_props,split_cells',
+
+	/**
+	 * Returns HTML code for the specificed control.
+	 */
+	getControlHTML : function(button_name) {
+		var i, x;
+
+		// Lookup button in button list
+		for (i=0; i<TinyMCE_AdvancedTheme._buttons.length; i++) {
+			var but = TinyMCE_AdvancedTheme._buttons[i];
+
+			if (but[0] == button_name)
+				return tinyMCE.getButtonHTML(but[0], but[2], '{$themeurl}/images/' + but[1], but[3], (but.length > 4 ? but[4] : false), (but.length > 5 ? but[5] : null));
+		}
+
+		// Custom controlls other than buttons
+		switch (button_name) {
+			case "formatselect":
+				var html = '<select id="{$editor_id}_formatSelect" name="{$editor_id}_formatSelect" onfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'FormatBlock\',false,this.options[this.selectedIndex].value);" class="mceSelectList">';
+				var formats = tinyMCE.getParam("theme_advanced_blockformats", "p,address,pre,h1,h2,h3,h4,h5,h6", true).split(',');
+				var lookup = [
+					['p', '{$lang_theme_paragraph}'],
+					['address', '{$lang_theme_address}'],
+					['pre', '{$lang_theme_pre}'],
+					['h1', '{$lang_theme_h1}'],
+					['h2', '{$lang_theme_h2}'],
+					['h3', '{$lang_theme_h3}'],
+					['h4', '{$lang_theme_h4}'],
+					['h5', '{$lang_theme_h5}'],
+					['h6', '{$lang_theme_h6}'],
+					['div', '{$lang_theme_div}'],
+					['blockquote', '{$lang_theme_blockquote}'],
+					['code', '{$lang_theme_code}'],
+					['dt', '{$lang_theme_dt}'],
+					['dd', '{$lang_theme_dd}'],
+					['samp', '{$lang_theme_samp}']
+				];
+
+				html += '<option value="">{$lang_theme_block}</option>';
+
+				// Build format select
+				for (var i=0; i<formats.length; i++) {
+					for (var x=0; x<lookup.length; x++) {
+						if (formats[i] == lookup[x][0])
+							html += '<option value="&lt;' + lookup[x][0] + '&gt;">' + lookup[x][1] + '</option>';
+					}
+				}
+
+				html += '</select>';
+
+				return html;
+
+			case "styleselect":
+				return '<select id="{$editor_id}_styleSelect" onmousedown="tinyMCE.themes.advanced._setupCSSClasses(\'{$editor_id}\');" name="{$editor_id}_styleSelect" onfocus="tinyMCE.addSelectAccessibility(event,this,window);" onchange="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceSetCSSClass\',false,this.options[this.selectedIndex].value);" class="mceSelectList">{$style_select_options}</select>';
+
+			case "fontselect":
+				var fontHTML = '<select id="{$editor_id}_fontNameSelect" name="{$editor_id}_fontNameSelect" onfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'FontName\',false,this.options[this.selectedIndex].value);" class="mceSelectList"><option value="">{$lang_theme_fontdefault}</option>';
+				var iFonts = 'Arial=arial,helvetica,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,times new roman,times,serif;Tahoma=tahoma,arial,helvetica,sans-serif;Times New Roman=times new roman,times,serif;Verdana=verdana,arial,helvetica,sans-serif;Impact=impact;WingDings=wingdings';
+				var nFonts = 'Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sand;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats';
+				var fonts = tinyMCE.getParam("theme_advanced_fonts", nFonts).split(';');
+				for (i=0; i<fonts.length; i++) {
+					if (fonts[i] != '') {
+						var parts = fonts[i].split('=');
+						fontHTML += '<option value="' + parts[1] + '">' + parts[0] + '</option>';
+					}
+				}
+
+				fontHTML += '</select>';
+				return fontHTML;
+
+			case "fontsizeselect":
+				return '<select id="{$editor_id}_fontSizeSelect" name="{$editor_id}_fontSizeSelect" onfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'FontSize\',false,this.options[this.selectedIndex].value);" class="mceSelectList">'+
+						'<option value="0">{$lang_theme_font_size}</option>'+
+						'<option value="1">1 (8 pt)</option>'+
+						'<option value="2">2 (10 pt)</option>'+
+						'<option value="3">3 (12 pt)</option>'+
+						'<option value="4">4 (14 pt)</option>'+
+						'<option value="5">5 (18 pt)</option>'+
+						'<option value="6">6 (24 pt)</option>'+
+						'<option value="7">7 (36 pt)</option>'+
+						'</select>';
+
+			case "|":
+			case "separator":
+				return '<img src="{$themeurl}/images/separator.gif" width="2" height="20" class="mceSeparatorLine" />';
+
+			case "spacer":
+				return '<img src="{$themeurl}/images/separator.gif" width="2" height="15" border="0" class="mceSeparatorLine" style="vertical-align: middle" />';
+
+			case "rowseparator":
+				return '<br />';
+		}
+
+		return "";
+	},
+
+	/**
+	 * Theme specific execcommand handling.
+	 */
+	execCommand : function(editor_id, element, command, user_interface, value) {
+		switch (command) {
+			case "mceLink":
+				var inst = tinyMCE.getInstanceById(editor_id);
+				var doc = inst.getDoc();
+				var selectedText = "";
+
+				if (tinyMCE.isMSIE) {
+					var rng = doc.selection.createRange();
+					selectedText = rng.text;
+				} else
+					selectedText = inst.getSel().toString();
+
+				if (!tinyMCE.linkElement) {
+					if ((tinyMCE.selectedElement.nodeName.toLowerCase() != "img") && (selectedText.length <= 0))
+						return true;
+				}
+
+				var href = "", target = "", title = "", onclick = "", action = "insert", style_class = "";
+
+				if (tinyMCE.selectedElement.nodeName.toLowerCase() == "a")
+					tinyMCE.linkElement = tinyMCE.selectedElement;
+
+				// Is anchor not a link
+				if (tinyMCE.linkElement != null && tinyMCE.getAttrib(tinyMCE.linkElement, 'href') == "")
+					tinyMCE.linkElement = null;
+
+				if (tinyMCE.linkElement) {
+					href = tinyMCE.getAttrib(tinyMCE.linkElement, 'href');
+					target = tinyMCE.getAttrib(tinyMCE.linkElement, 'target');
+					title = tinyMCE.getAttrib(tinyMCE.linkElement, 'title');
+					onclick = tinyMCE.getAttrib(tinyMCE.linkElement, 'onclick');
+					style_class = tinyMCE.getAttrib(tinyMCE.linkElement, 'class');
+
+					// Try old onclick to if copy/pasted content
+					if (onclick == "")
+						onclick = tinyMCE.getAttrib(tinyMCE.linkElement, 'onclick');
+
+					onclick = tinyMCE.cleanupEventStr(onclick);
+
+					href = eval(tinyMCE.settings['urlconverter_callback'] + "(href, tinyMCE.linkElement, true);");
+
+					// Use mce_href if defined
+					mceRealHref = tinyMCE.getAttrib(tinyMCE.linkElement, 'mce_href');
+					if (mceRealHref != "") {
+						href = mceRealHref;
+
+						if (tinyMCE.getParam('convert_urls'))
+							href = eval(tinyMCE.settings['urlconverter_callback'] + "(href, tinyMCE.linkElement, true);");
+					}
+
+					action = "update";
+				}
+
+				var template = new Array();
+
+				template['file'] = 'link.htm';
+				template['width'] = 310;
+				template['height'] = 200;
+
+				// Language specific width and height addons
+				template['width'] += tinyMCE.getLang('lang_insert_link_delta_width', 0);
+				template['height'] += tinyMCE.getLang('lang_insert_link_delta_height', 0);
+
+				if (inst.settings['insertlink_callback']) {
+					var returnVal = eval(inst.settings['insertlink_callback'] + "(href, target, title, onclick, action, style_class);");
+					if (returnVal && returnVal['href'])
+						TinyMCE_AdvancedTheme._insertLink(returnVal['href'], returnVal['target'], returnVal['title'], returnVal['onclick'], returnVal['style_class']);
+				} else {
+					tinyMCE.openWindow(template, {href : href, target : target, title : title, onclick : onclick, action : action, className : style_class, inline : "yes"});
+				}
+
+				return true;
+
+			case "mceImage":
+				var src = "", alt = "", border = "", hspace = "", vspace = "", width = "", height = "", align = "";
+				var title = "", onmouseover = "", onmouseout = "", action = "insert";
+				var img = tinyMCE.imgElement;
+				var inst = tinyMCE.getInstanceById(editor_id);
+
+				if (tinyMCE.selectedElement != null && tinyMCE.selectedElement.nodeName.toLowerCase() == "img") {
+					img = tinyMCE.selectedElement;
+					tinyMCE.imgElement = img;
+				}
+
+				if (img) {
+					// Is it a internal MCE visual aid image, then skip this one.
+					if (tinyMCE.getAttrib(img, 'name').indexOf('mce_') == 0)
+						return true;
+
+					src = tinyMCE.getAttrib(img, 'src');
+					alt = tinyMCE.getAttrib(img, 'alt');
+
+					// Try polling out the title
+					if (alt == "")
+						alt = tinyMCE.getAttrib(img, 'title');
+
+					// Fix width/height attributes if the styles is specified
+					if (tinyMCE.isGecko) {
+						var w = img.style.width;
+						if (w != null && w != "")
+							img.setAttribute("width", w);
+
+						var h = img.style.height;
+						if (h != null && h != "")
+							img.setAttribute("height", h);
+					}
+
+					border = tinyMCE.getAttrib(img, 'border');
+					hspace = tinyMCE.getAttrib(img, 'hspace');
+					vspace = tinyMCE.getAttrib(img, 'vspace');
+					width = tinyMCE.getAttrib(img, 'width');
+					height = tinyMCE.getAttrib(img, 'height');
+					align = tinyMCE.getAttrib(img, 'align');
+					onmouseover = tinyMCE.getAttrib(img, 'onmouseover');
+					onmouseout = tinyMCE.getAttrib(img, 'onmouseout');
+					title = tinyMCE.getAttrib(img, 'title');
+
+					// Is realy specified?
+					if (tinyMCE.isMSIE) {
+						width = img.attributes['width'].specified ? width : "";
+						height = img.attributes['height'].specified ? height : "";
+					}
+
+					//onmouseover = tinyMCE.getImageSrc(tinyMCE.cleanupEventStr(onmouseover));
+					//onmouseout = tinyMCE.getImageSrc(tinyMCE.cleanupEventStr(onmouseout));
+
+					src = eval(tinyMCE.settings['urlconverter_callback'] + "(src, img, true);");
+
+					// Use mce_src if defined
+					mceRealSrc = tinyMCE.getAttrib(img, 'mce_src');
+					if (mceRealSrc != "") {
+						src = mceRealSrc;
+
+						if (tinyMCE.getParam('convert_urls'))
+							src = eval(tinyMCE.settings['urlconverter_callback'] + "(src, img, true);");
+					}
+
+					//if (onmouseover != "")
+					//	onmouseover = eval(tinyMCE.settings['urlconverter_callback'] + "(onmouseover, img, true);");
+
+					//if (onmouseout != "")
+					//	onmouseout = eval(tinyMCE.settings['urlconverter_callback'] + "(onmouseout, img, true);");
+
+					action = "update";
+				}
+
+				var template = new Array();
+
+				template['file'] = 'image.htm?src={$src}';
+				template['width'] = 355;
+				template['height'] = 265 + (tinyMCE.isMSIE ? 25 : 0);
+
+				// Language specific width and height addons
+				template['width'] += tinyMCE.getLang('lang_insert_image_delta_width', 0);
+				template['height'] += tinyMCE.getLang('lang_insert_image_delta_height', 0);
+
+				if (inst.settings['insertimage_callback']) {
+					var returnVal = eval(inst.settings['insertimage_callback'] + "(src, alt, border, hspace, vspace, width, height, align, title, onmouseover, onmouseout, action);");
+					if (returnVal && returnVal['src'])
+						TinyMCE_AdvancedTheme._insertImage(returnVal['src'], returnVal['alt'], returnVal['border'], returnVal['hspace'], returnVal['vspace'], returnVal['width'], returnVal['height'], returnVal['align'], returnVal['title'], returnVal['onmouseover'], returnVal['onmouseout']);
+				} else
+					tinyMCE.openWindow(template, {src : src, alt : alt, border : border, hspace : hspace, vspace : vspace, width : width, height : height, align : align, title : title, onmouseover : onmouseover, onmouseout : onmouseout, action : action, inline : "yes"});
+
+				return true;
+
+			case "mceForeColor":
+				var template = new Array();
+				var elm = tinyMCE.selectedInstance.getFocusElement();
+				var inputColor = tinyMCE.getAttrib(elm, "color");
+
+				if (inputColor == '')
+					inputColor = elm.style.color;
+
+				if (!inputColor)
+					inputColor = "#000000";
+
+				template['file'] = 'color_picker.htm';
+				template['width'] = 220;
+				template['height'] = 190;
+
+				tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes", command : "forecolor", input_color : inputColor});
+			return true;
+
+			case "mceBackColor":
+				var template = new Array();
+				var elm = tinyMCE.selectedInstance.getFocusElement();
+				var inputColor = elm.style.backgroundColor;
+
+				if (!inputColor)
+					inputColor = "#000000";
+
+				template['file'] = 'color_picker.htm';
+				template['width'] = 220;
+				template['height'] = 190;
+
+				template['width'] += tinyMCE.getLang('lang_theme_advanced_backcolor_delta_width', 0);
+				template['height'] += tinyMCE.getLang('lang_theme_advanced_backcolor_delta_height', 0);
+
+				tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes", command : "HiliteColor", input_color : inputColor});
+				//mceBackColor
+			return true;
+
+			case "mceColorPicker":
+				if (user_interface) {
+					var template = new Array();
+					var inputColor = value['document'].getElementById(value['element_id']).value;
+
+					template['file'] = 'color_picker.htm';
+					template['width'] = 220;
+					template['height'] = 190;
+					template['close_previous'] = "no";
+
+					template['width'] += tinyMCE.getLang('lang_theme_advanced_colorpicker_delta_width', 0);
+					template['height'] += tinyMCE.getLang('lang_theme_advanced_colorpicker_delta_height', 0);
+
+					if (typeof(value['store_selection']) == "undefined")
+						value['store_selection'] = true;
+
+					tinyMCE.lastColorPickerValue = value;
+					tinyMCE.openWindow(template, {editor_id : editor_id, mce_store_selection : value['store_selection'], inline : "yes", command : "mceColorPicker", input_color : inputColor});
+				} else {
+					var savedVal = tinyMCE.lastColorPickerValue;
+					var elm = savedVal['document'].getElementById(savedVal['element_id']);
+					elm.value = value;
+
+					if (elm.onchange != null && elm.onchange != '')
+						eval('elm.onchange();');
+				}
+			return true;
+
+			case "mceCodeEditor":
+				var template = new Array();
+
+				template['file'] = 'source_editor.htm';
+				template['width'] = parseInt(tinyMCE.getParam("theme_advanced_source_editor_width", 720));
+				template['height'] = parseInt(tinyMCE.getParam("theme_advanced_source_editor_height", 580));
+
+				tinyMCE.openWindow(template, {editor_id : editor_id, resizable : "yes", scrollbars : "no", inline : "yes"});
+				return true;
+
+			case "mceCharMap":
+				var template = new Array();
+
+				template['file'] = 'charmap.htm';
+				template['width'] = 550 + (tinyMCE.isOpera ? 40 : 0);
+				template['height'] = 250;
+
+				template['width'] += tinyMCE.getLang('lang_theme_advanced_charmap_delta_width', 0);
+				template['height'] += tinyMCE.getLang('lang_theme_advanced_charmap_delta_height', 0);
+
+				tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes"});
+				return true;
+
+			case "mceInsertAnchor":
+				var template = new Array();
+
+				template['file'] = 'anchor.htm';
+				template['width'] = 320;
+				template['height'] = 90 + (tinyMCE.isNS7 ? 30 : 0);
+
+				template['width'] += tinyMCE.getLang('lang_theme_advanced_anchor_delta_width', 0);
+				template['height'] += tinyMCE.getLang('lang_theme_advanced_anchor_delta_height', 0);
+
+				tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes"});
+				return true;
+
+			case "mceNewDocument":
+				if (confirm(tinyMCE.getLang('lang_newdocument')))
+					tinyMCE.execInstanceCommand(editor_id, 'mceSetContent', false, ' ');
+
+				return true;
+		}
+
+		return false;
+	},
+
+	/**
+	 * Editor instance template function.
+	 */
+	getEditorTemplate : function(settings, editorId) {
+		function removeFromArray(in_array, remove_array) {
+			var outArray = new Array();
+			
+			for (var i=0; i<in_array.length; i++) {
+				skip = false;
+
+				for (var j=0; j<remove_array.length; j++) {
+					if (in_array[i] == remove_array[j]) {
+						skip = true;
+					}
+				}
+
+				if (!skip) {
+					outArray[outArray.length] = in_array[i];
+				}
+			}
+
+			return outArray;
+		}
+
+		function addToArray(in_array, add_array) {
+			for (var i=0; i<add_array.length; i++) {
+				in_array[in_array.length] = add_array[i];
+			}
+
+			return in_array;
+		}
+
+		var template = new Array();
+		var deltaHeight = 0;
+		var resizing = tinyMCE.getParam("theme_advanced_resizing", false);
+		var path = tinyMCE.getParam("theme_advanced_path", true);
+		var statusbarHTML = '<div id="{$editor_id}_path" class="mceStatusbarPathText" style="display: ' + (path ? "block" : "none") + '">&#160;</div><div id="{$editor_id}_resize" class="mceStatusbarResize" style="display: ' + (resizing ? "block" : "none") + '" onmousedown="tinyMCE.themes.advanced._setResizing(event,\'{$editor_id}\',true);"></div><br style="clear: both" />';
+		var layoutManager = tinyMCE.getParam("theme_advanced_layout_manager", "SimpleLayout");
+
+		// Setup style select options -- MOVED UP FOR EXTERNAL TOOLBAR COMPATABILITY!
+		var styleSelectHTML = '<option value="">{$lang_theme_style_select}</option>';
+		if (settings['theme_advanced_styles']) {
+			var stylesAr = settings['theme_advanced_styles'].split(';');
+			
+			for (var i=0; i<stylesAr.length; i++) {
+				var key, value;
+
+				key = stylesAr[i].split('=')[0];
+				value = stylesAr[i].split('=')[1];
+
+				styleSelectHTML += '<option value="' + value + '">' + key + '</option>';
+			}
+
+			TinyMCE_AdvancedTheme._autoImportCSSClasses = false;
+		}
+
+		switch(layoutManager) {
+			case "SimpleLayout" : //the default TinyMCE Layout (for backwards compatibility)...
+				var toolbarHTML = "";
+				var toolbarLocation = tinyMCE.getParam("theme_advanced_toolbar_location", "bottom");
+				var toolbarAlign = tinyMCE.getParam("theme_advanced_toolbar_align", "center");
+				var pathLocation = tinyMCE.getParam("theme_advanced_path_location", "none"); // Compatiblity
+				var statusbarLocation = tinyMCE.getParam("theme_advanced_statusbar_location", pathLocation);
+				var defVals = {
+					theme_advanced_buttons1 : "bold,italic,underline,strikethrough,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,styleselect,formatselect",
+					theme_advanced_buttons2 : "bullist,numlist,separator,outdent,indent,separator,undo,redo,separator,link,unlink,anchor,image,cleanup,help,code",
+					theme_advanced_buttons3 : "hr,removeformat,visualaid,separator,sub,sup,separator,charmap"
+				};
+
+				// Add accessibility control
+				toolbarHTML += '<a href="#" accesskey="q" title="' + tinyMCE.getLang("lang_toolbar_focus") + '"';
+
+				if (!tinyMCE.getParam("accessibility_focus"))
+					toolbarHTML += ' onfocus="tinyMCE.getInstanceById(\'' + editorId + '\').getWin().focus();"';
+
+				toolbarHTML += '></a>';
+
+				// Render rows
+				for (var i=1; i<100; i++) {
+					var def = defVals["theme_advanced_buttons" + i];
+
+					var buttons = tinyMCE.getParam("theme_advanced_buttons" + i, def == null ? '' : def, true, ',');
+					if (buttons.length == 0)
+						break;
+
+					buttons = removeFromArray(buttons, tinyMCE.getParam("theme_advanced_disable", "", true, ','));
+					buttons = addToArray(buttons, tinyMCE.getParam("theme_advanced_buttons" + i + "_add", "", true, ','));
+					buttons = addToArray(tinyMCE.getParam("theme_advanced_buttons" + i + "_add_before", "", true, ','), buttons);
+
+					for (var b=0; b<buttons.length; b++)
+						toolbarHTML += tinyMCE.getControlHTML(buttons[b]);
+
+					if (buttons.length > 0) {
+						toolbarHTML += "<br />";
+						deltaHeight -= 23;
+					}
+				}
+
+				// Add accessibility control
+				toolbarHTML += '<a href="#" accesskey="z" onfocus="tinyMCE.getInstanceById(\'' + editorId + '\').getWin().focus();"></a>';
+
+				// Setup template html
+				template['html'] = '<table class="mceEditor" border="0" cellpadding="0" cellspacing="0" width="{$width}" height="{$height}" style="width:{$width}px;height:{$height}px"><tbody>';
+
+				if (toolbarLocation == "top") {
+					template['html'] += '<tr><td class="mceToolbarTop" align="' + toolbarAlign + '" height="1" nowrap="nowrap">' + toolbarHTML + '</td></tr>';
+				}
+
+				if (statusbarLocation == "top") {
+					template['html'] += '<tr><td class="mceStatusbarTop" height="1">' + statusbarHTML + '</td></tr>';
+					deltaHeight -= 23;
+				}
+
+				template['html'] += '<tr><td align="center"><span id="{$editor_id}"></span></td></tr>';
+
+				if (toolbarLocation == "bottom") {
+					template['html'] += '<tr><td class="mceToolbarBottom" align="' + toolbarAlign + '" height="1">' + toolbarHTML + '</td></tr>';
+				}
+
+				// External toolbar changes
+				if (toolbarLocation == "external") {
+					var bod = document.body;
+					var elm = document.createElement ("div");
+
+					toolbarHTML = tinyMCE.replaceVar(toolbarHTML, 'style_select_options', styleSelectHTML);
+					toolbarHTML = tinyMCE.applyTemplate(toolbarHTML, {editor_id : editorId});
+
+					elm.className = "mceToolbarExternal";
+					elm.id = editorId+"_toolbar";
+					elm.innerHTML = '<table width="100%" border="0" align="center"><tr><td align="center">'+toolbarHTML+'</td></tr></table>';
+					bod.appendChild (elm);
+					// bod.style.marginTop = elm.offsetHeight + "px";
+
+					deltaHeight = 0;
+					tinyMCE.getInstanceById(editorId).toolbarElement = elm;
+
+					//template['html'] = '<div id="mceExternalToolbar" align="center" class="mceToolbarExternal"><table width="100%" border="0" align="center"><tr><td align="center">'+toolbarHTML+'</td></tr></table></div>' + template["html"];
+				} else {
+					tinyMCE.getInstanceById(editorId).toolbarElement = null;
+				}
+
+				if (statusbarLocation == "bottom") {
+					template['html'] += '<tr><td class="mceStatusbarBottom" height="1">' + statusbarHTML + '</td></tr>';
+					deltaHeight -= 23;
+				}
+
+				template['html'] += '</tbody></table>';
+				//"SimpleLayout"
+			break;
+
+			case "RowLayout" : //Container Layout - containers defined in "theme_advanced_containers" are rendered from top to bottom.
+				template['html'] = '<table class="mceEditor" border="0" cellpadding="0" cellspacing="0" width="{$width}" height="{$height}" style="width:{$width}px;height:{$height}px"><tbody>';
+
+				var containers = tinyMCE.getParam("theme_advanced_containers", "", true, ",");
+				var defaultContainerCSS = tinyMCE.getParam("theme_advanced_containers_default_class", "container");
+				var defaultContainerAlign = tinyMCE.getParam("theme_advanced_containers_default_align", "center");
+
+				//Render Containers:
+				for (var i = 0; i < containers.length; i++)
+				{
+					if (containers[i] == "mceEditor") //Exceptions for mceEditor and ...
+						template['html'] += '<tr><td align="center" class="mceEditor_border"><span id="{$editor_id}"></span></td></tr>';
+					else if (containers[i] == "mceElementpath" || containers[i] == "mceStatusbar") // ... mceElementpath:
+					{
+						var pathClass = "mceStatusbar";
+
+						if (i == containers.length-1)
+						{
+							pathClass = "mceStatusbarBottom";
+						}
+						else if (i == 0)
+						{
+							pathClass = "mceStatusbar";
+						}
+						else
+						{
+							deltaHeight-=2;
+						}
+
+						template['html'] += '<tr><td class="' + pathClass + '" height="1">' + statusbarHTML + '</td></tr>';
+						deltaHeight -= 22;
+					} else { // Render normal Container
+						var curContainer = tinyMCE.getParam("theme_advanced_container_"+containers[i], "", true, ',');
+						var curContainerHTML = "";
+						var curAlign = tinyMCE.getParam("theme_advanced_container_"+containers[i]+"_align", defaultContainerAlign);
+						var curCSS = tinyMCE.getParam("theme_advanced_container_"+containers[i]+"_class", defaultContainerCSS);
+
+						for (var j=0; j<curContainer.length; j++) {
+							curContainerHTML += tinyMCE.getControlHTML(curContainer[j]);
+						}
+
+						if (curContainer.length > 0) {
+							curContainerHTML += "<br />";
+							deltaHeight -= 23;
+						}
+
+						template['html'] += '<tr><td class="' + curCSS + '" align="' + curAlign + '" height="1">' + curContainerHTML + '</td></tr>';
+					}
+				}
+
+				template['html'] += '</tbody></table>';
+				//RowLayout
+			break;
+
+			case "CustomLayout" : //User defined layout callback...
+				var customLayout = tinyMCE.getParam("theme_advanced_custom_layout","");
+
+				if (customLayout != "" && eval("typeof(" + customLayout + ")") != "undefined") {
+					template = eval(customLayout + "(template);");
+				}
+			break;
+		}
+
+		if (resizing)
+			template['html'] += '<span id="{$editor_id}_resize_box" class="mceResizeBox"></span>';
+
+		template['html'] = tinyMCE.replaceVar(template['html'], 'style_select_options', styleSelectHTML);
+		template['delta_width'] = 0;
+		template['delta_height'] = deltaHeight;
+
+		return template;
+	},
+
+	initInstance : function(inst) {
+		if (tinyMCE.getParam("theme_advanced_resizing", false)) {
+			if (tinyMCE.getParam("theme_advanced_resizing_use_cookie", true)) {
+				var w = TinyMCE_AdvancedTheme._getCookie("TinyMCE_" + inst.editorId + "_width");
+				var h = TinyMCE_AdvancedTheme._getCookie("TinyMCE_" + inst.editorId + "_height");
+
+				TinyMCE_AdvancedTheme._resizeTo(inst, w, h, tinyMCE.getParam("theme_advanced_resize_horizontal", true));
+			}
+		}
+
+		inst.addShortcut('ctrl', 'k', 'lang_link_desc', 'mceLink');
+	},
+
+	/**
+	 * Node change handler.
+	 */
+	handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection, setup_content) {
+		function selectByValue(select_elm, value, first_index) {
+			first_index = typeof(first_index) == "undefined" ? false : true;
+
+			if (select_elm) {
+				for (var i=0; i<select_elm.options.length; i++) {
+					var ov = "" + select_elm.options[i].value;
+
+					if (first_index && ov.toLowerCase().indexOf(value.toLowerCase()) == 0) {
+						select_elm.selectedIndex = i;
+						return true;
+					}
+
+					if (ov == value) {
+						select_elm.selectedIndex = i;
+						return true;
+					}
+				}
+			}
+
+			return false;
+		};
+
+		function getAttrib(elm, name) {
+			return elm.getAttribute(name) ? elm.getAttribute(name) : "";
+		};
+
+		// No node provided
+		if (node == null)
+			return;
+
+		// Update path
+		var pathElm = document.getElementById(editor_id + "_path");
+		var inst = tinyMCE.getInstanceById(editor_id);
+		var doc = inst.getDoc();
+
+		if (pathElm) {
+			// Get node path
+			var parentNode = node;
+			var path = new Array();
+			
+			while (parentNode != null) {
+				if (parentNode.nodeName.toUpperCase() == "BODY") {
+					break;
+				}
+
+				// Only append element nodes to path
+				if (parentNode.nodeType == 1 && tinyMCE.getAttrib(parentNode, "class").indexOf('mceItemHidden') == -1) {
+					path[path.length] = parentNode;
+				}
+
+				parentNode = parentNode.parentNode;
+			}
+
+			// Setup HTML
+			var html = "";
+			for (var i=path.length-1; i>=0; i--) {
+				var nodeName = path[i].nodeName.toLowerCase();
+				var nodeData = "";
+
+				if (nodeName == "b") {
+					nodeName = "strong";
+				}
+
+				if (nodeName == "i") {
+					nodeName = "em";
+				}
+
+				if (nodeName == "span") {
+					var cn = tinyMCE.getAttrib(path[i], "class");
+					if (cn != "" && cn.indexOf('mceItem') == -1)
+						nodeData += "class: " + cn + " ";
+
+					var st = tinyMCE.getAttrib(path[i], "style");
+					if (st != "") {
+						st = tinyMCE.serializeStyle(tinyMCE.parseStyle(st));
+						nodeData += "style: " + st + " ";
+					}
+				}
+
+				if (nodeName == "font") {
+					if (tinyMCE.getParam("convert_fonts_to_spans"))
+						nodeName = "span";
+
+					var face = tinyMCE.getAttrib(path[i], "face");
+					if (face != "")
+						nodeData += "font: " + face + " ";
+
+					var size = tinyMCE.getAttrib(path[i], "size");
+					if (size != "")
+						nodeData += "size: " + size + " ";
+
+					var color = tinyMCE.getAttrib(path[i], "color");
+					if (color != "")
+						nodeData += "color: " + color + " ";
+				}
+
+				if (getAttrib(path[i], 'id') != "") {
+					nodeData += "id: " + path[i].getAttribute('id') + " ";
+				}
+
+				var className = tinyMCE.getVisualAidClass(tinyMCE.getAttrib(path[i], "class"), false);
+				if (className != "" && className.indexOf('mceItem') == -1)
+					nodeData += "class: " + className + " ";
+
+				if (getAttrib(path[i], 'src') != "") {
+					var src = tinyMCE.getAttrib(path[i], "mce_src");
+
+					if (src == "")
+						 src = tinyMCE.getAttrib(path[i], "src");
+
+					nodeData += "src: " + src + " ";
+				}
+
+				if (getAttrib(path[i], 'href') != "") {
+					var href = tinyMCE.getAttrib(path[i], "mce_href");
+
+					if (href == "")
+						 href = tinyMCE.getAttrib(path[i], "href");
+
+					nodeData += "href: " + href + " ";
+				}
+
+				if (nodeName == "img" && tinyMCE.getAttrib(path[i], "class").indexOf('mceItemFlash') != -1) {
+					nodeName = "flash";
+					nodeData = "src: " + path[i].getAttribute('title');
+				}
+
+				if (nodeName == "a" && (anchor = tinyMCE.getAttrib(path[i], "name")) != "") {
+					nodeName = "a";
+					nodeName += "#" + anchor;
+					nodeData = "";
+				}
+
+				if (getAttrib(path[i], 'name').indexOf("mce_") != 0) {
+					var className = tinyMCE.getVisualAidClass(tinyMCE.getAttrib(path[i], "class"), false);
+					if (className != "" && className.indexOf('mceItem') == -1) {
+						nodeName += "." + className;
+					}
+				}
+
+				var cmd = 'tinyMCE.execInstanceCommand(\'' + editor_id + '\',\'mceSelectNodeDepth\',false,\'' + i + '\');';
+				html += '<a title="' + nodeData + '" href="javascript:' + cmd + '" onclick="' + cmd + 'return false;" onmousedown="return false;" target="_self" class="mcePathItem">' + nodeName + '</a>';
+
+				if (i > 0) {
+					html += " &raquo; ";
+				}
+			}
+
+			pathElm.innerHTML = '<a href="#" accesskey="x"></a>' + tinyMCE.getLang('lang_theme_path') + ": " + html + '&#160;';
+		}
+
+		// Reset old states
+		tinyMCE.switchClass(editor_id + '_justifyleft', 'mceButtonNormal');
+		tinyMCE.switchClass(editor_id + '_justifyright', 'mceButtonNormal');
+		tinyMCE.switchClass(editor_id + '_justifycenter', 'mceButtonNormal');
+		tinyMCE.switchClass(editor_id + '_justifyfull', 'mceButtonNormal');
+		tinyMCE.switchClass(editor_id + '_bold', 'mceButtonNormal');
+		tinyMCE.switchClass(editor_id + '_italic', 'mceButtonNormal');
+		tinyMCE.switchClass(editor_id + '_underline', 'mceButtonNormal');
+		tinyMCE.switchClass(editor_id + '_strikethrough', 'mceButtonNormal');
+		tinyMCE.switchClass(editor_id + '_bullist', 'mceButtonNormal');
+		tinyMCE.switchClass(editor_id + '_numlist', 'mceButtonNormal');
+		tinyMCE.switchClass(editor_id + '_sub', 'mceButtonNormal');
+		tinyMCE.switchClass(editor_id + '_sup', 'mceButtonNormal');
+		tinyMCE.switchClass(editor_id + '_anchor', 'mceButtonNormal');
+		tinyMCE.switchClass(editor_id + '_link', 'mceButtonDisabled');
+		tinyMCE.switchClass(editor_id + '_unlink', 'mceButtonDisabled');
+		tinyMCE.switchClass(editor_id + '_outdent', 'mceButtonDisabled');
+		tinyMCE.switchClass(editor_id + '_image', 'mceButtonNormal');
+		tinyMCE.switchClass(editor_id + '_hr', 'mceButtonNormal');
+
+		if (node.nodeName == "A" && tinyMCE.getAttrib(node, "class").indexOf('mceItemAnchor') != -1)
+			tinyMCE.switchClass(editor_id + '_anchor', 'mceButtonSelected');
+
+		// Get link
+		var anchorLink = tinyMCE.getParentElement(node, "a", "href");
+
+		if (anchorLink || any_selection) {
+			tinyMCE.switchClass(editor_id + '_link', anchorLink ? 'mceButtonSelected' : 'mceButtonNormal');
+			tinyMCE.switchClass(editor_id + '_unlink', anchorLink ? 'mceButtonSelected' : 'mceButtonNormal');
+		}
+
+		// Handle visual aid
+		tinyMCE.switchClass(editor_id + '_visualaid', visual_aid ? 'mceButtonSelected' : 'mceButtonNormal');
+
+		if (undo_levels != -1) {
+			tinyMCE.switchClass(editor_id + '_undo', 'mceButtonDisabled');
+			tinyMCE.switchClass(editor_id + '_redo', 'mceButtonDisabled');
+		}
+
+		// Within li, blockquote
+		if (tinyMCE.getParentElement(node, "li,blockquote"))
+			tinyMCE.switchClass(editor_id + '_outdent', 'mceButtonNormal');
+
+		// Has redo levels
+		if (undo_index != -1 && (undo_index < undo_levels-1 && undo_levels > 0))
+			tinyMCE.switchClass(editor_id + '_redo', 'mceButtonNormal');
+
+		// Has undo levels
+		if (undo_index != -1 && (undo_index > 0 && undo_levels > 0))
+			tinyMCE.switchClass(editor_id + '_undo', 'mceButtonNormal');
+
+		// Select class in select box
+		var selectElm = document.getElementById(editor_id + "_styleSelect");
+		
+		if (selectElm) {
+			TinyMCE_AdvancedTheme._setupCSSClasses(editor_id);
+
+			classNode = node;
+			breakOut = false;
+			var index = 0;
+
+			do {
+				if (classNode && classNode.className) {
+					for (var i=0; i<selectElm.options.length; i++) {
+						if (selectElm.options[i].value == classNode.className) {
+							index = i;
+							breakOut = true;
+							break;
+						}
+					}
+				}
+			} while (!breakOut && classNode != null && (classNode = classNode.parentNode) != null);
+
+			selectElm.selectedIndex = index;
+		}
+
+		// Select formatblock
+		var selectElm = document.getElementById(editor_id + "_formatSelect");
+		if (selectElm) {
+			var elm = tinyMCE.getParentElement(node, "p,div,h1,h2,h3,h4,h5,h6,pre,address");
+
+			if (elm)
+				selectByValue(selectElm, "<" + elm.nodeName.toLowerCase() + ">");
+			else
+				selectByValue(selectElm, "");
+		}
+
+		// Select fontselect
+		var selectElm = document.getElementById(editor_id + "_fontNameSelect");
+		if (selectElm) {
+			if (!tinyMCE.isSafari && !(tinyMCE.isMSIE && !tinyMCE.isOpera)) {
+				var face = inst.queryCommandValue('FontName');
+
+				face = face == null || face == "" ? "" : face;
+
+				selectByValue(selectElm, face, face != "");
+			} else {
+				var elm = tinyMCE.getParentElement(node, "font", "face");
+
+				if (elm) {
+					var family = tinyMCE.getAttrib(elm, "face");
+
+					if (family == '')
+						family = '' + elm.style.fontFamily;
+
+					if (!selectByValue(selectElm, family, family != ""))
+						selectByValue(selectElm, "");
+				} else
+					selectByValue(selectElm, "");
+			}
+		}
+
+		// Select fontsize
+		var selectElm = document.getElementById(editor_id + "_fontSizeSelect");
+		if (selectElm) {
+			if (!tinyMCE.isSafari && !tinyMCE.isOpera) {
+				var size = inst.queryCommandValue('FontSize');
+				selectByValue(selectElm, size == null || size == "" ? "0" : size);
+			} else {
+				var elm = tinyMCE.getParentElement(node, "font", "size");
+				if (elm) {
+					var size = tinyMCE.getAttrib(elm, "size");
+
+					if (size == '') {
+						var sizes = new Array('', '8px', '10px', '12px', '14px', '18px', '24px', '36px');
+
+						size = '' + elm.style.fontSize;
+
+						for (var i=0; i<sizes.length; i++) {
+							if (('' + sizes[i]) == size) {
+								size = i;
+								break;
+							}
+						}
+					}
+
+					if (!selectByValue(selectElm, size))
+						selectByValue(selectElm, "");
+				} else
+					selectByValue(selectElm, "0");
+			}
+		}
+
+		// Handle align attributes
+		alignNode = node;
+		breakOut = false;
+		do {
+			if (!alignNode.getAttribute || !alignNode.getAttribute('align'))
+				continue;
+
+			switch (alignNode.getAttribute('align').toLowerCase()) {
+				case "left":
+					tinyMCE.switchClass(editor_id + '_justifyleft', 'mceButtonSelected');
+					breakOut = true;
+				break;
+
+				case "right":
+					tinyMCE.switchClass(editor_id + '_justifyright', 'mceButtonSelected');
+					breakOut = true;
+				break;
+
+				case "middle":
+				case "center":
+					tinyMCE.switchClass(editor_id + '_justifycenter', 'mceButtonSelected');
+					breakOut = true;
+				break;
+
+				case "justify":
+					tinyMCE.switchClass(editor_id + '_justifyfull', 'mceButtonSelected');
+					breakOut = true;
+				break;
+			}
+		} while (!breakOut && (alignNode = alignNode.parentNode) != null);
+
+		// Div justification
+		var div = tinyMCE.getParentElement(node, "div");
+		if (div && div.style.textAlign == "center")
+			tinyMCE.switchClass(editor_id + '_justifycenter', 'mceButtonSelected');
+
+		// Do special text
+		if (!setup_content) {
+			// , "JustifyLeft", "_justifyleft", "JustifyCenter", "justifycenter", "JustifyRight", "justifyright", "JustifyFull", "justifyfull", "InsertUnorderedList", "bullist", "InsertOrderedList", "numlist", "InsertUnorderedList", "bullist", "Outdent", "outdent", "Indent", "indent", "subscript", "sub"
+			var ar = new Array("Bold", "_bold", "Italic", "_italic", "Strikethrough", "_strikethrough", "superscript", "_sup", "subscript", "_sub");
+			for (var i=0; i<ar.length; i+=2) {
+				if (inst.queryCommandState(ar[i]))
+					tinyMCE.switchClass(editor_id + ar[i+1], 'mceButtonSelected');
+			}
+
+			if (inst.queryCommandState("Underline") && (node.parentNode == null || node.parentNode.nodeName != "A"))
+				tinyMCE.switchClass(editor_id + '_underline', 'mceButtonSelected');
+		}
+
+		// Handle elements
+		do {
+			switch (node.nodeName) {
+				case "UL":
+					tinyMCE.switchClass(editor_id + '_bullist', 'mceButtonSelected');
+				break;
+
+				case "OL":
+					tinyMCE.switchClass(editor_id + '_numlist', 'mceButtonSelected');
+				break;
+
+				case "HR":
+					 tinyMCE.switchClass(editor_id + '_hr', 'mceButtonSelected');
+				break;
+
+				case "IMG":
+				if (getAttrib(node, 'name').indexOf('mce_') != 0) {
+					tinyMCE.switchClass(editor_id + '_image', 'mceButtonSelected');
+				}
+				break;
+			}
+		} while ((node = node.parentNode) != null);
+	},
+
+	// Private theme internal functions
+
+	// This function auto imports CSS classes into the class selection droplist
+	_setupCSSClasses : function(editor_id) {
+		var i, selectElm;
+
+		if (!TinyMCE_AdvancedTheme._autoImportCSSClasses)
+			return;
+
+		selectElm = document.getElementById(editor_id + '_styleSelect');
+
+		if (selectElm && selectElm.getAttribute('cssImported') != 'true') {
+			var csses = tinyMCE.getCSSClasses(editor_id);
+			if (csses && selectElm)	{
+				for (i=0; i<csses.length; i++)
+					selectElm.options[selectElm.options.length] = new Option(csses[i], csses[i]);
+			}
+
+			// Only do this once
+			if (csses != null && csses.length > 0)
+				selectElm.setAttribute('cssImported', 'true');
+		}
+	},
+
+	_setCookie : function(name, value, expires, path, domain, secure) {
+		var curCookie = name + "=" + escape(value) +
+			((expires) ? "; expires=" + expires.toGMTString() : "") +
+			((path) ? "; path=" + escape(path) : "") +
+			((domain) ? "; domain=" + domain : "") +
+			((secure) ? "; secure" : "");
+
+		document.cookie = curCookie;
+	},
+
+	_getCookie : function(name) {
+		var dc = document.cookie;
+		var prefix = name + "=";
+		var begin = dc.indexOf("; " + prefix);
+
+		if (begin == -1) {
+			begin = dc.indexOf(prefix);
+
+			if (begin != 0)
+				return null;
+		} else
+			begin += 2;
+
+		var end = document.cookie.indexOf(";", begin);
+
+		if (end == -1)
+			end = dc.length;
+
+		return unescape(dc.substring(begin + prefix.length, end));
+	},
+
+	_resizeTo : function(inst, w, h, set_w) {
+		var editorContainer = document.getElementById(inst.editorId + '_parent');
+		var tableElm = editorContainer.firstChild;
+		var iframe = inst.iframeElement;
+
+		if (w == null || w == "null") {
+			set_w = false;
+			w = 0;
+		}
+
+		if (h == null || h == "null")
+			return;
+
+		w = parseInt(w);
+		h = parseInt(h);
+
+		if (tinyMCE.isGecko) {
+			w += 2;
+			h += 2;
+		}
+
+		var dx = w - tableElm.clientWidth;
+		var dy = h - tableElm.clientHeight;
+
+		w = w < 1 ? 30 : w;
+		h = h < 1 ? 30 : h;
+
+		if (set_w)
+			tableElm.style.width = w + "px";
+
+		tableElm.style.height = h + "px";
+
+		iw = iframe.clientWidth + dx;
+		ih = iframe.clientHeight + dy;
+
+		iw = iw < 1 ? 30 : iw;
+		ih = ih < 1 ? 30 : ih;
+
+		if (tinyMCE.isGecko) {
+			iw -= 2;
+			ih -= 2;
+		}
+
+		if (set_w)
+			iframe.style.width = iw + "px";
+
+		iframe.style.height = ih + "px";
+
+		// Is it to small, make it bigger again
+		if (set_w) {
+			var tableBodyElm = tableElm.firstChild;
+			var minIframeWidth = tableBodyElm.scrollWidth;
+			if (inst.iframeElement.clientWidth < minIframeWidth) {
+				dx = minIframeWidth - inst.iframeElement.clientWidth;
+
+				inst.iframeElement.style.width = (iw + dx) + "px";
+			}
+		}
+	},
+
+	/**
+	 * Handles resizing events.
+	 */
+	_resizeEventHandler : function(e) {
+		var resizer = TinyMCE_AdvancedTheme._resizer;
+
+		// Do nothing
+		if (!resizer.resizing)
+			return;
+
+		e = typeof(e) == "undefined" ? window.event : e;
+
+		var dx = e.screenX - resizer.downX;
+		var dy = e.screenY - resizer.downY;
+		var resizeBox = resizer.resizeBox;
+		var editorId = resizer.editorId;
+
+		switch (e.type) {
+			case "mousemove":
+				var w, h;
+
+				w = resizer.width + dx;
+				h = resizer.height + dy;
+
+				w = w < 1 ? 1 : w;
+				h = h < 1 ? 1 : h;
+
+				if (resizer.horizontal)
+					resizeBox.style.width = w + "px";
+
+				resizeBox.style.height = h + "px";
+				break;
+
+			case "mouseup":
+				TinyMCE_AdvancedTheme._setResizing(e, editorId, false);
+				TinyMCE_AdvancedTheme._resizeTo(tinyMCE.getInstanceById(editorId), resizer.width + dx, resizer.height + dy, resizer.horizontal);
+
+				// Expire in a month
+				if (tinyMCE.getParam("theme_advanced_resizing_use_cookie", true)) {
+					var expires = new Date();
+					expires.setTime(expires.getTime() + 3600000 * 24 * 30);
+
+					// Set the cookies
+					TinyMCE_AdvancedTheme._setCookie("TinyMCE_" + editorId + "_width", "" + (resizer.horizontal ? resizer.width + dx : ""), expires);
+					TinyMCE_AdvancedTheme._setCookie("TinyMCE_" + editorId + "_height", "" + (resizer.height + dy), expires);
+				}
+				break;
+		}
+	},
+
+	/**
+	 * Starts/stops the editor resizing.
+	 */
+	_setResizing : function(e, editor_id, state) {
+		e = typeof(e) == "undefined" ? window.event : e;
+
+		var resizer = TinyMCE_AdvancedTheme._resizer;
+		var editorContainer = document.getElementById(editor_id + '_parent');
+		var editorArea = document.getElementById(editor_id + '_parent').firstChild;
+		var resizeBox = document.getElementById(editor_id + '_resize_box');
+		var inst = tinyMCE.getInstanceById(editor_id);
+
+		if (state) {
+			// Place box over editor area
+			var width = editorArea.clientWidth;
+			var height = editorArea.clientHeight;
+
+			resizeBox.style.width = width + "px";
+			resizeBox.style.height = height + "px";
+
+			resizer.iframeWidth = inst.iframeElement.clientWidth;
+			resizer.iframeHeight = inst.iframeElement.clientHeight;
+
+			// Hide editor and show resize box
+			editorArea.style.display = "none";
+			resizeBox.style.display = "block";
+
+			// Add event handlers, only once
+			if (!resizer.eventHandlers) {
+				if (tinyMCE.isMSIE)
+					tinyMCE.addEvent(document, "mousemove", TinyMCE_AdvancedTheme._resizeEventHandler);
+				else
+					tinyMCE.addEvent(window, "mousemove", TinyMCE_AdvancedTheme._resizeEventHandler);
+
+				tinyMCE.addEvent(document, "mouseup", TinyMCE_AdvancedTheme._resizeEventHandler);
+
+				resizer.eventHandlers = true;
+			}
+
+			resizer.resizing = true;
+			resizer.downX = e.screenX;
+			resizer.downY = e.screenY;
+			resizer.width = parseInt(resizeBox.style.width);
+			resizer.height = parseInt(resizeBox.style.height);
+			resizer.editorId = editor_id;
+			resizer.resizeBox = resizeBox;
+			resizer.horizontal = tinyMCE.getParam("theme_advanced_resize_horizontal", true);
+		} else {
+			resizer.resizing = false;
+			resizeBox.style.display = "none";
+			editorArea.style.display = tinyMCE.isMSIE && !tinyMCE.isOpera ? "block" : "table";
+			tinyMCE.execCommand('mceResetDesignMode');
+		}
+	},
+
+	_insertImage : function(src, alt, border, hspace, vspace, width, height, align, title, onmouseover, onmouseout) {
+		tinyMCE.execCommand('mceBeginUndoLevel');
+
+		if (src == "")
+			return;
+
+		if (!tinyMCE.imgElement && tinyMCE.isSafari) {
+			var html = "";
+
+			html += '<img src="' + src + '" alt="' + alt + '"';
+			html += ' border="' + border + '" hspace="' + hspace + '"';
+			html += ' vspace="' + vspace + '" width="' + width + '"';
+			html += ' height="' + height + '" align="' + align + '" title="' + title + '" onmouseover="' + onmouseover + '" onmouseout="' + onmouseout + '" />';
+
+			tinyMCE.execCommand("mceInsertContent", false, html);
+		} else {
+			if (!tinyMCE.imgElement && tinyMCE.selectedInstance) {
+				if (tinyMCE.isSafari)
+					tinyMCE.execCommand("mceInsertContent", false, '<img src="' + tinyMCE.uniqueURL + '" />');
+				else
+					tinyMCE.selectedInstance.contentDocument.execCommand("insertimage", false, tinyMCE.uniqueURL);
+
+				tinyMCE.imgElement = tinyMCE.getElementByAttributeValue(tinyMCE.selectedInstance.contentDocument.body, "img", "src", tinyMCE.uniqueURL);
+			}
+		}
+
+		if (tinyMCE.imgElement) {
+			var needsRepaint = false;
+			var msrc = src;
+
+			src = eval(tinyMCE.settings['urlconverter_callback'] + "(src, tinyMCE.imgElement);");
+
+			if (tinyMCE.getParam('convert_urls'))
+				msrc = src;
+
+			if (onmouseover && onmouseover != "")
+				onmouseover = "this.src='" + eval(tinyMCE.settings['urlconverter_callback'] + "(onmouseover, tinyMCE.imgElement);") + "';";
+
+			if (onmouseout && onmouseout != "")
+				onmouseout = "this.src='" + eval(tinyMCE.settings['urlconverter_callback'] + "(onmouseout, tinyMCE.imgElement);") + "';";
+
+			// Use alt as title if it's undefined
+			if (typeof(title) == "undefined")
+				title = alt;
+
+			if (width != tinyMCE.imgElement.getAttribute("width") || height != tinyMCE.imgElement.getAttribute("height") || align != tinyMCE.imgElement.getAttribute("align"))
+				needsRepaint = true;
+
+			tinyMCE.setAttrib(tinyMCE.imgElement, 'src', src);
+			tinyMCE.setAttrib(tinyMCE.imgElement, 'mce_src', msrc);
+			tinyMCE.setAttrib(tinyMCE.imgElement, 'alt', alt);
+			tinyMCE.setAttrib(tinyMCE.imgElement, 'title', title);
+			tinyMCE.setAttrib(tinyMCE.imgElement, 'align', align);
+			tinyMCE.setAttrib(tinyMCE.imgElement, 'border', border, true);
+			tinyMCE.setAttrib(tinyMCE.imgElement, 'hspace', hspace, true);
+			tinyMCE.setAttrib(tinyMCE.imgElement, 'vspace', vspace, true);
+			tinyMCE.setAttrib(tinyMCE.imgElement, 'width', width, true);
+			tinyMCE.setAttrib(tinyMCE.imgElement, 'height', height, true);
+			tinyMCE.setAttrib(tinyMCE.imgElement, 'onmouseover', onmouseover);
+			tinyMCE.setAttrib(tinyMCE.imgElement, 'onmouseout', onmouseout);
+
+			// Fix for bug #989846 - Image resize bug
+			if (width && width != "")
+				tinyMCE.imgElement.style.pixelWidth = width;
+
+			if (height && height != "")
+				tinyMCE.imgElement.style.pixelHeight = height;
+
+			if (needsRepaint)
+				tinyMCE.selectedInstance.repaint();
+		}
+
+		tinyMCE.execCommand('mceEndUndoLevel');
+	},
+
+	_insertLink : function(href, target, title, onclick, style_class) {
+		tinyMCE.execCommand('mceBeginUndoLevel');
+
+		if (tinyMCE.selectedInstance && tinyMCE.selectedElement && tinyMCE.selectedElement.nodeName.toLowerCase() == "img") {
+			var doc = tinyMCE.selectedInstance.getDoc();
+			var linkElement = tinyMCE.getParentElement(tinyMCE.selectedElement, "a");
+			var newLink = false;
+
+			if (!linkElement) {
+				linkElement = doc.createElement("a");
+				newLink = true;
+			}
+
+			var mhref = href;
+			var thref = eval(tinyMCE.settings['urlconverter_callback'] + "(href, linkElement);");
+			mhref = tinyMCE.getParam('convert_urls') ? href : mhref;
+
+			tinyMCE.setAttrib(linkElement, 'href', thref);
+			tinyMCE.setAttrib(linkElement, 'mce_href', mhref);
+			tinyMCE.setAttrib(linkElement, 'target', target);
+			tinyMCE.setAttrib(linkElement, 'title', title);
+			tinyMCE.setAttrib(linkElement, 'onclick', onclick);
+			tinyMCE.setAttrib(linkElement, 'class', style_class);
+
+			if (newLink) {
+				linkElement.appendChild(tinyMCE.selectedElement.cloneNode(true));
+				tinyMCE.selectedElement.parentNode.replaceChild(linkElement, tinyMCE.selectedElement);
+			}
+
+			return;
+		}
+
+		if (!tinyMCE.linkElement && tinyMCE.selectedInstance) {
+			if (tinyMCE.isSafari) {
+				tinyMCE.execCommand("mceInsertContent", false, '<a href="' + tinyMCE.uniqueURL + '">' + tinyMCE.selectedInstance.selection.getSelectedHTML() + '</a>');
+			} else
+				tinyMCE.selectedInstance.contentDocument.execCommand("createlink", false, tinyMCE.uniqueURL);
+
+			tinyMCE.linkElement = tinyMCE.getElementByAttributeValue(tinyMCE.selectedInstance.contentDocument.body, "a", "href", tinyMCE.uniqueURL);
+
+			var elementArray = tinyMCE.getElementsByAttributeValue(tinyMCE.selectedInstance.contentDocument.body, "a", "href", tinyMCE.uniqueURL);
+
+			for (var i=0; i<elementArray.length; i++) {
+				var mhref = href;
+				var thref = eval(tinyMCE.settings['urlconverter_callback'] + "(href, elementArray[i]);");
+				mhref = tinyMCE.getParam('convert_urls') ? href : mhref;
+
+				tinyMCE.setAttrib(elementArray[i], 'href', thref);
+				tinyMCE.setAttrib(elementArray[i], 'mce_href', mhref);
+				tinyMCE.setAttrib(elementArray[i], 'target', target);
+				tinyMCE.setAttrib(elementArray[i], 'title', title);
+				tinyMCE.setAttrib(elementArray[i], 'onclick', onclick);
+				tinyMCE.setAttrib(elementArray[i], 'class', style_class);
+			}
+
+			tinyMCE.linkElement = elementArray[0];
+		}
+
+		if (tinyMCE.linkElement) {
+			var mhref = href;
+			href = eval(tinyMCE.settings['urlconverter_callback'] + "(href, tinyMCE.linkElement);");
+			mhref = tinyMCE.getParam('convert_urls') ? href : mhref;
+
+			tinyMCE.setAttrib(tinyMCE.linkElement, 'href', href);
+			tinyMCE.setAttrib(tinyMCE.linkElement, 'mce_href', mhref);
+			tinyMCE.setAttrib(tinyMCE.linkElement, 'target', target);
+			tinyMCE.setAttrib(tinyMCE.linkElement, 'title', title);
+			tinyMCE.setAttrib(tinyMCE.linkElement, 'onclick', onclick);
+			tinyMCE.setAttrib(tinyMCE.linkElement, 'class', style_class);
+		}
+
+		tinyMCE.execCommand('mceEndUndoLevel');
+	}
+};
+
+tinyMCE.addTheme("advanced", TinyMCE_AdvancedTheme);
+
+// Add default buttons maps for advanced theme and all internal plugins
+tinyMCE.addButtonMap(TinyMCE_AdvancedTheme._buttonMap);

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/image.htm
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/image.htm	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/image.htm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,100 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+	<title>{$lang_insert_image_title}</title>
+	<script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
+	<script language="javascript" type="text/javascript" src="../../utils/mctabs.js"></script>
+	<script language="javascript" type="text/javascript" src="../../utils/form_utils.js"></script>
+	<script language="javascript" type="text/javascript" src="jscripts/image.js"></script>
+	<base target="_self" />
+</head>
+<body id="image" onload="tinyMCEPopup.executeOnLoad('init();');" style="display: none">
+<form onsubmit="insertImage();return false;" action="#">
+	<div class="tabs">
+		<ul>
+			<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{$lang_insert_image_title}</a></span></li>
+		</ul>
+	</div>
+
+	<div class="panel_wrapper">
+		<div id="general_panel" class="panel current">
+     <table border="0" cellpadding="4" cellspacing="0">
+          <tr>
+            <td nowrap="nowrap"><label for="src">{$lang_insert_image_src}</label></td>
+            <td><table border="0" cellspacing="0" cellpadding="0">
+                <tr>
+                  <td><input id="src" name="src" type="text" value="" style="width: 200px" onchange="getImageData();"></td>
+                  <td id="srcbrowsercontainer">&nbsp;</td>
+                </tr>
+              </table></td>
+          </tr>
+		  <!-- Image list -->
+		  <script language="javascript">
+			if (typeof(tinyMCEImageList) != "undefined" && tinyMCEImageList.length > 0) {
+				var html = "";
+
+				html += '<tr><td><label for="image_list">{$lang_image_list}</label></td>';
+				html += '<td><select id="image_list" name="image_list" style="width: 200px" onchange="this.form.src.value=this.options[this.selectedIndex].value;resetImageData();getImageData();">';
+				html += '<option value="">---</option>';
+
+				for (var i=0; i<tinyMCEImageList.length; i++)
+					html += '<option value="' + tinyMCEImageList[i][1] + '">' + tinyMCEImageList[i][0] + '</option>';
+
+				html += '</select></td></tr>';
+
+				document.write(html);
+			}
+		  </script>
+		  <!-- /Image list -->
+          <tr>
+            <td nowrap="nowrap"><label for="alt">{$lang_insert_image_alt}</label></td>
+            <td><input id="alt" name="alt" type="text" value="" style="width: 200px"></td>
+          </tr>
+          <tr>
+            <td nowrap="nowrap"><label for="align">{$lang_insert_image_align}</label></td>
+            <td><select id="align" name="align">
+                <option value="">{$lang_insert_image_align_default}</option>
+                <option value="baseline">{$lang_insert_image_align_baseline}</option>
+                <option value="top">{$lang_insert_image_align_top}</option>
+                <option value="middle">{$lang_insert_image_align_middle}</option>
+                <option value="bottom">{$lang_insert_image_align_bottom}</option>
+                <option value="texttop">{$lang_insert_image_align_texttop}</option>
+                <option value="absmiddle">{$lang_insert_image_align_absmiddle}</option>
+                <option value="absbottom">{$lang_insert_image_align_absbottom}</option>
+                <option value="left">{$lang_insert_image_align_left}</option>
+                <option value="right">{$lang_insert_image_align_right}</option>
+              </select></td>
+          </tr>
+          <tr>
+            <td nowrap="nowrap"><label for="width">{$lang_insert_image_dimensions}</label></td>
+            <td><input id="width" name="width" type="text" value="" size="3" maxlength="3">
+              x
+              <input id="height" name="height" type="text" value="" size="3" maxlength="3"></td>
+          </tr>
+          <tr>
+            <td nowrap="nowrap"><label for="border">{$lang_insert_image_border}</label></td>
+            <td><input id="border" name="border" type="text" value="" size="3" maxlength="3"></td>
+          </tr>
+          <tr>
+            <td nowrap="nowrap"><label for="vspace">{$lang_insert_image_vspace}</label></td>
+            <td><input id="vspace" name="vspace" type="text" value="" size="3" maxlength="3"></td>
+          </tr>
+          <tr>
+            <td nowrap="nowrap"><label for="hspace">{$lang_insert_image_hspace}</label></td>
+            <td><input id="hspace" name="hspace" type="text" value="" size="3" maxlength="3"></td>
+          </tr>
+        </table>
+		</div>
+	</div>
+
+	<div class="mceActionPanel">
+		<div style="float: left">
+			<input type="button" id="insert" name="insert" value="{$lang_insert}" onclick="insertImage();" />
+		</div>
+
+		<div style="float: right">
+			<input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onclick="tinyMCEPopup.close();" />
+		</div>
+	</div>
+</form>
+</body>
+</html>

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/anchor.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/anchor.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/anchor_symbol.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/anchor_symbol.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/backcolor.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/backcolor.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/bold.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/bold.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/bold_de_se.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/bold_de_se.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/bold_es.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/bold_es.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/bold_fr.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/bold_fr.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/bold_ru.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/bold_ru.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/bold_tw.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/bold_tw.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/browse.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/browse.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/bullist.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/bullist.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/button_menu.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/button_menu.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/buttons.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/buttons.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/cancel_button_bg.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/cancel_button_bg.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/charmap.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/charmap.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/cleanup.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/cleanup.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/close.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/close.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/code.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/code.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/color.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/color.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/copy.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/copy.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/custom_1.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/custom_1.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/cut.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/cut.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/forecolor.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/forecolor.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/help.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/help.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/hr.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/hr.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/image.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/image.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/indent.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/indent.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/insert_button_bg.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/insert_button_bg.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/italic.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/italic.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/italic_de_se.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/italic_de_se.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/italic_es.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/italic_es.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/italic_ru.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/italic_ru.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/italic_tw.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/italic_tw.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/justifycenter.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/justifycenter.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/justifyfull.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/justifyfull.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/justifyleft.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/justifyleft.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/justifyright.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/justifyright.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/link.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/link.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/menu_check.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/menu_check.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/newdocument.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/newdocument.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/numlist.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/numlist.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/opacity.png
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/opacity.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/outdent.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/outdent.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/paste.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/paste.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/redo.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/redo.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/removeformat.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/removeformat.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/separator.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/separator.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/spacer.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/spacer.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/statusbar_resize.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/statusbar_resize.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/strikethrough.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/strikethrough.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/sub.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/sub.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/sup.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/sup.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/underline.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/underline.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/underline_es.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/underline_es.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/underline_fr.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/underline_fr.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/underline_ru.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/underline_ru.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/underline_tw.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/underline_tw.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/undo.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/undo.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/unlink.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/unlink.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/visualaid.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/visualaid.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/xp/tab_bg.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/xp/tab_bg.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/xp/tab_end.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/xp/tab_end.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/xp/tab_sel_bg.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/xp/tab_sel_bg.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/xp/tab_sel_end.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/xp/tab_sel_end.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/xp/tabs_bg.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/images/xp/tabs_bg.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/jscripts/about.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/jscripts/about.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/jscripts/about.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,75 @@
+function init() {
+	var inst;
+
+	tinyMCEPopup.resizeToInnerSize();
+	inst = tinyMCE.selectedInstance;
+
+	// Give FF some time
+	window.setTimeout('insertHelpIFrame();', 10);
+
+	var tcont = document.getElementById('plugintablecontainer');
+	var plugins = tinyMCE.getParam('plugins', '', true, ',');
+	if (plugins.length == 0)
+		document.getElementById('plugins_tab').style.display = 'none';
+
+	var html = "";
+	html += '<table id="plugintable">';
+	html += '<thead>';
+	html += '<tr>';
+	html += '<td>' + tinyMCE.getLang('lang_plugin') + '</td>';
+	html += '<td>' + tinyMCE.getLang('lang_author') + '</td>';
+	html += '<td>' + tinyMCE.getLang('lang_version') + '</td>';
+	html += '</tr>';
+	html += '</thead>';
+	html += '<tbody>';
+
+	for (var i=0; i<inst.plugins.length; i++) {
+		var info = getPluginInfo(inst.plugins[i]);
+
+		html += '<tr>';
+
+		if (info.infourl != null && info.infourl != '')
+			html += '<td width="50%" title="' + plugins[i] + '"><a href="' + info.infourl + '" target="mceplugin">' + info.longname + '</a></td>';
+		else
+			html += '<td width="50%" title="' + plugins[i] + '">' + info.longname + '</td>';
+
+		if (info.authorurl != null && info.authorurl != '')
+			html += '<td width="35%"><a href="' + info.authorurl + '" target="mceplugin">' + info.author + '</a></td>';
+		else
+			html += '<td width="35%">' + info.author + '</td>';
+
+		html += '<td width="15%">' + info.version + '</td>';
+		html += '</tr>';
+	}
+
+	html += '</tbody>';
+	html += '</table>';
+
+	tcont.innerHTML = html;
+}
+
+function getPluginInfo(name) {
+	if (tinyMCE.plugins[name].getInfo)
+		return tinyMCE.plugins[name].getInfo();
+
+	return {
+		longname : name,
+		authorurl : '',
+		infourl : '',
+		author : '--',
+		version : '--'
+	};
+}
+
+function insertHelpIFrame() {
+	var html = '<iframe width="100%" height="300" src="' + tinyMCE.themeURL + "/docs/" + tinyMCE.settings['docs_language'] + "/index.htm" + '"></iframe>';
+
+	document.getElementById('iframecontainer').innerHTML = html;
+
+	html = '';
+	html += '<a href="http://www.moxiecode.com" target="_blank"><img src="http://tinymce.moxiecode.com/images/gotmoxie.png" alt="Got Moxie?" border="0" /></a> ';
+	html += '<a href="http://sourceforge.net/projects/tinymce/" target="_blank"><img src="http://sourceforge.net/sflogo.php?group_id=103281" alt="Hosted By Sourceforge" border="0" /></a> ';
+	html += '<a href="http://www.freshmeat.net/projects/tinymce" target="_blank"><img src="http://tinymce.moxiecode.com/images/fm.gif" alt="Also on freshmeat" border="0" /></a> ';
+
+	document.getElementById('buttoncontainer').innerHTML = html;
+}

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/jscripts/anchor.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/jscripts/anchor.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/jscripts/anchor.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,74 @@
+var action, element;
+
+function init() {
+	tinyMCEPopup.resizeToInnerSize();
+
+	var inst = tinyMCE.getInstanceById(tinyMCE.getWindowArg('editor_id'));
+	var anchor = tinyMCE.getParentElement(inst.getFocusElement(), "a", "name");
+	var img = inst.getFocusElement();
+	action = 'insert';
+
+	if (anchor != null) {
+		element = anchor;
+		action = "update";
+	}
+
+	if (tinyMCE.getAttrib(img, "class") == "mceItemAnchor") {
+		element = img;
+		action = "update";
+	}
+
+	if (action == "update")
+		document.forms[0].anchorName.value = element.nodeName == "IMG" ? element.getAttribute("title") : element.getAttribute("name");
+
+	document.forms[0].insert.value = tinyMCE.getLang('lang_' + action, 'Insert', true);
+}
+
+function insertAnchor() {
+	var inst = tinyMCE.getInstanceById(tinyMCE.getWindowArg('editor_id'));
+	var name = document.forms[0].anchorName.value, e;
+
+	tinyMCEPopup.execCommand("mceBeginUndoLevel");
+
+	if (action == "update") {
+		if (element.nodeName == "IMG")
+			element.setAttribute("title", name);
+		else
+			element.setAttribute("name", name);
+	} else {
+		var rng = inst.getRng();
+
+		if (rng.collapse)
+			rng.collapse(false);
+
+		name = name.replace(/&/g, '&amp;');
+		name = name.replace(/\"/g, '&quot;');
+		name = name.replace(/</g, '&lt;');
+		name = name.replace(/>/g, '&gt;');
+
+		// Fix for bug #1447335
+		if (tinyMCE.isGecko)
+			html = '<a id="mceNewAnchor" name="' + name + '"></a>';
+		else
+			html = '<a name="' + name + '"></a>';
+
+		tinyMCEPopup.execCommand("mceInsertContent", false, html);
+
+		// Fix for bug #1447335 force cursor after the anchor element
+		if (tinyMCE.isGecko) {
+			e = inst.getDoc().getElementById('mceNewAnchor');
+
+			if (e) {
+				inst.selection.selectNode(e, true, false, false);
+				e.removeAttribute('id');
+			}
+		}
+
+		tinyMCE.handleVisualAid(inst.getBody(), true, inst.visualAid, inst);
+	}
+
+	tinyMCEPopup.execCommand("mceEndUndoLevel");
+
+	tinyMCE.triggerNodeChange();
+	tinyMCEPopup.close();
+}

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/jscripts/charmap.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/jscripts/charmap.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/jscripts/charmap.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,326 @@
+function init() {
+	tinyMCEPopup.resizeToInnerSize();
+}
+
+var charmap = new Array();
+
+// for mor details please see w3c.org
+// now here is the complete list ;)
+
+charmap = [
+	['&nbsp;',    '&#160;',  true, 'no-break space'],
+	['&amp;',     '&#38;',   true, 'ampersand'],
+	['&quot;',    '&#34;',   true, 'quotation mark'],
+// finance
+	['&cent;',    '&#162;',  true, 'cent sign'],
+	['&euro;',    '&#8364;', true, 'euro sign'],
+	['&pound;',   '&#163;',  true, 'pound sign'],
+	['&yen;',     '&#165;',  true, 'yen sign'],
+// signs
+	['&copy;',    '&#169;',  true, 'copyright sign'],
+	['&reg;',     '&#174;',  true, 'registered sign'],
+	['&trade;',   '&#8482;', true, 'trade mark sign'],
+	['&permil;',  '&#8240;', true, 'per mille sign'],
+	['&micro;',   '&#181;',  true, 'micro sign'],
+	['&middot;',  '&#183;',  true, 'middle dot'],
+	['&bull;',    '&#8226;', true, 'bullet'],
+	['&hellip;',  '&#8230;', true, 'three dot leader'],
+	['&prime;',   '&#8242;', true, 'minutes / feet'],
+	['&Prime;',   '&#8243;', true, 'seconds / inches'],
+	['&sect;',    '&#167;',  true, 'section sign'],
+	['&para;',    '&#182;',  true, 'paragraph sign'],
+	['&szlig;',   '&#223;',  true, 'sharp s / ess-zed'],
+// quotations
+	['&lsaquo;',  '&#8249;', true, 'single left-pointing angle quotation mark'],
+	['&rsaquo;',  '&#8250;', true, 'single right-pointing angle quotation mark'],
+	['&laquo;',   '&#171;',  true, 'left pointing guillemet'],
+	['&raquo;',   '&#187;',  true, 'right pointing guillemet'],
+	['&lsquo;',   '&#8216;', true, 'left single quotation mark'],
+	['&rsquo;',   '&#8217;', true, 'right single quotation mark'],
+	['&ldquo;',   '&#8220;', true, 'left double quotation mark'],
+	['&rdquo;',   '&#8221;', true, 'right double quotation mark'],
+	['&sbquo;',   '&#8218;', true, 'single low-9 quotation mark'],
+	['&bdquo;',   '&#8222;', true, 'double low-9 quotation mark'],
+	['&lt;',      '&#60;',   true, 'less-than sign'],
+	['&gt;',      '&#62;',   true, 'greater-than sign'],
+	['&le;',      '&#8804;', true, 'less-than or equal to'],
+	['&ge;',      '&#8805;', true, 'greater-than or equal to'],
+	['&ndash;',   '&#8211;', true, 'en dash'],
+	['&mdash;',   '&#8212;', true, 'em dash'],
+	['&macr;',    '&#175;',  true, 'macron'],
+	['&oline;',   '&#8254;', true, 'overline'],
+	['&curren;',  '&#164;',  true, 'currency sign'],
+	['&brvbar;',  '&#166;',  true, 'broken bar'],
+	['&uml;',     '&#168;',  true, 'diaeresis'],
+	['&iexcl;',   '&#161;',  true, 'inverted exclamation mark'],
+	['&iquest;',  '&#191;',  true, 'turned question mark'],
+	['&circ;',    '&#710;',  true, 'circumflex accent'],
+	['&tilde;',   '&#732;',  true, 'small tilde'],
+	['&deg;',     '&#176;',  true, 'degree sign'],
+	['&minus;',   '&#8722;', true, 'minus sign'],
+	['&plusmn;',  '&#177;',  true, 'plus-minus sign'],
+	['&divide;',  '&#247;',  true, 'division sign'],
+	['&frasl;',   '&#8260;', true, 'fraction slash'],
+	['&times;',   '&#215;',  true, 'multiplication sign'],
+	['&sup1;',    '&#185;',  true, 'superscript one'],
+	['&sup2;',    '&#178;',  true, 'superscript two'],
+	['&sup3;',    '&#179;',  true, 'superscript three'],
+	['&frac14;',  '&#188;',  true, 'fraction one quarter'],
+	['&frac12;',  '&#189;',  true, 'fraction one half'],
+	['&frac34;',  '&#190;',  true, 'fraction three quarters'],
+// math / logical
+	['&fnof;',    '&#402;',  true, 'function / florin'],
+	['&int;',     '&#8747;', true, 'integral'],
+	['&sum;',     '&#8721;', true, 'n-ary sumation'],
+	['&infin;',   '&#8734;', true, 'infinity'],
+	['&radic;',   '&#8730;', true, 'square root'],
+	['&sim;',     '&#8764;', false,'similar to'],
+	['&cong;',    '&#8773;', false,'approximately equal to'],
+	['&asymp;',   '&#8776;', true, 'almost equal to'],
+	['&ne;',      '&#8800;', true, 'not equal to'],
+	['&equiv;',   '&#8801;', true, 'identical to'],
+	['&isin;',    '&#8712;', false,'element of'],
+	['&notin;',   '&#8713;', false,'not an element of'],
+	['&ni;',      '&#8715;', false,'contains as member'],
+	['&prod;',    '&#8719;', true, 'n-ary product'],
+	['&and;',     '&#8743;', false,'logical and'],
+	['&or;',      '&#8744;', false,'logical or'],
+	['&not;',     '&#172;',  true, 'not sign'],
+	['&cap;',     '&#8745;', true, 'intersection'],
+	['&cup;',     '&#8746;', false,'union'],
+	['&part;',    '&#8706;', true, 'partial differential'],
+	['&forall;',  '&#8704;', false,'for all'],
+	['&exist;',   '&#8707;', false,'there exists'],
+	['&empty;',   '&#8709;', false,'diameter'],
+	['&nabla;',   '&#8711;', false,'backward difference'],
+	['&lowast;',  '&#8727;', false,'asterisk operator'],
+	['&prop;',    '&#8733;', false,'proportional to'],
+	['&ang;',     '&#8736;', false,'angle'],
+// undefined
+	['&acute;',   '&#180;',  true, 'acute accent'],
+	['&cedil;',   '&#184;',  true, 'cedilla'],
+	['&ordf;',    '&#170;',  true, 'feminine ordinal indicator'],
+	['&ordm;',    '&#186;',  true, 'masculine ordinal indicator'],
+	['&dagger;',  '&#8224;', true, 'dagger'],
+	['&Dagger;',  '&#8225;', true, 'double dagger'],
+// alphabetical special chars
+	['&Agrave;',  '&#192;',  true, 'A - grave'],
+	['&Aacute;',  '&#193;',  true, 'A - acute'],
+	['&Acirc;',   '&#194;',  true, 'A - circumflex'],
+	['&Atilde;',  '&#195;',  true, 'A - tilde'],
+	['&Auml;',    '&#196;',  true, 'A - diaeresis'],
+	['&Aring;',   '&#197;',  true, 'A - ring above'],
+	['&AElig;',   '&#198;',  true, 'ligature AE'],
+	['&Ccedil;',  '&#199;',  true, 'C - cedilla'],
+	['&Egrave;',  '&#200;',  true, 'E - grave'],
+	['&Eacute;',  '&#201;',  true, 'E - acute'],
+	['&Ecirc;',   '&#202;',  true, 'E - circumflex'],
+	['&Euml;',    '&#203;',  true, 'E - diaeresis'],
+	['&Igrave;',  '&#204;',  true, 'I - grave'],
+	['&Iacute;',  '&#205;',  true, 'I - acute'],
+	['&Icirc;',   '&#206;',  true, 'I - circumflex'],
+	['&Iuml;',    '&#207;',  true, 'I - diaeresis'],
+	['&ETH;',     '&#208;',  true, 'ETH'],
+	['&Ntilde;',  '&#209;',  true, 'N - tilde'],
+	['&Ograve;',  '&#210;',  true, 'O - grave'],
+	['&Oacute;',  '&#211;',  true, 'O - acute'],
+	['&Ocirc;',   '&#212;',  true, 'O - circumflex'],
+	['&Otilde;',  '&#213;',  true, 'O - tilde'],
+	['&Ouml;',    '&#214;',  true, 'O - diaeresis'],
+	['&Oslash;',  '&#216;',  true, 'O - slash'],
+	['&OElig;',   '&#338;',  true, 'ligature OE'],
+	['&Scaron;',  '&#352;',  true, 'S - caron'],
+	['&Ugrave;',  '&#217;',  true, 'U - grave'],
+	['&Uacute;',  '&#218;',  true, 'U - acute'],
+	['&Ucirc;',   '&#219;',  true, 'U - circumflex'],
+	['&Uuml;',    '&#220;',  true, 'U - diaeresis'],
+	['&Yacute;',  '&#221;',  true, 'Y - acute'],
+	['&Yuml;',    '&#376;',  true, 'Y - diaeresis'],
+	['&THORN;',   '&#222;',  true, 'THORN'],
+	['&agrave;',  '&#224;',  true, 'a - grave'],
+	['&aacute;',  '&#225;',  true, 'a - acute'],
+	['&acirc;',   '&#226;',  true, 'a - circumflex'],
+	['&atilde;',  '&#227;',  true, 'a - tilde'],
+	['&auml;',    '&#228;',  true, 'a - diaeresis'],
+	['&aring;',   '&#229;',  true, 'a - ring above'],
+	['&aelig;',   '&#230;',  true, 'ligature ae'],
+	['&ccedil;',  '&#231;',  true, 'c - cedilla'],
+	['&egrave;',  '&#232;',  true, 'e - grave'],
+	['&eacute;',  '&#233;',  true, 'e - acute'],
+	['&ecirc;',   '&#234;',  true, 'e - circumflex'],
+	['&euml;',    '&#235;',  true, 'e - diaeresis'],
+	['&igrave;',  '&#236;',  true, 'i - grave'],
+	['&iacute;',  '&#237;',  true, 'i - acute'],
+	['&icirc;',   '&#238;',  true, 'i - circumflex'],
+	['&iuml;',    '&#239;',  true, 'i - diaeresis'],
+	['&eth;',     '&#240;',  true, 'eth'],
+	['&ntilde;',  '&#241;',  true, 'n - tilde'],
+	['&ograve;',  '&#242;',  true, 'o - grave'],
+	['&oacute;',  '&#243;',  true, 'o - acute'],
+	['&ocirc;',   '&#244;',  true, 'o - circumflex'],
+	['&otilde;',  '&#245;',  true, 'o - tilde'],
+	['&ouml;',    '&#246;',  true, 'o - diaeresis'],
+	['&oslash;',  '&#248;',  true, 'o slash'],
+	['&oelig;',   '&#339;',  true, 'ligature oe'],
+	['&scaron;',  '&#353;',  true, 's - caron'],
+	['&ugrave;',  '&#249;',  true, 'u - grave'],
+	['&uacute;',  '&#250;',  true, 'u - acute'],
+	['&ucirc;',   '&#251;',  true, 'u - circumflex'],
+	['&uuml;',    '&#252;',  true, 'u - diaeresis'],
+	['&yacute;',  '&#253;',  true, 'y - acute'],
+	['&thorn;',   '&#254;',  true, 'thorn'],
+	['&yuml;',    '&#255;',  true, 'y - diaeresis'],
+    ['&Alpha;',   '&#913;',  true, 'Alpha'],
+	['&Beta;',    '&#914;',  true, 'Beta'],
+	['&Gamma;',   '&#915;',  true, 'Gamma'],
+	['&Delta;',   '&#916;',  true, 'Delta'],
+	['&Epsilon;', '&#917;',  true, 'Epsilon'],
+	['&Zeta;',    '&#918;',  true, 'Zeta'],
+	['&Eta;',     '&#919;',  true, 'Eta'],
+	['&Theta;',   '&#920;',  true, 'Theta'],
+	['&Iota;',    '&#921;',  true, 'Iota'],
+	['&Kappa;',   '&#922;',  true, 'Kappa'],
+	['&Lambda;',  '&#923;',  true, 'Lambda'],
+	['&Mu;',      '&#924;',  true, 'Mu'],
+	['&Nu;',      '&#925;',  true, 'Nu'],
+	['&Xi;',      '&#926;',  true, 'Xi'],
+	['&Omicron;', '&#927;',  true, 'Omicron'],
+	['&Pi;',      '&#928;',  true, 'Pi'],
+	['&Rho;',     '&#929;',  true, 'Rho'],
+	['&Sigma;',   '&#931;',  true, 'Sigma'],
+	['&Tau;',     '&#932;',  true, 'Tau'],
+	['&Upsilon;', '&#933;',  true, 'Upsilon'],
+	['&Phi;',     '&#934;',  true, 'Phi'],
+	['&Chi;',     '&#935;',  true, 'Chi'],
+	['&Psi;',     '&#936;',  true, 'Psi'],
+	['&Omega;',   '&#937;',  true, 'Omega'],
+	['&alpha;',   '&#945;',  true, 'alpha'],
+	['&beta;',    '&#946;',  true, 'beta'],
+	['&gamma;',   '&#947;',  true, 'gamma'],
+	['&delta;',   '&#948;',  true, 'delta'],
+	['&epsilon;', '&#949;',  true, 'epsilon'],
+	['&zeta;',    '&#950;',  true, 'zeta'],
+	['&eta;',     '&#951;',  true, 'eta'],
+	['&theta;',   '&#952;',  true, 'theta'],
+	['&iota;',    '&#953;',  true, 'iota'],
+	['&kappa;',   '&#954;',  true, 'kappa'],
+	['&lambda;',  '&#955;',  true, 'lambda'],
+	['&mu;',      '&#956;',  true, 'mu'],
+	['&nu;',      '&#957;',  true, 'nu'],
+	['&xi;',      '&#958;',  true, 'xi'],
+	['&omicron;', '&#959;',  true, 'omicron'],
+	['&pi;',      '&#960;',  true, 'pi'],
+	['&rho;',     '&#961;',  true, 'rho'],
+	['&sigmaf;',  '&#962;',  true, 'final sigma'],
+	['&sigma;',   '&#963;',  true, 'sigma'],
+	['&tau;',     '&#964;',  true, 'tau'],
+	['&upsilon;', '&#965;',  true, 'upsilon'],
+	['&phi;',     '&#966;',  true, 'phi'],
+	['&chi;',     '&#967;',  true, 'chi'],
+	['&psi;',     '&#968;',  true, 'psi'],
+	['&omega;',   '&#969;',  true, 'omega'],
+// symbols
+	['&alefsym;', '&#8501;', false,'alef symbol'],
+	['&piv;',     '&#982;',  false,'pi symbol'],
+	['&real;',    '&#8476;', false,'real part symbol'],
+	['&thetasym;','&#977;',  false,'theta symbol'],
+	['&upsih;',   '&#978;',  false,'upsilon - hook symbol'],
+	['&weierp;',  '&#8472;', false,'Weierstrass p'],
+	['&image;',   '&#8465;', false,'imaginary part'],
+// arrows
+	['&larr;',    '&#8592;', true, 'leftwards arrow'],
+	['&uarr;',    '&#8593;', true, 'upwards arrow'],
+	['&rarr;',    '&#8594;', true, 'rightwards arrow'],
+	['&darr;',    '&#8595;', true, 'downwards arrow'],
+	['&harr;',    '&#8596;', true, 'left right arrow'],
+	['&crarr;',   '&#8629;', false,'carriage return'],
+	['&lArr;',    '&#8656;', false,'leftwards double arrow'],
+	['&uArr;',    '&#8657;', false,'upwards double arrow'],
+	['&rArr;',    '&#8658;', false,'rightwards double arrow'],
+	['&dArr;',    '&#8659;', false,'downwards double arrow'],
+	['&hArr;',    '&#8660;', false,'left right double arrow'],
+	['&there4;',  '&#8756;', false,'therefore'],
+	['&sub;',     '&#8834;', false,'subset of'],
+	['&sup;',     '&#8835;', false,'superset of'],
+	['&nsub;',    '&#8836;', false,'not a subset of'],
+	['&sube;',    '&#8838;', false,'subset of or equal to'],
+	['&supe;',    '&#8839;', false,'superset of or equal to'],
+	['&oplus;',   '&#8853;', false,'circled plus'],
+	['&otimes;',  '&#8855;', false,'circled times'],
+	['&perp;',    '&#8869;', false,'perpendicular'],
+	['&sdot;',    '&#8901;', false,'dot operator'],
+	['&lceil;',   '&#8968;', false,'left ceiling'],
+	['&rceil;',   '&#8969;', false,'right ceiling'],
+	['&lfloor;',  '&#8970;', false,'left floor'],
+	['&rfloor;',  '&#8971;', false,'right floor'],
+	['&lang;',    '&#9001;', false,'left-pointing angle bracket'],
+	['&rang;',    '&#9002;', false,'right-pointing angle bracket'],
+	['&loz;',     '&#9674;', true,'lozenge'],
+	['&spades;',  '&#9824;', false,'black spade suit'],
+	['&clubs;',   '&#9827;', true, 'black club suit'],
+	['&hearts;',  '&#9829;', true, 'black heart suit'],
+	['&diams;',   '&#9830;', true, 'black diamond suit'],
+	['&ensp;',    '&#8194;', false,'en space'],
+	['&emsp;',    '&#8195;', false,'em space'],
+	['&thinsp;',  '&#8201;', false,'thin space'],
+	['&zwnj;',    '&#8204;', false,'zero width non-joiner'],
+	['&zwj;',     '&#8205;', false,'zero width joiner'],
+	['&lrm;',     '&#8206;', false,'left-to-right mark'],
+	['&rlm;',     '&#8207;', false,'right-to-left mark'],
+	['&shy;',     '&#173;',  false,'soft hyphen']
+];
+
+function renderCharMapHTML() {
+	var charsPerRow = 20, tdWidth=20, tdHeight=20;
+	var html = '<table border="0" cellspacing="1" cellpadding="0" width="' + (tdWidth*charsPerRow) + '"><tr height="' + tdHeight + '">';
+	var cols=-1;
+	for (var i=0; i<charmap.length; i++) {
+		if (charmap[i][2]==true) {
+			cols++;
+			html += ''
+				+ '<td width="' + tdWidth + '" height="' + tdHeight + '" class="charmap"'
+				+ ' onmouseover="this.className=\'charmapOver\';'
+				+ 'previewChar(\'' + charmap[i][1].substring(1,charmap[i][1].length) + '\',\'' + charmap[i][0].substring(1,charmap[i][0].length) + '\',\'' + charmap[i][3] + '\');"'
+				+ ' onmouseout="this.className=\'charmap\';"'
+				+ ' nowrap="nowrap" onclick="insertChar(\'' + charmap[i][1].substring(2,charmap[i][1].length-1) + '\');"><a style="text-decoration: none;" onfocus="previewChar(\'' + charmap[i][1].substring(1,charmap[i][1].length) + '\',\'' + charmap[i][0].substring(1,charmap[i][0].length) + '\',\'' + charmap[i][3] + '\');" href="javascript:insertChar(\'' + charmap[i][1].substring(2,charmap[i][1].length-1) + '\');" onclick="return false;" onmousedown="return false;" title="' + charmap[i][3] + '">'
+				+ charmap[i][1]
+				+ '</a></td>';
+			if ((cols+1) % charsPerRow == 0)
+				html += '</tr><tr height="' + tdHeight + '">';
+		}
+	 }
+	if (cols % charsPerRow > 0) {
+		var padd = charsPerRow - (cols % charsPerRow);
+		for (var i=0; i<padd-1; i++)
+			html += '<td width="' + tdWidth + '" height="' + tdHeight + '" class="charmap">&nbsp;</td>';
+	}
+	html += '</tr></table>';
+	document.write(html);
+}
+
+function insertChar(chr) {
+	tinyMCEPopup.execCommand('mceInsertContent', false, '&#' + chr + ';');
+
+	// Refocus in window
+	if (tinyMCEPopup.isWindow)
+		window.focus();
+
+	tinyMCEPopup.close();
+}
+
+function previewChar(codeA, codeB, codeN) {
+	var elmA = document.getElementById('codeA');
+	var elmB = document.getElementById('codeB');
+	var elmV = document.getElementById('codeV');
+	var elmN = document.getElementById('codeN');
+
+	if (codeA=='#160;') {
+		elmV.innerHTML = '__';
+	} else {
+		elmV.innerHTML = '&' + codeA;
+	}
+
+	elmB.innerHTML = '&amp;' + codeA;
+	elmA.innerHTML = '&amp;' + codeB;
+	elmN.innerHTML = codeN;
+}

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/jscripts/color_picker.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/jscripts/color_picker.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/jscripts/color_picker.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,108 @@
+function init() {
+	if (tinyMCE.isMSIE)
+		tinyMCEPopup.resizeToInnerSize();
+}
+
+function selectColor() {
+	var color = document.getElementById("selectedColorBox").value;
+
+	tinyMCEPopup.execCommand(tinyMCE.getWindowArg('command'), false, color);
+	tinyMCEPopup.close();
+}
+
+function showColor(color) {
+	document.getElementById("selectedColor").style.backgroundColor = color;
+	document.getElementById("selectedColorBox").value = color;
+}
+
+var colors = new Array(
+	"#000000","#000033","#000066","#000099","#0000cc","#0000ff","#330000","#330033",
+	"#330066","#330099","#3300cc","#3300ff","#660000","#660033","#660066","#660099",
+	"#6600cc","#6600ff","#990000","#990033","#990066","#990099","#9900cc","#9900ff",
+	"#cc0000","#cc0033","#cc0066","#cc0099","#cc00cc","#cc00ff","#ff0000","#ff0033",
+	"#ff0066","#ff0099","#ff00cc","#ff00ff","#003300","#003333","#003366","#003399",
+	"#0033cc","#0033ff","#333300","#333333","#333366","#333399","#3333cc","#3333ff",
+	"#663300","#663333","#663366","#663399","#6633cc","#6633ff","#993300","#993333",
+	"#993366","#993399","#9933cc","#9933ff","#cc3300","#cc3333","#cc3366","#cc3399",
+	"#cc33cc","#cc33ff","#ff3300","#ff3333","#ff3366","#ff3399","#ff33cc","#ff33ff",
+	"#006600","#006633","#006666","#006699","#0066cc","#0066ff","#336600","#336633",
+	"#336666","#336699","#3366cc","#3366ff","#666600","#666633","#666666","#666699",
+	"#6666cc","#6666ff","#996600","#996633","#996666","#996699","#9966cc","#9966ff",
+	"#cc6600","#cc6633","#cc6666","#cc6699","#cc66cc","#cc66ff","#ff6600","#ff6633",
+	"#ff6666","#ff6699","#ff66cc","#ff66ff","#009900","#009933","#009966","#009999",
+	"#0099cc","#0099ff","#339900","#339933","#339966","#339999","#3399cc","#3399ff",
+	"#669900","#669933","#669966","#669999","#6699cc","#6699ff","#999900","#999933",
+	"#999966","#999999","#9999cc","#9999ff","#cc9900","#cc9933","#cc9966","#cc9999",
+	"#cc99cc","#cc99ff","#ff9900","#ff9933","#ff9966","#ff9999","#ff99cc","#ff99ff",
+	"#00cc00","#00cc33","#00cc66","#00cc99","#00cccc","#00ccff","#33cc00","#33cc33",
+	"#33cc66","#33cc99","#33cccc","#33ccff","#66cc00","#66cc33","#66cc66","#66cc99",
+	"#66cccc","#66ccff","#99cc00","#99cc33","#99cc66","#99cc99","#99cccc","#99ccff",
+	"#cccc00","#cccc33","#cccc66","#cccc99","#cccccc","#ccccff","#ffcc00","#ffcc33",
+	"#ffcc66","#ffcc99","#ffcccc","#ffccff","#00ff00","#00ff33","#00ff66","#00ff99",
+	"#00ffcc","#00ffff","#33ff00","#33ff33","#33ff66","#33ff99","#33ffcc","#33ffff",
+	"#66ff00","#66ff33","#66ff66","#66ff99","#66ffcc","#66ffff","#99ff00","#99ff33",
+	"#99ff66","#99ff99","#99ffcc","#99ffff","#ccff00","#ccff33","#ccff66","#ccff99",
+	"#ccffcc","#ccffff","#ffff00","#ffff33","#ffff66","#ffff99","#ffffcc","#ffffff"
+);
+
+function convertRGBToHex(col) {
+	var re = new RegExp("rgb\\s*\\(\\s*([0-9]+).*,\\s*([0-9]+).*,\\s*([0-9]+).*\\)", "gi");
+
+	var rgb = col.replace(re, "$1,$2,$3").split(',');
+	if (rgb.length == 3) {
+		r = parseInt(rgb[0]).toString(16);
+		g = parseInt(rgb[1]).toString(16);
+		b = parseInt(rgb[2]).toString(16);
+
+		r = r.length == 1 ? '0' + r : r;
+		g = g.length == 1 ? '0' + g : g;
+		b = b.length == 1 ? '0' + b : b;
+
+		return "#" + r + g + b;
+	}
+
+	return col;
+}
+
+function convertHexToRGB(col) {
+	if (col.indexOf('#') != -1) {
+		col = col.replace(new RegExp('[^0-9A-F]', 'gi'), '');
+
+		r = parseInt(col.substring(0, 2), 16);
+		g = parseInt(col.substring(2, 4), 16);
+		b = parseInt(col.substring(4, 6), 16);
+
+		return "rgb(" + r + "," + g + "," + b + ")";
+	}
+
+	return col;
+}
+
+function renderColorMap() {
+	var html = "";
+	var inputColor = convertRGBToHex(tinyMCE.getWindowArg('input_color'));
+
+	html += '<table border="0" cellspacing="1" cellpadding="0">'
+		+ '<tr>';
+	for (var i=0; i<colors.length; i++) {
+		html += '<td bgcolor="' + colors[i] + '">'
+			+ '<a href="javascript:selectColor();" onfocus="showColor(\'' + colors[i] +  '\');" onmouseover="showColor(\'' + colors[i] +  '\');">'
+			+ '<img border="0" src="images/spacer.gif" width="10" height="10" title="' + colors[i] +  '" alt="' + colors[i] +  '" /></a></td>';
+		if ((i+1) % 18 == 0)
+			html += '</tr><tr>';
+	}
+	html += '<tr><td colspan="18">'
+		+ '<table width="100%" border="0" cellspacing="0" cellpadding="0">'
+		+ '<tr><td>'
+		+ '<img id="selectedColor" style="background-color:' + tinyMCE.getWindowArg('input_color') + '" border="0" src="images/spacer.gif" width="80" height="16" />'
+		+ '</td><td align="right">'
+		+ '<input id="selectedColorBox" name="selectedColorBox" type="text" size="7" maxlength="7" style="width:65px" value="' + inputColor + '" />'
+		+ '</td></tr>'
+		+ '</table>'
+		+ '<div style="float: left"><input type="button" id="insert" name="insert" value="{$lang_theme_colorpicker_apply}" style="margin-top:3px" onclick="selectColor();"></div>'
+		+ '<div style="float: right"><input type="button" name="cancel" value="{$lang_cancel}" style="margin-top:3px" onclick="tinyMCEPopup.close();" id="cancel" /></div>'
+		+ '</td></tr>'
+		+ '</table>';
+
+	document.write(html);
+}
\ No newline at end of file

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/jscripts/image.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/jscripts/image.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/jscripts/image.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,81 @@
+var url = tinyMCE.getParam("external_image_list_url");
+if (url != null) {
+	// Fix relative
+	if (url.charAt(0) != '/' && url.indexOf('://') == -1)
+		url = tinyMCE.documentBasePath + "/" + url;
+
+	document.write('<sc'+'ript language="javascript" type="text/javascript" src="' + url + '"></sc'+'ript>');
+}
+
+function insertImage() {
+	var src = document.forms[0].src.value;
+	var alt = document.forms[0].alt.value;
+	var border = document.forms[0].border.value;
+	var vspace = document.forms[0].vspace.value;
+	var hspace = document.forms[0].hspace.value;
+	var width = document.forms[0].width.value;
+	var height = document.forms[0].height.value;
+	var align = document.forms[0].align.options[document.forms[0].align.selectedIndex].value;
+
+	tinyMCEPopup.restoreSelection();
+	tinyMCE.themes['advanced']._insertImage(src, alt, border, hspace, vspace, width, height, align);
+	tinyMCEPopup.close();
+}
+
+function init() {
+	tinyMCEPopup.resizeToInnerSize();
+
+	document.getElementById('srcbrowsercontainer').innerHTML = getBrowserHTML('srcbrowser','src','image','theme_advanced_image');
+
+	var formObj = document.forms[0];
+
+	for (var i=0; i<document.forms[0].align.options.length; i++) {
+		if (document.forms[0].align.options[i].value == tinyMCE.getWindowArg('align'))
+			document.forms[0].align.options.selectedIndex = i;
+	}
+
+	formObj.src.value = tinyMCE.getWindowArg('src');
+	formObj.alt.value = tinyMCE.getWindowArg('alt');
+	formObj.border.value = tinyMCE.getWindowArg('border');
+	formObj.vspace.value = tinyMCE.getWindowArg('vspace');
+	formObj.hspace.value = tinyMCE.getWindowArg('hspace');
+	formObj.width.value = tinyMCE.getWindowArg('width');
+	formObj.height.value = tinyMCE.getWindowArg('height');
+	formObj.insert.value = tinyMCE.getLang('lang_' + tinyMCE.getWindowArg('action'), 'Insert', true); 
+
+	// Handle file browser
+	if (isVisible('srcbrowser'))
+		document.getElementById('src').style.width = '180px';
+
+	// Auto select image in list
+	if (typeof(tinyMCEImageList) != "undefined" && tinyMCEImageList.length > 0) {
+		for (var i=0; i<formObj.image_list.length; i++) {
+			if (formObj.image_list.options[i].value == tinyMCE.getWindowArg('src'))
+				formObj.image_list.options[i].selected = true;
+		}
+	}
+}
+
+var preloadImg = new Image();
+
+function resetImageData() {
+	var formObj = document.forms[0];
+	formObj.width.value = formObj.height.value = "";	
+}
+
+function updateImageData() {
+	var formObj = document.forms[0];
+
+	if (formObj.width.value == "")
+		formObj.width.value = preloadImg.width;
+
+	if (formObj.height.value == "")
+		formObj.height.value = preloadImg.height;
+}
+
+function getImageData() {
+	preloadImg = new Image();
+	tinyMCE.addEvent(preloadImg, "load", updateImageData);
+	tinyMCE.addEvent(preloadImg, "error", function () {var formObj = document.forms[0];formObj.width.value = formObj.height.value = "";});
+	preloadImg.src = tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'], document.forms[0].src.value);
+}

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/jscripts/link.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/jscripts/link.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/jscripts/link.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,70 @@
+var url = tinyMCE.getParam("external_link_list_url");
+if (url != null) {
+	// Fix relative
+	if (url.charAt(0) != '/' && url.indexOf('://') == -1)
+		url = tinyMCE.documentBasePath + "/" + url;
+
+	document.write('<sc'+'ript language="javascript" type="text/javascript" src="' + url + '"></sc'+'ript>');
+}
+
+function init() {
+	tinyMCEPopup.resizeToInnerSize();
+
+	document.getElementById('hrefbrowsercontainer').innerHTML = getBrowserHTML('hrefbrowser','href','file','theme_advanced_link');
+
+	// Handle file browser
+	if (isVisible('hrefbrowser'))
+		document.getElementById('href').style.width = '180px';
+
+	var formObj = document.forms[0];
+
+	for (var i=0; i<document.forms[0].target.options.length; i++) {
+		var option = document.forms[0].target.options[i];
+
+		if (option.value == tinyMCE.getWindowArg('target'))
+			option.selected = true;
+	}
+
+	document.forms[0].href.value = tinyMCE.getWindowArg('href');
+	document.forms[0].linktitle.value = tinyMCE.getWindowArg('title');
+	document.forms[0].insert.value = tinyMCE.getLang('lang_' + tinyMCE.getWindowArg('action'), 'Insert', true); 
+
+	addClassesToList('styleSelect', 'theme_advanced_link_styles');
+	selectByValue(formObj, 'styleSelect', tinyMCE.getWindowArg('className'), true);
+
+	// Hide css select row if no CSS classes
+	if (formObj.styleSelect && formObj.styleSelect.options.length <= 1) {
+		var sr = document.getElementById('styleSelectRow');
+		sr.style.display = 'none';
+		sr.parentNode.removeChild(sr);
+	}
+
+	// Auto select link in list
+	if (typeof(tinyMCELinkList) != "undefined" && tinyMCELinkList.length > 0) {
+		var formObj = document.forms[0];
+
+		for (var i=0; i<formObj.link_list.length; i++) {
+			if (formObj.link_list.options[i].value == tinyMCE.getWindowArg('href'))
+				formObj.link_list.options[i].selected = true;
+		}
+	}
+}
+
+function insertLink() {
+	var href = document.forms[0].href.value;
+	var target = document.forms[0].target.options[document.forms[0].target.selectedIndex].value;
+	var title = document.forms[0].linktitle.value;
+	var style_class = document.forms[0].styleSelect ? document.forms[0].styleSelect.value : "";
+	var dummy;
+
+	// Make anchors absolute
+	if (href.charAt(0) == '#')
+		href = tinyMCE.settings['document_base_url'] + href;
+
+	if (target == '_self')
+		target = '';
+
+	tinyMCEPopup.restoreSelection();
+	tinyMCE.themes['advanced']._insertLink(href, target, title, dummy, style_class);
+	tinyMCEPopup.close();
+}

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/jscripts/source_editor.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/jscripts/source_editor.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/jscripts/source_editor.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,66 @@
+function saveContent() {
+	tinyMCE.setContent(document.getElementById('htmlSource').value);
+	tinyMCE.closeWindow(window);
+}
+
+// Fixes some charcode issues
+function fixContent(html) {
+/*	html = html.replace(new RegExp('<(p|hr|table|tr|td|ol|ul|object|embed|li|blockquote)', 'gi'),'\n<$1');
+	html = html.replace(new RegExp('<\/(p|ol|ul|li|table|tr|td|blockquote|object)>', 'gi'),'</$1>\n');
+	html = tinyMCE.regexpReplace(html, '<br />','<br />\n','gi');
+	html = tinyMCE.regexpReplace(html, '\n\n','\n','gi');*/
+	return html;
+}
+
+function onLoadInit() {
+	tinyMCEPopup.resizeToInnerSize();
+
+	document.forms[0].htmlSource.value = fixContent(tinyMCE.getContent(tinyMCE.getWindowArg('editor_id')));
+	resizeInputs();
+
+	if (tinyMCE.getParam("theme_advanced_source_editor_wrap", true)) {
+		setWrap('soft');
+		document.forms[0].wraped.checked = true;
+	}
+}
+
+function setWrap(val) {
+	var s = document.forms[0].htmlSource;
+
+	s.wrap = val;
+
+	if (tinyMCE.isGecko) {
+		var v = s.value;
+		var n = s.cloneNode(false);
+		n.setAttribute("wrap", val);
+		s.parentNode.replaceChild(n, s);
+		n.value = v;
+	}
+}
+
+function toggleWordWrap(elm) {
+	if (elm.checked)
+		setWrap('soft');
+	else
+		setWrap('off');
+}
+
+var wHeight=0, wWidth=0, owHeight=0, owWidth=0;
+
+function resizeInputs() {
+	if (!tinyMCE.isMSIE) {
+		 wHeight = self.innerHeight-80;
+		 wWidth = self.innerWidth-16;
+	} else {
+		 wHeight = document.body.clientHeight - 80;
+		 wWidth = document.body.clientWidth - 16;
+	}
+
+	document.forms[0].htmlSource.style.height = Math.abs(wHeight) + 'px';
+	document.forms[0].htmlSource.style.width  = Math.abs(wWidth) + 'px';
+}
+
+function renderWordWrap() {
+	if (tinyMCE.isMSIE || tinyMCE.isGecko)
+		document.write('<input type="checkbox" name="wraped" id="wraped" onclick="toggleWordWrap(this);" class="wordWrapCode" /><label for="wraped">{$lang_theme_code_wordwrap}</label>');
+}

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/langs/en.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/langs/en.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/langs/en.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,81 @@
+// UK lang variables
+
+tinyMCE.addToLang('',{
+theme_style_select : '-- Styles --',
+theme_code_desc : 'Edit HTML Source',
+theme_code_title : 'HTML Source Editor',
+theme_code_wordwrap : 'Word wrap',
+theme_sub_desc : 'Subscript',
+theme_sup_desc : 'Superscript',
+theme_hr_desc : 'Insert horizontal ruler',
+theme_removeformat_desc : 'Remove formatting',
+theme_custom1_desc : 'Your custom description here',
+insert_image_border : 'Border',
+insert_image_dimensions : 'Dimensions',
+insert_image_vspace : 'Vertical space',
+insert_image_hspace : 'Horizontal space',
+insert_image_align : 'Alignment',
+insert_image_align_default : '-- Not set --',
+insert_image_align_baseline : 'Baseline',
+insert_image_align_top : 'Top',
+insert_image_align_middle : 'Middle',
+insert_image_align_bottom : 'Bottom',
+insert_image_align_texttop : 'TextTop',
+insert_image_align_absmiddle : 'Absolute Middle',
+insert_image_align_absbottom : 'Absolute Bottom',
+insert_image_align_left : 'Left',
+insert_image_align_right : 'Right',
+theme_font_size : '-- Font size --',
+theme_fontdefault : '-- Font family --',
+theme_block : '-- Format --',
+theme_paragraph : 'Paragraph',
+theme_div : 'Div',
+theme_address : 'Address',
+theme_pre : 'Preformatted',
+theme_h1 : 'Heading 1',
+theme_h2 : 'Heading 2',
+theme_h3 : 'Heading 3',
+theme_h4 : 'Heading 4',
+theme_h5 : 'Heading 5',
+theme_h6 : 'Heading 6',
+theme_blockquote : 'Blockquote',
+theme_code : 'Code',
+theme_samp : 'Code sample',
+theme_dt : 'Definition term ',
+theme_dd : 'Definition description',
+theme_colorpicker_title : 'Select a color',
+theme_colorpicker_apply : 'Apply',
+theme_forecolor_desc : 'Select text color',
+theme_backcolor_desc : 'Select background color',
+theme_charmap_title : 'Select custom character',
+theme_charmap_desc : 'Insert custom character',
+theme_visualaid_desc : 'Toggle guidelines/invisible elements',
+insert_anchor_title : 'Insert/edit anchor',
+insert_anchor_name : 'Anchor name',
+theme_anchor_desc : 'Insert/edit anchor',
+theme_insert_link_titlefield : 'Title',
+theme_clipboard_msg : 'Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?',
+theme_path : 'Path',
+cut_desc : 'Cut',
+copy_desc : 'Copy',
+paste_desc : 'Paste',
+link_list : 'Link list',
+image_list : 'Image list',
+browse : 'Browse',
+image_props_desc : 'Image properties',
+newdocument_desc : 'New document',
+class_name : 'Class',
+newdocument : 'Are you sure you want clear all contents?',
+about_title : 'About TinyMCE',
+about : 'About',
+license : 'License',
+plugins : 'Plugins',
+plugin : 'Plugin',
+author : 'Author',
+version : 'Version',
+loaded_plugins : 'Loaded plugins',
+help : 'Help',
+not_set : '-- Not set --',
+close : 'Close',
+toolbar_focus : 'Jump to tool buttons - Alt+Q, Jump to editor - Alt-Z, Jump to element path - Alt-X'
+});

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/link.htm
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/link.htm	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/link.htm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,100 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+	<title>{$lang_insert_link_title}</title>
+	<script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
+	<script language="javascript" type="text/javascript" src="../../utils/mctabs.js"></script>
+	<script language="javascript" type="text/javascript" src="../../utils/form_utils.js"></script>
+	<script language="javascript" type="text/javascript" src="jscripts/link.js"></script>
+	<base target="_self" />
+</head>
+<body id="link" onload="tinyMCEPopup.executeOnLoad('init();');" style="display: none">
+<form onsubmit="insertLink();return false;" action="#">
+	<div class="tabs">
+		<ul>
+			<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{$lang_insert_link_title}</a></span></li>
+		</ul>
+	</div>
+
+	<div class="panel_wrapper">
+		<div id="general_panel" class="panel current">
+
+		<table border="0" cellpadding="4" cellspacing="0">
+          <tr>
+            <td nowrap="nowrap"><label for="href">{$lang_insert_link_url}</label></td>
+            <td><table border="0" cellspacing="0" cellpadding="0"> 
+				  <tr> 
+					<td><input id="href" name="href" type="text" value="" style="width: 200px" /></td> 
+					<td id="hrefbrowsercontainer">&nbsp;</td>
+				  </tr> 
+				</table></td>
+          </tr>
+		  <!-- Link list -->
+		  <script language="javascript">
+			if (typeof(tinyMCELinkList) != "undefined" && tinyMCELinkList.length > 0) {
+				var html = "";
+
+				html += '<tr><td><label for="link_list">{$lang_link_list}</label></td>';
+				html += '<td><select id="link_list" name="link_list" style="width: 200px" onchange="this.form.href.value=this.options[this.selectedIndex].value;">';
+				html += '<option value="">---</option>';
+
+				for (var i=0; i<tinyMCELinkList.length; i++)
+					html += '<option value="' + tinyMCELinkList[i][1] + '">' + tinyMCELinkList[i][0] + '</option>';
+
+				html += '</select></td></tr>';
+
+				document.write(html);
+			}
+		  </script>
+		  <!-- /Link list -->
+          <tr>
+            <td nowrap="nowrap"><label for="target">{$lang_insert_link_target}</label></td>
+            <td><select id="target" name="target" style="width: 200px">
+                <option value="_self">{$lang_insert_link_target_same}</option>
+                <option value="_blank">{$lang_insert_link_target_blank}</option>
+				<script language="javascript">
+					var html = "";
+					var targets = tinyMCE.getParam('theme_advanced_link_targets', '').split(';');
+
+					for (var i=0; i<targets.length; i++) {
+						var key, value;
+
+						if (targets[i] == "")
+							continue;
+
+						key = targets[i].split('=')[0];
+						value = targets[i].split('=')[1];
+
+						html += '<option value="' + value + '">' + key + '</option>';
+					}
+
+					document.write(html);
+				</script>
+            </select></td>
+          </tr>
+          <tr>
+            <td nowrap="nowrap"><label for="linktitle">{$lang_theme_insert_link_titlefield}</label></td>
+            <td><input id="linktitle" name="linktitle" type="text" value="" style="width: 200px"></td>
+          </tr>
+          <tr id="styleSelectRow">
+            <td><label for="styleSelect">{$lang_class_name}</label></td>
+            <td>
+			 <select id="styleSelect" name="styleSelect">
+                <option value="" selected>{$lang_theme_style_select}</option>
+             </select></td>
+          </tr>
+        </table>
+		</div>
+	</div>
+
+	<div class="mceActionPanel">
+		<div style="float: left">
+			<input type="button" id="insert" name="insert" value="{$lang_insert}" onclick="insertLink();" />
+		</div>
+
+		<div style="float: right">
+			<input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onclick="tinyMCEPopup.close();" />
+		</div>
+	</div>
+</form>
+</body>
+</html>

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/source_editor.htm
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/source_editor.htm	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/advanced/source_editor.htm	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,30 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+	<title>{$lang_theme_code_title}</title>
+	<script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
+	<script language="javascript" type="text/javascript" src="jscripts/source_editor.js"></script>
+	<base target="_self" />
+</head>
+<body onload="tinyMCEPopup.executeOnLoad('onLoadInit();');" onresize="resizeInputs();" style="display: none">
+	<form name="source" onsubmit="saveContent();" action="#">
+		<div style="float: left" class="title">{$lang_theme_code_title}</div>
+
+		<div style="float: right">
+			<script language="javascript" type="text/javascript">renderWordWrap();</script>
+		</div>
+
+		<textarea name="htmlSource" id="htmlSource" rows="15" cols="100" style="width: 100%; height: 100%; font-family: 'Courier New',Courier,mono; font-size: 12px" dir="ltr" wrap="off"></textarea>
+
+		<div class="mceActionPanel">
+			<div style="float: left">
+				<input type="button" name="insert" value="{$lang_update}" onclick="saveContent();" id="insert" />
+			</div>
+
+			<div style="float: right">
+				<input type="button" name="cancel" value="{$lang_cancel}" onclick="tinyMCEPopup.close();" id="cancel" />
+			</div>
+		</div>
+	</form>
+</body>
+</html>

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/css/editor_content.css
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/css/editor_content.css	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/css/editor_content.css	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,25 @@
+body, td, pre {
+	font-family: Verdana, Arial, Helvetica, sans-serif;
+	font-size: 10px;
+}
+
+body {
+	background-color: #FFFFFF;
+}
+
+.mceVisualAid {
+	border: 1px dashed #BBBBBB;
+}
+
+/* MSIE specific */
+
+* html body {
+	scrollbar-3dlight-color: #F0F0EE;
+	scrollbar-arrow-color: #676662;
+	scrollbar-base-color: #F0F0EE;
+	scrollbar-darkshadow-color: #DDDDDD;
+	scrollbar-face-color: #E0E0DD;
+	scrollbar-highlight-color: #F0F0EE;
+	scrollbar-shadow-color: #F0F0EE;
+	scrollbar-track-color: #F5F5F5;	
+}

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/css/editor_popup.css
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/css/editor_popup.css	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/css/editor_popup.css	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,41 @@
+body {
+	background-color: #F0F0EE;
+	font-family: Verdana, Arial, Helvetica, sans-serif;
+	font-size: 11px;
+	scrollbar-3dlight-color: #F0F0EE;
+	scrollbar-arrow-color: #676662;
+	scrollbar-base-color: #F0F0EE;
+	scrollbar-darkshadow-color: #DDDDDD;
+	scrollbar-face-color: #E0E0DD;
+	scrollbar-highlight-color: #F0F0EE;
+	scrollbar-shadow-color: #F0F0EE;
+	scrollbar-track-color: #F5F5F5;
+}
+
+td {
+	font-family: Verdana, Arial, Helvetica, sans-serif;
+	font-size: 11px;
+}
+
+input {
+	background: #FFFFFF;
+	border: 1px solid #cccccc;
+}
+
+td, input, select, textarea {
+	font-family: Verdana, Arial, Helvetica, sans-serif;
+	font-size: 10px;
+}
+
+input, select, textarea {
+	border: 1px solid #808080;
+}
+
+.input_noborder {
+	border: 0;
+}
+
+.title {
+	font-size: 12px;
+	font-weight: bold;
+}
\ No newline at end of file

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/css/editor_ui.css
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/css/editor_ui.css	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/css/editor_ui.css	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,125 @@
+.mceSeparatorLine {
+	border: 0;
+	padding: 0;
+	margin-left: 4px;
+	margin-right: 2px;
+}
+
+.mceSelectList {
+	font-family: "MS Sans Serif";
+	font-size: 7pt;
+	font-weight: normal;
+	margin-top: 2px;
+}
+
+.mceLabel, .mceLabelDisabled {
+	font-family: "MS Sans Serif";
+	font-size: 9pt;
+}
+
+.mceLabel {
+	color: #000000;
+}
+
+.mceLabelDisabled {
+	cursor: text;
+	color: #999999;
+}
+
+.mceEditor {
+	background: #F0F0EE;
+	border: 1px solid #cccccc;
+}
+
+.mceEditorArea {
+	font-family: "MS Sans Serif";
+	background: #FFFFFF;
+}
+
+.mceToolbar {
+	background: #F0F0EE;
+	border-top: 1px solid #cccccc;
+	line-height: 1px;
+	font-size: 1px;
+	padding-bottom: 1px;
+}
+
+.mceEditorIframe {
+	border: 0;
+}
+
+/* Button CSS rules */
+
+a.mceButtonDisabled img, a.mceButtonNormal img, a.mceButtonSelected img {
+	width: 20px;
+	height: 20px;
+	cursor: default;
+	margin-top: 1px;
+	margin-left: 1px;
+}
+
+a.mceButtonDisabled img {
+	border: 0 !important;
+}
+
+a.mceButtonNormal img, a.mceButtonSelected img {
+	border: 1px solid #F0F0EE !important;
+}
+
+a.mceButtonSelected img {
+	border: 1px solid #C0C0BB !important;
+}
+
+a.mceButtonNormal img:hover, a.mceButtonSelected img:hover {
+	border: 1px solid #0A246A !important;
+	cursor: default;
+	background-color: #B6BDD2;
+}
+
+a.mceButtonDisabled img {
+	-moz-opacity:0.3;
+	opacity: 0.3;
+	border: 1px solid #F0F0EE !important;
+	cursor: default;
+}
+
+a.mceTiledButton img {
+	background-image: url('../images/buttons.gif');
+	background-repeat: no-repeat;
+}
+
+/* MSIE specific rules */
+
+* html a.mceButtonNormal img, * html a.mceButtonSelected img, * html a.mceButtonDisabled img {
+	border: 0px !important;
+	margin-top: 2px;
+	margin-bottom: 1px;
+}
+
+* html a.mceButtonDisabled img {
+	filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30);
+	border: 0px !important;
+}
+
+* html a.mceButtonDisabled {
+	border: 1px solid #F0F0EE !important;
+}
+
+* html a.mceButtonNormal, * html a.mceButtonSelected {
+	border: 1px solid #F0F0EE;
+	cursor: default;
+}
+
+* html a.mceButtonSelected {
+	border: 1px solid #C0C0BB;
+}
+
+* html a.mceButtonNormal:hover, * html a.mceButtonSelected:hover {
+	border: 1px solid #0A246A;
+	cursor: default;
+	background-color: #B6BDD2;
+}
+
+* html .mceSelectList {
+	margin-top: 2px;
+}

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/editor_template.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/editor_template.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/editor_template.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,4 @@
+var TinyMCE_SimpleTheme={_buttonMap:'bold,bullist,cleanup,italic,numlist,redo,strikethrough,underline,undo',getEditorTemplate:function(){var html='';html+='<table class="mceEditor" border="0" cellpadding="0" cellspacing="0" width="{$width}" height="{$height}">';html+='<tr><td align="center">';html+='<span id="{$editor_id}">IFRAME</span>';html+='</td></tr>';html+='<tr><td class="mceToolbar" align="center" height="1">';html+=tinyMCE.getButtonHTML('bold','lang_bold_desc','{$themeurl}/images/{$lang_bold_img}','Bold');html+=tinyMCE.getButtonHTML('italic','lang_italic_desc','{$themeurl}/images/{$lang_italic_img}','Italic');html+=tinyMCE.getButtonHTML('underline','lang_underline_desc','{$themeurl}/images/{$lang_underline_img}','Underline');html+=tinyMCE.getButtonHTML('strikethrough','lang_striketrough_desc','{$themeurl}/images/strikethrough.gif','Strikethrough');html+='<img src="{$themeurl}/images/separator.gif" width="2" height="20" class="mceSeparatorLine" />';html+=tinyMCE.getButtonHTML('undo','lang_undo_desc','{$themeurl}/images/undo.gif','Undo');html+=tinyMCE.getButtonHTML('redo','lang_redo_desc','{$themeurl}/images/redo.gif','Redo');html+='<img src="{$themeurl}/images/separator.gif" width="2" height="20" class="mceSeparatorLine" />';html+=tinyMCE.getButtonHTML('cleanup','lang_cleanup_desc','{$themeurl}/images/cleanup.gif','mceCleanup')
+html+='<img src="{$themeurl}/images/separator.gif" width="2" height="20" class="mceSeparatorLine" />';html+=tinyMCE.getButtonHTML('bullist','lang_bullist_desc','{$themeurl}/images/bullist.gif','InsertUnorderedList')
+html+=tinyMCE.getButtonHTML('numlist','lang_numlist_desc','{$themeurl}/images/numlist.gif','InsertOrderedList')
+html+='</td></tr></table>';return{delta_width:0,delta_height:20,html:html};},handleNodeChange:function(editor_id,node){tinyMCE.switchClass(editor_id+'_bold','mceButtonNormal');tinyMCE.switchClass(editor_id+'_italic','mceButtonNormal');tinyMCE.switchClass(editor_id+'_underline','mceButtonNormal');tinyMCE.switchClass(editor_id+'_strikethrough','mceButtonNormal');tinyMCE.switchClass(editor_id+'_bullist','mceButtonNormal');tinyMCE.switchClass(editor_id+'_numlist','mceButtonNormal');do{switch(node.nodeName.toLowerCase()){case"b":case"strong":tinyMCE.switchClass(editor_id+'_bold','mceButtonSelected');break;case"i":case"em":tinyMCE.switchClass(editor_id+'_italic','mceButtonSelected');break;case"u":tinyMCE.switchClass(editor_id+'_underline','mceButtonSelected');break;case"strike":tinyMCE.switchClass(editor_id+'_strikethrough','mceButtonSelected');break;case"ul":tinyMCE.switchClass(editor_id+'_bullist','mceButtonSelected');break;case"ol":tinyMCE.switchClass(editor_id+'_numlist','mceButtonSelected');break;}}while((node=node.parentNode)!=null);}};tinyMCE.addTheme("simple",TinyMCE_SimpleTheme);tinyMCE.addButtonMap(TinyMCE_SimpleTheme._buttonMap);
\ No newline at end of file

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/editor_template_src.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/editor_template_src.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/editor_template_src.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,86 @@
+/**
+ * $RCSfile: editor_template_src.js,v $
+ * $Revision: 1.9 $
+ * $Date: 2006/04/18 13:32:53 $
+ *
+ * @author Moxiecode
+ * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
+ */
+
+var TinyMCE_SimpleTheme = {
+	// List of button ids in tile map
+	_buttonMap : 'bold,bullist,cleanup,italic,numlist,redo,strikethrough,underline,undo',
+
+	getEditorTemplate : function() {
+		var html = '';
+
+		html += '<table class="mceEditor" border="0" cellpadding="0" cellspacing="0" width="{$width}" height="{$height}">';
+		html += '<tr><td align="center">';
+		html += '<span id="{$editor_id}">IFRAME</span>';
+		html += '</td></tr>';
+		html += '<tr><td class="mceToolbar" align="center" height="1">';
+		html += tinyMCE.getButtonHTML('bold', 'lang_bold_desc', '{$themeurl}/images/{$lang_bold_img}', 'Bold');
+		html += tinyMCE.getButtonHTML('italic', 'lang_italic_desc', '{$themeurl}/images/{$lang_italic_img}', 'Italic');
+		html += tinyMCE.getButtonHTML('underline', 'lang_underline_desc', '{$themeurl}/images/{$lang_underline_img}', 'Underline');
+		html += tinyMCE.getButtonHTML('strikethrough', 'lang_striketrough_desc', '{$themeurl}/images/strikethrough.gif', 'Strikethrough');
+		html += '<img src="{$themeurl}/images/separator.gif" width="2" height="20" class="mceSeparatorLine" />';
+		html += tinyMCE.getButtonHTML('undo', 'lang_undo_desc', '{$themeurl}/images/undo.gif', 'Undo');
+		html += tinyMCE.getButtonHTML('redo', 'lang_redo_desc', '{$themeurl}/images/redo.gif', 'Redo');
+		html += '<img src="{$themeurl}/images/separator.gif" width="2" height="20" class="mceSeparatorLine" />';
+		html += tinyMCE.getButtonHTML('cleanup', 'lang_cleanup_desc', '{$themeurl}/images/cleanup.gif', 'mceCleanup')
+		html += '<img src="{$themeurl}/images/separator.gif" width="2" height="20" class="mceSeparatorLine" />';
+		html += tinyMCE.getButtonHTML('bullist', 'lang_bullist_desc', '{$themeurl}/images/bullist.gif', 'InsertUnorderedList')
+		html += tinyMCE.getButtonHTML('numlist', 'lang_numlist_desc', '{$themeurl}/images/numlist.gif', 'InsertOrderedList')
+		html += '</td></tr></table>';
+
+		return {
+			delta_width : 0,
+			delta_height : 20,
+			html : html
+		};
+	},
+
+	handleNodeChange : function(editor_id, node) {
+		// Reset old states
+		tinyMCE.switchClass(editor_id + '_bold', 'mceButtonNormal');
+		tinyMCE.switchClass(editor_id + '_italic', 'mceButtonNormal');
+		tinyMCE.switchClass(editor_id + '_underline', 'mceButtonNormal');
+		tinyMCE.switchClass(editor_id + '_strikethrough', 'mceButtonNormal');
+		tinyMCE.switchClass(editor_id + '_bullist', 'mceButtonNormal');
+		tinyMCE.switchClass(editor_id + '_numlist', 'mceButtonNormal');
+
+		// Handle elements
+		do {
+			switch (node.nodeName.toLowerCase()) {
+				case "b":
+				case "strong":
+					tinyMCE.switchClass(editor_id + '_bold', 'mceButtonSelected');
+				break;
+
+				case "i":
+				case "em":
+					tinyMCE.switchClass(editor_id + '_italic', 'mceButtonSelected');
+				break;
+
+				case "u":
+					tinyMCE.switchClass(editor_id + '_underline', 'mceButtonSelected');
+				break;
+
+				case "strike":
+					tinyMCE.switchClass(editor_id + '_strikethrough', 'mceButtonSelected');
+				break;
+				
+				case "ul":
+					tinyMCE.switchClass(editor_id + '_bullist', 'mceButtonSelected');
+				break;
+
+				case "ol":
+					tinyMCE.switchClass(editor_id + '_numlist', 'mceButtonSelected');
+				break;
+			}
+		} while ((node = node.parentNode) != null);
+	}
+};
+
+tinyMCE.addTheme("simple", TinyMCE_SimpleTheme);
+tinyMCE.addButtonMap(TinyMCE_SimpleTheme._buttonMap);

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/bold.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/bold.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/bold_de_se.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/bold_de_se.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/bold_fr.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/bold_fr.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/bold_ru.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/bold_ru.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/bold_tw.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/bold_tw.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/bullist.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/bullist.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/buttons.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/buttons.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/cleanup.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/cleanup.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/italic.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/italic.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/italic_de_se.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/italic_de_se.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/italic_ru.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/italic_ru.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/italic_tw.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/italic_tw.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/numlist.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/numlist.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/redo.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/redo.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/separator.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/separator.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/spacer.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/spacer.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/strikethrough.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/strikethrough.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/underline.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/underline.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/underline_fr.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/underline_fr.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/underline_ru.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/underline_ru.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/underline_tw.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/underline_tw.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/undo.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/javascript/tiny_mce/themes/simple/images/undo.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/tiny_mce.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/tiny_mce.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/tiny_mce.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1 @@
+function TinyMCE_Engine(){this.majorVersion="2";this.minorVersion="0.6.1";this.releaseDate="2006-05-04";this.instances=new Array();this.switchClassCache=new Array();this.windowArgs=new Array();this.loadedFiles=new Array();this.pendingFiles=new Array();this.loadingIndex=0;this.configs=new Array();this.currentConfig=0;this.eventHandlers=new Array();var ua=navigator.userAgent;this.isMSIE=(navigator.appName=="Microsoft Internet Explorer");this.isMSIE5=this.isMSIE&&(ua.indexOf('MSIE 5')!=-1);this.isMSIE5_0=this.isMSIE&&(ua.indexOf('MSIE 5.0')!=-1);this.isGecko=ua.indexOf('Gecko')!=-1;this.isSafari=ua.indexOf('Safari')!=-1;this.isOpera=ua.indexOf('Opera')!=-1;this.isMac=ua.indexOf('Mac')!=-1;this.isNS7=ua.indexOf('Netscape/7')!=-1;this.isNS71=ua.indexOf('Netscape/7.1')!=-1;this.dialogCounter=0;this.plugins=new Array();this.themes=new Array();this.menus=new Array();this.loadedPlugins=new Array();this.buttonMap=new Array();this.isLoaded=false;if(this.isOpera){this.isMSIE=true;this.isGecko=false;this.isSafari=false;}this.idCounter=0;};TinyMCE_Engine.prototype={init:function(settings){var theme;this.settings=settings;if(typeof(document.execCommand)=='undefined')return;if(!tinyMCE.baseURL){var elements=document.getElementsByTagName('script');for(var i=0;i<elements.length;i++){if(elements[i].src&&(elements[i].src.indexOf("tiny_mce.js")!=-1||elements[i].src.indexOf("tiny_mce_dev.js")!=-1||elements[i].src.indexOf("tiny_mce_src.js")!=-1||elements[i].src.indexOf("tiny_mce_gzip")!=-1)){var src=elements[i].src;tinyMCE.srcMode=(src.indexOf('_src')!=-1||src.indexOf('_dev')!=-1)?'_src':'';tinyMCE.gzipMode=src.indexOf('_gzip')!=-1;src=src.substring(0,src.lastIndexOf('/'));if(settings.exec_mode=="src"||settings.exec_mode=="normal")tinyMCE.srcMode=settings.exec_mode=="src"?'_src':'';tinyMCE.baseURL=src;break;}}}this.documentBasePath=document.location.href;if(this.documentBasePath.indexOf('?')!=-1)this.documentBasePath=this.documentBasePath.substring(0,this.documentBasePath.indexOf('?'));this.documentURL=this.documentBasePath;this.documentBasePath=this.documentBasePath.substring(0,this.documentBasePath.lastIndexOf('/'));if(tinyMCE.baseURL.indexOf('://')==-1&&tinyMCE.baseURL.charAt(0)!='/'){tinyMCE.baseURL=this.documentBasePath+"/"+tinyMCE.baseURL;}this._def("mode","none");this._def("theme","advanced");this._def("plugins","",true);this._def("language","en");this._def("docs_language",this.settings['language']);this._def("elements","");this._def("textarea_trigger","mce_editable");this._def("editor_selector","");this._def("editor_deselector","mceNoEditor");this._def("valid_elements","+a[id|style|rel|rev|charset|hreflang|dir|lang|tabindex|accesskey|type|name|href|target|title|class|onfocus|onblur|onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup],-strong/-b[class|style],-em/-i[class|style],-strike[class|style],-u[class|style],#p[id|style|dir|class|align],-ol[class|style],-ul[class|style],-li[class|style],br,img[id|dir|lang|longdesc|usemap|style|class|src|onmouseover|onmouseout|border|alt=|title|hspace|vspace|width|height|align],-sub[style|class],-sup[style|class],-blockquote[dir|style],-table[border=0|cellspacing|cellpadding|width|height|class|align|summary|style|dir|id|lang|bgcolor|background|bordercolor],-tr[id|lang|dir|class|rowspan|width|height|align|valign|style|bgcolor|background|bordercolor],tbody[id|class],thead[id|class],tfoot[id|class],-td[id|lang|dir|class|colspan|rowspan|width|height|align|valign|style|bgcolor|background|bordercolor|scope],-th[id|lang|dir|class|colspan|rowspan|width|height|align|valign|style|scope],caption[id|lang|dir|class|style],-div[id|dir|class|align|style],-span[style|class|align],-pre[class|align|style],address[class|align|style],-h1[id|style|dir|class|align],-h2[id|style|dir|class|align],-h3[id|style|dir|class|align],-h4[id|style|dir|class|align],-h5[id|style|dir|class|align],-h6[id|style|dir|class|align],hr[class|style],-font[face|size|style|id|class|dir|color],dd[id|class|title|style|dir|lang],dl[id|class|title|style|dir|lang],dt[id|class|title|style|dir|lang]");this._def("extended_valid_elements","");this._def("invalid_elements","");this._def("encoding","");this._def("urlconverter_callback",tinyMCE.getParam("urlconvertor_callback","TinyMCE_Engine.prototype.convertURL"));this._def("save_callback","");this._def("debug",false);this._def("force_br_newlines",false);this._def("force_p_newlines",true);this._def("add_form_submit_trigger",true);this._def("relative_urls",true);this._def("remove_script_host",true);this._def("focus_alert",true);this._def("document_base_url",this.documentURL);this._def("visual",true);this._def("visual_table_class","mceVisualAid");this._def("setupcontent_callback","");this._def("fix_content_duplication",true);this._def("custom_undo_redo",true);this._def("custom_undo_redo_levels",-1);this._def("custom_undo_redo_keyboard_shortcuts",true);this._def("custom_undo_redo_restore_selection",true);this._def("verify_html",true);this._def("apply_source_formatting",false);this._def("directionality","ltr");this._def("cleanup_on_startup",false);this._def("inline_styles",false);this._def("convert_newlines_to_brs",false);this._def("auto_reset_designmode",true);this._def("entities","39,#39,160,nbsp,161,iexcl,162,cent,163,pound,164,curren,165,yen,166,brvbar,167,sect,168,uml,169,copy,170,ordf,171,laquo,172,not,173,shy,174,reg,175,macr,176,deg,177,plusmn,178,sup2,179,sup3,180,acute,181,micro,182,para,183,middot,184,cedil,185,sup1,186,ordm,187,raquo,188,frac14,189,frac12,190,frac34,191,iquest,192,Agrave,193,Aacute,194,Acirc,195,Atilde,196,Auml,197,Aring,198,AElig,199,Ccedil,200,Egrave,201,Eacute,202,Ecirc,203,Euml,204,Igrave,205,Iacute,206,Icirc,207,Iuml,208,ETH,209,Ntilde,210,Ograve,211,Oacute,212,Ocirc,213,Otilde,214,Ouml,215,times,216,Oslash,217,Ugrave,218,Uacute,219,Ucirc,220,Uuml,221,Yacute,222,THORN,223,szlig,224,agrave,225,aacute,226,acirc,227,atilde,228,auml,229,aring,230,aelig,231,ccedil,232,egrave,233,eacute,234,ecirc,235,euml,236,igrave,237,iacute,238,icirc,239,iuml,240,eth,241,ntilde,242,ograve,243,oacute,244,ocirc,245,otilde,246,ouml,247,divide,248,oslash,249,ugrave,250,uacute,251,ucirc,252,uuml,253,yacute,254,thorn,255,yuml,402,fnof,913,Alpha,914,Beta,915,Gamma,916,Delta,917,Epsilon,918,Zeta,919,Eta,920,Theta,921,Iota,922,Kappa,923,Lambda,924,Mu,925,Nu,926,Xi,927,Omicron,928,Pi,929,Rho,931,Sigma,932,Tau,933,Upsilon,934,Phi,935,Chi,936,Psi,937,Omega,945,alpha,946,beta,947,gamma,948,delta,949,epsilon,950,zeta,951,eta,952,theta,953,iota,954,kappa,955,lambda,956,mu,957,nu,958,xi,959,omicron,960,pi,961,rho,962,sigmaf,963,sigma,964,tau,965,upsilon,966,phi,967,chi,968,psi,969,omega,977,thetasym,978,upsih,982,piv,8226,bull,8230,hellip,8242,prime,8243,Prime,8254,oline,8260,frasl,8472,weierp,8465,image,8476,real,8482,trade,8501,alefsym,8592,larr,8593,uarr,8594,rarr,8595,darr,8596,harr,8629,crarr,8656,lArr,8657,uArr,8658,rArr,8659,dArr,8660,hArr,8704,forall,8706,part,8707,exist,8709,empty,8711,nabla,8712,isin,8713,notin,8715,ni,8719,prod,8721,sum,8722,minus,8727,lowast,8730,radic,8733,prop,8734,infin,8736,ang,8743,and,8744,or,8745,cap,8746,cup,8747,int,8756,there4,8764,sim,8773,cong,8776,asymp,8800,ne,8801,equiv,8804,le,8805,ge,8834,sub,8835,sup,8836,nsub,8838,sube,8839,supe,8853,oplus,8855,otimes,8869,perp,8901,sdot,8968,lceil,8969,rceil,8970,lfloor,8971,rfloor,9001,lang,9002,rang,9674,loz,9824,spades,9827,clubs,9829,hearts,9830,diams,34,quot,38,amp,60,lt,62,gt,338,OElig,339,oelig,352,Scaron,353,scaron,376,Yuml,710,circ,732,tilde,8194,ensp,8195,emsp,8201,thinsp,8204,zwnj,8205,zwj,8206,lrm,8207,rlm,8211,ndash,8212,mdash,8216,lsquo,8217,rsquo,8218,sbquo,8220,ldquo,8221,rdquo,8222,bdquo,8224,dagger,8225,Dagger,8240,permil,8249,lsaquo,8250,rsaquo,8364,euro",true);this._def("entity_encoding","named");this._def("cleanup_callback","");this._def("add_unload_trigger",true);this._def("ask",false);this._def("nowrap",false);this._def("auto_resize",false);this._def("auto_focus",false);this._def("cleanup",true);this._def("remove_linebreaks",true);this._def("button_tile_map",false);this._def("submit_patch",true);this._def("browsers","msie,safari,gecko,opera",true);this._def("dialog_type","window");this._def("accessibility_warnings",true);this._def("accessibility_focus",true);this._def("merge_styles_invalid_parents","");this._def("force_hex_style_colors",true);this._def("trim_span_elements",true);this._def("convert_fonts_to_spans",false);this._def("doctype",'<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">');this._def("font_size_classes",'');this._def("font_size_style_values",'xx-small,x-small,small,medium,large,x-large,xx-large',true);this._def("event_elements",'a,img',true);this._def("convert_urls",true);this._def("table_inline_editing",false);this._def("object_resizing",true);this._def("custom_shortcuts",true);this._def("convert_on_click",false);this._def("content_css",'');this._def("fix_list_elements",false);this._def("fix_table_elements",false);this._def("strict_loading_mode",document.contentType=='application/xhtml+xml');this._def("hidden_tab_class",'');this._def("display_tab_class",'');if(this.isMSIE&&!this.isOpera)this.settings.strict_loading_mode=false;if(this.isMSIE&&this.settings['browsers'].indexOf('msie')==-1)return;if(this.isGecko&&this.settings['browsers'].indexOf('gecko')==-1)return;if(this.isSafari&&this.settings['browsers'].indexOf('safari')==-1)return;if(this.isOpera&&this.settings['browsers'].indexOf('opera')==-1)return;var baseHREF=tinyMCE.settings['document_base_url'];var h=document.location.href;var p=h.indexOf('://');if(p>0&&document.location.protocol!="file:"){p=h.indexOf('/',p+3);h=h.substring(0,p);if(baseHREF.indexOf('://')==-1)baseHREF=h+baseHREF;tinyMCE.settings['document_base_url']=baseHREF;tinyMCE.settings['document_base_prefix']=h;}if(baseHREF.indexOf('?')!=-1)baseHREF=baseHREF.substring(0,baseHREF.indexOf('?'));this.settings['base_href']=baseHREF.substring(0,baseHREF.lastIndexOf('/'))+"/";theme=this.settings['theme'];this.blockRegExp=new RegExp("^(h[1-6]|p|div|address|pre|form|table|li|ol|ul|td|blockquote|center|dl|dt|dd|dir|fieldset|form|noscript|noframes|menu|isindex|samp)$","i");this.posKeyCodes=new Array(13,45,36,35,33,34,37,38,39,40);this.uniqueURL='javascript:TINYMCE_UNIQUEURL();';this.uniqueTag='<div id="mceTMPElement" style="display: none">TMP</div>';this.callbacks=new Array('onInit','getInfo','getEditorTemplate','setupContent','onChange','onPageLoad','handleNodeChange','initInstance','execCommand','getControlHTML','handleEvent','cleanup');this.settings['theme_href']=tinyMCE.baseURL+"/themes/"+theme;if(!tinyMCE.isMSIE)this.settings['force_br_newlines']=false;if(tinyMCE.getParam("popups_css",false)){var cssPath=tinyMCE.getParam("popups_css","");if(cssPath.indexOf('://')==-1&&cssPath.charAt(0)!='/')this.settings['popups_css']=this.documentBasePath+"/"+cssPath;else this.settings['popups_css']=cssPath;}else this.settings['popups_css']=tinyMCE.baseURL+"/themes/"+theme+"/css/editor_popup.css";if(tinyMCE.getParam("editor_css",false)){var cssPath=tinyMCE.getParam("editor_css","");if(cssPath.indexOf('://')==-1&&cssPath.charAt(0)!='/')this.settings['editor_css']=this.documentBasePath+"/"+cssPath;else this.settings['editor_css']=cssPath;}else this.settings['editor_css']=tinyMCE.baseURL+"/themes/"+theme+"/css/editor_ui.css";if(tinyMCE.settings['debug']){var msg="Debug: \n";msg+="baseURL: "+this.baseURL+"\n";msg+="documentBasePath: "+this.documentBasePath+"\n";msg+="content_css: "+this.settings['content_css']+"\n";msg+="popups_css: "+this.settings['popups_css']+"\n";msg+="editor_css: "+this.settings['editor_css']+"\n";alert(msg);}if(this.configs.length==0){if(this.isSafari&&this.getParam('safari_warning',false))alert("Safari support is very limited and should be considered experimental.\nSo there is no need to even submit bugreports on this early version.\nYou can disable this message by setting: safari_warning option to false");if(typeof(TinyMCECompressed)=="undefined"){tinyMCE.addEvent(window,"DOMContentLoaded",TinyMCE_Engine.prototype.onLoad);if(tinyMCE.isMSIE&&!tinyMCE.isOpera){if(document.body)tinyMCE.addEvent(document.body,"readystatechange",TinyMCE_Engine.prototype.onLoad);else tinyMCE.addEvent(document,"readystatechange",TinyMCE_Engine.prototype.onLoad);}tinyMCE.addEvent(window,"load",TinyMCE_Engine.prototype.onLoad);tinyMCE._addUnloadEvents();}}this.loadScript(tinyMCE.baseURL+'/themes/'+this.settings['theme']+'/editor_template'+tinyMCE.srcMode+'.js');this.loadScript(tinyMCE.baseURL+'/langs/'+this.settings['language']+'.js');this.loadCSS(this.settings['editor_css']);var p=tinyMCE.getParam('plugins','',true,',');if(p.length>0){for(var i=0;i<p.length;i++){if(p[i].charAt(0)!='-')this.loadScript(tinyMCE.baseURL+'/plugins/'+p[i]+'/editor_plugin'+tinyMCE.srcMode+'.js');}}settings['cleanup_entities']=new Array();var entities=tinyMCE.getParam('entities','',true,',');for(var i=0;i<entities.length;i+=2)settings['cleanup_entities']['c'+entities[i]]=entities[i+1];settings['index']=this.configs.length;this.configs[this.configs.length]=settings;this.loadNextScript();},_addUnloadEvents:function(){if(tinyMCE.isMSIE){if(tinyMCE.settings['add_unload_trigger']){tinyMCE.addEvent(window,"unload",TinyMCE_Engine.prototype.unloadHandler);tinyMCE.addEvent(window.document,"beforeunload",TinyMCE_Engine.prototype.unloadHandler);}}else{if(tinyMCE.settings['add_unload_trigger'])tinyMCE.addEvent(window,"unload",function(){tinyMCE.triggerSave(true,true);});}},_def:function(key,def_val,t){var v=tinyMCE.getParam(key,def_val);v=t?v.replace(/\s+/g,""):v;this.settings[key]=v;},hasPlugin:function(n){return typeof(this.plugins[n])!="undefined"&&this.plugins[n]!=null;},addPlugin:function(n,p){var op=this.plugins[n];p.baseURL=op?op.baseURL:tinyMCE.baseURL+"/plugins/"+n;this.plugins[n]=p;this.loadNextScript();},setPluginBaseURL:function(n,u){var op=this.plugins[n];if(op)op.baseURL=u;else this.plugins[n]={baseURL:u};},loadPlugin:function(n,u){u=u.indexOf('.js')!=-1?u.substring(0,u.lastIndexOf('/')):u;u=u.charAt(u.length-1)=='/'?u.substring(0,u.length-1):u;this.plugins[n]={baseURL:u};this.loadScript(u+"/editor_plugin"+(tinyMCE.srcMode?'_src':'')+".js");},hasTheme:function(n){return typeof(this.themes[n])!="undefined"&&this.themes[n]!=null;},addTheme:function(n,t){this.themes[n]=t;this.loadNextScript();},addMenu:function(n,m){this.menus[n]=m;},hasMenu:function(n){return typeof(this.plugins[n])!="undefined"&&this.plugins[n]!=null;},loadScript:function(url){var i;for(i=0;i<this.loadedFiles.length;i++){if(this.loadedFiles[i]==url)return;}if(tinyMCE.settings.strict_loading_mode)this.pendingFiles[this.pendingFiles.length]=url;else document.write('<sc'+'ript language="javascript" type="text/javascript" src="'+url+'"></script>');this.loadedFiles[this.loadedFiles.length]=url;},loadNextScript:function(){var d=document,se;if(!tinyMCE.settings.strict_loading_mode)return;if(this.loadingIndex<this.pendingFiles.length){se=d.createElementNS('http://www.w3.org/1999/xhtml','script');se.setAttribute('language','javascript');se.setAttribute('type','text/javascript');se.setAttribute('src',this.pendingFiles[this.loadingIndex++]);d.getElementsByTagName("head")[0].appendChild(se);}else this.loadingIndex=-1;},loadCSS:function(url){var ar=url.replace(/\s+/,'').split(',');var lflen=0,csslen=0;var skip=false;var x=0,i=0,nl,le;for(x=0,csslen=ar.length;x<csslen;x++){ignore_css=false;if(ar[x]!=null&&ar[x]!='null'&&ar[x].length>0){for(i=0,lflen=this.loadedFiles.length;i<lflen;i++){if(this.loadedFiles[i]==ar[x]){skip=true;break;}}if(!skip){if(tinyMCE.settings.strict_loading_mode){nl=document.getElementsByTagName("head");le=document.createElement('link');le.setAttribute('href',ar[x]);le.setAttribute('rel','stylesheet');le.setAttribute('type','text/css');nl[0].appendChild(le);}else document.write('<link href="'+ar[x]+'" rel="stylesheet" type="text/css" />');this.loadedFiles[this.loadedFiles.length]=ar[x];}}}},importCSS:function(doc,css){var css_ary=css.replace(/\s+/,'').split(',');var csslen,elm,headArr,x,css_file;for(x=0,csslen=css_ary.length;x<csslen;x++){css_file=css_ary[x];if(css_file!=null&&css_file!='null'&&css_file.length>0){if(css_file.indexOf('://')==-1&&css_file.charAt(0)!='/')css_file=this.documentBasePath+"/"+css_file;if(typeof(doc.createStyleSheet)=="undefined"){elm=doc.createElement("link");elm.rel="stylesheet";elm.href=css_file;if((headArr=doc.getElementsByTagName("head"))!=null&&headArr.length>0)headArr[0].appendChild(elm);}else doc.createStyleSheet(css_file);}}},confirmAdd:function(e,settings){var elm=tinyMCE.isMSIE?event.srcElement:e.target;var elementId=elm.name?elm.name:elm.id;tinyMCE.settings=settings;if(tinyMCE.settings['convert_on_click']||(!elm.getAttribute('mce_noask')&&confirm(tinyMCELang['lang_edit_confirm'])))tinyMCE.addMCEControl(elm,elementId);elm.setAttribute('mce_noask','true');},updateContent:function(form_element_name){var formElement=document.getElementById(form_element_name);for(var n in tinyMCE.instances){var inst=tinyMCE.instances[n];if(!tinyMCE.isInstance(inst))continue;inst.switchSettings();if(inst.formElement==formElement){var doc=inst.getDoc();tinyMCE._setHTML(doc,inst.formElement.value);if(!tinyMCE.isMSIE)doc.body.innerHTML=tinyMCE._cleanupHTML(inst,doc,this.settings,doc.body,inst.visualAid);}}},addMCEControl:function(replace_element,form_element_name,target_document){var id="mce_editor_"+tinyMCE.idCounter++;var inst=new TinyMCE_Control(tinyMCE.settings);inst.editorId=id;this.instances[id]=inst;inst._onAdd(replace_element,form_element_name,target_document);},removeMCEControl:function(editor_id){var inst=tinyMCE.getInstanceById(editor_id);if(inst){inst.switchSettings();editor_id=inst.editorId;var html=tinyMCE.getContent(editor_id);var tmpInstances=new Array();for(var instanceName in tinyMCE.instances){var instance=tinyMCE.instances[instanceName];if(!tinyMCE.isInstance(instance))continue;if(instanceName!=editor_id)tmpInstances[instanceName]=instance;}tinyMCE.instances=tmpInstances;tinyMCE.selectedElement=null;tinyMCE.selectedInstance=null;var replaceElement=document.getElementById(editor_id+"_parent");var oldTargetElement=inst.oldTargetElement;var targetName=oldTargetElement.nodeName.toLowerCase();if(targetName=="textarea"||targetName=="input"){replaceElement.parentNode.removeChild(replaceElement);oldTargetElement.style.display="inline";oldTargetElement.value=html;}else{oldTargetElement.innerHTML=html;oldTargetElement.style.display='block';replaceElement.parentNode.insertBefore(oldTargetElement,replaceElement);replaceElement.parentNode.removeChild(replaceElement);}}},triggerSave:function(skip_cleanup,skip_callback){var inst,n;if(typeof(skip_cleanup)=="undefined")skip_cleanup=false;if(typeof(skip_callback)=="undefined")skip_callback=false;for(n in tinyMCE.instances){inst=tinyMCE.instances[n];if(!tinyMCE.isInstance(inst))continue;inst.triggerSave(skip_cleanup,skip_callback);}},resetForm:function(form_index){var i,inst,n,formObj=document.forms[form_index];for(n in tinyMCE.instances){inst=tinyMCE.instances[n];if(!tinyMCE.isInstance(inst))continue;inst.switchSettings();for(i=0;i<formObj.elements.length;i++){if(inst.formTargetElementId==formObj.elements[i].name)inst.getBody().innerHTML=inst.startContent;}}},execInstanceCommand:function(editor_id,command,user_interface,value,focus){var inst=tinyMCE.getInstanceById(editor_id);if(inst){if(typeof(focus)=="undefined")focus=true;if(focus)inst.contentWindow.focus();inst.autoResetDesignMode();this.selectedElement=inst.getFocusElement();this.selectedInstance=inst;tinyMCE.execCommand(command,user_interface,value);if(tinyMCE.isMSIE&&window.event!=null)tinyMCE.cancelEvent(window.event);}},execCommand:function(command,user_interface,value){user_interface=user_interface?user_interface:false;value=value?value:null;if(tinyMCE.selectedInstance)tinyMCE.selectedInstance.switchSettings();switch(command){case'mceHelp':tinyMCE.openWindow({file:'about.htm',width:480,height:380},{tinymce_version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion,tinymce_releasedate:tinyMCE.releaseDate,inline:"yes"});return;case'mceFocus':var inst=tinyMCE.getInstanceById(value);if(inst)inst.contentWindow.focus();return;case"mceAddControl":case"mceAddEditor":tinyMCE.addMCEControl(tinyMCE._getElementById(value),value);return;case"mceAddFrameControl":tinyMCE.addMCEControl(tinyMCE._getElementById(value['element'],value['document']),value['element'],value['document']);return;case"mceRemoveControl":case"mceRemoveEditor":tinyMCE.removeMCEControl(value);return;case"mceResetDesignMode":if(!tinyMCE.isMSIE){for(var n in tinyMCE.instances){if(!tinyMCE.isInstance(tinyMCE.instances[n]))continue;try{tinyMCE.instances[n].getDoc().designMode="on";}catch(e){}}}return;}if(this.selectedInstance){this.selectedInstance.execCommand(command,user_interface,value);}else if(tinyMCE.settings['focus_alert'])alert(tinyMCELang['lang_focus_alert']);},_createIFrame:function(replace_element,doc,win){var iframe,id=replace_element.getAttribute("id");var aw,ah;if(typeof(doc)=="undefined")doc=document;if(typeof(win)=="undefined")win=window;iframe=doc.createElement("iframe");aw=""+tinyMCE.settings['area_width'];ah=""+tinyMCE.settings['area_height'];if(aw.indexOf('%')==-1){aw=parseInt(aw);aw=aw<0?300:aw;aw=aw+"px";}if(ah.indexOf('%')==-1){ah=parseInt(ah);ah=ah<0?240:ah;ah=ah+"px";}iframe.setAttribute("id",id);iframe.setAttribute("class","mceEditorIframe");iframe.setAttribute("border","0");iframe.setAttribute("frameBorder","0");iframe.setAttribute("marginWidth","0");iframe.setAttribute("marginHeight","0");iframe.setAttribute("leftMargin","0");iframe.setAttribute("topMargin","0");iframe.setAttribute("width",aw);iframe.setAttribute("height",ah);iframe.setAttribute("allowtransparency","true");iframe.className='mceEditorIframe';if(tinyMCE.settings["auto_resize"])iframe.setAttribute("scrolling","no");if(tinyMCE.isMSIE&&!tinyMCE.isOpera)iframe.setAttribute("src",this.settings['default_document']);iframe.style.width=aw;iframe.style.height=ah;if(tinyMCE.settings.strict_loading_mode)iframe.style.marginBottom='-5px';if(tinyMCE.isMSIE&&!tinyMCE.isOpera)replace_element.outerHTML=iframe.outerHTML;else replace_element.parentNode.replaceChild(iframe,replace_element);if(tinyMCE.isMSIE&&!tinyMCE.isOpera)return win.frames[id];else return iframe;},setupContent:function(editor_id){var inst=tinyMCE.instances[editor_id];var doc=inst.getDoc();var head=doc.getElementsByTagName('head').item(0);var content=inst.startContent;if(tinyMCE.settings.strict_loading_mode){content=content.replace(/&lt;/g,'<');content=content.replace(/&gt;/g,'>');content=content.replace(/&quot;/g,'"');content=content.replace(/&amp;/g,'&');}inst.switchSettings();if(!tinyMCE.isMSIE&&tinyMCE.getParam("setupcontent_reload",false)&&doc.title!="blank_page"){try{doc.location.href=tinyMCE.baseURL+"/blank.htm";}catch(ex){}window.setTimeout("tinyMCE.setupContent('"+editor_id+"');",1000);return;}if(!head){window.setTimeout("tinyMCE.setupContent('"+editor_id+"');",10);return;}tinyMCE.importCSS(inst.getDoc(),tinyMCE.baseURL+"/themes/"+inst.settings['theme']+"/css/editor_content.css");tinyMCE.importCSS(inst.getDoc(),inst.settings['content_css']);tinyMCE.dispatchCallback(inst,'init_instance_callback','initInstance',inst);if(tinyMCE.getParam('custom_undo_redo_keyboard_shortcuts')){inst.addShortcut('ctrl','z','lang_undo_desc','Undo');inst.addShortcut('ctrl','y','lang_redo_desc','Redo');}if(tinyMCE.isGecko){inst.addShortcut('ctrl','b','lang_bold_desc','Bold');inst.addShortcut('ctrl','i','lang_italic_desc','Italic');inst.addShortcut('ctrl','u','lang_underline_desc','Underline');}if(tinyMCE.getParam("convert_fonts_to_spans"))inst.getDoc().body.setAttribute('id','mceSpanFonts');if(tinyMCE.settings['nowrap'])doc.body.style.whiteSpace="nowrap";doc.body.dir=this.settings['directionality'];doc.editorId=editor_id;if(!tinyMCE.isMSIE)doc.documentElement.editorId=editor_id;inst.setBaseHREF(tinyMCE.settings['base_href']);if(tinyMCE.settings['convert_newlines_to_brs']){content=tinyMCE.regexpReplace(content,"\r\n","<br />","gi");content=tinyMCE.regexpReplace(content,"\r","<br />","gi");content=tinyMCE.regexpReplace(content,"\n","<br />","gi");}content=tinyMCE.storeAwayURLs(content);content=tinyMCE._customCleanup(inst,"insert_to_editor",content);if(tinyMCE.isMSIE){window.setInterval('try{tinyMCE.getCSSClasses(tinyMCE.instances["'+editor_id+'"].getDoc(), "'+editor_id+'");}catch(e){}',500);if(tinyMCE.settings["force_br_newlines"])doc.styleSheets[0].addRule("p","margin: 0;");var body=inst.getBody();body.editorId=editor_id;}content=tinyMCE.cleanupHTMLCode(content);if(!tinyMCE.isMSIE){var contentElement=inst.getDoc().createElement("body");var doc=inst.getDoc();contentElement.innerHTML=content;if(tinyMCE.isGecko&&tinyMCE.settings['remove_lt_gt'])content=content.replace(new RegExp('&lt;&gt;','g'),"");if(tinyMCE.settings['cleanup_on_startup'])tinyMCE.setInnerHTML(inst.getBody(),tinyMCE._cleanupHTML(inst,doc,this.settings,contentElement));else{content=tinyMCE.regexpReplace(content,"<strong","<b","gi");content=tinyMCE.regexpReplace(content,"<em(/?)>","<i$1>","gi");content=tinyMCE.regexpReplace(content,"<em ","<i ","gi");content=tinyMCE.regexpReplace(content,"</strong>","</b>","gi");content=tinyMCE.regexpReplace(content,"</em>","</i>","gi");tinyMCE.setInnerHTML(inst.getBody(),content);}tinyMCE.convertAllRelativeURLs(inst.getBody());}else{if(tinyMCE.settings['cleanup_on_startup']){tinyMCE._setHTML(inst.getDoc(),content);eval('try {tinyMCE.setInnerHTML(inst.getBody(), tinyMCE._cleanupHTML(inst, inst.contentDocument, this.settings, inst.getBody()));} catch(e) {}');}else tinyMCE._setHTML(inst.getDoc(),content);}var parentElm=inst.targetDoc.getElementById(inst.editorId+'_parent');inst.formElement=tinyMCE.isGecko?parentElm.previousSibling:parentElm.nextSibling;tinyMCE.handleVisualAid(inst.getBody(),true,tinyMCE.settings['visual'],inst);tinyMCE.dispatchCallback(inst,'setupcontent_callback','setupContent',editor_id,inst.getBody(),inst.getDoc());if(!tinyMCE.isMSIE)tinyMCE.addEventHandlers(inst);if(tinyMCE.isMSIE){tinyMCE.addEvent(inst.getBody(),"blur",TinyMCE_Engine.prototype._eventPatch);tinyMCE.addEvent(inst.getBody(),"beforedeactivate",TinyMCE_Engine.prototype._eventPatch);if(!tinyMCE.isOpera){tinyMCE.addEvent(doc.body,"mousemove",TinyMCE_Engine.prototype.onMouseMove);tinyMCE.addEvent(doc.body,"beforepaste",TinyMCE_Engine.prototype._eventPatch);tinyMCE.addEvent(doc.body,"drop",TinyMCE_Engine.prototype._eventPatch);}}tinyMCE.selectedInstance=inst;tinyMCE.selectedElement=inst.contentWindow.document.body;tinyMCE._customCleanup(inst,"insert_to_editor_dom",inst.getBody());tinyMCE._customCleanup(inst,"setup_content_dom",inst.getBody());tinyMCE._setEventsEnabled(inst.getBody(),false);tinyMCE.cleanupAnchors(inst.getDoc());if(tinyMCE.getParam("convert_fonts_to_spans"))tinyMCE.convertSpansToFonts(inst.getDoc());inst.startContent=tinyMCE.trim(inst.getBody().innerHTML);inst.undoRedo.add({content:inst.startContent});if(tinyMCE.isGecko){tinyMCE.selectNodes(inst.getBody(),function(n){if(n.nodeType==3||n.nodeType==8){n.nodeValue=n.nodeValue.replace(new RegExp('\\smce_src=\"[^\"]*\"','gi'),"");n.nodeValue=n.nodeValue.replace(new RegExp('\\smce_href=\"[^\"]*\"','gi'),"");}return false;});}tinyMCE._removeInternal(inst.getBody());tinyMCE.selectedInstance=inst;tinyMCE.triggerNodeChange(false,true);},storeAwayURLs:function(s){if(!s.match(/(mce_src|mce_href)/gi,s)){s=s.replace(new RegExp('src\\s*=\\s*\"([^ >\"]*)\"','gi'),'src="$1" mce_src="$1"');s=s.replace(new RegExp('href\\s*=\\s*\"([^ >\"]*)\"','gi'),'href="$1" mce_href="$1"');}return s;},_removeInternal:function(n){if(tinyMCE.isGecko){tinyMCE.selectNodes(n,function(n){if(n.nodeType==3||n.nodeType==8){n.nodeValue=n.nodeValue.replace(new RegExp('\\smce_src=\"[^\"]*\"','gi'),"");n.nodeValue=n.nodeValue.replace(new RegExp('\\smce_href=\"[^\"]*\"','gi'),"");}return false;});}},removeTinyMCEFormElements:function(form_obj){if(typeof(form_obj)=="undefined"||form_obj==null)return;if(form_obj.nodeName!="FORM"){if(form_obj.form)form_obj=form_obj.form;else form_obj=tinyMCE.getParentElement(form_obj,"form");}if(form_obj==null)return;for(var i=0;i<form_obj.elements.length;i++){var elementId=form_obj.elements[i].name?form_obj.elements[i].name:form_obj.elements[i].id;if(elementId.indexOf('mce_editor_')==0)form_obj.elements[i].disabled=true;}},handleEvent:function(e){var inst=tinyMCE.selectedInstance;if(typeof(tinyMCE)=="undefined")return true;if(tinyMCE.executeCallback(tinyMCE.selectedInstance,'handle_event_callback','handleEvent',e))return false;switch(e.type){case"beforedeactivate":case"blur":if(tinyMCE.selectedInstance)tinyMCE.selectedInstance.execCommand('mceEndTyping');tinyMCE.hideMenus();return;case"drop":case"beforepaste":if(tinyMCE.selectedInstance)tinyMCE.selectedInstance.setBaseHREF(null);if(tinyMCE.isMSIE&&!tinyMCE.isOpera){var ife=tinyMCE.selectedInstance.iframeElement;if(ife.style.height.indexOf('%')!=-1){ife._oldHeight=ife.style.height;ife.style.height=ife.clientHeight;}}window.setTimeout("tinyMCE.selectedInstance.setBaseHREF(tinyMCE.settings['base_href']);tinyMCE._resetIframeHeight();",1);return;case"submit":tinyMCE.removeTinyMCEFormElements(tinyMCE.isMSIE?window.event.srcElement:e.target);tinyMCE.triggerSave();tinyMCE.isNotDirty=true;return;case"reset":var formObj=tinyMCE.isMSIE?window.event.srcElement:e.target;for(var i=0;i<document.forms.length;i++){if(document.forms[i]==formObj)window.setTimeout('tinyMCE.resetForm('+i+');',10);}return;case"keypress":if(inst&&inst.handleShortcut(e))return false;if(e.target.editorId){tinyMCE.selectedInstance=tinyMCE.instances[e.target.editorId];}else{if(e.target.ownerDocument.editorId)tinyMCE.selectedInstance=tinyMCE.instances[e.target.ownerDocument.editorId];}if(tinyMCE.selectedInstance)tinyMCE.selectedInstance.switchSettings();if(tinyMCE.isGecko&&tinyMCE.settings['force_p_newlines']&&e.keyCode==13&&!e.shiftKey){if(TinyMCE_ForceParagraphs._insertPara(tinyMCE.selectedInstance,e)){tinyMCE.execCommand("mceAddUndoLevel");tinyMCE.cancelEvent(e);return false;}}if(tinyMCE.isGecko&&tinyMCE.settings['force_p_newlines']&&(e.keyCode==8||e.keyCode==46)&&!e.shiftKey){if(TinyMCE_ForceParagraphs._handleBackSpace(tinyMCE.selectedInstance,e.type)){tinyMCE.execCommand("mceAddUndoLevel");tinyMCE.cancelEvent(e);return false;}}if(tinyMCE.isMSIE&&tinyMCE.settings['force_br_newlines']&&e.keyCode==13){if(e.target.editorId)tinyMCE.selectedInstance=tinyMCE.instances[e.target.editorId];if(tinyMCE.selectedInstance){var sel=tinyMCE.selectedInstance.getDoc().selection;var rng=sel.createRange();if(tinyMCE.getParentElement(rng.parentElement(),"li")!=null)return false;e.returnValue=false;e.cancelBubble=true;rng.pasteHTML("<br />");rng.collapse(false);rng.select();tinyMCE.execCommand("mceAddUndoLevel");tinyMCE.triggerNodeChange(false);return false;}}if(e.keyCode==8||e.keyCode==46){tinyMCE.selectedElement=e.target;tinyMCE.linkElement=tinyMCE.getParentElement(e.target,"a");tinyMCE.imgElement=tinyMCE.getParentElement(e.target,"img");tinyMCE.triggerNodeChange(false);}return false;break;case"keyup":case"keydown":tinyMCE.hideMenus();tinyMCE.hasMouseMoved=false;if(inst&&inst.handleShortcut(e))return false;if(e.target.editorId)tinyMCE.selectedInstance=tinyMCE.instances[e.target.editorId];else return;if(tinyMCE.selectedInstance)tinyMCE.selectedInstance.switchSettings();var inst=tinyMCE.selectedInstance;if(tinyMCE.isGecko&&tinyMCE.settings['force_p_newlines']&&(e.keyCode==8||e.keyCode==46)&&!e.shiftKey){if(TinyMCE_ForceParagraphs._handleBackSpace(tinyMCE.selectedInstance,e.type)){tinyMCE.execCommand("mceAddUndoLevel");e.preventDefault();return false;}}tinyMCE.selectedElement=null;tinyMCE.selectedNode=null;var elm=tinyMCE.selectedInstance.getFocusElement();tinyMCE.linkElement=tinyMCE.getParentElement(elm,"a");tinyMCE.imgElement=tinyMCE.getParentElement(elm,"img");tinyMCE.selectedElement=elm;if(tinyMCE.isGecko&&e.type=="keyup"&&e.keyCode==9)tinyMCE.handleVisualAid(tinyMCE.selectedInstance.getBody(),true,tinyMCE.settings['visual'],tinyMCE.selectedInstance);if(tinyMCE.isMSIE&&e.type=="keydown"&&e.keyCode==13)tinyMCE.enterKeyElement=tinyMCE.selectedInstance.getFocusElement();if(tinyMCE.isMSIE&&e.type=="keyup"&&e.keyCode==13){var elm=tinyMCE.enterKeyElement;if(elm){var re=new RegExp('^HR|IMG|BR$','g');var dre=new RegExp('^H[1-6]$','g');if(!elm.hasChildNodes()&&!re.test(elm.nodeName)){if(dre.test(elm.nodeName))elm.innerHTML="&nbsp;&nbsp;";else elm.innerHTML="&nbsp;";}}}var keys=tinyMCE.posKeyCodes;var posKey=false;for(var i=0;i<keys.length;i++){if(keys[i]==e.keyCode){posKey=true;break;}}if(tinyMCE.isMSIE&&tinyMCE.settings['custom_undo_redo']){var keys=new Array(8,46);for(var i=0;i<keys.length;i++){if(keys[i]==e.keyCode){if(e.type=="keyup")tinyMCE.triggerNodeChange(false);}}}if(e.keyCode==17)return true;if(!posKey&&e.type=="keyup")tinyMCE.execCommand("mceStartTyping");if(e.type=="keydown"&&(posKey||e.ctrlKey)&&inst)inst.undoBookmark=inst.selection.getBookmark();if(e.type=="keyup"&&(posKey||e.ctrlKey))tinyMCE.execCommand("mceEndTyping");if(posKey&&e.type=="keyup")tinyMCE.triggerNodeChange(false);if(tinyMCE.isMSIE&&e.ctrlKey)window.setTimeout('tinyMCE.triggerNodeChange(false);',1);break;case"mousedown":case"mouseup":case"click":case"focus":tinyMCE.hideMenus();if(tinyMCE.selectedInstance){tinyMCE.selectedInstance.switchSettings();tinyMCE.selectedInstance.isFocused=true;}var targetBody=tinyMCE.getParentElement(e.target,"body");for(var instanceName in tinyMCE.instances){if(!tinyMCE.isInstance(tinyMCE.instances[instanceName]))continue;var inst=tinyMCE.instances[instanceName];inst.autoResetDesignMode();if(inst.getBody()==targetBody){tinyMCE.selectedInstance=inst;tinyMCE.selectedElement=e.target;tinyMCE.linkElement=tinyMCE.getParentElement(tinyMCE.selectedElement,"a");tinyMCE.imgElement=tinyMCE.getParentElement(tinyMCE.selectedElement,"img");break;}}if(!tinyMCE.selectedInstance.undoRedo.undoLevels[0].bookmark)tinyMCE.selectedInstance.undoRedo.undoLevels[0].bookmark=tinyMCE.selectedInstance.selection.getBookmark();if(tinyMCE.isSafari){tinyMCE.selectedInstance.lastSafariSelection=tinyMCE.selectedInstance.selection.getBookmark();tinyMCE.selectedInstance.lastSafariSelectedElement=tinyMCE.selectedElement;var lnk=tinyMCE.getParentElement(tinyMCE.selectedElement,"a");if(lnk&&e.type=="mousedown"){lnk.setAttribute("mce_real_href",lnk.getAttribute("href"));lnk.setAttribute("href","javascript:void(0);");}if(lnk&&e.type=="click"){window.setTimeout(function(){lnk.setAttribute("href",lnk.getAttribute("mce_real_href"));lnk.removeAttribute("mce_real_href");},10);}}if(e.type!="focus")tinyMCE.selectedNode=null;tinyMCE.triggerNodeChange(false);tinyMCE.execCommand("mceEndTyping");if(e.type=="mouseup")tinyMCE.execCommand("mceAddUndoLevel");if(!tinyMCE.selectedInstance&&e.target.editorId)tinyMCE.selectedInstance=tinyMCE.instances[e.target.editorId];return false;break;}},getButtonHTML:function(id,lang,img,cmd,ui,val){var h='',m,x;cmd='tinyMCE.execInstanceCommand(\'{$editor_id}\',\''+cmd+'\'';if(typeof(ui)!="undefined"&&ui!=null)cmd+=','+ui;if(typeof(val)!="undefined"&&val!=null)cmd+=",'"+val+"'";cmd+=');';if(tinyMCE.getParam('button_tile_map')&&(!tinyMCE.isMSIE||tinyMCE.isOpera)&&(m=this.buttonMap[id])!=null&&(tinyMCE.getParam("language")=="en"||img.indexOf('$lang')==-1)){x=0-(m*20)==0?'0':0-(m*20);h+='<a id="{$editor_id}_'+id+'" href="javascript:'+cmd+'" onclick="'+cmd+'return false;" onmousedown="return false;" class="mceTiledButton mceButtonNormal" target="_self">';h+='<img src="{$themeurl}/images/spacer.gif" style="background-position: '+x+'px 0" title="{$'+lang+'}" />';h+='</a>';}else{h+='<a id="{$editor_id}_'+id+'" href="javascript:'+cmd+'" onclick="'+cmd+'return false;" onmousedown="return false;" class="mceButtonNormal" target="_self">';h+='<img src="'+img+'" title="{$'+lang+'}" />';h+='</a>';}return h;},addButtonMap:function(m){var i,a=m.replace(/\s+/,'').split(',');for(i=0;i<a.length;i++)this.buttonMap[a[i]]=i;},submitPatch:function(){tinyMCE.removeTinyMCEFormElements(this);tinyMCE.triggerSave();this.mceOldSubmit();tinyMCE.isNotDirty=true;},onLoad:function(){if(tinyMCE.settings.strict_loading_mode&&this.loadingIndex!=-1){window.setTimeout('tinyMCE.onLoad();',1);return;}if(tinyMCE.isMSIE&&!tinyMCE.isOpera&&window.event.type=="readystatechange"&&document.readyState!="complete")return true;if(tinyMCE.isLoaded)return true;tinyMCE.isLoaded=true;tinyMCE.dispatchCallback(null,'onpageload','onPageLoad');for(var c=0;c<tinyMCE.configs.length;c++){tinyMCE.settings=tinyMCE.configs[c];var selector=tinyMCE.getParam("editor_selector");var deselector=tinyMCE.getParam("editor_deselector");var elementRefAr=new Array();if(document.forms&&tinyMCE.settings['add_form_submit_trigger']&&!tinyMCE.submitTriggers){for(var i=0;i<document.forms.length;i++){var form=document.forms[i];tinyMCE.addEvent(form,"submit",TinyMCE_Engine.prototype.handleEvent);tinyMCE.addEvent(form,"reset",TinyMCE_Engine.prototype.handleEvent);tinyMCE.submitTriggers=true;if(tinyMCE.settings['submit_patch']){try{form.mceOldSubmit=form.submit;form.submit=TinyMCE_Engine.prototype.submitPatch;}catch(e){}}}}var mode=tinyMCE.settings['mode'];switch(mode){case"exact":var elements=tinyMCE.getParam('elements','',true,',');for(var i=0;i<elements.length;i++){var element=tinyMCE._getElementById(elements[i]);var trigger=element?element.getAttribute(tinyMCE.settings['textarea_trigger']):"";if(tinyMCE.getAttrib(element,"class").indexOf(deselector)!=-1)continue;if(trigger=="false")continue;if((tinyMCE.settings['ask']||tinyMCE.settings['convert_on_click'])&&element){elementRefAr[elementRefAr.length]=element;continue;}if(element)tinyMCE.addMCEControl(element,elements[i]);else if(tinyMCE.settings['debug'])alert("Error: Could not find element by id or name: "+elements[i]);}break;case"specific_textareas":case"textareas":var nodeList=document.getElementsByTagName("textarea");for(var i=0;i<nodeList.length;i++){var elm=nodeList.item(i);var trigger=elm.getAttribute(tinyMCE.settings['textarea_trigger']);if(selector!=''&&tinyMCE.getAttrib(elm,"class").indexOf(selector)==-1)continue;if(selector!='')trigger=selector!=""?"true":"";if(tinyMCE.getAttrib(elm,"class").indexOf(deselector)!=-1)continue;if((mode=="specific_textareas"&&trigger=="true")||(mode=="textareas"&&trigger!="false"))elementRefAr[elementRefAr.length]=elm;}break;}for(var i=0;i<elementRefAr.length;i++){var element=elementRefAr[i];var elementId=element.name?element.name:element.id;if(tinyMCE.settings['ask']||tinyMCE.settings['convert_on_click']){if(tinyMCE.isGecko){var settings=tinyMCE.settings;tinyMCE.addEvent(element,"focus",function(e){window.setTimeout(function(){TinyMCE_Engine.prototype.confirmAdd(e,settings);},10);});if(element.nodeName!="TEXTAREA"&&element.nodeName!="INPUT")tinyMCE.addEvent(element,"click",function(e){window.setTimeout(function(){TinyMCE_Engine.prototype.confirmAdd(e,settings);},10);});}else{var settings=tinyMCE.settings;tinyMCE.addEvent(element,"focus",function(){TinyMCE_Engine.prototype.confirmAdd(null,settings);});tinyMCE.addEvent(element,"click",function(){TinyMCE_Engine.prototype.confirmAdd(null,settings);});}}else tinyMCE.addMCEControl(element,elementId);}if(tinyMCE.settings['auto_focus']){window.setTimeout(function(){var inst=tinyMCE.getInstanceById(tinyMCE.settings['auto_focus']);inst.selection.selectNode(inst.getBody(),true,true);inst.contentWindow.focus();},10);}tinyMCE.dispatchCallback(null,'oninit','onInit');}},isInstance:function(o){return o!=null&&typeof(o)=="object"&&o.isTinyMCE_Control;},getParam:function(name,default_value,strip_whitespace,split_chr){var value=(typeof(this.settings[name])=="undefined")?default_value:this.settings[name];if(value=="true"||value=="false")return(value=="true");if(strip_whitespace)value=tinyMCE.regexpReplace(value,"[ \t\r\n]","");if(typeof(split_chr)!="undefined"&&split_chr!=null){value=value.split(split_chr);var outArray=new Array();for(var i=0;i<value.length;i++){if(value[i]&&value[i]!="")outArray[outArray.length]=value[i];}value=outArray;}return value;},getLang:function(name,default_value,parse_entities,va){var v=(typeof(tinyMCELang[name])=="undefined")?default_value:tinyMCELang[name],n;if(parse_entities)v=tinyMCE.entityDecode(v);if(va){for(n in va)v=this.replaceVar(v,n,va[n]);}return v;},entityDecode:function(s){var e=document.createElement("div");e.innerHTML=s;return e.innerHTML;},addToLang:function(prefix,ar){for(var key in ar){if(typeof(ar[key])=='function')continue;tinyMCELang[(key.indexOf('lang_')==-1?'lang_':'')+(prefix!=''?(prefix+"_"):'')+key]=ar[key];}this.loadNextScript();},triggerNodeChange:function(focus,setup_content){if(tinyMCE.selectedInstance){var inst=tinyMCE.selectedInstance;var editorId=inst.editorId;var elm=(typeof(setup_content)!="undefined"&&setup_content)?tinyMCE.selectedElement:inst.getFocusElement();var undoIndex=-1;var undoLevels=-1;var anySelection=false;var selectedText=inst.selection.getSelectedText();if(setup_content&&tinyMCE.isGecko&&inst.isHidden())elm=inst.getBody();inst.switchSettings();if(tinyMCE.settings["auto_resize"]){var doc=inst.getDoc();inst.iframeElement.style.width=doc.body.offsetWidth+"px";inst.iframeElement.style.height=doc.body.offsetHeight+"px";}if(tinyMCE.selectedElement)anySelection=(tinyMCE.selectedElement.nodeName.toLowerCase()=="img")||(selectedText&&selectedText.length>0);if(tinyMCE.settings['custom_undo_redo']){undoIndex=inst.undoRedo.undoIndex;undoLevels=inst.undoRedo.undoLevels.length;}tinyMCE.dispatchCallback(inst,'handle_node_change_callback','handleNodeChange',editorId,elm,undoIndex,undoLevels,inst.visualAid,anySelection,setup_content);}if(this.selectedInstance&&(typeof(focus)=="undefined"||focus))this.selectedInstance.contentWindow.focus();},_customCleanup:function(inst,type,content){var pl,po,i;var customCleanup=tinyMCE.settings['cleanup_callback'];if(customCleanup!=""&&eval("typeof("+customCleanup+")")!="undefined")content=eval(customCleanup+"(type, content, inst);");pl=inst.plugins;for(i=0;i<pl.length;i++){po=tinyMCE.plugins[pl[i]];if(po&&po.cleanup)content=po.cleanup(type,content,inst);}return content;},setContent:function(h){if(tinyMCE.selectedInstance){tinyMCE.selectedInstance.execCommand('mceSetContent',false,h);tinyMCE.selectedInstance.repaint();}},importThemeLanguagePack:function(name){if(typeof(name)=="undefined")name=tinyMCE.settings['theme'];tinyMCE.loadScript(tinyMCE.baseURL+'/themes/'+name+'/langs/'+tinyMCE.settings['language']+'.js');},importPluginLanguagePack:function(name,valid_languages){var lang="en",b=tinyMCE.baseURL+'/plugins/'+name;valid_languages=valid_languages.split(',');for(var i=0;i<valid_languages.length;i++){if(tinyMCE.settings['language']==valid_languages[i])lang=tinyMCE.settings['language'];}if(this.plugins[name])b=this.plugins[name].baseURL;tinyMCE.loadScript(b+'/langs/'+lang+'.js');},applyTemplate:function(h,as){var i,s,ar=h.match(new RegExp('\\{\\$[a-z0-9_]+\\}','gi'));if(ar&&ar.length>0){for(i=ar.length-1;i>=0;i--){s=ar[i].substring(2,ar[i].length-1);if(s.indexOf('lang_')==0&&tinyMCELang[s])h=tinyMCE.replaceVar(h,s,tinyMCELang[s]);else if(as&&as[s])h=tinyMCE.replaceVar(h,s,as[s]);else if(tinyMCE.settings[s])h=tinyMCE.replaceVar(h,s,tinyMCE.settings[s]);}}h=tinyMCE.replaceVar(h,"themeurl",tinyMCE.themeURL);return h;},replaceVar:function(h,r,v){return h.replace(new RegExp('{\\\$'+r+'}','g'),v);},openWindow:function(template,args){var html,width,height,x,y,resizable,scrollbars,url;args['mce_template_file']=template['file'];args['mce_width']=template['width'];args['mce_height']=template['height'];tinyMCE.windowArgs=args;html=template['html'];if(!(width=parseInt(template['width'])))width=320;if(!(height=parseInt(template['height'])))height=200;if(tinyMCE.isMSIE)height+=40;else height+=20;x=parseInt(screen.width/2.0)-(width/2.0);y=parseInt(screen.height/2.0)-(height/2.0);resizable=(args&&args['resizable'])?args['resizable']:"no";scrollbars=(args&&args['scrollbars'])?args['scrollbars']:"no";if(template['file'].charAt(0)!='/'&&template['file'].indexOf('://')==-1)url=tinyMCE.baseURL+"/themes/"+tinyMCE.getParam("theme")+"/"+template['file'];else url=template['file'];for(var name in args){if(typeof(args[name])=='function')continue;url=tinyMCE.replaceVar(url,name,escape(args[name]));}if(html){html=tinyMCE.replaceVar(html,"css",this.settings['popups_css']);html=tinyMCE.applyTemplate(html,args);var win=window.open("","mcePopup"+new Date().getTime(),"top="+y+",left="+x+",scrollbars="+scrollbars+",dialog=yes,minimizable="+resizable+",modal=yes,width="+width+",height="+height+",resizable="+resizable);if(win==null){alert(tinyMCELang['lang_popup_blocked']);return;}win.document.write(html);win.document.close();win.resizeTo(width,height);win.focus();}else{if((tinyMCE.isMSIE&&!tinyMCE.isOpera)&&resizable!='yes'&&tinyMCE.settings["dialog_type"]=="modal"){height+=10;var features="resizable:"+resizable+";scroll:"+scrollbars+";status:yes;center:yes;help:no;dialogWidth:"+width+"px;dialogHeight:"+height+"px;";window.showModalDialog(url,window,features);}else{var modal=(resizable=="yes")?"no":"yes";if(tinyMCE.isGecko&&tinyMCE.isMac)modal="no";if(template['close_previous']!="no")try{tinyMCE.lastWindow.close();}catch(ex){}var win=window.open(url,"mcePopup"+new Date().getTime(),"top="+y+",left="+x+",scrollbars="+scrollbars+",dialog="+modal+",minimizable="+resizable+",modal="+modal+",width="+width+",height="+height+",resizable="+resizable);if(win==null){alert(tinyMCELang['lang_popup_blocked']);return;}if(template['close_previous']!="no")tinyMCE.lastWindow=win;eval('try { win.resizeTo(width, height); } catch(e) { }');if(tinyMCE.isGecko){if(win.document.defaultView.statusbar.visible)win.resizeBy(0,tinyMCE.isMac?10:24);}win.focus();}}},closeWindow:function(win){win.close();},getVisualAidClass:function(class_name,state){var aidClass=tinyMCE.settings['visual_table_class'];if(typeof(state)=="undefined")state=tinyMCE.settings['visual'];var classNames=new Array();var ar=class_name.split(' ');for(var i=0;i<ar.length;i++){if(ar[i]==aidClass)ar[i]="";if(ar[i]!="")classNames[classNames.length]=ar[i];}if(state)classNames[classNames.length]=aidClass;var className="";for(var i=0;i<classNames.length;i++){if(i>0)className+=" ";className+=classNames[i];}return className;},handleVisualAid:function(el,deep,state,inst,skip_dispatch){if(!el)return;if(!skip_dispatch)tinyMCE.dispatchCallback(inst,'handle_visual_aid_callback','handleVisualAid',el,deep,state,inst);var tableElement=null;switch(el.nodeName){case"TABLE":var oldW=el.style.width;var oldH=el.style.height;var bo=tinyMCE.getAttrib(el,"border");bo=bo==""||bo=="0"?true:false;tinyMCE.setAttrib(el,"class",tinyMCE.getVisualAidClass(tinyMCE.getAttrib(el,"class"),state&&bo));el.style.width=oldW;el.style.height=oldH;for(var y=0;y<el.rows.length;y++){for(var x=0;x<el.rows[y].cells.length;x++){var cn=tinyMCE.getVisualAidClass(tinyMCE.getAttrib(el.rows[y].cells[x],"class"),state&&bo);tinyMCE.setAttrib(el.rows[y].cells[x],"class",cn);}}break;case"A":var anchorName=tinyMCE.getAttrib(el,"name");if(anchorName!=''&&state){el.title=anchorName;el.className='mceItemAnchor';}else if(anchorName!=''&&!state)el.className='';break;}if(deep&&el.hasChildNodes()){for(var i=0;i<el.childNodes.length;i++)tinyMCE.handleVisualAid(el.childNodes[i],deep,state,inst,true);}},fixGeckoBaseHREFBug:function(m,e,h){var nl,i,a,n,xsrc,xhref,el;if(tinyMCE.isGecko){if(m==1){h=h.replace(/\ssrc=/gi," mce_tsrc=");h=h.replace(/\shref=/gi," mce_thref=");return h;}else{el=new Array('a','img','select','area','iframe','base','input','script','embed','object','link');for(a=0;a<el.length;a++){n=e.getElementsByTagName(el[a]);for(i=0;i<n.length;i++){xsrc=tinyMCE.getAttrib(n[i],"mce_tsrc");xhref=tinyMCE.getAttrib(n[i],"mce_thref");if(xsrc!=""){try{n[i].src=tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'],xsrc);}catch(e){}n[i].removeAttribute("mce_tsrc");}if(xhref!=""){try{n[i].href=tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'],xhref);}catch(e){}n[i].removeAttribute("mce_thref");}}}el=tinyMCE.selectNodes(e,function(n){if(n.nodeType==3||n.nodeType==8){n.nodeValue=n.nodeValue.replace(/\smce_tsrc=/gi," src=");n.nodeValue=n.nodeValue.replace(/\smce_thref=/gi," href=");}return false;});}}return h;},_setHTML:function(doc,html_content){html_content=tinyMCE.cleanupHTMLCode(html_content);try{tinyMCE.setInnerHTML(doc.body,html_content);}catch(e){if(this.isMSIE)doc.body.createTextRange().pasteHTML(html_content);}if(tinyMCE.isMSIE&&tinyMCE.settings['fix_content_duplication']){var paras=doc.getElementsByTagName("P");for(var i=0;i<paras.length;i++){var node=paras[i];while((node=node.parentNode)!=null){if(node.nodeName=="P")node.outerHTML=node.innerHTML;}}var html=doc.body.innerHTML;tinyMCE.setInnerHTML(doc.body,html);}tinyMCE.cleanupAnchors(doc);if(tinyMCE.getParam("convert_fonts_to_spans"))tinyMCE.convertSpansToFonts(doc);},getEditorId:function(form_element){var inst=this.getInstanceById(form_element);if(!inst)return null;return inst.editorId;},getInstanceById:function(editor_id){var inst=this.instances[editor_id];if(!inst){for(var n in tinyMCE.instances){var instance=tinyMCE.instances[n];if(!tinyMCE.isInstance(instance))continue;if(instance.formTargetElementId==editor_id){inst=instance;break;}}}return inst;},queryInstanceCommandValue:function(editor_id,command){var inst=tinyMCE.getInstanceById(editor_id);if(inst)return inst.queryCommandValue(command);return false;},queryInstanceCommandState:function(editor_id,command){var inst=tinyMCE.getInstanceById(editor_id);if(inst)return inst.queryCommandState(command);return null;},setWindowArg:function(n,v){this.windowArgs[n]=v;},getWindowArg:function(n,d){return(typeof(this.windowArgs[n])=="undefined")?d:this.windowArgs[n];},getCSSClasses:function(editor_id,doc){var output=new Array();if(typeof(tinyMCE.cssClasses)!="undefined")return tinyMCE.cssClasses;if(typeof(editor_id)=="undefined"&&typeof(doc)=="undefined"){var instance;for(var instanceName in tinyMCE.instances){instance=tinyMCE.instances[instanceName];if(!tinyMCE.isInstance(instance))continue;break;}doc=instance.getDoc();}if(typeof(doc)=="undefined"){var instance=tinyMCE.getInstanceById(editor_id);doc=instance.getDoc();}if(doc){var styles=doc.styleSheets;if(styles&&styles.length>0){for(var x=0;x<styles.length;x++){var csses=null;eval("try {var csses = tinyMCE.isMSIE ? doc.styleSheets("+x+").rules : styles["+x+"].cssRules;} catch(e) {}");if(!csses)return new Array();for(var i=0;i<csses.length;i++){var selectorText=csses[i].selectorText;if(selectorText){var rules=selectorText.split(',');for(var c=0;c<rules.length;c++){var rule=rules[c];while(rule.indexOf(' ')==0)rule=rule.substring(1);if(rule.indexOf(' ')!=-1||rule.indexOf(':')!=-1||rule.indexOf('mceItem')!=-1)continue;if(rule.indexOf(tinyMCE.settings['visual_table_class'])!=-1||rule.indexOf('mceEditable')!=-1||rule.indexOf('mceNonEditable')!=-1)continue;if(rule.indexOf('.')!=-1){var cssClass=rule.substring(rule.indexOf('.')+1);var addClass=true;for(var p=0;p<output.length&&addClass;p++){if(output[p]==cssClass)addClass=false;}if(addClass)output[output.length]=cssClass;}}}}}}}if(output.length>0)tinyMCE.cssClasses=output;return output;},regexpReplace:function(in_str,reg_exp,replace_str,opts){if(in_str==null)return in_str;if(typeof(opts)=="undefined")opts='g';var re=new RegExp(reg_exp,opts);return in_str.replace(re,replace_str);},trim:function(s){return s.replace(/^\s*|\s*$/g,"");},cleanupEventStr:function(s){s=""+s;s=s.replace('function anonymous()\n{\n','');s=s.replace('\n}','');s=s.replace(/^return true;/gi,'');return s;},getControlHTML:function(c){var i,l,n,o,v;l=tinyMCE.plugins;for(n in l){o=l[n];if(o.getControlHTML&&(v=o.getControlHTML(c))!='')return tinyMCE.replaceVar(v,"pluginurl",o.baseURL);}o=tinyMCE.themes[tinyMCE.settings['theme']];if(o.getControlHTML&&(v=o.getControlHTML(c))!='')return v;return'';},evalFunc:function(f,idx,a){var s='(',i;for(i=idx;i<a.length;i++){s+='a['+i+']';if(i<a.length-1)s+=',';}s+=');';return eval("f"+s);},dispatchCallback:function(i,p,n){return this.callFunc(i,p,n,0,this.dispatchCallback.arguments);},executeCallback:function(i,p,n){return this.callFunc(i,p,n,1,this.executeCallback.arguments);},execCommandCallback:function(i,p,n){return this.callFunc(i,p,n,2,this.execCommandCallback.arguments);},callFunc:function(ins,p,n,m,a){var l,i,on,o,s,v;s=m==2;l=tinyMCE.getParam(p,'');if(l!=''&&(v=tinyMCE.evalFunc(typeof(l)=="function"?l:eval(l),3,a))==s&&m>0)return true;if(ins!=null){for(i=0,l=ins.plugins;i<l.length;i++){o=tinyMCE.plugins[l[i]];if(o[n]&&(v=tinyMCE.evalFunc(o[n],3,a))==s&&m>0)return true;}}l=tinyMCE.themes;for(on in l){o=l[on];if(o[n]&&(v=tinyMCE.evalFunc(o[n],3,a))==s&&m>0)return true;}return false;},xmlEncode:function(s){s=""+s;s=s.replace(/&/g,'&amp;');s=s.replace(new RegExp('"','g'),'&quot;');s=s.replace(/\'/g,'&#39;');s=s.replace(/</g,'&lt;');s=s.replace(/>/g,'&gt;');return s;},extend:function(p,np){var o={};o.parent=p;for(n in p)o[n]=p[n];for(n in np)o[n]=np[n];return o;},hideMenus:function(){var e=tinyMCE.lastSelectedMenuBtn;if(tinyMCE.lastMenu){tinyMCE.lastMenu.hide();tinyMCE.lastMenu=null;}if(e){tinyMCE.switchClass(e,tinyMCE.lastMenuBtnClass);tinyMCE.lastSelectedMenuBtn=null;}},explode:function(d,s){var ar=s.split(d),oar=new Array(),i;for(i=0;i<ar.length;i++){if(ar[i]!="")oar[oar.length]=ar[i];}return oar;}};var TinyMCE=TinyMCE_Engine;var tinyMCE=new TinyMCE_Engine();var tinyMCELang={};function TinyMCE_Control(settings){var t,i,to,fu,p,x,fn,fu,pn,s=settings;this.undoRedoLevel=true;this.isTinyMCE_Control=true;this.settings=s;this.settings['theme']=tinyMCE.getParam("theme","default");this.settings['width']=tinyMCE.getParam("width",-1);this.settings['height']=tinyMCE.getParam("height",-1);this.selection=new TinyMCE_Selection(this);this.undoRedo=new TinyMCE_UndoRedo(this);this.cleanup=new TinyMCE_Cleanup();this.shortcuts=new Array();this.hasMouseMoved=false;this.cleanup.init({valid_elements:s.valid_elements,extended_valid_elements:s.extended_valid_elements,entities:s.entities,entity_encoding:s.entity_encoding,debug:s.cleanup_debug,url_converter:'TinyMCE_Cleanup.prototype._urlConverter',indent:s.apply_source_formatting,invalid_elements:s.invalid_elements,verify_html:s.verify_html,fix_content_duplication:s.fix_content_duplication});t=this.settings['theme'];if(!tinyMCE.hasTheme(t)){fn=tinyMCE.callbacks;to={};for(i=0;i<fn.length;i++){if((fu=window['TinyMCE_'+t+"_"+fn[i]]))to[fn[i]]=fu;}tinyMCE.addTheme(t,to);}this.plugins=new Array();p=tinyMCE.getParam('plugins','',true,',');if(p.length>0){for(i=0;i<p.length;i++){pn=p[i];if(pn.charAt(0)=='-')pn=pn.substring(1);if(!tinyMCE.hasPlugin(pn)){fn=tinyMCE.callbacks;to={};for(x=0;x<fn.length;x++){if((fu=window['TinyMCE_'+pn+"_"+fn[x]]))to[fn[x]]=fu;}tinyMCE.addPlugin(pn,to);}this.plugins[this.plugins.length]=pn;}}};TinyMCE_Control.prototype={hasPlugin:function(n){var i;for(i=0;i<this.plugins.length;i++){if(this.plugins[i]==n)return true;}return false;},addPlugin:function(n,p){if(!this.hasPlugin(n)){tinyMCE.addPlugin(n,p);this.plugins[this.plugins.length]=n;}},repaint:function(){if(tinyMCE.isMSIE&&!tinyMCE.isOpera)return;try{var s=this.selection;var b=s.getBookmark(true);this.getBody().style.display='none';this.getDoc().execCommand('selectall',false,null);this.getSel().collapseToStart();this.getBody().style.display='block';s.moveToBookmark(b);}catch(ex){}},switchSettings:function(){if(tinyMCE.configs.length>1&&tinyMCE.currentConfig!=this.settings['index']){tinyMCE.settings=this.settings;tinyMCE.currentConfig=this.settings['index'];}},getBody:function(){return this.getDoc().body;},getDoc:function(){return this.contentWindow.document;},getWin:function(){return this.contentWindow;},addShortcut:function(m,k,d,cmd,ui,va){var n=typeof(k)=="number",ie=tinyMCE.isMSIE,c,sc,i;var scl=this.shortcuts;if(!tinyMCE.getParam('custom_shortcuts'))return false;m=m.toLowerCase();k=ie&&!n?k.toUpperCase():k;c=n?null:k.charCodeAt(0);d=d&&d.indexOf('lang_')==0?tinyMCE.getLang(d):d;sc={alt:m.indexOf('alt')!=-1,ctrl:m.indexOf('ctrl')!=-1,shift:m.indexOf('shift')!=-1,charCode:c,keyCode:n?k:(ie?c:null),desc:d,cmd:cmd,ui:ui,val:va};for(i=0;i<scl.length;i++){if(sc.alt==scl[i].alt&&sc.ctrl==scl[i].ctrl&&sc.shift==scl[i].shift&&sc.charCode==scl[i].charCode&&sc.keyCode==scl[i].keyCode){return false;}}scl[scl.length]=sc;return true;},handleShortcut:function(e){var i,s=this.shortcuts,o;for(i=0;i<s.length;i++){o=s[i];if(o.alt==e.altKey&&o.ctrl==e.ctrlKey&&(o.keyCode==e.keyCode||o.charCode==e.charCode)){if(o.cmd&&(e.type=="keydown"||(e.type=="keypress"&&!tinyMCE.isOpera)))tinyMCE.execCommand(o.cmd,o.ui,o.val);tinyMCE.cancelEvent(e);return true;}}return false;},autoResetDesignMode:function(){if(!tinyMCE.isMSIE&&this.isHidden()&&tinyMCE.getParam('auto_reset_designmode'))eval('try { this.getDoc().designMode = "On"; } catch(e) {}');},isHidden:function(){if(tinyMCE.isMSIE)return false;var s=this.getSel();return(!s||!s.rangeCount||s.rangeCount==0);},isDirty:function(){return this.startContent!=tinyMCE.trim(this.getBody().innerHTML)&&!tinyMCE.isNotDirty;},_mergeElements:function(scmd,pa,ch,override){if(scmd=="removeformat"){pa.className="";pa.style.cssText="";ch.className="";ch.style.cssText="";return;}var st=tinyMCE.parseStyle(tinyMCE.getAttrib(pa,"style"));var stc=tinyMCE.parseStyle(tinyMCE.getAttrib(ch,"style"));var className=tinyMCE.getAttrib(pa,"class");className+=" "+tinyMCE.getAttrib(ch,"class");if(override){for(var n in st){if(typeof(st[n])=='function')continue;stc[n]=st[n];}}else{for(var n in stc){if(typeof(stc[n])=='function')continue;st[n]=stc[n];}}tinyMCE.setAttrib(pa,"style",tinyMCE.serializeStyle(st));tinyMCE.setAttrib(pa,"class",tinyMCE.trim(className));ch.className="";ch.style.cssText="";ch.removeAttribute("class");ch.removeAttribute("style");},_setUseCSS:function(b){var d=this.getDoc();try{d.execCommand("useCSS",false,!b);}catch(ex){}try{d.execCommand("styleWithCSS",false,b);}catch(ex){}if(!tinyMCE.getParam("table_inline_editing"))try{d.execCommand('enableInlineTableEditing',false,"false");}catch(ex){}if(!tinyMCE.getParam("object_resizing"))try{d.execCommand('enableObjectResizing',false,"false");}catch(ex){}},execCommand:function(command,user_interface,value){var doc=this.getDoc();var win=this.getWin();var focusElm=this.getFocusElement();if(!new RegExp('mceStartTyping|mceEndTyping|mceBeginUndoLevel|mceEndUndoLevel|mceAddUndoLevel','gi').test(command))this.undoBookmark=null;if(this.lastSafariSelection&&!new RegExp('mceStartTyping|mceEndTyping|mceBeginUndoLevel|mceEndUndoLevel|mceAddUndoLevel','gi').test(command)){this.selection.moveToBookmark(this.lastSafariSelection);tinyMCE.selectedElement=this.lastSafariSelectedElement;}if(!tinyMCE.isMSIE&&!this.useCSS){this._setUseCSS(false);this.useCSS=true;}this.contentDocument=doc;if(tinyMCE.execCommandCallback(this,'execcommand_callback','execCommand',this.editorId,this.getBody(),command,user_interface,value))return;if(focusElm&&focusElm.nodeName=="IMG"){var align=focusElm.getAttribute('align');var img=command=="JustifyCenter"?focusElm.cloneNode(false):focusElm;switch(command){case"JustifyLeft":if(align=='left')img.removeAttribute('align');else img.setAttribute('align','left');var div=focusElm.parentNode;if(div&&div.nodeName=="DIV"&&div.childNodes.length==1&&div.parentNode)div.parentNode.replaceChild(img,div);this.selection.selectNode(img);this.repaint();tinyMCE.triggerNodeChange();return;case"JustifyCenter":img.removeAttribute('align');var div=tinyMCE.getParentElement(focusElm,"div");if(div&&div.style.textAlign=="center"){if(div.nodeName=="DIV"&&div.childNodes.length==1&&div.parentNode)div.parentNode.replaceChild(img,div);}else{var div=this.getDoc().createElement("div");div.style.textAlign='center';div.appendChild(img);focusElm.parentNode.replaceChild(div,focusElm);}this.selection.selectNode(img);this.repaint();tinyMCE.triggerNodeChange();return;case"JustifyRight":if(align=='right')img.removeAttribute('align');else img.setAttribute('align','right');var div=focusElm.parentNode;if(div&&div.nodeName=="DIV"&&div.childNodes.length==1&&div.parentNode)div.parentNode.replaceChild(img,div);this.selection.selectNode(img);this.repaint();tinyMCE.triggerNodeChange();return;}}if(tinyMCE.settings['force_br_newlines']){var alignValue="";if(doc.selection.type!="Control"){switch(command){case"JustifyLeft":alignValue="left";break;case"JustifyCenter":alignValue="center";break;case"JustifyFull":alignValue="justify";break;case"JustifyRight":alignValue="right";break;}if(alignValue!=""){var rng=doc.selection.createRange();if((divElm=tinyMCE.getParentElement(rng.parentElement(),"div"))!=null)divElm.setAttribute("align",alignValue);else if(rng.pasteHTML&&rng.htmlText.length>0)rng.pasteHTML('<div align="'+alignValue+'">'+rng.htmlText+"</div>");tinyMCE.triggerNodeChange();return;}}}switch(command){case"mceRepaint":this.repaint();return true;case"InsertUnorderedList":case"InsertOrderedList":var tag=(command=="InsertUnorderedList")?"ul":"ol";if(tinyMCE.isSafari)this.execCommand("mceInsertContent",false,"<"+tag+"><li>&nbsp;</li><"+tag+">");else this.getDoc().execCommand(command,user_interface,value);tinyMCE.triggerNodeChange();break;case"Strikethrough":if(tinyMCE.isSafari)this.execCommand("mceInsertContent",false,"<strike>"+this.selection.getSelectedHTML()+"</strike>");else this.getDoc().execCommand(command,user_interface,value);tinyMCE.triggerNodeChange();break;case"mceSelectNode":this.selection.selectNode(value);tinyMCE.triggerNodeChange();tinyMCE.selectedNode=value;break;case"FormatBlock":if(value==null||value==""){var elm=tinyMCE.getParentElement(this.getFocusElement(),"p,div,h1,h2,h3,h4,h5,h6,pre,address,blockquote,dt,dl,dd,samp");if(elm)this.execCommand("mceRemoveNode",false,elm);}else{if(tinyMCE.isGecko&&new RegExp('<(div|blockquote|code|dt|dd|dl|samp)>','gi').test(value))value=value.replace(/[^a-z]/gi,'');if(tinyMCE.isMSIE&&new RegExp('blockquote|code|samp','gi').test(value)){var b=this.selection.getBookmark();this.getDoc().execCommand("FormatBlock",false,'<p>');tinyMCE.renameElement(tinyMCE.getParentBlockElement(this.getFocusElement()),value);this.selection.moveToBookmark(b);}else this.getDoc().execCommand("FormatBlock",false,value);}tinyMCE.triggerNodeChange();break;case"mceRemoveNode":if(!value)value=tinyMCE.getParentElement(this.getFocusElement());if(tinyMCE.isMSIE){value.outerHTML=value.innerHTML;}else{var rng=value.ownerDocument.createRange();rng.setStartBefore(value);rng.setEndAfter(value);rng.deleteContents();rng.insertNode(rng.createContextualFragment(value.innerHTML));}tinyMCE.triggerNodeChange();break;case"mceSelectNodeDepth":var parentNode=this.getFocusElement();for(var i=0;parentNode;i++){if(parentNode.nodeName.toLowerCase()=="body")break;if(parentNode.nodeName.toLowerCase()=="#text"){i--;parentNode=parentNode.parentNode;continue;}if(i==value){this.selection.selectNode(parentNode,false);tinyMCE.triggerNodeChange();tinyMCE.selectedNode=parentNode;return;}parentNode=parentNode.parentNode;}break;case"SetStyleInfo":var rng=this.getRng();var sel=this.getSel();var scmd=value['command'];var sname=value['name'];var svalue=value['value']==null?'':value['value'];var wrapper=value['wrapper']?value['wrapper']:"span";var parentElm=null;var invalidRe=new RegExp("^BODY|HTML$","g");var invalidParentsRe=tinyMCE.settings['merge_styles_invalid_parents']!=''?new RegExp(tinyMCE.settings['merge_styles_invalid_parents'],"gi"):null;if(tinyMCE.isMSIE){if(rng.item)parentElm=rng.item(0);else{var pelm=rng.parentElement();var prng=doc.selection.createRange();prng.moveToElementText(pelm);if(rng.htmlText==prng.htmlText||rng.boundingWidth==0){if(invalidParentsRe==null||!invalidParentsRe.test(pelm.nodeName))parentElm=pelm;}}}else{var felm=this.getFocusElement();if(sel.isCollapsed||(new RegExp('td|tr|tbody|table','gi').test(felm.nodeName)&&sel.anchorNode==felm.parentNode))parentElm=felm;}if(parentElm&&!invalidRe.test(parentElm.nodeName)){if(scmd=="setstyle")tinyMCE.setStyleAttrib(parentElm,sname,svalue);if(scmd=="setattrib")tinyMCE.setAttrib(parentElm,sname,svalue);if(scmd=="removeformat"){parentElm.style.cssText='';tinyMCE.setAttrib(parentElm,'class','');}var ch=tinyMCE.getNodeTree(parentElm,new Array(),1);for(var z=0;z<ch.length;z++){if(ch[z]==parentElm)continue;if(scmd=="setstyle")tinyMCE.setStyleAttrib(ch[z],sname,'');if(scmd=="setattrib")tinyMCE.setAttrib(ch[z],sname,'');if(scmd=="removeformat"){ch[z].style.cssText='';tinyMCE.setAttrib(ch[z],'class','');}}}else{this._setUseCSS(false);doc.execCommand("FontName",false,"#mce_temp_font#");var elementArray=tinyMCE.getElementsByAttributeValue(this.getBody(),"font","face","#mce_temp_font#");for(var x=0;x<elementArray.length;x++){elm=elementArray[x];if(elm){var spanElm=doc.createElement(wrapper);if(scmd=="setstyle")tinyMCE.setStyleAttrib(spanElm,sname,svalue);if(scmd=="setattrib")tinyMCE.setAttrib(spanElm,sname,svalue);if(scmd=="removeformat"){spanElm.style.cssText='';tinyMCE.setAttrib(spanElm,'class','');}if(elm.hasChildNodes()){for(var i=0;i<elm.childNodes.length;i++)spanElm.appendChild(elm.childNodes[i].cloneNode(true));}spanElm.setAttribute("mce_new","true");elm.parentNode.replaceChild(spanElm,elm);var ch=tinyMCE.getNodeTree(spanElm,new Array(),1);for(var z=0;z<ch.length;z++){if(ch[z]==spanElm)continue;if(scmd=="setstyle")tinyMCE.setStyleAttrib(ch[z],sname,'');if(scmd=="setattrib")tinyMCE.setAttrib(ch[z],sname,'');if(scmd=="removeformat"){ch[z].style.cssText='';tinyMCE.setAttrib(ch[z],'class','');}}}}}var nodes=doc.getElementsByTagName(wrapper);for(var i=nodes.length-1;i>=0;i--){var elm=nodes[i];var isNew=tinyMCE.getAttrib(elm,"mce_new")=="true";elm.removeAttribute("mce_new");if(elm.childNodes&&elm.childNodes.length==1&&elm.childNodes[0].nodeType==1){this._mergeElements(scmd,elm,elm.childNodes[0],isNew);continue;}if(elm.parentNode.childNodes.length==1&&!invalidRe.test(elm.nodeName)&&!invalidRe.test(elm.parentNode.nodeName)){if(invalidParentsRe==null||!invalidParentsRe.test(elm.parentNode.nodeName))this._mergeElements(scmd,elm.parentNode,elm,false);}}var nodes=doc.getElementsByTagName(wrapper);for(var i=nodes.length-1;i>=0;i--){var elm=nodes[i];var isEmpty=true;var tmp=doc.createElement("body");tmp.appendChild(elm.cloneNode(false));tmp.innerHTML=tmp.innerHTML.replace(new RegExp('style=""|class=""','gi'),'');if(new RegExp('<span>','gi').test(tmp.innerHTML)){for(var x=0;x<elm.childNodes.length;x++){if(elm.parentNode!=null)elm.parentNode.insertBefore(elm.childNodes[x].cloneNode(true),elm);}elm.parentNode.removeChild(elm);}}if(scmd=="removeformat")tinyMCE.handleVisualAid(this.getBody(),true,this.visualAid,this);tinyMCE.triggerNodeChange();break;case"FontName":if(value==null){var s=this.getSel();if(tinyMCE.isGecko&&s.isCollapsed){var f=tinyMCE.getParentElement(this.getFocusElement(),"font");if(f!=null)this.selection.selectNode(f,false);}this.getDoc().execCommand("RemoveFormat",false,null);if(f!=null&&tinyMCE.isGecko){var r=this.getRng().cloneRange();r.collapse(true);s.removeAllRanges();s.addRange(r);}}else this.getDoc().execCommand('FontName',false,value);if(tinyMCE.isGecko)window.setTimeout('tinyMCE.triggerNodeChange(false);',1);return;case"FontSize":this.getDoc().execCommand('FontSize',false,value);if(tinyMCE.isGecko)window.setTimeout('tinyMCE.triggerNodeChange(false);',1);return;case"forecolor":this.getDoc().execCommand('forecolor',false,value);break;case"HiliteColor":if(tinyMCE.isGecko){this._setUseCSS(true);this.getDoc().execCommand('hilitecolor',false,value);this._setUseCSS(false);}else this.getDoc().execCommand('BackColor',false,value);break;case"Cut":case"Copy":case"Paste":var cmdFailed=false;eval('try {this.getDoc().execCommand(command, user_interface, value);} catch (e) {cmdFailed = true;}');if(tinyMCE.isOpera&&cmdFailed)alert('Currently not supported by your browser, use keyboard shortcuts instead.');if(tinyMCE.isGecko&&cmdFailed){if(confirm(tinyMCE.entityDecode(tinyMCE.getLang('lang_clipboard_msg'))))window.open('http://www.mozilla.org/editor/midasdemo/securityprefs.html','mceExternal');return;}else tinyMCE.triggerNodeChange();break;case"mceSetContent":if(!value)value="";value=tinyMCE.storeAwayURLs(value);value=tinyMCE._customCleanup(this,"insert_to_editor",value);tinyMCE._setHTML(doc,value);tinyMCE.setInnerHTML(doc.body,tinyMCE._cleanupHTML(this,doc,tinyMCE.settings,doc.body));tinyMCE.convertAllRelativeURLs(doc.body);tinyMCE._removeInternal(this.getBody());if(tinyMCE.getParam("convert_fonts_to_spans"))tinyMCE.convertSpansToFonts(doc);tinyMCE.handleVisualAid(doc.body,true,this.visualAid,this);tinyMCE._setEventsEnabled(doc.body,false);return true;case"mceCleanup":var b=this.selection.getBookmark();tinyMCE._setHTML(this.contentDocument,this.getBody().innerHTML);tinyMCE.setInnerHTML(this.getBody(),tinyMCE._cleanupHTML(this,this.contentDocument,this.settings,this.getBody(),this.visualAid));tinyMCE.convertAllRelativeURLs(doc.body);if(tinyMCE.getParam("convert_fonts_to_spans"))tinyMCE.convertSpansToFonts(doc);tinyMCE.handleVisualAid(this.getBody(),true,this.visualAid,this);tinyMCE._setEventsEnabled(this.getBody(),false);this.repaint();this.selection.moveToBookmark(b);tinyMCE.triggerNodeChange();break;case"mceReplaceContent":if(!value)value='';this.getWin().focus();var selectedText="";if(tinyMCE.isMSIE){var rng=doc.selection.createRange();selectedText=rng.text;}else selectedText=this.getSel().toString();if(selectedText.length>0){value=tinyMCE.replaceVar(value,"selection",selectedText);tinyMCE.execCommand('mceInsertContent',false,value);}tinyMCE.triggerNodeChange();break;case"mceSetAttribute":if(typeof(value)=='object'){var targetElms=(typeof(value['targets'])=="undefined")?"p,img,span,div,td,h1,h2,h3,h4,h5,h6,pre,address":value['targets'];var targetNode=tinyMCE.getParentElement(this.getFocusElement(),targetElms);if(targetNode){targetNode.setAttribute(value['name'],value['value']);tinyMCE.triggerNodeChange();}}break;case"mceSetCSSClass":this.execCommand("SetStyleInfo",false,{command:"setattrib",name:"class",value:value});break;case"mceInsertRawHTML":var key='tiny_mce_marker';this.execCommand('mceBeginUndoLevel');this.execCommand('mceInsertContent',false,key);var scrollX=this.getDoc().body.scrollLeft+this.getDoc().documentElement.scrollLeft;var scrollY=this.getDoc().body.scrollTop+this.getDoc().documentElement.scrollTop;var html=this.getBody().innerHTML;if((pos=html.indexOf(key))!=-1)tinyMCE.setInnerHTML(this.getBody(),html.substring(0,pos)+value+html.substring(pos+key.length));this.contentWindow.scrollTo(scrollX,scrollY);this.execCommand('mceEndUndoLevel');break;case"mceInsertContent":if(!value)value='';var insertHTMLFailed=false;this.getWin().focus();if(tinyMCE.isGecko||tinyMCE.isOpera){try{if(value.indexOf('<')==-1&&!value.match(/(&#38;|&#160;|&#60;|&#62;)/g)){var r=this.getRng();var n=this.getDoc().createTextNode(tinyMCE.entityDecode(value));var s=this.getSel();var r2=r.cloneRange();s.removeAllRanges();r.deleteContents();r.insertNode(n);r2.selectNode(n);r2.collapse(false);s.removeAllRanges();s.addRange(r2);}else{value=tinyMCE.fixGeckoBaseHREFBug(1,this.getDoc(),value);this.getDoc().execCommand('inserthtml',false,value);tinyMCE.fixGeckoBaseHREFBug(2,this.getDoc(),value);}}catch(ex){insertHTMLFailed=true;}if(!insertHTMLFailed){tinyMCE.triggerNodeChange();return;}}if(tinyMCE.isOpera&&insertHTMLFailed){this.getDoc().execCommand("insertimage",false,tinyMCE.uniqueURL);var ar=tinyMCE.getElementsByAttributeValue(this.getBody(),"img","src",tinyMCE.uniqueURL);ar[0].outerHTML=value;return;}if(!tinyMCE.isMSIE){var isHTML=value.indexOf('<')!=-1;var sel=this.getSel();var rng=this.getRng();if(isHTML){if(tinyMCE.isSafari){var tmpRng=this.getDoc().createRange();tmpRng.setStart(this.getBody(),0);tmpRng.setEnd(this.getBody(),0);value=tmpRng.createContextualFragment(value);}else value=rng.createContextualFragment(value);}else{var el=document.createElement("div");el.innerHTML=value;value=el.firstChild.nodeValue;value=doc.createTextNode(value);}if(tinyMCE.isSafari&&!isHTML){this.execCommand('InsertText',false,value.nodeValue);tinyMCE.triggerNodeChange();return true;}else if(tinyMCE.isSafari&&isHTML){rng.deleteContents();rng.insertNode(value);tinyMCE.triggerNodeChange();return true;}rng.deleteContents();if(rng.startContainer.nodeType==3){var node=rng.startContainer.splitText(rng.startOffset);node.parentNode.insertBefore(value,node);}else rng.insertNode(value);if(!isHTML){sel.selectAllChildren(doc.body);sel.removeAllRanges();var rng=doc.createRange();rng.selectNode(value);rng.collapse(false);sel.addRange(rng);}else rng.collapse(false);tinyMCE.fixGeckoBaseHREFBug(2,this.getDoc(),value);}else{var rng=doc.selection.createRange();var c=value.indexOf('<!--')!=-1;if(c)value=tinyMCE.uniqueTag+value;if(rng.item)rng.item(0).outerHTML=value;else rng.pasteHTML(value);if(c){var e=this.getDoc().getElementById('mceTMPElement');e.parentNode.removeChild(e);}}tinyMCE.triggerNodeChange();break;case"mceStartTyping":if(tinyMCE.settings['custom_undo_redo']&&this.undoRedo.typingUndoIndex==-1){this.undoRedo.typingUndoIndex=this.undoRedo.undoIndex;this.execCommand('mceAddUndoLevel');}break;case"mceEndTyping":if(tinyMCE.settings['custom_undo_redo']&&this.undoRedo.typingUndoIndex!=-1){this.execCommand('mceAddUndoLevel');this.undoRedo.typingUndoIndex=-1;}break;case"mceBeginUndoLevel":this.undoRedoLevel=false;break;case"mceEndUndoLevel":this.undoRedoLevel=true;this.execCommand('mceAddUndoLevel');break;case"mceAddUndoLevel":if(tinyMCE.settings['custom_undo_redo']&&this.undoRedoLevel){if(this.undoRedo.add())tinyMCE.triggerNodeChange(false);}break;case"Undo":if(tinyMCE.settings['custom_undo_redo']){tinyMCE.execCommand("mceEndTyping");this.undoRedo.undo();tinyMCE.triggerNodeChange();}else this.getDoc().execCommand(command,user_interface,value);break;case"Redo":if(tinyMCE.settings['custom_undo_redo']){tinyMCE.execCommand("mceEndTyping");this.undoRedo.redo();tinyMCE.triggerNodeChange();}else this.getDoc().execCommand(command,user_interface,value);break;case"mceToggleVisualAid":this.visualAid=!this.visualAid;tinyMCE.handleVisualAid(this.getBody(),true,this.visualAid,this);tinyMCE.triggerNodeChange();break;case"Indent":this.getDoc().execCommand(command,user_interface,value);tinyMCE.triggerNodeChange();if(tinyMCE.isMSIE){var n=tinyMCE.getParentElement(this.getFocusElement(),"blockquote");do{if(n&&n.nodeName=="BLOCKQUOTE"){n.removeAttribute("dir");n.removeAttribute("style");}}while(n!=null&&(n=n.parentNode)!=null);}break;case"removeformat":var text=this.selection.getSelectedText();if(tinyMCE.isOpera){this.getDoc().execCommand("RemoveFormat",false,null);return;}if(tinyMCE.isMSIE){try{var rng=doc.selection.createRange();rng.execCommand("RemoveFormat",false,null);}catch(e){}this.execCommand("SetStyleInfo",false,{command:"removeformat"});}else{this.getDoc().execCommand(command,user_interface,value);this.execCommand("SetStyleInfo",false,{command:"removeformat"});}if(text.length==0)this.execCommand("mceSetCSSClass",false,"");tinyMCE.triggerNodeChange();break;default:this.getDoc().execCommand(command,user_interface,value);if(tinyMCE.isGecko)window.setTimeout('tinyMCE.triggerNodeChange(false);',1);else tinyMCE.triggerNodeChange();}if(command!="mceAddUndoLevel"&&command!="Undo"&&command!="Redo"&&command!="mceStartTyping"&&command!="mceEndTyping")tinyMCE.execCommand("mceAddUndoLevel");},queryCommandValue:function(c){try{return this.getDoc().queryCommandValue(c);}catch(e){return null;}},queryCommandState:function(c){return this.getDoc().queryCommandState(c);},_onAdd:function(replace_element,form_element_name,target_document){var hc,th,to,editorTemplate;th=this.settings['theme'];to=tinyMCE.themes[th];var targetDoc=target_document?target_document:document;this.targetDoc=targetDoc;tinyMCE.themeURL=tinyMCE.baseURL+"/themes/"+this.settings['theme'];this.settings['themeurl']=tinyMCE.themeURL;if(!replace_element){alert("Error: Could not find the target element.");return false;}if(to.getEditorTemplate)editorTemplate=to.getEditorTemplate(this.settings,this.editorId);var deltaWidth=editorTemplate['delta_width']?editorTemplate['delta_width']:0;var deltaHeight=editorTemplate['delta_height']?editorTemplate['delta_height']:0;var html='<span id="'+this.editorId+'_parent" class="mceEditorContainer">'+editorTemplate['html'];html=tinyMCE.replaceVar(html,"editor_id",this.editorId);this.settings['default_document']=tinyMCE.baseURL+"/blank.htm";this.settings['old_width']=this.settings['width'];this.settings['old_height']=this.settings['height'];if(this.settings['width']==-1)this.settings['width']=replace_element.offsetWidth;if(this.settings['height']==-1)this.settings['height']=replace_element.offsetHeight;if(this.settings['width']==0)this.settings['width']=replace_element.style.width;if(this.settings['height']==0)this.settings['height']=replace_element.style.height;if(this.settings['width']==0)this.settings['width']=320;if(this.settings['height']==0)this.settings['height']=240;this.settings['area_width']=parseInt(this.settings['width']);this.settings['area_height']=parseInt(this.settings['height']);this.settings['area_width']+=deltaWidth;this.settings['area_height']+=deltaHeight;if((""+this.settings['width']).indexOf('%')!=-1)this.settings['area_width']="100%";if((""+this.settings['height']).indexOf('%')!=-1)this.settings['area_height']="100%";if((""+replace_element.style.width).indexOf('%')!=-1){this.settings['width']=replace_element.style.width;this.settings['area_width']="100%";}if((""+replace_element.style.height).indexOf('%')!=-1){this.settings['height']=replace_element.style.height;this.settings['area_height']="100%";}html=tinyMCE.applyTemplate(html);this.settings['width']=this.settings['old_width'];this.settings['height']=this.settings['old_height'];this.visualAid=this.settings['visual'];this.formTargetElementId=form_element_name;if(replace_element.nodeName=="TEXTAREA"||replace_element.nodeName=="INPUT")this.startContent=replace_element.value;else this.startContent=replace_element.innerHTML;if(replace_element.nodeName!="TEXTAREA"&&replace_element.nodeName!="INPUT"){this.oldTargetElement=replace_element;if(tinyMCE.settings['debug']){hc='<textarea wrap="off" id="'+form_element_name+'" name="'+form_element_name+'" cols="100" rows="15"></textarea>';}else{hc='<input type="hidden" id="'+form_element_name+'" name="'+form_element_name+'" />';this.oldTargetElement.style.display="none";}html+='</span>';if(tinyMCE.isGecko)html=hc+html;else html+=hc;if(tinyMCE.isGecko){var rng=replace_element.ownerDocument.createRange();rng.setStartBefore(replace_element);var fragment=rng.createContextualFragment(html);tinyMCE.insertAfter(fragment,replace_element);}else replace_element.insertAdjacentHTML("beforeBegin",html);}else{html+='</span>';this.oldTargetElement=replace_element;if(!tinyMCE.settings['debug'])this.oldTargetElement.style.display="none";if(tinyMCE.isGecko){var rng=replace_element.ownerDocument.createRange();rng.setStartBefore(replace_element);var fragment=rng.createContextualFragment(html);tinyMCE.insertAfter(fragment,replace_element);}else replace_element.insertAdjacentHTML("beforeBegin",html);}var dynamicIFrame=false;var tElm=targetDoc.getElementById(this.editorId);if(!tinyMCE.isMSIE){if(tElm&&(tElm.nodeName=="SPAN"||tElm.nodeName=="span")){tElm=tinyMCE._createIFrame(tElm,targetDoc);dynamicIFrame=true;}this.targetElement=tElm;this.iframeElement=tElm;this.contentDocument=tElm.contentDocument;this.contentWindow=tElm.contentWindow;}else{if(tElm&&tElm.nodeName=="SPAN")tElm=tinyMCE._createIFrame(tElm,targetDoc,targetDoc.parentWindow);else tElm=targetDoc.frames[this.editorId];this.targetElement=tElm;this.iframeElement=targetDoc.getElementById(this.editorId);if(tinyMCE.isOpera){this.contentDocument=this.iframeElement.contentDocument;this.contentWindow=this.iframeElement.contentWindow;dynamicIFrame=true;}else{this.contentDocument=tElm.window.document;this.contentWindow=tElm.window;}this.getDoc().designMode="on";}var doc=this.contentDocument;if(dynamicIFrame){var html=tinyMCE.getParam('doctype')+'<html><head xmlns="http://www.w3.org/1999/xhtml"><base href="'+tinyMCE.settings['base_href']+'" /><title>blank_page</title><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body class="mceContentBody"></body></html>';try{if(!this.isHidden())this.getDoc().designMode="on";doc.open();doc.write(html);doc.close();}catch(e){this.getDoc().location.href=tinyMCE.baseURL+"/blank.htm";}}if(tinyMCE.isMSIE)window.setTimeout("tinyMCE.addEventHandlers(tinyMCE.instances[\""+this.editorId+"\"]);",1);tinyMCE.setupContent(this.editorId,true);return true;},setBaseHREF:function(u){var h,b,d,nl;d=this.getDoc();nl=d.getElementsByTagName("base");b=nl.length>0?nl[0]:null;if(!b){nl=d.getElementsByTagName("head");h=nl.length>0?nl[0]:null;b=d.createElement("base");b.setAttribute('href',u);h.appendChild(b);}else{if(u==""||u==null)b.parentNode.removeChild(b);else b.setAttribute('href',u);}},getFocusElement:function(){return this.selection.getFocusElement();},getSel:function(){return this.selection.getSel();},getRng:function(){return this.selection.getRng();},triggerSave:function(skip_cleanup,skip_callback){var e,nl=new Array(),i,s;this.switchSettings();s=tinyMCE.settings;if(tinyMCE.isMSIE&&!tinyMCE.isOpera){e=this.iframeElement;do{if(e.style&&e.style.display=='none'){e.style.display='block';nl[nl.length]={elm:e,type:'style'};}if(e.style&&s.hidden_tab_class.length>0&&e.className.indexOf(s.hidden_tab_class)!=-1){e.className=s.display_tab_class;nl[nl.length]={elm:e,type:'class'};}}while((e=e.parentNode)!=null)}tinyMCE.settings['preformatted']=false;if(typeof(skip_cleanup)=="undefined")skip_cleanup=false;if(typeof(skip_callback)=="undefined")skip_callback=false;tinyMCE._setHTML(this.getDoc(),this.getBody().innerHTML);if(this.settings['cleanup']==false){tinyMCE.handleVisualAid(this.getBody(),true,false,this);tinyMCE._setEventsEnabled(this.getBody(),true);}tinyMCE._customCleanup(this,"submit_content_dom",this.contentWindow.document.body);var htm=skip_cleanup?this.getBody().innerHTML:tinyMCE._cleanupHTML(this,this.getDoc(),this.settings,this.getBody(),tinyMCE.visualAid,true,true);htm=tinyMCE._customCleanup(this,"submit_content",htm);if(!skip_callback&&tinyMCE.settings['save_callback']!="")var content=eval(tinyMCE.settings['save_callback']+"(this.formTargetElementId,htm,this.getBody());");if((typeof(content)!="undefined")&&content!=null)htm=content;htm=tinyMCE.regexpReplace(htm,"&#40;","(","gi");htm=tinyMCE.regexpReplace(htm,"&#41;",")","gi");htm=tinyMCE.regexpReplace(htm,"&#59;",";","gi");htm=tinyMCE.regexpReplace(htm,"&#34;","&quot;","gi");htm=tinyMCE.regexpReplace(htm,"&#94;","^","gi");if(this.formElement)this.formElement.value=htm;if(tinyMCE.isSafari&&this.formElement)this.formElement.innerText=htm;for(i=0;i<nl.length;i++){if(nl[i].type=='style')nl[i].elm.style.display='none';else nl[i].elm.className=s.hidden_tab_class;}}};TinyMCE_Engine.prototype.cleanupHTMLCode=function(s){s=s.replace(new RegExp('<p \\/>','gi'),'<p>&nbsp;</p>');s=s.replace(new RegExp('<p>\\s*<\\/p>','gi'),'<p>&nbsp;</p>');s=s.replace(new RegExp('<br>\\s*<\\/br>','gi'),'<br />');s=s.replace(new RegExp('<(h[1-6]|p|div|address|pre|form|table|li|ol|ul|td|b|font|em|strong|i|strike|u|span|a|ul|ol|li|blockquote)([a-z]*)([^\\\\|>]*)\\/>','gi'),'<$1$2$3></$1$2>');s=s.replace(new RegExp('\\s+></','gi'),'></');s=s.replace(new RegExp('<(img|br|hr)([^>]*)><\\/(img|br|hr)>','gi'),'<$1$2 />');if(tinyMCE.isMSIE)s=s.replace(new RegExp('<p><hr \\/><\\/p>','gi'),"<hr>");if(tinyMCE.getParam('convert_urls'))s=s.replace(new RegExp('(href=\"{0,1})(\\s*#)','gi'),'$1'+tinyMCE.settings['document_base_url']+"#");return s;};TinyMCE_Engine.prototype.parseStyle=function(str){var ar=new Array();if(str==null)return ar;var st=str.split(';');tinyMCE.clearArray(ar);for(var i=0;i<st.length;i++){if(st[i]=='')continue;var re=new RegExp('^\\s*([^:]*):\\s*(.*)\\s*$');var pa=st[i].replace(re,'$1||$2').split('||');if(pa.length==2)ar[pa[0].toLowerCase()]=pa[1];}return ar;};TinyMCE_Engine.prototype.compressStyle=function(ar,pr,sf,res){var box=new Array();box[0]=ar[pr+'-top'+sf];box[1]=ar[pr+'-left'+sf];box[2]=ar[pr+'-right'+sf];box[3]=ar[pr+'-bottom'+sf];for(var i=0;i<box.length;i++){if(box[i]==null)return;for(var a=0;a<box.length;a++){if(box[a]!=box[i])return;}}ar[res]=box[0];ar[pr+'-top'+sf]=null;ar[pr+'-left'+sf]=null;ar[pr+'-right'+sf]=null;ar[pr+'-bottom'+sf]=null;};TinyMCE_Engine.prototype.serializeStyle=function(ar){var str="";tinyMCE.compressStyle(ar,"border","","border");tinyMCE.compressStyle(ar,"border","-width","border-width");tinyMCE.compressStyle(ar,"border","-color","border-color");tinyMCE.compressStyle(ar,"border","-style","border-style");tinyMCE.compressStyle(ar,"padding","","padding");tinyMCE.compressStyle(ar,"margin","","margin");for(var key in ar){var val=ar[key];if(typeof(val)=='function')continue;if(key.indexOf('mso-')==0)continue;if(val!=null&&val!=''){val=''+val;val=val.replace(new RegExp("url\\(\\'?([^\\']*)\\'?\\)",'gi'),"url('$1')");if(val.indexOf('url(')!=-1&&tinyMCE.getParam('convert_urls')){var m=new RegExp("url\\('(.*?)'\\)").exec(val);if(m.length>1)val="url('"+eval(tinyMCE.getParam('urlconverter_callback')+"(m[1], null, true);")+"')";}if(tinyMCE.getParam("force_hex_style_colors"))val=tinyMCE.convertRGBToHex(val,true);if(val!="url('')")str+=key.toLowerCase()+": "+val+"; ";}}if(new RegExp('; $').test(str))str=str.substring(0,str.length-2);return str;};TinyMCE_Engine.prototype.convertRGBToHex=function(s,k){if(s.toLowerCase().indexOf('rgb')!=-1){var re=new RegExp("(.*?)rgb\\s*?\\(\\s*?([0-9]+).*?,\\s*?([0-9]+).*?,\\s*?([0-9]+).*?\\)(.*?)","gi");var rgb=s.replace(re,"$1,$2,$3,$4,$5").split(',');if(rgb.length==5){r=parseInt(rgb[1]).toString(16);g=parseInt(rgb[2]).toString(16);b=parseInt(rgb[3]).toString(16);r=r.length==1?'0'+r:r;g=g.length==1?'0'+g:g;b=b.length==1?'0'+b:b;s="#"+r+g+b;if(k)s=rgb[0]+s+rgb[4];}}return s;};TinyMCE_Engine.prototype.convertHexToRGB=function(s){if(s.indexOf('#')!=-1){s=s.replace(new RegExp('[^0-9A-F]','gi'),'');return"rgb("+parseInt(s.substring(0,2),16)+","+parseInt(s.substring(2,4),16)+","+parseInt(s.substring(4,6),16)+")";}return s;};TinyMCE_Engine.prototype.convertSpansToFonts=function(doc){var sizes=tinyMCE.getParam('font_size_style_values').replace(/\s+/,'').split(',');var h=doc.body.innerHTML;h=h.replace(/<span/gi,'<font');h=h.replace(/<\/span/gi,'</font');doc.body.innerHTML=h;var s=doc.getElementsByTagName("font");for(var i=0;i<s.length;i++){var size=tinyMCE.trim(s[i].style.fontSize).toLowerCase();var fSize=0;for(var x=0;x<sizes.length;x++){if(sizes[x]==size){fSize=x+1;break;}}if(fSize>0){tinyMCE.setAttrib(s[i],'size',fSize);s[i].style.fontSize='';}var fFace=s[i].style.fontFamily;if(fFace!=null&&fFace!=""){tinyMCE.setAttrib(s[i],'face',fFace);s[i].style.fontFamily='';}var fColor=s[i].style.color;if(fColor!=null&&fColor!=""){tinyMCE.setAttrib(s[i],'color',tinyMCE.convertRGBToHex(fColor));s[i].style.color='';}}};TinyMCE_Engine.prototype.convertFontsToSpans=function(doc){var sizes=tinyMCE.getParam('font_size_style_values').replace(/\s+/,'').split(',');var h=doc.body.innerHTML;h=h.replace(/<font/gi,'<span');h=h.replace(/<\/font/gi,'</span');doc.body.innerHTML=h;var fsClasses=tinyMCE.getParam('font_size_classes');if(fsClasses!='')fsClasses=fsClasses.replace(/\s+/,'').split(',');else fsClasses=null;var s=doc.getElementsByTagName("span");for(var i=0;i<s.length;i++){var fSize,fFace,fColor;fSize=tinyMCE.getAttrib(s[i],'size');fFace=tinyMCE.getAttrib(s[i],'face');fColor=tinyMCE.getAttrib(s[i],'color');if(fSize!=""){fSize=parseInt(fSize);if(fSize>0&&fSize<8){if(fsClasses!=null)tinyMCE.setAttrib(s[i],'class',fsClasses[fSize-1]);else s[i].style.fontSize=sizes[fSize-1];}s[i].removeAttribute('size');}if(fFace!=""){s[i].style.fontFamily=fFace;s[i].removeAttribute('face');}if(fColor!=""){s[i].style.color=fColor;s[i].removeAttribute('color');}}};TinyMCE_Engine.prototype.cleanupAnchors=function(doc){var i,cn,x,an=doc.getElementsByTagName("a");for(i=an.length-1;i>=0;i--){if(tinyMCE.getAttrib(an[i],"name")!=""&&tinyMCE.getAttrib(an[i],"href")==""){cn=an[i].childNodes;for(x=cn.length-1;x>=0;x--)tinyMCE.insertAfter(cn[x],an[i]);}}};TinyMCE_Engine.prototype.getContent=function(editor_id){var h;if(typeof(editor_id)!="undefined")tinyMCE.selectedInstance=tinyMCE.getInstanceById(editor_id);if(tinyMCE.selectedInstance){h=tinyMCE._cleanupHTML(this.selectedInstance,this.selectedInstance.getDoc(),tinyMCE.settings,this.selectedInstance.getBody(),false,true);if(tinyMCE.getParam("convert_fonts_to_spans"))tinyMCE.convertSpansToFonts(this.selectedInstance.getDoc());return h;}return null;};TinyMCE_Engine.prototype._fixListElements=function(d){var nl,x,a=['ol','ul'],i,n,p,r=new RegExp('^(OL|UL)$'),np;for(x=0;x<a.length;x++){nl=d.getElementsByTagName(a[x]);for(i=0;i<nl.length;i++){n=nl[i];p=n.parentNode;if(r.test(p.nodeName)){np=tinyMCE.prevNode(n,'LI');if(!np){np=d.createElement('li');np.innerHTML='&nbsp;';np.appendChild(n);p.insertBefore(np,p.firstChild);}else np.appendChild(n);}}}};TinyMCE_Engine.prototype._fixTables=function(d){var nl,i,n,p,np,x,t;nl=d.getElementsByTagName('table');for(i=0;i<nl.length;i++){n=nl[i];if((p=tinyMCE.getParentElement(n,'p,div,h1,h2,h3,h4,h5,h6'))!=null){np=p.cloneNode(false);np.removeAttribute('id');t=n;while((n=n.nextSibling))np.appendChild(n);tinyMCE.insertAfter(np,p);tinyMCE.insertAfter(t,p);}}};TinyMCE_Engine.prototype._cleanupHTML=function(inst,doc,config,elm,visual,on_save,on_submit){var h,d,t1,t2,t3,t4,t5,c,s;if(!tinyMCE.getParam('cleanup'))return elm.innerHTML;on_save=typeof(on_save)=='undefined'?false:on_save;c=inst.cleanup;s=inst.settings;d=c.settings.debug;if(d)t1=new Date().getTime();if(tinyMCE.getParam("convert_fonts_to_spans"))tinyMCE.convertFontsToSpans(doc);if(tinyMCE.getParam("fix_list_elements"))tinyMCE._fixListElements(doc);if(tinyMCE.getParam("fix_table_elements"))tinyMCE._fixTables(doc);tinyMCE._customCleanup(inst,on_save?"get_from_editor_dom":"insert_to_editor_dom",doc.body);if(d)t2=new Date().getTime();c.settings.on_save=on_save;c.idCount=0;c.serializationId++;c.serializedNodes=new Array();c.sourceIndex=-1;if(s.cleanup_serializer=="xml")h=c.serializeNodeAsXML(elm);else h=c.serializeNodeAsHTML(elm);if(d)t3=new Date().getTime();h=h.replace(/<\/?(body|head|html)[^>]*>/gi,'');h=h.replace(new RegExp(' (rowspan="1"|colspan="1")','g'),'');h=h.replace(/<p><hr \/><\/p>/g,'<hr />');h=h.replace(/<p>(&nbsp;|&#160;)<\/p><hr \/><p>(&nbsp;|&#160;)<\/p>/g,'<hr />');h=h.replace(/<td>\s*<br \/>\s*<\/td>/g,'<td>&nbsp;</td>');h=h.replace(/<p>\s*<br \/>\s*<\/p>/g,'<p>&nbsp;</p>');h=h.replace(/<p>\s*(&nbsp;|&#160;)\s*<br \/>\s*(&nbsp;|&#160;)\s*<\/p>/g,'<p>&nbsp;</p>');h=h.replace(/<p>\s*(&nbsp;|&#160;)\s*<br \/>\s*<\/p>/g,'<p>&nbsp;</p>');h=h.replace(/<p>\s*<br \/>\s*&nbsp;\s*<\/p>/g,'<p>&nbsp;</p>');h=h.replace(new RegExp('<a>(.*?)<\\/a>','g'),'$1');h=h.replace(/<p([^>]*)>\s*<\/p>/g,'<p$1>&nbsp;</p>');if(/^\s*(<br \/>|<p>&nbsp;<\/p>|<p>&#160;<\/p>|<p><\/p>)\s*$/.test(h))h='';if(s.preformatted){h=h.replace(/^<pre>/,'');h=h.replace(/<\/pre>$/,'');h='<pre>'+h+'</pre>';}if(tinyMCE.isGecko){h=h.replace(/<o:p _moz-userdefined="" \/>/g,'');h=h.replace(/<td([^>]*)>\s*<br \/>\s*<\/td>/g,'<td$1>&nbsp;</td>');}if(s.force_br_newlines)h=h.replace(/<p>(&nbsp;|&#160;)<\/p>/g,'<br />');h=tinyMCE._customCleanup(inst,on_save?"get_from_editor":"insert_to_editor",h);if(on_save){h=h.replace(new RegExp(' ?(mceItem[a-zA-Z0-9]*|'+s.visual_table_class+')','g'),'');h=h.replace(new RegExp(' ?class=""','g'),'');}if(s.remove_linebreaks&&!c.settings.indent)h=h.replace(/\n|\r/g,' ');if(d)t4=new Date().getTime();if(on_save&&c.settings.indent)h=c.formatHTML(h);if(on_submit&&(s.encoding=="xml"||s.encoding=="html"))h=c.xmlEncode(h);if(d)t5=new Date().getTime();if(c.settings.debug)tinyMCE.debug("Cleanup in ms: Pre="+(t2-t1)+", Serialize: "+(t3-t2)+", Post: "+(t4-t3)+", Format: "+(t5-t4)+", Sum: "+(t5-t1)+".");return h;};function TinyMCE_Cleanup(){this.isMSIE=(navigator.appName=="Microsoft Internet Explorer");this.rules=tinyMCE.clearArray(new Array());this.settings={indent_elements:'head,table,tbody,thead,tfoot,form,tr,ul,ol,blockquote,object',newline_before_elements:'h1,h2,h3,h4,h5,h6,pre,address,div,ul,ol,li,meta,option,area,title,link,base,script,td',newline_after_elements:'br,hr,p,pre,address,div,ul,ol,meta,option,area,link,base,script',newline_before_after_elements:'html,head,body,table,thead,tbody,tfoot,tr,form,ul,ol,blockquote,p,object,param,hr,div',indent_char:'\t',indent_levels:1,entity_encoding:'raw',valid_elements:'*[*]',entities:'',url_converter:'',invalid_elements:'',verify_html:false};this.vElements=tinyMCE.clearArray(new Array());this.vElementsRe='';this.closeElementsRe=/^(IMG|BR|HR|LINK|META|BASE|INPUT|BUTTON|AREA)$/;this.codeElementsRe=/^(SCRIPT|STYLE)$/;this.serializationId=0;this.mceAttribs={href:'mce_href',src:'mce_src',type:'mce_type'};}TinyMCE_Cleanup.prototype={init:function(s){var n,a,i,ir,or,st;for(n in s)this.settings[n]=s[n];s=this.settings;this.inRe=this._arrayToRe(s.indent_elements.split(','),'','^<(',')[^>]*');this.ouRe=this._arrayToRe(s.indent_elements.split(','),'','^<\\/(',')[^>]*');this.nlBeforeRe=this._arrayToRe(s.newline_before_elements.split(','),'gi','<(',')([^>]*)>');this.nlAfterRe=this._arrayToRe(s.newline_after_elements.split(','),'gi','<(',')([^>]*)>');this.nlBeforeAfterRe=this._arrayToRe(s.newline_before_after_elements.split(','),'gi','<(\\/?)(',')([^>]*)>');if(s.invalid_elements!='')this.iveRe=this._arrayToRe(s.invalid_elements.toUpperCase().split(','),'g','^(',')$');else this.iveRe=null;st='';for(i=0;i<s.indent_levels;i++)st+=s.indent_char;this.inStr=st;if(!s.verify_html){s.valid_elements='*[*]';s.extended_valid_elements='';}this.fillStr=s.entity_encoding=="named"?"&nbsp;":"&#160;";this.idCount=0;},addRuleStr:function(s){var r=this.parseRuleStr(s);var n;for(n in r){if(r[n])this.rules[n]=r[n];}this.vElements=tinyMCE.clearArray(new Array());for(n in this.rules){if(this.rules[n])this.vElements[this.vElements.length]=this.rules[n].tag;}this.vElementsRe=this._arrayToRe(this.vElements,'');},parseRuleStr:function(s){var ta,p,r,a,i,x,px,t,tn,y,av,or=tinyMCE.clearArray(new Array()),dv;if(s==null||s.length==0)return or;ta=s.split(',');for(x=0;x<ta.length;x++){s=ta[x];if(s.length==0)continue;p=this.split(/\[|\]/,s);if(p==null||p.length<1)t=s.toUpperCase();else t=p[0].toUpperCase();tn=this.split('/',t);for(y=0;y<tn.length;y++){r={};r.tag=tn[y];r.forceAttribs=null;r.defaultAttribs=null;r.validAttribValues=null;px=r.tag.charAt(0);r.forceOpen=px=='+';r.removeEmpty=px=='-';r.fill=px=='#';r.tag=r.tag.replace(/\+|-|#/g,'');r.oTagName=tn[0].replace(/\+|-|#/g,'').toLowerCase();r.isWild=new RegExp('\\*|\\?|\\+','g').test(r.tag);r.validRe=new RegExp(this._wildcardToRe('^'+r.tag+'$'));if(p.length>1){r.vAttribsRe='^(';a=this.split(/\|/,p[1]);for(i=0;i<a.length;i++){t=a[i];av=new RegExp('(=|:|<)(.*?)$').exec(t);t=t.replace(new RegExp('(=|:|<).*?$'),'');if(av&&av.length>0){if(av[0].charAt(0)==':'){if(!r.forceAttribs)r.forceAttribs=tinyMCE.clearArray(new Array());r.forceAttribs[t.toLowerCase()]=av[0].substring(1);}else if(av[0].charAt(0)=='='){if(!r.defaultAttribs)r.defaultAttribs=tinyMCE.clearArray(new Array());dv=av[0].substring(1);r.defaultAttribs[t.toLowerCase()]=dv==""?"mce_empty":dv;}else if(av[0].charAt(0)=='<'){if(!r.validAttribValues)r.validAttribValues=tinyMCE.clearArray(new Array());r.validAttribValues[t.toLowerCase()]=this._arrayToRe(this.split('?',av[0].substring(1)),'');}}r.vAttribsRe+=''+t.toLowerCase()+(i!=a.length-1?'|':'');a[i]=t.toLowerCase();}r.vAttribsRe+=')$';r.vAttribsRe=this._wildcardToRe(r.vAttribsRe);r.vAttribsReIsWild=new RegExp('\\*|\\?|\\+','g').test(r.vAttribsRe);r.vAttribsRe=new RegExp(r.vAttribsRe);r.vAttribs=a.reverse();}else{r.vAttribsRe='';r.vAttribs=tinyMCE.clearArray(new Array());r.vAttribsReIsWild=false;}or[r.tag]=r;}}return or;},serializeNodeAsXML:function(n){var s,b;if(!this.xmlDoc){if(this.isMSIE){try{this.xmlDoc=new ActiveXObject('MSXML2.DOMDocument');}catch(e){}if(!this.xmlDoc)try{this.xmlDoc=new ActiveXObject('Microsoft.XmlDom');}catch(e){}}else this.xmlDoc=document.implementation.createDocument('','',null);if(!this.xmlDoc)alert("Error XML Parser could not be found.");}if(this.xmlDoc.firstChild)this.xmlDoc.removeChild(this.xmlDoc.firstChild);b=this.xmlDoc.createElement("html");b=this.xmlDoc.appendChild(b);this._convertToXML(n,b);if(this.isMSIE)return this.xmlDoc.xml;else return new XMLSerializer().serializeToString(this.xmlDoc);},_convertToXML:function(n,xn){var xd,el,i,l,cn,at,no,hc=false;if(this._isDuplicate(n))return;xd=this.xmlDoc;switch(n.nodeType){case 1:hc=n.hasChildNodes();el=xd.createElement(n.nodeName.toLowerCase());at=n.attributes;for(i=at.length-1;i>-1;i--){no=at[i];if(no.specified&&no.nodeValue)el.setAttribute(no.nodeName.toLowerCase(),no.nodeValue);}if(!hc&&!this.closeElementsRe.test(n.nodeName))el.appendChild(xd.createTextNode(""));xn=xn.appendChild(el);break;case 3:xn.appendChild(xd.createTextNode(n.nodeValue));return;case 8:xn.appendChild(xd.createComment(n.nodeValue));return;}if(hc){cn=n.childNodes;for(i=0,l=cn.length;i<l;i++)this._convertToXML(cn[i],xn);}},serializeNodeAsHTML:function(n){var en,no,h='',i,l,r,cn,va=false,f=false,at,hc;this._setupRules();if(this._isDuplicate(n))return'';switch(n.nodeType){case 1:hc=n.hasChildNodes();if((tinyMCE.isMSIE&&!tinyMCE.isOpera)&&n.nodeName.indexOf('/')!=-1)break;if(this.vElementsRe.test(n.nodeName)&&(!this.iveRe||!this.iveRe.test(n.nodeName))){va=true;r=this.rules[n.nodeName];if(!r){at=this.rules;for(no in at){if(at[no]&&at[no].validRe.test(n.nodeName)){r=at[no];break;}}}en=r.isWild?n.nodeName.toLowerCase():r.oTagName;f=r.fill;if(r.removeEmpty&&!hc)return"";h+='<'+en;if(r.vAttribsReIsWild){at=n.attributes;for(i=at.length-1;i>-1;i--){no=at[i];if(no.specified&&r.vAttribsRe.test(no.nodeName))h+=this._serializeAttribute(n,r,no.nodeName);}}else{for(i=r.vAttribs.length-1;i>-1;i--)h+=this._serializeAttribute(n,r,r.vAttribs[i]);}if(!this.settings.on_save){at=this.mceAttribs;for(no in at){if(at[no])h+=this._serializeAttribute(n,r,at[no]);}}if(this.closeElementsRe.test(n.nodeName))return h+' />';h+='>';if(this.isMSIE&&this.codeElementsRe.test(n.nodeName))h+=n.innerHTML;}break;case 3:if(n.parentNode&&this.codeElementsRe.test(n.parentNode.nodeName))return this.isMSIE?'':n.nodeValue;return this.xmlEncode(n.nodeValue);case 8:return"<!--"+this._trimComment(n.nodeValue)+"-->";}if(hc){cn=n.childNodes;for(i=0,l=cn.length;i<l;i++)h+=this.serializeNodeAsHTML(cn[i]);}if(f&&!hc)h+=this.fillStr;if(va)h+='</'+en+'>';return h;},_serializeAttribute:function(n,r,an){var av='',t,os=this.settings.on_save;if(os&&(an.indexOf('mce_')==0||an.indexOf('_moz')==0))return'';if(os&&this.mceAttribs[an])av=this._getAttrib(n,this.mceAttribs[an]);if(av.length==0)av=this._getAttrib(n,an);if(av.length==0&&r.defaultAttribs&&(t=r.defaultAttribs[an])){av=t;if(av=="mce_empty")return" "+an+'=""';}if(r.forceAttribs&&(t=r.forceAttribs[an]))av=t;if(os&&av.length!=0&&this.settings.url_converter.length!=0&&/^(src|href|longdesc)$/.test(an))av=eval(this.settings.url_converter+'(this, n, av)');if(av.length!=0&&r.validAttribValues&&r.validAttribValues[an]&&!r.validAttribValues[an].test(av))return"";if(av.length!=0&&av=="{$uid}")av="uid_"+(this.idCount++);if(av.length!=0)return" "+an+"="+'"'+this.xmlEncode(av)+'"';return"";},formatHTML:function(h){var s=this.settings,p='',i=0,li=0,o='',l;h=h.replace(/\r/g,'');h='\n'+h;h=h.replace(new RegExp('\\n\\s+','gi'),'\n');h=h.replace(this.nlBeforeRe,'\n<$1$2>');h=h.replace(this.nlAfterRe,'<$1$2>\n');h=h.replace(this.nlBeforeAfterRe,'\n<$1$2$3>\n');h+='\n';while((i=h.indexOf('\n',i+1))!=-1){if((l=h.substring(li+1,i)).length!=0){if(this.ouRe.test(l)&&p.length>=s.indent_levels)p=p.substring(s.indent_levels);o+=p+l+'\n';if(this.inRe.test(l))p+=this.inStr;}li=i;}return o;},xmlEncode:function(s){var i,l,e,o='',c;this._setupEntities();switch(this.settings.entity_encoding){case"raw":return tinyMCE.xmlEncode(s);case"named":for(i=0,l=s.length;i<l;i++){c=s.charCodeAt(i);e=this.entities[c];if(e&&e!='')o+='&'+e+';';else o+=String.fromCharCode(c);}return o;case"numeric":for(i=0,l=s.length;i<l;i++){c=s.charCodeAt(i);if(c>127||c==60||c==62||c==38||c==39||c==34)o+='&#'+c+";";else o+=String.fromCharCode(c);}return o;}return s;},split:function(re,s){var c=s.split(re);var i,l,o=new Array();for(i=0,l=c.length;i<l;i++){if(c[i]!='')o[i]=c[i];}return o;},_trimComment:function(s){s=s.replace(new RegExp('\\smce_src=\"[^\"]*\"','gi'),"");s=s.replace(new RegExp('\\smce_href=\"[^\"]*\"','gi'),"");return s;},_getAttrib:function(e,n,d){if(typeof(d)=="undefined")d="";if(!e||e.nodeType!=1)return d;var v=e.getAttribute(n,0);if(n=="class"&&!v)v=e.className;if(this.isMSIE&&n=="http-equiv")v=e.httpEquiv;if(this.isMSIE&&e.nodeName=="FORM"&&n=="enctype"&&v=="application/x-www-form-urlencoded")v="";if(this.isMSIE&&e.nodeName=="INPUT"&&n=="size"&&v=="20")v="";if(this.isMSIE&&e.nodeName=="INPUT"&&n=="maxlength"&&v=="2147483647")v="";if(n=="style"&&!tinyMCE.isOpera)v=e.style.cssText;if(n=='style')v=tinyMCE.serializeStyle(tinyMCE.parseStyle(v));if(this.settings.on_save&&n.indexOf('on')!=-1&&this.settings.on_save&&v&&v!="")v=tinyMCE.cleanupEventStr(v);return(v&&v!="")?''+v:d;},_urlConverter:function(c,n,v){if(!c.settings.on_save)return tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings.base_href,v);else if(tinyMCE.getParam('convert_urls'))return eval(tinyMCE.settings.urlconverter_callback+"(v, n, true);");return v;},_arrayToRe:function(a,op,be,af){var i,r;op=typeof(op)=="undefined"?"gi":op;be=typeof(be)=="undefined"?"^(":be;af=typeof(af)=="undefined"?")$":af;r=be;for(i=0;i<a.length;i++)r+=this._wildcardToRe(a[i])+(i!=a.length-1?"|":"");r+=af;return new RegExp(r,op);},_wildcardToRe:function(s){s=s.replace(/\?/g,'(\\S?)');s=s.replace(/\+/g,'(\\S+)');s=s.replace(/\*/g,'(\\S*)');return s;},_setupEntities:function(){var n,a,i,s=this.settings;if(!this.entitiesDone){if(s.entity_encoding=="named"){n=tinyMCE.clearArray(new Array());a=this.split(',',s.entities);for(i=0;i<a.length;i+=2)n[a[i]]=a[i+1];this.entities=n;}this.entitiesDone=true;}},_setupRules:function(){var s=this.settings;if(!this.rulesDone){this.addRuleStr(s.valid_elements);this.addRuleStr(s.extended_valid_elements);this.rulesDone=true;}},_isDuplicate:function(n){var i;if(!this.settings.fix_content_duplication)return false;if(tinyMCE.isMSIE&&!tinyMCE.isOpera&&n.nodeType==1){if(n.mce_serialized==this.serializationId)return true;n.setAttribute('mce_serialized',this.serializationId);}else{for(i=0;i<this.serializedNodes.length;i++){if(this.serializedNodes[i]==n)return true;}this.serializedNodes[this.serializedNodes.length]=n;}return false;}};TinyMCE_Engine.prototype.getElementByAttributeValue=function(n,e,a,v){return(n=this.getElementsByAttributeValue(n,e,a,v)).length==0?null:n[0];};TinyMCE_Engine.prototype.getElementsByAttributeValue=function(n,e,a,v){var i,nl=n.getElementsByTagName(e),o=new Array();for(i=0;i<nl.length;i++){if(tinyMCE.getAttrib(nl[i],a).indexOf(v)!=-1)o[o.length]=nl[i];}return o;};TinyMCE_Engine.prototype.isBlockElement=function(n){return n!=null&&n.nodeType==1&&this.blockRegExp.test(n.nodeName);};TinyMCE_Engine.prototype.getParentBlockElement=function(n){while(n){if(this.isBlockElement(n))return n;n=n.parentNode;}return null;};TinyMCE_Engine.prototype.insertAfter=function(n,r){if(r.nextSibling)r.parentNode.insertBefore(n,r.nextSibling);else r.parentNode.appendChild(n);};TinyMCE_Engine.prototype.setInnerHTML=function(e,h){var i,nl,n;if(tinyMCE.isMSIE&&!tinyMCE.isOpera){h=h.replace(/\s\/>/g,'>');h=h.replace(/<p([^>]*)>\u00A0?<\/p>/gi,'<p$1 mce_keep="true">&nbsp;</p>');h=h.replace(/<p([^>]*)>\s*&nbsp;\s*<\/p>/gi,'<p$1 mce_keep="true">&nbsp;</p>');h=h.replace(/<p([^>]*)>\s+<\/p>/gi,'<p$1 mce_keep="true">&nbsp;</p>');e.innerHTML=tinyMCE.uniqueTag+h;e.firstChild.removeNode(true);nl=e.getElementsByTagName("p");for(i=nl.length-1;i>=0;i--){n=nl[i];if(n.nodeName=='P'&&!n.hasChildNodes()&&!n.mce_keep)n.parentNode.removeChild(n);}}else{h=this.fixGeckoBaseHREFBug(1,e,h);e.innerHTML=h;this.fixGeckoBaseHREFBug(2,e,h);}};TinyMCE_Engine.prototype.getOuterHTML=function(e){if(tinyMCE.isMSIE)return e.outerHTML;var d=e.ownerDocument.createElement("body");d.appendChild(e);return d.innerHTML;};TinyMCE_Engine.prototype.setOuterHTML=function(e,h){if(tinyMCE.isMSIE){e.outerHTML=h;return;}var d=e.ownerDocument.createElement("body");d.innerHTML=h;e.parentNode.replaceChild(d.firstChild,e);};TinyMCE_Engine.prototype._getElementById=function(id,d){var e,i,j,f;if(typeof(d)=="undefined")d=document;e=d.getElementById(id);if(!e){f=d.forms;for(i=0;i<f.length;i++){for(j=0;j<f[i].elements.length;j++){if(f[i].elements[j].name==id){e=f[i].elements[j];break;}}}}return e;};TinyMCE_Engine.prototype.getNodeTree=function(n,na,t,nn){var i;if(typeof(t)=="undefined"||n.nodeType==t&&(typeof(nn)=="undefined"||n.nodeName==nn))na[na.length]=n;if(n.hasChildNodes()){for(i=0;i<n.childNodes.length;i++)tinyMCE.getNodeTree(n.childNodes[i],na,t,nn);}return na;};TinyMCE_Engine.prototype.getParentElement=function(node,names,attrib_name,attrib_value){if(typeof(names)=="undefined"){if(node.nodeType==1)return node;while((node=node.parentNode)!=null&&node.nodeType!=1);return node;}if(node==null)return null;var namesAr=names.toUpperCase().split(',');do{for(var i=0;i<namesAr.length;i++){if(node.nodeName==namesAr[i]||names=="*"){if(typeof(attrib_name)=="undefined")return node;else if(node.getAttribute(attrib_name)){if(typeof(attrib_value)=="undefined"){if(node.getAttribute(attrib_name)!="")return node;}else if(node.getAttribute(attrib_name)==attrib_value)return node;}}}}while((node=node.parentNode)!=null);return null;};TinyMCE_Engine.prototype.getParentNode=function(n,f){while(n){if(f(n))return n;n=n.parentNode;}return null;};TinyMCE_Engine.prototype.getAttrib=function(elm,name,default_value){if(typeof(default_value)=="undefined")default_value="";if(!elm||elm.nodeType!=1)return default_value;var v=elm.getAttribute(name);if(name=="class"&&!v)v=elm.className;if(tinyMCE.isGecko&&name=="src"&&elm.src!=null&&elm.src!="")v=elm.src;if(tinyMCE.isGecko&&name=="href"&&elm.href!=null&&elm.href!="")v=elm.href;if(name=="http-equiv"&&tinyMCE.isMSIE)v=elm.httpEquiv;if(name=="style"&&!tinyMCE.isOpera)v=elm.style.cssText;return(v&&v!="")?v:default_value;};TinyMCE_Engine.prototype.setAttrib=function(element,name,value,fix_value){if(typeof(value)=="number"&&value!=null)value=""+value;if(fix_value){if(value==null)value="";var re=new RegExp('[^0-9%]','g');value=value.replace(re,'');}if(name=="style")element.style.cssText=value;if(name=="class")element.className=value;if(value!=null&&value!=""&&value!=-1)element.setAttribute(name,value);else element.removeAttribute(name);};TinyMCE_Engine.prototype.setStyleAttrib=function(elm,name,value){eval('elm.style.'+name+'=value;');if(tinyMCE.isMSIE&&value==null||value==''){var str=tinyMCE.serializeStyle(tinyMCE.parseStyle(elm.style.cssText));elm.style.cssText=str;elm.setAttribute("style",str);}};TinyMCE_Engine.prototype.switchClass=function(ei,c){var e;if(tinyMCE.switchClassCache[ei])e=tinyMCE.switchClassCache[ei];else e=tinyMCE.switchClassCache[ei]=document.getElementById(ei);if(e){if(tinyMCE.settings.button_tile_map&&e.className&&e.className.indexOf('mceTiledButton')==0)c='mceTiledButton '+c;e.className=c;}};TinyMCE_Engine.prototype.getAbsPosition=function(n){var p={absLeft:0,absTop:0};while(n){p.absLeft+=n.offsetLeft;p.absTop+=n.offsetTop;n=n.offsetParent;}return p;};TinyMCE_Engine.prototype.prevNode=function(e,n){var a=n.split(','),i;while((e=e.previousSibling)!=null){for(i=0;i<a.length;i++){if(e.nodeName==a[i])return e;}}return null;};TinyMCE_Engine.prototype.nextNode=function(e,n){var a=n.split(','),i;while((e=e.nextSibling)!=null){for(i=0;i<a.length;i++){if(e.nodeName==a[i])return e;}}return null;};TinyMCE_Engine.prototype.selectNodes=function(n,f,a){var i;if(!a)a=new Array();if(f(n))a[a.length]=n;if(n.hasChildNodes()){for(i=0;i<n.childNodes.length;i++)tinyMCE.selectNodes(n.childNodes[i],f,a);}return a;};TinyMCE_Engine.prototype.addCSSClass=function(e,c,b){var o=this.removeCSSClass(e,c);return e.className=b?c+(o!=''?(' '+o):''):(o!=''?(o+' '):'')+c;};TinyMCE_Engine.prototype.removeCSSClass=function(e,c){var a=this.explode(' ',e.className),i;for(i=0;i<a.length;i++){if(a[i]==c)a[i]='';}return e.className=a.join(' ');};TinyMCE_Engine.prototype.renameElement=function(e,n,d){var ne,i,ar;d=typeof(d)=="undefined"?tinyMCE.selectedInstance.getDoc():d;if(e){ne=d.createElement(n);ar=e.attributes;for(i=ar.length-1;i>-1;i--){if(ar[i].specified&&ar[i].nodeValue)ne.setAttribute(ar[i].nodeName.toLowerCase(),ar[i].nodeValue);}ar=e.childNodes;for(i=0;i<ar.length;i++)ne.appendChild(ar[i].cloneNode(true));e.parentNode.replaceChild(ne,e);}};TinyMCE_Engine.prototype.parseURL=function(url_str){var urlParts=new Array();if(url_str){var pos,lastPos;pos=url_str.indexOf('://');if(pos!=-1){urlParts['protocol']=url_str.substring(0,pos);lastPos=pos+3;}for(var i=lastPos;i<url_str.length;i++){var chr=url_str.charAt(i);if(chr==':')break;if(chr=='/')break;}pos=i;urlParts['host']=url_str.substring(lastPos,pos);urlParts['port']="";lastPos=pos;if(url_str.charAt(pos)==':'){pos=url_str.indexOf('/',lastPos);urlParts['port']=url_str.substring(lastPos+1,pos);}lastPos=pos;pos=url_str.indexOf('?',lastPos);if(pos==-1)pos=url_str.indexOf('#',lastPos);if(pos==-1)pos=url_str.length;urlParts['path']=url_str.substring(lastPos,pos);lastPos=pos;if(url_str.charAt(pos)=='?'){pos=url_str.indexOf('#');pos=(pos==-1)?url_str.length:pos;urlParts['query']=url_str.substring(lastPos+1,pos);}lastPos=pos;if(url_str.charAt(pos)=='#'){pos=url_str.length;urlParts['anchor']=url_str.substring(lastPos+1,pos);}}return urlParts;};TinyMCE_Engine.prototype.serializeURL=function(up){var o="";if(up['protocol'])o+=up['protocol']+"://";if(up['host'])o+=up['host'];if(up['port'])o+=":"+up['port'];if(up['path'])o+=up['path'];if(up['query'])o+="?"+up['query'];if(up['anchor'])o+="#"+up['anchor'];return o;};TinyMCE_Engine.prototype.convertAbsoluteURLToRelativeURL=function(base_url,url_to_relative){var baseURL=this.parseURL(base_url);var targetURL=this.parseURL(url_to_relative);var strTok1;var strTok2;var breakPoint=0;var outPath="";var forceSlash=false;if(targetURL.path=="")targetURL.path="/";else forceSlash=true;base_url=baseURL.path.substring(0,baseURL.path.lastIndexOf('/'));strTok1=base_url.split('/');strTok2=targetURL.path.split('/');if(strTok1.length>=strTok2.length){for(var i=0;i<strTok1.length;i++){if(i>=strTok2.length||strTok1[i]!=strTok2[i]){breakPoint=i+1;break;}}}if(strTok1.length<strTok2.length){for(var i=0;i<strTok2.length;i++){if(i>=strTok1.length||strTok1[i]!=strTok2[i]){breakPoint=i+1;break;}}}if(breakPoint==1)return targetURL.path;for(var i=0;i<(strTok1.length-(breakPoint-1));i++)outPath+="../";for(var i=breakPoint-1;i<strTok2.length;i++){if(i!=(breakPoint-1))outPath+="/"+strTok2[i];else outPath+=strTok2[i];}targetURL.protocol=null;targetURL.host=null;targetURL.port=null;targetURL.path=outPath==""&&forceSlash?"/":outPath;var fileName=baseURL.path;var pos;if((pos=fileName.lastIndexOf('/'))!=-1)fileName=fileName.substring(pos+1);if(fileName==targetURL.path&&targetURL.anchor!="")targetURL.path="";if(targetURL.path==""&&!targetURL.anchor)targetURL.path=fileName!=""?fileName:"/";return this.serializeURL(targetURL);};TinyMCE_Engine.prototype.convertRelativeToAbsoluteURL=function(base_url,relative_url){var baseURL=this.parseURL(base_url);var relURL=this.parseURL(relative_url);if(relative_url==""||relative_url.charAt(0)=='/'||relative_url.indexOf('://')!=-1||relative_url.indexOf('mailto:')!=-1||relative_url.indexOf('javascript:')!=-1)return relative_url;baseURLParts=baseURL['path'].split('/');relURLParts=relURL['path'].split('/');var newBaseURLParts=new Array();for(var i=baseURLParts.length-1;i>=0;i--){if(baseURLParts[i].length==0)continue;newBaseURLParts[newBaseURLParts.length]=baseURLParts[i];}baseURLParts=newBaseURLParts.reverse();var newRelURLParts=new Array();var numBack=0;for(var i=relURLParts.length-1;i>=0;i--){if(relURLParts[i].length==0||relURLParts[i]==".")continue;if(relURLParts[i]=='..'){numBack++;continue;}if(numBack>0){numBack--;continue;}newRelURLParts[newRelURLParts.length]=relURLParts[i];}relURLParts=newRelURLParts.reverse();var len=baseURLParts.length-numBack;var absPath=(len<=0?"":"/")+baseURLParts.slice(0,len).join('/')+"/"+relURLParts.join('/');var start="",end="";relURL.protocol=baseURL.protocol;relURL.host=baseURL.host;relURL.port=baseURL.port;if(relURL.path.charAt(relURL.path.length-1)=="/")absPath+="/";relURL.path=absPath;return this.serializeURL(relURL);};TinyMCE_Engine.prototype.convertURL=function(url,node,on_save){var prot=document.location.protocol;var host=document.location.hostname;var port=document.location.port;if(prot=="file:")return url;url=tinyMCE.regexpReplace(url,'(http|https):///','/');if(url.indexOf('mailto:')!=-1||url.indexOf('javascript:')!=-1||tinyMCE.regexpReplace(url,'[ \t\r\n\+]|%20','').charAt(0)=="#")return url;if(!tinyMCE.isMSIE&&!on_save&&url.indexOf("://")==-1&&url.charAt(0)!='/')return tinyMCE.settings['base_href']+url;if(on_save&&tinyMCE.getParam('relative_urls')){var curl=tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'],url);if(curl.charAt(0)=='/')curl=tinyMCE.settings['document_base_prefix']+curl;var urlParts=tinyMCE.parseURL(curl);var tmpUrlParts=tinyMCE.parseURL(tinyMCE.settings['document_base_url']);if(urlParts['host']==tmpUrlParts['host']&&(urlParts['port']==tmpUrlParts['port']))return tinyMCE.convertAbsoluteURLToRelativeURL(tinyMCE.settings['document_base_url'],curl);}if(!tinyMCE.getParam('relative_urls')){var urlParts=tinyMCE.parseURL(url);var baseUrlParts=tinyMCE.parseURL(tinyMCE.settings['base_href']);url=tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'],url);if(urlParts['anchor']&&urlParts['path']==baseUrlParts['path'])return"#"+urlParts['anchor'];}if(tinyMCE.getParam('remove_script_host')){var start="",portPart="";if(port!="")portPart=":"+port;start=prot+"//"+host+portPart+"/";if(url.indexOf(start)==0)url=url.substring(start.length-1);}return url;};TinyMCE_Engine.prototype.convertAllRelativeURLs=function(body){var elms=body.getElementsByTagName("img");for(var i=0;i<elms.length;i++){var src=tinyMCE.getAttrib(elms[i],'src');var msrc=tinyMCE.getAttrib(elms[i],'mce_src');if(msrc!="")src=msrc;if(src!=""){src=tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'],src);elms[i].setAttribute("src",src);}}var elms=body.getElementsByTagName("a");for(var i=0;i<elms.length;i++){var href=tinyMCE.getAttrib(elms[i],'href');var mhref=tinyMCE.getAttrib(elms[i],'mce_href');if(mhref!="")href=mhref;if(href&&href!=""){href=tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'],href);elms[i].setAttribute("href",href);}}};TinyMCE_Engine.prototype.clearArray=function(a){for(var k in a)a[k]=null;return a;};TinyMCE_Engine.prototype._setEventsEnabled=function(node,state){var events=new Array('onfocus','onblur','onclick','ondblclick','onmousedown','onmouseup','onmouseover','onmousemove','onmouseout','onkeypress','onkeydown','onkeydown','onkeyup');var evs=tinyMCE.settings['event_elements'].split(',');for(var y=0;y<evs.length;y++){var elms=node.getElementsByTagName(evs[y]);for(var i=0;i<elms.length;i++){var event="";for(var x=0;x<events.length;x++){if((event=tinyMCE.getAttrib(elms[i],events[x]))!=''){event=tinyMCE.cleanupEventStr(""+event);if(!state)event="return true;"+event;else event=event.replace(/^return true;/gi,'');elms[i].removeAttribute(events[x]);elms[i].setAttribute(events[x],event);}}}}};TinyMCE_Engine.prototype._eventPatch=function(editor_id){var n,inst,win,e;if(typeof(tinyMCE)=="undefined")return true;try{if(tinyMCE.selectedInstance){win=tinyMCE.selectedInstance.getWin();if(win&&win.event){e=win.event;if(!e.target)e.target=e.srcElement;TinyMCE_Engine.prototype.handleEvent(e);return;}}for(n in tinyMCE.instances){inst=tinyMCE.instances[n];if(!tinyMCE.isInstance(inst))continue;tinyMCE.selectedInstance=inst;win=inst.getWin();if(win&&win.event){e=win.event;if(!e.target)e.target=e.srcElement;TinyMCE_Engine.prototype.handleEvent(e);return;}}}catch(ex){}};TinyMCE_Engine.prototype.unloadHandler=function(){tinyMCE.triggerSave(true,true);};TinyMCE_Engine.prototype.addEventHandlers=function(inst){var doc=inst.getDoc();inst.switchSettings();if(tinyMCE.isMSIE){tinyMCE.addEvent(doc,"keypress",TinyMCE_Engine.prototype._eventPatch);tinyMCE.addEvent(doc,"keyup",TinyMCE_Engine.prototype._eventPatch);tinyMCE.addEvent(doc,"keydown",TinyMCE_Engine.prototype._eventPatch);tinyMCE.addEvent(doc,"mouseup",TinyMCE_Engine.prototype._eventPatch);tinyMCE.addEvent(doc,"mousedown",TinyMCE_Engine.prototype._eventPatch);tinyMCE.addEvent(doc,"click",TinyMCE_Engine.prototype._eventPatch);}else{tinyMCE.addEvent(doc,"keypress",tinyMCE.handleEvent);tinyMCE.addEvent(doc,"keydown",tinyMCE.handleEvent);tinyMCE.addEvent(doc,"keyup",tinyMCE.handleEvent);tinyMCE.addEvent(doc,"click",tinyMCE.handleEvent);tinyMCE.addEvent(doc,"mouseup",tinyMCE.handleEvent);tinyMCE.addEvent(doc,"mousedown",tinyMCE.handleEvent);tinyMCE.addEvent(doc,"focus",tinyMCE.handleEvent);tinyMCE.addEvent(doc,"blur",tinyMCE.handleEvent);eval('try { doc.designMode = "On"; } catch(e) {}');}};TinyMCE_Engine.prototype.onMouseMove=function(){var inst;if(!tinyMCE.hasMouseMoved){inst=tinyMCE.selectedInstance;if(inst.isFocused){inst.undoBookmark=inst.selection.getBookmark();tinyMCE.hasMouseMoved=true;}}};TinyMCE_Engine.prototype.cancelEvent=function(e){if(tinyMCE.isMSIE){e.returnValue=false;e.cancelBubble=true;}else e.preventDefault();};TinyMCE_Engine.prototype.addEvent=function(o,n,h){if(o.attachEvent)o.attachEvent("on"+n,h);else o.addEventListener(n,h,false);};TinyMCE_Engine.prototype.addSelectAccessibility=function(e,s,w){if(!s._isAccessible){s.onkeydown=tinyMCE.accessibleEventHandler;s.onblur=tinyMCE.accessibleEventHandler;s._isAccessible=true;s._win=w;}return false;};TinyMCE_Engine.prototype.accessibleEventHandler=function(e){var win=this._win;e=tinyMCE.isMSIE?win.event:e;var elm=tinyMCE.isMSIE?e.srcElement:e.target;if(e.type=="blur"){if(elm.oldonchange){elm.onchange=elm.oldonchange;elm.oldonchange=null;}return true;}if(elm.nodeName=="SELECT"&&!elm.oldonchange){elm.oldonchange=elm.onchange;elm.onchange=null;}if(e.keyCode==13||e.keyCode==32){elm.onchange=elm.oldonchange;elm.onchange();elm.oldonchange=null;tinyMCE.cancelEvent(e);return false;}return true;};TinyMCE_Engine.prototype._resetIframeHeight=function(){var ife;if(tinyMCE.isMSIE&&!tinyMCE.isOpera){ife=tinyMCE.selectedInstance.iframeElement;if(ife._oldHeight){ife.style.height=ife._oldHeight;ife.height=ife._oldHeight;}}};function TinyMCE_Selection(inst){this.instance=inst;};TinyMCE_Selection.prototype={getSelectedHTML:function(){var inst=this.instance;var e,r=this.getRng(),h;if(tinyMCE.isSafari){return r.toString();}e=document.createElement("body");if(tinyMCE.isGecko)e.appendChild(r.cloneContents());else e.innerHTML=r.item?r.item(0).outerHTML:r.htmlText;h=tinyMCE._cleanupHTML(inst,inst.contentDocument,inst.settings,e,e,false,true,false);if(tinyMCE.getParam("convert_fonts_to_spans"))tinyMCE.convertSpansToFonts(inst.getDoc());return h;},getSelectedText:function(){var inst=this.instance;var d,r,s,t;if(tinyMCE.isMSIE){d=inst.getDoc();if(d.selection.type=="Text"){r=d.selection.createRange();t=r.text;}else t='';}else{s=this.getSel();if(s&&s.toString)t=s.toString();else t='';}return t;},getBookmark:function(simple){var rng=this.getRng();var doc=this.instance.getDoc();var sp,le,s,e,nl,i,si,ei;var trng,sx,sy,xx=-999999999;if(tinyMCE.isOpera)return null;sx=doc.body.scrollLeft+doc.documentElement.scrollLeft;sy=doc.body.scrollTop+doc.documentElement.scrollTop;if(tinyMCE.isSafari||tinyMCE.isGecko)return{rng:rng,scrollX:sx,scrollY:sy};if(tinyMCE.isMSIE){if(simple)return{rng:rng};if(rng.item){e=rng.item(0);nl=doc.getElementsByTagName(e.nodeName);for(i=0;i<nl.length;i++){if(e==nl[i]){sp=i;break;}}return{tag:e.nodeName,index:sp,scrollX:sx,scrollY:sy};}else{trng=rng.duplicate();trng.collapse(true);sp=Math.abs(trng.move('character',xx));trng=rng.duplicate();trng.collapse(false);le=Math.abs(trng.move('character',xx))-sp;return{start:sp,length:le,scrollX:sx,scrollY:sy};}}if(tinyMCE.isGecko){s=tinyMCE.getParentElement(rng.startContainer);for(si=0;si<s.childNodes.length&&s.childNodes[si]!=rng.startContainer;si++);nl=doc.getElementsByTagName(s.nodeName);for(i=0;i<nl.length;i++){if(s==nl[i]){sp=i;break;}}e=tinyMCE.getParentElement(rng.endContainer);for(ei=0;ei<e.childNodes.length&&e.childNodes[ei]!=rng.endContainer;ei++);nl=doc.getElementsByTagName(e.nodeName);for(i=0;i<nl.length;i++){if(e==nl[i]){le=i;break;}}return{startTag:s.nodeName,start:sp,startIndex:si,endTag:e.nodeName,end:le,endIndex:ei,startOffset:rng.startOffset,endOffset:rng.endOffset,scrollX:sx,scrollY:sy};}return null;},moveToBookmark:function(bookmark){var rng,nl,i;var inst=this.instance;var doc=inst.getDoc();var win=inst.getWin();var sel=this.getSel();if(!bookmark)return false;if(tinyMCE.isSafari){sel.setBaseAndExtent(bookmark.startContainer,bookmark.startOffset,bookmark.endContainer,bookmark.endOffset);return true;}if(tinyMCE.isMSIE){if(bookmark.rng){bookmark.rng.select();return true;}win.focus();if(bookmark.tag){rng=inst.getBody().createControlRange();nl=doc.getElementsByTagName(bookmark.tag);if(nl.length>bookmark.index){try{rng.addElement(nl[bookmark.index]);}catch(ex){}}}else{rng=inst.getSel().createRange();rng.moveToElementText(inst.getBody());rng.collapse(true);rng.moveStart('character',bookmark.start);rng.moveEnd('character',bookmark.length);}rng.select();win.scrollTo(bookmark.scrollX,bookmark.scrollY);return true;}if(tinyMCE.isGecko&&bookmark.rng){sel.removeAllRanges();sel.addRange(bookmark.rng);win.scrollTo(bookmark.scrollX,bookmark.scrollY);return true;}if(tinyMCE.isGecko){rng=doc.createRange();nl=doc.getElementsByTagName(bookmark.startTag);if(nl.length>bookmark.start)rng.setStart(nl[bookmark.start].childNodes[bookmark.startIndex],bookmark.startOffset);nl=doc.getElementsByTagName(bookmark.endTag);if(nl.length>bookmark.end)rng.setEnd(nl[bookmark.end].childNodes[bookmark.endIndex],bookmark.endOffset);sel.removeAllRanges();sel.addRange(rng);win.scrollTo(bookmark.scrollX,bookmark.scrollY);return true;}return false;},selectNode:function(node,collapse,select_text_node,to_start){var inst=this.instance,sel,rng,nodes;if(!node)return;if(typeof(collapse)=="undefined")collapse=true;if(typeof(select_text_node)=="undefined")select_text_node=false;if(typeof(to_start)=="undefined")to_start=true;if(tinyMCE.isMSIE){rng=inst.getBody().createTextRange();try{rng.moveToElementText(node);if(collapse)rng.collapse(to_start);rng.select();}catch(e){}}else{sel=this.getSel();if(!sel)return;if(tinyMCE.isSafari){sel.setBaseAndExtent(node,0,node,node.innerText.length);if(collapse){if(to_start)sel.collapseToStart();else sel.collapseToEnd();}this.scrollToNode(node);return;}rng=inst.getDoc().createRange();if(select_text_node){nodes=tinyMCE.getNodeTree(node,new Array(),3);if(nodes.length>0)rng.selectNodeContents(nodes[0]);else rng.selectNodeContents(node);}else rng.selectNode(node);if(collapse){if(!to_start&&node.nodeType==3){rng.setStart(node,node.nodeValue.length);rng.setEnd(node,node.nodeValue.length);}else rng.collapse(to_start);}sel.removeAllRanges();sel.addRange(rng);}this.scrollToNode(node);tinyMCE.selectedElement=null;if(node.nodeType==1)tinyMCE.selectedElement=node;},scrollToNode:function(node){var inst=this.instance;var pos,doc,scrollX,scrollY,height;pos=tinyMCE.getAbsPosition(node);doc=inst.getDoc();scrollX=doc.body.scrollLeft+doc.documentElement.scrollLeft;scrollY=doc.body.scrollTop+doc.documentElement.scrollTop;height=tinyMCE.isMSIE?document.getElementById(inst.editorId).style.pixelHeight:inst.targetElement.clientHeight;if(!tinyMCE.settings['auto_resize']&&!(pos.absTop>scrollY&&pos.absTop<(scrollY-25+height)))inst.contentWindow.scrollTo(pos.absLeft,pos.absTop-height+25);},getSel:function(){var inst=this.instance;if(tinyMCE.isMSIE&&!tinyMCE.isOpera)return inst.getDoc().selection;return inst.contentWindow.getSelection();},getRng:function(){var inst=this.instance;var sel=this.getSel();if(sel==null)return null;if(tinyMCE.isMSIE&&!tinyMCE.isOpera)return sel.createRange();if(tinyMCE.isSafari&&!sel.getRangeAt)return''+window.getSelection();return sel.getRangeAt(0);},getFocusElement:function(){var inst=this.instance;if(tinyMCE.isMSIE&&!tinyMCE.isOpera){var doc=inst.getDoc();var rng=doc.selection.createRange();var elm=rng.item?rng.item(0):rng.parentElement();}else{if(inst.isHidden())return inst.getBody();var sel=this.getSel();var rng=this.getRng();if(!sel||!rng)return null;var elm=rng.commonAncestorContainer;if(!rng.collapsed){if(rng.startContainer==rng.endContainer){if(rng.startOffset-rng.endOffset<2){if(rng.startContainer.hasChildNodes())elm=rng.startContainer.childNodes[rng.startOffset];}}}elm=tinyMCE.getParentElement(elm);}return elm;}};function TinyMCE_UndoRedo(inst){this.instance=inst;this.undoLevels=new Array();this.undoIndex=0;this.typingUndoIndex=-1;this.undoRedo=true;};TinyMCE_UndoRedo.prototype={add:function(l){var b;if(l){this.undoLevels[this.undoLevels.length]=l;return true;}var inst=this.instance;if(this.typingUndoIndex!=-1){this.undoIndex=this.typingUndoIndex;}var newHTML=tinyMCE.trim(inst.getBody().innerHTML);if(this.undoLevels[this.undoIndex]&&newHTML!=this.undoLevels[this.undoIndex].content){tinyMCE.dispatchCallback(inst,'onchange_callback','onChange',inst);var customUndoLevels=tinyMCE.settings['custom_undo_redo_levels'];if(customUndoLevels!=-1&&this.undoLevels.length>customUndoLevels){for(var i=0;i<this.undoLevels.length-1;i++){this.undoLevels[i]=this.undoLevels[i+1];}this.undoLevels.length--;this.undoIndex--;}b=inst.undoBookmark;if(!b)b=inst.selection.getBookmark();this.undoIndex++;this.undoLevels[this.undoIndex]={content:newHTML,bookmark:b};this.undoLevels.length=this.undoIndex+1;return true;}return false;},undo:function(){var inst=this.instance;if(this.undoIndex>0){this.undoIndex--;tinyMCE.setInnerHTML(inst.getBody(),this.undoLevels[this.undoIndex].content);inst.repaint();if(inst.settings.custom_undo_redo_restore_selection)inst.selection.moveToBookmark(this.undoLevels[this.undoIndex].bookmark);}},redo:function(){var inst=this.instance;tinyMCE.execCommand("mceEndTyping");if(this.undoIndex<(this.undoLevels.length-1)){this.undoIndex++;tinyMCE.setInnerHTML(inst.getBody(),this.undoLevels[this.undoIndex].content);inst.repaint();if(inst.settings.custom_undo_redo_restore_selection)inst.selection.moveToBookmark(this.undoLevels[this.undoIndex].bookmark);}tinyMCE.triggerNodeChange();}};var TinyMCE_ForceParagraphs={_insertPara:function(inst,e){function isEmpty(para){function isEmptyHTML(html){return html.replace(new RegExp('[ \t\r\n]+','g'),'').toLowerCase()=="";}if(para.getElementsByTagName("img").length>0)return false;if(para.getElementsByTagName("table").length>0)return false;if(para.getElementsByTagName("hr").length>0)return false;var nodes=tinyMCE.getNodeTree(para,new Array(),3);for(var i=0;i<nodes.length;i++){if(!isEmptyHTML(nodes[i].nodeValue))return false;}return true;}var doc=inst.getDoc();var sel=inst.getSel();var win=inst.contentWindow;var rng=sel.getRangeAt(0);var body=doc.body;var rootElm=doc.documentElement;var blockName="P";var rngBefore=doc.createRange();rngBefore.setStart(sel.anchorNode,sel.anchorOffset);rngBefore.collapse(true);var rngAfter=doc.createRange();rngAfter.setStart(sel.focusNode,sel.focusOffset);rngAfter.collapse(true);var direct=rngBefore.compareBoundaryPoints(rngBefore.START_TO_END,rngAfter)<0;var startNode=direct?sel.anchorNode:sel.focusNode;var startOffset=direct?sel.anchorOffset:sel.focusOffset;var endNode=direct?sel.focusNode:sel.anchorNode;var endOffset=direct?sel.focusOffset:sel.anchorOffset;startNode=startNode.nodeName=="BODY"?startNode.firstChild:startNode;endNode=endNode.nodeName=="BODY"?endNode.firstChild:endNode;var startBlock=tinyMCE.getParentBlockElement(startNode);var endBlock=tinyMCE.getParentBlockElement(endNode);if(startBlock&&new RegExp('absolute|relative|static','gi').test(startBlock.style.position))startBlock=null;if(endBlock&&new RegExp('absolute|relative|static','gi').test(endBlock.style.position))endBlock=null;if(startBlock!=null){blockName=startBlock.nodeName;if(blockName=="TD"||blockName=="TABLE"||(blockName=="DIV"&&new RegExp('left|right','gi').test(startBlock.style.cssFloat)))blockName="P";}if(tinyMCE.getParentElement(startBlock,"OL,UL")!=null)return false;if((startBlock!=null&&startBlock.nodeName=="TABLE")||(endBlock!=null&&endBlock.nodeName=="TABLE"))startBlock=endBlock=null;var paraBefore=(startBlock!=null&&startBlock.nodeName==blockName)?startBlock.cloneNode(false):doc.createElement(blockName);var paraAfter=(endBlock!=null&&endBlock.nodeName==blockName)?endBlock.cloneNode(false):doc.createElement(blockName);if(/^(H[1-6])$/.test(blockName))paraAfter=doc.createElement("p");var startChop=startNode;var endChop=endNode;node=startChop;do{if(node==body||node.nodeType==9||tinyMCE.isBlockElement(node))break;startChop=node;}while((node=node.previousSibling?node.previousSibling:node.parentNode));node=endChop;do{if(node==body||node.nodeType==9||tinyMCE.isBlockElement(node))break;endChop=node;}while((node=node.nextSibling?node.nextSibling:node.parentNode));if(startChop.nodeName=="TD")startChop=startChop.firstChild;if(endChop.nodeName=="TD")endChop=endChop.lastChild;if(startBlock==null){rng.deleteContents();sel.removeAllRanges();if(startChop!=rootElm&&endChop!=rootElm){rngBefore=rng.cloneRange();if(startChop==body)rngBefore.setStart(startChop,0);else rngBefore.setStartBefore(startChop);paraBefore.appendChild(rngBefore.cloneContents());if(endChop.parentNode.nodeName==blockName)endChop=endChop.parentNode;rng.setEndAfter(endChop);if(endChop.nodeName!="#text"&&endChop.nodeName!="BODY")rngBefore.setEndAfter(endChop);var contents=rng.cloneContents();if(contents.firstChild&&(contents.firstChild.nodeName==blockName||contents.firstChild.nodeName=="BODY"))paraAfter.innerHTML=contents.firstChild.innerHTML;else paraAfter.appendChild(contents);if(isEmpty(paraBefore))paraBefore.innerHTML="&nbsp;";if(isEmpty(paraAfter))paraAfter.innerHTML="&nbsp;";rng.deleteContents();rngAfter.deleteContents();rngBefore.deleteContents();paraAfter.normalize();rngBefore.insertNode(paraAfter);paraBefore.normalize();rngBefore.insertNode(paraBefore);}else{body.innerHTML="<"+blockName+">&nbsp;</"+blockName+"><"+blockName+">&nbsp;</"+blockName+">";paraAfter=body.childNodes[1];}inst.selection.selectNode(paraAfter,true,true);return true;}if(startChop.nodeName==blockName)rngBefore.setStart(startChop,0);else rngBefore.setStartBefore(startChop);rngBefore.setEnd(startNode,startOffset);paraBefore.appendChild(rngBefore.cloneContents());rngAfter.setEndAfter(endChop);rngAfter.setStart(endNode,endOffset);var contents=rngAfter.cloneContents();if(contents.firstChild&&contents.firstChild.nodeName==blockName){paraAfter.innerHTML=contents.firstChild.innerHTML;}else paraAfter.appendChild(contents);if(isEmpty(paraBefore))paraBefore.innerHTML="&nbsp;";if(isEmpty(paraAfter))paraAfter.innerHTML="&nbsp;";var rng=doc.createRange();if(!startChop.previousSibling&&startChop.parentNode.nodeName.toUpperCase()==blockName){rng.setStartBefore(startChop.parentNode);}else{if(rngBefore.startContainer.nodeName.toUpperCase()==blockName&&rngBefore.startOffset==0)rng.setStartBefore(rngBefore.startContainer);else rng.setStart(rngBefore.startContainer,rngBefore.startOffset);}if(!endChop.nextSibling&&endChop.parentNode.nodeName.toUpperCase()==blockName)rng.setEndAfter(endChop.parentNode);else rng.setEnd(rngAfter.endContainer,rngAfter.endOffset);rng.deleteContents();rng.insertNode(paraAfter);rng.insertNode(paraBefore);paraAfter.normalize();paraBefore.normalize();inst.selection.selectNode(paraAfter,true,true);return true;},_handleBackSpace:function(inst){var r=inst.getRng(),sn=r.startContainer,nv,s=false;if(sn&&sn.nextSibling&&sn.nextSibling.nodeName=="BR"){nv=sn.nodeValue;if(nv!=null&&nv.length>=r.startOffset&&nv.charAt(r.startOffset-1)==' ')s=true;if(nv!=null&&r.startOffset==nv.length)sn.nextSibling.parentNode.removeChild(sn.nextSibling);}return s;}};function TinyMCE_Layer(id,bm){this.id=id;this.blockerElement=null;this.events=false;this.element=null;this.blockMode=typeof(bm)!='undefined'?bm:true;this.doc=document;};TinyMCE_Layer.prototype={moveRelativeTo:function(re,p){var rep=this.getAbsPosition(re);var w=parseInt(re.offsetWidth);var h=parseInt(re.offsetHeight);var e=this.getElement();var ew=parseInt(e.offsetWidth);var eh=parseInt(e.offsetHeight);var x,y;switch(p){case"tl":x=rep.absLeft;y=rep.absTop;break;case"tr":x=rep.absLeft+w;y=rep.absTop;break;case"bl":x=rep.absLeft;y=rep.absTop+h;break;case"br":x=rep.absLeft+w;y=rep.absTop+h;break;case"cc":x=rep.absLeft+(w/2)-(ew/2);y=rep.absTop+(h/2)-(eh/2);break;}this.moveTo(x,y);},moveBy:function(x,y){var e=this.getElement();this.moveTo(parseInt(e.style.left)+x,parseInt(e.style.top)+y);},moveTo:function(x,y){var e=this.getElement();e.style.left=x+"px";e.style.top=y+"px";this.updateBlocker();},resizeBy:function(w,h){var e=this.getElement();this.resizeTo(parseInt(e.style.width)+w,parseInt(e.style.height)+h);},resizeTo:function(w,h){var e=this.getElement();if(w!=null)e.style.width=w+"px";if(h!=null)e.style.height=h+"px";this.updateBlocker();},show:function(){this.getElement().style.display='block';this.updateBlocker();},hide:function(){this.getElement().style.display='none';this.updateBlocker();},isVisible:function(){return this.getElement().style.display=='block';},getElement:function(){if(!this.element)this.element=this.doc.getElementById(this.id);return this.element;},setBlockMode:function(s){this.blockMode=s;},updateBlocker:function(){var e,b,x,y,w,h;b=this.getBlocker();if(b){if(this.blockMode){e=this.getElement();x=this.parseInt(e.style.left);y=this.parseInt(e.style.top);w=this.parseInt(e.offsetWidth);h=this.parseInt(e.offsetHeight);b.style.left=x+'px';b.style.top=y+'px';b.style.width=w+'px';b.style.height=h+'px';b.style.display=e.style.display;}else b.style.display='none';}},getBlocker:function(){var d,b;if(!this.blockerElement&&this.blockMode){d=this.doc;b=d.createElement("iframe");b.style.cssText='display: none; position: absolute; left: 0; top: 0';b.src='javascript:false;';b.frameBorder='0';b.scrolling='no';d.body.appendChild(b);this.blockerElement=b;}return this.blockerElement;},getAbsPosition:function(n){var p={absLeft:0,absTop:0};while(n){p.absLeft+=n.offsetLeft;p.absTop+=n.offsetTop;n=n.offsetParent;}return p;},create:function(n,c,p){var d=this.doc,e=d.createElement(n);e.setAttribute('id',this.id);if(c)e.className=c;if(!p)p=d.body;p.appendChild(e);return this.element=e;},parseInt:function(s){if(s==null||s=='')return 0;return parseInt(s);}};function TinyMCE_Menu(){var id;if(typeof(tinyMCE.menuCounter)=="undefined")tinyMCE.menuCounter=0;id="mc_menu_"+tinyMCE.menuCounter++;TinyMCE_Layer.call(this,id,true);this.id=id;this.items=new Array();this.needsUpdate=true;};TinyMCE_Menu.prototype=tinyMCE.extend(TinyMCE_Layer.prototype,{init:function(s){var n;this.settings={separator_class:'mceMenuSeparator',title_class:'mceMenuTitle',disabled_class:'mceMenuDisabled',menu_class:'mceMenu',drop_menu:true};for(n in s)this.settings[n]=s[n];this.create('div',this.settings.menu_class);},clear:function(){this.items=new Array();},addTitle:function(t){this.add({type:'title',text:t});},addDisabled:function(t){this.add({type:'disabled',text:t});},addSeparator:function(){this.add({type:'separator'});},addItem:function(t,js){this.add({text:t,js:js});},add:function(mi){this.items[this.items.length]=mi;this.needsUpdate=true;},update:function(){var e=this.getElement(),h='',i,t,m=this.items,s=this.settings;if(this.settings.drop_menu)h+='<span class="mceMenuLine"></span>';h+='<table border="0" cellpadding="0" cellspacing="0">';for(i=0;i<m.length;i++){t=tinyMCE.xmlEncode(m[i].text);c=m[i].class_name?' class="'+m[i].class_name+'"':'';switch(m[i].type){case'separator':h+='<tr class="'+s.separator_class+'"><td>';break;case'title':h+='<tr class="'+s.title_class+'"><td><span'+c+'>'+t+'</span>';break;case'disabled':h+='<tr class="'+s.disabled_class+'"><td><span'+c+'>'+t+'</span>';break;default:h+='<tr><td><a href="javascript:void(0);" onmousedown="'+tinyMCE.xmlEncode(m[i].js)+';return false;"><span'+c+'>'+t+'</span></a>';}h+='</td></tr>';}h+='</table>';e.innerHTML=h;this.needsUpdate=false;this.updateBlocker();},show:function(){var nl,i;if(tinyMCE.lastMenu==this)return;if(this.needsUpdate)this.update();if(tinyMCE.lastMenu&&tinyMCE.lastMenu!=this)tinyMCE.lastMenu.hide();TinyMCE_Layer.prototype.show.call(this);if(!tinyMCE.isOpera){}tinyMCE.lastMenu=this;}});TinyMCE_Engine.prototype.debug=function(){var m="",e,a,i;e=document.getElementById("tinymce_debug");if(!e){var d=document.createElement("div");d.setAttribute("className","debugger");d.className="debugger";d.innerHTML='Debug output:<textarea id="tinymce_debug" style="width: 100%; height: 300px" wrap="nowrap" mce_editable="false"></textarea>';document.body.appendChild(d);e=document.getElementById("tinymce_debug");}a=this.debug.arguments;for(i=0;i<a.length;i++){m+=a[i];if(i<a.length-1)m+=', ';}e.value+=m+"\n";};
\ No newline at end of file

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/tiny_mce_popup.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/tiny_mce_popup.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/tiny_mce_popup.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,272 @@
+
+
+// Some global instances, this will be filled later
+var tinyMCE = null, tinyMCELang = null;
+
+
+function TinyMCE_Popup() {
+};
+
+
+TinyMCE_Popup.prototype.init = function() {
+	var win = window.opener ? window.opener : window.dialogArguments;
+	var inst;
+
+	if (!win) {
+		// Try parent
+		win = parent.parent;
+
+		// Try top
+		if (typeof(win.tinyMCE) == "undefined")
+			win = top;
+	}
+
+	window.opener = win;
+	this.windowOpener = win;
+	this.onLoadEval = "";
+
+	// Setup parent references
+	tinyMCE = win.tinyMCE;
+	tinyMCELang = win.tinyMCELang;
+
+	if (!tinyMCE) {
+		alert("tinyMCE object reference not found from popup.");
+		return;
+	}
+
+	inst = tinyMCE.selectedInstance;
+	this.isWindow = tinyMCE.getWindowArg('mce_inside_iframe', false) == false;
+	this.storeSelection = (tinyMCE.isMSIE && !tinyMCE.isOpera) && !this.isWindow && tinyMCE.getWindowArg('mce_store_selection', true);
+
+	if (this.isWindow)
+		window.focus();
+
+	// Store selection
+	if (this.storeSelection)
+		inst.selectionBookmark = inst.selection.getBookmark(true);
+
+	// Setup dir
+	if (tinyMCELang['lang_dir'])
+		document.dir = tinyMCELang['lang_dir'];
+
+	// Setup title
+	var re = new RegExp('{|\\\$|}', 'g');
+	var title = document.title.replace(re, "");
+	if (typeof tinyMCELang[title] != "undefined") {
+		var divElm = document.createElement("div");
+		divElm.innerHTML = tinyMCELang[title];
+		document.title = divElm.innerHTML;
+
+		if (tinyMCE.setWindowTitle != null)
+			tinyMCE.setWindowTitle(window, divElm.innerHTML);
+	}
+
+	// Output Popup CSS class
+	document.write('<link href="' + tinyMCE.getParam("popups_css") + '" rel="stylesheet" type="text/css">');
+
+	tinyMCE.addEvent(window, "load", this.onLoad);
+};
+
+
+TinyMCE_Popup.prototype.onLoad = function() {
+	var dir, i, elms, body = document.body;
+
+	if (tinyMCE.getWindowArg('mce_replacevariables', true))
+		body.innerHTML = tinyMCE.applyTemplate(body.innerHTML, tinyMCE.windowArgs);
+
+	dir = tinyMCE.selectedInstance.settings['directionality'];
+	if (dir == "rtl" && document.forms && document.forms.length > 0) {
+		elms = document.forms[0].elements;
+		for (i=0; i<elms.length; i++) {
+			if ((elms[i].type == "text" || elms[i].type == "textarea") && elms[i].getAttribute("dir") != "ltr")
+				elms[i].dir = dir;
+		}
+	}
+
+	if (body.style.display == 'none')
+		body.style.display = 'block';
+
+	// Execute real onload (Opera fix)
+	if (tinyMCEPopup.onLoadEval != "")
+		eval(tinyMCEPopup.onLoadEval);
+};
+
+
+TinyMCE_Popup.prototype.executeOnLoad = function(str) {
+	if (tinyMCE.isOpera)
+		this.onLoadEval = str;
+	else
+		eval(str);
+};
+
+
+TinyMCE_Popup.prototype.resizeToInnerSize = function() {
+	// Netscape 7.1 workaround
+	if (this.isWindow && tinyMCE.isNS71) {
+		window.resizeBy(0, 10);
+		return;
+	}
+
+	if (this.isWindow) {
+		var doc = document;
+		var body = doc.body;
+		var oldMargin, wrapper, iframe, nodes, dx, dy;
+
+		if (body.style.display == 'none')
+			body.style.display = 'block';
+
+		// Remove margin
+		oldMargin = body.style.margin;
+		body.style.margin = '0';
+
+		// Create wrapper
+		wrapper = doc.createElement("div");
+		wrapper.id = 'mcBodyWrapper';
+		wrapper.style.display = 'none';
+		wrapper.style.margin = '0';
+
+		// Wrap body elements
+		nodes = doc.body.childNodes;
+		for (var i=nodes.length-1; i>=0; i--) {
+			if (wrapper.hasChildNodes())
+				wrapper.insertBefore(nodes[i].cloneNode(true), wrapper.firstChild);
+			else
+				wrapper.appendChild(nodes[i].cloneNode(true));
+
+			nodes[i].parentNode.removeChild(nodes[i]);
+		}
+
+		// Add wrapper
+		doc.body.appendChild(wrapper);
+
+		// Create iframe
+		iframe = document.createElement("iframe");
+		iframe.id = "mcWinIframe";
+		iframe.src = document.location.href.toLowerCase().indexOf('https') == -1 ? "about:blank" : tinyMCE.settings['default_document'];
+		iframe.width = "100%";
+		iframe.height = "100%";
+		iframe.style.margin = '0';
+
+		// Add iframe
+		doc.body.appendChild(iframe);
+
+		// Measure iframe
+		iframe = document.getElementById('mcWinIframe');
+		dx = tinyMCE.getWindowArg('mce_width') - iframe.clientWidth;
+		dy = tinyMCE.getWindowArg('mce_height') - iframe.clientHeight;
+
+		// Resize window
+		// tinyMCE.debug(tinyMCE.getWindowArg('mce_width') + "," + tinyMCE.getWindowArg('mce_height') + " - " + dx + "," + dy);
+		window.resizeBy(dx, dy);
+
+		// Hide iframe and show wrapper
+		body.style.margin = oldMargin;
+		iframe.style.display = 'none';
+		wrapper.style.display = 'block';
+	}
+};
+
+
+TinyMCE_Popup.prototype.resizeToContent = function() {
+	var isMSIE = (navigator.appName == "Microsoft Internet Explorer");
+	var isOpera = (navigator.userAgent.indexOf("Opera") != -1);
+
+	if (isOpera)
+		return;
+
+	if (isMSIE) {
+		try { window.resizeTo(10, 10); } catch (e) {}
+
+		var elm = document.body;
+		var width = elm.offsetWidth;
+		var height = elm.offsetHeight;
+		var dx = (elm.scrollWidth - width) + 4;
+		var dy = elm.scrollHeight - height;
+
+		try { window.resizeBy(dx, dy); } catch (e) {}
+	} else {
+		window.scrollBy(1000, 1000);
+		if (window.scrollX > 0 || window.scrollY > 0) {
+			window.resizeBy(window.innerWidth * 2, window.innerHeight * 2);
+			window.sizeToContent();
+			window.scrollTo(0, 0);
+			var x = parseInt(screen.width / 2.0) - (window.outerWidth / 2.0);
+			var y = parseInt(screen.height / 2.0) - (window.outerHeight / 2.0);
+			window.moveTo(x, y);
+		}
+	}
+};
+
+
+TinyMCE_Popup.prototype.getWindowArg = function(name, default_value) {
+	return tinyMCE.getWindowArg(name, default_value);
+};
+
+
+TinyMCE_Popup.prototype.restoreSelection = function() {
+	if (this.storeSelection) {
+		var inst = tinyMCE.selectedInstance;
+
+		inst.getWin().focus();
+
+		if (inst.selectionBookmark)
+			inst.selection.moveToBookmark(inst.selectionBookmark);
+	}
+};
+
+
+TinyMCE_Popup.prototype.execCommand = function(command, user_interface, value) {
+	var inst = tinyMCE.selectedInstance;
+
+	this.restoreSelection();
+	inst.execCommand(command, user_interface, value);
+
+	// Store selection
+	if (this.storeSelection)
+		inst.selectionBookmark = inst.selection.getBookmark(true);
+};
+
+
+TinyMCE_Popup.prototype.close = function() {
+	tinyMCE.closeWindow(window);
+};
+
+
+TinyMCE_Popup.prototype.pickColor = function(e, element_id) {
+	tinyMCE.selectedInstance.execCommand('mceColorPicker', true, {
+		element_id : element_id,
+		document : document,
+		window : window,
+		store_selection : false
+	});
+};
+
+
+TinyMCE_Popup.prototype.openBrowser = function(element_id, type, option) {
+	var cb = tinyMCE.getParam(option, tinyMCE.getParam("file_browser_callback"));
+	var url = document.getElementById(element_id).value;
+
+	tinyMCE.setWindowArg("window", window);
+	tinyMCE.setWindowArg("document", document);
+
+	// Call to external callback
+	if (eval('typeof(tinyMCEPopup.windowOpener.' + cb + ')') == "undefined")
+		alert("Callback function: " + cb + " could not be found.");
+	else
+		eval("tinyMCEPopup.windowOpener." + cb + "(element_id, url, type, window);");
+};
+
+
+TinyMCE_Popup.prototype.importClass = function(c) {
+	window[c] = function() {};
+
+	for (var n in window.opener[c].prototype)
+		window[c].prototype[n] = window.opener[c].prototype[n];
+
+	window[c].constructor = window.opener[c].constructor;
+};
+
+// Setup global instance
+var tinyMCEPopup = new TinyMCE_Popup();
+
+tinyMCEPopup.init();

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/tiny_mce_src.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/tiny_mce_src.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/tiny_mce_src.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,6719 @@
+
+/* file:jscripts/tiny_mce/classes/TinyMCE_Engine.class.js */
+
+function TinyMCE_Engine() {
+	this.majorVersion = "2";
+	this.minorVersion = "0.6.1";
+	this.releaseDate = "2006-05-04";
+
+	this.instances = new Array();
+	this.switchClassCache = new Array();
+	this.windowArgs = new Array();
+	this.loadedFiles = new Array();
+	this.pendingFiles = new Array();
+	this.loadingIndex = 0;
+	this.configs = new Array();
+	this.currentConfig = 0;
+	this.eventHandlers = new Array();
+
+	// Browser check
+	var ua = navigator.userAgent;
+	this.isMSIE = (navigator.appName == "Microsoft Internet Explorer");
+	this.isMSIE5 = this.isMSIE && (ua.indexOf('MSIE 5') != -1);
+	this.isMSIE5_0 = this.isMSIE && (ua.indexOf('MSIE 5.0') != -1);
+	this.isGecko = ua.indexOf('Gecko') != -1;
+	this.isSafari = ua.indexOf('Safari') != -1;
+	this.isOpera = ua.indexOf('Opera') != -1;
+	this.isMac = ua.indexOf('Mac') != -1;
+	this.isNS7 = ua.indexOf('Netscape/7') != -1;
+	this.isNS71 = ua.indexOf('Netscape/7.1') != -1;
+	this.dialogCounter = 0;
+	this.plugins = new Array();
+	this.themes = new Array();
+	this.menus = new Array();
+	this.loadedPlugins = new Array();
+	this.buttonMap = new Array();
+	this.isLoaded = false;
+
+	// Fake MSIE on Opera and if Opera fakes IE, Gecko or Safari cancel those
+	if (this.isOpera) {
+		this.isMSIE = true;
+		this.isGecko = false;
+		this.isSafari =  false;
+	}
+
+	// TinyMCE editor id instance counter
+	this.idCounter = 0;
+};
+
+TinyMCE_Engine.prototype = {
+	init : function(settings) {
+		var theme;
+
+		this.settings = settings;
+
+		// Check if valid browser has execcommand support
+		if (typeof(document.execCommand) == 'undefined')
+			return;
+
+		// Get script base path
+		if (!tinyMCE.baseURL) {
+			var elements = document.getElementsByTagName('script');
+
+			for (var i=0; i<elements.length; i++) {
+				if (elements[i].src && (elements[i].src.indexOf("tiny_mce.js") != -1 || elements[i].src.indexOf("tiny_mce_dev.js") != -1 || elements[i].src.indexOf("tiny_mce_src.js") != -1 || elements[i].src.indexOf("tiny_mce_gzip") != -1)) {
+					var src = elements[i].src;
+
+					tinyMCE.srcMode = (src.indexOf('_src') != -1 || src.indexOf('_dev') != -1) ? '_src' : '';
+					tinyMCE.gzipMode = src.indexOf('_gzip') != -1;
+					src = src.substring(0, src.lastIndexOf('/'));
+
+					if (settings.exec_mode == "src" || settings.exec_mode == "normal")
+						tinyMCE.srcMode = settings.exec_mode == "src" ? '_src' : '';
+
+					tinyMCE.baseURL = src;
+					break;
+				}
+			}
+		}
+
+		// Get document base path
+		this.documentBasePath = document.location.href;
+		if (this.documentBasePath.indexOf('?') != -1)
+			this.documentBasePath = this.documentBasePath.substring(0, this.documentBasePath.indexOf('?'));
+		this.documentURL = this.documentBasePath;
+		this.documentBasePath = this.documentBasePath.substring(0, this.documentBasePath.lastIndexOf('/'));
+
+		// If not HTTP absolute
+		if (tinyMCE.baseURL.indexOf('://') == -1 && tinyMCE.baseURL.charAt(0) != '/') {
+			// If site absolute
+			tinyMCE.baseURL = this.documentBasePath + "/" + tinyMCE.baseURL;
+		}
+
+		// Set default values on settings
+		this._def("mode", "none");
+		this._def("theme", "advanced");
+		this._def("plugins", "", true);
+		this._def("language", "en");
+		this._def("docs_language", this.settings['language']);
+		this._def("elements", "");
+		this._def("textarea_trigger", "mce_editable");
+		this._def("editor_selector", "");
+		this._def("editor_deselector", "mceNoEditor");
+		this._def("valid_elements", "+a[id|style|rel|rev|charset|hreflang|dir|lang|tabindex|accesskey|type|name|href|target|title|class|onfocus|onblur|onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup],-strong/-b[class|style],-em/-i[class|style],-strike[class|style],-u[class|style],#p[id|style|dir|class|align],-ol[class|style],-ul[class|style],-li[class|style],br,img[id|dir|lang|longdesc|usemap|style|class|src|onmouseover|onmouseout|border|alt=|title|hspace|vspace|width|height|align],-sub[style|class],-sup[style|class],-blockquote[dir|style],-table[border=0|cellspacing|cellpadding|width|height|class|align|summary|style|dir|id|lang|bgcolor|background|bordercolor],-tr[id|lang|dir|class|rowspan|width|height|align|valign|style|bgcolor|background|bordercolor],tbody[id|class],thead[id|class],tfoot[id|class],-td[id|lang|dir|class|colspan|rowspan|width|height|align|valign|style|bgcolor|background|bordercolor|scope],-th[id|lang|dir|class|colspan|rowspan|width|height|align|valign|style|scope],caption[id|lang|dir|class|style],-div[id|dir|class|align|style],-span[style|class|align],-pre[class|align|style],address[class|align|style],-h1[id|style|dir|class|align],-h2[id|style|dir|class|align],-h3[id|style|dir|class|align],-h4[id|style|dir|class|align],-h5[id|style|dir|class|align],-h6[id|style|dir|class|align],hr[class|style],-font[face|size|style|id|class|dir|color],dd[id|class|title|style|dir|lang],dl[id|class|title|style|dir|lang],dt[id|class|title|style|dir|lang]");
+		this._def("extended_valid_elements", "");
+		this._def("invalid_elements", "");
+		this._def("encoding", "");
+		this._def("urlconverter_callback", tinyMCE.getParam("urlconvertor_callback", "TinyMCE_Engine.prototype.convertURL"));
+		this._def("save_callback", "");
+		this._def("debug", false);
+		this._def("force_br_newlines", false);
+		this._def("force_p_newlines", true);
+		this._def("add_form_submit_trigger", true);
+		this._def("relative_urls", true);
+		this._def("remove_script_host", true);
+		this._def("focus_alert", true);
+		this._def("document_base_url", this.documentURL);
+		this._def("visual", true);
+		this._def("visual_table_class", "mceVisualAid");
+		this._def("setupcontent_callback", "");
+		this._def("fix_content_duplication", true);
+		this._def("custom_undo_redo", true);
+		this._def("custom_undo_redo_levels", -1);
+		this._def("custom_undo_redo_keyboard_shortcuts", true);
+		this._def("custom_undo_redo_restore_selection", true);
+		this._def("verify_html", true);
+		this._def("apply_source_formatting", false);
+		this._def("directionality", "ltr");
+		this._def("cleanup_on_startup", false);
+		this._def("inline_styles", false);
+		this._def("convert_newlines_to_brs", false);
+		this._def("auto_reset_designmode", true);
+		this._def("entities", "39,#39,160,nbsp,161,iexcl,162,cent,163,pound,164,curren,165,yen,166,brvbar,167,sect,168,uml,169,copy,170,ordf,171,laquo,172,not,173,shy,174,reg,175,macr,176,deg,177,plusmn,178,sup2,179,sup3,180,acute,181,micro,182,para,183,middot,184,cedil,185,sup1,186,ordm,187,raquo,188,frac14,189,frac12,190,frac34,191,iquest,192,Agrave,193,Aacute,194,Acirc,195,Atilde,196,Auml,197,Aring,198,AElig,199,Ccedil,200,Egrave,201,Eacute,202,Ecirc,203,Euml,204,Igrave,205,Iacute,206,Icirc,207,Iuml,208,ETH,209,Ntilde,210,Ograve,211,Oacute,212,Ocirc,213,Otilde,214,Ouml,215,times,216,Oslash,217,Ugrave,218,Uacute,219,Ucirc,220,Uuml,221,Yacute,222,THORN,223,szlig,224,agrave,225,aacute,226,acirc,227,atilde,228,auml,229,aring,230,aelig,231,ccedil,232,egrave,233,eacute,234,ecirc,235,euml,236,igrave,237,iacute,238,icirc,239,iuml,240,eth,241,ntilde,242,ograve,243,oacute,244,ocirc,245,otilde,246,ouml,247,divide,248,oslash,249,ugrave,250,uacute,251,ucirc,252,uuml,253,yacute,254,thorn,255,yuml,402,fnof,913,Alpha,914,Beta,915,Gamma,916,Delta,917,Epsilon,918,Zeta,919,Eta,920,Theta,921,Iota,922,Kappa,923,Lambda,924,Mu,925,Nu,926,Xi,927,Omicron,928,Pi,929,Rho,931,Sigma,932,Tau,933,Upsilon,934,Phi,935,Chi,936,Psi,937,Omega,945,alpha,946,beta,947,gamma,948,delta,949,epsilon,950,zeta,951,eta,952,theta,953,iota,954,kappa,955,lambda,956,mu,957,nu,958,xi,959,omicron,960,pi,961,rho,962,sigmaf,963,sigma,964,tau,965,upsilon,966,phi,967,chi,968,psi,969,omega,977,thetasym,978,upsih,982,piv,8226,bull,8230,hellip,8242,prime,8243,Prime,8254,oline,8260,frasl,8472,weierp,8465,image,8476,real,8482,trade,8501,alefsym,8592,larr,8593,uarr,8594,rarr,8595,darr,8596,harr,8629,crarr,8656,lArr,8657,uArr,8658,rArr,8659,dArr,8660,hArr,8704,forall,8706,part,8707,exist,8709,empty,8711,nabla,8712,isin,8713,notin,8715,ni,8719,prod,8721,sum,8722,minus,8727,lowast,8730,radic,8733,prop,8734,infin,8736,ang,8743,and,8744,or,8745,cap,8746,cup,8747,int,8756,there4,8764,sim,8773,cong,8776,asymp,8800,ne,8801,equiv,8804,le,8805,ge,8834,sub,8835,sup,8836,nsub,8838,sube,8839,supe,8853,oplus,8855,otimes,8869,perp,8901,sdot,8968,lceil,8969,rceil,8970,lfloor,8971,rfloor,9001,lang,9002,rang,9674,loz,9824,spades,9827,clubs,9829,hearts,9830,diams,34,quot,38,amp,60,lt,62,gt,338,OElig,339,oelig,352,Scaron,353,scaron,376,Yuml,710,circ,732,tilde,8194,ensp,8195,emsp,8201,thinsp,8204,zwnj,8205,zwj,8206,lrm,8207,rlm,8211,ndash,8212,mdash,8216,lsquo,8217,rsquo,8218,sbquo,8220,ldquo,8221,rdquo,8222,bdquo,8224,dagger,8225,Dagger,8240,permil,8249,lsaquo,8250,rsaquo,8364,euro", true);
+		this._def("entity_encoding", "named");
+		this._def("cleanup_callback", "");
+		this._def("add_unload_trigger", true);
+		this._def("ask", false);
+		this._def("nowrap", false);
+		this._def("auto_resize", false);
+		this._def("auto_focus", false);
+		this._def("cleanup", true);
+		this._def("remove_linebreaks", true);
+		this._def("button_tile_map", false);
+		this._def("submit_patch", true);
+		this._def("browsers", "msie,safari,gecko,opera", true);
+		this._def("dialog_type", "window");
+		this._def("accessibility_warnings", true);
+		this._def("accessibility_focus", true);
+		this._def("merge_styles_invalid_parents", "");
+		this._def("force_hex_style_colors", true);
+		this._def("trim_span_elements", true);
+		this._def("convert_fonts_to_spans", false);
+		this._def("doctype", '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">');
+		this._def("font_size_classes", '');
+		this._def("font_size_style_values", 'xx-small,x-small,small,medium,large,x-large,xx-large', true);
+		this._def("event_elements", 'a,img', true);
+		this._def("convert_urls", true);
+		this._def("table_inline_editing", false);
+		this._def("object_resizing", true);
+		this._def("custom_shortcuts", true);
+		this._def("convert_on_click", false);
+		this._def("content_css", '');
+		this._def("fix_list_elements", false);
+		this._def("fix_table_elements", false);
+		this._def("strict_loading_mode", document.contentType == 'application/xhtml+xml');
+		this._def("hidden_tab_class", '');
+		this._def("display_tab_class", '');
+
+		// Force strict loading mode to false on non Gecko browsers
+		if (this.isMSIE && !this.isOpera)
+			this.settings.strict_loading_mode = false;
+
+		// Browser check IE
+		if (this.isMSIE && this.settings['browsers'].indexOf('msie') == -1)
+			return;
+
+		// Browser check Gecko
+		if (this.isGecko && this.settings['browsers'].indexOf('gecko') == -1)
+			return;
+
+		// Browser check Safari
+		if (this.isSafari && this.settings['browsers'].indexOf('safari') == -1)
+			return;
+
+		// Browser check Opera
+		if (this.isOpera && this.settings['browsers'].indexOf('opera') == -1)
+			return;
+
+		// If not super absolute make it so
+		var baseHREF = tinyMCE.settings['document_base_url'];
+		var h = document.location.href;
+		var p = h.indexOf('://');
+		if (p > 0 && document.location.protocol != "file:") {
+			p = h.indexOf('/', p + 3);
+			h = h.substring(0, p);
+
+			if (baseHREF.indexOf('://') == -1)
+				baseHREF = h + baseHREF;
+
+			tinyMCE.settings['document_base_url'] = baseHREF;
+			tinyMCE.settings['document_base_prefix'] = h;
+		}
+
+		// Trim away query part
+		if (baseHREF.indexOf('?') != -1)
+			baseHREF = baseHREF.substring(0, baseHREF.indexOf('?'));
+
+		this.settings['base_href'] = baseHREF.substring(0, baseHREF.lastIndexOf('/')) + "/";
+
+		theme = this.settings['theme'];
+		this.blockRegExp = new RegExp("^(h[1-6]|p|div|address|pre|form|table|li|ol|ul|td|blockquote|center|dl|dt|dd|dir|fieldset|form|noscript|noframes|menu|isindex|samp)$", "i");
+		this.posKeyCodes = new Array(13,45,36,35,33,34,37,38,39,40);
+		this.uniqueURL = 'javascript:TINYMCE_UNIQUEURL();'; // Make unique URL non real URL
+		this.uniqueTag = '<div id="mceTMPElement" style="display: none">TMP</div>';
+		this.callbacks = new Array('onInit', 'getInfo', 'getEditorTemplate', 'setupContent', 'onChange', 'onPageLoad', 'handleNodeChange', 'initInstance', 'execCommand', 'getControlHTML', 'handleEvent', 'cleanup');
+
+		// Theme url
+		this.settings['theme_href'] = tinyMCE.baseURL + "/themes/" + theme;
+
+		if (!tinyMCE.isMSIE)
+			this.settings['force_br_newlines'] = false;
+
+		if (tinyMCE.getParam("popups_css", false)) {
+			var cssPath = tinyMCE.getParam("popups_css", "");
+
+			// Is relative
+			if (cssPath.indexOf('://') == -1 && cssPath.charAt(0) != '/')
+				this.settings['popups_css'] = this.documentBasePath + "/" + cssPath;
+			else
+				this.settings['popups_css'] = cssPath;
+		} else
+			this.settings['popups_css'] = tinyMCE.baseURL + "/themes/" + theme + "/css/editor_popup.css";
+
+		if (tinyMCE.getParam("editor_css", false)) {
+			var cssPath = tinyMCE.getParam("editor_css", "");
+
+			// Is relative
+			if (cssPath.indexOf('://') == -1 && cssPath.charAt(0) != '/')
+				this.settings['editor_css'] = this.documentBasePath + "/" + cssPath;
+			else
+				this.settings['editor_css'] = cssPath;
+		} else
+			this.settings['editor_css'] = tinyMCE.baseURL + "/themes/" + theme + "/css/editor_ui.css";
+
+		if (tinyMCE.settings['debug']) {
+			var msg = "Debug: \n";
+
+			msg += "baseURL: " + this.baseURL + "\n";
+			msg += "documentBasePath: " + this.documentBasePath + "\n";
+			msg += "content_css: " + this.settings['content_css'] + "\n";
+			msg += "popups_css: " + this.settings['popups_css'] + "\n";
+			msg += "editor_css: " + this.settings['editor_css'] + "\n";
+
+			alert(msg);
+		}
+
+		// Only do this once
+		if (this.configs.length == 0) {
+			// Is Safari enabled
+			if (this.isSafari && this.getParam('safari_warning', false))
+				alert("Safari support is very limited and should be considered experimental.\nSo there is no need to even submit bugreports on this early version.\nYou can disable this message by setting: safari_warning option to false");
+
+			if (typeof(TinyMCECompressed) == "undefined") {
+				tinyMCE.addEvent(window, "DOMContentLoaded", TinyMCE_Engine.prototype.onLoad);
+
+				if (tinyMCE.isMSIE && !tinyMCE.isOpera) {
+					if (document.body)
+						tinyMCE.addEvent(document.body, "readystatechange", TinyMCE_Engine.prototype.onLoad);
+					else
+						tinyMCE.addEvent(document, "readystatechange", TinyMCE_Engine.prototype.onLoad);
+				}
+
+				tinyMCE.addEvent(window, "load", TinyMCE_Engine.prototype.onLoad);
+				tinyMCE._addUnloadEvents();
+			}
+		}
+
+		this.loadScript(tinyMCE.baseURL + '/themes/' + this.settings['theme'] + '/editor_template' + tinyMCE.srcMode + '.js');
+		this.loadScript(tinyMCE.baseURL + '/langs/' + this.settings['language'] +  '.js');
+		this.loadCSS(this.settings['editor_css']);
+
+		// Add plugins
+		var p = tinyMCE.getParam('plugins', '', true, ',');
+		if (p.length > 0) {
+			for (var i=0; i<p.length; i++) {
+				if (p[i].charAt(0) != '-')
+					this.loadScript(tinyMCE.baseURL + '/plugins/' + p[i] + '/editor_plugin' + tinyMCE.srcMode + '.js');
+			}
+		}
+
+		// Setup entities
+		settings['cleanup_entities'] = new Array();
+		var entities = tinyMCE.getParam('entities', '', true, ',');
+		for (var i=0; i<entities.length; i+=2)
+			settings['cleanup_entities']['c' + entities[i]] = entities[i+1];
+
+		// Save away this config
+		settings['index'] = this.configs.length;
+		this.configs[this.configs.length] = settings;
+
+		// Start loading first one in chain
+		this.loadNextScript();
+	},
+
+	_addUnloadEvents : function() {
+		if (tinyMCE.isMSIE) {
+			if (tinyMCE.settings['add_unload_trigger']) {
+				tinyMCE.addEvent(window, "unload", TinyMCE_Engine.prototype.unloadHandler);
+				tinyMCE.addEvent(window.document, "beforeunload", TinyMCE_Engine.prototype.unloadHandler);
+			}
+		} else {
+			if (tinyMCE.settings['add_unload_trigger'])
+				tinyMCE.addEvent(window, "unload", function () {tinyMCE.triggerSave(true, true);});
+		}
+	},
+
+	_def : function(key, def_val, t) {
+		var v = tinyMCE.getParam(key, def_val);
+
+		v = t ? v.replace(/\s+/g,"") : v;
+
+		this.settings[key] = v;
+	},
+
+	hasPlugin : function(n) {
+		return typeof(this.plugins[n]) != "undefined" && this.plugins[n] != null;
+	},
+
+	addPlugin : function(n, p) {
+		var op = this.plugins[n];
+
+		// Use the previous plugin object base URL used when loading external plugins
+		p.baseURL = op ? op.baseURL : tinyMCE.baseURL + "/plugins/" + n;
+		this.plugins[n] = p;
+
+		this.loadNextScript();
+	},
+
+	setPluginBaseURL : function(n, u) {
+		var op = this.plugins[n];
+
+		if (op)
+			op.baseURL = u;
+		else
+			this.plugins[n] = {baseURL : u};
+	},
+
+	loadPlugin : function(n, u) {
+		u = u.indexOf('.js') != -1 ? u.substring(0, u.lastIndexOf('/')) : u;
+		u = u.charAt(u.length-1) == '/' ? u.substring(0, u.length-1) : u;
+		this.plugins[n] = {baseURL : u};
+		this.loadScript(u + "/editor_plugin" + (tinyMCE.srcMode ? '_src' : '') + ".js");
+	},
+
+	hasTheme : function(n) {
+		return typeof(this.themes[n]) != "undefined" && this.themes[n] != null;
+	},
+
+	addTheme : function(n, t) {
+		this.themes[n] = t;
+
+		this.loadNextScript();
+	},
+
+	addMenu : function(n, m) {
+		this.menus[n] = m;
+	},
+
+	hasMenu : function(n) {
+		return typeof(this.plugins[n]) != "undefined" && this.plugins[n] != null;
+	},
+
+	loadScript : function(url) {
+		var i;
+
+		for (i=0; i<this.loadedFiles.length; i++) {
+			if (this.loadedFiles[i] == url)
+				return;
+		}
+
+		if (tinyMCE.settings.strict_loading_mode)
+			this.pendingFiles[this.pendingFiles.length] = url;
+		else
+			document.write('<sc'+'ript language="javascript" type="text/javascript" src="' + url + '"></script>');
+
+		this.loadedFiles[this.loadedFiles.length] = url;
+	},
+
+	loadNextScript : function() {
+		var d = document, se;
+
+		if (!tinyMCE.settings.strict_loading_mode)
+			return;
+
+		if (this.loadingIndex < this.pendingFiles.length) {
+			se = d.createElementNS('http://www.w3.org/1999/xhtml', 'script');
+			se.setAttribute('language', 'javascript');
+			se.setAttribute('type', 'text/javascript');
+			se.setAttribute('src', this.pendingFiles[this.loadingIndex++]);
+
+			d.getElementsByTagName("head")[0].appendChild(se);
+		} else
+			this.loadingIndex = -1; // Done with loading
+	},
+
+	loadCSS : function(url) {
+		var ar = url.replace(/\s+/, '').split(',');
+		var lflen = 0, csslen = 0;
+		var skip = false;
+		var x = 0, i = 0, nl, le;
+
+		for (x = 0,csslen = ar.length; x<csslen; x++) {
+			ignore_css = false;
+
+			if (ar[x] != null && ar[x] != 'null' && ar[x].length > 0) {
+				/* Make sure it doesn't exist. */
+				for (i=0, lflen=this.loadedFiles.length; i<lflen; i++) {
+					if (this.loadedFiles[i] == ar[x]) {
+						skip = true;
+						break;
+					}
+				}
+
+				if (!skip) {
+					if (tinyMCE.settings.strict_loading_mode) {
+						nl = document.getElementsByTagName("head");
+
+						le = document.createElement('link');
+						le.setAttribute('href', ar[x]);
+						le.setAttribute('rel', 'stylesheet');
+						le.setAttribute('type', 'text/css');
+
+						nl[0].appendChild(le);			
+					} else
+						document.write('<link href="' + ar[x] + '" rel="stylesheet" type="text/css" />');
+
+					this.loadedFiles[this.loadedFiles.length] = ar[x];
+				}
+			}
+		}
+	},
+
+	importCSS : function(doc, css) {
+		var css_ary = css.replace(/\s+/, '').split(',');
+		var csslen, elm, headArr, x, css_file;
+
+		for (x = 0, csslen = css_ary.length; x<csslen; x++) {
+			css_file = css_ary[x];
+
+			if (css_file != null && css_file != 'null' && css_file.length > 0) {
+				// Is relative, make absolute
+				if (css_file.indexOf('://') == -1 && css_file.charAt(0) != '/')
+					css_file = this.documentBasePath + "/" + css_file;
+
+				if (typeof(doc.createStyleSheet) == "undefined") {
+					elm = doc.createElement("link");
+
+					elm.rel = "stylesheet";
+					elm.href = css_file;
+
+					if ((headArr = doc.getElementsByTagName("head")) != null && headArr.length > 0)
+						headArr[0].appendChild(elm);
+				} else
+					doc.createStyleSheet(css_file);
+			}
+		}
+	},
+
+	confirmAdd : function(e, settings) {
+		var elm = tinyMCE.isMSIE ? event.srcElement : e.target;
+		var elementId = elm.name ? elm.name : elm.id;
+
+		tinyMCE.settings = settings;
+
+		if (tinyMCE.settings['convert_on_click'] || (!elm.getAttribute('mce_noask') && confirm(tinyMCELang['lang_edit_confirm'])))
+			tinyMCE.addMCEControl(elm, elementId);
+
+		elm.setAttribute('mce_noask', 'true');
+	},
+
+	updateContent : function(form_element_name) {
+		// Find MCE instance linked to given form element and copy it's value
+		var formElement = document.getElementById(form_element_name);
+		for (var n in tinyMCE.instances) {
+			var inst = tinyMCE.instances[n];
+			if (!tinyMCE.isInstance(inst))
+				continue;
+
+			inst.switchSettings();
+
+			if (inst.formElement == formElement) {
+				var doc = inst.getDoc();
+		
+				tinyMCE._setHTML(doc, inst.formElement.value);
+
+				if (!tinyMCE.isMSIE)
+					doc.body.innerHTML = tinyMCE._cleanupHTML(inst, doc, this.settings, doc.body, inst.visualAid);
+			}
+		}
+	},
+
+	addMCEControl : function(replace_element, form_element_name, target_document) {
+		var id = "mce_editor_" + tinyMCE.idCounter++;
+		var inst = new TinyMCE_Control(tinyMCE.settings);
+
+		inst.editorId = id;
+		this.instances[id] = inst;
+
+		inst._onAdd(replace_element, form_element_name, target_document);
+	},
+
+	removeMCEControl : function(editor_id) {
+		var inst = tinyMCE.getInstanceById(editor_id);
+
+		if (inst) {
+			inst.switchSettings();
+
+			editor_id = inst.editorId;
+			var html = tinyMCE.getContent(editor_id);
+
+			// Remove editor instance from instances array
+			var tmpInstances = new Array();
+			for (var instanceName in tinyMCE.instances) {
+				var instance = tinyMCE.instances[instanceName];
+				if (!tinyMCE.isInstance(instance))
+					continue;
+
+				if (instanceName != editor_id)
+						tmpInstances[instanceName] = instance;
+			}
+			tinyMCE.instances = tmpInstances;
+
+			tinyMCE.selectedElement = null;
+			tinyMCE.selectedInstance = null;
+
+			// Remove element
+			var replaceElement = document.getElementById(editor_id + "_parent");
+			var oldTargetElement = inst.oldTargetElement;
+			var targetName = oldTargetElement.nodeName.toLowerCase();
+
+			if (targetName == "textarea" || targetName == "input") {
+				// Just show the old text area
+				replaceElement.parentNode.removeChild(replaceElement);
+				oldTargetElement.style.display = "inline";
+				oldTargetElement.value = html;
+			} else {
+				oldTargetElement.innerHTML = html;
+				oldTargetElement.style.display = 'block';
+
+				replaceElement.parentNode.insertBefore(oldTargetElement, replaceElement);
+				replaceElement.parentNode.removeChild(replaceElement);
+			}
+		}
+	},
+
+	triggerSave : function(skip_cleanup, skip_callback) {
+		var inst, n;
+
+		// Default to false
+		if (typeof(skip_cleanup) == "undefined")
+			skip_cleanup = false;
+
+		// Default to false
+		if (typeof(skip_callback) == "undefined")
+			skip_callback = false;
+
+		// Cleanup and set all form fields
+		for (n in tinyMCE.instances) {
+			inst = tinyMCE.instances[n];
+
+			if (!tinyMCE.isInstance(inst))
+				continue;
+
+			inst.triggerSave(skip_cleanup, skip_callback);
+		}
+	},
+
+	resetForm : function(form_index) {
+		var i, inst, n, formObj = document.forms[form_index];
+
+		for (n in tinyMCE.instances) {
+			inst = tinyMCE.instances[n];
+
+			if (!tinyMCE.isInstance(inst))
+				continue;
+
+			inst.switchSettings();
+
+			for (i=0; i<formObj.elements.length; i++) {
+				if (inst.formTargetElementId == formObj.elements[i].name)
+					inst.getBody().innerHTML = inst.startContent;
+			}
+		}
+	},
+
+	execInstanceCommand : function(editor_id, command, user_interface, value, focus) {
+		var inst = tinyMCE.getInstanceById(editor_id);
+		if (inst) {
+			if (typeof(focus) == "undefined")
+				focus = true;
+
+			if (focus)
+				inst.contentWindow.focus();
+
+			// Reset design mode if lost
+			inst.autoResetDesignMode();
+
+			this.selectedElement = inst.getFocusElement();
+			this.selectedInstance = inst;
+			tinyMCE.execCommand(command, user_interface, value);
+
+			// Cancel event so it doesn't call onbeforeonunlaod
+			if (tinyMCE.isMSIE && window.event != null)
+				tinyMCE.cancelEvent(window.event);
+		}
+	},
+
+	execCommand : function(command, user_interface, value) {
+		// Default input
+		user_interface = user_interface ? user_interface : false;
+		value = value ? value : null;
+
+		if (tinyMCE.selectedInstance)
+			tinyMCE.selectedInstance.switchSettings();
+
+		switch (command) {
+			case 'mceHelp':
+				tinyMCE.openWindow({
+					file : 'about.htm',
+					width : 480,
+					height : 380
+				}, {
+					tinymce_version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion,
+					tinymce_releasedate : tinyMCE.releaseDate,
+					inline : "yes"
+				});
+			return;
+
+			case 'mceFocus':
+				var inst = tinyMCE.getInstanceById(value);
+				if (inst)
+					inst.contentWindow.focus();
+			return;
+
+			case "mceAddControl":
+			case "mceAddEditor":
+				tinyMCE.addMCEControl(tinyMCE._getElementById(value), value);
+				return;
+
+			case "mceAddFrameControl":
+				tinyMCE.addMCEControl(tinyMCE._getElementById(value['element'], value['document']), value['element'], value['document']);
+				return;
+
+			case "mceRemoveControl":
+			case "mceRemoveEditor":
+				tinyMCE.removeMCEControl(value);
+				return;
+
+			case "mceResetDesignMode":
+				// Resets the designmode state of the editors in Gecko
+				if (!tinyMCE.isMSIE) {
+					for (var n in tinyMCE.instances) {
+						if (!tinyMCE.isInstance(tinyMCE.instances[n]))
+							continue;
+
+						try {
+							tinyMCE.instances[n].getDoc().designMode = "on";
+						} catch (e) {
+							// Ignore any errors
+						}
+					}
+				}
+
+				return;
+		}
+
+		if (this.selectedInstance) {
+			this.selectedInstance.execCommand(command, user_interface, value);
+		} else if (tinyMCE.settings['focus_alert'])
+			alert(tinyMCELang['lang_focus_alert']);
+	},
+
+	_createIFrame : function(replace_element, doc, win) {
+		var iframe, id = replace_element.getAttribute("id");
+		var aw, ah;
+
+		if (typeof(doc) == "undefined")
+			doc = document;
+
+		if (typeof(win) == "undefined")
+			win = window;
+
+		iframe = doc.createElement("iframe");
+
+		aw = "" + tinyMCE.settings['area_width'];
+		ah = "" + tinyMCE.settings['area_height'];
+
+		if (aw.indexOf('%') == -1) {
+			aw = parseInt(aw);
+			aw = aw < 0 ? 300 : aw;
+			aw = aw + "px";
+		}
+
+		if (ah.indexOf('%') == -1) {
+			ah = parseInt(ah);
+			ah = ah < 0 ? 240 : ah;
+			ah = ah + "px";
+		}
+
+		iframe.setAttribute("id", id);
+		iframe.setAttribute("class", "mceEditorIframe");
+		iframe.setAttribute("border", "0");
+		iframe.setAttribute("frameBorder", "0");
+		iframe.setAttribute("marginWidth", "0");
+		iframe.setAttribute("marginHeight", "0");
+		iframe.setAttribute("leftMargin", "0");
+		iframe.setAttribute("topMargin", "0");
+		iframe.setAttribute("width", aw);
+		iframe.setAttribute("height", ah);
+		iframe.setAttribute("allowtransparency", "true");
+		iframe.className = 'mceEditorIframe';
+
+		if (tinyMCE.settings["auto_resize"])
+			iframe.setAttribute("scrolling", "no");
+
+		// Must have a src element in MSIE HTTPs breaks aswell as absoute URLs
+		if (tinyMCE.isMSIE && !tinyMCE.isOpera)
+			iframe.setAttribute("src", this.settings['default_document']);
+
+		iframe.style.width = aw;
+		iframe.style.height = ah;
+
+		// Ugly hack for Gecko problem in strict mode
+		if (tinyMCE.settings.strict_loading_mode)
+			iframe.style.marginBottom = '-5px';
+
+		// MSIE 5.0 issue
+		if (tinyMCE.isMSIE && !tinyMCE.isOpera)
+			replace_element.outerHTML = iframe.outerHTML;
+		else
+			replace_element.parentNode.replaceChild(iframe, replace_element);
+
+		if (tinyMCE.isMSIE && !tinyMCE.isOpera)
+			return win.frames[id];
+		else
+			return iframe;
+	},
+
+	setupContent : function(editor_id) {
+		var inst = tinyMCE.instances[editor_id];
+		var doc = inst.getDoc();
+		var head = doc.getElementsByTagName('head').item(0);
+		var content = inst.startContent;
+
+		// HTML values get XML encoded in strict mode
+		if (tinyMCE.settings.strict_loading_mode) {
+			content = content.replace(/&lt;/g, '<');
+			content = content.replace(/&gt;/g, '>');
+			content = content.replace(/&quot;/g, '"');
+			content = content.replace(/&amp;/g, '&');
+		}
+
+		inst.switchSettings();
+
+		// Not loaded correctly hit it again, Mozilla bug #997860
+		if (!tinyMCE.isMSIE && tinyMCE.getParam("setupcontent_reload", false) && doc.title != "blank_page") {
+			// This part will remove the designMode status
+			// Failes first time in Firefox 1.5b2 on Mac
+			try {doc.location.href = tinyMCE.baseURL + "/blank.htm";} catch (ex) {}
+			window.setTimeout("tinyMCE.setupContent('" + editor_id + "');", 1000);
+			return;
+		}
+
+		if (!head) {
+			window.setTimeout("tinyMCE.setupContent('" + editor_id + "');", 10);
+			return;
+		}
+
+		// Import theme specific content CSS the user specific
+		tinyMCE.importCSS(inst.getDoc(), tinyMCE.baseURL + "/themes/" + inst.settings['theme'] + "/css/editor_content.css");
+		tinyMCE.importCSS(inst.getDoc(), inst.settings['content_css']);
+		tinyMCE.dispatchCallback(inst, 'init_instance_callback', 'initInstance', inst);
+
+		// Setup keyboard shortcuts
+		if (tinyMCE.getParam('custom_undo_redo_keyboard_shortcuts')) {
+			inst.addShortcut('ctrl', 'z', 'lang_undo_desc', 'Undo');
+			inst.addShortcut('ctrl', 'y', 'lang_redo_desc', 'Redo');
+		}
+
+		// Add default shortcuts for gecko
+		if (tinyMCE.isGecko) {
+			inst.addShortcut('ctrl', 'b', 'lang_bold_desc', 'Bold');
+			inst.addShortcut('ctrl', 'i', 'lang_italic_desc', 'Italic');
+			inst.addShortcut('ctrl', 'u', 'lang_underline_desc', 'Underline');
+		}
+
+		// Setup span styles
+		if (tinyMCE.getParam("convert_fonts_to_spans"))
+			inst.getDoc().body.setAttribute('id', 'mceSpanFonts');
+
+		if (tinyMCE.settings['nowrap'])
+			doc.body.style.whiteSpace = "nowrap";
+
+		doc.body.dir = this.settings['directionality'];
+		doc.editorId = editor_id;
+
+		// Add on document element in Mozilla
+		if (!tinyMCE.isMSIE)
+			doc.documentElement.editorId = editor_id;
+
+		inst.setBaseHREF(tinyMCE.settings['base_href']);
+
+		// Replace new line characters to BRs
+		if (tinyMCE.settings['convert_newlines_to_brs']) {
+			content = tinyMCE.regexpReplace(content, "\r\n", "<br />", "gi");
+			content = tinyMCE.regexpReplace(content, "\r", "<br />", "gi");
+			content = tinyMCE.regexpReplace(content, "\n", "<br />", "gi");
+		}
+
+		// Open closed anchors
+	//	content = content.replace(new RegExp('<a(.*?)/>', 'gi'), '<a$1></a>');
+
+		// Call custom cleanup code
+		content = tinyMCE.storeAwayURLs(content);
+		content = tinyMCE._customCleanup(inst, "insert_to_editor", content);
+
+		if (tinyMCE.isMSIE) {
+			// Ugly!!!
+			window.setInterval('try{tinyMCE.getCSSClasses(tinyMCE.instances["' + editor_id + '"].getDoc(), "' + editor_id + '");}catch(e){}', 500);
+
+			if (tinyMCE.settings["force_br_newlines"])
+				doc.styleSheets[0].addRule("p", "margin: 0;");
+
+			var body = inst.getBody();
+			body.editorId = editor_id;
+		}
+
+		content = tinyMCE.cleanupHTMLCode(content);
+
+		// Fix for bug #958637
+		if (!tinyMCE.isMSIE) {
+			var contentElement = inst.getDoc().createElement("body");
+			var doc = inst.getDoc();
+
+			contentElement.innerHTML = content;
+
+			// Remove weridness!
+			if (tinyMCE.isGecko && tinyMCE.settings['remove_lt_gt'])
+				content = content.replace(new RegExp('&lt;&gt;', 'g'), "");
+
+			if (tinyMCE.settings['cleanup_on_startup'])
+				tinyMCE.setInnerHTML(inst.getBody(), tinyMCE._cleanupHTML(inst, doc, this.settings, contentElement));
+			else {
+				// Convert all strong/em to b/i
+				content = tinyMCE.regexpReplace(content, "<strong", "<b", "gi");
+				content = tinyMCE.regexpReplace(content, "<em(/?)>", "<i$1>", "gi");
+				content = tinyMCE.regexpReplace(content, "<em ", "<i ", "gi");
+				content = tinyMCE.regexpReplace(content, "</strong>", "</b>", "gi");
+				content = tinyMCE.regexpReplace(content, "</em>", "</i>", "gi");
+				tinyMCE.setInnerHTML(inst.getBody(), content);
+			}
+
+			tinyMCE.convertAllRelativeURLs(inst.getBody());
+		} else {
+			if (tinyMCE.settings['cleanup_on_startup']) {
+				tinyMCE._setHTML(inst.getDoc(), content);
+
+				// Produces permission denied error in MSIE 5.5
+				eval('try {tinyMCE.setInnerHTML(inst.getBody(), tinyMCE._cleanupHTML(inst, inst.contentDocument, this.settings, inst.getBody()));} catch(e) {}');
+			} else
+				tinyMCE._setHTML(inst.getDoc(), content);
+		}
+
+		// Fix for bug #957681
+		//inst.getDoc().designMode = inst.getDoc().designMode;
+
+		// Setup element references
+		var parentElm = inst.targetDoc.getElementById(inst.editorId + '_parent');
+		inst.formElement = tinyMCE.isGecko ? parentElm.previousSibling : parentElm.nextSibling;
+
+		tinyMCE.handleVisualAid(inst.getBody(), true, tinyMCE.settings['visual'], inst);
+		tinyMCE.dispatchCallback(inst, 'setupcontent_callback', 'setupContent', editor_id, inst.getBody(), inst.getDoc());
+
+		// Re-add design mode on mozilla
+		if (!tinyMCE.isMSIE)
+			tinyMCE.addEventHandlers(inst);
+
+		// Add blur handler
+		if (tinyMCE.isMSIE) {
+			tinyMCE.addEvent(inst.getBody(), "blur", TinyMCE_Engine.prototype._eventPatch);
+			tinyMCE.addEvent(inst.getBody(), "beforedeactivate", TinyMCE_Engine.prototype._eventPatch); // Bug #1439953
+
+			// Workaround for drag drop/copy paste base href bug
+			if (!tinyMCE.isOpera) {
+				tinyMCE.addEvent(doc.body, "mousemove", TinyMCE_Engine.prototype.onMouseMove);
+				tinyMCE.addEvent(doc.body, "beforepaste", TinyMCE_Engine.prototype._eventPatch);
+				tinyMCE.addEvent(doc.body, "drop", TinyMCE_Engine.prototype._eventPatch);
+			}
+		}
+
+		// Trigger node change, this call locks buttons for tables and so forth
+		tinyMCE.selectedInstance = inst;
+		tinyMCE.selectedElement = inst.contentWindow.document.body;
+
+		// Call custom DOM cleanup
+		tinyMCE._customCleanup(inst, "insert_to_editor_dom", inst.getBody());
+		tinyMCE._customCleanup(inst, "setup_content_dom", inst.getBody());
+		tinyMCE._setEventsEnabled(inst.getBody(), false);
+		tinyMCE.cleanupAnchors(inst.getDoc());
+
+		if (tinyMCE.getParam("convert_fonts_to_spans"))
+			tinyMCE.convertSpansToFonts(inst.getDoc());
+
+		inst.startContent = tinyMCE.trim(inst.getBody().innerHTML);
+		inst.undoRedo.add({ content : inst.startContent });
+
+		// Cleanup any mess left from storyAwayURLs
+		if (tinyMCE.isGecko) {
+			// Remove mce_src from textnodes and comments
+			tinyMCE.selectNodes(inst.getBody(), function(n) {
+				if (n.nodeType == 3 || n.nodeType == 8) {
+					n.nodeValue = n.nodeValue.replace(new RegExp('\\smce_src=\"[^\"]*\"', 'gi'), "");
+					n.nodeValue = n.nodeValue.replace(new RegExp('\\smce_href=\"[^\"]*\"', 'gi'), "");
+				}
+
+				return false;
+			});
+		}
+
+		// Cleanup any mess left from storyAwayURLs
+		tinyMCE._removeInternal(inst.getBody());
+
+		tinyMCE.selectedInstance = inst;
+		tinyMCE.triggerNodeChange(false, true);
+	},
+
+	storeAwayURLs : function(s) {
+		// Remove all mce_src, mce_href and replace them with new ones
+	//	s = s.replace(new RegExp('mce_src\\s*=\\s*\"[^ >\"]*\"', 'gi'), '');
+	//	s = s.replace(new RegExp('mce_href\\s*=\\s*\"[^ >\"]*\"', 'gi'), '');
+
+		if (!s.match(/(mce_src|mce_href)/gi, s)) {
+			s = s.replace(new RegExp('src\\s*=\\s*\"([^ >\"]*)\"', 'gi'), 'src="$1" mce_src="$1"');
+			s = s.replace(new RegExp('href\\s*=\\s*\"([^ >\"]*)\"', 'gi'), 'href="$1" mce_href="$1"');
+		}
+
+		return s;
+	},
+
+	_removeInternal : function(n) {
+		if (tinyMCE.isGecko) {
+			// Remove mce_src from textnodes and comments
+			tinyMCE.selectNodes(n, function(n) {
+				if (n.nodeType == 3 || n.nodeType == 8) {
+					n.nodeValue = n.nodeValue.replace(new RegExp('\\smce_src=\"[^\"]*\"', 'gi'), "");
+					n.nodeValue = n.nodeValue.replace(new RegExp('\\smce_href=\"[^\"]*\"', 'gi'), "");
+				}
+
+				return false;
+			});
+		}
+	},
+
+	removeTinyMCEFormElements : function(form_obj) {
+		// Check if form is valid
+		if (typeof(form_obj) == "undefined" || form_obj == null)
+			return;
+
+		// If not a form, find the form
+		if (form_obj.nodeName != "FORM") {
+			if (form_obj.form)
+				form_obj = form_obj.form;
+			else
+				form_obj = tinyMCE.getParentElement(form_obj, "form");
+		}
+
+		// Still nothing
+		if (form_obj == null)
+			return;
+
+		// Disable all UI form elements that TinyMCE created
+		for (var i=0; i<form_obj.elements.length; i++) {
+			var elementId = form_obj.elements[i].name ? form_obj.elements[i].name : form_obj.elements[i].id;
+
+			if (elementId.indexOf('mce_editor_') == 0)
+				form_obj.elements[i].disabled = true;
+		}
+	},
+
+	handleEvent : function(e) {
+		var inst = tinyMCE.selectedInstance;
+
+		// Remove odd, error
+		if (typeof(tinyMCE) == "undefined")
+			return true;
+
+		//tinyMCE.debug(e.type + " " + e.target.nodeName + " " + (e.relatedTarget ? e.relatedTarget.nodeName : ""));
+
+		if (tinyMCE.executeCallback(tinyMCE.selectedInstance, 'handle_event_callback', 'handleEvent', e))
+			return false;
+
+		switch (e.type) {
+			case "beforedeactivate": // Was added due to bug #1439953
+			case "blur":
+				if (tinyMCE.selectedInstance)
+					tinyMCE.selectedInstance.execCommand('mceEndTyping');
+
+				tinyMCE.hideMenus();
+
+				return;
+
+			// Workaround for drag drop/copy paste base href bug
+			case "drop":
+			case "beforepaste":
+				if (tinyMCE.selectedInstance)
+					tinyMCE.selectedInstance.setBaseHREF(null);
+
+				// Fixes odd MSIE bug where drag/droping elements in a iframe with height 100% breaks
+				// This logic forces the width/height to be in pixels while the user is drag/dropping
+				if (tinyMCE.isMSIE && !tinyMCE.isOpera) {
+					var ife = tinyMCE.selectedInstance.iframeElement;
+
+					/*if (ife.style.width.indexOf('%') != -1) {
+						ife._oldWidth = ife.width.height;
+						ife.style.width = ife.clientWidth;
+					}*/
+
+					if (ife.style.height.indexOf('%') != -1) {
+						ife._oldHeight = ife.style.height;
+						ife.style.height = ife.clientHeight;
+					}
+				}
+
+				window.setTimeout("tinyMCE.selectedInstance.setBaseHREF(tinyMCE.settings['base_href']);tinyMCE._resetIframeHeight();", 1);
+				return;
+
+			case "submit":
+				tinyMCE.removeTinyMCEFormElements(tinyMCE.isMSIE ? window.event.srcElement : e.target);
+				tinyMCE.triggerSave();
+				tinyMCE.isNotDirty = true;
+				return;
+
+			case "reset":
+				var formObj = tinyMCE.isMSIE ? window.event.srcElement : e.target;
+
+				for (var i=0; i<document.forms.length; i++) {
+					if (document.forms[i] == formObj)
+						window.setTimeout('tinyMCE.resetForm(' + i + ');', 10);
+				}
+
+				return;
+
+			case "keypress":
+				if (inst && inst.handleShortcut(e))
+					return false;
+
+				if (e.target.editorId) {
+					tinyMCE.selectedInstance = tinyMCE.instances[e.target.editorId];
+				} else {
+					if (e.target.ownerDocument.editorId)
+						tinyMCE.selectedInstance = tinyMCE.instances[e.target.ownerDocument.editorId];
+				}
+
+				if (tinyMCE.selectedInstance)
+					tinyMCE.selectedInstance.switchSettings();
+
+				// Insert P element
+				if (tinyMCE.isGecko && tinyMCE.settings['force_p_newlines'] && e.keyCode == 13 && !e.shiftKey) {
+					// Insert P element instead of BR
+					if (TinyMCE_ForceParagraphs._insertPara(tinyMCE.selectedInstance, e)) {
+						// Cancel event
+						tinyMCE.execCommand("mceAddUndoLevel");
+						tinyMCE.cancelEvent(e);
+						return false;
+					}
+				}
+
+				// Handle backspace
+				if (tinyMCE.isGecko && tinyMCE.settings['force_p_newlines'] && (e.keyCode == 8 || e.keyCode == 46) && !e.shiftKey) {
+					// Insert P element instead of BR
+					if (TinyMCE_ForceParagraphs._handleBackSpace(tinyMCE.selectedInstance, e.type)) {
+						// Cancel event
+						tinyMCE.execCommand("mceAddUndoLevel");
+						tinyMCE.cancelEvent(e);
+						return false;
+					}
+				}
+
+				// Return key pressed
+				if (tinyMCE.isMSIE && tinyMCE.settings['force_br_newlines'] && e.keyCode == 13) {
+					if (e.target.editorId)
+						tinyMCE.selectedInstance = tinyMCE.instances[e.target.editorId];
+
+					if (tinyMCE.selectedInstance) {
+						var sel = tinyMCE.selectedInstance.getDoc().selection;
+						var rng = sel.createRange();
+
+						if (tinyMCE.getParentElement(rng.parentElement(), "li") != null)
+							return false;
+
+						// Cancel event
+						e.returnValue = false;
+						e.cancelBubble = true;
+
+						// Insert BR element
+						rng.pasteHTML("<br />");
+						rng.collapse(false);
+						rng.select();
+
+						tinyMCE.execCommand("mceAddUndoLevel");
+						tinyMCE.triggerNodeChange(false);
+						return false;
+					}
+				}
+
+				// Backspace or delete
+				if (e.keyCode == 8 || e.keyCode == 46) {
+					tinyMCE.selectedElement = e.target;
+					tinyMCE.linkElement = tinyMCE.getParentElement(e.target, "a");
+					tinyMCE.imgElement = tinyMCE.getParentElement(e.target, "img");
+					tinyMCE.triggerNodeChange(false);
+				}
+
+				return false;
+			break;
+
+			case "keyup":
+			case "keydown":
+				tinyMCE.hideMenus();
+				tinyMCE.hasMouseMoved = false;
+
+				if (inst && inst.handleShortcut(e))
+					return false;
+
+				if (e.target.editorId)
+					tinyMCE.selectedInstance = tinyMCE.instances[e.target.editorId];
+				else
+					return;
+
+				if (tinyMCE.selectedInstance)
+					tinyMCE.selectedInstance.switchSettings();
+
+				var inst = tinyMCE.selectedInstance;
+
+				// Handle backspace
+				if (tinyMCE.isGecko && tinyMCE.settings['force_p_newlines'] && (e.keyCode == 8 || e.keyCode == 46) && !e.shiftKey) {
+					// Insert P element instead of BR
+					if (TinyMCE_ForceParagraphs._handleBackSpace(tinyMCE.selectedInstance, e.type)) {
+						// Cancel event
+						tinyMCE.execCommand("mceAddUndoLevel");
+						e.preventDefault();
+						return false;
+					}
+				}
+
+				tinyMCE.selectedElement = null;
+				tinyMCE.selectedNode = null;
+				var elm = tinyMCE.selectedInstance.getFocusElement();
+				tinyMCE.linkElement = tinyMCE.getParentElement(elm, "a");
+				tinyMCE.imgElement = tinyMCE.getParentElement(elm, "img");
+				tinyMCE.selectedElement = elm;
+
+				// Update visualaids on tabs
+				if (tinyMCE.isGecko && e.type == "keyup" && e.keyCode == 9)
+					tinyMCE.handleVisualAid(tinyMCE.selectedInstance.getBody(), true, tinyMCE.settings['visual'], tinyMCE.selectedInstance);
+
+				// Fix empty elements on return/enter, check where enter occured
+				if (tinyMCE.isMSIE && e.type == "keydown" && e.keyCode == 13)
+					tinyMCE.enterKeyElement = tinyMCE.selectedInstance.getFocusElement();
+
+				// Fix empty elements on return/enter
+				if (tinyMCE.isMSIE && e.type == "keyup" && e.keyCode == 13) {
+					var elm = tinyMCE.enterKeyElement;
+					if (elm) {
+						var re = new RegExp('^HR|IMG|BR$','g'); // Skip these
+						var dre = new RegExp('^H[1-6]$','g'); // Add double on these
+
+						if (!elm.hasChildNodes() && !re.test(elm.nodeName)) {
+							if (dre.test(elm.nodeName))
+								elm.innerHTML = "&nbsp;&nbsp;";
+							else
+								elm.innerHTML = "&nbsp;";
+						}
+					}
+				}
+
+				// Check if it's a position key
+				var keys = tinyMCE.posKeyCodes;
+				var posKey = false;
+				for (var i=0; i<keys.length; i++) {
+					if (keys[i] == e.keyCode) {
+						posKey = true;
+						break;
+					}
+				}
+
+				// MSIE custom key handling
+				if (tinyMCE.isMSIE && tinyMCE.settings['custom_undo_redo']) {
+					var keys = new Array(8,46); // Backspace,Delete
+					for (var i=0; i<keys.length; i++) {
+						if (keys[i] == e.keyCode) {
+							if (e.type == "keyup")
+								tinyMCE.triggerNodeChange(false);
+						}
+					}
+				}
+
+				// If Ctrl key
+				if (e.keyCode == 17)
+					return true;
+
+				// Handle Undo/Redo when typing content
+
+				// Start typing (non position key)
+				if (!posKey && e.type == "keyup")
+					tinyMCE.execCommand("mceStartTyping");
+
+				// Store undo bookmark
+				if (e.type == "keydown" && (posKey || e.ctrlKey) && inst)
+					inst.undoBookmark = inst.selection.getBookmark();
+
+				// End typing (position key) or some Ctrl event
+				if (e.type == "keyup" && (posKey || e.ctrlKey))
+					tinyMCE.execCommand("mceEndTyping");
+
+				if (posKey && e.type == "keyup")
+					tinyMCE.triggerNodeChange(false);
+
+				if (tinyMCE.isMSIE && e.ctrlKey)
+					window.setTimeout('tinyMCE.triggerNodeChange(false);', 1);
+			break;
+
+			case "mousedown":
+			case "mouseup":
+			case "click":
+			case "focus":
+				tinyMCE.hideMenus();
+
+				if (tinyMCE.selectedInstance) {
+					tinyMCE.selectedInstance.switchSettings();
+					tinyMCE.selectedInstance.isFocused = true;
+				}
+
+				// Check instance event trigged on
+				var targetBody = tinyMCE.getParentElement(e.target, "body");
+				for (var instanceName in tinyMCE.instances) {
+					if (!tinyMCE.isInstance(tinyMCE.instances[instanceName]))
+						continue;
+
+					var inst = tinyMCE.instances[instanceName];
+
+					// Reset design mode if lost (on everything just in case)
+					inst.autoResetDesignMode();
+
+					if (inst.getBody() == targetBody) {
+						tinyMCE.selectedInstance = inst;
+						tinyMCE.selectedElement = e.target;
+						tinyMCE.linkElement = tinyMCE.getParentElement(tinyMCE.selectedElement, "a");
+						tinyMCE.imgElement = tinyMCE.getParentElement(tinyMCE.selectedElement, "img");
+						break;
+					}
+				}
+
+				// Add first bookmark location
+				if (!tinyMCE.selectedInstance.undoRedo.undoLevels[0].bookmark)
+					tinyMCE.selectedInstance.undoRedo.undoLevels[0].bookmark = tinyMCE.selectedInstance.selection.getBookmark();
+
+				if (tinyMCE.isSafari) {
+					tinyMCE.selectedInstance.lastSafariSelection = tinyMCE.selectedInstance.selection.getBookmark();
+					tinyMCE.selectedInstance.lastSafariSelectedElement = tinyMCE.selectedElement;
+
+					var lnk = tinyMCE.getParentElement(tinyMCE.selectedElement, "a");
+
+					// Patch the darned link
+					if (lnk && e.type == "mousedown") {
+						lnk.setAttribute("mce_real_href", lnk.getAttribute("href"));
+						lnk.setAttribute("href", "javascript:void(0);");
+					}
+
+					// Patch back
+					if (lnk && e.type == "click") {
+						window.setTimeout(function() {
+							lnk.setAttribute("href", lnk.getAttribute("mce_real_href"));
+							lnk.removeAttribute("mce_real_href");
+						}, 10);
+					}
+				}
+
+				// Reset selected node
+				if (e.type != "focus")
+					tinyMCE.selectedNode = null;
+
+				tinyMCE.triggerNodeChange(false);
+				tinyMCE.execCommand("mceEndTyping");
+
+				if (e.type == "mouseup")
+					tinyMCE.execCommand("mceAddUndoLevel");
+
+				// Just in case
+				if (!tinyMCE.selectedInstance && e.target.editorId)
+					tinyMCE.selectedInstance = tinyMCE.instances[e.target.editorId];
+
+				return false;
+			break;
+		}
+	},
+
+	getButtonHTML : function(id, lang, img, cmd, ui, val) {
+		var h = '', m, x;
+
+		cmd = 'tinyMCE.execInstanceCommand(\'{$editor_id}\',\'' + cmd + '\'';
+
+		if (typeof(ui) != "undefined" && ui != null)
+			cmd += ',' + ui;
+
+		if (typeof(val) != "undefined" && val != null)
+			cmd += ",'" + val + "'";
+
+		cmd += ');';
+
+		// Use tilemaps when enabled and found and never in MSIE since it loads the tile each time from cache if cahce is disabled
+		if (tinyMCE.getParam('button_tile_map') && (!tinyMCE.isMSIE || tinyMCE.isOpera) && (m = this.buttonMap[id]) != null && (tinyMCE.getParam("language") == "en" || img.indexOf('$lang') == -1)) {
+			// Tiled button
+			x = 0 - (m * 20) == 0 ? '0' : 0 - (m * 20);
+			h += '<a id="{$editor_id}_' + id + '" href="javascript:' + cmd + '" onclick="' + cmd + 'return false;" onmousedown="return false;" class="mceTiledButton mceButtonNormal" target="_self">';
+			h += '<img src="{$themeurl}/images/spacer.gif" style="background-position: ' + x + 'px 0" title="{$' + lang + '}" />';
+			h += '</a>';
+		} else {
+			// Normal button
+			h += '<a id="{$editor_id}_' + id + '" href="javascript:' + cmd + '" onclick="' + cmd + 'return false;" onmousedown="return false;" class="mceButtonNormal" target="_self">';
+			h += '<img src="' + img + '" title="{$' + lang + '}" />';
+			h += '</a>';
+		}
+
+		return h;
+	},
+
+	addButtonMap : function(m) {
+		var i, a = m.replace(/\s+/, '').split(',');
+
+		for (i=0; i<a.length; i++)
+			this.buttonMap[a[i]] = i;
+	},
+
+	submitPatch : function() {
+		tinyMCE.removeTinyMCEFormElements(this);
+		tinyMCE.triggerSave();
+		this.mceOldSubmit();
+		tinyMCE.isNotDirty = true;
+	},
+
+	onLoad : function() {
+		// Wait for everything to be loaded first
+		if (tinyMCE.settings.strict_loading_mode && this.loadingIndex != -1) {
+			window.setTimeout('tinyMCE.onLoad();', 1);
+			return;
+		}
+
+		if (tinyMCE.isMSIE && !tinyMCE.isOpera && window.event.type == "readystatechange" && document.readyState != "complete")
+			return true;
+
+		if (tinyMCE.isLoaded)
+			return true;
+
+		tinyMCE.isLoaded = true;
+
+		tinyMCE.dispatchCallback(null, 'onpageload', 'onPageLoad');
+
+		for (var c=0; c<tinyMCE.configs.length; c++) {
+			tinyMCE.settings = tinyMCE.configs[c];
+
+			var selector = tinyMCE.getParam("editor_selector");
+			var deselector = tinyMCE.getParam("editor_deselector");
+			var elementRefAr = new Array();
+
+			// Add submit triggers
+			if (document.forms && tinyMCE.settings['add_form_submit_trigger'] && !tinyMCE.submitTriggers) {
+				for (var i=0; i<document.forms.length; i++) {
+					var form = document.forms[i];
+
+					tinyMCE.addEvent(form, "submit", TinyMCE_Engine.prototype.handleEvent);
+					tinyMCE.addEvent(form, "reset", TinyMCE_Engine.prototype.handleEvent);
+					tinyMCE.submitTriggers = true; // Do it only once
+
+					// Patch the form.submit function
+					if (tinyMCE.settings['submit_patch']) {
+						try {
+							form.mceOldSubmit = form.submit;
+							form.submit = TinyMCE_Engine.prototype.submitPatch;
+						} catch (e) {
+							// Do nothing
+						}
+					}
+				}
+			}
+
+			// Add editor instances based on mode
+			var mode = tinyMCE.settings['mode'];
+			switch (mode) {
+				case "exact":
+					var elements = tinyMCE.getParam('elements', '', true, ',');
+
+					for (var i=0; i<elements.length; i++) {
+						var element = tinyMCE._getElementById(elements[i]);
+						var trigger = element ? element.getAttribute(tinyMCE.settings['textarea_trigger']) : "";
+
+						if (tinyMCE.getAttrib(element, "class").indexOf(deselector) != -1)
+							continue;
+
+						if (trigger == "false")
+							continue;
+
+						if ((tinyMCE.settings['ask'] || tinyMCE.settings['convert_on_click']) && element) {
+							elementRefAr[elementRefAr.length] = element;
+							continue;
+						}
+
+						if (element)
+							tinyMCE.addMCEControl(element, elements[i]);
+						else if (tinyMCE.settings['debug'])
+							alert("Error: Could not find element by id or name: " + elements[i]);
+					}
+				break;
+
+				case "specific_textareas":
+				case "textareas":
+					var nodeList = document.getElementsByTagName("textarea");
+
+					for (var i=0; i<nodeList.length; i++) {
+						var elm = nodeList.item(i);
+						var trigger = elm.getAttribute(tinyMCE.settings['textarea_trigger']);
+
+						if (selector != '' && tinyMCE.getAttrib(elm, "class").indexOf(selector) == -1)
+							continue;
+
+						if (selector != '')
+							trigger = selector != "" ? "true" : "";
+
+						if (tinyMCE.getAttrib(elm, "class").indexOf(deselector) != -1)
+							continue;
+
+						if ((mode == "specific_textareas" && trigger == "true") || (mode == "textareas" && trigger != "false"))
+							elementRefAr[elementRefAr.length] = elm;
+					}
+				break;
+			}
+
+			for (var i=0; i<elementRefAr.length; i++) {
+				var element = elementRefAr[i];
+				var elementId = element.name ? element.name : element.id;
+
+				if (tinyMCE.settings['ask'] || tinyMCE.settings['convert_on_click']) {
+					// Focus breaks in Mozilla
+					if (tinyMCE.isGecko) {
+						var settings = tinyMCE.settings;
+
+						tinyMCE.addEvent(element, "focus", function (e) {window.setTimeout(function() {TinyMCE_Engine.prototype.confirmAdd(e, settings);}, 10);});
+
+						if (element.nodeName != "TEXTAREA" && element.nodeName != "INPUT")
+							tinyMCE.addEvent(element, "click", function (e) {window.setTimeout(function() {TinyMCE_Engine.prototype.confirmAdd(e, settings);}, 10);});
+						// tinyMCE.addEvent(element, "mouseover", function (e) {window.setTimeout(function() {TinyMCE_Engine.prototype.confirmAdd(e, settings);}, 10);});
+					} else {
+						var settings = tinyMCE.settings;
+
+						tinyMCE.addEvent(element, "focus", function () { TinyMCE_Engine.prototype.confirmAdd(null, settings); });
+						tinyMCE.addEvent(element, "click", function () { TinyMCE_Engine.prototype.confirmAdd(null, settings); });
+						// tinyMCE.addEvent(element, "mouseenter", function () { TinyMCE_Engine.prototype.confirmAdd(null, settings); });
+					}
+				} else
+					tinyMCE.addMCEControl(element, elementId);
+			}
+
+			// Handle auto focus
+			if (tinyMCE.settings['auto_focus']) {
+				window.setTimeout(function () {
+					var inst = tinyMCE.getInstanceById(tinyMCE.settings['auto_focus']);
+					inst.selection.selectNode(inst.getBody(), true, true);
+					inst.contentWindow.focus();
+				}, 10);
+			}
+
+			tinyMCE.dispatchCallback(null, 'oninit', 'onInit');
+		}
+	},
+
+	isInstance : function(o) {
+		return o != null && typeof(o) == "object" && o.isTinyMCE_Control;
+	},
+
+	getParam : function(name, default_value, strip_whitespace, split_chr) {
+		var value = (typeof(this.settings[name]) == "undefined") ? default_value : this.settings[name];
+
+		// Fix bool values
+		if (value == "true" || value == "false")
+			return (value == "true");
+
+		if (strip_whitespace)
+			value = tinyMCE.regexpReplace(value, "[ \t\r\n]", "");
+
+		if (typeof(split_chr) != "undefined" && split_chr != null) {
+			value = value.split(split_chr);
+			var outArray = new Array();
+
+			for (var i=0; i<value.length; i++) {
+				if (value[i] && value[i] != "")
+					outArray[outArray.length] = value[i];
+			}
+
+			value = outArray;
+		}
+
+		return value;
+	},
+
+	getLang : function(name, default_value, parse_entities, va) {
+		var v = (typeof(tinyMCELang[name]) == "undefined") ? default_value : tinyMCELang[name], n;
+
+		if (parse_entities)
+			v = tinyMCE.entityDecode(v);
+
+		if (va) {
+			for (n in va)
+				v = this.replaceVar(v, n, va[n]);
+		}
+
+		return v;
+	},
+
+	entityDecode : function(s) {
+		var e = document.createElement("div");
+		e.innerHTML = s;
+		return e.innerHTML;
+	},
+
+	addToLang : function(prefix, ar) {
+		for (var key in ar) {
+			if (typeof(ar[key]) == 'function')
+				continue;
+
+			tinyMCELang[(key.indexOf('lang_') == -1 ? 'lang_' : '') + (prefix != '' ? (prefix + "_") : '') + key] = ar[key];
+		}
+
+		this.loadNextScript();
+
+	//	for (var key in ar)
+	//		tinyMCELang[(key.indexOf('lang_') == -1 ? 'lang_' : '') + (prefix != '' ? (prefix + "_") : '') + key] = "|" + ar[key] + "|";
+	},
+
+	triggerNodeChange : function(focus, setup_content) {
+		if (tinyMCE.selectedInstance) {
+			var inst = tinyMCE.selectedInstance;
+			var editorId = inst.editorId;
+			var elm = (typeof(setup_content) != "undefined" && setup_content) ? tinyMCE.selectedElement : inst.getFocusElement();
+			var undoIndex = -1;
+			var undoLevels = -1;
+			var anySelection = false;
+			var selectedText = inst.selection.getSelectedText();
+
+			if (setup_content && tinyMCE.isGecko && inst.isHidden())
+				elm = inst.getBody();
+
+			inst.switchSettings();
+
+			if (tinyMCE.settings["auto_resize"]) {
+				var doc = inst.getDoc();
+
+				inst.iframeElement.style.width = doc.body.offsetWidth + "px";
+				inst.iframeElement.style.height = doc.body.offsetHeight + "px";
+			}
+
+			if (tinyMCE.selectedElement)
+				anySelection = (tinyMCE.selectedElement.nodeName.toLowerCase() == "img") || (selectedText && selectedText.length > 0);
+
+			if (tinyMCE.settings['custom_undo_redo']) {
+				undoIndex = inst.undoRedo.undoIndex;
+				undoLevels = inst.undoRedo.undoLevels.length;
+			}
+
+			tinyMCE.dispatchCallback(inst, 'handle_node_change_callback', 'handleNodeChange', editorId, elm, undoIndex, undoLevels, inst.visualAid, anySelection, setup_content);
+		}
+
+		if (this.selectedInstance && (typeof(focus) == "undefined" || focus))
+			this.selectedInstance.contentWindow.focus();
+	},
+
+	_customCleanup : function(inst, type, content) {
+		var pl, po, i;
+
+		// Call custom cleanup
+		var customCleanup = tinyMCE.settings['cleanup_callback'];
+		if (customCleanup != "" && eval("typeof(" + customCleanup + ")") != "undefined")
+			content = eval(customCleanup + "(type, content, inst);");
+
+		// Trigger plugin cleanups
+		pl = inst.plugins;
+		for (i=0; i<pl.length; i++) {
+			po = tinyMCE.plugins[pl[i]];
+
+			if (po && po.cleanup)
+				content = po.cleanup(type, content, inst);
+		}
+
+		return content;
+	},
+
+	setContent : function(h) {
+		if (tinyMCE.selectedInstance) {
+			tinyMCE.selectedInstance.execCommand('mceSetContent', false, h);
+			tinyMCE.selectedInstance.repaint();
+		}
+	},
+
+	importThemeLanguagePack : function(name) {
+		if (typeof(name) == "undefined")
+			name = tinyMCE.settings['theme'];
+
+		tinyMCE.loadScript(tinyMCE.baseURL + '/themes/' + name + '/langs/' + tinyMCE.settings['language'] + '.js');
+	},
+
+	importPluginLanguagePack : function(name, valid_languages) {
+		var lang = "en", b = tinyMCE.baseURL + '/plugins/' + name;
+
+		valid_languages = valid_languages.split(',');
+		for (var i=0; i<valid_languages.length; i++) {
+			if (tinyMCE.settings['language'] == valid_languages[i])
+				lang = tinyMCE.settings['language'];
+		}
+
+		if (this.plugins[name])
+			b = this.plugins[name].baseURL;
+
+		tinyMCE.loadScript(b + '/langs/' + lang +  '.js');
+	},
+
+	applyTemplate : function(h, as) {
+		var i, s, ar = h.match(new RegExp('\\{\\$[a-z0-9_]+\\}', 'gi'));
+
+		if (ar && ar.length > 0) {
+			for (i=ar.length-1; i>=0; i--) {
+				s = ar[i].substring(2, ar[i].length-1);
+
+				if (s.indexOf('lang_') == 0 && tinyMCELang[s])
+					h = tinyMCE.replaceVar(h, s, tinyMCELang[s]);
+				else if (as && as[s])
+					h = tinyMCE.replaceVar(h, s, as[s]);
+				else if (tinyMCE.settings[s])
+					h = tinyMCE.replaceVar(h, s, tinyMCE.settings[s]);
+			}
+		}
+
+		h = tinyMCE.replaceVar(h, "themeurl", tinyMCE.themeURL);
+
+		return h;
+	},
+
+	replaceVar : function(h, r, v) {
+		return h.replace(new RegExp('{\\\$' + r + '}', 'g'), v);
+	},
+
+	openWindow : function(template, args) {
+		var html, width, height, x, y, resizable, scrollbars, url;
+
+		args['mce_template_file'] = template['file'];
+		args['mce_width'] = template['width'];
+		args['mce_height'] = template['height'];
+		tinyMCE.windowArgs = args;
+
+		html = template['html'];
+		if (!(width = parseInt(template['width'])))
+			width = 320;
+
+		if (!(height = parseInt(template['height'])))
+			height = 200;
+
+		// Add to height in M$ due to SP2 WHY DON'T YOU GUYS IMPLEMENT innerWidth of windows!!
+		if (tinyMCE.isMSIE)
+			height += 40;
+		else
+			height += 20;
+
+		x = parseInt(screen.width / 2.0) - (width / 2.0);
+		y = parseInt(screen.height / 2.0) - (height / 2.0);
+
+		resizable = (args && args['resizable']) ? args['resizable'] : "no";
+		scrollbars = (args && args['scrollbars']) ? args['scrollbars'] : "no";
+
+		if (template['file'].charAt(0) != '/' && template['file'].indexOf('://') == -1)
+			url = tinyMCE.baseURL + "/themes/" + tinyMCE.getParam("theme") + "/" + template['file'];
+		else
+			url = template['file'];
+
+		// Replace all args as variables in URL
+		for (var name in args) {
+			if (typeof(args[name]) == 'function')
+				continue;
+
+			url = tinyMCE.replaceVar(url, name, escape(args[name]));
+		}
+
+		if (html) {
+			html = tinyMCE.replaceVar(html, "css", this.settings['popups_css']);
+			html = tinyMCE.applyTemplate(html, args);
+
+			var win = window.open("", "mcePopup" + new Date().getTime(), "top=" + y + ",left=" + x + ",scrollbars=" + scrollbars + ",dialog=yes,minimizable=" + resizable + ",modal=yes,width=" + width + ",height=" + height + ",resizable=" + resizable);
+			if (win == null) {
+				alert(tinyMCELang['lang_popup_blocked']);
+				return;
+			}
+
+			win.document.write(html);
+			win.document.close();
+			win.resizeTo(width, height);
+			win.focus();
+		} else {
+			if ((tinyMCE.isMSIE && !tinyMCE.isOpera) && resizable != 'yes' && tinyMCE.settings["dialog_type"] == "modal") {
+				height += 10;
+
+				var features = "resizable:" + resizable 
+					+ ";scroll:"
+					+ scrollbars + ";status:yes;center:yes;help:no;dialogWidth:"
+					+ width + "px;dialogHeight:" + height + "px;";
+
+				window.showModalDialog(url, window, features);
+			} else {
+				var modal = (resizable == "yes") ? "no" : "yes";
+
+				if (tinyMCE.isGecko && tinyMCE.isMac)
+					modal = "no";
+
+				if (template['close_previous'] != "no")
+					try {tinyMCE.lastWindow.close();} catch (ex) {}
+
+				var win = window.open(url, "mcePopup" + new Date().getTime(), "top=" + y + ",left=" + x + ",scrollbars=" + scrollbars + ",dialog=" + modal + ",minimizable=" + resizable + ",modal=" + modal + ",width=" + width + ",height=" + height + ",resizable=" + resizable);
+				if (win == null) {
+					alert(tinyMCELang['lang_popup_blocked']);
+					return;
+				}
+
+				if (template['close_previous'] != "no")
+					tinyMCE.lastWindow = win;
+
+				eval('try { win.resizeTo(width, height); } catch(e) { }');
+
+				// Make it bigger if statusbar is forced
+				if (tinyMCE.isGecko) {
+					if (win.document.defaultView.statusbar.visible)
+						win.resizeBy(0, tinyMCE.isMac ? 10 : 24);
+				}
+
+				win.focus();
+			}
+		}
+	},
+
+	closeWindow : function(win) {
+		win.close();
+	},
+
+	getVisualAidClass : function(class_name, state) {
+		var aidClass = tinyMCE.settings['visual_table_class'];
+
+		if (typeof(state) == "undefined")
+			state = tinyMCE.settings['visual'];
+
+		// Split
+		var classNames = new Array();
+		var ar = class_name.split(' ');
+		for (var i=0; i<ar.length; i++) {
+			if (ar[i] == aidClass)
+				ar[i] = "";
+
+			if (ar[i] != "")
+				classNames[classNames.length] = ar[i];
+		}
+
+		if (state)
+			classNames[classNames.length] = aidClass;
+
+		// Glue
+		var className = "";
+		for (var i=0; i<classNames.length; i++) {
+			if (i > 0)
+				className += " ";
+
+			className += classNames[i];
+		}
+
+		return className;
+	},
+
+	handleVisualAid : function(el, deep, state, inst, skip_dispatch) {
+		if (!el)
+			return;
+
+		if (!skip_dispatch)
+			tinyMCE.dispatchCallback(inst, 'handle_visual_aid_callback', 'handleVisualAid', el, deep, state, inst);
+
+		var tableElement = null;
+
+		switch (el.nodeName) {
+			case "TABLE":
+				var oldW = el.style.width;
+				var oldH = el.style.height;
+				var bo = tinyMCE.getAttrib(el, "border");
+
+				bo = bo == "" || bo == "0" ? true : false;
+
+				tinyMCE.setAttrib(el, "class", tinyMCE.getVisualAidClass(tinyMCE.getAttrib(el, "class"), state && bo));
+
+				el.style.width = oldW;
+				el.style.height = oldH;
+
+				for (var y=0; y<el.rows.length; y++) {
+					for (var x=0; x<el.rows[y].cells.length; x++) {
+						var cn = tinyMCE.getVisualAidClass(tinyMCE.getAttrib(el.rows[y].cells[x], "class"), state && bo);
+						tinyMCE.setAttrib(el.rows[y].cells[x], "class", cn);
+					}
+				}
+
+				break;
+
+			case "A":
+				var anchorName = tinyMCE.getAttrib(el, "name");
+
+				if (anchorName != '' && state) {
+					el.title = anchorName;
+					el.className = 'mceItemAnchor';
+				} else if (anchorName != '' && !state)
+					el.className = '';
+
+				break;
+		}
+
+		if (deep && el.hasChildNodes()) {
+			for (var i=0; i<el.childNodes.length; i++)
+				tinyMCE.handleVisualAid(el.childNodes[i], deep, state, inst, true);
+		}
+	},
+
+	/*
+	applyClassesToFonts : function(doc, size) {
+		var f = doc.getElementsByTagName("font");
+		for (var i=0; i<f.length; i++) {
+			var s = tinyMCE.getAttrib(f[i], "size");
+
+			if (s != "")
+				tinyMCE.setAttrib(f[i], 'class', "mceItemFont" + s);
+		}
+
+		if (typeof(size) != "undefined") {
+			var css = "";
+
+			for (var x=0; x<doc.styleSheets.length; x++) {
+				for (var i=0; i<doc.styleSheets[x].rules.length; i++) {
+					if (doc.styleSheets[x].rules[i].selectorText == '#mceSpanFonts .mceItemFont' + size) {
+						css = doc.styleSheets[x].rules[i].style.cssText;
+						break;
+					}
+				}
+
+				if (css != "")
+					break;
+			}
+
+			if (doc.styleSheets[0].rules[0].selectorText == "FONT")
+				doc.styleSheets[0].removeRule(0);
+
+			doc.styleSheets[0].addRule("FONT", css, 0);
+		}
+	},
+	*/
+
+	fixGeckoBaseHREFBug : function(m, e, h) {
+		var nl, i, a, n, xsrc, xhref, el;
+
+		if (tinyMCE.isGecko) {
+			if (m == 1) {
+				h = h.replace(/\ssrc=/gi, " mce_tsrc=");
+				h = h.replace(/\shref=/gi, " mce_thref=");
+
+				return h;
+			} else {
+				el = new Array('a','img','select','area','iframe','base','input','script','embed','object','link');
+
+				for (a=0; a<el.length; a++) {
+					n = e.getElementsByTagName(el[a]);
+
+					for (i=0; i<n.length; i++) {
+						xsrc = tinyMCE.getAttrib(n[i], "mce_tsrc");
+						xhref = tinyMCE.getAttrib(n[i], "mce_thref");
+
+						if (xsrc != "") {
+							try {
+								n[i].src = tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'], xsrc);
+							} catch (e) {
+								// Ignore, Firefox cast exception if local file wasn't found
+							}
+
+							n[i].removeAttribute("mce_tsrc");
+						}
+
+						if (xhref != "") {
+							try {
+								n[i].href = tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'], xhref);
+							} catch (e) {
+								// Ignore, Firefox cast exception if local file wasn't found
+							}
+
+							n[i].removeAttribute("mce_thref");
+						}
+					}
+				}
+
+				el = tinyMCE.selectNodes(e, function(n) {
+					if (n.nodeType == 3 || n.nodeType == 8) {
+						n.nodeValue = n.nodeValue.replace(/\smce_tsrc=/gi, " src=");
+						n.nodeValue = n.nodeValue.replace(/\smce_thref=/gi, " href=");
+					}
+
+					return false;
+				});
+			}
+		}
+
+		return h;
+	},
+
+	_setHTML : function(doc, html_content) {
+		// Force closed anchors open
+		//html_content = html_content.replace(new RegExp('<a(.*?)/>', 'gi'), '<a$1></a>');
+
+		html_content = tinyMCE.cleanupHTMLCode(html_content);
+
+		// Try innerHTML if it fails use pasteHTML in MSIE
+		try {
+			tinyMCE.setInnerHTML(doc.body, html_content);
+		} catch (e) {
+			if (this.isMSIE)
+				doc.body.createTextRange().pasteHTML(html_content);
+		}
+
+		// Content duplication bug fix
+		if (tinyMCE.isMSIE && tinyMCE.settings['fix_content_duplication']) {
+			// Remove P elements in P elements
+			var paras = doc.getElementsByTagName("P");
+			for (var i=0; i<paras.length; i++) {
+				var node = paras[i];
+				while ((node = node.parentNode) != null) {
+					if (node.nodeName == "P")
+						node.outerHTML = node.innerHTML;
+				}
+			}
+
+			// Content duplication bug fix (Seems to be word crap)
+			var html = doc.body.innerHTML;
+/*
+			if (html.indexOf('="mso') != -1) {
+				for (var i=0; i<doc.body.all.length; i++) {
+					var el = doc.body.all[i];
+					el.removeAttribute("className","",0);
+					el.removeAttribute("style","",0);
+				}
+
+				html = doc.body.innerHTML;
+				html = tinyMCE.regexpReplace(html, "<o:p><\/o:p>", "<br />");
+				html = tinyMCE.regexpReplace(html, "<o:p>&nbsp;<\/o:p>", "");
+				html = tinyMCE.regexpReplace(html, "<st1:.*?>", "");
+				html = tinyMCE.regexpReplace(html, "<p><\/p>", "");
+				html = tinyMCE.regexpReplace(html, "<p><\/p>\r\n<p><\/p>", "");
+				html = tinyMCE.regexpReplace(html, "<p>&nbsp;<\/p>", "<br />");
+				html = tinyMCE.regexpReplace(html, "<p>\s*(<p>\s*)?", "<p>");
+				html = tinyMCE.regexpReplace(html, "<\/p>\s*(<\/p>\s*)?", "</p>");
+			}*/
+
+			// Always set the htmlText output
+			tinyMCE.setInnerHTML(doc.body, html);
+		}
+
+		tinyMCE.cleanupAnchors(doc);
+
+		if (tinyMCE.getParam("convert_fonts_to_spans"))
+			tinyMCE.convertSpansToFonts(doc);
+	},
+
+	getEditorId : function(form_element) {
+		var inst = this.getInstanceById(form_element);
+		if (!inst)
+			return null;
+
+		return inst.editorId;
+	},
+
+	getInstanceById : function(editor_id) {
+		var inst = this.instances[editor_id];
+		if (!inst) {
+			for (var n in tinyMCE.instances) {
+				var instance = tinyMCE.instances[n];
+				if (!tinyMCE.isInstance(instance))
+					continue;
+
+				if (instance.formTargetElementId == editor_id) {
+					inst = instance;
+					break;
+				}
+			}
+		}
+
+		return inst;
+	},
+
+	queryInstanceCommandValue : function(editor_id, command) {
+		var inst = tinyMCE.getInstanceById(editor_id);
+		if (inst)
+			return inst.queryCommandValue(command);
+
+		return false;
+	},
+
+	queryInstanceCommandState : function(editor_id, command) {
+		var inst = tinyMCE.getInstanceById(editor_id);
+		if (inst)
+			return inst.queryCommandState(command);
+
+		return null;
+	},
+
+	setWindowArg : function(n, v) {
+		this.windowArgs[n] = v;
+	},
+
+	getWindowArg : function(n, d) {
+		return (typeof(this.windowArgs[n]) == "undefined") ? d : this.windowArgs[n];
+	},
+
+	getCSSClasses : function(editor_id, doc) {
+		var output = new Array();
+
+		// Is cached, use that
+		if (typeof(tinyMCE.cssClasses) != "undefined")
+			return tinyMCE.cssClasses;
+
+		if (typeof(editor_id) == "undefined" && typeof(doc) == "undefined") {
+			var instance;
+
+			for (var instanceName in tinyMCE.instances) {
+				instance = tinyMCE.instances[instanceName];
+				if (!tinyMCE.isInstance(instance))
+					continue;
+
+				break;
+			}
+
+			doc = instance.getDoc();
+		}
+
+		if (typeof(doc) == "undefined") {
+			var instance = tinyMCE.getInstanceById(editor_id);
+			doc = instance.getDoc();
+		}
+
+		if (doc) {
+			var styles = doc.styleSheets;
+
+			if (styles && styles.length > 0) {
+				for (var x=0; x<styles.length; x++) {
+					var csses = null;
+
+					// Just ignore any errors
+					eval("try {var csses = tinyMCE.isMSIE ? doc.styleSheets(" + x + ").rules : styles[" + x + "].cssRules;} catch(e) {}");
+					if (!csses)
+						return new Array();
+
+					for (var i=0; i<csses.length; i++) {
+						var selectorText = csses[i].selectorText;
+
+						// Can be multiple rules per selector
+						if (selectorText) {
+							var rules = selectorText.split(',');
+							for (var c=0; c<rules.length; c++) {
+								var rule = rules[c];
+
+								// Strip spaces between selectors
+								while (rule.indexOf(' ') == 0)
+									rule = rule.substring(1);
+
+								// Invalid rule
+								if (rule.indexOf(' ') != -1 || rule.indexOf(':') != -1 || rule.indexOf('mceItem') != -1)
+									continue;
+
+								if (rule.indexOf(tinyMCE.settings['visual_table_class']) != -1 || rule.indexOf('mceEditable') != -1 || rule.indexOf('mceNonEditable') != -1)
+									continue;
+
+								// Is class rule
+								if (rule.indexOf('.') != -1) {
+									var cssClass = rule.substring(rule.indexOf('.') + 1);
+									var addClass = true;
+
+									for (var p=0; p<output.length && addClass; p++) {
+										if (output[p] == cssClass)
+											addClass = false;
+									}
+
+									if (addClass)
+										output[output.length] = cssClass;
+								}
+							}
+						}
+					}
+				}
+			}
+		}
+
+		// Cache em
+		if (output.length > 0)
+			tinyMCE.cssClasses = output;
+
+		return output;
+	},
+
+	regexpReplace : function(in_str, reg_exp, replace_str, opts) {
+		if (in_str == null)
+			return in_str;
+
+		if (typeof(opts) == "undefined")
+			opts = 'g';
+
+		var re = new RegExp(reg_exp, opts);
+		return in_str.replace(re, replace_str);
+	},
+
+	trim : function(s) {
+		return s.replace(/^\s*|\s*$/g, "");
+	},
+
+	cleanupEventStr : function(s) {
+		s = "" + s;
+		s = s.replace('function anonymous()\n{\n', '');
+		s = s.replace('\n}', '');
+		s = s.replace(/^return true;/gi, ''); // Remove event blocker
+
+		return s;
+	},
+
+	getControlHTML : function(c) {
+		var i, l, n, o, v;
+
+		l = tinyMCE.plugins;
+		for (n in l) {
+			o = l[n];
+
+			if (o.getControlHTML && (v = o.getControlHTML(c)) != '')
+				return tinyMCE.replaceVar(v, "pluginurl", o.baseURL);
+		}
+
+		o = tinyMCE.themes[tinyMCE.settings['theme']];
+		if (o.getControlHTML && (v = o.getControlHTML(c)) != '')
+			return v;
+
+		return '';
+	},
+
+	evalFunc : function(f, idx, a) {
+		var s = '(', i;
+
+		for (i=idx; i<a.length; i++) {
+			s += 'a[' + i + ']';
+
+			if (i < a.length-1)
+				s += ',';
+		}
+
+		s += ');';
+
+		return eval("f" + s);
+	},
+
+	dispatchCallback : function(i, p, n) {
+		return this.callFunc(i, p, n, 0, this.dispatchCallback.arguments);
+	},
+
+	executeCallback : function(i, p, n) {
+		return this.callFunc(i, p, n, 1, this.executeCallback.arguments);
+	},
+
+	execCommandCallback : function(i, p, n) {
+		return this.callFunc(i, p, n, 2, this.execCommandCallback.arguments);
+	},
+
+	callFunc : function(ins, p, n, m, a) {
+		var l, i, on, o, s, v;
+
+		s = m == 2;
+
+		l = tinyMCE.getParam(p, '');
+
+		if (l != '' && (v = tinyMCE.evalFunc(typeof(l) == "function" ? l : eval(l), 3, a)) == s && m > 0)
+			return true;
+
+		if (ins != null) {
+			for (i=0, l = ins.plugins; i<l.length; i++) {
+				o = tinyMCE.plugins[l[i]];
+
+				if (o[n] && (v = tinyMCE.evalFunc(o[n], 3, a)) == s && m > 0)
+					return true;
+			}
+		}
+
+		l = tinyMCE.themes;
+		for (on in l) {
+			o = l[on];
+
+			if (o[n] && (v = tinyMCE.evalFunc(o[n], 3, a)) == s && m > 0)
+				return true;
+		}
+
+		return false;
+	},
+
+	xmlEncode : function(s) {
+		s = "" + s;
+		s = s.replace(/&/g, '&amp;');
+		s = s.replace(new RegExp('"', 'g'), '&quot;');
+		s = s.replace(/\'/g, '&#39;'); // &apos; is not working in MSIE
+		s = s.replace(/</g, '&lt;');
+		s = s.replace(/>/g, '&gt;');
+
+		return s;
+	},
+
+	extend : function(p, np) {
+		var o = {};
+
+		o.parent = p;
+
+		for (n in p)
+			o[n] = p[n];
+
+		for (n in np)
+			o[n] = np[n];
+
+		return o;
+	},
+
+	hideMenus : function() {
+		var e = tinyMCE.lastSelectedMenuBtn;
+
+		if (tinyMCE.lastMenu) {
+			tinyMCE.lastMenu.hide();
+			tinyMCE.lastMenu = null;
+		}
+
+		if (e) {
+			tinyMCE.switchClass(e, tinyMCE.lastMenuBtnClass);
+			tinyMCE.lastSelectedMenuBtn = null;
+		}
+	},
+
+	explode : function(d, s) {
+		var ar = s.split(d), oar = new Array(), i;
+	
+		for (i = 0; i<ar.length; i++) {
+			if (ar[i] != "")
+				oar[oar.length] = ar[i];
+		}
+	
+		return oar;
+	}
+};
+
+// Global instances
+var TinyMCE = TinyMCE_Engine; // Compatiblity with gzip compressors
+var tinyMCE = new TinyMCE_Engine();
+var tinyMCELang = {};
+
+/* file:jscripts/tiny_mce/classes/TinyMCE_Control.class.js */
+
+function TinyMCE_Control(settings) {
+	var t, i, to, fu, p, x, fn, fu, pn, s = settings;
+
+	this.undoRedoLevel = true;
+	this.isTinyMCE_Control = true;
+
+	// Default settings
+	this.settings = s;
+	this.settings['theme'] = tinyMCE.getParam("theme", "default");
+	this.settings['width'] = tinyMCE.getParam("width", -1);
+	this.settings['height'] = tinyMCE.getParam("height", -1);
+	this.selection = new TinyMCE_Selection(this);
+	this.undoRedo = new TinyMCE_UndoRedo(this);
+	this.cleanup = new TinyMCE_Cleanup();
+	this.shortcuts = new Array();
+	this.hasMouseMoved = false;
+
+	this.cleanup.init({
+		valid_elements : s.valid_elements,
+		extended_valid_elements : s.extended_valid_elements,
+		entities : s.entities,
+		entity_encoding : s.entity_encoding,
+		debug : s.cleanup_debug,
+		url_converter : 'TinyMCE_Cleanup.prototype._urlConverter',
+		indent : s.apply_source_formatting,
+		invalid_elements : s.invalid_elements,
+		verify_html : s.verify_html,
+		fix_content_duplication : s.fix_content_duplication
+	});
+
+	// Wrap old theme
+	t = this.settings['theme'];
+	if (!tinyMCE.hasTheme(t)) {
+		fn = tinyMCE.callbacks;
+		to = {};
+
+		for (i=0; i<fn.length; i++) {
+			if ((fu = window['TinyMCE_' + t + "_" + fn[i]]))
+				to[fn[i]] = fu;
+		}
+
+		tinyMCE.addTheme(t, to);
+	}
+
+	// Wrap old plugins
+	this.plugins = new Array();
+	p = tinyMCE.getParam('plugins', '', true, ',');
+	if (p.length > 0) {
+		for (i=0; i<p.length; i++) {
+			pn = p[i];
+
+			if (pn.charAt(0) == '-')
+				pn = pn.substring(1);
+
+			if (!tinyMCE.hasPlugin(pn)) {
+				fn = tinyMCE.callbacks;
+				to = {};
+
+				for (x=0; x<fn.length; x++) {
+					if ((fu = window['TinyMCE_' + pn + "_" + fn[x]]))
+						to[fn[x]] = fu;
+				}
+
+				tinyMCE.addPlugin(pn, to);
+			}
+
+			this.plugins[this.plugins.length] = pn; 
+		}
+	}
+};
+
+TinyMCE_Control.prototype = {
+	hasPlugin : function(n) {
+		var i;
+
+		for (i=0; i<this.plugins.length; i++) {
+			if (this.plugins[i] == n)
+				return true;
+		}
+
+		return false;
+	},
+
+	addPlugin : function(n, p) {
+		if (!this.hasPlugin(n)) {
+			tinyMCE.addPlugin(n, p);
+			this.plugins[this.plugins.length] = n;
+		}
+	},
+
+	repaint : function() {
+		if (tinyMCE.isMSIE && !tinyMCE.isOpera)
+			return;
+
+		try {
+			var s = this.selection;
+			var b = s.getBookmark(true);
+			this.getBody().style.display = 'none';
+			this.getDoc().execCommand('selectall', false, null);
+			this.getSel().collapseToStart();
+			this.getBody().style.display = 'block';
+			s.moveToBookmark(b);
+		} catch (ex) {
+			// Ignore
+		}
+	},
+
+	switchSettings : function() {
+		if (tinyMCE.configs.length > 1 && tinyMCE.currentConfig != this.settings['index']) {
+			tinyMCE.settings = this.settings;
+			tinyMCE.currentConfig = this.settings['index'];
+		}
+	},
+
+	getBody : function() {
+		return this.getDoc().body;
+	},
+
+	getDoc : function() {
+		return this.contentWindow.document;
+	},
+
+	getWin : function() {
+		return this.contentWindow;
+	},
+
+	addShortcut : function(m, k, d, cmd, ui, va) {
+		var n = typeof(k) == "number", ie = tinyMCE.isMSIE, c, sc, i;
+		var scl = this.shortcuts;
+
+		if (!tinyMCE.getParam('custom_shortcuts'))
+			return false;
+
+		m = m.toLowerCase();
+		k = ie && !n ? k.toUpperCase() : k;
+		c = n ? null : k.charCodeAt(0);
+		d = d && d.indexOf('lang_') == 0 ? tinyMCE.getLang(d) : d;
+
+		sc = {
+			alt : m.indexOf('alt') != -1,
+			ctrl : m.indexOf('ctrl') != -1,
+			shift : m.indexOf('shift') != -1,
+			charCode : c,
+			keyCode : n ? k : (ie ? c : null),
+			desc : d,
+			cmd : cmd,
+			ui : ui,
+			val : va
+		};
+
+		for (i=0; i<scl.length; i++) {
+			if (sc.alt == scl[i].alt && sc.ctrl == scl[i].ctrl && sc.shift == scl[i].shift
+				&& sc.charCode == scl[i].charCode && sc.keyCode == scl[i].keyCode) {
+				return false;
+			}
+		}
+
+		scl[scl.length] = sc;
+
+		return true;
+	},
+
+	handleShortcut : function(e) {
+		var i, s = this.shortcuts, o;
+
+		for (i=0; i<s.length; i++) {
+			o = s[i];
+			if (o.alt == e.altKey && o.ctrl == e.ctrlKey && (o.keyCode == e.keyCode || o.charCode == e.charCode)) {
+				if (o.cmd && (e.type == "keydown" || (e.type == "keypress" && !tinyMCE.isOpera)))
+					tinyMCE.execCommand(o.cmd, o.ui, o.val);
+
+				tinyMCE.cancelEvent(e);
+				return true;
+			}
+		}
+
+		return false;
+	},
+
+	autoResetDesignMode : function() {
+		// Add fix for tab/style.display none/block problems in Gecko
+		if (!tinyMCE.isMSIE && this.isHidden() && tinyMCE.getParam('auto_reset_designmode'))
+			eval('try { this.getDoc().designMode = "On"; } catch(e) {}');
+	},
+
+	isHidden : function() {
+		if (tinyMCE.isMSIE)
+			return false;
+
+		var s = this.getSel();
+
+		// Weird, wheres that cursor selection?
+		return (!s || !s.rangeCount || s.rangeCount == 0);
+	},
+
+	isDirty : function() {
+		// Is content modified and not in a submit procedure
+		return this.startContent != tinyMCE.trim(this.getBody().innerHTML) && !tinyMCE.isNotDirty;
+	},
+
+	_mergeElements : function(scmd, pa, ch, override) {
+		if (scmd == "removeformat") {
+			pa.className = "";
+			pa.style.cssText = "";
+			ch.className = "";
+			ch.style.cssText = "";
+			return;
+		}
+
+		var st = tinyMCE.parseStyle(tinyMCE.getAttrib(pa, "style"));
+		var stc = tinyMCE.parseStyle(tinyMCE.getAttrib(ch, "style"));
+		var className = tinyMCE.getAttrib(pa, "class");
+
+		className += " " + tinyMCE.getAttrib(ch, "class");
+
+		if (override) {
+			for (var n in st) {
+				if (typeof(st[n]) == 'function')
+					continue;
+
+				stc[n] = st[n];
+			}
+		} else {
+			for (var n in stc) {
+				if (typeof(stc[n]) == 'function')
+					continue;
+
+				st[n] = stc[n];
+			}
+		}
+
+		tinyMCE.setAttrib(pa, "style", tinyMCE.serializeStyle(st));
+		tinyMCE.setAttrib(pa, "class", tinyMCE.trim(className));
+		ch.className = "";
+		ch.style.cssText = "";
+		ch.removeAttribute("class");
+		ch.removeAttribute("style");
+	},
+
+	_setUseCSS : function(b) {
+		var d = this.getDoc();
+
+		try {d.execCommand("useCSS", false, !b);} catch (ex) {}
+		try {d.execCommand("styleWithCSS", false, b);} catch (ex) {}
+
+		if (!tinyMCE.getParam("table_inline_editing"))
+			try {d.execCommand('enableInlineTableEditing', false, "false");} catch (ex) {}
+
+		if (!tinyMCE.getParam("object_resizing"))
+			try {d.execCommand('enableObjectResizing', false, "false");} catch (ex) {}
+	},
+
+	execCommand : function(command, user_interface, value) {
+		var doc = this.getDoc();
+		var win = this.getWin();
+		var focusElm = this.getFocusElement();
+
+		// Is non udno specific command
+		if (!new RegExp('mceStartTyping|mceEndTyping|mceBeginUndoLevel|mceEndUndoLevel|mceAddUndoLevel', 'gi').test(command))
+			this.undoBookmark = null;
+
+		if (this.lastSafariSelection && !new RegExp('mceStartTyping|mceEndTyping|mceBeginUndoLevel|mceEndUndoLevel|mceAddUndoLevel', 'gi').test(command)) {
+			this.selection.moveToBookmark(this.lastSafariSelection);
+			tinyMCE.selectedElement = this.lastSafariSelectedElement;
+		}
+
+		// Mozilla issue
+		if (!tinyMCE.isMSIE && !this.useCSS) {
+			this._setUseCSS(false);
+			this.useCSS = true;
+		}
+
+		//debug("command: " + command + ", user_interface: " + user_interface + ", value: " + value);
+		this.contentDocument = doc; // <-- Strange, unless this is applied Mozilla 1.3 breaks
+
+		if (tinyMCE.execCommandCallback(this, 'execcommand_callback', 'execCommand', this.editorId, this.getBody(), command, user_interface, value))
+			return;
+
+		// Fix align on images
+		if (focusElm && focusElm.nodeName == "IMG") {
+			var align = focusElm.getAttribute('align');
+			var img = command == "JustifyCenter" ? focusElm.cloneNode(false) : focusElm;
+
+			switch (command) {
+				case "JustifyLeft":
+					if (align == 'left')
+						img.removeAttribute('align');
+					else
+						img.setAttribute('align', 'left');
+
+					// Remove the div
+					var div = focusElm.parentNode;
+					if (div && div.nodeName == "DIV" && div.childNodes.length == 1 && div.parentNode)
+						div.parentNode.replaceChild(img, div);
+
+					this.selection.selectNode(img);
+					this.repaint();
+					tinyMCE.triggerNodeChange();
+					return;
+
+				case "JustifyCenter":
+					img.removeAttribute('align');
+
+					// Is centered
+					var div = tinyMCE.getParentElement(focusElm, "div");
+					if (div && div.style.textAlign == "center") {
+						// Remove div
+						if (div.nodeName == "DIV" && div.childNodes.length == 1 && div.parentNode)
+							div.parentNode.replaceChild(img, div);
+					} else {
+						// Add div
+						var div = this.getDoc().createElement("div");
+						div.style.textAlign = 'center';
+						div.appendChild(img);
+						focusElm.parentNode.replaceChild(div, focusElm);
+					}
+
+					this.selection.selectNode(img);
+					this.repaint();
+					tinyMCE.triggerNodeChange();
+					return;
+
+				case "JustifyRight":
+					if (align == 'right')
+						img.removeAttribute('align');
+					else
+						img.setAttribute('align', 'right');
+
+					// Remove the div
+					var div = focusElm.parentNode;
+					if (div && div.nodeName == "DIV" && div.childNodes.length == 1 && div.parentNode)
+						div.parentNode.replaceChild(img, div);
+
+					this.selection.selectNode(img);
+					this.repaint();
+					tinyMCE.triggerNodeChange();
+					return;
+			}
+		}
+
+		if (tinyMCE.settings['force_br_newlines']) {
+			var alignValue = "";
+
+			if (doc.selection.type != "Control") {
+				switch (command) {
+						case "JustifyLeft":
+							alignValue = "left";
+							break;
+
+						case "JustifyCenter":
+							alignValue = "center";
+							break;
+
+						case "JustifyFull":
+							alignValue = "justify";
+							break;
+
+						case "JustifyRight":
+							alignValue = "right";
+							break;
+				}
+
+				if (alignValue != "") {
+					var rng = doc.selection.createRange();
+
+					if ((divElm = tinyMCE.getParentElement(rng.parentElement(), "div")) != null)
+						divElm.setAttribute("align", alignValue);
+					else if (rng.pasteHTML && rng.htmlText.length > 0)
+						rng.pasteHTML('<div align="' + alignValue + '">' + rng.htmlText + "</div>");
+
+					tinyMCE.triggerNodeChange();
+					return;
+				}
+			}
+		}
+
+		switch (command) {
+			case "mceRepaint":
+				this.repaint();
+				return true;
+
+			case "InsertUnorderedList":
+			case "InsertOrderedList":
+				var tag = (command == "InsertUnorderedList") ? "ul" : "ol";
+
+				if (tinyMCE.isSafari)
+					this.execCommand("mceInsertContent", false, "<" + tag + "><li>&nbsp;</li><" + tag + ">");
+				else
+					this.getDoc().execCommand(command, user_interface, value);
+
+				tinyMCE.triggerNodeChange();
+				break;
+
+			case "Strikethrough":
+				if (tinyMCE.isSafari)
+					this.execCommand("mceInsertContent", false, "<strike>" + this.selection.getSelectedHTML() + "</strike>");
+				else
+					this.getDoc().execCommand(command, user_interface, value);
+
+				tinyMCE.triggerNodeChange();
+				break;
+
+			case "mceSelectNode":
+				this.selection.selectNode(value);
+				tinyMCE.triggerNodeChange();
+				tinyMCE.selectedNode = value;
+				break;
+
+			case "FormatBlock":
+				if (value == null || value == "") {
+					var elm = tinyMCE.getParentElement(this.getFocusElement(), "p,div,h1,h2,h3,h4,h5,h6,pre,address,blockquote,dt,dl,dd,samp");
+
+					if (elm)
+						this.execCommand("mceRemoveNode", false, elm);
+				} else {
+					if (tinyMCE.isGecko && new RegExp('<(div|blockquote|code|dt|dd|dl|samp)>', 'gi').test(value))
+						value = value.replace(/[^a-z]/gi, '');
+
+					if (tinyMCE.isMSIE && new RegExp('blockquote|code|samp', 'gi').test(value)) {
+						var b = this.selection.getBookmark();
+						this.getDoc().execCommand("FormatBlock", false, '<p>');
+						tinyMCE.renameElement(tinyMCE.getParentBlockElement(this.getFocusElement()), value);
+						this.selection.moveToBookmark(b);
+					} else
+						this.getDoc().execCommand("FormatBlock", false, value);
+				}
+
+				tinyMCE.triggerNodeChange();
+
+				break;
+
+			case "mceRemoveNode":
+				if (!value)
+					value = tinyMCE.getParentElement(this.getFocusElement());
+
+				if (tinyMCE.isMSIE) {
+					value.outerHTML = value.innerHTML;
+				} else {
+					var rng = value.ownerDocument.createRange();
+					rng.setStartBefore(value);
+					rng.setEndAfter(value);
+					rng.deleteContents();
+					rng.insertNode(rng.createContextualFragment(value.innerHTML));
+				}
+
+				tinyMCE.triggerNodeChange();
+
+				break;
+
+			case "mceSelectNodeDepth":
+				var parentNode = this.getFocusElement();
+				for (var i=0; parentNode; i++) {
+					if (parentNode.nodeName.toLowerCase() == "body")
+						break;
+
+					if (parentNode.nodeName.toLowerCase() == "#text") {
+						i--;
+						parentNode = parentNode.parentNode;
+						continue;
+					}
+
+					if (i == value) {
+						this.selection.selectNode(parentNode, false);
+						tinyMCE.triggerNodeChange();
+						tinyMCE.selectedNode = parentNode;
+						return;
+					}
+
+					parentNode = parentNode.parentNode;
+				}
+
+				break;
+
+			case "SetStyleInfo":
+				var rng = this.getRng();
+				var sel = this.getSel();
+				var scmd = value['command'];
+				var sname = value['name'];
+				var svalue = value['value'] == null ? '' : value['value'];
+				//var svalue = value['value'] == null ? '' : value['value'];
+				var wrapper = value['wrapper'] ? value['wrapper'] : "span";
+				var parentElm = null;
+				var invalidRe = new RegExp("^BODY|HTML$", "g");
+				var invalidParentsRe = tinyMCE.settings['merge_styles_invalid_parents'] != '' ? new RegExp(tinyMCE.settings['merge_styles_invalid_parents'], "gi") : null;
+
+				// Whole element selected check
+				if (tinyMCE.isMSIE) {
+					// Control range
+					if (rng.item)
+						parentElm = rng.item(0);
+					else {
+						var pelm = rng.parentElement();
+						var prng = doc.selection.createRange();
+						prng.moveToElementText(pelm);
+
+						if (rng.htmlText == prng.htmlText || rng.boundingWidth == 0) {
+							if (invalidParentsRe == null || !invalidParentsRe.test(pelm.nodeName))
+								parentElm = pelm;
+						}
+					}
+				} else {
+					var felm = this.getFocusElement();
+					if (sel.isCollapsed || (new RegExp('td|tr|tbody|table', 'gi').test(felm.nodeName) && sel.anchorNode == felm.parentNode))
+						parentElm = felm;
+				}
+
+				// Whole element selected
+				if (parentElm && !invalidRe.test(parentElm.nodeName)) {
+					if (scmd == "setstyle")
+						tinyMCE.setStyleAttrib(parentElm, sname, svalue);
+
+					if (scmd == "setattrib")
+						tinyMCE.setAttrib(parentElm, sname, svalue);
+
+					if (scmd == "removeformat") {
+						parentElm.style.cssText = '';
+						tinyMCE.setAttrib(parentElm, 'class', '');
+					}
+
+					// Remove style/attribs from all children
+					var ch = tinyMCE.getNodeTree(parentElm, new Array(), 1);
+					for (var z=0; z<ch.length; z++) {
+						if (ch[z] == parentElm)
+							continue;
+
+						if (scmd == "setstyle")
+							tinyMCE.setStyleAttrib(ch[z], sname, '');
+
+						if (scmd == "setattrib")
+							tinyMCE.setAttrib(ch[z], sname, '');
+
+						if (scmd == "removeformat") {
+							ch[z].style.cssText = '';
+							tinyMCE.setAttrib(ch[z], 'class', '');
+						}
+					}
+				} else {
+					this._setUseCSS(false); // Bug in FF when running in fullscreen
+					doc.execCommand("FontName", false, "#mce_temp_font#");
+					var elementArray = tinyMCE.getElementsByAttributeValue(this.getBody(), "font", "face", "#mce_temp_font#");
+
+					// Change them all
+					for (var x=0; x<elementArray.length; x++) {
+						elm = elementArray[x];
+						if (elm) {
+							var spanElm = doc.createElement(wrapper);
+
+							if (scmd == "setstyle")
+								tinyMCE.setStyleAttrib(spanElm, sname, svalue);
+
+							if (scmd == "setattrib")
+								tinyMCE.setAttrib(spanElm, sname, svalue);
+
+							if (scmd == "removeformat") {
+								spanElm.style.cssText = '';
+								tinyMCE.setAttrib(spanElm, 'class', '');
+							}
+
+							if (elm.hasChildNodes()) {
+								for (var i=0; i<elm.childNodes.length; i++)
+									spanElm.appendChild(elm.childNodes[i].cloneNode(true));
+							}
+
+							spanElm.setAttribute("mce_new", "true");
+							elm.parentNode.replaceChild(spanElm, elm);
+
+							// Remove style/attribs from all children
+							var ch = tinyMCE.getNodeTree(spanElm, new Array(), 1);
+							for (var z=0; z<ch.length; z++) {
+								if (ch[z] == spanElm)
+									continue;
+
+								if (scmd == "setstyle")
+									tinyMCE.setStyleAttrib(ch[z], sname, '');
+
+								if (scmd == "setattrib")
+									tinyMCE.setAttrib(ch[z], sname, '');
+
+								if (scmd == "removeformat") {
+									ch[z].style.cssText = '';
+									tinyMCE.setAttrib(ch[z], 'class', '');
+								}
+							}
+						}
+					}
+				}
+
+				// Cleaup wrappers
+				var nodes = doc.getElementsByTagName(wrapper);
+				for (var i=nodes.length-1; i>=0; i--) {
+					var elm = nodes[i];
+					var isNew = tinyMCE.getAttrib(elm, "mce_new") == "true";
+
+					elm.removeAttribute("mce_new");
+
+					// Is only child a element
+					if (elm.childNodes && elm.childNodes.length == 1 && elm.childNodes[0].nodeType == 1) {
+						//tinyMCE.debug("merge1" + isNew);
+						this._mergeElements(scmd, elm, elm.childNodes[0], isNew);
+						continue;
+					}
+
+					// Is I the only child
+					if (elm.parentNode.childNodes.length == 1 && !invalidRe.test(elm.nodeName) && !invalidRe.test(elm.parentNode.nodeName)) {
+						//tinyMCE.debug("merge2" + isNew + "," + elm.nodeName + "," + elm.parentNode.nodeName);
+						if (invalidParentsRe == null || !invalidParentsRe.test(elm.parentNode.nodeName))
+							this._mergeElements(scmd, elm.parentNode, elm, false);
+					}
+				}
+
+				// Remove empty wrappers
+				var nodes = doc.getElementsByTagName(wrapper);
+				for (var i=nodes.length-1; i>=0; i--) {
+					var elm = nodes[i];
+					var isEmpty = true;
+
+					// Check if it has any attribs
+					var tmp = doc.createElement("body");
+					tmp.appendChild(elm.cloneNode(false));
+
+					// Is empty span, remove it
+					tmp.innerHTML = tmp.innerHTML.replace(new RegExp('style=""|class=""', 'gi'), '');
+					//tinyMCE.debug(tmp.innerHTML);
+					if (new RegExp('<span>', 'gi').test(tmp.innerHTML)) {
+						for (var x=0; x<elm.childNodes.length; x++) {
+							if (elm.parentNode != null)
+								elm.parentNode.insertBefore(elm.childNodes[x].cloneNode(true), elm);
+						}
+
+						elm.parentNode.removeChild(elm);
+					}
+				}
+
+				// Re add the visual aids
+				if (scmd == "removeformat")
+					tinyMCE.handleVisualAid(this.getBody(), true, this.visualAid, this);
+
+				tinyMCE.triggerNodeChange();
+
+				break;
+
+			case "FontName":
+				if (value == null) {
+					var s = this.getSel();
+
+					// Find font and select it
+					if (tinyMCE.isGecko && s.isCollapsed) {
+						var f = tinyMCE.getParentElement(this.getFocusElement(), "font");
+
+						if (f != null)
+							this.selection.selectNode(f, false);
+					}
+
+					// Remove format
+					this.getDoc().execCommand("RemoveFormat", false, null);
+
+					// Collapse range if font was found
+					if (f != null && tinyMCE.isGecko) {
+						var r = this.getRng().cloneRange();
+						r.collapse(true);
+						s.removeAllRanges();
+						s.addRange(r);
+					}
+				} else
+					this.getDoc().execCommand('FontName', false, value);
+
+				if (tinyMCE.isGecko)
+					window.setTimeout('tinyMCE.triggerNodeChange(false);', 1);
+
+				return;
+
+			case "FontSize":
+				this.getDoc().execCommand('FontSize', false, value);
+
+				if (tinyMCE.isGecko)
+					window.setTimeout('tinyMCE.triggerNodeChange(false);', 1);
+
+				return;
+
+			case "forecolor":
+				this.getDoc().execCommand('forecolor', false, value);
+				break;
+
+			case "HiliteColor":
+				if (tinyMCE.isGecko) {
+					this._setUseCSS(true);
+					this.getDoc().execCommand('hilitecolor', false, value);
+					this._setUseCSS(false);
+				} else
+					this.getDoc().execCommand('BackColor', false, value);
+				break;
+
+			case "Cut":
+			case "Copy":
+			case "Paste":
+				var cmdFailed = false;
+
+				// Try executing command
+				eval('try {this.getDoc().execCommand(command, user_interface, value);} catch (e) {cmdFailed = true;}');
+
+				if (tinyMCE.isOpera && cmdFailed)
+					alert('Currently not supported by your browser, use keyboard shortcuts instead.');
+
+				// Alert error in gecko if command failed
+				if (tinyMCE.isGecko && cmdFailed) {
+					// Confirm more info
+					if (confirm(tinyMCE.entityDecode(tinyMCE.getLang('lang_clipboard_msg'))))
+						window.open('http://www.mozilla.org/editor/midasdemo/securityprefs.html', 'mceExternal');
+
+					return;
+				} else
+					tinyMCE.triggerNodeChange();
+			break;
+
+			case "mceSetContent":
+				if (!value)
+					value = "";
+
+				// Call custom cleanup code
+				value = tinyMCE.storeAwayURLs(value);
+				value = tinyMCE._customCleanup(this, "insert_to_editor", value);
+				tinyMCE._setHTML(doc, value);
+				tinyMCE.setInnerHTML(doc.body, tinyMCE._cleanupHTML(this, doc, tinyMCE.settings, doc.body));
+				tinyMCE.convertAllRelativeURLs(doc.body);
+
+				// Cleanup any mess left from storyAwayURLs
+				tinyMCE._removeInternal(this.getBody());
+
+				// When editing always use fonts internaly
+				if (tinyMCE.getParam("convert_fonts_to_spans"))
+					tinyMCE.convertSpansToFonts(doc);
+
+				tinyMCE.handleVisualAid(doc.body, true, this.visualAid, this);
+				tinyMCE._setEventsEnabled(doc.body, false);
+				return true;
+
+			case "mceCleanup":
+				var b = this.selection.getBookmark();
+				tinyMCE._setHTML(this.contentDocument, this.getBody().innerHTML);
+				tinyMCE.setInnerHTML(this.getBody(), tinyMCE._cleanupHTML(this, this.contentDocument, this.settings, this.getBody(), this.visualAid));
+				tinyMCE.convertAllRelativeURLs(doc.body);
+
+				// When editing always use fonts internaly
+				if (tinyMCE.getParam("convert_fonts_to_spans"))
+					tinyMCE.convertSpansToFonts(doc);
+
+				tinyMCE.handleVisualAid(this.getBody(), true, this.visualAid, this);
+				tinyMCE._setEventsEnabled(this.getBody(), false);
+				this.repaint();
+				this.selection.moveToBookmark(b);
+				tinyMCE.triggerNodeChange();
+			break;
+
+			case "mceReplaceContent":
+				// Force empty string
+				if (!value)
+					value = '';
+
+				this.getWin().focus();
+
+				var selectedText = "";
+
+				if (tinyMCE.isMSIE) {
+					var rng = doc.selection.createRange();
+					selectedText = rng.text;
+				} else
+					selectedText = this.getSel().toString();
+
+				if (selectedText.length > 0) {
+					value = tinyMCE.replaceVar(value, "selection", selectedText);
+					tinyMCE.execCommand('mceInsertContent', false, value);
+				}
+
+				tinyMCE.triggerNodeChange();
+			break;
+
+			case "mceSetAttribute":
+				if (typeof(value) == 'object') {
+					var targetElms = (typeof(value['targets']) == "undefined") ? "p,img,span,div,td,h1,h2,h3,h4,h5,h6,pre,address" : value['targets'];
+					var targetNode = tinyMCE.getParentElement(this.getFocusElement(), targetElms);
+
+					if (targetNode) {
+						targetNode.setAttribute(value['name'], value['value']);
+						tinyMCE.triggerNodeChange();
+					}
+				}
+			break;
+
+			case "mceSetCSSClass":
+				this.execCommand("SetStyleInfo", false, {command : "setattrib", name : "class", value : value});
+			break;
+
+			case "mceInsertRawHTML":
+				var key = 'tiny_mce_marker';
+
+				this.execCommand('mceBeginUndoLevel');
+
+				// Insert marker key
+				this.execCommand('mceInsertContent', false, key);
+
+				// Store away scroll pos
+				var scrollX = this.getDoc().body.scrollLeft + this.getDoc().documentElement.scrollLeft;
+				var scrollY = this.getDoc().body.scrollTop + this.getDoc().documentElement.scrollTop;
+
+				// Find marker and replace with RAW HTML
+				var html = this.getBody().innerHTML;
+				if ((pos = html.indexOf(key)) != -1)
+					tinyMCE.setInnerHTML(this.getBody(), html.substring(0, pos) + value + html.substring(pos + key.length));
+
+				// Restore scoll pos
+				this.contentWindow.scrollTo(scrollX, scrollY);
+
+				this.execCommand('mceEndUndoLevel');
+
+				break;
+
+			case "mceInsertContent":
+				// Force empty string
+				if (!value)
+					value = '';
+
+				var insertHTMLFailed = false;
+				this.getWin().focus();
+
+				if (tinyMCE.isGecko || tinyMCE.isOpera) {
+					try {
+						// Is plain text or HTML, &amp;, &nbsp; etc will be encoded wrong in FF
+						if (value.indexOf('<') == -1 && !value.match(/(&#38;|&#160;|&#60;|&#62;)/g)) {
+							var r = this.getRng();
+							var n = this.getDoc().createTextNode(tinyMCE.entityDecode(value));
+							var s = this.getSel();
+							var r2 = r.cloneRange();
+
+							// Insert text at cursor position
+							s.removeAllRanges();
+							r.deleteContents();
+							r.insertNode(n);
+
+							// Move the cursor to the end of text
+							r2.selectNode(n);
+							r2.collapse(false);
+							s.removeAllRanges();
+							s.addRange(r2);
+						} else {
+							value = tinyMCE.fixGeckoBaseHREFBug(1, this.getDoc(), value);
+							this.getDoc().execCommand('inserthtml', false, value);
+							tinyMCE.fixGeckoBaseHREFBug(2, this.getDoc(), value);
+						}
+					} catch (ex) {
+						insertHTMLFailed = true;
+					}
+
+					if (!insertHTMLFailed) {
+						tinyMCE.triggerNodeChange();
+						return;
+					}
+				}
+
+				// Ugly hack in Opera due to non working "inserthtml"
+				if (tinyMCE.isOpera && insertHTMLFailed) {
+					this.getDoc().execCommand("insertimage", false, tinyMCE.uniqueURL);
+					var ar = tinyMCE.getElementsByAttributeValue(this.getBody(), "img", "src", tinyMCE.uniqueURL);
+					ar[0].outerHTML = value;
+					return;
+				}
+
+				if (!tinyMCE.isMSIE) {
+					var isHTML = value.indexOf('<') != -1;
+					var sel = this.getSel();
+					var rng = this.getRng();
+
+					if (isHTML) {
+						if (tinyMCE.isSafari) {
+							var tmpRng = this.getDoc().createRange();
+
+							tmpRng.setStart(this.getBody(), 0);
+							tmpRng.setEnd(this.getBody(), 0);
+
+							value = tmpRng.createContextualFragment(value);
+						} else
+							value = rng.createContextualFragment(value);
+					} else {
+						// Setup text node
+						var el = document.createElement("div");
+						el.innerHTML = value;
+						value = el.firstChild.nodeValue;
+						value = doc.createTextNode(value);
+					}
+
+					// Insert plain text in Safari
+					if (tinyMCE.isSafari && !isHTML) {
+						this.execCommand('InsertText', false, value.nodeValue);
+						tinyMCE.triggerNodeChange();
+						return true;
+					} else if (tinyMCE.isSafari && isHTML) {
+						rng.deleteContents();
+						rng.insertNode(value);
+						tinyMCE.triggerNodeChange();
+						return true;
+					}
+
+					rng.deleteContents();
+
+					// If target node is text do special treatment, (Mozilla 1.3 fix)
+					if (rng.startContainer.nodeType == 3) {
+						var node = rng.startContainer.splitText(rng.startOffset);
+						node.parentNode.insertBefore(value, node); 
+					} else
+						rng.insertNode(value);
+
+					if (!isHTML) {
+						// Removes weird selection trails
+						sel.selectAllChildren(doc.body);
+						sel.removeAllRanges();
+
+						// Move cursor to end of content
+						var rng = doc.createRange();
+
+						rng.selectNode(value);
+						rng.collapse(false);
+
+						sel.addRange(rng);
+					} else
+						rng.collapse(false);
+
+					tinyMCE.fixGeckoBaseHREFBug(2, this.getDoc(), value);
+				} else {
+					var rng = doc.selection.createRange();
+					var c = value.indexOf('<!--') != -1;
+
+					// Fix comment bug, add tag before comments
+					if (c)
+						value = tinyMCE.uniqueTag + value;
+
+					if (rng.item)
+						rng.item(0).outerHTML = value;
+					else
+						rng.pasteHTML(value);
+
+					// Remove unique tag
+					if (c) {
+						var e = this.getDoc().getElementById('mceTMPElement');
+						e.parentNode.removeChild(e);
+					}
+				}
+
+				tinyMCE.triggerNodeChange();
+			break;
+
+			case "mceStartTyping":
+				if (tinyMCE.settings['custom_undo_redo'] && this.undoRedo.typingUndoIndex == -1) {
+					this.undoRedo.typingUndoIndex = this.undoRedo.undoIndex;
+					this.execCommand('mceAddUndoLevel');
+					//tinyMCE.debug("mceStartTyping");
+				}
+				break;
+
+			case "mceEndTyping":
+				if (tinyMCE.settings['custom_undo_redo'] && this.undoRedo.typingUndoIndex != -1) {
+					this.execCommand('mceAddUndoLevel');
+					this.undoRedo.typingUndoIndex = -1;
+					//tinyMCE.debug("mceEndTyping");
+				}
+				break;
+
+			case "mceBeginUndoLevel":
+				this.undoRedoLevel = false;
+				break;
+
+			case "mceEndUndoLevel":
+				this.undoRedoLevel = true;
+				this.execCommand('mceAddUndoLevel');
+				break;
+
+			case "mceAddUndoLevel":
+				if (tinyMCE.settings['custom_undo_redo'] && this.undoRedoLevel) {
+					if (this.undoRedo.add())
+						tinyMCE.triggerNodeChange(false);
+				}
+				break;
+
+			case "Undo":
+				if (tinyMCE.settings['custom_undo_redo']) {
+					tinyMCE.execCommand("mceEndTyping");
+					this.undoRedo.undo();
+					tinyMCE.triggerNodeChange();
+				} else
+					this.getDoc().execCommand(command, user_interface, value);
+				break;
+
+			case "Redo":
+				if (tinyMCE.settings['custom_undo_redo']) {
+					tinyMCE.execCommand("mceEndTyping");
+					this.undoRedo.redo();
+					tinyMCE.triggerNodeChange();
+				} else
+					this.getDoc().execCommand(command, user_interface, value);
+				break;
+
+			case "mceToggleVisualAid":
+				this.visualAid = !this.visualAid;
+				tinyMCE.handleVisualAid(this.getBody(), true, this.visualAid, this);
+				tinyMCE.triggerNodeChange();
+				break;
+
+			case "Indent":
+				this.getDoc().execCommand(command, user_interface, value);
+				tinyMCE.triggerNodeChange();
+				if (tinyMCE.isMSIE) {
+					var n = tinyMCE.getParentElement(this.getFocusElement(), "blockquote");
+					do {
+						if (n && n.nodeName == "BLOCKQUOTE") {
+							n.removeAttribute("dir");
+							n.removeAttribute("style");
+						}
+					} while (n != null && (n = n.parentNode) != null);
+				}
+				break;
+
+			case "removeformat":
+				var text = this.selection.getSelectedText();
+
+				if (tinyMCE.isOpera) {
+					this.getDoc().execCommand("RemoveFormat", false, null);
+					return;
+				}
+
+				if (tinyMCE.isMSIE) {
+					try {
+						var rng = doc.selection.createRange();
+						rng.execCommand("RemoveFormat", false, null);
+					} catch (e) {
+						// Do nothing
+					}
+
+					this.execCommand("SetStyleInfo", false, {command : "removeformat"});
+				} else {
+					this.getDoc().execCommand(command, user_interface, value);
+
+					this.execCommand("SetStyleInfo", false, {command : "removeformat"});
+				}
+
+				// Remove class
+				if (text.length == 0)
+					this.execCommand("mceSetCSSClass", false, "");
+
+				tinyMCE.triggerNodeChange();
+				break;
+
+			default:
+				this.getDoc().execCommand(command, user_interface, value);
+
+				if (tinyMCE.isGecko)
+					window.setTimeout('tinyMCE.triggerNodeChange(false);', 1);
+				else
+					tinyMCE.triggerNodeChange();
+		}
+
+		// Add undo level after modification
+		if (command != "mceAddUndoLevel" && command != "Undo" && command != "Redo" && command != "mceStartTyping" && command != "mceEndTyping")
+			tinyMCE.execCommand("mceAddUndoLevel");
+	},
+
+	queryCommandValue : function(c) {
+		try {
+			return this.getDoc().queryCommandValue(c);
+		} catch (e) {
+			return null;
+		}
+	},
+
+	queryCommandState : function(c) {
+		return this.getDoc().queryCommandState(c);
+	},
+
+	_onAdd : function(replace_element, form_element_name, target_document) {
+		var hc, th, to, editorTemplate;
+
+		th = this.settings['theme'];
+		to = tinyMCE.themes[th];
+
+		var targetDoc = target_document ? target_document : document;
+
+		this.targetDoc = targetDoc;
+
+		tinyMCE.themeURL = tinyMCE.baseURL + "/themes/" + this.settings['theme'];
+		this.settings['themeurl'] = tinyMCE.themeURL;
+
+		if (!replace_element) {
+			alert("Error: Could not find the target element.");
+			return false;
+		}
+
+		if (to.getEditorTemplate)
+			editorTemplate = to.getEditorTemplate(this.settings, this.editorId);
+
+		var deltaWidth = editorTemplate['delta_width'] ? editorTemplate['delta_width'] : 0;
+		var deltaHeight = editorTemplate['delta_height'] ? editorTemplate['delta_height'] : 0;
+		var html = '<span id="' + this.editorId + '_parent" class="mceEditorContainer">' + editorTemplate['html'];
+
+		html = tinyMCE.replaceVar(html, "editor_id", this.editorId);
+		this.settings['default_document'] = tinyMCE.baseURL + "/blank.htm";
+
+		this.settings['old_width'] = this.settings['width'];
+		this.settings['old_height'] = this.settings['height'];
+
+		// Set default width, height
+		if (this.settings['width'] == -1)
+			this.settings['width'] = replace_element.offsetWidth;
+
+		if (this.settings['height'] == -1)
+			this.settings['height'] = replace_element.offsetHeight;
+
+		// Try the style width
+		if (this.settings['width'] == 0)
+			this.settings['width'] = replace_element.style.width;
+
+		// Try the style height
+		if (this.settings['height'] == 0)
+			this.settings['height'] = replace_element.style.height; 
+
+		// If no width/height then default to 320x240, better than nothing
+		if (this.settings['width'] == 0)
+			this.settings['width'] = 320;
+
+		if (this.settings['height'] == 0)
+			this.settings['height'] = 240;
+
+		this.settings['area_width'] = parseInt(this.settings['width']);
+		this.settings['area_height'] = parseInt(this.settings['height']);
+		this.settings['area_width'] += deltaWidth;
+		this.settings['area_height'] += deltaHeight;
+
+		// Special % handling
+		if (("" + this.settings['width']).indexOf('%') != -1)
+			this.settings['area_width'] = "100%";
+
+		if (("" + this.settings['height']).indexOf('%') != -1)
+			this.settings['area_height'] = "100%";
+
+		if (("" + replace_element.style.width).indexOf('%') != -1) {
+			this.settings['width'] = replace_element.style.width;
+			this.settings['area_width'] = "100%";
+		}
+
+		if (("" + replace_element.style.height).indexOf('%') != -1) {
+			this.settings['height'] = replace_element.style.height;
+			this.settings['area_height'] = "100%";
+		}
+
+		html = tinyMCE.applyTemplate(html);
+
+		this.settings['width'] = this.settings['old_width'];
+		this.settings['height'] = this.settings['old_height'];
+
+		this.visualAid = this.settings['visual'];
+		this.formTargetElementId = form_element_name;
+
+		// Get replace_element contents
+		if (replace_element.nodeName == "TEXTAREA" || replace_element.nodeName == "INPUT")
+			this.startContent = replace_element.value;
+		else
+			this.startContent = replace_element.innerHTML;
+
+		// If not text area or input
+		if (replace_element.nodeName != "TEXTAREA" && replace_element.nodeName != "INPUT") {
+			this.oldTargetElement = replace_element;
+
+			// Debug mode
+			if (tinyMCE.settings['debug']) {
+				hc = '<textarea wrap="off" id="' + form_element_name + '" name="' + form_element_name + '" cols="100" rows="15"></textarea>';
+			} else {
+				hc = '<input type="hidden" id="' + form_element_name + '" name="' + form_element_name + '" />';
+				this.oldTargetElement.style.display = "none";
+			}
+
+			html += '</span>';
+
+			if (tinyMCE.isGecko)
+				html = hc + html;
+			else
+				html += hc;
+
+			// Output HTML and set editable
+			if (tinyMCE.isGecko) {
+				var rng = replace_element.ownerDocument.createRange();
+				rng.setStartBefore(replace_element);
+
+				var fragment = rng.createContextualFragment(html);
+				tinyMCE.insertAfter(fragment, replace_element);
+			} else
+				replace_element.insertAdjacentHTML("beforeBegin", html);
+		} else {
+			html += '</span>';
+
+			// Just hide the textarea element
+			this.oldTargetElement = replace_element;
+
+			if (!tinyMCE.settings['debug'])
+				this.oldTargetElement.style.display = "none";
+
+			// Output HTML and set editable
+			if (tinyMCE.isGecko) {
+				var rng = replace_element.ownerDocument.createRange();
+				rng.setStartBefore(replace_element);
+
+				var fragment = rng.createContextualFragment(html);
+				tinyMCE.insertAfter(fragment, replace_element);
+			} else
+				replace_element.insertAdjacentHTML("beforeBegin", html);
+		}
+
+		// Setup iframe
+		var dynamicIFrame = false;
+		var tElm = targetDoc.getElementById(this.editorId);
+
+		if (!tinyMCE.isMSIE) {
+			// Node case is preserved in XML strict mode
+			if (tElm && (tElm.nodeName == "SPAN" || tElm.nodeName == "span")) {
+				tElm = tinyMCE._createIFrame(tElm, targetDoc);
+				dynamicIFrame = true;
+			}
+
+			this.targetElement = tElm;
+			this.iframeElement = tElm;
+			this.contentDocument = tElm.contentDocument;
+			this.contentWindow = tElm.contentWindow;
+
+			//this.getDoc().designMode = "on";
+		} else {
+			if (tElm && tElm.nodeName == "SPAN")
+				tElm = tinyMCE._createIFrame(tElm, targetDoc, targetDoc.parentWindow);
+			else
+				tElm = targetDoc.frames[this.editorId];
+
+			this.targetElement = tElm;
+			this.iframeElement = targetDoc.getElementById(this.editorId);
+
+			if (tinyMCE.isOpera) {
+				this.contentDocument = this.iframeElement.contentDocument;
+				this.contentWindow = this.iframeElement.contentWindow;
+				dynamicIFrame = true;
+			} else {
+				this.contentDocument = tElm.window.document;
+				this.contentWindow = tElm.window;
+			}
+
+			this.getDoc().designMode = "on";
+		}
+
+		// Setup base HTML
+		var doc = this.contentDocument;
+		if (dynamicIFrame) {
+			var html = tinyMCE.getParam('doctype') + '<html><head xmlns="http://www.w3.org/1999/xhtml"><base href="' + tinyMCE.settings['base_href'] + '" /><title>blank_page</title><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body class="mceContentBody"></body></html>';
+
+			try {
+				if (!this.isHidden())
+					this.getDoc().designMode = "on";
+
+				doc.open();
+				doc.write(html);
+				doc.close();
+			} catch (e) {
+				// Failed Mozilla 1.3
+				this.getDoc().location.href = tinyMCE.baseURL + "/blank.htm";
+			}
+		}
+
+		// This timeout is needed in MSIE 5.5 for some odd reason
+		// it seems that the document.frames isn't initialized yet?
+		if (tinyMCE.isMSIE)
+			window.setTimeout("tinyMCE.addEventHandlers(tinyMCE.instances[\"" + this.editorId + "\"]);", 1);
+
+		tinyMCE.setupContent(this.editorId, true);
+
+		return true;
+	},
+
+	setBaseHREF : function(u) {
+		var h, b, d, nl;
+
+		d = this.getDoc();
+		nl = d.getElementsByTagName("base");
+		b = nl.length > 0 ? nl[0] : null;
+
+		if (!b) {
+			nl = d.getElementsByTagName("head");
+			h = nl.length > 0 ? nl[0] : null;
+
+			b = d.createElement("base");
+			b.setAttribute('href', u);
+			h.appendChild(b);
+		} else {
+			if (u == "" || u == null)
+				b.parentNode.removeChild(b);
+			else
+				b.setAttribute('href', u);
+		}
+	},
+
+	getFocusElement : function() {
+		return this.selection.getFocusElement();
+	},
+
+	getSel : function() {
+		return this.selection.getSel();
+	},
+
+	getRng : function() {
+		return this.selection.getRng();
+	},
+
+	triggerSave : function(skip_cleanup, skip_callback) {
+		var e, nl = new Array(), i, s;
+
+		this.switchSettings();
+		s = tinyMCE.settings;
+
+		// Force hidden tabs visible while serializing
+		if (tinyMCE.isMSIE && !tinyMCE.isOpera) {
+			e = this.iframeElement;
+
+			do {
+				if (e.style && e.style.display == 'none') {
+					e.style.display = 'block';
+					nl[nl.length] = {elm : e, type : 'style'};
+				}
+
+				if (e.style && s.hidden_tab_class.length > 0 && e.className.indexOf(s.hidden_tab_class) != -1) {
+					e.className = s.display_tab_class;
+					nl[nl.length] = {elm : e, type : 'class'};
+				}
+			} while ((e = e.parentNode) != null)
+		}
+
+		tinyMCE.settings['preformatted'] = false;
+
+		// Default to false
+		if (typeof(skip_cleanup) == "undefined")
+			skip_cleanup = false;
+
+		// Default to false
+		if (typeof(skip_callback) == "undefined")
+			skip_callback = false;
+
+		tinyMCE._setHTML(this.getDoc(), this.getBody().innerHTML);
+
+		// Remove visual aids when cleanup is disabled
+		if (this.settings['cleanup'] == false) {
+			tinyMCE.handleVisualAid(this.getBody(), true, false, this);
+			tinyMCE._setEventsEnabled(this.getBody(), true);
+		}
+
+		tinyMCE._customCleanup(this, "submit_content_dom", this.contentWindow.document.body);
+		var htm = skip_cleanup ? this.getBody().innerHTML : tinyMCE._cleanupHTML(this, this.getDoc(), this.settings, this.getBody(), tinyMCE.visualAid, true, true);
+		htm = tinyMCE._customCleanup(this, "submit_content", htm);
+
+		if (!skip_callback && tinyMCE.settings['save_callback'] != "")
+			var content = eval(tinyMCE.settings['save_callback'] + "(this.formTargetElementId,htm,this.getBody());");
+
+		// Use callback content if available
+		if ((typeof(content) != "undefined") && content != null)
+			htm = content;
+
+		// Replace some weird entities (Bug: #1056343)
+		htm = tinyMCE.regexpReplace(htm, "&#40;", "(", "gi");
+		htm = tinyMCE.regexpReplace(htm, "&#41;", ")", "gi");
+		htm = tinyMCE.regexpReplace(htm, "&#59;", ";", "gi");
+		htm = tinyMCE.regexpReplace(htm, "&#34;", "&quot;", "gi");
+		htm = tinyMCE.regexpReplace(htm, "&#94;", "^", "gi");
+
+		if (this.formElement)
+			this.formElement.value = htm;
+
+		if (tinyMCE.isSafari && this.formElement)
+			this.formElement.innerText = htm;
+
+		// Hide them again (tabs in MSIE)
+		for (i=0; i<nl.length; i++) {
+			if (nl[i].type == 'style')
+				nl[i].elm.style.display = 'none';
+			else
+				nl[i].elm.className = s.hidden_tab_class;
+		}
+	}
+};
+
+/* file:jscripts/tiny_mce/classes/TinyMCE_Cleanup.class.js */
+
+TinyMCE_Engine.prototype.cleanupHTMLCode = function(s) {
+	s = s.replace(new RegExp('<p \\/>', 'gi'), '<p>&nbsp;</p>');
+	s = s.replace(new RegExp('<p>\\s*<\\/p>', 'gi'), '<p>&nbsp;</p>');
+
+	// Fix close BR elements
+	s = s.replace(new RegExp('<br>\\s*<\\/br>', 'gi'), '<br />');
+
+	// Open closed tags like <b/> to <b></b>
+	s = s.replace(new RegExp('<(h[1-6]|p|div|address|pre|form|table|li|ol|ul|td|b|font|em|strong|i|strike|u|span|a|ul|ol|li|blockquote)([a-z]*)([^\\\\|>]*)\\/>', 'gi'), '<$1$2$3></$1$2>');
+
+	// Remove trailing space <b > to <b>
+	s = s.replace(new RegExp('\\s+></', 'gi'), '></');
+
+	// Close tags <img></img> to <img/>
+	s = s.replace(new RegExp('<(img|br|hr)([^>]*)><\\/(img|br|hr)>', 'gi'), '<$1$2 />');
+
+	// Weird MSIE bug, <p><hr /></p> breaks runtime?
+	if (tinyMCE.isMSIE)
+		s = s.replace(new RegExp('<p><hr \\/><\\/p>', 'gi'), "<hr>");
+
+	// Convert relative anchors to absolute URLs ex: #something to file.htm#something
+	if (tinyMCE.getParam('convert_urls'))
+		s = s.replace(new RegExp('(href=\"{0,1})(\\s*#)', 'gi'), '$1' + tinyMCE.settings['document_base_url'] + "#");
+
+	return s;
+};
+
+TinyMCE_Engine.prototype.parseStyle = function(str) {
+	var ar = new Array();
+
+	if (str == null)
+		return ar;
+
+	var st = str.split(';');
+
+	tinyMCE.clearArray(ar);
+
+	for (var i=0; i<st.length; i++) {
+		if (st[i] == '')
+			continue;
+
+		var re = new RegExp('^\\s*([^:]*):\\s*(.*)\\s*$');
+		var pa = st[i].replace(re, '$1||$2').split('||');
+//tinyMCE.debug(str, pa[0] + "=" + pa[1], st[i].replace(re, '$1||$2'));
+		if (pa.length == 2)
+			ar[pa[0].toLowerCase()] = pa[1];
+	}
+
+	return ar;
+};
+
+TinyMCE_Engine.prototype.compressStyle = function(ar, pr, sf, res) {
+	var box = new Array();
+
+	box[0] = ar[pr + '-top' + sf];
+	box[1] = ar[pr + '-left' + sf];
+	box[2] = ar[pr + '-right' + sf];
+	box[3] = ar[pr + '-bottom' + sf];
+
+	for (var i=0; i<box.length; i++) {
+		if (box[i] == null)
+			return;
+
+		for (var a=0; a<box.length; a++) {
+			if (box[a] != box[i])
+				return;
+		}
+	}
+
+	// They are all the same
+	ar[res] = box[0];
+	ar[pr + '-top' + sf] = null;
+	ar[pr + '-left' + sf] = null;
+	ar[pr + '-right' + sf] = null;
+	ar[pr + '-bottom' + sf] = null;
+};
+
+TinyMCE_Engine.prototype.serializeStyle = function(ar) {
+	var str = "";
+
+	// Compress box
+	tinyMCE.compressStyle(ar, "border", "", "border");
+	tinyMCE.compressStyle(ar, "border", "-width", "border-width");
+	tinyMCE.compressStyle(ar, "border", "-color", "border-color");
+	tinyMCE.compressStyle(ar, "border", "-style", "border-style");
+	tinyMCE.compressStyle(ar, "padding", "", "padding");
+	tinyMCE.compressStyle(ar, "margin", "", "margin");
+
+	for (var key in ar) {
+		var val = ar[key];
+
+		if (typeof(val) == 'function')
+			continue;
+
+		if (key.indexOf('mso-') == 0)
+			continue;
+
+		if (val != null && val != '') {
+			val = '' + val; // Force string
+
+			// Fix style URL
+			val = val.replace(new RegExp("url\\(\\'?([^\\']*)\\'?\\)", 'gi'), "url('$1')");
+
+			// Convert URL
+			if (val.indexOf('url(') != -1 && tinyMCE.getParam('convert_urls')) {
+				var m = new RegExp("url\\('(.*?)'\\)").exec(val);
+
+				if (m.length > 1)
+					val = "url('" + eval(tinyMCE.getParam('urlconverter_callback') + "(m[1], null, true);") + "')";
+			}
+
+			// Force HEX colors
+			if (tinyMCE.getParam("force_hex_style_colors"))
+				val = tinyMCE.convertRGBToHex(val, true);
+
+			if (val != "url('')")
+				str += key.toLowerCase() + ": " + val + "; ";
+		}
+	}
+
+	if (new RegExp('; $').test(str))
+		str = str.substring(0, str.length - 2);
+
+	return str;
+};
+
+TinyMCE_Engine.prototype.convertRGBToHex = function(s, k) {
+	if (s.toLowerCase().indexOf('rgb') != -1) {
+		var re = new RegExp("(.*?)rgb\\s*?\\(\\s*?([0-9]+).*?,\\s*?([0-9]+).*?,\\s*?([0-9]+).*?\\)(.*?)", "gi");
+		var rgb = s.replace(re, "$1,$2,$3,$4,$5").split(',');
+		if (rgb.length == 5) {
+			r = parseInt(rgb[1]).toString(16);
+			g = parseInt(rgb[2]).toString(16);
+			b = parseInt(rgb[3]).toString(16);
+
+			r = r.length == 1 ? '0' + r : r;
+			g = g.length == 1 ? '0' + g : g;
+			b = b.length == 1 ? '0' + b : b;
+
+			s = "#" + r + g + b;
+
+			if (k)
+				s = rgb[0] + s + rgb[4];
+		}
+	}
+
+	return s;
+};
+
+TinyMCE_Engine.prototype.convertHexToRGB = function(s) {
+	if (s.indexOf('#') != -1) {
+		s = s.replace(new RegExp('[^0-9A-F]', 'gi'), '');
+		return "rgb(" + parseInt(s.substring(0, 2), 16) + "," + parseInt(s.substring(2, 4), 16) + "," + parseInt(s.substring(4, 6), 16) + ")";
+	}
+
+	return s;
+};
+
+TinyMCE_Engine.prototype.convertSpansToFonts = function(doc) {
+	var sizes = tinyMCE.getParam('font_size_style_values').replace(/\s+/, '').split(',');
+
+	var h = doc.body.innerHTML;
+	h = h.replace(/<span/gi, '<font');
+	h = h.replace(/<\/span/gi, '</font');
+	doc.body.innerHTML = h;
+
+	var s = doc.getElementsByTagName("font");
+	for (var i=0; i<s.length; i++) {
+		var size = tinyMCE.trim(s[i].style.fontSize).toLowerCase();
+		var fSize = 0;
+
+		for (var x=0; x<sizes.length; x++) {
+			if (sizes[x] == size) {
+				fSize = x + 1;
+				break;
+			}
+		}
+
+		if (fSize > 0) {
+			tinyMCE.setAttrib(s[i], 'size', fSize);
+			s[i].style.fontSize = '';
+		}
+
+		var fFace = s[i].style.fontFamily;
+		if (fFace != null && fFace != "") {
+			tinyMCE.setAttrib(s[i], 'face', fFace);
+			s[i].style.fontFamily = '';
+		}
+
+		var fColor = s[i].style.color;
+		if (fColor != null && fColor != "") {
+			tinyMCE.setAttrib(s[i], 'color', tinyMCE.convertRGBToHex(fColor));
+			s[i].style.color = '';
+		}
+	}
+};
+
+TinyMCE_Engine.prototype.convertFontsToSpans = function(doc) {
+	var sizes = tinyMCE.getParam('font_size_style_values').replace(/\s+/, '').split(',');
+
+	var h = doc.body.innerHTML;
+	h = h.replace(/<font/gi, '<span');
+	h = h.replace(/<\/font/gi, '</span');
+	doc.body.innerHTML = h;
+
+	var fsClasses = tinyMCE.getParam('font_size_classes');
+	if (fsClasses != '')
+		fsClasses = fsClasses.replace(/\s+/, '').split(',');
+	else
+		fsClasses = null;
+
+	var s = doc.getElementsByTagName("span");
+	for (var i=0; i<s.length; i++) {
+		var fSize, fFace, fColor;
+
+		fSize = tinyMCE.getAttrib(s[i], 'size');
+		fFace = tinyMCE.getAttrib(s[i], 'face');
+		fColor = tinyMCE.getAttrib(s[i], 'color');
+
+		if (fSize != "") {
+			fSize = parseInt(fSize);
+
+			if (fSize > 0 && fSize < 8) {
+				if (fsClasses != null)
+					tinyMCE.setAttrib(s[i], 'class', fsClasses[fSize-1]);
+				else
+					s[i].style.fontSize = sizes[fSize-1];
+			}
+
+			s[i].removeAttribute('size');
+		}
+
+		if (fFace != "") {
+			s[i].style.fontFamily = fFace;
+			s[i].removeAttribute('face');
+		}
+
+		if (fColor != "") {
+			s[i].style.color = fColor;
+			s[i].removeAttribute('color');
+		}
+	}
+};
+
+TinyMCE_Engine.prototype.cleanupAnchors = function(doc) {
+	var i, cn, x, an = doc.getElementsByTagName("a");
+
+	// Loops backwards due to bug #1467987
+	for (i=an.length-1; i>=0; i--) {
+		if (tinyMCE.getAttrib(an[i], "name") != "" && tinyMCE.getAttrib(an[i], "href") == "") {
+			cn = an[i].childNodes;
+
+			for (x=cn.length-1; x>=0; x--)
+				tinyMCE.insertAfter(cn[x], an[i]);
+		}
+	}
+};
+
+TinyMCE_Engine.prototype.getContent = function(editor_id) {
+	var h;
+
+	if (typeof(editor_id) != "undefined")
+		tinyMCE.selectedInstance = tinyMCE.getInstanceById(editor_id);
+
+	if (tinyMCE.selectedInstance) {
+		h = tinyMCE._cleanupHTML(this.selectedInstance, this.selectedInstance.getDoc(), tinyMCE.settings, this.selectedInstance.getBody(), false, true);
+
+		// When editing always use fonts internaly
+		if (tinyMCE.getParam("convert_fonts_to_spans"))
+			tinyMCE.convertSpansToFonts(this.selectedInstance.getDoc());
+
+		return h;
+	}
+
+	return null;
+};
+
+TinyMCE_Engine.prototype._fixListElements = function(d) {
+	var nl, x, a = ['ol', 'ul'], i, n, p, r = new RegExp('^(OL|UL)$'), np;
+
+	for (x=0; x<a.length; x++) {
+		nl = d.getElementsByTagName(a[x]);
+
+		for (i=0; i<nl.length; i++) {
+			n = nl[i];
+			p = n.parentNode;
+
+			if (r.test(p.nodeName)) {
+				np = tinyMCE.prevNode(n, 'LI');
+
+				if (!np) {
+					np = d.createElement('li');
+					np.innerHTML = '&nbsp;';
+					np.appendChild(n);
+					p.insertBefore(np, p.firstChild);
+				} else
+					np.appendChild(n);
+			}
+		}
+	}
+};
+
+TinyMCE_Engine.prototype._fixTables = function(d) {
+	var nl, i, n, p, np, x, t;
+
+	nl = d.getElementsByTagName('table');
+	for (i=0; i<nl.length; i++) {
+		n = nl[i];
+
+		if ((p = tinyMCE.getParentElement(n, 'p,div,h1,h2,h3,h4,h5,h6')) != null) {
+			np = p.cloneNode(false);
+			np.removeAttribute('id');
+
+			t = n;
+
+			while ((n = n.nextSibling))
+				np.appendChild(n);
+
+			tinyMCE.insertAfter(np, p);
+			tinyMCE.insertAfter(t, p);
+		}
+	}
+};
+
+TinyMCE_Engine.prototype._cleanupHTML = function(inst, doc, config, elm, visual, on_save, on_submit) {
+	var h, d, t1, t2, t3, t4, t5, c, s;
+
+	if (!tinyMCE.getParam('cleanup'))
+		return elm.innerHTML;
+
+	on_save = typeof(on_save) == 'undefined' ? false : on_save;
+
+	c = inst.cleanup;
+	s = inst.settings;
+	d = c.settings.debug;
+
+	if (d)
+		t1 = new Date().getTime();
+
+	if (tinyMCE.getParam("convert_fonts_to_spans"))
+		tinyMCE.convertFontsToSpans(doc);
+
+	if (tinyMCE.getParam("fix_list_elements"))
+		tinyMCE._fixListElements(doc);
+
+	if (tinyMCE.getParam("fix_table_elements"))
+		tinyMCE._fixTables(doc);
+
+	// Call custom cleanup code
+	tinyMCE._customCleanup(inst, on_save ? "get_from_editor_dom" : "insert_to_editor_dom", doc.body);
+
+	if (d)
+		t2 = new Date().getTime();
+
+	c.settings.on_save = on_save;
+	//for (var i=0; i<100; i++)
+
+	c.idCount = 0;
+	c.serializationId++;
+	c.serializedNodes = new Array();
+	c.sourceIndex = -1;
+
+	if (s.cleanup_serializer == "xml")
+		h = c.serializeNodeAsXML(elm);
+	else
+		h = c.serializeNodeAsHTML(elm);
+
+	if (d)
+		t3 = new Date().getTime();
+
+	// Post processing
+	h = h.replace(/<\/?(body|head|html)[^>]*>/gi, '');
+	h = h.replace(new RegExp(' (rowspan="1"|colspan="1")', 'g'), '');
+	h = h.replace(/<p><hr \/><\/p>/g, '<hr />');
+	h = h.replace(/<p>(&nbsp;|&#160;)<\/p><hr \/><p>(&nbsp;|&#160;)<\/p>/g, '<hr />');
+	h = h.replace(/<td>\s*<br \/>\s*<\/td>/g, '<td>&nbsp;</td>');
+	h = h.replace(/<p>\s*<br \/>\s*<\/p>/g, '<p>&nbsp;</p>');
+	h = h.replace(/<p>\s*(&nbsp;|&#160;)\s*<br \/>\s*(&nbsp;|&#160;)\s*<\/p>/g, '<p>&nbsp;</p>');
+	h = h.replace(/<p>\s*(&nbsp;|&#160;)\s*<br \/>\s*<\/p>/g, '<p>&nbsp;</p>');
+	h = h.replace(/<p>\s*<br \/>\s*&nbsp;\s*<\/p>/g, '<p>&nbsp;</p>');
+	h = h.replace(new RegExp('<a>(.*?)<\\/a>', 'g'), '$1');
+	h = h.replace(/<p([^>]*)>\s*<\/p>/g, '<p$1>&nbsp;</p>');
+
+	// Clean body
+	if (/^\s*(<br \/>|<p>&nbsp;<\/p>|<p>&#160;<\/p>|<p><\/p>)\s*$/.test(h))
+		h = '';
+
+	// If preformatted
+	if (s.preformatted) {
+		h = h.replace(/^<pre>/, '');
+		h = h.replace(/<\/pre>$/, '');
+		h = '<pre>' + h + '</pre>';
+	}
+
+	// Gecko specific processing
+	if (tinyMCE.isGecko) {
+		h = h.replace(/<o:p _moz-userdefined="" \/>/g, '');
+		h = h.replace(/<td([^>]*)>\s*<br \/>\s*<\/td>/g, '<td$1>&nbsp;</td>');
+	}
+
+	if (s.force_br_newlines)
+		h = h.replace(/<p>(&nbsp;|&#160;)<\/p>/g, '<br />');
+
+	// Call custom cleanup code
+	h = tinyMCE._customCleanup(inst, on_save ? "get_from_editor" : "insert_to_editor", h);
+
+	// Remove internal classes
+	if (on_save) {
+		h = h.replace(new RegExp(' ?(mceItem[a-zA-Z0-9]*|' + s.visual_table_class + ')', 'g'), '');
+		h = h.replace(new RegExp(' ?class=""', 'g'), '');
+	}
+
+	if (s.remove_linebreaks && !c.settings.indent)
+		h = h.replace(/\n|\r/g, ' ');
+
+	if (d)
+		t4 = new Date().getTime();
+
+	if (on_save && c.settings.indent)
+		h = c.formatHTML(h);
+
+	// If encoding (not recommended option)
+	if (on_submit && (s.encoding == "xml" || s.encoding == "html"))
+		h = c.xmlEncode(h);
+
+	if (d)
+		t5 = new Date().getTime();
+
+	if (c.settings.debug)
+		tinyMCE.debug("Cleanup in ms: Pre=" + (t2-t1) + ", Serialize: " + (t3-t2) + ", Post: " + (t4-t3) + ", Format: " + (t5-t4) + ", Sum: " + (t5-t1) + ".");
+
+	return h;
+};
+
+function TinyMCE_Cleanup() {
+	this.isMSIE = (navigator.appName == "Microsoft Internet Explorer");
+	this.rules = tinyMCE.clearArray(new Array());
+
+	// Default config
+	this.settings = {
+		indent_elements : 'head,table,tbody,thead,tfoot,form,tr,ul,ol,blockquote,object',
+		newline_before_elements : 'h1,h2,h3,h4,h5,h6,pre,address,div,ul,ol,li,meta,option,area,title,link,base,script,td',
+		newline_after_elements : 'br,hr,p,pre,address,div,ul,ol,meta,option,area,link,base,script',
+		newline_before_after_elements : 'html,head,body,table,thead,tbody,tfoot,tr,form,ul,ol,blockquote,p,object,param,hr,div',
+		indent_char : '\t',
+		indent_levels : 1,
+		entity_encoding : 'raw',
+		valid_elements : '*[*]',
+		entities : '',
+		url_converter : '',
+		invalid_elements : '',
+		verify_html : false
+	};
+
+	this.vElements = tinyMCE.clearArray(new Array());
+	this.vElementsRe = '';
+	this.closeElementsRe = /^(IMG|BR|HR|LINK|META|BASE|INPUT|BUTTON|AREA)$/;
+	this.codeElementsRe = /^(SCRIPT|STYLE)$/;
+	this.serializationId = 0;
+	this.mceAttribs = {
+		href : 'mce_href',
+		src : 'mce_src',
+		type : 'mce_type'
+	};
+}
+
+TinyMCE_Cleanup.prototype = {
+	init : function(s) {
+		var n, a, i, ir, or, st;
+
+		for (n in s)
+			this.settings[n] = s[n];
+
+		// Setup code formating
+		s = this.settings;
+
+		// Setup regexps
+		this.inRe = this._arrayToRe(s.indent_elements.split(','), '', '^<(', ')[^>]*');
+		this.ouRe = this._arrayToRe(s.indent_elements.split(','), '', '^<\\/(', ')[^>]*');
+		this.nlBeforeRe = this._arrayToRe(s.newline_before_elements.split(','), 'gi', '<(',  ')([^>]*)>');
+		this.nlAfterRe = this._arrayToRe(s.newline_after_elements.split(','), 'gi', '<(',  ')([^>]*)>');
+		this.nlBeforeAfterRe = this._arrayToRe(s.newline_before_after_elements.split(','), 'gi', '<(\\/?)(', ')([^>]*)>');
+
+		if (s.invalid_elements != '')
+			this.iveRe = this._arrayToRe(s.invalid_elements.toUpperCase().split(','), 'g', '^(', ')$');
+		else
+			this.iveRe = null;
+
+		// Setup separator
+		st = '';
+		for (i=0; i<s.indent_levels; i++)
+			st += s.indent_char;
+
+		this.inStr = st;
+
+		// If verify_html if false force *[*]
+		if (!s.verify_html) {
+			s.valid_elements = '*[*]';
+			s.extended_valid_elements = '';
+		}
+
+		this.fillStr = s.entity_encoding == "named" ? "&nbsp;" : "&#160;";
+		this.idCount = 0;
+	},
+
+	addRuleStr : function(s) {
+		var r = this.parseRuleStr(s);
+		var n;
+
+		for (n in r) {
+			if (r[n])
+				this.rules[n] = r[n];
+		}
+
+		this.vElements = tinyMCE.clearArray(new Array());
+
+		for (n in this.rules) {
+			if (this.rules[n])
+				this.vElements[this.vElements.length] = this.rules[n].tag;
+		}
+
+		this.vElementsRe = this._arrayToRe(this.vElements, '');
+	},
+
+	parseRuleStr : function(s) {
+		var ta, p, r, a, i, x, px, t, tn, y, av, or = tinyMCE.clearArray(new Array()), dv;
+
+		if (s == null || s.length == 0)
+			return or;
+
+		ta = s.split(',');
+		for (x=0; x<ta.length; x++) {
+			s = ta[x];
+			if (s.length == 0)
+				continue;
+
+			// Split tag/attrs
+			p = this.split(/\[|\]/, s);
+			if (p == null || p.length < 1)
+				t = s.toUpperCase();
+			else
+				t = p[0].toUpperCase();
+
+			// Handle all tag names
+			tn = this.split('/', t);
+			for (y=0; y<tn.length; y++) {
+				r = {};
+
+				r.tag = tn[y];
+				r.forceAttribs = null;
+				r.defaultAttribs = null;
+				r.validAttribValues = null;
+
+				// Handle prefixes
+				px = r.tag.charAt(0);
+				r.forceOpen = px == '+';
+				r.removeEmpty = px == '-';
+				r.fill = px == '#';
+				r.tag = r.tag.replace(/\+|-|#/g, '');
+				r.oTagName = tn[0].replace(/\+|-|#/g, '').toLowerCase();
+				r.isWild = new RegExp('\\*|\\?|\\+', 'g').test(r.tag);
+				r.validRe = new RegExp(this._wildcardToRe('^' + r.tag + '$'));
+
+				// Setup valid attributes
+				if (p.length > 1) {
+					r.vAttribsRe = '^(';
+					a = this.split(/\|/, p[1]);
+
+					for (i=0; i<a.length; i++) {
+						t = a[i];
+
+						av = new RegExp('(=|:|<)(.*?)$').exec(t);
+						t = t.replace(new RegExp('(=|:|<).*?$'), '');
+						if (av && av.length > 0) {
+							if (av[0].charAt(0) == ':') {
+								if (!r.forceAttribs)
+									r.forceAttribs = tinyMCE.clearArray(new Array());
+
+								r.forceAttribs[t.toLowerCase()] = av[0].substring(1);
+							} else if (av[0].charAt(0) == '=') {
+								if (!r.defaultAttribs)
+									r.defaultAttribs = tinyMCE.clearArray(new Array());
+
+								dv = av[0].substring(1);
+
+								r.defaultAttribs[t.toLowerCase()] = dv == "" ? "mce_empty" : dv;
+							} else if (av[0].charAt(0) == '<') {
+								if (!r.validAttribValues)
+									r.validAttribValues = tinyMCE.clearArray(new Array());
+
+								r.validAttribValues[t.toLowerCase()] = this._arrayToRe(this.split('?', av[0].substring(1)), '');
+							}
+						}
+
+						r.vAttribsRe += '' + t.toLowerCase() + (i != a.length - 1 ? '|' : '');
+
+						a[i] = t.toLowerCase();
+					}
+
+					r.vAttribsRe += ')$';
+					r.vAttribsRe = this._wildcardToRe(r.vAttribsRe);
+					r.vAttribsReIsWild = new RegExp('\\*|\\?|\\+', 'g').test(r.vAttribsRe);
+					r.vAttribsRe = new RegExp(r.vAttribsRe);
+					r.vAttribs = a.reverse();
+
+					//tinyMCE.debug(r.tag, r.oTagName, r.vAttribsRe, r.vAttribsReWC);
+				} else {
+					r.vAttribsRe = '';
+					r.vAttribs = tinyMCE.clearArray(new Array());
+					r.vAttribsReIsWild = false;
+				}
+
+				or[r.tag] = r;
+			}
+		}
+
+		return or;
+	},
+
+	serializeNodeAsXML : function(n) {
+		var s, b;
+
+		if (!this.xmlDoc) {
+			if (this.isMSIE) {
+				try {this.xmlDoc = new ActiveXObject('MSXML2.DOMDocument');} catch (e) {}
+
+				if (!this.xmlDoc)
+					try {this.xmlDoc = new ActiveXObject('Microsoft.XmlDom');} catch (e) {}
+			} else
+				this.xmlDoc = document.implementation.createDocument('', '', null);
+
+			if (!this.xmlDoc)
+				alert("Error XML Parser could not be found.");
+		}
+
+		if (this.xmlDoc.firstChild)
+			this.xmlDoc.removeChild(this.xmlDoc.firstChild);
+
+		b = this.xmlDoc.createElement("html");
+		b = this.xmlDoc.appendChild(b);
+
+		this._convertToXML(n, b);
+
+		if (this.isMSIE)
+			return this.xmlDoc.xml;
+		else
+			return new XMLSerializer().serializeToString(this.xmlDoc);
+	},
+
+	_convertToXML : function(n, xn) {
+		var xd, el, i, l, cn, at, no, hc = false;
+
+		if (this._isDuplicate(n))
+			return;
+
+		xd = this.xmlDoc;
+
+		switch (n.nodeType) {
+			case 1: // Element
+				hc = n.hasChildNodes();
+
+				el = xd.createElement(n.nodeName.toLowerCase());
+
+				at = n.attributes;
+				for (i=at.length-1; i>-1; i--) {
+					no = at[i];
+
+					if (no.specified && no.nodeValue)
+						el.setAttribute(no.nodeName.toLowerCase(), no.nodeValue);
+				}
+
+				if (!hc && !this.closeElementsRe.test(n.nodeName))
+					el.appendChild(xd.createTextNode(""));
+
+				xn = xn.appendChild(el);
+				break;
+
+			case 3: // Text
+				xn.appendChild(xd.createTextNode(n.nodeValue));
+				return;
+
+			case 8: // Comment
+				xn.appendChild(xd.createComment(n.nodeValue));
+				return;
+		}
+
+		if (hc) {
+			cn = n.childNodes;
+
+			for (i=0, l=cn.length; i<l; i++)
+				this._convertToXML(cn[i], xn);
+		}
+	},
+
+	serializeNodeAsHTML : function(n) {
+		var en, no, h = '', i, l, r, cn, va = false, f = false, at, hc;
+
+		this._setupRules(); // Will initialize cleanup rules
+
+		if (this._isDuplicate(n))
+			return '';
+
+		switch (n.nodeType) {
+			case 1: // Element
+				hc = n.hasChildNodes();
+
+				// MSIE sometimes produces <//tag>
+				if ((tinyMCE.isMSIE && !tinyMCE.isOpera) && n.nodeName.indexOf('/') != -1)
+					break;
+
+				if (this.vElementsRe.test(n.nodeName) && (!this.iveRe || !this.iveRe.test(n.nodeName))) {
+					va = true;
+
+					r = this.rules[n.nodeName];
+					if (!r) {
+						at = this.rules;
+						for (no in at) {
+							if (at[no] && at[no].validRe.test(n.nodeName)) {
+								r = at[no];
+								break;
+							}
+						}
+					}
+
+					en = r.isWild ? n.nodeName.toLowerCase() : r.oTagName;
+					f = r.fill;
+
+					if (r.removeEmpty && !hc)
+						return "";
+
+					h += '<' + en;
+
+					if (r.vAttribsReIsWild) {
+						// Serialize wildcard attributes
+						at = n.attributes;
+						for (i=at.length-1; i>-1; i--) {
+							no = at[i];
+							if (no.specified && r.vAttribsRe.test(no.nodeName))
+								h += this._serializeAttribute(n, r, no.nodeName);
+						}
+					} else {
+						// Serialize specific attributes
+						for (i=r.vAttribs.length-1; i>-1; i--)
+							h += this._serializeAttribute(n, r, r.vAttribs[i]);
+					}
+
+					// Serialize mce_ atts
+					if (!this.settings.on_save) {
+						at = this.mceAttribs;
+
+						for (no in at) {
+							if (at[no])
+								h += this._serializeAttribute(n, r, at[no]);
+						}
+					}
+
+					// Close these
+					if (this.closeElementsRe.test(n.nodeName))
+						return h + ' />';
+
+					h += '>';
+
+					if (this.isMSIE && this.codeElementsRe.test(n.nodeName))
+						h += n.innerHTML;
+				}
+			break;
+
+			case 3: // Text
+				if (n.parentNode && this.codeElementsRe.test(n.parentNode.nodeName))
+					return this.isMSIE ? '' : n.nodeValue;
+
+				return this.xmlEncode(n.nodeValue);
+
+			case 8: // Comment
+				return "<!--" + this._trimComment(n.nodeValue) + "-->";
+		}
+
+		if (hc) {
+			cn = n.childNodes;
+
+			for (i=0, l=cn.length; i<l; i++)
+				h += this.serializeNodeAsHTML(cn[i]);
+		}
+
+		// Fill empty nodes
+		if (f && !hc)
+			h += this.fillStr;
+
+		// End element
+		if (va)
+			h += '</' + en + '>';
+
+		return h;
+	},
+
+	_serializeAttribute : function(n, r, an) {
+		var av = '', t, os = this.settings.on_save;
+
+		if (os && (an.indexOf('mce_') == 0 || an.indexOf('_moz') == 0))
+			return '';
+
+		if (os && this.mceAttribs[an])
+			av = this._getAttrib(n, this.mceAttribs[an]);
+
+		if (av.length == 0)
+			av = this._getAttrib(n, an);
+
+		if (av.length == 0 && r.defaultAttribs && (t = r.defaultAttribs[an])) {
+			av = t;
+
+			if (av == "mce_empty")
+				return " " + an + '=""';
+		}
+
+		if (r.forceAttribs && (t = r.forceAttribs[an]))
+			av = t;
+
+		if (os && av.length != 0 && this.settings.url_converter.length != 0 && /^(src|href|longdesc)$/.test(an))
+			av = eval(this.settings.url_converter + '(this, n, av)');
+
+		if (av.length != 0 && r.validAttribValues && r.validAttribValues[an] && !r.validAttribValues[an].test(av))
+			return "";
+
+		if (av.length != 0 && av == "{$uid}")
+			av = "uid_" + (this.idCount++);
+
+		if (av.length != 0)
+			return " " + an + "=" + '"' + this.xmlEncode(av) + '"';
+
+		return "";
+	},
+
+	formatHTML : function(h) {
+		var s = this.settings, p = '', i = 0, li = 0, o = '', l;
+
+		h = h.replace(/\r/g, ''); // Windows sux, isn't carriage return a thing of the past :)
+		h = '\n' + h;
+		h = h.replace(new RegExp('\\n\\s+', 'gi'), '\n'); // Remove previous formatting
+		h = h.replace(this.nlBeforeRe, '\n<$1$2>');
+		h = h.replace(this.nlAfterRe, '<$1$2>\n');
+		h = h.replace(this.nlBeforeAfterRe, '\n<$1$2$3>\n');
+		h += '\n';
+
+		//tinyMCE.debug(h);
+
+		while ((i = h.indexOf('\n', i + 1)) != -1) {
+			if ((l = h.substring(li + 1, i)).length != 0) {
+				if (this.ouRe.test(l) && p.length >= s.indent_levels)
+					p = p.substring(s.indent_levels);
+
+				o += p + l + '\n';
+	
+				if (this.inRe.test(l))
+					p += this.inStr;
+			}
+
+			li = i;
+		}
+
+		//tinyMCE.debug(h);
+
+		return o;
+	},
+
+	xmlEncode : function(s) {
+		var i, l, e, o = '', c;
+
+		this._setupEntities(); // Will intialize lookup table
+
+		switch (this.settings.entity_encoding) {
+			case "raw":
+				return tinyMCE.xmlEncode(s);
+
+			case "named":
+				for (i=0, l=s.length; i<l; i++) {
+					c = s.charCodeAt(i);
+					e = this.entities[c];
+
+					if (e && e != '')
+						o += '&' + e + ';';
+					else
+						o += String.fromCharCode(c);
+				}
+
+				return o;
+
+			case "numeric":
+				for (i=0, l=s.length; i<l; i++) {
+					c = s.charCodeAt(i);
+
+					if (c > 127 || c == 60 || c == 62 || c == 38 || c == 39 || c == 34)
+						o += '&#' + c + ";";
+					else
+						o += String.fromCharCode(c);
+				}
+
+				return o;
+		}
+
+		return s;
+	},
+
+	split : function(re, s) {
+		var c = s.split(re);
+		var i, l, o = new Array();
+
+		for (i=0, l=c.length; i<l; i++) {
+			if (c[i] != '')
+				o[i] = c[i];
+		}
+
+		return o;
+	},
+
+	_trimComment : function(s) {
+		// Remove mce_src, mce_href
+		s = s.replace(new RegExp('\\smce_src=\"[^\"]*\"', 'gi'), "");
+		s = s.replace(new RegExp('\\smce_href=\"[^\"]*\"', 'gi'), "");
+
+		return s;
+	},
+
+	_getAttrib : function(e, n, d) {
+		if (typeof(d) == "undefined")
+			d = "";
+
+		if (!e || e.nodeType != 1)
+			return d;
+
+		var v = e.getAttribute(n, 0);
+
+		if (n == "class" && !v)
+			v = e.className;
+
+		if (this.isMSIE && n == "http-equiv")
+			v = e.httpEquiv;
+
+		if (this.isMSIE && e.nodeName == "FORM" && n == "enctype" && v == "application/x-www-form-urlencoded")
+			v = "";
+
+		if (this.isMSIE && e.nodeName == "INPUT" && n == "size" && v == "20")
+			v = "";
+
+		if (this.isMSIE && e.nodeName == "INPUT" && n == "maxlength" && v == "2147483647")
+			v = "";
+
+		if (n == "style" && !tinyMCE.isOpera)
+			v = e.style.cssText;
+
+		if (n == 'style')
+			v = tinyMCE.serializeStyle(tinyMCE.parseStyle(v));
+
+		if (this.settings.on_save && n.indexOf('on') != -1 && this.settings.on_save && v && v != "")
+			v = tinyMCE.cleanupEventStr(v);
+
+		return (v && v != "") ? '' + v : d;
+	},
+
+	_urlConverter : function(c, n, v) {
+		if (!c.settings.on_save)
+			return tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings.base_href, v);
+		else if (tinyMCE.getParam('convert_urls'))
+			return eval(tinyMCE.settings.urlconverter_callback + "(v, n, true);");
+
+		return v;
+	},
+
+	_arrayToRe : function(a, op, be, af) {
+		var i, r;
+
+		op = typeof(op) == "undefined" ? "gi" : op;
+		be = typeof(be) == "undefined" ? "^(" : be;
+		af = typeof(af) == "undefined" ? ")$" : af;
+
+		r = be;
+
+		for (i=0; i<a.length; i++)
+			r += this._wildcardToRe(a[i]) + (i != a.length-1 ? "|" : "");
+
+		r += af;
+
+		return new RegExp(r, op);
+	},
+
+	_wildcardToRe : function(s) {
+		s = s.replace(/\?/g, '(\\S?)');
+		s = s.replace(/\+/g, '(\\S+)');
+		s = s.replace(/\*/g, '(\\S*)');
+
+		return s;
+	},
+
+	_setupEntities : function() {
+		var n, a, i, s = this.settings;
+
+		// Setup entities
+		if (!this.entitiesDone) {
+			if (s.entity_encoding == "named") {
+				n = tinyMCE.clearArray(new Array());
+				a = this.split(',', s.entities);
+				for (i=0; i<a.length; i+=2)
+					n[a[i]] = a[i+1];
+
+				this.entities = n;
+			}
+
+			this.entitiesDone = true;
+		}
+	},
+
+	_setupRules : function() {
+		var s = this.settings;
+
+		// Setup default rule
+		if (!this.rulesDone) {
+			this.addRuleStr(s.valid_elements);
+			this.addRuleStr(s.extended_valid_elements);
+
+			this.rulesDone = true;
+		}
+	},
+
+	_isDuplicate : function(n) {
+		var i;
+
+		if (!this.settings.fix_content_duplication)
+			return false;
+
+		if (tinyMCE.isMSIE && !tinyMCE.isOpera && n.nodeType == 1) {
+			// Mark elements
+			if (n.mce_serialized == this.serializationId)
+				return true;
+
+			n.setAttribute('mce_serialized', this.serializationId);
+		} else {
+			// Search lookup table for text nodes  and comments
+			for (i=0; i<this.serializedNodes.length; i++) {
+				if (this.serializedNodes[i] == n)
+					return true;
+			}
+
+			this.serializedNodes[this.serializedNodes.length] = n;
+		}
+
+		return false;
+	}
+};
+
+/* file:jscripts/tiny_mce/classes/TinyMCE_DOMUtils.class.js */
+
+TinyMCE_Engine.prototype.getElementByAttributeValue = function(n, e, a, v) {
+	return (n = this.getElementsByAttributeValue(n, e, a, v)).length == 0 ? null : n[0];
+};
+
+TinyMCE_Engine.prototype.getElementsByAttributeValue = function(n, e, a, v) {
+	var i, nl = n.getElementsByTagName(e), o = new Array();
+
+	for (i=0; i<nl.length; i++) {
+		if (tinyMCE.getAttrib(nl[i], a).indexOf(v) != -1)
+			o[o.length] = nl[i];
+	}
+
+	return o;
+};
+
+TinyMCE_Engine.prototype.isBlockElement = function(n) {
+	return n != null && n.nodeType == 1 && this.blockRegExp.test(n.nodeName);
+};
+
+TinyMCE_Engine.prototype.getParentBlockElement = function(n) {
+	while (n) {
+		if (this.isBlockElement(n))
+			return n;
+
+		n = n.parentNode;
+	}
+
+	return null;
+};
+
+TinyMCE_Engine.prototype.insertAfter = function(n, r){
+	if (r.nextSibling)
+		r.parentNode.insertBefore(n, r.nextSibling);
+	else
+		r.parentNode.appendChild(n);
+};
+
+TinyMCE_Engine.prototype.setInnerHTML = function(e, h) {
+	var i, nl, n;
+
+	if (tinyMCE.isMSIE && !tinyMCE.isOpera) {
+		// Since MSIE handles invalid HTML better that valid XHTML we
+		// need to make some things invalid. <hr /> gets converted to <hr>.
+		h = h.replace(/\s\/>/g, '>');
+
+		// Since MSIE auto generated emtpy P tags some times we must tell it to keep the real ones
+		h = h.replace(/<p([^>]*)>\u00A0?<\/p>/gi, '<p$1 mce_keep="true">&nbsp;</p>'); // Keep empty paragraphs
+		h = h.replace(/<p([^>]*)>\s*&nbsp;\s*<\/p>/gi, '<p$1 mce_keep="true">&nbsp;</p>'); // Keep empty paragraphs
+		h = h.replace(/<p([^>]*)>\s+<\/p>/gi, '<p$1 mce_keep="true">&nbsp;</p>'); // Keep empty paragraphs
+
+		// Remove first comment
+		e.innerHTML = tinyMCE.uniqueTag + h;
+		e.firstChild.removeNode(true);
+
+		// Remove weird auto generated empty paragraphs unless it's supposed to be there
+		nl = e.getElementsByTagName("p");
+		for (i=nl.length-1; i>=0; i--) {
+			n = nl[i];
+
+			if (n.nodeName == 'P' && !n.hasChildNodes() && !n.mce_keep)
+				n.parentNode.removeChild(n);
+		}
+	} else {
+		h = this.fixGeckoBaseHREFBug(1, e, h);
+		e.innerHTML = h;
+		this.fixGeckoBaseHREFBug(2, e, h);
+	}
+};
+
+TinyMCE_Engine.prototype.getOuterHTML = function(e) {
+	if (tinyMCE.isMSIE)
+		return e.outerHTML;
+
+	var d = e.ownerDocument.createElement("body");
+	d.appendChild(e);
+	return d.innerHTML;
+};
+
+TinyMCE_Engine.prototype.setOuterHTML = function(e, h) {
+	if (tinyMCE.isMSIE) {
+		e.outerHTML = h;
+		return;
+	}
+
+	var d = e.ownerDocument.createElement("body");
+	d.innerHTML = h;
+	e.parentNode.replaceChild(d.firstChild, e);
+};
+
+TinyMCE_Engine.prototype._getElementById = function(id, d) {
+	var e, i, j, f;
+
+	if (typeof(d) == "undefined")
+		d = document;
+
+	e = d.getElementById(id);
+	if (!e) {
+		f = d.forms;
+
+		for (i=0; i<f.length; i++) {
+			for (j=0; j<f[i].elements.length; j++) {
+				if (f[i].elements[j].name == id) {
+					e = f[i].elements[j];
+					break;
+				}
+			}
+		}
+	}
+
+	return e;
+};
+
+TinyMCE_Engine.prototype.getNodeTree = function(n, na, t, nn) {
+	var i;
+
+	if (typeof(t) == "undefined" || n.nodeType == t && (typeof(nn) == "undefined" || n.nodeName == nn))
+		na[na.length] = n;
+
+	if (n.hasChildNodes()) {
+		for (i=0; i<n.childNodes.length; i++)
+			tinyMCE.getNodeTree(n.childNodes[i], na, t, nn);
+	}
+
+	return na;
+};
+
+TinyMCE_Engine.prototype.getParentElement = function(node, names, attrib_name, attrib_value) {
+	if (typeof(names) == "undefined") {
+		if (node.nodeType == 1)
+			return node;
+
+		// Find parent node that is a element
+		while ((node = node.parentNode) != null && node.nodeType != 1) ;
+
+		return node;
+	}
+
+	if (node == null)
+		return null;
+
+	var namesAr = names.toUpperCase().split(',');
+
+	do {
+		for (var i=0; i<namesAr.length; i++) {
+			if (node.nodeName == namesAr[i] || names == "*") {
+				if (typeof(attrib_name) == "undefined")
+					return node;
+				else if (node.getAttribute(attrib_name)) {
+					if (typeof(attrib_value) == "undefined") {
+						if (node.getAttribute(attrib_name) != "")
+							return node;
+					} else if (node.getAttribute(attrib_name) == attrib_value)
+						return node;
+				}
+			}
+		}
+	} while ((node = node.parentNode) != null);
+
+	return null;
+};
+
+TinyMCE_Engine.prototype.getParentNode = function(n, f) {
+	while (n) {
+		if (f(n))
+			return n;
+
+		n = n.parentNode;
+	}
+
+	return null;
+};
+
+TinyMCE_Engine.prototype.getAttrib = function(elm, name, default_value) {
+	if (typeof(default_value) == "undefined")
+		default_value = "";
+
+	// Not a element
+	if (!elm || elm.nodeType != 1)
+		return default_value;
+
+	var v = elm.getAttribute(name);
+
+	// Try className for class attrib
+	if (name == "class" && !v)
+		v = elm.className;
+
+	// Workaround for a issue with Firefox 1.5rc2+
+	if (tinyMCE.isGecko && name == "src" && elm.src != null && elm.src != "")
+		v = elm.src;
+
+	// Workaround for a issue with Firefox 1.5rc2+
+	if (tinyMCE.isGecko && name == "href" && elm.href != null && elm.href != "")
+		v = elm.href;
+
+	if (name == "http-equiv" && tinyMCE.isMSIE)
+		v = elm.httpEquiv;
+
+	if (name == "style" && !tinyMCE.isOpera)
+		v = elm.style.cssText;
+
+	return (v && v != "") ? v : default_value;
+};
+
+TinyMCE_Engine.prototype.setAttrib = function(element, name, value, fix_value) {
+	if (typeof(value) == "number" && value != null)
+		value = "" + value;
+
+	if (fix_value) {
+		if (value == null)
+			value = "";
+
+		var re = new RegExp('[^0-9%]', 'g');
+		value = value.replace(re, '');
+	}
+
+	if (name == "style")
+		element.style.cssText = value;
+
+	if (name == "class")
+		element.className = value;
+
+	if (value != null && value != "" && value != -1)
+		element.setAttribute(name, value);
+	else
+		element.removeAttribute(name);
+};
+
+TinyMCE_Engine.prototype.setStyleAttrib = function(elm, name, value) {
+	eval('elm.style.' + name + '=value;');
+
+	// Style attrib deleted
+	if (tinyMCE.isMSIE && value == null || value == '') {
+		var str = tinyMCE.serializeStyle(tinyMCE.parseStyle(elm.style.cssText));
+		elm.style.cssText = str;
+		elm.setAttribute("style", str);
+	}
+};
+
+TinyMCE_Engine.prototype.switchClass = function(ei, c) {
+	var e;
+
+	if (tinyMCE.switchClassCache[ei])
+		e = tinyMCE.switchClassCache[ei];
+	else
+		e = tinyMCE.switchClassCache[ei] = document.getElementById(ei);
+
+	if (e) {
+		// Keep tile mode
+		if (tinyMCE.settings.button_tile_map && e.className && e.className.indexOf('mceTiledButton') == 0)
+			c = 'mceTiledButton ' + c;
+
+		e.className = c;
+	}
+};
+
+TinyMCE_Engine.prototype.getAbsPosition = function(n) {
+	var p = {absLeft : 0, absTop : 0};
+
+	while (n) {
+		p.absLeft += n.offsetLeft;
+		p.absTop += n.offsetTop;
+		n = n.offsetParent;
+	}
+
+	return p;
+};
+
+TinyMCE_Engine.prototype.prevNode = function(e, n) {
+	var a = n.split(','), i;
+
+	while ((e = e.previousSibling) != null) {
+		for (i=0; i<a.length; i++) {
+			if (e.nodeName == a[i])
+				return e;
+		}
+	}
+
+	return null;
+};
+
+TinyMCE_Engine.prototype.nextNode = function(e, n) {
+	var a = n.split(','), i;
+
+	while ((e = e.nextSibling) != null) {
+		for (i=0; i<a.length; i++) {
+			if (e.nodeName == a[i])
+				return e;
+		}
+	}
+
+	return null;
+};
+
+TinyMCE_Engine.prototype.selectNodes = function(n, f, a) {
+	var i;
+
+	if (!a)
+		a = new Array();
+
+	if (f(n))
+		a[a.length] = n;
+
+	if (n.hasChildNodes()) {
+		for (i=0; i<n.childNodes.length; i++)
+			tinyMCE.selectNodes(n.childNodes[i], f, a);
+	}
+
+	return a;
+};
+
+TinyMCE_Engine.prototype.addCSSClass = function(e, c, b) {
+	var o = this.removeCSSClass(e, c);
+
+	return e.className = b ? c + (o != '' ? (' ' + o) : '') : (o != '' ? (o + ' ') : '') + c;
+};
+
+TinyMCE_Engine.prototype.removeCSSClass = function(e, c) {
+	var a = this.explode(' ', e.className), i;
+
+	for (i=0; i<a.length; i++) {
+		if (a[i] == c)
+			a[i] = '';
+	}
+
+	return e.className = a.join(' ');
+};
+
+TinyMCE_Engine.prototype.renameElement = function(e, n, d) {
+	var ne, i, ar;
+
+	d = typeof(d) == "undefined" ? tinyMCE.selectedInstance.getDoc() : d;
+
+	if (e) {
+		ne = d.createElement(n);
+
+		ar = e.attributes;
+		for (i=ar.length-1; i>-1; i--) {
+			if (ar[i].specified && ar[i].nodeValue)
+				ne.setAttribute(ar[i].nodeName.toLowerCase(), ar[i].nodeValue);
+		}
+
+		ar = e.childNodes;
+		for (i=0; i<ar.length; i++)
+			ne.appendChild(ar[i].cloneNode(true));
+
+		e.parentNode.replaceChild(ne, e);
+	}
+};
+
+/* file:jscripts/tiny_mce/classes/TinyMCE_URL.class.js */
+
+TinyMCE_Engine.prototype.parseURL = function(url_str) {
+	var urlParts = new Array();
+
+	if (url_str) {
+		var pos, lastPos;
+
+		// Parse protocol part
+		pos = url_str.indexOf('://');
+		if (pos != -1) {
+			urlParts['protocol'] = url_str.substring(0, pos);
+			lastPos = pos + 3;
+		}
+
+		// Find port or path start
+		for (var i=lastPos; i<url_str.length; i++) {
+			var chr = url_str.charAt(i);
+
+			if (chr == ':')
+				break;
+
+			if (chr == '/')
+				break;
+		}
+		pos = i;
+
+		// Get host
+		urlParts['host'] = url_str.substring(lastPos, pos);
+
+		// Get port
+		urlParts['port'] = "";
+		lastPos = pos;
+		if (url_str.charAt(pos) == ':') {
+			pos = url_str.indexOf('/', lastPos);
+			urlParts['port'] = url_str.substring(lastPos+1, pos);
+		}
+
+		// Get path
+		lastPos = pos;
+		pos = url_str.indexOf('?', lastPos);
+
+		if (pos == -1)
+			pos = url_str.indexOf('#', lastPos);
+
+		if (pos == -1)
+			pos = url_str.length;
+
+		urlParts['path'] = url_str.substring(lastPos, pos);
+
+		// Get query
+		lastPos = pos;
+		if (url_str.charAt(pos) == '?') {
+			pos = url_str.indexOf('#');
+			pos = (pos == -1) ? url_str.length : pos;
+			urlParts['query'] = url_str.substring(lastPos+1, pos);
+		}
+
+		// Get anchor
+		lastPos = pos;
+		if (url_str.charAt(pos) == '#') {
+			pos = url_str.length;
+			urlParts['anchor'] = url_str.substring(lastPos+1, pos);
+		}
+	}
+
+	return urlParts;
+};
+
+TinyMCE_Engine.prototype.serializeURL = function(up) {
+	var o = "";
+
+	if (up['protocol'])
+		o += up['protocol'] + "://";
+
+	if (up['host'])
+		o += up['host'];
+
+	if (up['port'])
+		o += ":" + up['port'];
+
+	if (up['path'])
+		o += up['path'];
+
+	if (up['query'])
+		o += "?" + up['query'];
+
+	if (up['anchor'])
+		o += "#" + up['anchor'];
+
+	return o;
+};
+
+TinyMCE_Engine.prototype.convertAbsoluteURLToRelativeURL = function(base_url, url_to_relative) {
+	var baseURL = this.parseURL(base_url);
+	var targetURL = this.parseURL(url_to_relative);
+	var strTok1;
+	var strTok2;
+	var breakPoint = 0;
+	var outPath = "";
+	var forceSlash = false;
+
+	if (targetURL.path == "")
+		targetURL.path = "/";
+	else
+		forceSlash = true;
+
+	// Crop away last path part
+	base_url = baseURL.path.substring(0, baseURL.path.lastIndexOf('/'));
+	strTok1 = base_url.split('/');
+	strTok2 = targetURL.path.split('/');
+
+	if (strTok1.length >= strTok2.length) {
+		for (var i=0; i<strTok1.length; i++) {
+			if (i >= strTok2.length || strTok1[i] != strTok2[i]) {
+				breakPoint = i + 1;
+				break;
+			}
+		}
+	}
+
+	if (strTok1.length < strTok2.length) {
+		for (var i=0; i<strTok2.length; i++) {
+			if (i >= strTok1.length || strTok1[i] != strTok2[i]) {
+				breakPoint = i + 1;
+				break;
+			}
+		}
+	}
+
+	if (breakPoint == 1)
+		return targetURL.path;
+
+	for (var i=0; i<(strTok1.length-(breakPoint-1)); i++)
+		outPath += "../";
+
+	for (var i=breakPoint-1; i<strTok2.length; i++) {
+		if (i != (breakPoint-1))
+			outPath += "/" + strTok2[i];
+		else
+			outPath += strTok2[i];
+	}
+
+	targetURL.protocol = null;
+	targetURL.host = null;
+	targetURL.port = null;
+	targetURL.path = outPath == "" && forceSlash ? "/" : outPath;
+
+	// Remove document prefix from local anchors
+	var fileName = baseURL.path;
+	var pos;
+
+	if ((pos = fileName.lastIndexOf('/')) != -1)
+		fileName = fileName.substring(pos + 1);
+
+	// Is local anchor
+	if (fileName == targetURL.path && targetURL.anchor != "")
+		targetURL.path = "";
+
+	// If empty and not local anchor force filename or slash
+	if (targetURL.path == "" && !targetURL.anchor)
+		targetURL.path = fileName != "" ? fileName : "/";
+
+	return this.serializeURL(targetURL);
+};
+
+TinyMCE_Engine.prototype.convertRelativeToAbsoluteURL = function(base_url, relative_url) {
+	var baseURL = this.parseURL(base_url);
+	var relURL = this.parseURL(relative_url);
+
+	if (relative_url == "" || relative_url.charAt(0) == '/' || relative_url.indexOf('://') != -1 || relative_url.indexOf('mailto:') != -1 || relative_url.indexOf('javascript:') != -1)
+		return relative_url;
+
+	// Split parts
+	baseURLParts = baseURL['path'].split('/');
+	relURLParts = relURL['path'].split('/');
+
+	// Remove empty chunks
+	var newBaseURLParts = new Array();
+	for (var i=baseURLParts.length-1; i>=0; i--) {
+		if (baseURLParts[i].length == 0)
+			continue;
+
+		newBaseURLParts[newBaseURLParts.length] = baseURLParts[i];
+	}
+	baseURLParts = newBaseURLParts.reverse();
+
+	// Merge relURLParts chunks
+	var newRelURLParts = new Array();
+	var numBack = 0;
+	for (var i=relURLParts.length-1; i>=0; i--) {
+		if (relURLParts[i].length == 0 || relURLParts[i] == ".")
+			continue;
+
+		if (relURLParts[i] == '..') {
+			numBack++;
+			continue;
+		}
+
+		if (numBack > 0) {
+			numBack--;
+			continue;
+		}
+
+		newRelURLParts[newRelURLParts.length] = relURLParts[i];
+	}
+
+	relURLParts = newRelURLParts.reverse();
+
+	// Remove end from absolute path
+	var len = baseURLParts.length-numBack;
+	var absPath = (len <= 0 ? "" : "/") + baseURLParts.slice(0, len).join('/') + "/" + relURLParts.join('/');
+	var start = "", end = "";
+
+	// Build output URL
+	relURL.protocol = baseURL.protocol;
+	relURL.host = baseURL.host;
+	relURL.port = baseURL.port;
+
+	// Re-add trailing slash if it's removed
+	if (relURL.path.charAt(relURL.path.length-1) == "/")
+		absPath += "/";
+
+	relURL.path = absPath;
+
+	return this.serializeURL(relURL);
+};
+
+TinyMCE_Engine.prototype.convertURL = function(url, node, on_save) {
+	var prot = document.location.protocol;
+	var host = document.location.hostname;
+	var port = document.location.port;
+
+	// Pass through file protocol
+	if (prot == "file:")
+		return url;
+
+	// Something is wrong, remove weirdness
+	url = tinyMCE.regexpReplace(url, '(http|https):///', '/');
+
+	// Mailto link or anchor (Pass through)
+	if (url.indexOf('mailto:') != -1 || url.indexOf('javascript:') != -1 || tinyMCE.regexpReplace(url,'[ \t\r\n\+]|%20','').charAt(0) == "#")
+		return url;
+
+	// Fix relative/Mozilla
+	if (!tinyMCE.isMSIE && !on_save && url.indexOf("://") == -1 && url.charAt(0) != '/')
+		return tinyMCE.settings['base_href'] + url;
+
+	// Handle relative URLs
+	if (on_save && tinyMCE.getParam('relative_urls')) {
+		var curl = tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'], url);
+		if (curl.charAt(0) == '/')
+			curl = tinyMCE.settings['document_base_prefix'] + curl;
+
+		var urlParts = tinyMCE.parseURL(curl);
+		var tmpUrlParts = tinyMCE.parseURL(tinyMCE.settings['document_base_url']);
+
+		// Force relative
+		if (urlParts['host'] == tmpUrlParts['host'] && (urlParts['port'] == tmpUrlParts['port']))
+			return tinyMCE.convertAbsoluteURLToRelativeURL(tinyMCE.settings['document_base_url'], curl);
+	}
+
+	// Handle absolute URLs
+	if (!tinyMCE.getParam('relative_urls')) {
+		var urlParts = tinyMCE.parseURL(url);
+		var baseUrlParts = tinyMCE.parseURL(tinyMCE.settings['base_href']);
+
+		// Force absolute URLs from relative URLs
+		url = tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'], url);
+
+		// If anchor and path is the same page
+		if (urlParts['anchor'] && urlParts['path'] == baseUrlParts['path'])
+			return "#" + urlParts['anchor'];
+	}
+
+	// Remove current domain
+	if (tinyMCE.getParam('remove_script_host')) {
+		var start = "", portPart = "";
+
+		if (port != "")
+			portPart = ":" + port;
+
+		start = prot + "//" + host + portPart + "/";
+
+		if (url.indexOf(start) == 0)
+			url = url.substring(start.length-1);
+	}
+
+	return url;
+};
+
+TinyMCE_Engine.prototype.convertAllRelativeURLs = function(body) {
+	// Convert all image URL:s to absolute URL
+	var elms = body.getElementsByTagName("img");
+	for (var i=0; i<elms.length; i++) {
+		var src = tinyMCE.getAttrib(elms[i], 'src');
+
+		var msrc = tinyMCE.getAttrib(elms[i], 'mce_src');
+		if (msrc != "")
+			src = msrc;
+
+		if (src != "") {
+			src = tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'], src);
+			elms[i].setAttribute("src", src);
+		}
+	}
+
+	// Convert all link URL:s to absolute URL
+	var elms = body.getElementsByTagName("a");
+	for (var i=0; i<elms.length; i++) {
+		var href = tinyMCE.getAttrib(elms[i], 'href');
+
+		var mhref = tinyMCE.getAttrib(elms[i], 'mce_href');
+		if (mhref != "")
+			href = mhref;
+
+		if (href && href != "") {
+			href = tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'], href);
+			elms[i].setAttribute("href", href);
+		}
+	}
+};
+
+/* file:jscripts/tiny_mce/classes/TinyMCE_Array.class.js */
+
+TinyMCE_Engine.prototype.clearArray = function(a) {
+	for (var k in a)
+		a[k] = null;
+
+	return a;
+};
+
+/* file:jscripts/tiny_mce/classes/TinyMCE_Event.class.js */
+
+TinyMCE_Engine.prototype._setEventsEnabled = function(node, state) {
+	var events = new Array('onfocus','onblur','onclick','ondblclick',
+				'onmousedown','onmouseup','onmouseover','onmousemove',
+				'onmouseout','onkeypress','onkeydown','onkeydown','onkeyup');
+
+	var evs = tinyMCE.settings['event_elements'].split(',');
+	for (var y=0; y<evs.length; y++){
+		var elms = node.getElementsByTagName(evs[y]);
+		for (var i=0; i<elms.length; i++) {
+			var event = "";
+
+			for (var x=0; x<events.length; x++) {
+				if ((event = tinyMCE.getAttrib(elms[i], events[x])) != '') {
+					event = tinyMCE.cleanupEventStr("" + event);
+
+					if (!state)
+						event = "return true;" + event;
+					else
+						event = event.replace(/^return true;/gi, '');
+
+					elms[i].removeAttribute(events[x]);
+					elms[i].setAttribute(events[x], event);
+				}
+			}
+		}
+	}
+};
+
+TinyMCE_Engine.prototype._eventPatch = function(editor_id) {
+	var n, inst, win, e;
+
+	// Remove odd, error
+	if (typeof(tinyMCE) == "undefined")
+		return true;
+
+	try {
+		// Try selected instance first
+		if (tinyMCE.selectedInstance) {
+			win = tinyMCE.selectedInstance.getWin();
+
+			if (win && win.event) {
+				e = win.event;
+
+				if (!e.target)
+					e.target = e.srcElement;
+
+				TinyMCE_Engine.prototype.handleEvent(e);
+				return;
+			}
+		}
+
+		// Search for it
+		for (n in tinyMCE.instances) {
+			inst = tinyMCE.instances[n];
+
+			if (!tinyMCE.isInstance(inst))
+				continue;
+
+			tinyMCE.selectedInstance = inst;
+			win = inst.getWin();
+
+			if (win && win.event) {
+				e = win.event;
+
+				if (!e.target)
+					e.target = e.srcElement;
+
+				TinyMCE_Engine.prototype.handleEvent(e);
+				return;
+			}
+		}
+	} catch (ex) {
+		// Ignore error if iframe is pointing to external URL
+	}
+};
+
+TinyMCE_Engine.prototype.unloadHandler = function() {
+	tinyMCE.triggerSave(true, true);
+};
+
+TinyMCE_Engine.prototype.addEventHandlers = function(inst) {
+	var doc = inst.getDoc();
+
+	inst.switchSettings();
+
+	if (tinyMCE.isMSIE) {
+		tinyMCE.addEvent(doc, "keypress", TinyMCE_Engine.prototype._eventPatch);
+		tinyMCE.addEvent(doc, "keyup", TinyMCE_Engine.prototype._eventPatch);
+		tinyMCE.addEvent(doc, "keydown", TinyMCE_Engine.prototype._eventPatch);
+		tinyMCE.addEvent(doc, "mouseup", TinyMCE_Engine.prototype._eventPatch);
+		tinyMCE.addEvent(doc, "mousedown", TinyMCE_Engine.prototype._eventPatch);
+		tinyMCE.addEvent(doc, "click", TinyMCE_Engine.prototype._eventPatch);
+	} else {
+		tinyMCE.addEvent(doc, "keypress", tinyMCE.handleEvent);
+		tinyMCE.addEvent(doc, "keydown", tinyMCE.handleEvent);
+		tinyMCE.addEvent(doc, "keyup", tinyMCE.handleEvent);
+		tinyMCE.addEvent(doc, "click", tinyMCE.handleEvent);
+		tinyMCE.addEvent(doc, "mouseup", tinyMCE.handleEvent);
+		tinyMCE.addEvent(doc, "mousedown", tinyMCE.handleEvent);
+		tinyMCE.addEvent(doc, "focus", tinyMCE.handleEvent);
+		tinyMCE.addEvent(doc, "blur", tinyMCE.handleEvent);
+
+		eval('try { doc.designMode = "On"; } catch(e) {}'); // Force designmode
+	}
+};
+
+TinyMCE_Engine.prototype.onMouseMove = function() {
+	var inst;
+
+	if (!tinyMCE.hasMouseMoved) {
+		inst = tinyMCE.selectedInstance;
+
+		// Workaround for bug #1437457 (Odd MSIE bug)
+		if (inst.isFocused) {
+			inst.undoBookmark = inst.selection.getBookmark();
+			tinyMCE.hasMouseMoved = true;
+		}
+	}
+
+//	tinyMCE.cancelEvent(inst.getWin().event);
+//	return false;
+};
+
+TinyMCE_Engine.prototype.cancelEvent = function(e) {
+	if (tinyMCE.isMSIE) {
+		e.returnValue = false;
+		e.cancelBubble = true;
+	} else
+		e.preventDefault();
+};
+
+TinyMCE_Engine.prototype.addEvent = function(o, n, h) {
+	if (o.attachEvent)
+		o.attachEvent("on" + n, h);
+	else
+		o.addEventListener(n, h, false);
+};
+
+TinyMCE_Engine.prototype.addSelectAccessibility = function(e, s, w) {
+	// Add event handlers 
+	if (!s._isAccessible) {
+		s.onkeydown = tinyMCE.accessibleEventHandler;
+		s.onblur = tinyMCE.accessibleEventHandler;
+		s._isAccessible = true;
+		s._win = w;
+	}
+
+	return false;
+};
+
+TinyMCE_Engine.prototype.accessibleEventHandler = function(e) {
+	var win = this._win;
+	e = tinyMCE.isMSIE ? win.event : e;
+	var elm = tinyMCE.isMSIE ? e.srcElement : e.target;
+
+	// Unpiggyback onchange on blur
+	if (e.type == "blur") {
+		if (elm.oldonchange) {
+			elm.onchange = elm.oldonchange;
+			elm.oldonchange = null;
+		}
+
+		return true;
+	}
+
+	// Piggyback onchange
+	if (elm.nodeName == "SELECT" && !elm.oldonchange) {
+		elm.oldonchange = elm.onchange;
+		elm.onchange = null;
+	}
+
+	// Execute onchange and remove piggyback
+	if (e.keyCode == 13 || e.keyCode == 32) {
+		elm.onchange = elm.oldonchange;
+		elm.onchange();
+		elm.oldonchange = null;
+
+		tinyMCE.cancelEvent(e);
+		return false;
+	}
+
+	return true;
+};
+
+TinyMCE_Engine.prototype._resetIframeHeight = function() {
+	var ife;
+
+	if (tinyMCE.isMSIE && !tinyMCE.isOpera) {
+		ife = tinyMCE.selectedInstance.iframeElement;
+
+/*		if (ife._oldWidth) {
+			ife.style.width = ife._oldWidth;
+			ife.width = ife._oldWidth;
+		}*/
+
+		if (ife._oldHeight) {
+			ife.style.height = ife._oldHeight;
+			ife.height = ife._oldHeight;
+		}
+	}
+};
+
+/* file:jscripts/tiny_mce/classes/TinyMCE_Selection.class.js */
+
+function TinyMCE_Selection(inst) {
+	this.instance = inst;
+};
+
+TinyMCE_Selection.prototype = {
+	getSelectedHTML : function() {
+		var inst = this.instance;
+		var e, r = this.getRng(), h;
+
+		if (tinyMCE.isSafari) {
+			// Not realy perfect!!
+			return r.toString();
+		}
+
+		e = document.createElement("body");
+
+		if (tinyMCE.isGecko)
+			e.appendChild(r.cloneContents());
+		else 
+			e.innerHTML = r.item ? r.item(0).outerHTML : r.htmlText;
+
+		h = tinyMCE._cleanupHTML(inst, inst.contentDocument, inst.settings, e, e, false, true, false);
+
+		// When editing always use fonts internaly
+		if (tinyMCE.getParam("convert_fonts_to_spans"))
+			tinyMCE.convertSpansToFonts(inst.getDoc());
+
+		return h;
+	},
+
+	getSelectedText : function() {
+		var inst = this.instance;
+		var d, r, s, t;
+
+		if (tinyMCE.isMSIE) {
+			d = inst.getDoc();
+
+			if (d.selection.type == "Text") {
+				r = d.selection.createRange();
+				t = r.text;
+			} else
+				t = '';
+		} else {
+			s = this.getSel();
+
+			if (s && s.toString)
+				t = s.toString();
+			else
+				t = '';
+		}
+
+		return t;
+	},
+
+	getBookmark : function(simple) {
+		var rng = this.getRng();
+		var doc = this.instance.getDoc();
+		var sp, le, s, e, nl, i, si, ei;
+		var trng, sx, sy, xx = -999999999;
+
+		// Skip Opera for now
+		if (tinyMCE.isOpera)
+			return null;
+
+		sx = doc.body.scrollLeft + doc.documentElement.scrollLeft;
+		sy = doc.body.scrollTop + doc.documentElement.scrollTop;
+
+		if (tinyMCE.isSafari || tinyMCE.isGecko)
+			return {rng : rng, scrollX : sx, scrollY : sy};
+
+		if (tinyMCE.isMSIE) {
+			if (simple)
+				return {rng : rng};
+
+			if (rng.item) {
+				e = rng.item(0);
+
+				nl = doc.getElementsByTagName(e.nodeName);
+				for (i=0; i<nl.length; i++) {
+					if (e == nl[i]) {
+						sp = i;
+						break;
+					}
+				}
+
+				return {
+					tag : e.nodeName,
+					index : sp,
+					scrollX : sx,
+					scrollY : sy
+				};
+			} else {
+				trng = rng.duplicate();
+				trng.collapse(true);
+				sp = Math.abs(trng.move('character', xx));
+
+				trng = rng.duplicate();
+				trng.collapse(false);
+				le = Math.abs(trng.move('character', xx)) - sp;
+
+				return {
+					start : sp,
+					length : le,
+					scrollX : sx,
+					scrollY : sy
+				};
+			}
+		}
+
+		if (tinyMCE.isGecko) {
+			s = tinyMCE.getParentElement(rng.startContainer);
+			for (si=0; si<s.childNodes.length && s.childNodes[si] != rng.startContainer; si++) ;
+
+			nl = doc.getElementsByTagName(s.nodeName);
+			for (i=0; i<nl.length; i++) {
+					if (s == nl[i]) {
+						sp = i;
+						break;
+					}
+			}
+
+			e = tinyMCE.getParentElement(rng.endContainer);
+			for (ei=0; ei<e.childNodes.length && e.childNodes[ei] != rng.endContainer; ei++) ;
+
+			nl = doc.getElementsByTagName(e.nodeName);
+			for (i=0; i<nl.length; i++) {
+					if (e == nl[i]) {
+						le = i;
+						break;
+					}
+			}
+
+			//tinyMCE.debug(s.nodeName, sp, rng.startOffset, '-' , e.nodeName, le, rng.endOffset);
+			//tinyMCE.debug(sx, sy);
+
+			return {
+				startTag : s.nodeName,
+				start : sp,
+				startIndex : si,
+				endTag : e.nodeName,
+				end : le,
+				endIndex : ei,
+				startOffset : rng.startOffset,
+				endOffset : rng.endOffset,
+				scrollX : sx,
+				scrollY : sy
+			};
+		}
+
+		return null;
+	},
+
+	moveToBookmark : function(bookmark) {
+		var rng, nl, i;
+		var inst = this.instance;
+		var doc = inst.getDoc();
+		var win = inst.getWin();
+		var sel = this.getSel();
+
+		if (!bookmark)
+			return false;
+
+		if (tinyMCE.isSafari) {
+			sel.setBaseAndExtent(bookmark.startContainer, bookmark.startOffset, bookmark.endContainer, bookmark.endOffset);
+			return true;
+		}
+
+		if (tinyMCE.isMSIE) {
+			if (bookmark.rng) {
+				bookmark.rng.select();
+				return true;
+			}
+
+			win.focus();
+
+			if (bookmark.tag) {
+				rng = inst.getBody().createControlRange();
+
+				nl = doc.getElementsByTagName(bookmark.tag);
+
+				if (nl.length > bookmark.index) {
+					try {
+						rng.addElement(nl[bookmark.index]);
+					} catch (ex) {
+						// Might be thrown if the node no longer exists
+					}
+				}
+			} else {
+				rng = inst.getSel().createRange();
+				rng.moveToElementText(inst.getBody());
+				rng.collapse(true);
+				rng.moveStart('character', bookmark.start);
+				rng.moveEnd('character', bookmark.length);
+			}
+
+			rng.select();
+
+			win.scrollTo(bookmark.scrollX, bookmark.scrollY);
+			return true;
+		}
+
+		if (tinyMCE.isGecko && bookmark.rng) {
+			sel.removeAllRanges();
+			sel.addRange(bookmark.rng);
+			win.scrollTo(bookmark.scrollX, bookmark.scrollY);
+			return true;
+		}
+
+		if (tinyMCE.isGecko) {
+	//		try {
+				rng = doc.createRange();
+
+				nl = doc.getElementsByTagName(bookmark.startTag);
+				if (nl.length > bookmark.start)
+					rng.setStart(nl[bookmark.start].childNodes[bookmark.startIndex], bookmark.startOffset);
+
+				nl = doc.getElementsByTagName(bookmark.endTag);
+				if (nl.length > bookmark.end)
+					rng.setEnd(nl[bookmark.end].childNodes[bookmark.endIndex], bookmark.endOffset);
+
+				sel.removeAllRanges();
+				sel.addRange(rng);
+	/*		} catch {
+				// Ignore
+			}*/
+
+			win.scrollTo(bookmark.scrollX, bookmark.scrollY);
+			return true;
+		}
+
+		return false;
+	},
+
+	selectNode : function(node, collapse, select_text_node, to_start) {
+		var inst = this.instance, sel, rng, nodes;
+
+		if (!node)
+			return;
+
+		if (typeof(collapse) == "undefined")
+			collapse = true;
+
+		if (typeof(select_text_node) == "undefined")
+			select_text_node = false;
+
+		if (typeof(to_start) == "undefined")
+			to_start = true;
+
+		if (tinyMCE.isMSIE) {
+			rng = inst.getBody().createTextRange();
+
+			try {
+				rng.moveToElementText(node);
+
+				if (collapse)
+					rng.collapse(to_start);
+
+				rng.select();
+			} catch (e) {
+				// Throws illigal agrument in MSIE some times
+			}
+		} else {
+			sel = this.getSel();
+
+			if (!sel)
+				return;
+
+			if (tinyMCE.isSafari) {
+				sel.setBaseAndExtent(node, 0, node, node.innerText.length);
+
+				if (collapse) {
+					if (to_start)
+						sel.collapseToStart();
+					else
+						sel.collapseToEnd();
+				}
+
+				this.scrollToNode(node);
+
+				return;
+			}
+
+			rng = inst.getDoc().createRange();
+
+			if (select_text_node) {
+				// Find first textnode in tree
+				nodes = tinyMCE.getNodeTree(node, new Array(), 3);
+				if (nodes.length > 0)
+					rng.selectNodeContents(nodes[0]);
+				else
+					rng.selectNodeContents(node);
+			} else
+				rng.selectNode(node);
+
+			if (collapse) {
+				// Special treatment of textnode collapse
+				if (!to_start && node.nodeType == 3) {
+					rng.setStart(node, node.nodeValue.length);
+					rng.setEnd(node, node.nodeValue.length);
+				} else
+					rng.collapse(to_start);
+			}
+
+			sel.removeAllRanges();
+			sel.addRange(rng);
+		}
+
+		this.scrollToNode(node);
+
+		// Set selected element
+		tinyMCE.selectedElement = null;
+		if (node.nodeType == 1)
+			tinyMCE.selectedElement = node;
+	},
+
+	scrollToNode : function(node) {
+		var inst = this.instance;
+		var pos, doc, scrollX, scrollY, height;
+
+		// Scroll to node position
+		pos = tinyMCE.getAbsPosition(node);
+		doc = inst.getDoc();
+		scrollX = doc.body.scrollLeft + doc.documentElement.scrollLeft;
+		scrollY = doc.body.scrollTop + doc.documentElement.scrollTop;
+		height = tinyMCE.isMSIE ? document.getElementById(inst.editorId).style.pixelHeight : inst.targetElement.clientHeight;
+
+		// Only scroll if out of visible area
+		if (!tinyMCE.settings['auto_resize'] && !(pos.absTop > scrollY && pos.absTop < (scrollY - 25 + height)))
+			inst.contentWindow.scrollTo(pos.absLeft, pos.absTop - height + 25); 
+	},
+
+	getSel : function() {
+		var inst = this.instance;
+
+		if (tinyMCE.isMSIE && !tinyMCE.isOpera)
+			return inst.getDoc().selection;
+
+		return inst.contentWindow.getSelection();
+	},
+
+	getRng : function() {
+		var inst = this.instance;
+		var sel = this.getSel();
+
+		if (sel == null)
+			return null;
+
+		if (tinyMCE.isMSIE && !tinyMCE.isOpera)
+			return sel.createRange();
+
+		if (tinyMCE.isSafari && !sel.getRangeAt)
+			return '' + window.getSelection();
+
+		return sel.getRangeAt(0);
+	},
+
+	getFocusElement : function() {
+		var inst = this.instance;
+
+		if (tinyMCE.isMSIE && !tinyMCE.isOpera) {
+			var doc = inst.getDoc();
+			var rng = doc.selection.createRange();
+
+	//		if (rng.collapse)
+	//			rng.collapse(true);
+
+			var elm = rng.item ? rng.item(0) : rng.parentElement();
+		} else {
+			if (inst.isHidden())
+				return inst.getBody();
+
+			var sel = this.getSel();
+			var rng = this.getRng();
+
+			if (!sel || !rng)
+				return null;
+
+			var elm = rng.commonAncestorContainer;
+			//var elm = (sel && sel.anchorNode) ? sel.anchorNode : null;
+
+			// Handle selection a image or other control like element such as anchors
+			if (!rng.collapsed) {
+				// Is selection small
+				if (rng.startContainer == rng.endContainer) {
+					if (rng.startOffset - rng.endOffset < 2) {
+						if (rng.startContainer.hasChildNodes())
+							elm = rng.startContainer.childNodes[rng.startOffset];
+					}
+				}
+			}
+
+			// Get the element parent of the node
+			elm = tinyMCE.getParentElement(elm);
+
+			//if (tinyMCE.selectedElement != null && tinyMCE.selectedElement.nodeName.toLowerCase() == "img")
+			//	elm = tinyMCE.selectedElement;
+		}
+
+		return elm;
+	}
+};
+
+/* file:jscripts/tiny_mce/classes/TinyMCE_UndoRedo.class.js */
+
+function TinyMCE_UndoRedo(inst) {
+	this.instance = inst;
+	this.undoLevels = new Array();
+	this.undoIndex = 0;
+	this.typingUndoIndex = -1;
+	this.undoRedo = true;
+};
+
+TinyMCE_UndoRedo.prototype = {
+	add : function(l) {
+		var b;
+
+		if (l) {
+			this.undoLevels[this.undoLevels.length] = l;
+			return true;
+		}
+
+		var inst = this.instance;
+
+		if (this.typingUndoIndex != -1) {
+			this.undoIndex = this.typingUndoIndex;
+			// tinyMCE.debug("Override: " + this.undoIndex);
+		}
+
+		var newHTML = tinyMCE.trim(inst.getBody().innerHTML);
+		if (this.undoLevels[this.undoIndex] && newHTML != this.undoLevels[this.undoIndex].content) {
+			//tinyMCE.debug(newHTML, this.undoLevels[this.undoIndex]);
+
+			tinyMCE.dispatchCallback(inst, 'onchange_callback', 'onChange', inst);
+
+			// Time to compress
+			var customUndoLevels = tinyMCE.settings['custom_undo_redo_levels'];
+			if (customUndoLevels != -1 && this.undoLevels.length > customUndoLevels) {
+				for (var i=0; i<this.undoLevels.length-1; i++) {
+					//tinyMCE.debug(this.undoLevels[i] + "=" + this.undoLevels[i+1]);
+					this.undoLevels[i] = this.undoLevels[i+1];
+				}
+
+				this.undoLevels.length--;
+				this.undoIndex--;
+			}
+
+			b = inst.undoBookmark;
+			if (!b)
+				b = inst.selection.getBookmark();
+
+			this.undoIndex++;
+			this.undoLevels[this.undoIndex] = {
+				content : newHTML,
+				bookmark : b
+			};
+
+			this.undoLevels.length = this.undoIndex + 1;
+
+			//tinyMCE.debug("level added" + this.undoIndex);
+			return true;
+
+			// tinyMCE.debug(this.undoIndex + "," + (this.undoLevels.length-1));
+		}
+
+		return false;
+	},
+
+	undo : function() {
+		var inst = this.instance;
+
+		// Do undo
+		if (this.undoIndex > 0) {
+			this.undoIndex--;
+			tinyMCE.setInnerHTML(inst.getBody(), this.undoLevels[this.undoIndex].content);
+			inst.repaint();
+			if (inst.settings.custom_undo_redo_restore_selection)
+				inst.selection.moveToBookmark(this.undoLevels[this.undoIndex].bookmark);
+		}
+
+		// tinyMCE.debug("Undo - undo levels:" + this.undoLevels.length + ", undo index: " + this.undoIndex);
+	},
+
+	redo : function() {
+		var inst = this.instance;
+
+		tinyMCE.execCommand("mceEndTyping");
+
+		if (this.undoIndex < (this.undoLevels.length-1)) {
+			this.undoIndex++;
+			tinyMCE.setInnerHTML(inst.getBody(), this.undoLevels[this.undoIndex].content);
+			inst.repaint();
+//					if (this.undoIndex > 0)
+//						inst.selection.moveToBookmark(this.undoLevels[this.undoIndex-1].bookmark);
+			if (inst.settings.custom_undo_redo_restore_selection)
+				inst.selection.moveToBookmark(this.undoLevels[this.undoIndex].bookmark);
+			// tinyMCE.debug("Redo - undo levels:" + this.undoLevels.length + ", undo index: " + this.undoIndex);
+		}
+
+		tinyMCE.triggerNodeChange();
+	}
+};
+
+/* file:jscripts/tiny_mce/classes/TinyMCE_ForceParagraphs.class.js */
+
+var TinyMCE_ForceParagraphs = {
+	_insertPara : function(inst, e) {
+		function isEmpty(para) {
+			function isEmptyHTML(html) {
+				return html.replace(new RegExp('[ \t\r\n]+', 'g'), '').toLowerCase() == "";
+			}
+
+			// Check for images
+			if (para.getElementsByTagName("img").length > 0)
+				return false;
+
+			// Check for tables
+			if (para.getElementsByTagName("table").length > 0)
+				return false;
+
+			// Check for HRs
+			if (para.getElementsByTagName("hr").length > 0)
+				return false;
+
+			// Check all textnodes
+			var nodes = tinyMCE.getNodeTree(para, new Array(), 3);
+			for (var i=0; i<nodes.length; i++) {
+				if (!isEmptyHTML(nodes[i].nodeValue))
+					return false;
+			}
+
+			// No images, no tables, no hrs, no text content then it's empty
+			return true;
+		}
+
+		var doc = inst.getDoc();
+		var sel = inst.getSel();
+		var win = inst.contentWindow;
+		var rng = sel.getRangeAt(0);
+		var body = doc.body;
+		var rootElm = doc.documentElement;
+		var blockName = "P";
+
+	//	tinyMCE.debug(body.innerHTML);
+
+	//	debug(e.target, sel.anchorNode.nodeName, sel.focusNode.nodeName, rng.startContainer, rng.endContainer, rng.commonAncestorContainer, sel.anchorOffset, sel.focusOffset, rng.toString());
+
+		// Setup before range
+		var rngBefore = doc.createRange();
+		rngBefore.setStart(sel.anchorNode, sel.anchorOffset);
+		rngBefore.collapse(true);
+
+		// Setup after range
+		var rngAfter = doc.createRange();
+		rngAfter.setStart(sel.focusNode, sel.focusOffset);
+		rngAfter.collapse(true);
+
+		// Setup start/end points
+		var direct = rngBefore.compareBoundaryPoints(rngBefore.START_TO_END, rngAfter) < 0;
+		var startNode = direct ? sel.anchorNode : sel.focusNode;
+		var startOffset = direct ? sel.anchorOffset : sel.focusOffset;
+		var endNode = direct ? sel.focusNode : sel.anchorNode;
+		var endOffset = direct ? sel.focusOffset : sel.anchorOffset;
+
+		startNode = startNode.nodeName == "BODY" ? startNode.firstChild : startNode;
+		endNode = endNode.nodeName == "BODY" ? endNode.firstChild : endNode;
+
+		// tinyMCE.debug(startNode, endNode);
+
+		// Get block elements
+		var startBlock = tinyMCE.getParentBlockElement(startNode);
+		var endBlock = tinyMCE.getParentBlockElement(endNode);
+
+		// If absolute force paragraph generation within
+		if (startBlock && new RegExp('absolute|relative|static', 'gi').test(startBlock.style.position))
+			startBlock = null;
+
+		if (endBlock && new RegExp('absolute|relative|static', 'gi').test(endBlock.style.position))
+			endBlock = null;
+
+		// Use current block name
+		if (startBlock != null) {
+			blockName = startBlock.nodeName;
+
+			// Use P instead
+			if (blockName == "TD" || blockName == "TABLE" || (blockName == "DIV" && new RegExp('left|right', 'gi').test(startBlock.style.cssFloat)))
+				blockName = "P";
+		}
+
+		// Within a list use normal behaviour
+		if (tinyMCE.getParentElement(startBlock, "OL,UL") != null)
+			return false;
+
+		// Within a table create new paragraphs
+		if ((startBlock != null && startBlock.nodeName == "TABLE") || (endBlock != null && endBlock.nodeName == "TABLE"))
+			startBlock = endBlock = null;
+
+		// Setup new paragraphs
+		var paraBefore = (startBlock != null && startBlock.nodeName == blockName) ? startBlock.cloneNode(false) : doc.createElement(blockName);
+		var paraAfter = (endBlock != null && endBlock.nodeName == blockName) ? endBlock.cloneNode(false) : doc.createElement(blockName);
+
+		// Is header, then force paragraph under
+		if (/^(H[1-6])$/.test(blockName))
+			paraAfter = doc.createElement("p");
+
+		// Setup chop nodes
+		var startChop = startNode;
+		var endChop = endNode;
+
+		// Get startChop node
+		node = startChop;
+		do {
+			if (node == body || node.nodeType == 9 || tinyMCE.isBlockElement(node))
+				break;
+
+			startChop = node;
+		} while ((node = node.previousSibling ? node.previousSibling : node.parentNode));
+
+		// Get endChop node
+		node = endChop;
+		do {
+			if (node == body || node.nodeType == 9 || tinyMCE.isBlockElement(node))
+				break;
+
+			endChop = node;
+		} while ((node = node.nextSibling ? node.nextSibling : node.parentNode));
+
+		// Fix when only a image is within the TD
+		if (startChop.nodeName == "TD")
+			startChop = startChop.firstChild;
+
+		if (endChop.nodeName == "TD")
+			endChop = endChop.lastChild;
+
+		// If not in a block element
+		if (startBlock == null) {
+			// Delete selection
+			rng.deleteContents();
+			sel.removeAllRanges();
+
+			if (startChop != rootElm && endChop != rootElm) {
+				// Insert paragraph before
+				rngBefore = rng.cloneRange();
+
+				if (startChop == body)
+					rngBefore.setStart(startChop, 0);
+				else
+					rngBefore.setStartBefore(startChop);
+
+				paraBefore.appendChild(rngBefore.cloneContents());
+
+				// Insert paragraph after
+				if (endChop.parentNode.nodeName == blockName)
+					endChop = endChop.parentNode;
+
+				// If not after image
+				//if (rng.startContainer.nodeName != "BODY" && rng.endContainer.nodeName != "BODY")
+					rng.setEndAfter(endChop);
+
+				if (endChop.nodeName != "#text" && endChop.nodeName != "BODY")
+					rngBefore.setEndAfter(endChop);
+
+				var contents = rng.cloneContents();
+				if (contents.firstChild && (contents.firstChild.nodeName == blockName || contents.firstChild.nodeName == "BODY"))
+					paraAfter.innerHTML = contents.firstChild.innerHTML;
+				else
+					paraAfter.appendChild(contents);
+
+				// Check if it's a empty paragraph
+				if (isEmpty(paraBefore))
+					paraBefore.innerHTML = "&nbsp;";
+
+				// Check if it's a empty paragraph
+				if (isEmpty(paraAfter))
+					paraAfter.innerHTML = "&nbsp;";
+
+				// Delete old contents
+				rng.deleteContents();
+				rngAfter.deleteContents();
+				rngBefore.deleteContents();
+
+				// Insert new paragraphs
+				paraAfter.normalize();
+				rngBefore.insertNode(paraAfter);
+				paraBefore.normalize();
+				rngBefore.insertNode(paraBefore);
+
+				// tinyMCE.debug("1: ", paraBefore.innerHTML, paraAfter.innerHTML);
+			} else {
+				body.innerHTML = "<" + blockName + ">&nbsp;</" + blockName + "><" + blockName + ">&nbsp;</" + blockName + ">";
+				paraAfter = body.childNodes[1];
+			}
+
+			inst.selection.selectNode(paraAfter, true, true);
+
+			return true;
+		}
+
+		// Place first part within new paragraph
+		if (startChop.nodeName == blockName)
+			rngBefore.setStart(startChop, 0);
+		else
+			rngBefore.setStartBefore(startChop);
+
+		rngBefore.setEnd(startNode, startOffset);
+		paraBefore.appendChild(rngBefore.cloneContents());
+
+		// Place secound part within new paragraph
+		rngAfter.setEndAfter(endChop);
+		rngAfter.setStart(endNode, endOffset);
+		var contents = rngAfter.cloneContents();
+
+		if (contents.firstChild && contents.firstChild.nodeName == blockName) {
+	/*		var nodes = contents.firstChild.childNodes;
+			for (var i=0; i<nodes.length; i++) {
+				//tinyMCE.debug(nodes[i].nodeName);
+				if (nodes[i].nodeName != "BODY")
+					paraAfter.appendChild(nodes[i]);
+			}
+	*/
+			paraAfter.innerHTML = contents.firstChild.innerHTML;
+		} else
+			paraAfter.appendChild(contents);
+
+		// Check if it's a empty paragraph
+		if (isEmpty(paraBefore))
+			paraBefore.innerHTML = "&nbsp;";
+
+		// Check if it's a empty paragraph
+		if (isEmpty(paraAfter))
+			paraAfter.innerHTML = "&nbsp;";
+
+		// Create a range around everything
+		var rng = doc.createRange();
+
+		if (!startChop.previousSibling && startChop.parentNode.nodeName.toUpperCase() == blockName) {
+			rng.setStartBefore(startChop.parentNode);
+		} else {
+			if (rngBefore.startContainer.nodeName.toUpperCase() == blockName && rngBefore.startOffset == 0)
+				rng.setStartBefore(rngBefore.startContainer);
+			else
+				rng.setStart(rngBefore.startContainer, rngBefore.startOffset);
+		}
+
+		if (!endChop.nextSibling && endChop.parentNode.nodeName.toUpperCase() == blockName)
+			rng.setEndAfter(endChop.parentNode);
+		else
+			rng.setEnd(rngAfter.endContainer, rngAfter.endOffset);
+
+		// Delete all contents and insert new paragraphs
+		rng.deleteContents();
+		rng.insertNode(paraAfter);
+		rng.insertNode(paraBefore);
+		//tinyMCE.debug("2", paraBefore.innerHTML, paraAfter.innerHTML);
+
+		// Normalize
+		paraAfter.normalize();
+		paraBefore.normalize();
+
+		inst.selection.selectNode(paraAfter, true, true);
+
+		return true;
+	},
+
+	_handleBackSpace : function(inst) {
+		var r = inst.getRng(), sn = r.startContainer, nv, s = false;
+
+		if (sn && sn.nextSibling && sn.nextSibling.nodeName == "BR") {
+			nv = sn.nodeValue;
+
+			// Handle if a backspace is pressed after a space character #bug 1466054
+			if (nv != null && nv.length >= r.startOffset && nv.charAt(r.startOffset - 1) == ' ')
+				s = true;
+
+			// Only remove BRs if we are at the end of line #bug 1464152
+			if (nv != null && r.startOffset == nv.length)
+				sn.nextSibling.parentNode.removeChild(sn.nextSibling);
+		}
+
+		return s;
+	}
+};
+
+/* file:jscripts/tiny_mce/classes/TinyMCE_Layer.class.js */
+
+function TinyMCE_Layer(id, bm) {
+	this.id = id;
+	this.blockerElement = null;
+	this.events = false;
+	this.element = null;
+	this.blockMode = typeof(bm) != 'undefined' ? bm : true;
+	this.doc = document;
+};
+
+TinyMCE_Layer.prototype = {
+	moveRelativeTo : function(re, p) {
+		var rep = this.getAbsPosition(re);
+		var w = parseInt(re.offsetWidth);
+		var h = parseInt(re.offsetHeight);
+		var e = this.getElement();
+		var ew = parseInt(e.offsetWidth);
+		var eh = parseInt(e.offsetHeight);
+		var x, y;
+
+		switch (p) {
+			case "tl":
+				x = rep.absLeft;
+				y = rep.absTop;
+				break;
+
+			case "tr":
+				x = rep.absLeft + w;
+				y = rep.absTop;
+				break;
+
+			case "bl":
+				x = rep.absLeft;
+				y = rep.absTop + h;
+				break;
+
+			case "br":
+				x = rep.absLeft + w;
+				y = rep.absTop + h;
+				break;
+
+			case "cc":
+				x = rep.absLeft + (w / 2) - (ew / 2);
+				y = rep.absTop + (h / 2) - (eh / 2);
+				break;
+		}
+
+		this.moveTo(x, y);
+	},
+
+	moveBy : function(x, y) {
+		var e = this.getElement();
+		this.moveTo(parseInt(e.style.left) + x, parseInt(e.style.top) + y);
+	},
+
+	moveTo : function(x, y) {
+		var e = this.getElement();
+
+		e.style.left = x + "px";
+		e.style.top = y + "px";
+
+		this.updateBlocker();
+	},
+
+	resizeBy : function(w, h) {
+		var e = this.getElement();
+		this.resizeTo(parseInt(e.style.width) + w, parseInt(e.style.height) + h);
+	},
+
+	resizeTo : function(w, h) {
+		var e = this.getElement();
+
+		if (w != null)
+			e.style.width = w + "px";
+
+		if (h != null)
+			e.style.height = h + "px";
+
+		this.updateBlocker();
+	},
+
+	show : function() {
+		this.getElement().style.display = 'block';
+		this.updateBlocker();
+	},
+
+	hide : function() {
+		this.getElement().style.display = 'none';
+		this.updateBlocker();
+	},
+
+	isVisible : function() {
+		return this.getElement().style.display == 'block';
+	},
+
+	getElement : function() {
+		if (!this.element)
+			this.element = this.doc.getElementById(this.id);
+
+		return this.element;
+	},
+
+	setBlockMode : function(s) {
+		this.blockMode = s;
+	},
+
+	updateBlocker : function() {
+		var e, b, x, y, w, h;
+
+		b = this.getBlocker();
+		if (b) {
+			if (this.blockMode) {
+				e = this.getElement();
+				x = this.parseInt(e.style.left);
+				y = this.parseInt(e.style.top);
+				w = this.parseInt(e.offsetWidth);
+				h = this.parseInt(e.offsetHeight);
+
+				b.style.left = x + 'px';
+				b.style.top = y + 'px';
+				b.style.width = w + 'px';
+				b.style.height = h + 'px';
+				b.style.display = e.style.display;
+			} else
+				b.style.display = 'none';
+		}
+	},
+
+	getBlocker : function() {
+		var d, b;
+
+		if (!this.blockerElement && this.blockMode) {
+			d = this.doc;
+			b = d.createElement("iframe");
+
+			b.style.cssText = 'display: none; position: absolute; left: 0; top: 0';
+			b.src = 'javascript:false;';
+			b.frameBorder = '0';
+			b.scrolling = 'no';
+
+			d.body.appendChild(b);
+			this.blockerElement = b;
+		}
+
+		return this.blockerElement;
+	},
+
+	getAbsPosition : function(n) {
+		var p = {absLeft : 0, absTop : 0};
+
+		while (n) {
+			p.absLeft += n.offsetLeft;
+			p.absTop += n.offsetTop;
+			n = n.offsetParent;
+		}
+
+		return p;
+	},
+
+	create : function(n, c, p) {
+		var d = this.doc, e = d.createElement(n);
+
+		e.setAttribute('id', this.id);
+
+		if (c)
+			e.className = c;
+
+		if (!p)
+			p = d.body;
+
+		p.appendChild(e);
+
+		return this.element = e;
+	},
+
+	parseInt : function(s) {
+		if (s == null || s == '')
+			return 0;
+
+		return parseInt(s);
+	}
+};
+
+/* file:jscripts/tiny_mce/classes/TinyMCE_Menu.class.js */
+
+function TinyMCE_Menu() {
+	var id;
+
+	if (typeof(tinyMCE.menuCounter) == "undefined")
+		tinyMCE.menuCounter = 0;
+
+	id = "mc_menu_" + tinyMCE.menuCounter++;
+
+	TinyMCE_Layer.call(this, id, true);
+
+	this.id = id;
+	this.items = new Array();
+	this.needsUpdate = true;
+};
+
+// Extends the TinyMCE_Layer class
+TinyMCE_Menu.prototype = tinyMCE.extend(TinyMCE_Layer.prototype, {
+	init : function(s) {
+		var n;
+
+		// Default params
+		this.settings = {
+			separator_class : 'mceMenuSeparator',
+			title_class : 'mceMenuTitle',
+			disabled_class : 'mceMenuDisabled',
+			menu_class : 'mceMenu',
+			drop_menu : true
+		};
+
+		for (n in s)
+			this.settings[n] = s[n];
+
+		this.create('div', this.settings.menu_class);
+	},
+
+	clear : function() {
+		this.items = new Array();
+	},
+
+	addTitle : function(t) {
+		this.add({type : 'title', text : t});
+	},
+
+	addDisabled : function(t) {
+		this.add({type : 'disabled', text : t});
+	},
+
+	addSeparator : function() {
+		this.add({type : 'separator'});
+	},
+
+	addItem : function(t, js) {
+		this.add({text : t, js : js});
+	},
+
+	add : function(mi) {
+		this.items[this.items.length] = mi;
+		this.needsUpdate = true;
+	},
+
+	update : function() {
+		var e = this.getElement(), h = '', i, t, m = this.items, s = this.settings;
+
+		if (this.settings.drop_menu)
+			h += '<span class="mceMenuLine"></span>';
+
+		h += '<table border="0" cellpadding="0" cellspacing="0">';
+
+		for (i=0; i<m.length; i++) {
+			t = tinyMCE.xmlEncode(m[i].text);
+			c = m[i].class_name ? ' class="' + m[i].class_name + '"' : '';
+
+			switch (m[i].type) {
+				case 'separator':
+					h += '<tr class="' + s.separator_class + '"><td>';
+					break;
+
+				case 'title':
+					h += '<tr class="' + s.title_class + '"><td><span' + c +'>' + t + '</span>';
+					break;
+
+				case 'disabled':
+					h += '<tr class="' + s.disabled_class + '"><td><span' + c +'>' + t + '</span>';
+					break;
+
+				default:
+					h += '<tr><td><a href="javascript:void(0);" onmousedown="' + tinyMCE.xmlEncode(m[i].js) + ';return false;"><span' + c +'>' + t + '</span></a>';
+			}
+
+			h += '</td></tr>';
+		}
+
+		h += '</table>';
+
+		e.innerHTML = h;
+
+		this.needsUpdate = false;
+		this.updateBlocker();
+	},
+
+	show : function() {
+		var nl, i;
+
+		if (tinyMCE.lastMenu == this)
+			return;
+
+		if (this.needsUpdate)
+			this.update();
+
+		if (tinyMCE.lastMenu && tinyMCE.lastMenu != this)
+			tinyMCE.lastMenu.hide();
+
+		TinyMCE_Layer.prototype.show.call(this);
+
+		if (!tinyMCE.isOpera) {
+			// Accessibility stuff
+/*			nl = this.getElement().getElementsByTagName("a");
+			if (nl.length > 0)
+				nl[0].focus();*/
+		}
+
+		tinyMCE.lastMenu = this;
+	}
+});
+
+/* file:jscripts/tiny_mce/classes/TinyMCE_Debug.class.js */
+
+TinyMCE_Engine.prototype.debug = function() {
+	var m = "", e, a, i;
+
+	e = document.getElementById("tinymce_debug");
+	if (!e) {
+		var d = document.createElement("div");
+		d.setAttribute("className", "debugger");
+		d.className = "debugger";
+		d.innerHTML = 'Debug output:<textarea id="tinymce_debug" style="width: 100%; height: 300px" wrap="nowrap" mce_editable="false"></textarea>';
+
+		document.body.appendChild(d);
+		e = document.getElementById("tinymce_debug");
+	}
+
+	a = this.debug.arguments;
+	for (i=0; i<a.length; i++) {
+		m += a[i];
+		if (i<a.length-1)
+			m += ', ';
+	}
+
+	e.value += m + "\n";
+};

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/utils/editable_selects.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/utils/editable_selects.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/utils/editable_selects.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,63 @@
+/**
+ * $RCSfile: editable_selects.js,v $
+ * $Revision: 1.1 $
+ * $Date: 2006/04/10 09:30:19 $
+ *
+ * Makes select boxes editable.
+ *
+ * @author Moxiecode
+ * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
+ */
+
+var TinyMCE_EditableSelects = {
+	editSelectElm : null,
+
+	init : function() {
+		var nl = document.getElementsByTagName("select"), i, d = document, o;
+
+		for (i=0; i<nl.length; i++) {
+			if (nl[i].className.indexOf('mceEditableSelect') != -1) {
+				o = new Option('(value)', '__mce_add_custom__');
+
+				o.className = 'mceAddSelectValue';
+
+				nl[i].options[nl[i].options.length] = o;
+				nl[i].setAttribute('onchange', 'TinyMCE_EditableSelects.onChangeEditableSelect(this);');
+			}
+		}
+	},
+
+	onChangeEditableSelect : function(se) {
+		var d = document, ne;
+
+		if (se.options[se.selectedIndex].value == '__mce_add_custom__') {
+			ne = d.createElement("input");
+			ne.id = se.id + "_custom";
+			ne.name = se.name + "_custom";
+			ne.type = "text";
+
+			ne.style.width = se.clientWidth;
+			se.parentNode.insertBefore(ne, se);
+			se.style.display = 'none';
+			ne.focus();
+			ne.onblur = TinyMCE_EditableSelects.onBlurEditableSelectInput;
+			TinyMCE_EditableSelects.editSelectElm = se;
+		}
+	},
+
+	onBlurEditableSelectInput : function() {
+		var se = TinyMCE_EditableSelects.editSelectElm;
+
+		if (se) {
+			if (se.previousSibling.value != '') {
+				addSelectValue(document.forms[0], se.id, se.previousSibling.value, se.previousSibling.value);
+				selectByValue(document.forms[0], se.id, se.previousSibling.value);
+			} else
+				selectByValue(document.forms[0], se.id, '');
+
+			se.style.display = 'inline';
+			se.parentNode.removeChild(se.previousSibling);
+			TinyMCE_EditableSelects.editSelectElm = null;
+		}
+	}
+};

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/utils/form_utils.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/utils/form_utils.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/utils/form_utils.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,210 @@
+/**
+ * $RCSfile: form_utils.js,v $
+ * $Revision: 1.11 $
+ * $Date: 2006/04/07 15:53:12 $
+ *
+ * Various form utilitiy functions.
+ *
+ * @author Moxiecode
+ * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
+ */
+
+function getColorPickerHTML(id, target_form_element) {
+	var html = "";
+
+	html += '<a id="' + id + '_link" href="javascript:void(0);" onkeydown="pickColor(event,\'' + target_form_element +'\');" onmousedown="pickColor(event,\'' + target_form_element +'\');return false;">';
+	html += '<img id="' + id + '" src="../../themes/' + tinyMCE.getParam("theme") + '/images/color.gif"';
+	html += ' onmouseover="this.className=\'mceButtonOver\'"';
+	html += ' onmouseout="this.className=\'mceButtonNormal\'"';
+	html += ' onmousedown="this.className=\'mceButtonDown\'"';
+	html += ' width="20" height="16" border="0" title="' + tinyMCE.getLang('lang_browse') + '"';
+	html += ' class="mceButtonNormal" alt="' + tinyMCE.getLang('lang_browse') + '" /></a>';
+
+	return html;
+}
+
+function pickColor(e, target_form_element) {
+	if ((e.keyCode == 32 || e.keyCode == 13) || e.type == "mousedown")
+		tinyMCEPopup.pickColor(e, target_form_element);
+}
+
+function updateColor(img_id, form_element_id) {
+	document.getElementById(img_id).style.backgroundColor = document.forms[0].elements[form_element_id].value;
+}
+
+function setBrowserDisabled(id, state) {
+	var img = document.getElementById(id);
+	var lnk = document.getElementById(id + "_link");
+
+	if (lnk) {
+		if (state) {
+			lnk.setAttribute("realhref", lnk.getAttribute("href"));
+			lnk.removeAttribute("href");
+			tinyMCE.switchClass(img, 'mceButtonDisabled', true);
+		} else {
+			lnk.setAttribute("href", lnk.getAttribute("realhref"));
+			tinyMCE.switchClass(img, 'mceButtonNormal', false);
+		}
+	}
+}
+
+function getBrowserHTML(id, target_form_element, type, prefix) {
+	var option = prefix + "_" + type + "_browser_callback";
+	var cb = tinyMCE.getParam(option, tinyMCE.getParam("file_browser_callback"));
+	if (cb == null)
+		return "";
+
+	var html = "";
+
+	html += '<a id="' + id + '_link" href="javascript:openBrower(\'' + id + '\',\'' + target_form_element + '\', \'' + type + '\',\'' + option + '\');" onmousedown="return false;">';
+	html += '<img id="' + id + '" src="../../themes/' + tinyMCE.getParam("theme") + '/images/browse.gif"';
+	html += ' onmouseover="this.className=\'mceButtonOver\';"';
+	html += ' onmouseout="this.className=\'mceButtonNormal\';"';
+	html += ' onmousedown="this.className=\'mceButtonDown\';"';
+	html += ' width="20" height="18" border="0" title="' + tinyMCE.getLang('lang_browse') + '"';
+	html += ' class="mceButtonNormal" alt="' + tinyMCE.getLang('lang_browse') + '" /></a>';
+
+	return html;
+}
+
+function openBrower(img_id, target_form_element, type, option) {
+	var img = document.getElementById(img_id);
+
+	if (img.className != "mceButtonDisabled")
+		tinyMCEPopup.openBrowser(target_form_element, type, option);
+}
+
+function selectByValue(form_obj, field_name, value, add_custom, ignore_case) {
+	if (!form_obj || !form_obj.elements[field_name])
+		return;
+
+	var sel = form_obj.elements[field_name];
+
+	var found = false;
+	for (var i=0; i<sel.options.length; i++) {
+		var option = sel.options[i];
+
+		if (option.value == value || (ignore_case && option.value.toLowerCase() == value.toLowerCase())) {
+			option.selected = true;
+			found = true;
+		} else
+			option.selected = false;
+	}
+
+	if (!found && add_custom && value != '') {
+		var option = new Option(value, value);
+		option.selected = true;
+		sel.options[sel.options.length] = option;
+		sel.selectedIndex = sel.options.length - 1;
+	}
+
+	return found;
+}
+
+function getSelectValue(form_obj, field_name) {
+	var elm = form_obj.elements[field_name];
+
+	if (elm == null || elm.options == null)
+		return "";
+
+	return elm.options[elm.selectedIndex].value;
+}
+
+function addSelectValue(form_obj, field_name, name, value) {
+	var s = form_obj.elements[field_name];
+	var o = new Option(name, value);
+	s.options[s.options.length] = o;
+}
+
+function addClassesToList(list_id, specific_option) {
+	// Setup class droplist
+	var styleSelectElm = document.getElementById(list_id);
+	var styles = tinyMCE.getParam('theme_advanced_styles', false);
+	styles = tinyMCE.getParam(specific_option, styles);
+
+	if (styles) {
+		var stylesAr = styles.split(';');
+
+		for (var i=0; i<stylesAr.length; i++) {
+			if (stylesAr != "") {
+				var key, value;
+
+				key = stylesAr[i].split('=')[0];
+				value = stylesAr[i].split('=')[1];
+
+				styleSelectElm.options[styleSelectElm.length] = new Option(key, value);
+			}
+		}
+	} else {
+		// Use auto impored classes
+		var csses = tinyMCE.getCSSClasses(tinyMCE.getWindowArg('editor_id'));
+		for (var i=0; i<csses.length; i++)
+			styleSelectElm.options[styleSelectElm.length] = new Option(csses[i], csses[i]);
+	}
+}
+
+function isVisible(element_id) {
+	var elm = document.getElementById(element_id);
+
+	return elm && elm.style.display != "none";
+}
+
+function convertRGBToHex(col) {
+	var re = new RegExp("rgb\\s*\\(\\s*([0-9]+).*,\\s*([0-9]+).*,\\s*([0-9]+).*\\)", "gi");
+
+	var rgb = col.replace(re, "$1,$2,$3").split(',');
+	if (rgb.length == 3) {
+		r = parseInt(rgb[0]).toString(16);
+		g = parseInt(rgb[1]).toString(16);
+		b = parseInt(rgb[2]).toString(16);
+
+		r = r.length == 1 ? '0' + r : r;
+		g = g.length == 1 ? '0' + g : g;
+		b = b.length == 1 ? '0' + b : b;
+
+		return "#" + r + g + b;
+	}
+
+	return col;
+}
+
+function convertHexToRGB(col) {
+	if (col.indexOf('#') != -1) {
+		col = col.replace(new RegExp('[^0-9A-F]', 'gi'), '');
+
+		r = parseInt(col.substring(0, 2), 16);
+		g = parseInt(col.substring(2, 4), 16);
+		b = parseInt(col.substring(4, 6), 16);
+
+		return "rgb(" + r + "," + g + "," + b + ")";
+	}
+
+	return col;
+}
+
+function trimSize(size) {
+	return size.replace(new RegExp('[^0-9%]', 'gi'), '');
+}
+
+function getCSSSize(size) {
+	size = trimSize(size);
+
+	if (size == "")
+		return "";
+
+	return size.indexOf('%') != -1 ? size : size + "px";
+}
+
+function getStyle(elm, attrib, style) {
+	var val = tinyMCE.getAttrib(elm, attrib);
+
+	if (val != '')
+		return '' + val;
+
+	if (typeof(style) == 'undefined')
+		style = attrib;
+
+	val = eval('elm.style.' + style);
+
+	return val == null ? '' : '' + val;
+}

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/utils/mclayer.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/utils/mclayer.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/utils/mclayer.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,212 @@
+/**
+ * $RCSfile: mclayer.js,v $
+ * $Revision: 1.2 $
+ * $Date: 2006/02/06 20:11:09 $
+ *
+ * Moxiecode floating layer script.
+ *
+ * @author Moxiecode
+ * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
+ */
+
+function MCLayer(id) {
+	this.id = id;
+	this.settings = new Array();
+	this.blockerElement = null;
+	this.isMSIE = navigator.appName == "Microsoft Internet Explorer";
+	this.events = false;
+	this.autoHideCallback = null;
+}
+
+MCLayer.prototype = {
+	moveRelativeTo : function(re, p, a) {
+		var rep = this.getAbsPosition(re);
+		var w = parseInt(re.offsetWidth);
+		var h = parseInt(re.offsetHeight);
+		var x, y;
+
+		switch (p) {
+			case "tl":
+				break;
+
+			case "tr":
+				x = rep.absLeft + w;
+				y = rep.absTop;
+				break;
+
+			case "bl":
+				break;
+
+			case "br":
+				break;
+		}
+
+		this.moveTo(x, y);
+	},
+
+	moveBy : function(dx, dy) {
+		var e = this.getElement();
+		var x = parseInt(e.style.left);
+		var y = parseInt(e.style.top);
+
+		e.style.left = (x + dx) + "px";
+		e.style.top = (y + dy) + "px";
+
+		this.updateBlocker();
+	},
+
+	moveTo : function(x, y) {
+		var e = this.getElement();
+
+		e.style.left = x + "px";
+		e.style.top = y + "px";
+
+		this.updateBlocker();
+	},
+
+	show : function() {
+		MCLayer.visibleLayer = this;
+
+		this.getElement().style.display = 'block';
+		this.updateBlocker();
+	},
+
+	hide : function() {
+		this.getElement().style.display = 'none';
+		this.updateBlocker();
+	},
+
+	setAutoHide : function(s, cb) {
+		this.autoHideCallback = cb;
+		this.registerEventHandlers();
+	},
+
+	getElement : function() {
+		return document.getElementById(this.id);
+	},
+
+	updateBlocker : function() {
+		if (!this.isMSIE)
+			return;
+
+		var e = this.getElement();
+		var b = this.getBlocker();
+		var x = this.parseInt(e.style.left);
+		var y = this.parseInt(e.style.top);
+		var w = this.parseInt(e.offsetWidth);
+		var h = this.parseInt(e.offsetHeight);
+
+		b.style.left = x + 'px';
+		b.style.top = y + 'px';
+		b.style.width = w + 'px';
+		b.style.height = h + 'px';
+		b.style.display = e.style.display;
+	},
+
+	getBlocker : function() {
+		if (!this.blockerElement) {
+			var d = document, b = d.createElement("iframe");
+
+			b.style.cssText = 'display: none; left: 0px; position: absolute; top: 0';
+			b.src = 'javascript:false;';
+			b.frameBorder = '0';
+			b.scrolling = 'no';
+
+			d.body.appendChild(b);
+			this.blockerElement = b;
+		}
+
+		return this.blockerElement;
+	},
+
+	getAbsPosition : function(n) {
+		var p = {absLeft : 0, absTop : 0};
+
+		while (n) {
+			p.absLeft += n.offsetLeft;
+			p.absTop += n.offsetTop;
+			n = n.offsetParent;
+		}
+
+		return p;
+	},
+
+	registerEventHandlers : function() {
+		if (!this.events) {
+			var d = document;
+
+			this.addEvent(d, 'mousedown', MCLayer.prototype.onMouseDown);
+
+			this.events = true;
+		}
+	},
+
+	addEvent : function(o, n, h) {
+		if (o.attachEvent)
+			o.attachEvent("on" + n, h);
+		else
+			o.addEventListener(n, h, false);
+	},
+
+	onMouseDown : function(e) {
+		e = typeof(e) == "undefined" ? window.event : e;
+		var b = document.body;
+		var l = MCLayer.visibleLayer;
+
+		if (l) {
+			var mx = l.isMSIE ? e.clientX + b.scrollLeft : e.pageX;
+			var my = l.isMSIE ? e.clientY + b.scrollTop : e.pageY;
+			var el = l.getElement();
+			var x = parseInt(el.style.left);
+			var y = parseInt(el.style.top);
+			var w = parseInt(el.offsetWidth);
+			var h = parseInt(el.offsetHeight);
+
+			if (!(mx > x && mx < x + w && my > y && my < y + h)) {
+				MCLayer.visibleLayer = null;
+
+				if (l.autoHideCallback && l.autoHideCallback(l, e, mx, my))
+					return true;
+
+				l.hide();
+			}
+		}
+	},
+
+	addCSSClass : function(e, c) {
+		this.removeCSSClass(e, c);
+		var a = this.explode(' ', e.className);
+		a[a.length] = c;
+		e.className = a.join(' ');
+	},
+
+	removeCSSClass : function(e, c) {
+		var a = this.explode(' ', e.className), i;
+
+		for (i=0; i<a.length; i++) {
+			if (a[i] == c)
+				a[i] = '';
+		}
+
+		e.className = a.join(' ');
+	},
+
+	explode : function(d, s) {
+		var ar = s.split(d);
+		var oar = new Array();
+
+		for (var i = 0; i<ar.length; i++) {
+			if (ar[i] != "")
+				oar[oar.length] = ar[i];
+		}
+
+		return oar;
+	},
+
+	parseInt : function(s) {
+		if (s == null || s == '')
+			return 0;
+
+		return parseInt(s);
+	}
+}
\ No newline at end of file

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/utils/mctabs.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/utils/mctabs.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/utils/mctabs.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,76 @@
+/**
+ * $RCSfile: mctabs.js,v $
+ * $Revision: 1.2 $
+ * $Date: 2006/02/06 20:11:09 $
+ *
+ * Moxiecode DHTML Tabs script.
+ *
+ * @author Moxiecode
+ * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
+ */
+
+function MCTabs() {
+	this.settings = new Array();
+};
+
+MCTabs.prototype.init = function(settings) {
+	this.settings = settings;
+};
+
+MCTabs.prototype.getParam = function(name, default_value) {
+	var value = null;
+
+	value = (typeof(this.settings[name]) == "undefined") ? default_value : this.settings[name];
+
+	// Fix bool values
+	if (value == "true" || value == "false")
+		return (value == "true");
+
+	return value;
+};
+
+MCTabs.prototype.displayTab = function(tab_id, panel_id) {
+	var panelElm = document.getElementById(panel_id);
+	var panelContainerElm = panelElm ? panelElm.parentNode : null;
+	var tabElm = document.getElementById(tab_id);
+	var tabContainerElm = tabElm ? tabElm.parentNode : null;
+	var selectionClass = this.getParam('selection_class', 'current');
+
+	if (tabElm && tabContainerElm) {
+		var nodes = tabContainerElm.childNodes;
+
+		// Hide all other tabs
+		for (var i=0; i<nodes.length; i++) {
+			if (nodes[i].nodeName == "LI")
+				nodes[i].className = '';
+		}
+
+		// Show selected tab
+		tabElm.className = 'current';
+	}
+
+	if (panelElm && panelContainerElm) {
+		var nodes = panelContainerElm.childNodes;
+
+		// Hide all other panels
+		for (var i=0; i<nodes.length; i++) {
+			if (nodes[i].nodeName == "DIV")
+				nodes[i].className = 'panel';
+		}
+
+		// Show selected panel
+		panelElm.className = 'current';
+	}
+};
+
+MCTabs.prototype.getAnchor = function() {
+	var pos, url = document.location.href;
+
+	if ((pos = url.lastIndexOf('#')) != -1)
+		return url.substring(pos + 1);
+
+	return "";
+};
+
+// Global instance
+var mcTabs = new MCTabs();

Added: trunk/OzinoCMS/root/static/javascript/tiny_mce/utils/validate.js
===================================================================
--- trunk/OzinoCMS/root/static/javascript/tiny_mce/utils/validate.js	                        (rev 0)
+++ trunk/OzinoCMS/root/static/javascript/tiny_mce/utils/validate.js	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,50 @@
+/**
+ * $RCSfile: validate.js,v $
+ * $Revision: 1.3 $
+ * $Date: 2006/02/06 20:11:09 $
+ *
+ * Various form validation methods.
+ *
+ * @author Moxiecode
+ * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
+ */
+
+function testRegExp(form_name, element_name, re) {
+	return new RegExp(re).test(document.forms[form_name].elements[element_name].value);
+}
+
+function validateString(form_name, element_name) {
+	return (document.forms[form_name].elements[element_name].value.length > 0);
+}
+
+function validateSelection(form_name, element_name) {
+	return (document.forms[form_name].elements[element_name].selectedIndex > 0);
+}
+
+function validateCheckBox(form_name, element_name) {
+	return document.forms[form_name].elements[element_name].checked;
+}
+
+function validateCleanString(form_name, element_name) {
+	return testRegExp(form_name, element_name, '^[A-Za-z0-9_]+$');
+}
+
+function validateEmail(form_name, element_name) {
+	return testRegExp(form_name, element_name, '^[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+@[-!#$%&\'*+\\/0-9=?A-Z^_`a-z{|}~]+\.[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+$');
+}
+
+function validateAbsUrl(form_name, element_name) {
+	return testRegExp(form_name, element_name, '^(news|telnet|nttp|file|http|ftp|https)://[-A-Za-z0-9\\.]+$');
+}
+
+function validateNumber(form_name, element_name, allow_blank) {
+	return (!allow_blank && value == '') ? false : testRegExp(form_name, element_name, '^-?[0-9]*\\.?[0-9]*$');
+}
+
+function validateSize(form_name, element_name,) {
+	return testRegExp(form_name, element_name, '^[0-9]+(px|%)?$');
+}
+
+function validateID(form_name, element_name,) {
+	return testRegExp(form_name, element_name, '^[A-Za-z_]([A-Za-z0-9_])*$');
+}

Added: trunk/OzinoCMS/root/static/style/add-style.css
===================================================================
--- trunk/OzinoCMS/root/static/style/add-style.css	                        (rev 0)
+++ trunk/OzinoCMS/root/static/style/add-style.css	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,93 @@
+/* CSS Document */
+
+#addCategoryheader {
+	height:1em;
+	font:Verdana, Arial, Helvetica, sans-serif;
+	font-size:24px;
+	font-weight: bold;
+	color:#103857;
+	margin-left:10px;
+}
+
+#addCategoryheader a {
+	padding:5px;
+	padding-right:25px;
+	font-size:12px;
+	font-weight:normal;
+	color:#3882b8;
+	border: solid 1px #b8b8b8;
+	background: url(/static/images/icon/add.gif) no-repeat right;
+	background-color:#FFFFFF;
+	text-decoration: none;
+	margin-right: 10px;
+	margin-top: 5px;
+}
+
+
+#line {
+	width:860px;
+	height:24px;
+	background:url(/static/images/bar.gif) 0px 17px repeat-x;
+	padding-left:10px;
+}
+
+#line_ {
+	width:900px;
+	margin-left:auto;
+	margin-right:auto;
+	background:url(/static/images/bar.gif) 0px 17px repeat-x;
+	padding-left:10px;
+	height:50px;
+}	
+
+table {
+	margin-left:15px;
+	font:Verdana, Arial, Helvetica, sans-serif;
+	font-size:14px;
+	color:#103857;
+}
+
+.title {
+	font:Verdana, Arial, Helvetica, sans-serif;
+	font-size:14px;
+	color:#3882b8;
+}
+
+#td_bg {
+	width:100%;
+	height:17px;
+	background:url(/static/images/bar.gif) 0px 5px repeat-x;
+}
+
+#categoryLanguage td {
+	background-color:#f5f5f5;
+	padding: 3px;
+	border: 1px solid #e6e6e6;
+}
+
+#someMargin {
+	margin-left:10px;
+}
+
+.message {
+	width: 315px;
+	border: 1px #2571ab solid;
+	margin-left: auto;
+	margin-right: auto;
+	margin-top: 24px;
+	margin-bottom:0px;
+	background-color: #0e3350;
+	color: #ebcd4e;
+	text-align: center;
+	padding: 5px;
+	font-size:11px;
+}
+
+table #categoryLanguage .noDisplay {
+	background-color:#FFFFFF;
+	border:none;
+}
+
+#fieldSetProperties {
+	width:75%;
+}
\ No newline at end of file

Added: trunk/OzinoCMS/root/static/style/lightbox.css
===================================================================
--- trunk/OzinoCMS/root/static/style/lightbox.css	                        (rev 0)
+++ trunk/OzinoCMS/root/static/style/lightbox.css	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,104 @@
+#lightbox{
+	position: absolute;
+	top: 40px;
+	left: 0;
+	width: 100%;
+	z-index: 100;
+	text-align: center;
+	line-height: 0;
+	}
+
+#lightbox a img{ border: none; }
+
+#outerImageContainer{
+	position: relative;
+	background-color: #fff;
+	width: 250px;
+	height: 250px;
+	margin: 0 auto;
+	}
+
+#imageContainer{
+	padding: 10px;
+	}
+
+#loading{
+	position: absolute;
+	top: 40%;
+	left: 0%;
+	height: 25%;
+	width: 100%;
+	text-align: center;
+	line-height: 0;
+	}
+#hoverNav{
+	position: absolute;
+	top: 0;
+	left: 0;
+	height: 100%;
+	width: 100%;
+	z-index: 10;
+	}
+#imageContainer>#hoverNav{ left: 0;}
+#hoverNav a{ outline: none;}
+
+#prevLink, #nextLink{
+	width: 49%;
+	height: 100%;
+	background: transparent url(/static/images/lightbox/blank.gif) no-repeat; /* Trick IE into showing hover */
+	display: block;
+	}
+#prevLink { left: 0; float: left;}
+#nextLink { right: 0; float: right;}
+#prevLink:hover, #prevLink:visited:hover { background: url(/static/images/lightbox/prevlabel.gif) left 15% no-repeat; }
+#nextLink:hover, #nextLink:visited:hover { background: url(/static/images/lightbox/nextlabel.gif) right 15% no-repeat; }
+
+
+#imageDataContainer{
+	font: 10px Verdana, Helvetica, sans-serif;
+	background-color: #fff;
+	margin: 0 auto;
+	line-height: 1.4em;
+	}
+
+#imageData{
+	padding:0 10px;
+	}
+#imageData #imageDetails{ width: 70%; float: left; text-align: left; }	
+#imageData #caption{ font-weight: bold;	}
+#imageData #numberDisplay{ display: block; clear: left; padding-bottom: 1.0em;	}			
+#imageData #bottomNavClose{ width: 66px; float: right;  padding-bottom: 0.7em;	}	
+		
+#overlay{
+	position: absolute;
+	top: 0;
+	left: 0;
+	z-index: 90;
+	width: 100%;
+	height: 500px;
+	background-color: #000;
+	filter:alpha(opacity=60);
+	-moz-opacity: 0.6;
+	opacity: 0.6;
+	}
+	
+
+.clearfix:after {
+	content: "."; 
+	display: block; 
+	height: 0; 
+	clear: both; 
+	visibility: hidden;
+	}
+
+* html>body .clearfix {
+	display: inline-block; 
+	width: 100%;
+	}
+
+* html .clearfix {
+	/* Hides from IE-mac \*/
+	height: 1%;
+	/* End hide from IE-mac */
+	}	
+	

Added: trunk/OzinoCMS/root/static/style/login.css
===================================================================
--- trunk/OzinoCMS/root/static/style/login.css	                        (rev 0)
+++ trunk/OzinoCMS/root/static/style/login.css	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,120 @@
+/* CSS Document */
+.clearBoth {
+	clear:both;
+}
+body {
+	margin:0px;
+}
+#wrapper {
+	margin-top: 30px;
+	width:382px;
+	margin-left:auto;
+	margin-right:auto;
+}
+#container {
+	background:url(/static/images/background.gif) repeat-x;
+}	
+#topCorner {
+	background:url(/static/images/login_top-corner.gif) no-repeat;
+	height: 20px;
+}
+#bottomCorner {
+	background:url(/static/images/login_bottom-corner.gif) no-repeat;
+	height: 20px;
+}
+#logo {
+	background:url(/static/images/logo.gif) no-repeat;
+	width:174px;
+	height:89px;
+	margin-left:auto;
+	display:block;
+	margin-right:auto;
+	margin-bottom: 15px;
+}
+label.txt {
+	font-family:Verdana, Arial, Helvetica, sans-serif;
+	font-size:12px;
+	color:#FFFFFF;
+}
+#inputFormContainer {
+	width:382px;
+	margin: 0px;
+	background:url(/static/images/login_containerBorder.gif) repeat-y;
+}
+input.loginTxt {
+	background-color:#eee;
+	border: solid 1px #b2b2b2;
+	width:100%;
+	font-size: x-large;
+	margin-bottom: 1em;
+	margin-top: 2px;	
+}
+input.loginTxt:focus {
+	background-color: #fff;
+}
+input.submit {
+	background:url(/static/images/fade-butt.png);
+	border: 3px double #999;
+	border-left-color: #ccc;
+	border-top-color: #ccc;
+	color: #333;
+	padding: 0.25em;
+}
+#formElements {
+	width: 80%;
+	margin-left: auto;
+	margin-right: auto;
+}
+#loginError {
+	width: 315px;
+	border: 1px #2571ab solid;
+	margin-left: auto;
+	margin-right: auto;
+	background-color: #0e3350;
+	color: #ebcd4e;
+	text-align: center;
+	margin-bottom: 25px;
+	padding: 5px;
+	display: none;
+	font-size:11px;
+}
+
+#inputMessage  {
+	width: 315px;
+	margin-left: auto;
+	margin-right: auto;
+	color: #fff;
+	text-align: center;
+	margin-bottom: 25px;
+	padding: 5px;
+	display: none;
+}
+#inputMessage a {
+	font-size: 13px;
+	color: #FFFFFF;
+}
+#loginHotLinks {
+	width: 90%;
+	margin-top: 30px;
+	font-size: 13px;
+	margin-left: auto;
+	margin-right: auto;
+}
+#loginHotLinks a {
+	display: block;
+	text-decoration: none;
+	color: #84c4f0;
+	padding-left: 7px;
+	padding-right: 7px;
+	border: 1px #0F3552 solid;
+}
+#loginHotLinks a:hover {
+	border: 1px #84c4f0 solid ;
+}
+#loginBack2Web {
+	float: left;
+}
+
+#loginResetPassword {
+	float: right;
+}
\ No newline at end of file

Added: trunk/OzinoCMS/root/static/style/progress.css
===================================================================
--- trunk/OzinoCMS/root/static/style/progress.css	                        (rev 0)
+++ trunk/OzinoCMS/root/static/style/progress.css	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,48 @@
+.progressmeter {
+    font-family: Arial;
+    font-size: 10pt;
+    text-align: center;
+}
+
+.progressmeter table {
+}
+
+.progressmeter th {
+    font-weight: bold;
+    text-align: right;
+}
+
+.progressmeter td {
+    text-align: left;
+}
+
+.finished {
+    color: #667799;
+}
+
+.progressmeter .meter {
+    position: relative;
+    background-color: lightgrey;
+    border: 2px solid #667799;
+    height: 20px;
+    width: 380px;
+}
+
+.progressmeter .meter .amount {
+    background-color: #667799;
+    width: 0px;
+    height: 20px
+}
+
+.progressmeter .meter .percent {
+    position: absolute;
+    top: 0px;
+    left: 0px;
+    width: 100%;
+    height: 20px;
+    z-index: 1000;
+    text-align: center;
+    font-family: Arial;
+    font-size: 18px;
+    font-weight: bold;
+}

Added: trunk/OzinoCMS/root/static/style/rainbow.office.ozino.com/images/body_background.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/style/rainbow.office.ozino.com/images/body_background.gif
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/style/rainbow.office.ozino.com/images/bottomleft.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/style/rainbow.office.ozino.com/images/bottomleft.gif
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/style/rainbow.office.ozino.com/images/bottomright.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/style/rainbow.office.ozino.com/images/bottomright.gif
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/style/rainbow.office.ozino.com/images/picture.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/style/rainbow.office.ozino.com/images/picture.gif
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/style/rainbow.office.ozino.com/images/topleft.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/style/rainbow.office.ozino.com/images/topleft.gif
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/style/rainbow.office.ozino.com/images/topright.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/style/rainbow.office.ozino.com/images/topright.gif
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/style/rainbow.office.ozino.com/style.css
===================================================================
--- trunk/OzinoCMS/root/static/style/rainbow.office.ozino.com/style.css	                        (rev 0)
+++ trunk/OzinoCMS/root/static/style/rainbow.office.ozino.com/style.css	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,137 @@
+/* CSS Document */
+
+body {
+	background:url(images/body_background.gif) repeat-x;
+	margin: 0px;
+}
+#wrapper {
+	width: 899px;
+	min-height: 369px;
+	_height: 369px;
+	margin-left: auto;
+	margin-right: auto;
+	margin-top: 100px;
+}
+#header {
+	width: 100%;
+	height:43px;
+	margin:0px;
+}
+#topLeft {
+	float: left;
+	width: 860px;
+	height:43px;
+}
+
+#topCornerLeft {
+	background: url(images/topleft.gif) top left no-repeat;
+	height: 43px;
+	width: 38px;
+	float: left;
+}
+#headerMenu {
+	float:right;
+	width: 822px;
+	height: 43px;
+	background-color:#FFFFFF;
+	text-align: center;
+	font-family: "Arial Narrow", Arial, Helvetica, sans-serif ;
+	font-size: 12px;
+	color: #777;
+}
+#menuItems {
+	margin-top: 20px;
+}
+#topCornerRight {
+	background:url(images/topright.gif) top right no-repeat;
+	height:43px;
+	width:39px;
+	float:right;
+}
+#pictureArea {
+	width: 203px;
+	height: 283px;
+	background:url(images/picture.gif);
+	float:left;
+}
+#footer{
+	width: 899px;
+	height:43px;
+	margin:0px;
+}
+#bottomLeft {
+	float: left;
+	width: 860px;
+	height:43px;
+}
+#bottomCornerLeft {
+	background:url(images/bottomleft.gif) bottom left no-repeat;
+	height: 43px;
+	width: 38px;
+	float: left;
+}
+#footerSpacer {
+	float:right;
+	width: 822px;
+	height: 43px;
+	background-color:#FFFFFF;
+}
+#bottomCornerRight {
+	background:url(images/bottomright.gif) bottom right no-repeat;
+	height:43px;
+	width:39px;
+	float:right;
+}
+
+#contentWrapper {
+	min-height: 283px;
+	background-color:#FFFFFF;
+	_height: 283px;
+	width:899px;
+}
+#contentArea {
+	width:696px;
+	_height:283px;
+	background-color:#FFFFFF;
+	min-height:283px;
+	float:right;
+}
+#productBar {
+	width:97%;
+	height:17px;
+	background-color:#ffa233;
+}
+#productTitle {
+	font-size:12px;
+	font-family:Verdana;
+	color:#0066cc;
+	margin-top:30px;
+}
+.productTableTitle {
+	font-size:10px;
+	font-family:Verdana;
+	color:#0066cc;
+
}
+.img1 {
+	width:102px;
+	height:102px;
+	border:#808080 solid 1px;
+}
+
.img1 img {
+	margin-top:2px;
+}
+.nameDescription {
+	border:#808080 solid 1px;
+	width:400px;
+}
+.name {
+	border-right:#4d4d4d dashed 1px;
+	height:100%;
+}
+.name p, .description p	 {
+	font-family:Arial;
+	font-size:12px;
+	color:#4d4d4d;
+	text-align:center;
+	margin:1ex;
+}
\ No newline at end of file


Property changes on: trunk/OzinoCMS/root/static/style/rainbow.office.ozino.com/style.css
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/OzinoCMS/root/static/style/shuttle.office.ozino.com/images/body_background.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/style/shuttle.office.ozino.com/images/body_background.gif
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/style/shuttle.office.ozino.com/images/bottomleft.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/style/shuttle.office.ozino.com/images/bottomleft.gif
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/style/shuttle.office.ozino.com/images/bottomright.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/style/shuttle.office.ozino.com/images/bottomright.gif
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/style/shuttle.office.ozino.com/images/picture.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/style/shuttle.office.ozino.com/images/picture.gif
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/style/shuttle.office.ozino.com/images/topleft.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/style/shuttle.office.ozino.com/images/topleft.gif
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/style/shuttle.office.ozino.com/images/topright.gif
===================================================================
(Binary files differ)


Property changes on: trunk/OzinoCMS/root/static/style/shuttle.office.ozino.com/images/topright.gif
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OzinoCMS/root/static/style/shuttle.office.ozino.com/style.css
===================================================================
--- trunk/OzinoCMS/root/static/style/shuttle.office.ozino.com/style.css	                        (rev 0)
+++ trunk/OzinoCMS/root/static/style/shuttle.office.ozino.com/style.css	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,107 @@
+/* CSS Document */
+
+body {
+	background:url(images/body_background.gif) repeat-x;
+	margin: 0px;
+}
+#wrapper {
+	width: 899px;
+	min-height: 300px;
+	_height: 300px;
+	margin-left: auto;
+	margin-right: auto;
+	margin-top: 100px;
+}
+#header {
+	width: 100%;
+	height:43px;
+	margin:0px;
+}
+#topLeft {
+	float: left;
+	width: 860px;
+	height:43px;
+}
+
+#topCornerLeft {
+	background: url(images/topleft.gif) top left no-repeat;
+	height: 43px;
+	width: 38px;
+	float: left;
+}
+#headerMenu {
+	float:right;
+	width: 822px;
+	height: 43px;
+	background-color:#FFFFFF;
+	text-align: center;
+	font-family: "Arial Narrow", Arial, Helvetica, sans-serif ;
+	font-size: 12px;
+	color: #777;
+}
+#menuItems {
+	margin-top: 20px;
+}
+#topCornerRight {
+	background:url(images/topright.gif) top right no-repeat;
+	height:43px;
+	width:39px;
+	float:right;
+}
+#pictureArea {
+	width: 203px;
+	height: 283px;
+	background:url(images/picture.gif);
+	float:left;
+}
+#footer{
+	width: 100%;
+	height:43px;
+	margin:0px;
+}
+#bottomLeft {
+	float: left;
+	width: 860px;
+	height:43px;
+}
+#bottomCornerLeft {
+	background:url(images/bottomleft.gif) bottom left no-repeat;
+	height: 43px;
+	width: 38px;
+	float: left;
+}
+#footerSpacer {
+	float:right;
+	width: 822px;
+	height: 43px;
+	background-color:#FFFFFF;
+}
+#bottomCornerRight {
+	background:url(images/bottomright.gif) bottom right no-repeat;
+	height:43px;
+	width:39px;
+	float:right;
+}
+
+#contentWrapper {
+	min-height: 285px;
+	background-color:#FFFFFF;
+	_height: 285px;
+}
+#contentArea {
+}
+
+.gizmoHeader{
+	width: 80%;
+	background-color: orange;
+	padding: 3px;
+}
+
+.gizmoFooter{
+	width: 80%;
+	padding: 3px;
+}
+
+.gizmoHeaderKeys{
+	padding: 10px
+}


Property changes on: trunk/OzinoCMS/root/static/style/shuttle.office.ozino.com/style.css
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/OzinoCMS/root/static/style/style.css
===================================================================
--- trunk/OzinoCMS/root/static/style/style.css	                        (rev 0)
+++ trunk/OzinoCMS/root/static/style/style.css	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,166 @@
+/* CSS Document */
+
+#dataContainer {
+	width: 100%;
+}
+.gizmoHeader{
+	width: 60%;
+	background-color: #bbb;
+	padding: 3px;
+}
+
+.gizmoFooter{
+	width: 60%;
+	padding: 3px;
+}
+
+.gizmoHeaderKeys{
+	padding: 10px
+}
+
+.editContentArea{
+	background-color: white;
+	border: 1px dashed orange;
+	padding: 10px;
+	margin-top: 20px;
+	margin-left: auto;
+	margin-right: auto; 
+	width:90%;
+}
+
+.contentAreaEditHeader {
+	position: relative;
+	top: -20px;
+	border: 1px #bbb solid;
+	background-color:#FFFFFF;
+	padding: 3px;
+	color: #666;
+	float: left;
+
+}
+.contentAreaEditHeaderIcon a {
+	padding: 0px;
+	margin: 0px;
+}
+.contentAreaEditHeaderIcon {
+	position: relative;
+	top: -20px;
+	border: 1px #bbb solid;
+	background-color:#FFFFFF;
+	padding: 3px;
+	float: right;
+}
+
+body {
+	font-family:Verdana, Arial, Helvetica, sans-serif;
+	font-size:14px;
+}
+
+body, #Menu ul, #subMenu ul{
+	padding:0px;
+	margin:0px;
+}
+
+
+body {
+	background-color:#e7f0ec;
+}
+
+#wrapper {
+	margin-left:auto;
+	margin-right:auto;
+	min-height:600px;
+	_height:600px;
+	width:944px;
+	border:#3882b8 solid 1px;
+	background-color:#FFFFFF;
+}	
+
+#header {
+	width: 944px;
+	height: 67px;
+	background:url(/static/images/header.gif) no-repeat;
+}
+
+#logo {
+	width:199px;
+	height:67px;
+	background:url(/static/images/logo1.gif) no-repeat;
+/*	float:left; */
+}
+
+#Menu {
+	background-color:#103857;
+	width:944px;
+	color:#FFFFFF;
+	font: Verdana, Arial, Helvetica, sans-serif;
+	font-size:13px;
+	height:1.2em;
+}
+
+#Menu a:link, #Menu a:visited, #Menu a:hover, #subMenu a:link, #subMenu a:visited, #subMenu a:hover, #subMenu a:active {
+	color:#FFFFFF;
+	text-decoration:none;
+	padding-left:.2em;
+	padding-right:.2em;
+}
+
+.active {
+	background:#3882b8;
+}
+
+#Menu li, #subMenu li {
+	display:inline;
+	margin-left:.7em;
+}
+
+#subMenu {
+	background-color:#3882b8;
+	width:944px;
+	color:#FFFFFF;
+	font: Verdana, Arial, Helvetica, sans-serif;
+	font-size:12px;
+	height:1.4em;
+}
+
+#contentAreaContainer {
+	background-color:#FFFFFF;
+	width:944px;
+	min-height:480px;
+	_height:480px;
+}
+
+#footer {
+	width:944px;
+	height:17px;
+	background-color:#103857;
+	margin-right:2px;
+	padding-top:3px;
+}
+	
+#footerIcon {
+	background:url(/static/images/icon.gif) no-repeat;
+	width:80px;
+	height:15px;
+	margin-left:861px;
+}
+.adminHotLinkArea {
+	text-align: center;
+	float: right;
+	border: 1px solid orange;
+	padding: 1px;
+	margin: 5px;
+	width: 10em;
+	background-color: white;
+}
+.adminHotLinkArea a {
+	color: black;
+	text-decoration: none;
+}
+.contentArea {
+	margin-top: 35px;
+}
+img {
+	border:none;
+}
+

Added: trunk/OzinoCMS/script/cms_cgi.pl
===================================================================
--- trunk/OzinoCMS/script/cms_cgi.pl	                        (rev 0)
+++ trunk/OzinoCMS/script/cms_cgi.pl	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,37 @@
+#!/usr/bin/perl -w
+
+BEGIN { $ENV{CATALYST_ENGINE} ||= 'CGI' }
+
+use strict;
+use warnings;
+use FindBin;
+use lib "$FindBin::Bin/../lib";
+use cms;
+
+cms->run;
+
+1;
+
+=head1 NAME
+
+cms_cgi.pl - Catalyst CGI
+
+=head1 SYNOPSIS
+
+See L<Catalyst::Manual>
+
+=head1 DESCRIPTION
+
+Run a Catalyst application as a cgi script.
+
+=head1 AUTHOR
+
+Sebastian Riedel, C<sri at oook.de>
+
+=head1 COPYRIGHT
+
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut


Property changes on: trunk/OzinoCMS/script/cms_cgi.pl
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/OzinoCMS/script/cms_create.pl
===================================================================
--- trunk/OzinoCMS/script/cms_create.pl	                        (rev 0)
+++ trunk/OzinoCMS/script/cms_create.pl	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,74 @@
+#!/usr/bin/perl -w
+
+use strict;
+use warnings;
+use Getopt::Long;
+use Pod::Usage;
+use Catalyst::Helper;
+
+my $force = 0;
+my $mech  = 0;
+my $help  = 0;
+
+GetOptions(
+    'nonew|force'    => \$force,
+    'mech|mechanize' => \$mech,
+    'help|?'         => \$help
+ );
+
+pod2usage(1) if ( $help || !$ARGV[0] );
+
+my $helper = Catalyst::Helper->new( { '.newfiles' => !$force, mech => $mech } );
+
+pod2usage(1) unless $helper->mk_component( 'cms', @ARGV );
+
+1;
+
+=head1 NAME
+
+cms_create.pl - Create a new Catalyst Component
+
+=head1 SYNOPSIS
+
+cms_create.pl [options] model|view|controller name [helper] [options]
+
+ Options:
+   -force        don't create a .new file where a file to be created exists
+   -mechanize    use Test::WWW::Mechanize::Catalyst for tests if available
+   -help         display this help and exits
+
+ Examples:
+   cms_create.pl controller My::Controller
+   cms_create.pl -mechanize controller My::Controller
+   cms_create.pl view My::View
+   cms_create.pl view MyView TT
+   cms_create.pl view TT TT
+   cms_create.pl model My::Model
+   cms_create.pl model SomeDB DBIC::Schema MyApp::Schema create=dynamic\
+   dbi:SQLite:/tmp/my.db
+   cms_create.pl model AnotherDB DBIC::Schema MyApp::Schema create=static\
+   dbi:Pg:dbname=foo root 4321
+
+ See also:
+   perldoc Catalyst::Manual
+   perldoc Catalyst::Manual::Intro
+
+=head1 DESCRIPTION
+
+Create a new Catalyst Component.
+
+Existing component files are not overwritten.  If any of the component files
+to be created already exist the file will be written with a '.new' suffix.
+This behavior can be suppressed with the C<-force> option.
+
+=head1 AUTHOR
+
+Sebastian Riedel, C<sri at oook.de>
+Maintained by the Catalyst Core Team.
+
+=head1 COPYRIGHT
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut


Property changes on: trunk/OzinoCMS/script/cms_create.pl
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/OzinoCMS/script/cms_create_dbic.sh
===================================================================
--- trunk/OzinoCMS/script/cms_create_dbic.sh	                        (rev 0)
+++ trunk/OzinoCMS/script/cms_create_dbic.sh	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+./cms_create.pl model CmsDB DBIC::Schema CmsDB  create=static dbi:mysql:dbname=cms:host=21.21.21.3 dummy monaliza "{quote_char => '\`', name_sep => '.' }"


Property changes on: trunk/OzinoCMS/script/cms_create_dbic.sh
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/OzinoCMS/script/cms_fastcgi.pl
===================================================================
--- trunk/OzinoCMS/script/cms_fastcgi.pl	                        (rev 0)
+++ trunk/OzinoCMS/script/cms_fastcgi.pl	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,80 @@
+#!/usr/bin/perl -w
+
+BEGIN { $ENV{CATALYST_ENGINE} ||= 'FastCGI' }
+
+use strict;
+use warnings;
+use Getopt::Long;
+use Pod::Usage;
+use FindBin;
+use lib "$FindBin::Bin/../lib";
+use cms;
+
+my $help = 0;
+my ( $listen, $nproc, $pidfile, $manager, $detach, $keep_stderr );
+ 
+GetOptions(
+    'help|?'      => \$help,
+    'listen|l=s'  => \$listen,
+    'nproc|n=i'   => \$nproc,
+    'pidfile|p=s' => \$pidfile,
+    'manager|M=s' => \$manager,
+    'daemon|d'    => \$detach,
+    'keeperr|e'   => \$keep_stderr,
+);
+
+pod2usage(1) if $help;
+
+cms->run( 
+    $listen, 
+    {   nproc   => $nproc,
+        pidfile => $pidfile, 
+        manager => $manager,
+        detach  => $detach,
+	keep_stderr => $keep_stderr,
+    }
+);
+
+1;
+
+=head1 NAME
+
+cms_fastcgi.pl - Catalyst FastCGI
+
+=head1 SYNOPSIS
+
+cms_fastcgi.pl [options]
+ 
+ Options:
+   -? -help      display this help and exits
+   -l -listen    Socket path to listen on
+                 (defaults to standard input)
+                 can be HOST:PORT, :PORT or a
+                 filesystem path
+   -n -nproc     specify number of processes to keep
+                 to serve requests (defaults to 1,
+                 requires -listen)
+   -p -pidfile   specify filename for pid file
+                 (requires -listen)
+   -d -daemon    daemonize (requires -listen)
+   -M -manager   specify alternate process manager
+                 (FCGI::ProcManager sub-class)
+                 or empty string to disable
+   -e -keeperr   send error messages to STDOUT, not
+                 to the webserver
+
+=head1 DESCRIPTION
+
+Run a Catalyst application as fastcgi.
+
+=head1 AUTHOR
+
+Sebastian Riedel, C<sri at oook.de>
+Maintained by the Catalyst Core Team.
+
+=head1 COPYRIGHT
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut


Property changes on: trunk/OzinoCMS/script/cms_fastcgi.pl
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/OzinoCMS/script/cms_server.pl
===================================================================
--- trunk/OzinoCMS/script/cms_server.pl	                        (rev 0)
+++ trunk/OzinoCMS/script/cms_server.pl	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,111 @@
+#!/usr/bin/perl -w
+
+BEGIN { 
+    $ENV{CATALYST_ENGINE} ||= 'HTTP';
+    $ENV{CATALYST_SCRIPT_GEN} = 30;
+    require Catalyst::Engine::HTTP;
+}  
+
+use strict;
+use warnings;
+use Getopt::Long;
+use Pod::Usage;
+use FindBin;
+use lib "$FindBin::Bin/../lib";
+
+my $debug             = 0;
+my $fork              = 0;
+my $help              = 0;
+my $host              = undef;
+my $port              = 3000;
+my $keepalive         = 0;
+my $restart           = 0;
+my $restart_delay     = 0;
+my $restart_regex     = '\.yml$|\.yaml$|\.pm$';
+my $restart_directory = undef;
+
+my @argv = @ARGV;
+
+GetOptions(
+    'debug|d'             => \$debug,
+    'fork'                => \$fork,
+    'help|?'              => \$help,
+    'host=s'              => \$host,
+    'port=s'              => \$port,
+    'keepalive|k'         => \$keepalive,
+    'restart|r'           => \$restart,
+    'restartdelay|rd=s'   => \$restart_delay,
+    'restartregex|rr=s'   => \$restart_regex,
+    'restartdirectory=s'  => \$restart_directory,
+);
+
+pod2usage(1) if $help;
+
+if ( $restart ) {
+    $ENV{CATALYST_ENGINE} = 'HTTP::Restarter';
+}
+if ( $debug ) {
+    $ENV{CATALYST_DEBUG} = 1;
+}
+
+# This is require instead of use so that the above environment
+# variables can be set at runtime.
+require cms;
+
+cms->run( $port, $host, {
+    argv              => \@argv,
+    'fork'            => $fork,
+    keepalive         => $keepalive,
+    restart           => $restart,
+    restart_delay     => $restart_delay,
+    restart_regex     => qr/$restart_regex/,
+    restart_directory => $restart_directory,
+} );
+
+1;
+
+=head1 NAME
+
+cms_server.pl - Catalyst Testserver
+
+=head1 SYNOPSIS
+
+cms_server.pl [options]
+
+ Options:
+   -d -debug          force debug mode
+   -f -fork           handle each request in a new process
+                      (defaults to false)
+   -? -help           display this help and exits
+      -host           host (defaults to all)
+   -p -port           port (defaults to 3000)
+   -k -keepalive      enable keep-alive connections
+   -r -restart        restart when files get modified
+                      (defaults to false)
+   -rd -restartdelay  delay between file checks
+   -rr -restartregex  regex match files that trigger
+                      a restart when modified
+                      (defaults to '\.yml$|\.yaml$|\.pm$')
+   -restartdirectory  the directory to search for
+                      modified files
+                      (defaults to '../')
+
+ See also:
+   perldoc Catalyst::Manual
+   perldoc Catalyst::Manual::Intro
+
+=head1 DESCRIPTION
+
+Run a Catalyst Testserver for this application.
+
+=head1 AUTHOR
+
+Sebastian Riedel, C<sri at oook.de>
+Maintained by the Catalyst Core Team.
+
+=head1 COPYRIGHT
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut


Property changes on: trunk/OzinoCMS/script/cms_server.pl
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/OzinoCMS/script/cms_test.pl
===================================================================
--- trunk/OzinoCMS/script/cms_test.pl	                        (rev 0)
+++ trunk/OzinoCMS/script/cms_test.pl	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,54 @@
+#!/usr/bin/perl -w
+
+use strict;
+use warnings;
+use Getopt::Long;
+use Pod::Usage;
+use FindBin;
+use lib "$FindBin::Bin/../lib";
+use Catalyst::Test 'cms';
+
+my $help = 0;
+
+GetOptions( 'help|?' => \$help );
+
+pod2usage(1) if ( $help || !$ARGV[0] );
+
+print request($ARGV[0])->content . "\n";
+
+1;
+
+=head1 NAME
+
+cms_test.pl - Catalyst Test
+
+=head1 SYNOPSIS
+
+cms_test.pl [options] uri
+
+ Options:
+   -help    display this help and exits
+
+ Examples:
+   cms_test.pl http://localhost/some_action
+   cms_test.pl /some_action
+
+ See also:
+   perldoc Catalyst::Manual
+   perldoc Catalyst::Manual::Intro
+
+=head1 DESCRIPTION
+
+Run a Catalyst action from the command line.
+
+=head1 AUTHOR
+
+Sebastian Riedel, C<sri at oook.de>
+Maintained by the Catalyst Core Team.
+
+=head1 COPYRIGHT
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut


Property changes on: trunk/OzinoCMS/script/cms_test.pl
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/OzinoCMS/t/01app.t
===================================================================
--- trunk/OzinoCMS/t/01app.t	                        (rev 0)
+++ trunk/OzinoCMS/t/01app.t	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,7 @@
+use strict;
+use warnings;
+use Test::More tests => 2;
+
+BEGIN { use_ok 'Catalyst::Test', 'cms' }
+
+ok( request('/')->is_success, 'Request should succeed' );

Added: trunk/OzinoCMS/t/02pod.t
===================================================================
--- trunk/OzinoCMS/t/02pod.t	                        (rev 0)
+++ trunk/OzinoCMS/t/02pod.t	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,9 @@
+use strict;
+use warnings;
+use Test::More;
+
+eval "use Test::Pod 1.14";
+plan skip_all => 'Test::Pod 1.14 required' if $@;
+plan skip_all => 'set TEST_POD to enable this test' unless $ENV{TEST_POD};
+
+all_pod_files_ok();

Added: trunk/OzinoCMS/t/03podcoverage.t
===================================================================
--- trunk/OzinoCMS/t/03podcoverage.t	                        (rev 0)
+++ trunk/OzinoCMS/t/03podcoverage.t	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,9 @@
+use strict;
+use warnings;
+use Test::More;
+
+eval "use Test::Pod::Coverage 1.04";
+plan skip_all => 'Test::Pod::Coverage 1.04 required' if $@;
+plan skip_all => 'set TEST_POD to enable this test' unless $ENV{TEST_POD};
+
+all_pod_coverage_ok();

Added: trunk/OzinoCMS/t/controller_Admin-Reseller.t
===================================================================
--- trunk/OzinoCMS/t/controller_Admin-Reseller.t	                        (rev 0)
+++ trunk/OzinoCMS/t/controller_Admin-Reseller.t	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,10 @@
+use strict;
+use warnings;
+use Test::More tests => 3;
+
+BEGIN { use_ok 'Catalyst::Test', 'cms' }
+BEGIN { use_ok 'cms::Controller::Admin::Reseller' }
+
+ok( request('/admin/reseller')->is_success, 'Request should succeed' );
+
+

Added: trunk/OzinoCMS/t/controller_Admin-Root.t
===================================================================
--- trunk/OzinoCMS/t/controller_Admin-Root.t	                        (rev 0)
+++ trunk/OzinoCMS/t/controller_Admin-Root.t	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,10 @@
+use strict;
+use warnings;
+use Test::More tests => 3;
+
+BEGIN { use_ok 'Catalyst::Test', 'cms' }
+BEGIN { use_ok 'cms::Controller::Admin::Root' }
+
+ok( request('/admin/root')->is_success, 'Request should succeed' );
+
+

Added: trunk/OzinoCMS/t/controller_Admin-Website-Baghali.t
===================================================================
--- trunk/OzinoCMS/t/controller_Admin-Website-Baghali.t	                        (rev 0)
+++ trunk/OzinoCMS/t/controller_Admin-Website-Baghali.t	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,10 @@
+use strict;
+use warnings;
+use Test::More tests => 3;
+
+BEGIN { use_ok 'Catalyst::Test', 'cms' }
+BEGIN { use_ok 'cms::Controller::Admin::Website::Baghali' }
+
+ok( request('/admin/website/baghali')->is_success, 'Request should succeed' );
+
+

Added: trunk/OzinoCMS/t/controller_Admin-Website-Category.t
===================================================================
--- trunk/OzinoCMS/t/controller_Admin-Website-Category.t	                        (rev 0)
+++ trunk/OzinoCMS/t/controller_Admin-Website-Category.t	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,10 @@
+use strict;
+use warnings;
+use Test::More tests => 3;
+
+BEGIN { use_ok 'Catalyst::Test', 'cms' }
+BEGIN { use_ok 'cms::Controller::Admin::Website::Category' }
+
+ok( request('/admin/website/category')->is_success, 'Request should succeed' );
+
+

Added: trunk/OzinoCMS/t/controller_Admin-Website-File.t
===================================================================
--- trunk/OzinoCMS/t/controller_Admin-Website-File.t	                        (rev 0)
+++ trunk/OzinoCMS/t/controller_Admin-Website-File.t	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,10 @@
+use strict;
+use warnings;
+use Test::More tests => 3;
+
+BEGIN { use_ok 'Catalyst::Test', 'cms' }
+BEGIN { use_ok 'cms::Controller::Admin::Website::File' }
+
+ok( request('/admin/website/file')->is_success, 'Request should succeed' );
+
+

Added: trunk/OzinoCMS/t/controller_Admin-Website-Gizmo.t
===================================================================
--- trunk/OzinoCMS/t/controller_Admin-Website-Gizmo.t	                        (rev 0)
+++ trunk/OzinoCMS/t/controller_Admin-Website-Gizmo.t	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,10 @@
+use strict;
+use warnings;
+use Test::More tests => 3;
+
+BEGIN { use_ok 'Catalyst::Test', 'cms' }
+BEGIN { use_ok 'cms::Controller::Admin::Website::Gizmo' }
+
+ok( request('/admin/website/gizmo')->is_success, 'Request should succeed' );
+
+

Added: trunk/OzinoCMS/t/controller_Admin-Website-Navigation.t
===================================================================
--- trunk/OzinoCMS/t/controller_Admin-Website-Navigation.t	                        (rev 0)
+++ trunk/OzinoCMS/t/controller_Admin-Website-Navigation.t	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,10 @@
+use strict;
+use warnings;
+use Test::More tests => 3;
+
+BEGIN { use_ok 'Catalyst::Test', 'cms' }
+BEGIN { use_ok 'cms::Controller::Admin::Website::Navigation' }
+
+ok( request('/admin/website/navigation')->is_success, 'Request should succeed' );
+
+

Added: trunk/OzinoCMS/t/controller_Admin-Website-Page.t
===================================================================
--- trunk/OzinoCMS/t/controller_Admin-Website-Page.t	                        (rev 0)
+++ trunk/OzinoCMS/t/controller_Admin-Website-Page.t	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,10 @@
+use strict;
+use warnings;
+use Test::More tests => 3;
+
+BEGIN { use_ok 'Catalyst::Test', 'cms' }
+BEGIN { use_ok 'cms::Controller::Admin::Website::Page' }
+
+ok( request('/admin/website/page')->is_success, 'Request should succeed' );
+
+

Added: trunk/OzinoCMS/t/controller_Admin-Website.t
===================================================================
--- trunk/OzinoCMS/t/controller_Admin-Website.t	                        (rev 0)
+++ trunk/OzinoCMS/t/controller_Admin-Website.t	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,10 @@
+use strict;
+use warnings;
+use Test::More tests => 3;
+
+BEGIN { use_ok 'Catalyst::Test', 'cms' }
+BEGIN { use_ok 'cms::Controller::Admin::Website' }
+
+ok( request('/admin/website')->is_success, 'Request should succeed' );
+
+

Added: trunk/OzinoCMS/t/controller_Auth.t
===================================================================
--- trunk/OzinoCMS/t/controller_Auth.t	                        (rev 0)
+++ trunk/OzinoCMS/t/controller_Auth.t	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,10 @@
+use strict;
+use warnings;
+use Test::More tests => 3;
+
+BEGIN { use_ok 'Catalyst::Test', 'cms' }
+BEGIN { use_ok 'cms::Controller::Auth' }
+
+ok( request('/auth')->is_success, 'Request should succeed' );
+
+

Added: trunk/OzinoCMS/t/controller_Common-General.t
===================================================================
--- trunk/OzinoCMS/t/controller_Common-General.t	                        (rev 0)
+++ trunk/OzinoCMS/t/controller_Common-General.t	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,10 @@
+use strict;
+use warnings;
+use Test::More tests => 3;
+
+BEGIN { use_ok 'Catalyst::Test', 'cms' }
+BEGIN { use_ok 'cms::Controller::Common::General' }
+
+ok( request('/common/general')->is_success, 'Request should succeed' );
+
+

Added: trunk/OzinoCMS/t/controller_Common-UserGroup.t
===================================================================
--- trunk/OzinoCMS/t/controller_Common-UserGroup.t	                        (rev 0)
+++ trunk/OzinoCMS/t/controller_Common-UserGroup.t	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,10 @@
+use strict;
+use warnings;
+use Test::More tests => 3;
+
+BEGIN { use_ok 'Catalyst::Test', 'cms' }
+BEGIN { use_ok 'cms::Controller::Common::UserGroup' }
+
+ok( request('/common/usergroup')->is_success, 'Request should succeed' );
+
+

Added: trunk/OzinoCMS/t/controller_Common.t
===================================================================
--- trunk/OzinoCMS/t/controller_Common.t	                        (rev 0)
+++ trunk/OzinoCMS/t/controller_Common.t	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,10 @@
+use strict;
+use warnings;
+use Test::More tests => 3;
+
+BEGIN { use_ok 'Catalyst::Test', 'cms' }
+BEGIN { use_ok 'cms::Controller::Common' }
+
+ok( request('/common')->is_success, 'Request should succeed' );
+
+

Added: trunk/OzinoCMS/t/controller_Core-Category.t
===================================================================
--- trunk/OzinoCMS/t/controller_Core-Category.t	                        (rev 0)
+++ trunk/OzinoCMS/t/controller_Core-Category.t	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,10 @@
+use strict;
+use warnings;
+use Test::More tests => 3;
+
+BEGIN { use_ok 'Catalyst::Test', 'cms' }
+BEGIN { use_ok 'cms::Controller::Core::Category' }
+
+ok( request('/core/category')->is_success, 'Request should succeed' );
+
+

Added: trunk/OzinoCMS/t/controller_Core-File-Image.t
===================================================================
--- trunk/OzinoCMS/t/controller_Core-File-Image.t	                        (rev 0)
+++ trunk/OzinoCMS/t/controller_Core-File-Image.t	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,10 @@
+use strict;
+use warnings;
+use Test::More tests => 3;
+
+BEGIN { use_ok 'Catalyst::Test', 'cms' }
+BEGIN { use_ok 'cms::Controller::Core::File::Image' }
+
+ok( request('/core/file/image')->is_success, 'Request should succeed' );
+
+

Added: trunk/OzinoCMS/t/controller_Core-File.t
===================================================================
--- trunk/OzinoCMS/t/controller_Core-File.t	                        (rev 0)
+++ trunk/OzinoCMS/t/controller_Core-File.t	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,10 @@
+use strict;
+use warnings;
+use Test::More tests => 3;
+
+BEGIN { use_ok 'Catalyst::Test', 'cms' }
+BEGIN { use_ok 'cms::Controller::Core::File' }
+
+ok( request('/core/file')->is_success, 'Request should succeed' );
+
+

Added: trunk/OzinoCMS/t/controller_Core-Module.t
===================================================================
--- trunk/OzinoCMS/t/controller_Core-Module.t	                        (rev 0)
+++ trunk/OzinoCMS/t/controller_Core-Module.t	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,10 @@
+use strict;
+use warnings;
+use Test::More tests => 3;
+
+BEGIN { use_ok 'Catalyst::Test', 'cms' }
+BEGIN { use_ok 'cms::Controller::Core::Module' }
+
+ok( request('/core/module')->is_success, 'Request should succeed' );
+
+

Added: trunk/OzinoCMS/t/controller_Core-Navigation.t
===================================================================
--- trunk/OzinoCMS/t/controller_Core-Navigation.t	                        (rev 0)
+++ trunk/OzinoCMS/t/controller_Core-Navigation.t	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,10 @@
+use strict;
+use warnings;
+use Test::More tests => 3;
+
+BEGIN { use_ok 'Catalyst::Test', 'cms' }
+BEGIN { use_ok 'cms::Controller::Core::Navigation' }
+
+ok( request('/core/navigation')->is_success, 'Request should succeed' );
+
+

Added: trunk/OzinoCMS/t/controller_Core-Page.t
===================================================================
--- trunk/OzinoCMS/t/controller_Core-Page.t	                        (rev 0)
+++ trunk/OzinoCMS/t/controller_Core-Page.t	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,10 @@
+use strict;
+use warnings;
+use Test::More tests => 3;
+
+BEGIN { use_ok 'Catalyst::Test', 'cms' }
+BEGIN { use_ok 'cms::Controller::Core::Page' }
+
+ok( request('/core/page')->is_success, 'Request should succeed' );
+
+

Added: trunk/OzinoCMS/t/controller_Core.t
===================================================================
--- trunk/OzinoCMS/t/controller_Core.t	                        (rev 0)
+++ trunk/OzinoCMS/t/controller_Core.t	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,10 @@
+use strict;
+use warnings;
+use Test::More tests => 3;
+
+BEGIN { use_ok 'Catalyst::Test', 'cms' }
+BEGIN { use_ok 'cms::Controller::Core' }
+
+ok( request('/core')->is_success, 'Request should succeed' );
+
+

Added: trunk/OzinoCMS/t/controller_File-Upload.t
===================================================================
--- trunk/OzinoCMS/t/controller_File-Upload.t	                        (rev 0)
+++ trunk/OzinoCMS/t/controller_File-Upload.t	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,10 @@
+use strict;
+use warnings;
+use Test::More tests => 3;
+
+BEGIN { use_ok 'Catalyst::Test', 'cms' }
+BEGIN { use_ok 'cms::Controller::File::Upload' }
+
+ok( request('/file/upload')->is_success, 'Request should succeed' );
+
+

Added: trunk/OzinoCMS/t/controller__Modules-Menu.t
===================================================================
--- trunk/OzinoCMS/t/controller__Modules-Menu.t	                        (rev 0)
+++ trunk/OzinoCMS/t/controller__Modules-Menu.t	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,10 @@
+use strict;
+use warnings;
+use Test::More tests => 3;
+
+BEGIN { use_ok 'Catalyst::Test', 'cms' }
+BEGIN { use_ok 'cms::Controller::_Modules::Menu' }
+
+ok( request('/_modules/menu')->is_success, 'Request should succeed' );
+
+

Added: trunk/OzinoCMS/t/controller__Modules-Navigator.t
===================================================================
--- trunk/OzinoCMS/t/controller__Modules-Navigator.t	                        (rev 0)
+++ trunk/OzinoCMS/t/controller__Modules-Navigator.t	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,10 @@
+use strict;
+use warnings;
+use Test::More tests => 3;
+
+BEGIN { use_ok 'Catalyst::Test', 'cms' }
+BEGIN { use_ok 'cms::Controller::_Modules::Navigator' }
+
+ok( request('/_modules/navigator')->is_success, 'Request should succeed' );
+
+

Added: trunk/OzinoCMS/t/controller__Modules-ShowProductList.t
===================================================================
--- trunk/OzinoCMS/t/controller__Modules-ShowProductList.t	                        (rev 0)
+++ trunk/OzinoCMS/t/controller__Modules-ShowProductList.t	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,10 @@
+use strict;
+use warnings;
+use Test::More tests => 3;
+
+BEGIN { use_ok 'Catalyst::Test', 'cms' }
+BEGIN { use_ok 'cms::Controller::_Modules::ShowProductList' }
+
+ok( request('/_modules/showproductlist')->is_success, 'Request should succeed' );
+
+

Added: trunk/OzinoCMS/t/controller__Modules-test.t
===================================================================
--- trunk/OzinoCMS/t/controller__Modules-test.t	                        (rev 0)
+++ trunk/OzinoCMS/t/controller__Modules-test.t	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,10 @@
+use strict;
+use warnings;
+use Test::More tests => 3;
+
+BEGIN { use_ok 'Catalyst::Test', 'cms' }
+BEGIN { use_ok 'cms::Controller::_Modules::test' }
+
+ok( request('/_modules/test')->is_success, 'Request should succeed' );
+
+

Added: trunk/OzinoCMS/t/controller__Modules-viewProduct.t
===================================================================
--- trunk/OzinoCMS/t/controller__Modules-viewProduct.t	                        (rev 0)
+++ trunk/OzinoCMS/t/controller__Modules-viewProduct.t	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,10 @@
+use strict;
+use warnings;
+use Test::More tests => 3;
+
+BEGIN { use_ok 'Catalyst::Test', 'cms' }
+BEGIN { use_ok 'cms::Controller::_Modules::viewProduct' }
+
+ok( request('/_modules/viewproduct')->is_success, 'Request should succeed' );
+
+

Added: trunk/OzinoCMS/t/controller__Modules.t
===================================================================
--- trunk/OzinoCMS/t/controller__Modules.t	                        (rev 0)
+++ trunk/OzinoCMS/t/controller__Modules.t	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,10 @@
+use strict;
+use warnings;
+use Test::More tests => 3;
+
+BEGIN { use_ok 'Catalyst::Test', 'cms' }
+BEGIN { use_ok 'cms::Controller::_Modules' }
+
+ok( request('/_modules')->is_success, 'Request should succeed' );
+
+

Added: trunk/OzinoCMS/t/controller_cms.t
===================================================================
--- trunk/OzinoCMS/t/controller_cms.t	                        (rev 0)
+++ trunk/OzinoCMS/t/controller_cms.t	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,10 @@
+use strict;
+use warnings;
+use Test::More tests => 3;
+
+BEGIN { use_ok 'Catalyst::Test', 'cms' }
+BEGIN { use_ok 'cms::Controller::cms' }
+
+ok( request('/cms')->is_success, 'Request should succeed' );
+
+

Added: trunk/OzinoCMS/t/model_CmsDB.t
===================================================================
--- trunk/OzinoCMS/t/model_CmsDB.t	                        (rev 0)
+++ trunk/OzinoCMS/t/model_CmsDB.t	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,6 @@
+use strict;
+use warnings;
+use Test::More tests => 1;
+
+BEGIN { use_ok 'cms::Model::CmsDB' }
+

Added: trunk/OzinoCMS/t/view_TT.t
===================================================================
--- trunk/OzinoCMS/t/view_TT.t	                        (rev 0)
+++ trunk/OzinoCMS/t/view_TT.t	2007-03-31 15:44:51 UTC (rev 6248)
@@ -0,0 +1,6 @@
+use strict;
+use warnings;
+use Test::More tests => 1;
+
+BEGIN { use_ok 'cms::View::TT' }
+




More information about the Catalyst-commits mailing list