{i18n}Only the standard database authentication is currently available.
+
{i18n}Only the standard database authentication is currently available.
If you need to use a different authentication type (e.g. LDAP) you will need to
-ensure that the Plugin is enabled.{/i18n}
+ensure that the Plugin is enabled.{/i18n}
{/if}
{if empty($sources)}
-
{i18n}No additional authentication sources have been defined.{/i18n}
+
{i18n}No additional authentication sources have been defined.{/i18n}
{i18n}All indexers claim to be working correctly.{/i18n}
+
+ {i18n}All indexers claim to be working correctly.{/i18n}
{else}
diff --git a/templates/ktcore/dashlets/notifications.smarty b/templates/ktcore/dashlets/notifications.smarty
index a1a7adc..e6253e4 100644
--- a/templates/ktcore/dashlets/notifications.smarty
+++ b/templates/ktcore/dashlets/notifications.smarty
@@ -18,7 +18,7 @@
kt:deleteMessage="{i18n}Are you sure you wish to clear all notifications?{/i18n}"
class="ktLinkDelete">{i18n}Clear all notifications{/i18n}
{else}
-
{i18n}No items require your attention.{/i18n}
+
{i18n}No items require your attention.{/i18n}
{/if}
\ No newline at end of file
diff --git a/templates/ktcore/document/admin/checkoutlisting.smarty b/templates/ktcore/document/admin/checkoutlisting.smarty
index d59268a..97f8a48 100644
--- a/templates/ktcore/document/admin/checkoutlisting.smarty
+++ b/templates/ktcore/document/admin/checkoutlisting.smarty
@@ -34,7 +34,7 @@ $oUser->getName(); } else { print _kt("N/A"); }{/php}
{else}
-
-
{i18n}No documents are currently checked out.{/i18n}
+
+ {i18n}No documents are currently checked out.{/i18n}
{i18n}No roles or groups have been defined or have permissions.{/i18n}
+
{i18n}No roles or groups have been defined or have permissions.{/i18n}
{else}
diff --git a/templates/ktcore/document/resolved_permissions_user.smarty b/templates/ktcore/document/resolved_permissions_user.smarty
index 4e4db8b..3bda91d 100644
--- a/templates/ktcore/document/resolved_permissions_user.smarty
+++ b/templates/ktcore/document/resolved_permissions_user.smarty
@@ -9,7 +9,7 @@ document due to membership of a group, or fulfilling a specific role on
this document.{/i18n}
{if (empty($users)) }
-
{i18n}No users have permissions on this item.{/i18n}
+
{i18n}No users have permissions on this item.{/i18n}
{i18n}This document is currently checked out by you. If this is incorrect, or you no longer need to make changes to it, please cancel the checkout.{/i18n}
-
-
-
-
-
-
-
+
+ {i18n}This document is currently checked out by you. If this is incorrect, or you no longer need to make changes to it, please cancel the checkout.{/i18n}
{else}
{if ($canCheckin)}
-
-
{i18n arg_checkoutuser=$checkout_user}This document is currently checked out by #checkoutuser#, but you
-have sufficient priviledges to cancel their checkout.{/i18n}
+
+{i18n arg_checkoutuser=$checkout_user}This document is currently checked out by #checkoutuser#, but you
+have sufficient priviledges to cancel their checkout.{/i18n}
{else}
-
-
{i18n arg_checkoutuser=$checkout_user arg_appname="$appname"}This document is currently checked out by #checkoutuser#. You cannot make
+
+ {i18n arg_checkoutuser=$checkout_user arg_appname="$appname"}This document is currently checked out by #checkoutuser#. You cannot make
changes until that user checks it in. If you have urgent modifications to make, please
-contact your #appname# Administrator.{/i18n}
+contact your #appname# Administrator.{/i18n}
{i18n}This document is immutable. No further content changes can be
+
+ {i18n}This document is immutable. No further content changes can be
made to this document, and only administrators (in administration mode)
can make changes to the metadata or can move or delete it.{/i18n}
{if 1}
{i18n}If you require assistance from an administrator to perform one of
these tasks, use the Request Assistance action.{/i18n}
{/if}
-
+
{i18n}No fieldsets are available to be added. To add a fieldset, please go to
-DMS Administration{/i18n} » {i18n}Document Metadata and Workflow Configuration{/i18n} » {i18n}Document Field Management{/i18n}
+
{i18n}No fieldsets are available to be added. To add a fieldset, please go to
+DMS Administration{/i18n} » {i18n}Document Metadata and Workflow Configuration{/i18n} » {i18n}Document Field Management{/i18n}
{ /if }
diff --git a/templates/ktcore/folder/permissions.smarty b/templates/ktcore/folder/permissions.smarty
index 0c2ffcd..2491e2d 100644
--- a/templates/ktcore/folder/permissions.smarty
+++ b/templates/ktcore/folder/permissions.smarty
@@ -6,7 +6,7 @@
{* check if there are roles etc *}
{if ((empty($roles) && empty($groups)))}
-
{i18n}No roles or groups have been defined. Permissions can only be allocated to roles and groups.{/i18n}
+
{i18n}No roles or groups have been defined. Permissions can only be allocated to roles and groups.{/i18n}
{i18n}This folder defines its own permissions.{/i18n}
+
+{i18n}This folder defines its own permissions.{/i18n}
{i18n}Inherit permissions{/i18n}
+ href="{addQS context=$context}action=inheritPermissions{/addQS}">{i18n}Inherit permissions{/i18n}
{/if}
diff --git a/templates/ktcore/folder/resolved_permissions.smarty b/templates/ktcore/folder/resolved_permissions.smarty
index 31c1d2a..ca77b2a 100644
--- a/templates/ktcore/folder/resolved_permissions.smarty
+++ b/templates/ktcore/folder/resolved_permissions.smarty
@@ -5,7 +5,7 @@ this specific folder. Only the roles or groups which have permissions
assigned are shown.{/i18n}
{if (empty($roles) && empty($groups) && empty($users)) }
-
{i18n}No roles, groups, or users have been defined or have permissions.{/i18n}
+
{i18n}No roles, groups, or users have been defined or have permissions.{/i18n}
{else}
{else}
-
{i18n}No columns have been added to this view{/i18n}
+
{i18n}No columns have been added to this view{/i18n}
{i18n}You do not have enough available licenses to add more active users. Please disable some existing ones if you wish to add new active users.{/i18n}
+
{i18n}You do not have enough available licenses to add more active users. Please disable some existing ones if you wish to add new active users.{/i18n}
{/if}
diff --git a/templates/ktcore/search/administration/savedsearches.smarty b/templates/ktcore/search/administration/savedsearches.smarty
index 7c97ae9..4589fb4 100644
--- a/templates/ktcore/search/administration/savedsearches.smarty
+++ b/templates/ktcore/search/administration/savedsearches.smarty
@@ -42,5 +42,5 @@ newsletters, etc.) based on a category or fieldset value.{/i18n}
{i18n}This transition has no actions associated with it..{/i18n}
+
{i18n}This transition has no actions associated with it..{/i18n}
{else}
diff --git a/templates/ktcore/workflow/admin/view.smarty b/templates/ktcore/workflow/admin/view.smarty
index 5e8c4bf..9523ef0 100644
--- a/templates/ktcore/workflow/admin/view.smarty
+++ b/templates/ktcore/workflow/admin/view.smarty
@@ -13,5 +13,5 @@ about states, transitions, security and notifications as they apply to this work
{* *}
{else}
-
{i18n}Install the GraphViz module to get a useful visualisation of your graph here.{/i18n}
+
{i18n}Install the GraphViz module to get a useful visualisation of your graph here.{/i18n}
{/if}
diff --git a/templates/ktcore/workflow/createState.smarty b/templates/ktcore/workflow/createState.smarty
index 765cd4c..ebd917d 100644
--- a/templates/ktcore/workflow/createState.smarty
+++ b/templates/ktcore/workflow/createState.smarty
@@ -63,7 +63,7 @@ this state.{/i18n}
{else}
-
{i18n}No actions are controlled by this workflow.{/i18n}
+
{i18n}No actions are controlled by this workflow.{/i18n}
{/if}
diff --git a/templates/ktcore/workflow/documentWorkflow.smarty b/templates/ktcore/workflow/documentWorkflow.smarty
index be834ef..c1517ed 100644
--- a/templates/ktcore/workflow/documentWorkflow.smarty
+++ b/templates/ktcore/workflow/documentWorkflow.smarty
@@ -64,17 +64,17 @@ at the beginning of the new workflow. This is true even if the new work
{else}
-
-
{i18n}You do not have permission to change the workflow that is assigned to this document.{/i18n}
+
+{i18n}You do not have permission to change the workflow that is assigned to this document.{/i18n}
{/if}
{else}
{i18n}No defined workflows{/i18n}
-
-
{i18n}There are no defined workflows which can be started on this
+
+{i18n}There are no defined workflows which can be started on this
document. An administrator can create workflows to map the lifecycle of
a document. Contact your administrator to discuss
-workflows.{/i18n}
+workflows.{/i18n}
{/if}
diff --git a/templates/ktcore/workflow/editState.smarty b/templates/ktcore/workflow/editState.smarty
index 59dbba4..4c1e4e4 100644
--- a/templates/ktcore/workflow/editState.smarty
+++ b/templates/ktcore/workflow/editState.smarty
@@ -71,7 +71,7 @@ informed when this state is reached.{/i18n}
{/if}
{if (empty($aGroups) && empty($aRoles))}
-
{i18n}No groups or roles are defined in the DMS.{/i18n}
+
{i18n}No groups or roles are defined in the DMS.{/i18n}
{i18n}Items which control whether a given user can perform this transition
on a specific document. All of these must allow the user to perform the transition.{/i18n}
{if empty($aGuardTriggers)}
-
{i18n}Anybody (with the ability to see the document) can perform this transition.{/i18n}
+
{i18n}Anybody (with the ability to see the document) can perform this transition.{/i18n}
{else}
@@ -83,7 +83,7 @@ requirement.{/i18n}
{i18n}Actions which are performed when the document follows the transition.{/i18n}
{if empty($aActionTriggers)}
-
{i18n}No actions are performed when this transition occurs.{/i18n}
+
{i18n}No actions are performed when this transition occurs.{/i18n}
{else}
diff --git a/templates/ktcore/workflow/editWorkflow.smarty b/templates/ktcore/workflow/editWorkflow.smarty
index 9daede9..ef4ca98 100644
--- a/templates/ktcore/workflow/editWorkflow.smarty
+++ b/templates/ktcore/workflow/editWorkflow.smarty
@@ -23,7 +23,7 @@ workflow. To modify items, either select them from the overview below,
or use the "Workflow" menu on the left to create new ones.{/i18n}
{if (empty($workflow_info.states))}
-
{i18n}This workflow does not define any states.{/i18n}
+
{i18n}This workflow does not define any states.{/i18n}
{else}
{foreach item=oState from=$workflow_info.states}
diff --git a/templates/ktcore/workflow/manageActions.smarty b/templates/ktcore/workflow/manageActions.smarty
index 733fa49..837c249 100644
--- a/templates/ktcore/workflow/manageActions.smarty
+++ b/templates/ktcore/workflow/manageActions.smarty
@@ -40,8 +40,8 @@ are available to users whose permissions would normally allow them when the docu
in that state. Unchecked items are not available to any users.{/i18n}
{if (empty($aActionsSelected))}
-
{i18n}No actions are controlled by this workflow. All actions
-will be available at all states.{/i18n}
+
{i18n}No actions are controlled by this workflow. All actions
+will be available at all states.{/i18n}
{else}
diff --git a/templates/ktcore/workflow/manageStates.smarty b/templates/ktcore/workflow/manageStates.smarty
index 2daf4e3..23cb31e 100644
--- a/templates/ktcore/workflow/manageStates.smarty
+++ b/templates/ktcore/workflow/manageStates.smarty
@@ -20,7 +20,7 @@ various different states for documents.{/i18n}
{if (empty($workflow_info.states))}
-
{i18n}This workflow does not define any states.{/i18n}
+
{i18n}This workflow does not define any states.{/i18n}
{else}
{foreach item=oState from=$workflow_info.states}
diff --git a/templates/ktcore/workflow/manageTransitions.smarty b/templates/ktcore/workflow/manageTransitions.smarty
index 59f3931..240cd4f 100644
--- a/templates/ktcore/workflow/manageTransitions.smarty
+++ b/templates/ktcore/workflow/manageTransitions.smarty
@@ -21,8 +21,8 @@ while the workflow has no documents or document-versions assigned to the workflo
{if (empty($workflow_info.transitions))}
-
{i18n}This workflow does not define any transitions. Use the "Create a new transition" link above
-to add new transitions.{/i18n}
+
{i18n}This workflow does not define any transitions. Use the "Create a new transition" link above
+to add new transitions.{/i18n}
{i18n}No search specified, or no results for your search. Please choose some criteria from the list above to find users.{/i18n}
+ {i18n}No search specified, or no results for your search. Please choose some criteria from the list above to find users.{/i18n}
{else}
diff --git a/thirdpartyjs/curvycorners/lgpl.txt b/thirdpartyjs/curvycorners/lgpl.txt
new file mode 100644
index 0000000..259cffb
--- /dev/null
+++ b/thirdpartyjs/curvycorners/lgpl.txt
@@ -0,0 +1,502 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 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 Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+ 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 Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it. You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+ When we speak of free software, we are referring to freedom of use,
+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 and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+ To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+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 other code 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.
+
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard. To achieve this, non-free programs must be
+allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+ 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, whereas the latter must
+be combined with the library in order to run.
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser 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 combine 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) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (1) uses at run time a
+ copy of the library already present on the user's computer system,
+ rather than copying library functions into the executable, and (2)
+ will operate properly with a modified version of the library, if
+ the user installs one, as long as the modified version is
+ interface-compatible with the version that the work was made with.
+
+ c) 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.
+
+ d) 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.
+
+ e) 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 materials to be 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 with
+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 Lesser 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
+
+ How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library. It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+ , 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!
\ No newline at end of file
diff --git a/thirdpartyjs/curvycorners/rounded_corners.inc.js b/thirdpartyjs/curvycorners/rounded_corners.inc.js
new file mode 100644
index 0000000..4d6e131
--- /dev/null
+++ b/thirdpartyjs/curvycorners/rounded_corners.inc.js
@@ -0,0 +1,1108 @@
+
+ /****************************************************************
+ * *
+ * curvyCorners *
+ * ------------ *
+ * *
+ * This script generates rounded corners for your divs. *
+ * *
+ * Version 1.2.9 *
+ * Copyright (c) 2006 Cameron Cooke *
+ * By: Cameron Cooke and Tim Hutchison. *
+ * *
+ * *
+ * Website: http://www.curvycorners.net *
+ * Email: info@totalinfinity.com *
+ * Forum: http://www.curvycorners.net/forum/ *
+ * *
+ * *
+ * This library is free software; you can redistribute *
+ * it and/or modify it under the terms of the GNU *
+ * Lesser General Public License as published by the *
+ * Free Software Foundation; either version 2.1 of the *
+ * License, or (at your option) any later version. *
+ * *
+ * This library is distributed in the hope that it will *
+ * be useful, but WITHOUT ANY WARRANTY; without even the *
+ * implied warranty of MERCHANTABILITY or FITNESS FOR A *
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public *
+ * License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser *
+ * General Public License along with this library; *
+ * Inc., 59 Temple Place, Suite 330, Boston, *
+ * MA 02111-1307 USA *
+ * *
+ ****************************************************************/
+var mycount=0;
+var myobj='';
+ // Browser detection
+ var isIE = navigator.userAgent.toLowerCase().indexOf("msie") > -1;
+ var isMoz = document.implementation && document.implementation.createDocument;
+ var isSafari = ((navigator.userAgent.toLowerCase().indexOf('safari')!=-1)&&(navigator.userAgent.toLowerCase().indexOf('mac')!=-1))?true:false;
+
+ /*
+ Usage:
+
+ newCornersObj = new curvyCorners(settingsObj, "classNameStr");
+ newCornersObj = new curvyCorners(settingsObj, divObj1[, divObj2[, divObj3[, . . . [, divObjN]]]]);
+ */
+ function curvyCorners()
+ {
+ // Check parameters
+ if(typeof(arguments[0]) != "object") throw newCurvyError("First parameter of curvyCorners() must be an object.");
+ if(typeof(arguments[1]) != "object" && typeof(arguments[1]) != "string") throw newCurvyError("Second parameter of curvyCorners() must be an object or a class name.");
+
+ // Get object(s)
+ if(typeof(arguments[1]) == "string")
+ {
+ // Get elements by class name
+ var startIndex = 0;
+ var boxCol = getElementsByClass(arguments[1]);
+ }
+ else
+ {
+ // Get objects
+ var startIndex = 1;
+ var boxCol = arguments;
+ }
+
+ // Create return collection/object
+ var curvyCornersCol = new Array();
+
+ // Create array of html elements that can have rounded corners
+ if(arguments[0].validTags)
+ var validElements = arguments[0].validTags;
+ else
+ var validElements = ["div"]; // Default
+
+ // Loop through each argument
+ for(var i = startIndex, j = boxCol.length; i < j; i++)
+ {
+ // Current element tag name
+ var currentTag = boxCol[i].tagName.toLowerCase();
+
+ if(inArray(validElements, currentTag) !== false)
+ {
+ curvyCornersCol[curvyCornersCol.length] = new curvyObject(arguments[0], boxCol[i]);
+ }
+ }
+
+ this.objects = curvyCornersCol;
+
+ // Applys the curvyCorners to all objects
+ this.applyCornersToAll = function()
+ {
+ for(var x = 0, k = this.objects.length; x < k; x++)
+ {
+ this.objects[x].applyCorners();
+ }
+ }
+ }
+
+ // curvyCorners object (can be called directly)
+ function curvyObject()
+ {
+ // Setup Globals
+ this.box = arguments[1];
+ this.settings = arguments[0];
+ this.topContainer = null;
+ this.bottomContainer = null;
+ this.masterCorners = new Array();
+ this.contentDIV = null;
+
+ // Get box formatting details
+ var boxHeight = get_style(this.box, "height", "height");
+ var boxWidth = get_style(this.box, "width", "width");
+ var borderWidth = get_style(this.box, "borderTopWidth", "border-top-width");
+ var borderColour = get_style(this.box, "borderTopColor", "border-top-color");
+ var boxColour = get_style(this.box, "backgroundColor", "background-color");
+ var backgroundImage = get_style(this.box, "backgroundImage", "background-image");
+ var boxPosition = get_style(this.box, "position", "position");
+ var boxPadding = get_style(this.box, "paddingTop", "padding-top");
+
+ // Set formatting propertes
+ this.boxHeight = parseInt(((boxHeight != "" && boxHeight != "auto" && boxHeight.indexOf("%") == -1)? boxHeight.substring(0, boxHeight.indexOf("px")) : this.box.scrollHeight));
+ this.boxWidth = parseInt(((boxWidth != "" && boxWidth != "auto" && boxWidth.indexOf("%") == -1)? boxWidth.substring(0, boxWidth.indexOf("px")) : this.box.scrollWidth));
+ this.borderWidth = parseInt(((borderWidth != "" && borderWidth.indexOf("px") !== -1)? borderWidth.slice(0, borderWidth.indexOf("px")) : 0));
+ this.boxColour = format_colour(boxColour);
+ this.boxPadding = parseInt(((boxPadding != "" && boxPadding.indexOf("px") !== -1)? boxPadding.slice(0, boxPadding.indexOf("px")) : 0));
+ this.borderColour = format_colour(borderColour);
+ this.borderString = this.borderWidth + "px" + " solid " + this.borderColour;
+ this.backgroundImage = ((backgroundImage != "none")? backgroundImage : "");
+ this.boxContent = this.box.innerHTML;
+
+ // Make box relative if not already absolute and remove any padding
+ if(boxPosition != "absolute") this.box.style.position = "relative";
+ this.box.style.padding = "0px";
+
+ // If IE and height and width are not set, we need to set width so that we get positioning
+ if(isIE && boxWidth == "auto" && boxHeight == "auto") this.box.style.width = "100%";
+
+ // Resize box so that it stays to the orignal height
+
+
+ // Remove content if box is using autoPad
+ if(this.settings.autoPad == true && this.boxPadding > 0)
+ this.box.innerHTML = "";
+
+ /*
+ This method creates the corners and
+ applies them to the div element.
+ */
+ this.applyCorners = function()
+ {
+ /*
+ Create top and bottom containers.
+ These will be used as a parent for the corners and bars.
+ */
+ for(var t = 0; t < 2; t++)
+ {
+ switch(t)
+ {
+ // Top
+ case 0:
+
+ // Only build top bar if a top corner is to be draw
+ if(this.settings.tl || this.settings.tr)
+ {
+ var newMainContainer = document.createElement("DIV");
+ newMainContainer.style.width = "100%";
+ newMainContainer.style.fontSize = "1px";
+ newMainContainer.style.overflow = "hidden";
+ newMainContainer.style.position = "absolute";
+ newMainContainer.style.paddingLeft = this.borderWidth + "px";
+ newMainContainer.style.paddingRight = this.borderWidth + "px";
+ var topMaxRadius = Math.max(this.settings.tl ? this.settings.tl.radius : 0, this.settings.tr ? this.settings.tr.radius : 0);
+ newMainContainer.style.height = topMaxRadius + "px";
+ newMainContainer.style.top = 0 - topMaxRadius + "px";
+ newMainContainer.style.left = 0 - this.borderWidth + "px";
+ this.topContainer = this.box.appendChild(newMainContainer);
+ }
+ break;
+
+ // Bottom
+ case 1:
+
+ // Only build bottom bar if a top corner is to be draw
+ if(this.settings.bl || this.settings.br)
+ {
+ var newMainContainer = document.createElement("DIV");
+ newMainContainer.style.width = "100%";
+ newMainContainer.style.fontSize = "1px";
+ newMainContainer.style.overflow = "hidden";
+ newMainContainer.style.position = "absolute";
+ newMainContainer.style.paddingLeft = this.borderWidth + "px";
+ newMainContainer.style.paddingRight = this.borderWidth + "px";
+ var botMaxRadius = Math.max(this.settings.bl ? this.settings.bl.radius : 0, this.settings.br ? this.settings.br.radius : 0);
+ newMainContainer.style.height = botMaxRadius + "px";
+ newMainContainer.style.bottom = 0 - botMaxRadius + "px";
+ newMainContainer.style.left = 0 - this.borderWidth + "px";
+ this.bottomContainer = this.box.appendChild(newMainContainer);
+ }
+ break;
+ }
+ }
+
+ // Turn off current borders
+ if(this.topContainer) this.box.style.borderTopWidth = "0px";
+ if(this.bottomContainer) this.box.style.borderBottomWidth = "0px";
+
+ // Create array of available corners
+ var corners = ["tr", "tl", "br", "bl"];
+
+ /*
+ Loop for each corner
+ */
+ for(var i in corners)
+ {
+
+ // FIX for prototype lib
+ if(i > -1 < 4)
+ {
+
+ // Get current corner type from array
+ var cc = corners[i];
+ myobj = cc;
+ // alert(myobj + ' ' + cc + ' ' + i);
+
+ // Has the user requested the currentCorner be round?
+ if(!this.settings[cc])
+ {
+ // No
+ if(((cc == "tr" || cc == "tl") && this.topContainer != null) || ((cc == "br" || cc == "bl") && this.bottomContainer != null))
+ {
+ // We need to create a filler div to fill the space upto the next horzontal corner.
+ var newCorner = document.createElement("DIV");
+
+ // Setup corners properties
+ newCorner.style.position = "relative";
+ newCorner.style.fontSize = "1px";
+ newCorner.style.overflow = "hidden";
+
+ // Add background image?
+ if(this.backgroundImage == "")
+ newCorner.style.backgroundColor = this.boxColour;
+ else
+ newCorner.style.backgroundImage = this.backgroundImage;
+
+ switch(cc)
+ {
+ case "tl":
+ newCorner.style.height = topMaxRadius - this.borderWidth + "px";
+ newCorner.style.marginRight = this.settings.tr.radius - (this.borderWidth*2) + "px";
+ newCorner.style.borderLeft = this.borderString;
+ newCorner.style.borderTop = this.borderString;
+ newCorner.style.left = -this.borderWidth + "px";
+ break;
+
+ case "tr":
+ newCorner.style.height = topMaxRadius - this.borderWidth + "px";
+ newCorner.style.marginLeft = this.settings.tl.radius - (this.borderWidth*2) + "px";
+ newCorner.style.borderRight = this.borderString;
+ newCorner.style.borderTop = this.borderString;
+ newCorner.style.backgroundPosition = "-" + (topMaxRadius + this.borderWidth) + "px 0px";
+ newCorner.style.left = this.borderWidth + "px";
+ break;
+
+ case "bl":
+ newCorner.style.height = botMaxRadius - this.borderWidth + "px";
+ newCorner.style.marginRight = this.settings.br.radius - (this.borderWidth*2) + "px";
+ newCorner.style.borderLeft = this.borderString;
+ newCorner.style.borderBottom = this.borderString;
+ newCorner.style.left = -this.borderWidth + "px";
+ newCorner.style.backgroundPosition = "-" + (this.borderWidth) + "px -" + (this.boxHeight + (botMaxRadius + this.borderWidth)) + "px";
+ break;
+
+ case "br":
+ newCorner.style.height = botMaxRadius - this.borderWidth + "px";
+ newCorner.style.marginLeft = this.settings.bl.radius - (this.borderWidth*2) + "px";
+ newCorner.style.borderRight = this.borderString;
+ newCorner.style.borderBottom = this.borderString;
+ newCorner.style.left = this.borderWidth + "px"
+ newCorner.style.backgroundPosition = "-" + (botMaxRadius + this.borderWidth) + "px -" + (this.boxHeight + (botMaxRadius + this.borderWidth)) + "px";
+ break;
+ }
+ }
+ }
+ else
+ {
+ /*
+ PERFORMANCE NOTE:
+
+ If more than one corner is requested and a corner has been already
+ created for the same radius then that corner will be used as a master and cloned.
+ The pixel bars will then be repositioned to form the new corner type.
+ All new corners start as a bottom right corner.
+ */
+ //if(this.masterCorners[this.settings[cc].radius])
+ //{
+ // Create clone of the master corner
+ //if(){
+ //var newCorner = this.masterCorners[this.settings[cc].radius].cloneNode(true);
+ //}
+ //}
+ //else
+ {
+ // Yes, we need to create a new corner
+ var newCorner = document.createElement("DIV");
+ newCorner.style.height = this.settings[cc].radius + "px";
+ newCorner.style.width = this.settings[cc].radius + "px";
+ newCorner.style.position = "absolute";
+ newCorner.style.fontSize = "1px";
+ newCorner.style.overflow = "hidden";
+
+ // THE FOLLOWING BLOCK OF CODE CREATES A ROUNDED CORNER
+ // ---------------------------------------------------- TOP
+
+ // Get border radius
+ var borderRadius = parseInt(this.settings[cc].radius - this.borderWidth);
+
+ // Cycle the x-axis
+ for(var intx = 0, j = this.settings[cc].radius; intx < j; intx++)
+ {
+ // Calculate the value of y1 which identifies the pixels inside the border
+ if((intx +1) >= borderRadius)
+ var y1 = -1;
+ else
+ var y1 = (Math.floor(Math.sqrt(Math.pow(borderRadius, 2) - Math.pow((intx+1), 2))) - 1);
+
+ // Only calculate y2 and y3 if there is a border defined
+ if(borderRadius != j)
+ {
+ if((intx) >= borderRadius)
+ var y2 = -1;
+ else
+ var y2 = Math.ceil(Math.sqrt(Math.pow(borderRadius,2) - Math.pow(intx, 2)));
+
+ if((intx+1) >= j)
+ var y3 = -1;
+ else
+ var y3 = (Math.floor(Math.sqrt(Math.pow(j ,2) - Math.pow((intx+1), 2))) - 1);
+ }
+
+ // Calculate y4
+ if((intx) >= j)
+ var y4 = -1;
+ else
+ var y4 = Math.ceil(Math.sqrt(Math.pow(j ,2) - Math.pow(intx, 2)));
+
+ // Draw bar on inside of the border with foreground colour
+ if(y1 > -1) this.drawPixel(intx, 0, this.boxColour, 100, (y1+1), newCorner, -1, this.settings[cc].radius,cc);
+
+ // Only draw border/foreground antialiased pixels and border if there is a border defined
+ if(borderRadius != j)
+ {
+ // Cycle the y-axis
+ for(var inty = (y1 + 1); inty < y2; inty++)
+ {
+ // Draw anti-alias pixels
+ if(this.settings.antiAlias)
+ {
+ // For each of the pixels that need anti aliasing between the foreground and border colour draw single pixel divs
+ if(this.backgroundImage != "")
+ {
+ var borderFract = (pixelFraction(intx, inty, borderRadius) * 100);
+
+ if(borderFract < 30)
+ {
+ this.drawPixel(intx, inty, this.borderColour, 100, 1, newCorner, 0, this.settings[cc].radius,myobj);
+ }else{
+ this.drawPixel(intx, inty, this.borderColour, 100, 1, newCorner, -1, this.settings[cc].radius,myobj);
+ }
+ }
+ else
+ {
+ var pixelcolour = BlendColour(this.boxColour, this.borderColour, pixelFraction(intx, inty, borderRadius));
+ this.drawPixel(intx, inty, pixelcolour, 100, 1, newCorner, 0, this.settings[cc].radius, myobj);
+ }
+ }
+ }
+
+ // Draw bar for the border
+ if(this.settings.antiAlias)
+ {
+ if(y3 >= y2)
+ {
+ if (y2 == -1) y2 = 0;
+ this.drawPixel(intx, y2, this.borderColour, 100, (y3 - y2 + 1), newCorner, 0, 0,myobj);
+ }
+ }
+ else
+ {
+ if(y3 >= y1)
+ {
+ this.drawPixel(intx, (y1 + 1), this.borderColour, 100, (y3 - y1), newCorner, 0, 0,myobj);
+ }
+ }
+
+ // Set the colour for the outside curve
+ var outsideColour = this.borderColour;
+ }
+ else
+ {
+ // Set the coour for the outside curve
+ var outsideColour = this.boxColour;
+ var y3 = y1;
+ }
+
+ // Draw aa pixels?
+ if(this.settings.antiAlias)
+ {
+ // Cycle the y-axis and draw the anti aliased pixels on the outside of the curve
+ for(var inty = (y3 + 1); inty < y4; inty++)
+ {
+ // For each of the pixels that need anti aliasing between the foreground/border colour & background draw single pixel divs
+ this.drawPixel(intx, inty, outsideColour, (pixelFraction(intx, inty , j) * 100), 1, newCorner, ((this.borderWidth > 0)? 0 : -1), this.settings[cc].radius,myobj);
+ }
+ }
+ }
+
+ // END OF CORNER CREATION
+ // ---------------------------------------------------- END
+
+ // We now need to store the current corner in the masterConers array
+ this.masterCorners[this.settings[cc].radius] = newCorner.cloneNode(true);
+ }
+
+ /*
+ Now we have a new corner we need to reposition all the pixels unless
+ the current corner is the bottom right.
+ */
+ if(cc != "br")
+ {
+ // Loop through all children (pixel bars)
+ for(var t = 0, k = newCorner.childNodes.length; t < k; t++)
+ {
+ // Get current pixel bar
+ var pixelBar = newCorner.childNodes[t];
+
+ // Get current top and left properties
+ var pixelBarTop = parseInt(pixelBar.style.top.substring(0, pixelBar.style.top.indexOf("px")));
+ var pixelBarLeft = parseInt(pixelBar.style.left.substring(0, pixelBar.style.left.indexOf("px")));
+ var pixelBarHeight = parseInt(pixelBar.style.height.substring(0, pixelBar.style.height.indexOf("px")));
+
+ // Reposition pixels
+ if(cc == "tl" || cc == "bl"){
+ pixelBar.style.left = this.settings[cc].radius -pixelBarLeft -1 + "px"; // Left
+ }
+ if(cc == "tr" || cc == "tl"){
+ pixelBar.style.top = this.settings[cc].radius -pixelBarHeight -pixelBarTop + "px"; // Top
+ }
+
+ switch(cc)
+ {
+ case "tr":
+ pixelBar.style.backgroundPosition = "-" + Math.abs((this.boxWidth - this.settings[cc].radius + this.borderWidth) + pixelBarLeft) + "px -" + Math.abs(this.settings[cc].radius -pixelBarHeight -pixelBarTop - this.borderWidth) + "px";
+ break;
+
+ case "tl":
+ pixelBar.style.backgroundPosition = "-" + Math.abs((this.settings[cc].radius -pixelBarLeft -1) - this.borderWidth) + "px -" + Math.abs(this.settings[cc].radius -pixelBarHeight -pixelBarTop - this.borderWidth) + "px";
+ break;
+
+ case "bl":
+ pixelBar.style.backgroundPosition = "-" + Math.abs((this.settings[cc].radius -pixelBarLeft -1) - this.borderWidth) + "px -" + Math.abs((this.boxHeight + this.settings[cc].radius + pixelBarTop) -this.borderWidth) + "px";
+ break;
+ }
+ }
+ }
+ }
+
+ if(newCorner)
+ {
+ // Position the container
+ switch(cc)
+ {
+ case "tl":
+ if(newCorner.style.position == "absolute") newCorner.style.top = "0px";
+ if(newCorner.style.position == "absolute") newCorner.style.left = "0px";
+ if(this.topContainer) this.topContainer.appendChild(newCorner);
+ break;
+
+ case "tr":
+ if(newCorner.style.position == "absolute") newCorner.style.top = "0px";
+ if(newCorner.style.position == "absolute") newCorner.style.right = "0px";
+ if(this.topContainer) this.topContainer.appendChild(newCorner);
+ break;
+
+ case "bl":
+ if(newCorner.style.position == "absolute") newCorner.style.bottom = "0px";
+ if(newCorner.style.position == "absolute") newCorner.style.left = "0px";
+ if(this.bottomContainer) this.bottomContainer.appendChild(newCorner);
+ break;
+
+ case "br":
+ if(newCorner.style.position == "absolute") newCorner.style.bottom = "0px";
+ if(newCorner.style.position == "absolute") newCorner.style.right = "0px";
+ if(this.bottomContainer) this.bottomContainer.appendChild(newCorner);
+ break;
+ }
+ }
+ }
+ }
+
+ /*
+ The last thing to do is draw the rest of the filler DIVs.
+ We only need to create a filler DIVs when two corners have
+ diffrent radiuses in either the top or bottom container.
+ */
+
+ // Find out which corner has the biiger radius and get the difference amount
+ var radiusDiff = new Array();
+ radiusDiff["t"] = Math.abs(this.settings.tl.radius - this.settings.tr.radius)
+ radiusDiff["b"] = Math.abs(this.settings.bl.radius - this.settings.br.radius);
+
+ for(z in radiusDiff)
+ {
+ // FIX for prototype lib
+ if(z == "t" || z == "b")
+ {
+ if(radiusDiff[z])
+ {
+ // Get the type of corner that is the smaller one
+ var smallerCornerType = ((this.settings[z + "l"].radius < this.settings[z + "r"].radius)? z +"l" : z +"r");
+
+ // First we need to create a DIV for the space under the smaller corner
+ var newFiller = document.createElement("DIV");
+ newFiller.style.height = radiusDiff[z] + "px";
+ newFiller.style.width = this.settings[smallerCornerType].radius+ "px"
+ newFiller.style.position = "absolute";
+ newFiller.style.fontSize = "1px";
+ newFiller.style.overflow = "hidden";
+ newFiller.style.backgroundColor = this.boxColour;
+ //newFiller.style.backgroundColor = get_random_color();
+
+ // Position filler
+ switch(smallerCornerType)
+ {
+ case "tl":
+ newFiller.style.bottom = "0px";
+ newFiller.style.left = "0px";
+ newFiller.style.borderLeft = this.borderString;
+ this.topContainer.appendChild(newFiller);
+ break;
+
+ case "tr":
+ newFiller.style.bottom = "0px";
+ newFiller.style.right = "0px";
+ newFiller.style.borderRight = this.borderString;
+ this.topContainer.appendChild(newFiller);
+ break;
+
+ case "bl":
+ newFiller.style.top = "0px";
+ newFiller.style.left = "0px";
+ newFiller.style.borderLeft = this.borderString;
+ this.bottomContainer.appendChild(newFiller);
+ break;
+
+ case "br":
+ newFiller.style.top = "0px";
+ newFiller.style.right = "0px";
+ newFiller.style.borderRight = this.borderString;
+ this.bottomContainer.appendChild(newFiller);
+ break;
+ }
+ }
+
+ // Create the bar to fill the gap between each corner horizontally
+ var newFillerBar = document.createElement("DIV");
+ newFillerBar.style.position = "relative";
+ newFillerBar.style.fontSize = "1px";
+ newFillerBar.style.overflow = "hidden";
+ newFillerBar.style.backgroundColor = this.boxColour;
+ newFillerBar.style.backgroundImage = this.backgroundImage;
+
+ switch(z)
+ {
+ case "t":
+ // Top Bar
+ if(this.topContainer)
+ {
+ // Edit by Asger Hallas: Check if settings.xx.radius is not false
+ if(this.settings.tl.radius && this.settings.tr.radius)
+ {
+ newFillerBar.style.height = topMaxRadius - this.borderWidth + "px";
+ newFillerBar.style.marginLeft = this.settings.tl.radius - this.borderWidth + "px";
+ newFillerBar.style.marginRight = this.settings.tr.radius - this.borderWidth + "px";
+ newFillerBar.style.borderTop = this.borderString;
+
+ if(this.backgroundImage != "")
+ newFillerBar.style.backgroundPosition = "-" + (topMaxRadius + this.borderWidth) + "px 0px";
+
+ this.topContainer.appendChild(newFillerBar);
+ }
+ if(this.box.id == "loginbox" || this.box.id == "loginbox_skin")
+ newFillerBar.style.backgroundImage = "";
+ // Repos the boxes background image
+ this.box.style.backgroundPosition = "0px -" + (topMaxRadius - this.borderWidth) + "px";
+ }
+ break;
+
+ case "b":
+ if(this.bottomContainer)
+ {
+ // Edit by Asger Hallas: Check if settings.xx.radius is not false
+ if(this.settings.bl.radius && this.settings.br.radius)
+ {
+ // Bottom Bar
+ newFillerBar.style.height = botMaxRadius - this.borderWidth + "px";
+ newFillerBar.style.marginLeft = this.settings.bl.radius - this.borderWidth + "px";
+ newFillerBar.style.marginRight = this.settings.br.radius - this.borderWidth + "px";
+ newFillerBar.style.borderBottom = this.borderString;
+
+ if(this.box.id == "ktBlock" || this.box.id == "pageBody" || this.box.id == "ktInfo" || this.box.id == "ktError" || this.box.id == "loginbox" || this.box.id == "loginbox_skin" || this.box.id == "portlet" || this.box.id == "portlet expanded")
+ newFillerBar.style.backgroundImage = "";
+ if(this.box.id == "pageBody")
+ newFillerBar.style.backgroundColor = "#D1D1D1";
+ if(this.backgroundImage != "")
+ newFillerBar.style.backgroundPosition = "-" + (botMaxRadius + this.borderWidth) + "px -" + (this.boxHeight + (topMaxRadius + this.borderWidth)) + "px";
+ this.bottomContainer.appendChild(newFillerBar);
+ }
+ }
+ break;
+ }
+ }
+ }
+
+ /*
+ AutoPad! apply padding if set.
+ */
+ if(this.settings.autoPad == true && this.boxPadding > 0)
+ {
+ // Create content container
+ var contentContainer = document.createElement("DIV");
+
+ // Set contentContainer's properties
+ contentContainer.style.position = "relative";
+ contentContainer.innerHTML = this.boxContent;
+ contentContainer.className = "autoPadDiv";
+
+ // Get padding amounts
+ var topPadding = Math.abs(topMaxRadius - this.boxPadding);
+ var botPadding = Math.abs(botMaxRadius - this.boxPadding);
+
+ // Apply top padding
+ if(topMaxRadius < this.boxPadding)
+ contentContainer.style.paddingTop = topPadding + "px";
+
+ // Apply Bottom padding
+ if(botMaxRadius < this.boxPadding)
+ contentContainer.style.paddingBottom = botMaxRadius + "px";
+
+ // Apply left and right padding
+ contentContainer.style.paddingLeft = this.boxPadding + "px";
+ contentContainer.style.paddingRight = this.boxPadding + "px";
+
+ // Append contentContainer
+ this.contentDIV = this.box.appendChild(contentContainer);
+ }
+ }
+
+ /*
+ This function draws the pixles
+ */
+
+
+ this.drawPixel = function(intx, inty, colour, transAmount, height, newCorner, image, cornerRadius, corner)
+ {
+ // Create pixel
+ var pixel = document.createElement("DIV");
+ pixel.style.height = height + "px";
+ pixel.style.width = "1px";
+ pixel.style.position = "absolute";
+ pixel.style.fontSize = "1px";
+ pixel.style.overflow = "hidden";
+
+ // Max Top Radius
+ var topMaxRadius = Math.max(this.settings["tr"].radius, this.settings["tl"].radius);
+
+ // Dont apply background image to border pixels
+ if(image == -1 && this.backgroundImage != "")
+ {
+ if (corner != 'bl' && corner != 'br')
+ pixel.style.backgroundImage = this.backgroundImage;
+ else
+ if(this.box.id == "pageBody")
+ pixel.style.backgroundColor = "#D1D1D1";
+ else
+ pixel.style.backgroundColor = colour;
+
+ pixel.style.backgroundPosition = "-" + (this.boxWidth - (cornerRadius - intx) + this.borderWidth) + "px -" + ((this.boxHeight + topMaxRadius + inty) -this.borderWidth) + "px";
+ }
+ else
+ {
+ pixel.style.backgroundColor = colour;
+ }
+
+ // Set opacity if the transparency is anything other than 100
+ if (transAmount != 100)
+ setOpacity(pixel, transAmount);
+
+ // Set the pixels position
+ pixel.style.top = inty + "px";
+ pixel.style.left = intx + "px";
+
+ newCorner.appendChild(pixel);
+ }
+ }
+
+ // ------------- UTILITY FUNCTIONS
+
+ // Inserts a element after another
+ function insertAfter(parent, node, referenceNode)
+ {
+ parent.insertBefore(node, referenceNode.nextSibling);
+ }
+
+ /*
+ Blends the two colours by the fraction
+ returns the resulting colour as a string in the format "#FFFFFF"
+ */
+ function BlendColour(Col1, Col2, Col1Fraction)
+ {
+ var red1 = parseInt(Col1.substr(1,2),16);
+ var green1 = parseInt(Col1.substr(3,2),16);
+ var blue1 = parseInt(Col1.substr(5,2),16);
+ var red2 = parseInt(Col2.substr(1,2),16);
+ var green2 = parseInt(Col2.substr(3,2),16);
+ var blue2 = parseInt(Col2.substr(5,2),16);
+
+ if(Col1Fraction > 1 || Col1Fraction < 0) Col1Fraction = 1;
+
+ var endRed = Math.round((red1 * Col1Fraction) + (red2 * (1 - Col1Fraction)));
+ if(endRed > 255) endRed = 255;
+ if(endRed < 0) endRed = 0;
+
+ var endGreen = Math.round((green1 * Col1Fraction) + (green2 * (1 - Col1Fraction)));
+ if(endGreen > 255) endGreen = 255;
+ if(endGreen < 0) endGreen = 0;
+
+ var endBlue = Math.round((blue1 * Col1Fraction) + (blue2 * (1 - Col1Fraction)));
+ if(endBlue > 255) endBlue = 255;
+ if(endBlue < 0) endBlue = 0;
+
+ return "#" + IntToHex(endRed)+ IntToHex(endGreen)+ IntToHex(endBlue);
+ }
+
+ /*
+ Converts a number to hexadecimal format
+ */
+ function IntToHex(strNum)
+ {
+ base = strNum / 16;
+ rem = strNum % 16;
+ base = base - (rem / 16);
+ baseS = MakeHex(base);
+ remS = MakeHex(rem);
+
+ return baseS + '' + remS;
+ }
+
+
+ /*
+ gets the hex bits of a number
+ */
+ function MakeHex(x)
+ {
+ if((x >= 0) && (x <= 9))
+ {
+ return x;
+ }
+ else
+ {
+ switch(x)
+ {
+ case 10: return "A";
+ case 11: return "B";
+ case 12: return "C";
+ case 13: return "D";
+ case 14: return "E";
+ case 15: return "F";
+ }
+ }
+ }
+
+
+ /*
+ For a pixel cut by the line determines the fraction of the pixel on the 'inside' of the
+ line. Returns a number between 0 and 1
+ */
+ function pixelFraction(x, y, r)
+ {
+ var pixelfraction = 0;
+
+ /*
+ determine the co-ordinates of the two points on the perimeter of the pixel that the
+ circle crosses
+ */
+ var xvalues = new Array(1);
+ var yvalues = new Array(1);
+ var point = 0;
+ var whatsides = "";
+
+ // x + 0 = Left
+ var intersect = Math.sqrt((Math.pow(r,2) - Math.pow(x,2)));
+
+ if ((intersect >= y) && (intersect < (y+1)))
+ {
+ whatsides = "Left";
+ xvalues[point] = 0;
+ yvalues[point] = intersect - y;
+ point = point + 1;
+ }
+ // y + 1 = Top
+ var intersect = Math.sqrt((Math.pow(r,2) - Math.pow(y+1,2)));
+
+ if ((intersect >= x) && (intersect < (x+1)))
+ {
+ whatsides = whatsides + "Top";
+ xvalues[point] = intersect - x;
+ yvalues[point] = 1;
+ point = point + 1;
+ }
+ // x + 1 = Right
+ var intersect = Math.sqrt((Math.pow(r,2) - Math.pow(x+1,2)));
+
+ if ((intersect >= y) && (intersect < (y+1)))
+ {
+ whatsides = whatsides + "Right";
+ xvalues[point] = 1;
+ yvalues[point] = intersect - y;
+ point = point + 1;
+ }
+ // y + 0 = Bottom
+ var intersect = Math.sqrt((Math.pow(r,2) - Math.pow(y,2)));
+
+ if ((intersect >= x) && (intersect < (x+1)))
+ {
+ whatsides = whatsides + "Bottom";
+ xvalues[point] = intersect - x;
+ yvalues[point] = 0;
+ }
+
+ /*
+ depending on which sides of the perimeter of the pixel the circle crosses calculate the
+ fraction of the pixel inside the circle
+ */
+ switch (whatsides)
+ {
+ case "LeftRight":
+ pixelfraction = Math.min(yvalues[0],yvalues[1]) + ((Math.max(yvalues[0],yvalues[1]) - Math.min(yvalues[0],yvalues[1]))/2);
+ break;
+
+ case "TopRight":
+ pixelfraction = 1-(((1-xvalues[0])*(1-yvalues[1]))/2);
+ break;
+
+ case "TopBottom":
+ pixelfraction = Math.min(xvalues[0],xvalues[1]) + ((Math.max(xvalues[0],xvalues[1]) - Math.min(xvalues[0],xvalues[1]))/2);
+ break;
+
+ case "LeftBottom":
+ pixelfraction = (yvalues[0]*xvalues[1])/2;
+ break;
+
+ default:
+ pixelfraction = 1;
+ }
+
+ return pixelfraction;
+ }
+
+
+ // This function converts CSS rgb(x, x, x) to hexadecimal
+ function rgb2Hex(rgbColour)
+ {
+ try{
+
+ // Get array of RGB values
+ var rgbArray = rgb2Array(rgbColour);
+
+ // Get RGB values
+ var red = parseInt(rgbArray[0]);
+ var green = parseInt(rgbArray[1]);
+ var blue = parseInt(rgbArray[2]);
+
+ // Build hex colour code
+ var hexColour = "#" + IntToHex(red) + IntToHex(green) + IntToHex(blue);
+ }
+ catch(e){
+
+ alert("There was an error converting the RGB value to Hexadecimal in function rgb2Hex");
+ }
+
+ return hexColour;
+ }
+
+ // Returns an array of rbg values
+ function rgb2Array(rgbColour)
+ {
+ // Remove rgb()
+ var rgbValues = rgbColour.substring(4, rgbColour.indexOf(")"));
+
+ // Split RGB into array
+ var rgbArray = rgbValues.split(", ");
+
+ return rgbArray;
+ }
+
+ /*
+ Function by Simon Willison from sitepoint.com
+ Modified by Cameron Cooke adding Safari's rgba support
+ */
+ function setOpacity(obj, opacity)
+ {
+ opacity = (opacity == 100)?99.999:opacity;
+
+ if(isSafari && obj.tagName != "IFRAME")
+ {
+ // Get array of RGB values
+ var rgbArray = rgb2Array(obj.style.backgroundColor);
+
+ // Get RGB values
+ var red = parseInt(rgbArray[0]);
+ var green = parseInt(rgbArray[1]);
+ var blue = parseInt(rgbArray[2]);
+
+ // Safari using RGBA support
+ obj.style.backgroundColor = "rgba(" + red + ", " + green + ", " + blue + ", " + opacity/100 + ")";
+ }
+ else if(typeof(obj.style.opacity) != "undefined")
+ {
+ // W3C
+ obj.style.opacity = opacity/100;
+ }
+ else if(typeof(obj.style.MozOpacity) != "undefined")
+ {
+ // Older Mozilla
+ obj.style.MozOpacity = opacity/100;
+ }
+ else if(typeof(obj.style.filter) != "undefined")
+ {
+ // IE
+ obj.style.filter = "alpha(opacity:" + opacity + ")";
+ }
+ else if(typeof(obj.style.KHTMLOpacity) != "undefined")
+ {
+ // Older KHTML Based Browsers
+ obj.style.KHTMLOpacity = opacity/100;
+ }
+ }
+
+ /*
+ Returns index if the passed value is found in the
+ array otherwise returns false.
+ */
+ function inArray(array, value)
+ {
+ for(var i = 0; i < array.length; i++){
+
+ // Matches identical (===), not just similar (==).
+ if (array[i] === value) return i;
+ }
+
+ return false;
+ }
+
+ /*
+ Returns true if the passed value is found as a key
+ in the array otherwise returns false.
+ */
+ function inArrayKey(array, value)
+ {
+ for(key in array){
+
+ // Matches identical (===), not just similar (==).
+ if(key === value) return true;
+ }
+
+ return false;
+ }
+
+ // Cross browser add event wrapper
+ function addEvent(elm, evType, fn, useCapture) {
+ if (elm.addEventListener) {
+ elm.addEventListener(evType, fn, useCapture);
+ return true;
+ }
+ else if (elm.attachEvent) {
+ var r = elm.attachEvent('on' + evType, fn);
+ return r;
+ }
+ else {
+ elm['on' + evType] = fn;
+ }
+ }
+
+ // Cross browser remove event wrapper
+ function removeEvent(obj, evType, fn, useCapture){
+ if (obj.removeEventListener){
+ obj.removeEventListener(evType, fn, useCapture);
+ return true;
+ } else if (obj.detachEvent){
+ var r = obj.detachEvent("on"+evType, fn);
+ return r;
+ } else {
+ alert("Handler could not be removed");
+ }
+ }
+
+ // Formats colours
+ function format_colour(colour)
+ {
+ var returnColour = "#ffffff";
+
+ // Make sure colour is set and not transparent
+ if(colour != "" && colour != "transparent")
+ {
+ // RGB Value?
+ if(colour.substr(0, 3) == "rgb")
+ {
+ // Get HEX aquiv.
+ returnColour = rgb2Hex(colour);
+ }
+ else if(colour.length == 4)
+ {
+ // 3 chr colour code add remainder
+ returnColour = "#" + colour.substring(1, 2) + colour.substring(1, 2) + colour.substring(2, 3) + colour.substring(2, 3) + colour.substring(3, 4) + colour.substring(3, 4);
+ }
+ else
+ {
+ // Normal valid hex colour
+ returnColour = colour;
+ }
+ }
+
+ return returnColour;
+ }
+
+ // Returns the style value for the property specfied
+ function get_style(obj, property, propertyNS)
+ {
+ try
+ {
+ if(obj.currentStyle)
+ {
+ var returnVal = eval("obj.currentStyle." + property);
+ }
+ else
+ {
+ /*
+ Safari does not expose any information for the object if display is
+ set to none is set so we temporally enable it.
+ */
+ if(isSafari && obj.style.display == "none")
+ {
+ obj.style.display = "";
+ var wasHidden = true;
+ }
+
+ var returnVal = document.defaultView.getComputedStyle(obj, '').getPropertyValue(propertyNS);
+
+ // Rehide the object
+ if(isSafari && wasHidden)
+ {
+ obj.style.display = "none";
+ }
+ }
+ }
+ catch(e)
+ {
+ // Do nothing
+ }
+
+ return returnVal;
+ }
+
+ // Get elements by class by Dustin Diaz.
+ function getElementsByClass(searchClass, node, tag)
+ {
+ var classElements = new Array();
+
+ if(node == null)
+ node = document;
+ if(tag == null)
+ tag = '*';
+
+ var els = node.getElementsByTagName(tag);
+ var elsLen = els.length;
+ var pattern = new RegExp("(^|\s)"+searchClass+"(\s|$)");
+
+ for (i = 0, j = 0; i < elsLen; i++)
+ {
+ if(pattern.test(els[i].className))
+ {
+ classElements[j] = els[i];
+ j++;
+ }
+ }
+
+ return classElements;
+ }
+
+ // Displays error message
+ function newCurvyError(errorMessage)
+ {
+ return new Error("curvyCorners Error:\n" + errorMessage)
+ }
\ No newline at end of file
diff --git a/thirdpartyjs/curvycorners/rounded_corners_lite.inc.js b/thirdpartyjs/curvycorners/rounded_corners_lite.inc.js
new file mode 100644
index 0000000..afc3ea3
--- /dev/null
+++ b/thirdpartyjs/curvycorners/rounded_corners_lite.inc.js
@@ -0,0 +1,285 @@
+
+ /****************************************************************
+ * *
+ * curvyCorners *
+ * ------------ *
+ * *
+ * This script generates rounded corners for your divs. *
+ * *
+ * Version 1.2.9 *
+ * Copyright (c) 2006 Cameron Cooke *
+ * By: Cameron Cooke and Tim Hutchison. *
+ * *
+ * *
+ * Website: http://www.curvycorners.net *
+ * Email: info@totalinfinity.com *
+ * Forum: http://www.curvycorners.net/forum/ *
+ * *
+ * *
+ * This library is free software; you can redistribute *
+ * it and/or modify it under the terms of the GNU *
+ * Lesser General Public License as published by the *
+ * Free Software Foundation; either version 2.1 of the *
+ * License, or (at your option) any later version. *
+ * *
+ * This library is distributed in the hope that it will *
+ * be useful, but WITHOUT ANY WARRANTY; without even the *
+ * implied warranty of MERCHANTABILITY or FITNESS FOR A *
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public *
+ * License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser *
+ * General Public License along with this library; *
+ * Inc., 59 Temple Place, Suite 330, Boston, *
+ * MA 02111-1307 USA *
+ * *
+ ****************************************************************/
+
+var isIE = navigator.userAgent.toLowerCase().indexOf("msie") > -1; var isMoz = document.implementation && document.implementation.createDocument; var isSafari = ((navigator.userAgent.toLowerCase().indexOf('safari')!=-1)&&(navigator.userAgent.toLowerCase().indexOf('mac')!=-1))?true:false; function curvyCorners()
+{ if(typeof(arguments[0]) != "object") throw newCurvyError("First parameter of curvyCorners() must be an object."); if(typeof(arguments[1]) != "object" && typeof(arguments[1]) != "string") throw newCurvyError("Second parameter of curvyCorners() must be an object or a class name."); if(typeof(arguments[1]) == "string")
+{ var startIndex = 0; var boxCol = getElementsByClass(arguments[1]);}
+else
+{ var startIndex = 1; var boxCol = arguments;}
+var curvyCornersCol = new Array(); if(arguments[0].validTags)
+var validElements = arguments[0].validTags; else
+var validElements = ["div"]; for(var i = startIndex, j = boxCol.length; i < j; i++)
+{ var currentTag = boxCol[i].tagName.toLowerCase(); if(inArray(validElements, currentTag) !== false)
+{ curvyCornersCol[curvyCornersCol.length] = new curvyObject(arguments[0], boxCol[i]);}
+}
+this.objects = curvyCornersCol; this.applyCornersToAll = function()
+{ for(var x = 0, k = this.objects.length; x < k; x++)
+{ this.objects[x].applyCorners();}
+}
+}
+function curvyObject()
+{ this.box = arguments[1]; this.settings = arguments[0]; this.topContainer = null; this.bottomContainer = null; this.masterCorners = new Array(); this.contentDIV = null; var boxHeight = get_style(this.box, "height", "height"); var boxWidth = get_style(this.box, "width", "width"); var borderWidth = get_style(this.box, "borderTopWidth", "border-top-width"); var borderColour = get_style(this.box, "borderTopColor", "border-top-color"); var boxColour = get_style(this.box, "backgroundColor", "background-color"); var backgroundImage = get_style(this.box, "backgroundImage", "background-image"); var boxPosition = get_style(this.box, "position", "position"); var boxPadding = get_style(this.box, "paddingTop", "padding-top"); this.boxHeight = parseInt(((boxHeight != "" && boxHeight != "auto" && boxHeight.indexOf("%") == -1)? boxHeight.substring(0, boxHeight.indexOf("px")) : this.box.scrollHeight)); this.boxWidth = parseInt(((boxWidth != "" && boxWidth != "auto" && boxWidth.indexOf("%") == -1)? boxWidth.substring(0, boxWidth.indexOf("px")) : this.box.scrollWidth)); this.borderWidth = parseInt(((borderWidth != "" && borderWidth.indexOf("px") !== -1)? borderWidth.slice(0, borderWidth.indexOf("px")) : 0)); this.boxColour = format_colour(boxColour); this.boxPadding = parseInt(((boxPadding != "" && boxPadding.indexOf("px") !== -1)? boxPadding.slice(0, boxPadding.indexOf("px")) : 0)); this.borderColour = format_colour(borderColour); this.borderString = this.borderWidth + "px" + " solid " + this.borderColour; this.backgroundImage = ((backgroundImage != "none")? backgroundImage : ""); this.boxContent = this.box.innerHTML; if(boxPosition != "absolute") this.box.style.position = "relative"; this.box.style.padding = "0px"; if(isIE && boxWidth == "auto" && boxHeight == "auto") this.box.style.width = "100%"; if(this.settings.autoPad == true && this.boxPadding > 0)
+this.box.innerHTML = ""; this.applyCorners = function()
+{ for(var t = 0; t < 2; t++)
+{ switch(t)
+{ case 0:
+if(this.settings.tl || this.settings.tr)
+{ var newMainContainer = document.createElement("DIV"); newMainContainer.style.width = "100%"; newMainContainer.style.fontSize = "1px"; newMainContainer.style.overflow = "hidden"; newMainContainer.style.position = "absolute"; newMainContainer.style.paddingLeft = this.borderWidth + "px"; newMainContainer.style.paddingRight = this.borderWidth + "px"; var topMaxRadius = Math.max(this.settings.tl ? this.settings.tl.radius : 0, this.settings.tr ? this.settings.tr.radius : 0); newMainContainer.style.height = topMaxRadius + "px"; newMainContainer.style.top = 0 - topMaxRadius + "px"; newMainContainer.style.left = 0 - this.borderWidth + "px"; this.topContainer = this.box.appendChild(newMainContainer);}
+break; case 1:
+if(this.settings.bl || this.settings.br)
+{ var newMainContainer = document.createElement("DIV"); newMainContainer.style.width = "100%"; newMainContainer.style.fontSize = "1px"; newMainContainer.style.overflow = "hidden"; newMainContainer.style.position = "absolute"; newMainContainer.style.paddingLeft = this.borderWidth + "px"; newMainContainer.style.paddingRight = this.borderWidth + "px"; var botMaxRadius = Math.max(this.settings.bl ? this.settings.bl.radius : 0, this.settings.br ? this.settings.br.radius : 0); newMainContainer.style.height = botMaxRadius + "px"; newMainContainer.style.bottom = 0 - botMaxRadius + "px"; newMainContainer.style.left = 0 - this.borderWidth + "px"; this.bottomContainer = this.box.appendChild(newMainContainer);}
+break;}
+}
+if(this.topContainer) this.box.style.borderTopWidth = "0px"; if(this.bottomContainer) this.box.style.borderBottomWidth = "0px"; var corners = ["tr", "tl", "br", "bl"]; for(var i in corners)
+{ if(i > -1 < 4)
+{ var cc = corners[i]; if(!this.settings[cc])
+{ if(((cc == "tr" || cc == "tl") && this.topContainer != null) || ((cc == "br" || cc == "bl") && this.bottomContainer != null))
+{ var newCorner = document.createElement("DIV"); newCorner.style.position = "relative"; newCorner.style.fontSize = "1px"; newCorner.style.overflow = "hidden"; if(this.backgroundImage == "")
+newCorner.style.backgroundColor = this.boxColour; else
+newCorner.style.backgroundImage = this.backgroundImage; switch(cc)
+{ case "tl":
+newCorner.style.height = topMaxRadius - this.borderWidth + "px"; newCorner.style.marginRight = this.settings.tr.radius - (this.borderWidth*2) + "px"; newCorner.style.borderLeft = this.borderString; newCorner.style.borderTop = this.borderString; newCorner.style.left = -this.borderWidth + "px"; break; case "tr":
+newCorner.style.height = topMaxRadius - this.borderWidth + "px"; newCorner.style.marginLeft = this.settings.tl.radius - (this.borderWidth*2) + "px"; newCorner.style.borderRight = this.borderString; newCorner.style.borderTop = this.borderString; newCorner.style.backgroundPosition = "-" + (topMaxRadius + this.borderWidth) + "px 0px"; newCorner.style.left = this.borderWidth + "px"; break; case "bl":
+newCorner.style.height = botMaxRadius - this.borderWidth + "px"; newCorner.style.marginRight = this.settings.br.radius - (this.borderWidth*2) + "px"; newCorner.style.borderLeft = this.borderString; newCorner.style.borderBottom = this.borderString; newCorner.style.left = -this.borderWidth + "px"; newCorner.style.backgroundPosition = "-" + (this.borderWidth) + "px -" + (this.boxHeight + (botMaxRadius + this.borderWidth)) + "px"; break; case "br":
+newCorner.style.height = botMaxRadius - this.borderWidth + "px"; newCorner.style.marginLeft = this.settings.bl.radius - (this.borderWidth*2) + "px"; newCorner.style.borderRight = this.borderString; newCorner.style.borderBottom = this.borderString; newCorner.style.left = this.borderWidth + "px"
+newCorner.style.backgroundPosition = "-" + (botMaxRadius + this.borderWidth) + "px -" + (this.boxHeight + (botMaxRadius + this.borderWidth)) + "px"; break;}
+}
+}
+else
+{ if(this.masterCorners[this.settings[cc].radius])
+{ var newCorner = this.masterCorners[this.settings[cc].radius].cloneNode(true);}
+else
+{ var newCorner = document.createElement("DIV"); newCorner.style.height = this.settings[cc].radius + "px"; newCorner.style.width = this.settings[cc].radius + "px"; newCorner.style.position = "absolute"; newCorner.style.fontSize = "1px"; newCorner.style.overflow = "hidden"; var borderRadius = parseInt(this.settings[cc].radius - this.borderWidth); for(var intx = 0, j = this.settings[cc].radius; intx < j; intx++)
+{ if((intx +1) >= borderRadius)
+var y1 = -1; else
+var y1 = (Math.floor(Math.sqrt(Math.pow(borderRadius, 2) - Math.pow((intx+1), 2))) - 1); if(borderRadius != j)
+{ if((intx) >= borderRadius)
+var y2 = -1; else
+var y2 = Math.ceil(Math.sqrt(Math.pow(borderRadius,2) - Math.pow(intx, 2))); if((intx+1) >= j)
+var y3 = -1; else
+var y3 = (Math.floor(Math.sqrt(Math.pow(j ,2) - Math.pow((intx+1), 2))) - 1);}
+if((intx) >= j)
+var y4 = -1; else
+var y4 = Math.ceil(Math.sqrt(Math.pow(j ,2) - Math.pow(intx, 2))); if(y1 > -1) this.drawPixel(intx, 0, this.boxColour, 100, (y1+1), newCorner, -1, this.settings[cc].radius); if(borderRadius != j)
+{ for(var inty = (y1 + 1); inty < y2; inty++)
+{ if(this.settings.antiAlias)
+{ if(this.backgroundImage != "")
+{ var borderFract = (pixelFraction(intx, inty, borderRadius) * 100); if(borderFract < 30)
+{ this.drawPixel(intx, inty, this.borderColour, 100, 1, newCorner, 0, this.settings[cc].radius);}
+else
+{ this.drawPixel(intx, inty, this.borderColour, 100, 1, newCorner, -1, this.settings[cc].radius);}
+}
+else
+{ var pixelcolour = BlendColour(this.boxColour, this.borderColour, pixelFraction(intx, inty, borderRadius)); this.drawPixel(intx, inty, pixelcolour, 100, 1, newCorner, 0, this.settings[cc].radius, cc);}
+}
+}
+if(this.settings.antiAlias)
+{ if(y3 >= y2)
+{ if (y2 == -1) y2 = 0; this.drawPixel(intx, y2, this.borderColour, 100, (y3 - y2 + 1), newCorner, 0, 0);}
+}
+else
+{ if(y3 >= y1)
+{ this.drawPixel(intx, (y1 + 1), this.borderColour, 100, (y3 - y1), newCorner, 0, 0);}
+}
+var outsideColour = this.borderColour;}
+else
+{ var outsideColour = this.boxColour; var y3 = y1;}
+if(this.settings.antiAlias)
+{ for(var inty = (y3 + 1); inty < y4; inty++)
+{ this.drawPixel(intx, inty, outsideColour, (pixelFraction(intx, inty , j) * 100), 1, newCorner, ((this.borderWidth > 0)? 0 : -1), this.settings[cc].radius);}
+}
+}
+this.masterCorners[this.settings[cc].radius] = newCorner.cloneNode(true);}
+if(cc != "br")
+{ for(var t = 0, k = newCorner.childNodes.length; t < k; t++)
+{ var pixelBar = newCorner.childNodes[t]; var pixelBarTop = parseInt(pixelBar.style.top.substring(0, pixelBar.style.top.indexOf("px"))); var pixelBarLeft = parseInt(pixelBar.style.left.substring(0, pixelBar.style.left.indexOf("px"))); var pixelBarHeight = parseInt(pixelBar.style.height.substring(0, pixelBar.style.height.indexOf("px"))); if(cc == "tl" || cc == "bl"){ pixelBar.style.left = this.settings[cc].radius -pixelBarLeft -1 + "px";}
+if(cc == "tr" || cc == "tl"){ pixelBar.style.top = this.settings[cc].radius -pixelBarHeight -pixelBarTop + "px";}
+switch(cc)
+{ case "tr":
+pixelBar.style.backgroundPosition = "-" + Math.abs((this.boxWidth - this.settings[cc].radius + this.borderWidth) + pixelBarLeft) + "px -" + Math.abs(this.settings[cc].radius -pixelBarHeight -pixelBarTop - this.borderWidth) + "px"; break; case "tl":
+pixelBar.style.backgroundPosition = "-" + Math.abs((this.settings[cc].radius -pixelBarLeft -1) - this.borderWidth) + "px -" + Math.abs(this.settings[cc].radius -pixelBarHeight -pixelBarTop - this.borderWidth) + "px"; break; case "bl":
+pixelBar.style.backgroundPosition = "-" + Math.abs((this.settings[cc].radius -pixelBarLeft -1) - this.borderWidth) + "px -" + Math.abs((this.boxHeight + this.settings[cc].radius + pixelBarTop) -this.borderWidth) + "px"; break;}
+}
+}
+}
+if(newCorner)
+{ switch(cc)
+{ case "tl":
+if(newCorner.style.position == "absolute") newCorner.style.top = "0px"; if(newCorner.style.position == "absolute") newCorner.style.left = "0px"; if(this.topContainer) this.topContainer.appendChild(newCorner); break; case "tr":
+if(newCorner.style.position == "absolute") newCorner.style.top = "0px"; if(newCorner.style.position == "absolute") newCorner.style.right = "0px"; if(this.topContainer) this.topContainer.appendChild(newCorner); break; case "bl":
+if(newCorner.style.position == "absolute") newCorner.style.bottom = "0px"; if(newCorner.style.position == "absolute") newCorner.style.left = "0px"; if(this.bottomContainer) this.bottomContainer.appendChild(newCorner); break; case "br":
+if(newCorner.style.position == "absolute") newCorner.style.bottom = "0px"; if(newCorner.style.position == "absolute") newCorner.style.right = "0px"; if(this.bottomContainer) this.bottomContainer.appendChild(newCorner); break;}
+}
+}
+}
+var radiusDiff = new Array(); radiusDiff["t"] = Math.abs(this.settings.tl.radius - this.settings.tr.radius)
+radiusDiff["b"] = Math.abs(this.settings.bl.radius - this.settings.br.radius); for(z in radiusDiff)
+{ if(z == "t" || z == "b")
+{ if(radiusDiff[z])
+{ var smallerCornerType = ((this.settings[z + "l"].radius < this.settings[z + "r"].radius)? z +"l" : z +"r"); var newFiller = document.createElement("DIV"); newFiller.style.height = radiusDiff[z] + "px"; newFiller.style.width = this.settings[smallerCornerType].radius+ "px"
+newFiller.style.position = "absolute"; newFiller.style.fontSize = "1px"; newFiller.style.overflow = "hidden"; newFiller.style.backgroundColor = this.boxColour; switch(smallerCornerType)
+{ case "tl":
+newFiller.style.bottom = "0px"; newFiller.style.left = "0px"; newFiller.style.borderLeft = this.borderString; this.topContainer.appendChild(newFiller); break; case "tr":
+newFiller.style.bottom = "0px"; newFiller.style.right = "0px"; newFiller.style.borderRight = this.borderString; this.topContainer.appendChild(newFiller); break; case "bl":
+newFiller.style.top = "0px"; newFiller.style.left = "0px"; newFiller.style.borderLeft = this.borderString; this.bottomContainer.appendChild(newFiller); break; case "br":
+newFiller.style.top = "0px"; newFiller.style.right = "0px"; newFiller.style.borderRight = this.borderString; this.bottomContainer.appendChild(newFiller); break;}
+}
+var newFillerBar = document.createElement("DIV"); newFillerBar.style.position = "relative"; newFillerBar.style.fontSize = "1px"; newFillerBar.style.overflow = "hidden"; newFillerBar.style.backgroundColor = this.boxColour; newFillerBar.style.backgroundImage = this.backgroundImage; switch(z)
+{ case "t":
+if(this.topContainer)
+{ if(this.settings.tl.radius && this.settings.tr.radius)
+{ newFillerBar.style.height = topMaxRadius - this.borderWidth + "px"; newFillerBar.style.marginLeft = this.settings.tl.radius - this.borderWidth + "px"; newFillerBar.style.marginRight = this.settings.tr.radius - this.borderWidth + "px"; newFillerBar.style.borderTop = this.borderString; if(this.backgroundImage != "")
+newFillerBar.style.backgroundPosition = "-" + (topMaxRadius + this.borderWidth) + "px 0px"; this.topContainer.appendChild(newFillerBar);}
+this.box.style.backgroundPosition = "0px -" + (topMaxRadius - this.borderWidth) + "px";}
+break; case "b":
+if(this.bottomContainer)
+{ if(this.settings.bl.radius && this.settings.br.radius)
+{ newFillerBar.style.height = botMaxRadius - this.borderWidth + "px"; newFillerBar.style.marginLeft = this.settings.bl.radius - this.borderWidth + "px"; newFillerBar.style.marginRight = this.settings.br.radius - this.borderWidth + "px"; newFillerBar.style.borderBottom = this.borderString; if(this.backgroundImage != "")
+newFillerBar.style.backgroundPosition = "-" + (botMaxRadius + this.borderWidth) + "px -" + (this.boxHeight + (topMaxRadius + this.borderWidth)) + "px"; this.bottomContainer.appendChild(newFillerBar);}
+}
+break;}
+}
+}
+if(this.settings.autoPad == true && this.boxPadding > 0)
+{ var contentContainer = document.createElement("DIV"); contentContainer.style.position = "relative"; contentContainer.innerHTML = this.boxContent; contentContainer.className = "autoPadDiv"; var topPadding = Math.abs(topMaxRadius - this.boxPadding); var botPadding = Math.abs(botMaxRadius - this.boxPadding); if(topMaxRadius < this.boxPadding)
+contentContainer.style.paddingTop = topPadding + "px"; if(botMaxRadius < this.boxPadding)
+contentContainer.style.paddingBottom = botMaxRadius + "px"; contentContainer.style.paddingLeft = this.boxPadding + "px"; contentContainer.style.paddingRight = this.boxPadding + "px"; this.contentDIV = this.box.appendChild(contentContainer);}
+}
+this.drawPixel = function(intx, inty, colour, transAmount, height, newCorner, image, cornerRadius)
+{ var pixel = document.createElement("DIV"); pixel.style.height = height + "px"; pixel.style.width = "1px"; pixel.style.position = "absolute"; pixel.style.fontSize = "1px"; pixel.style.overflow = "hidden"; var topMaxRadius = Math.max(this.settings["tr"].radius, this.settings["tl"].radius); if(image == -1 && this.backgroundImage != "")
+{ pixel.style.backgroundImage = this.backgroundImage; pixel.style.backgroundPosition = "-" + (this.boxWidth - (cornerRadius - intx) + this.borderWidth) + "px -" + ((this.boxHeight + topMaxRadius + inty) -this.borderWidth) + "px";}
+else
+{ pixel.style.backgroundColor = colour;}
+if (transAmount != 100)
+setOpacity(pixel, transAmount); pixel.style.top = inty + "px"; pixel.style.left = intx + "px"; newCorner.appendChild(pixel);}
+}
+function insertAfter(parent, node, referenceNode)
+{ parent.insertBefore(node, referenceNode.nextSibling);}
+function BlendColour(Col1, Col2, Col1Fraction)
+{ var red1 = parseInt(Col1.substr(1,2),16); var green1 = parseInt(Col1.substr(3,2),16); var blue1 = parseInt(Col1.substr(5,2),16); var red2 = parseInt(Col2.substr(1,2),16); var green2 = parseInt(Col2.substr(3,2),16); var blue2 = parseInt(Col2.substr(5,2),16); if(Col1Fraction > 1 || Col1Fraction < 0) Col1Fraction = 1; var endRed = Math.round((red1 * Col1Fraction) + (red2 * (1 - Col1Fraction))); if(endRed > 255) endRed = 255; if(endRed < 0) endRed = 0; var endGreen = Math.round((green1 * Col1Fraction) + (green2 * (1 - Col1Fraction))); if(endGreen > 255) endGreen = 255; if(endGreen < 0) endGreen = 0; var endBlue = Math.round((blue1 * Col1Fraction) + (blue2 * (1 - Col1Fraction))); if(endBlue > 255) endBlue = 255; if(endBlue < 0) endBlue = 0; return "#" + IntToHex(endRed)+ IntToHex(endGreen)+ IntToHex(endBlue);}
+function IntToHex(strNum)
+{ base = strNum / 16; rem = strNum % 16; base = base - (rem / 16); baseS = MakeHex(base); remS = MakeHex(rem); return baseS + '' + remS;}
+function MakeHex(x)
+{ if((x >= 0) && (x <= 9))
+{ return x;}
+else
+{ switch(x)
+{ case 10: return "A"; case 11: return "B"; case 12: return "C"; case 13: return "D"; case 14: return "E"; case 15: return "F";}
+}
+}
+function pixelFraction(x, y, r)
+{ var pixelfraction = 0; var xvalues = new Array(1); var yvalues = new Array(1); var point = 0; var whatsides = ""; var intersect = Math.sqrt((Math.pow(r,2) - Math.pow(x,2))); if ((intersect >= y) && (intersect < (y+1)))
+{ whatsides = "Left"; xvalues[point] = 0; yvalues[point] = intersect - y; point = point + 1;}
+var intersect = Math.sqrt((Math.pow(r,2) - Math.pow(y+1,2))); if ((intersect >= x) && (intersect < (x+1)))
+{ whatsides = whatsides + "Top"; xvalues[point] = intersect - x; yvalues[point] = 1; point = point + 1;}
+var intersect = Math.sqrt((Math.pow(r,2) - Math.pow(x+1,2))); if ((intersect >= y) && (intersect < (y+1)))
+{ whatsides = whatsides + "Right"; xvalues[point] = 1; yvalues[point] = intersect - y; point = point + 1;}
+var intersect = Math.sqrt((Math.pow(r,2) - Math.pow(y,2))); if ((intersect >= x) && (intersect < (x+1)))
+{ whatsides = whatsides + "Bottom"; xvalues[point] = intersect - x; yvalues[point] = 0;}
+switch (whatsides)
+{ case "LeftRight":
+pixelfraction = Math.min(yvalues[0],yvalues[1]) + ((Math.max(yvalues[0],yvalues[1]) - Math.min(yvalues[0],yvalues[1]))/2); break; case "TopRight":
+pixelfraction = 1-(((1-xvalues[0])*(1-yvalues[1]))/2); break; case "TopBottom":
+pixelfraction = Math.min(xvalues[0],xvalues[1]) + ((Math.max(xvalues[0],xvalues[1]) - Math.min(xvalues[0],xvalues[1]))/2); break; case "LeftBottom":
+pixelfraction = (yvalues[0]*xvalues[1])/2; break; default:
+pixelfraction = 1;}
+return pixelfraction;}
+function rgb2Hex(rgbColour)
+{ try{ var rgbArray = rgb2Array(rgbColour); var red = parseInt(rgbArray[0]); var green = parseInt(rgbArray[1]); var blue = parseInt(rgbArray[2]); var hexColour = "#" + IntToHex(red) + IntToHex(green) + IntToHex(blue);}
+catch(e){ alert("There was an error converting the RGB value to Hexadecimal in function rgb2Hex");}
+return hexColour;}
+function rgb2Array(rgbColour)
+{ var rgbValues = rgbColour.substring(4, rgbColour.indexOf(")")); var rgbArray = rgbValues.split(", "); return rgbArray;}
+function setOpacity(obj, opacity)
+{ opacity = (opacity == 100)?99.999:opacity; if(isSafari && obj.tagName != "IFRAME")
+{ var rgbArray = rgb2Array(obj.style.backgroundColor); var red = parseInt(rgbArray[0]); var green = parseInt(rgbArray[1]); var blue = parseInt(rgbArray[2]); obj.style.backgroundColor = "rgba(" + red + ", " + green + ", " + blue + ", " + opacity/100 + ")";}
+else if(typeof(obj.style.opacity) != "undefined")
+{ obj.style.opacity = opacity/100;}
+else if(typeof(obj.style.MozOpacity) != "undefined")
+{ obj.style.MozOpacity = opacity/100;}
+else if(typeof(obj.style.filter) != "undefined")
+{ obj.style.filter = "alpha(opacity:" + opacity + ")";}
+else if(typeof(obj.style.KHTMLOpacity) != "undefined")
+{ obj.style.KHTMLOpacity = opacity/100;}
+}
+function inArray(array, value)
+{ for(var i = 0; i < array.length; i++){ if (array[i] === value) return i;}
+return false;}
+function inArrayKey(array, value)
+{ for(key in array){ if(key === value) return true;}
+return false;}
+function addEvent(elm, evType, fn, useCapture) { if (elm.addEventListener) { elm.addEventListener(evType, fn, useCapture); return true;}
+else if (elm.attachEvent) { var r = elm.attachEvent('on' + evType, fn); return r;}
+else { elm['on' + evType] = fn;}
+}
+function removeEvent(obj, evType, fn, useCapture){ if (obj.removeEventListener){ obj.removeEventListener(evType, fn, useCapture); return true;} else if (obj.detachEvent){ var r = obj.detachEvent("on"+evType, fn); return r;} else { alert("Handler could not be removed");}
+}
+function format_colour(colour)
+{ var returnColour = "#ffffff"; if(colour != "" && colour != "transparent")
+{ if(colour.substr(0, 3) == "rgb")
+{ returnColour = rgb2Hex(colour);}
+else if(colour.length == 4)
+{ returnColour = "#" + colour.substring(1, 2) + colour.substring(1, 2) + colour.substring(2, 3) + colour.substring(2, 3) + colour.substring(3, 4) + colour.substring(3, 4);}
+else
+{ returnColour = colour;}
+}
+return returnColour;}
+function get_style(obj, property, propertyNS)
+{ try
+{ if(obj.currentStyle)
+{ var returnVal = eval("obj.currentStyle." + property);}
+else
+{ if(isSafari && obj.style.display == "none")
+{ obj.style.display = ""; var wasHidden = true;}
+var returnVal = document.defaultView.getComputedStyle(obj, '').getPropertyValue(propertyNS); if(isSafari && wasHidden)
+{ obj.style.display = "none";}
+}
+}
+catch(e)
+{ }
+return returnVal;}
+function getElementsByClass(searchClass, node, tag)
+{ var classElements = new Array(); if(node == null)
+node = document; if(tag == null)
+tag = '*'; var els = node.getElementsByTagName(tag); var elsLen = els.length; var pattern = new RegExp("(^|\s)"+searchClass+"(\s|$)"); for (i = 0, j = 0; i < elsLen; i++)
+{ if(pattern.test(els[i].className))
+{ classElements[j] = els[i]; j++;}
+}
+return classElements;}
+function newCurvyError(errorMessage)
+{ return new Error("curvyCorners Error:\n" + errorMessage)
+}
diff --git a/thirdpartyjs/yui/tools/tools.js b/thirdpartyjs/yui/tools/tools.js
new file mode 100644
index 0000000..2d4492b
--- /dev/null
+++ b/thirdpartyjs/yui/tools/tools.js
@@ -0,0 +1,1013 @@
+/**
+* @fileoverview
+*
General Tools.
+*
Now contains a modified version of Douglas Crockford's json.js that doesn't
+* mess with the DOM's prototype methods
+* http://www.json.org/js.html
/gi,
+ base64: /[^A-Za-z0-9\+\/\=]/g,
+ syntaxCheck: /^("(\\.|[^"\\\n\r])*?"|[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t])+?$/
+ }
+
+ jsonCodes = {
+ '\b': '\\b',
+ '\t': '\\t',
+ '\n': '\\n',
+ '\f': '\\f',
+ '\r': '\\r',
+ '"' : '\\"',
+ '\\': '\\\\'
+ }
+ return {
+ version: '1.0'
+ }
+}();
+/**
+* This normalizes getting the height of an element in IE
+* @param {String/HTMLElement} elm The element to get the height of
+* @returns The Height in pixels
+* @type String
+*/
+YAHOO.Tools.getHeight = function(elm) {
+ var elm = $(elm);
+ var h = $D.getStyle(elm, 'height');
+ if (h == 'auto') {
+ elm.style.zoom = 1;
+ h = elm.clientHeight + 'px';
+ }
+ return h;
+}
+/**
+* Get the XY coords required to place the element at the center of the screen
+* @param {String/HTMLElement} elm The element to place at the center of the screen
+* @returns The XY coords required to place the element at the center of the screen
+* @type Array
+*/
+YAHOO.Tools.getCenter = function(elm) {
+ var elm = $(elm);
+ var cX = Math.round(($D.getViewportWidth() - parseInt($D.getStyle(elm, 'width'))) / 2);
+ var cY = Math.round(($D.getViewportHeight() - parseInt(this.getHeight(elm))) / 2);
+ return [cX, cY];
+}
+
+/**
+* Converts a text string into a DOM object
+* @param {String} txt String to convert
+* @returns A string to a textNode
+*/
+YAHOO.Tools.makeTextObject = function(txt) {
+ return document.createTextNode(txt);
+}
+/**
+* Takes an Array of DOM objects and appends them as a child to the main Element
+* @param {Array} arr Array of elements to append to elm.
+* @param {HTMLElement/String} elm A reference or ID to the main Element that the children will be appended to
+*/
+YAHOO.Tools.makeChildren = function(arr, elm) {
+ var elm = $(elm);
+ for (var i in arr) {
+ _val = arr[i];
+ if (typeof _val == 'string') {
+ _val = this.makeTxtObject(_val);
+ }
+ elm.appendChild(_val);
+ }
+}
+/**
+* Converts a standard CSS string to a Javascriptable Camel Case variable name
+* @param {String} str The CSS string to convert to camel case Javascript String
+* Example:
+* background-color
+* backgroundColor
+* list-style-type
+* listStyleType
+*/
+YAHOO.Tools.styleToCamel = function(str) {
+ var _tmp = str.split('-');
+ var _new_style = _tmp[0];
+ for (var i = 1; i < _tmp.length; i++) {
+ _new_style += _tmp[i].substring(0, 1).toUpperCase() + _tmp[i].substring(1, _tmp[i].length);
+ }
+ return _new_style;
+}
+/**
+* Removes " from a given string
+* @param {String} str The string to remove quotes from
+*/
+YAHOO.Tools.removeQuotes = function(str) {
+ var checkText = new String(str);
+ return String(checkText.replace(regExs.quotes, ''));
+}
+/**
+* Trims starting and trailing white space from a string.
+* @param {String} str The string to trim
+*/
+YAHOO.Tools.trim = function(str) {
+ return str.replace(regExs.startspace, '').replace(regExs.endspace, '');
+}
+/**
+* Removes all HTML tags from a string.
+* @param {String} str The string to remove HTML from
+*/
+YAHOO.Tools.stripTags = function(str) {
+ return str.replace(regExs.striptags, '');
+}
+/**
+* Returns True/False if it finds BR' or P's
+* @param {String} str The string to search
+*/
+YAHOO.Tools.hasBRs = function(str) {
+ return str.match(regExs.hasbr) || str.match(regExs.hasp);
+}
+/**
+* Converts BR's and P's to Plain Text Line Feeds
+* @param {String} str The string to search
+*/
+YAHOO.Tools.convertBRs2NLs = function(str) {
+ return str.replace(regExs.rbr, "\n").replace(regExs.rbr2, "\n").replace(regExs.rendp, "\n").replace(regExs.rp, "");
+}
+/**
+* Repeats a string n number of times
+* @param {String} str The string to repeat
+* @param {Integer} repeat Number of times to repeat it
+* @returns Repeated string
+* @type String
+*/
+YAHOO.Tools.stringRepeat = function(str, repeat) {
+ return new Array(repeat + 1).join(str);
+}
+/**
+* Reverses a string
+* @param {String} str The string to reverse
+* @returns Reversed string
+* @type String
+*/
+YAHOO.Tools.stringReverse = function(str) {
+ var new_str = '';
+ for (i = 0; i < str.length; i++) {
+ new_str = new_str + str.charAt((str.length -1) -i);
+ }
+ return new_str;
+}
+/**
+* printf function written in Javascript
+*
var test = "You are viewing messages {0} - {1} out of {2}";
+* YAHOO.Tools.printf(test, '5', '25', '500');
+* This will return a string like:
+* "You are view messages 5 - 25 out of 500"
+* Patched provided by: Peter Foti
+* @param {String} string
+* @returns Parsed String
+* @type String
+*/
+YAHOO.Tools.printf = function() {
+ var num = arguments.length;
+ var oStr = arguments[0];
+
+ for (var i = 1; i < num; i++) {
+ var pattern = "\\{" + (i-1) + "\\}";
+ var re = new RegExp(pattern, "g");
+ oStr = oStr.replace(re, arguments[i]);
+ }
+ return oStr;
+}
+/**
+* Trims starting and trailing white space from a string.
+* @param {HTMLElement/Array/String} el Single element, array of elements or id string to apply the style string to
+* @param {String} str The CSS string to apply to the elements
+* Example:
+* color: black; text-decoration: none; background-color: yellow;
+*/
+YAHOO.Tools.setStyleString = function(el, str) {
+ var _tmp = str.split(';');
+ for (x in _tmp) {
+ if (x) {
+ __tmp = YAHOO.Tools.trim(_tmp[x]);
+ __tmp = _tmp[x].split(':');
+ if (__tmp[0] && __tmp[1]) {
+ var _attr = YAHOO.Tools.trim(__tmp[0]);
+ var _val = YAHOO.Tools.trim(__tmp[1]);
+ if (_attr && _val) {
+ if (_attr.indexOf('-') != -1) {
+ _attr = YAHOO.Tools.styleToCamel(_attr);
+ }
+ $D.setStyle(el, _attr, _val);
+ }
+ }
+ }
+ }
+}
+/**
+* Gets the currently selected text
+* @param {Object} _document Optional. Reference to the document object
+* @param {Object} _window Optional. Reference to the window object
+* Both parameters are optional, but if you give one you need to give both.
+* The reason for the parameters is if you are dealing with an iFrame or FrameSet,
+* you need to specify the document and the window of the frame you want to get the selection for
+*/
+YAHOO.Tools.getSelection = function(_document, _window) {
+ if (!_document) { _document = document; }
+ if (!_window) { _window = window; }
+ if (_document.selection) {
+ return _document.selection;
+ }
+ return _window.getSelection();
+}
+/**
+* Remove the element from the document.
+* @param {HTMLElement/Array/String} el Single element, array of elements or id string to remove from the document
+* This function needs to be extended to remove all of the child elements & their listeners.
+*/
+YAHOO.Tools.removeElement = function(el) {
+ if (!(el instanceof Array)) {
+ el = new Array($(el));
+ }
+ for (var i = 0; i < el.length; i++) {
+ if (el[i].parentNode) {
+ el[i].parentNode.removeChild(el);
+ }
+ }
+}
+/**
+* Set a cookie.
+* @param {String} name The name of the cookie to be set
+* @param {String} value The value of the cookie
+* @param {String} expires A valid Javascript Date object
+* @param {String} path The path of the cookie (Deaults to /)
+* @param {String} domain The domain to attach the cookie to
+* @param {Booleen} secure Booleen True or False
+*/
+YAHOO.Tools.setCookie = function(name, value, expires, path, domain, secure) {
+ var argv = arguments;
+ var argc = arguments.length;
+ var expires = (argc > 2) ? argv[2] : null;
+ var path = (argc > 3) ? argv[3] : '/';
+ var domain = (argc > 4) ? argv[4] : null;
+ var secure = (argc > 5) ? argv[5] : false;
+ document.cookie = name + "=" + escape (value) +
+ ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
+ ((path == null) ? "" : ("; path=" + path)) +
+ ((domain == null) ? "" : ("; domain=" + domain)) +
+ ((secure == true) ? "; secure" : "");
+}
+
+/**
+* Get the value of a cookie.
+* @param {String} name The name of the cookie to get
+*/
+YAHOO.Tools.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));
+}
+/**
+* Delete a cookie
+* @param {String} name The name of the cookie to delete.
+*/
+YAHOO.Tools.deleteCookie = function(name, path, domain) {
+ if (getCookie(name)) {
+ document.cookie = name + '=' + ((path) ? '; path=' + path : '') + ((domain) ? '; domain=' + domain : '') + '; expires=Thu, 01-Jan-70 00:00:01 GMT';
+ }
+}
+/**
+* Object based Browser Engine Detection
+* The returned object will look like:
+*
+* @return Browser Information Object
+* @type Object
+*/
+YAHOO.Tools.getBrowserEngine = function() {
+ var opera = ((window.opera && window.opera.version) ? true : false);
+ var safari = ((navigator.vendor && navigator.vendor.indexOf('Apple') != -1) ? true : false);
+ var gecko = ((document.getElementById && !document.all && !opera && !safari) ? true : false);
+ var msie = ((window.ActiveXObject) ? true : false);
+ var version = false;
+ if (msie) {
+ /**
+ * This checks for the maxHeight style property.
+ * I.E. 7 has this
+ */
+ if (typeof document.body.style.maxHeight != "undefined") {
+ version = '7';
+ } else {
+ /**
+ * Fall back to 6 (might need to find a 5.5 object too...).
+ */
+ version = '6';
+ }
+ }
+ if (opera) {
+ /**
+ * The window.opera object has a method called version();
+ * Here we only grab the first 2 parts of the dotted string to get 9.01, 9.02, etc..
+ */
+ var tmp_version = window.opera.version().split('.');
+ version = tmp_version[0] + '.' + tmp_version[1];
+ }
+ if (gecko) {
+ /**
+ * FireFox 2 has a function called registerContentHandler();
+ */
+ if (navigator.registerContentHandler) {
+ version = '2';
+ } else {
+ version = '1.5';
+ }
+ /**
+ * This should catch all pre Firefox 1.5 browsers
+ */
+ if ((navigator.vendorSub) && !version) {
+ version = navigator.vendorSub;
+ }
+ }
+ if (safari) {
+ try {
+ /**
+ * Safari 1.3+ supports the console method
+ */
+ if (console) {
+ /**
+ * Safari 2+ supports the onmousewheel event
+ */
+ if ((window.onmousewheel !== 'undefined') && (window.onmousewheel === null)) {
+ version = '2';
+ } else {
+ version = '1.3';
+ }
+ }
+ } catch (e) {
+ /**
+ * Safari 1.2 does not support the console method
+ */
+ version = '1.2';
+ }
+ }
+ /**
+ * Return the Browser Object
+ * @type Object
+ */
+ var browsers = {
+ ua: navigator.userAgent,
+ opera: opera,
+ safari: safari,
+ gecko: gecko,
+ msie: msie,
+ version: version
+ }
+ return browsers;
+}
+/**
+* User Agent Based Browser Detection
+* This function uses the userAgent string to get the browsers information.
+* The returned object will look like:
+*
+* @return Browser Information Object
+* @type Object
+*/
+YAHOO.Tools.getBrowserAgent = function() {
+ var ua = navigator.userAgent.toLowerCase();
+ var opera = ((ua.indexOf('opera') != -1) ? true : false);
+ var safari = ((ua.indexOf('safari') != -1) ? true : false);
+ var firefox = ((ua.indexOf('firefox') != -1) ? true : false);
+ var msie = ((ua.indexOf('msie') != -1) ? true : false);
+ var mac = ((ua.indexOf('mac') != -1) ? true : false);
+ var unix = ((ua.indexOf('x11') != -1) ? true : false);
+ var win = ((mac || unix) ? false : true);
+ var version = false;
+ var mozilla = false;
+ //var flash = this.checkFlash();
+ if (!firefox && !safari && (ua.indexOf('gecko') != -1)) {
+ mozilla = true;
+ var _tmp = ua.split('/');
+ version = _tmp[_tmp.length - 1].split(' ')[0];
+ }
+ if (firefox) {
+ var _tmp = ua.split('/');
+ version = _tmp[_tmp.length - 1].split(' ')[0];
+ }
+ if (msie) {
+ version = ua.substring((ua.indexOf('msie ') + 5)).split(';')[0];
+ }
+ if (safari) {
+ /**
+ * Safari doesn't report a string, have to use getBrowserEngine to get it
+ */
+ version = this.getBrowserEngine().version;
+ }
+ if (opera) {
+ version = ua.substring((ua.indexOf('opera/') + 6)).split(' ')[0];
+ }
+
+ /**
+ * Return the Browser Object
+ * @type Object
+ */
+ var browsers = {
+ ua: navigator.userAgent,
+ opera: opera,
+ safari: safari,
+ firefox: firefox,
+ mozilla: mozilla,
+ msie: msie,
+ mac: mac,
+ win: win,
+ unix: unix,
+ version: version//,
+ //flash: flash
+ }
+ return browsers;
+}
+/**
+* Check if Flash is enabled and return the version number
+* @return Version number or false on error
+* @type String
+*/
+YAHOO.Tools.checkFlash = function() {
+ var br = this.getBrowserEngine();
+ if (br.msie) {
+ try {
+ // version will be set for 7.X or greater players
+ var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
+ var versionStr = axo.GetVariable("$version");
+ var tempArray = versionStr.split(" "); // ["WIN", "2,0,0,11"]
+ var tempString = tempArray[1]; // "2,0,0,11"
+ var versionArray = tempString.split(","); // ['2', '0', '0', '11']
+ var flash = versionArray[0];
+ } catch (e) {
+ }
+ } else {
+ var flashObj = null;
+ var tokens, len, curr_tok;
+ if (navigator.mimeTypes && navigator.mimeTypes['application/x-shockwave-flash']) {
+ flashObj = navigator.mimeTypes['application/x-shockwave-flash'].enabledPlugin;
+ }
+ if (flashObj == null) {
+ flash = false;
+ } else {
+ tokens = navigator.plugins['Shockwave Flash'].description.split(' ');
+ len = tokens.length;
+ while(len--) {
+ curr_tok = tokens[len];
+ if(!isNaN(parseInt(curr_tok))) {
+ hasVersion = curr_tok;
+ flash = hasVersion;
+ break;
+ }
+ }
+ }
+ }
+ return flash;
+}
+/**
+* Set Mass Attributes on an Element
+* @param {Object} attrObj Object containing the attributes to set.
+* @param {HTMLElement/String} elm The element you want to apply the attribute to
+* Supports adding listeners and setting style from a CSS style string.
+*/
+YAHOO.Tools.setAttr = function(attrsObj, elm) {
+ if (typeof elm == 'string') {
+ elm = $(elm);
+ }
+ for (var i in attrsObj) {
+ switch (i.toLowerCase()) {
+ case 'listener':
+ if (attrsObj[i] instanceof Array) {
+ var ev = attrsObj[i][0];
+ var func = attrsObj[i][1];
+ var base = attrsObj[i][2];
+ var scope = attrsObj[i][3];
+ $E.addListener(elm, ev, func, base, scope);
+ }
+ break;
+ case 'classname':
+ case 'class':
+ elm.className = attrsObj[i];
+ break;
+ case 'style':
+ YAHOO.Tools.setStyleString(elm, attrsObj[i]);
+ break;
+ default:
+ elm.setAttribute(i, attrsObj[i]);
+ break;
+ }
+ }
+}
+/**
+* Usage:
+*
+* div = YAHOO.util.Dom.create('div', 'Single DIV. This is some test text.', {
+* className:'test1',
+* style:'font-size: 20px'
+* }
+* );
+* test1.appendChild(div);
+*
- or -
+* div = YAHOO.util.Dom.create('div', {className:'test2',style:'font-size:11px'},
+* [YAHOO.util.Dom.create('p', {
+* style:'border: 1px solid red; color: blue',
+* listener: ['click', test]
+* },
+* 'This is a P inside of a DIV both styled.')
+* ]
+*);
+* test2.appendChild(div);
+*
+*
+* @param {String} tagName Tag name to create
+* @param {Object} attrs Element attributes in object notation
+* @param {Array} children Array of children to append to the created element
+* @param {String} txt Text string to insert into the created element
+* @returns A reference to the newly created element
+* @type HTMLReference
+*/
+YAHOO.Tools.create = function(tagName) {
+ tagName = tagName.toLowerCase();
+ elm = document.createElement(tagName);
+ var txt = false;
+ var attrsObj = false;
+
+ if (!elm) { return false; }
+
+ for (var i = 1; i < arguments.length; i++) {
+ txt = arguments[i];
+ if (typeof txt == 'string') {
+ _txt = YAHOO.Tools.makeTextObject(txt);
+ elm.appendChild(_txt);
+ } else if (txt instanceof Array) {
+ YAHOO.Tools.makeChildren(txt, elm);
+ } else if (typeof txt == 'object') {
+ //_makeStyleObject(txt, elm);
+ YAHOO.Tools.setAttr(txt, elm);
+ }
+ }
+ return elm;
+}
+/**
+* Inserts an HTML Element after another in the DOM Tree.
+* @param {HTMLElement} elm The element to insert
+* @param {HTMLElement} curNode The element to insert it before
+*/
+YAHOO.Tools.insertAfter = function(elm, curNode) {
+ if (curNode.nextSibling) {
+ curNode.parentNode.insertBefore(elm, curNode.nextSibling);
+ } else {
+ curNode.parentNode.appendChild(elm);
+ }
+}
+/**
+* Validates that the value passed is in the Array passed.
+* @param {Array} arr The Array to search (haystack)
+* @param {String} val The value to search for (needle)
+* @returns True if the value is found
+* @type Boolean
+*/
+YAHOO.Tools.inArray = function(arr, val) {
+ if (arr instanceof Array) {
+ for (var i = (arr.length -1); i >= 0; i--) {
+ if (arr[i] === val) {
+ return true;
+ }
+ }
+ }
+ return false;
+}
+
+
+/**
+* Validates that the value passed in is a boolean.
+* @param {Object} str The value to validate
+* @return true, if the value is valid
+* @type Boolean
+*/
+YAHOO.Tools.checkBoolean = function(str) {
+ return ((typeof str == 'boolean') ? true : false);
+}
+
+/**
+* Validates that the value passed in is a number.
+* @param {Object} str The value to validate
+* @return true, if the value is valid
+* @type Boolean
+*/
+YAHOO.Tools.checkNumber = function(str) {
+ return ((isNaN(str)) ? false : true);
+}
+
+/**
+* Divide your desired pixel width by 13 to find em width. Multiply that value by 0.9759 for IE via *width.
+* @param {Integer} size The pixel size to convert to em.
+* @return Object of sizes (2) {msie: size, other: size }
+* @type Object
+*/
+YAHOO.Tools.PixelToEm = function(size) {
+ var data = {};
+ var sSize = (size / 13);
+ data.other = (Math.round(sSize * 100) / 100);
+ data.msie = (Math.round((sSize * 0.9759) * 100) / 100);
+ return data;
+}
+
+/**
+* Return a string of CSS statements for this pixel size in ems
+* @param {Integer} size The pixel size to convert to em.
+* @param {String} prop The property to apply the style to.
+* @return String of CSS style statements (width:46.15em;*width:45.04em;min-width:600px;)
+* @type String
+*/
+YAHOO.Tools.PixelToEmStyle = function(size, prop) {
+ var data = '';
+ var prop = ((prop) ? prop.toLowerCase() : 'width');
+ var sSize = (size / 13);
+ data += prop + ':' + (Math.round(sSize * 100) / 100) + 'em;';
+ data += '*' + prop + ':' + (Math.round((sSize * 0.9759) * 100) / 100) + 'em;';
+ if ((prop == 'width') || (prop == 'height')) {
+ data += 'min-' + prop + ':' + size + 'px;';
+ }
+ return data;
+}
+
+/**
+* Base64 Encodes a string
+* @param {String} str The string to base64 encode.
+* @return Base64 Encoded String
+* @type String
+*/
+YAHOO.Tools.base64Encode = function(str) {
+ var data = "";
+ var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
+ var i = 0;
+
+ do {
+ chr1 = str.charCodeAt(i++);
+ chr2 = str.charCodeAt(i++);
+ chr3 = str.charCodeAt(i++);
+
+ enc1 = chr1 >> 2;
+ enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
+ enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
+ enc4 = chr3 & 63;
+
+ if (isNaN(chr2)) {
+ enc3 = enc4 = 64;
+ } else if (isNaN(chr3)) {
+ enc4 = 64;
+ }
+
+ data = data + keyStr.charAt(enc1) + keyStr.charAt(enc2) + keyStr.charAt(enc3) + keyStr.charAt(enc4);
+ } while (i < str.length);
+
+ return data;
+}
+/**
+* Base64 Dncodes a string
+* @param {String} str The base64 encoded string to decode.
+* @return The decoded String
+* @type String
+*/
+YAHOO.Tools.base64Decode = function(str) {
+ var data = "";
+ var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
+ var i = 0;
+
+ // remove all characters that are not A-Z, a-z, 0-9, +, /, or =
+ str = str.replace(regExs.base64, "");
+
+ do {
+ enc1 = keyStr.indexOf(str.charAt(i++));
+ enc2 = keyStr.indexOf(str.charAt(i++));
+ enc3 = keyStr.indexOf(str.charAt(i++));
+ enc4 = keyStr.indexOf(str.charAt(i++));
+
+ chr1 = (enc1 << 2) | (enc2 >> 4);
+ chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
+ chr3 = ((enc3 & 3) << 6) | enc4;
+
+ data = data + String.fromCharCode(chr1);
+
+ if (enc3 != 64) {
+ data = data + String.fromCharCode(chr2);
+ }
+ if (enc4 != 64) {
+ data = data + String.fromCharCode(chr3);
+ }
+ } while (i < str.length);
+
+ return data;
+}
+
+/**
+* Parses a Query String, if one is not provided, it will look in location.href
+* NOTE: This function will also handle test[] vars and convert them to an array inside of the return object.
+* This now supports #hash vars, it will return it in the object as Obj.hash
+* @param {String} str The string to parse as a query string
+* @return An object of the parts of the parsed query string
+* @type Object
+*/
+YAHOO.Tools.getQueryString = function(str) {
+ var qstr = {};
+ if (!str) {
+ var str = location.href.split('?');
+ if (str.length != 2) {
+ str = ['', location.href];
+ }
+ } else {
+ var str = ['', str];
+ }
+ if (str[1].match('#')) {
+ var _tmp = str[1].split('#');
+ qstr.hash = _tmp[1];
+ str[1] = _tmp[0];
+ }
+ if (str[1]) {
+ str = str[1].split('&');
+ if (str.length) {
+ for (var i = 0; i < str.length; i++) {
+ var part = str[i].split('=');
+ if (part[0].indexOf('[') != -1) {
+ if (part[0].indexOf('[]') != -1) {
+ //Array
+ var arr = part[0].substring(0, part[0].length - 2);
+ if (!qstr[arr]) {
+ qstr[arr] = [];
+ }
+ qstr[arr][qstr[arr].length] = part[1];
+ } else {
+ //Object
+ var arr = part[0].substring(0, part[0].indexOf('['));
+ var data = part[0].substring((part[0].indexOf('[') + 1), part[0].indexOf(']'));
+ if (!qstr[arr]) {
+ qstr[arr] = {};
+ }
+ //Object
+ qstr[arr][data] = part[1];
+ }
+ } else {
+ qstr[part[0]] = part[1];
+ }
+ }
+ }
+ }
+ return qstr;
+}
+/**
+* Parses a Query String Var
+* NOTE: This function will also handle test[] vars and convert them to an array inside of the return object.
+* @param {String} str The var to get from the query string
+* @return The value of the var in the querystring.
+* @type String/Array
+*/
+YAHOO.Tools.getQueryStringVar = function(str) {
+ var qs = this.getQueryString();
+ if (qs[str]) {
+ return qs[str];
+ } else {
+ return false;
+ }
+}
+
+
+/**
+* Function to pad a date with a beginning 0 so 1 becomes 01, 2 becomes 02, etc..
+* @param {String} n The string to pad
+* @returns Zero padded string
+* @type String
+*/
+YAHOO.Tools.padDate = function(n) {
+ return n < 10 ? '0' + n : n;
+}
+
+/**
+* Converts a string to a JSON string
+* @param {String} str Converts a string to a JSON string
+* @returns JSON Encoded string
+* @type String
+*/
+YAHOO.Tools.encodeStr = function(str) {
+ if (/["\\\x00-\x1f]/.test(str)) {
+ return '"' + str.replace(/([\x00-\x1f\\"])/g, function(a, b) {
+ var c = jsonCodes[b];
+ if(c) {
+ return c;
+ }
+ c = b.charCodeAt();
+ return '\\u00' +
+ Math.floor(c / 16).toString(16) +
+ (c % 16).toString(16);
+ }) + '"';
+ }
+ return '"' + str + '"';
+}
+/**
+* Converts an Array to a JSON string
+* @param {Array} arr Converts an Array to a JSON string
+* @returns JSON encoded string
+* @type String
+*/
+YAHOO.Tools.encodeArr = function(arr) {
+ var a = ['['], b, i, l = arr.length, v;
+ for (i = 0; i < l; i += 1) {
+ v = arr[i];
+ switch (typeof v) {
+ case 'undefined':
+ case 'function':
+ case 'unknown':
+ break;
+ default:
+ if (b) {
+ a.push(',');
+ }
+ a.push(v === null ? "null" : YAHOO.Tools.JSONEncode(v));
+ b = true;
+ }
+ }
+ a.push(']');
+ return a.join('');
+}
+/**
+* Converts a Date object to a JSON string
+* @param {Object} d Converts a Date object to a JSON string
+* @returns JSON encoded Date string
+* @type String
+*/
+YAHOO.Tools.encodeDate = function(d) {
+ return '"' + d.getFullYear() + '-' + YAHOO.Tools.padDate(d.getMonth() + 1) + '-' + YAHOO.Tools.padDate(d.getDate()) + 'T' + YAHOO.Tools.padDate(d.getHours()) + ':' + YAHOO.Tools.padDate(d.getMinutes()) + ':' + YAHOO.Tools.padDate(d.getSeconds()) + '"';
+}
+
+/**
+* Fixes the JSON date format
+* @param {String} dateStr JSON encoded date string (YYYY-MM-DDTHH:MM:SS)
+* @returns Date Object
+* @type Object
+*/
+YAHOO.Tools.fixJSONDate = function(dateStr) {
+ var tmp = dateStr.split('T');
+ var fixedDate = dateStr;
+ if (tmp.length == 2) {
+ var tmpDate = tmp[0].split('-');
+ if (tmpDate.length == 3) {
+ fixedDate = new Date(tmpDate[0], (tmpDate[1] - 1), tmpDate[2]);
+ var tmpTime = tmp[1].split(':');
+ if (tmpTime.length == 3) {
+ fixedDate.setHours(tmpTime[0], tmpTime[1], tmpTime[2]);
+ }
+ }
+ }
+ return fixedDate;
+}
+
+/**
+* Encode a Javascript Object/Array into a JSON string
+* @param {String/Object/Array} o Converts the object to a JSON string
+* @returns JSON String
+* @type String
+*/
+YAHOO.Tools.JSONEncode = function(o) {
+ if ((typeof o == 'undefined') || (o === null)) {
+ return 'null';
+ } else if (o instanceof Array) {
+ return YAHOO.Tools.encodeArr(o);
+ } else if (o instanceof Date) {
+ return YAHOO.Tools.encodeDate(o);
+ } else if (typeof o == 'string') {
+ return YAHOO.Tools.encodeStr(o);
+ } else if (typeof o == 'number') {
+ return isFinite(o) ? String(o) : "null";
+ } else if (typeof o == 'boolean') {
+ return String(o);
+ } else {
+ var a = ['{'], b, i, v;
+ for (var i in o) {
+ //if (o.hasOwnProperty(i)) {
+ v = o[i];
+ switch (typeof v) {
+ case 'undefined':
+ case 'function':
+ case 'unknown':
+ break;
+ default:
+ if (b) {
+ a.push(',');
+ }
+ a.push(YAHOO.Tools.JSONEncode(i), ':', ((v === null) ? "null" : YAHOO.Tools.JSONEncode(v)));
+ b = true;
+ }
+ //}
+ }
+ a.push('}');
+ return a.join('');
+ }
+}
+/**
+* Converts/evals a JSON string into a native Javascript object
+* @param {String} json Converts the JSON string back into the native object
+* @param {Booleen} autoDate Try to autofix date objects
+* @returns eval'd object
+* @type Object/Array/String
+*/
+YAHOO.Tools.JSONParse = function(json, autoDate) {
+ var autoDate = ((autoDate) ? true : false);
+ try {
+ if (regExs.syntaxCheck.test(json)) {
+ var j = eval('(' + json + ')');
+ if (autoDate) {
+ function walk(k, v) {
+ if (v && typeof v === 'object') {
+ for (var i in v) {
+ if (v.hasOwnProperty(i)) {
+ v[i] = walk(i, v[i]);
+ }
+ }
+ }
+ if (k.toLowerCase().indexOf('date') >= 0) {
+ return YAHOO.Tools.fixJSONDate(v);
+ } else {
+ return v;
+ }
+ }
+ return walk('', j);
+ } else {
+ return j;
+ }
+ }
+ } catch(e) {
+ console.log(e);
+ }
+ throw new SyntaxError("parseJSON");
+}
+
+
+/*
+* Try to catch the developers that use the wrong case 8-)
+*/
+YAHOO.tools = YAHOO.Tools;
+YAHOO.TOOLS = YAHOO.Tools;
+YAHOO.util.Dom.create = YAHOO.Tools.create;
+/*
+* Smaller Code
+*/
+
+$A = YAHOO.util.Anim;
+$E = YAHOO.util.Event;
+$D = YAHOO.util.Dom;
+$T = YAHOO.Tools;
+$ = YAHOO.util.Dom.get;
+$$ = YAHOO.util.Dom.getElementsByClassName;
--
libgit2 0.21.4