diff --git a/Ressource/Bellows/Software/BellowConfig.cs b/Ressource/Bellows/Software/BellowConfig.cs new file mode 100644 index 0000000..a11b329 --- /dev/null +++ b/Ressource/Bellows/Software/BellowConfig.cs @@ -0,0 +1,55 @@ +// Bellows - bellows fold pattern printer, based on US Patent No 6,054,194, +// Mathematically optimized family of ultra low distortion bellow fold patterns, Nathan R. Kane. +// Copyright (C) 2008, Frank Tkalcevic, www.franksworkshop.com + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// any later version. + +// This program 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 General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +using System; +using System.Collections.Generic; +using System.Text; +using System.Configuration; + +namespace Bellows +{ + public sealed class BellowConfig : ConfigurationSection + { + public BellowConfig() + { + } + + [ConfigurationProperty("Bellows", IsDefaultCollection = false)] + [ConfigurationCollection(typeof(BellowsCollection))] + public BellowsCollection Bellows + { + get + { + BellowsCollection col = (BellowsCollection)base["Bellows"]; + return col; + } + } + + [ConfigurationProperty("SelectedItem", DefaultValue = "")] + public string SelectedItem + { + get + { + return (string)this["SelectedItem"]; + } + set + { + this["SelectedItem"] = value; + } + } + } +} diff --git a/Ressource/Bellows/Software/Bellows.csproj b/Ressource/Bellows/Software/Bellows.csproj new file mode 100644 index 0000000..90fc43c --- /dev/null +++ b/Ressource/Bellows/Software/Bellows.csproj @@ -0,0 +1,105 @@ + + + Debug + AnyCPU + 8.0.50727 + 2.0 + {1B2A83A3-0B23-4EB5-864A-CBA5A9E7D7A0} + WinExe + Properties + Bellows + Bellows + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + false + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + Form + + + Form1.cs + + + Form + + + GenerateGCode.cs + + + Form + + + NewName.cs + + + + + Designer + Form1.cs + + + Designer + GenerateGCode.cs + + + Designer + NewName.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + True + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + \ No newline at end of file diff --git a/Ressource/Bellows/Software/Bellows.sln b/Ressource/Bellows/Software/Bellows.sln new file mode 100644 index 0000000..b998061 --- /dev/null +++ b/Ressource/Bellows/Software/Bellows.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bellows", "Bellows.csproj", "{1B2A83A3-0B23-4EB5-864A-CBA5A9E7D7A0}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {1B2A83A3-0B23-4EB5-864A-CBA5A9E7D7A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1B2A83A3-0B23-4EB5-864A-CBA5A9E7D7A0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1B2A83A3-0B23-4EB5-864A-CBA5A9E7D7A0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1B2A83A3-0B23-4EB5-864A-CBA5A9E7D7A0}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Ressource/Bellows/Software/Bellows.suo b/Ressource/Bellows/Software/Bellows.suo new file mode 100644 index 0000000..3cb7075 Binary files /dev/null and b/Ressource/Bellows/Software/Bellows.suo differ diff --git a/Ressource/Bellows/Software/BellowsCollection.cs b/Ressource/Bellows/Software/BellowsCollection.cs new file mode 100644 index 0000000..3f5141e --- /dev/null +++ b/Ressource/Bellows/Software/BellowsCollection.cs @@ -0,0 +1,110 @@ +// Bellows - bellows fold pattern printer, based on US Patent No 6,054,194, +// Mathematically optimized family of ultra low distortion bellow fold patterns, Nathan R. Kane. +// Copyright (C) 2008, Frank Tkalcevic, www.franksworkshop.com + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// any later version. + +// This program 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 General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +using System; +using System.Collections.Generic; +using System.Text; +using System.Configuration; + +namespace Bellows +{ + public class BellowsCollection : ConfigurationElementCollection + { + public BellowsCollection() + { + //BellowsConfigElement e = (BellowsConfigElement)CreateNewElement(); + //Add(e); + } + + public override ConfigurationElementCollectionType CollectionType + { + get + { + return ConfigurationElementCollectionType.AddRemoveClearMap; + } + } + + protected override ConfigurationElement CreateNewElement() + { + return new BellowsConfigElement(); + } + + protected override Object GetElementKey(ConfigurationElement element) + { + return ((BellowsConfigElement)element).Name; + } + + public BellowsConfigElement this[int index] + { + get + { + return (BellowsConfigElement)BaseGet(index); + } + set + { + if (BaseGet(index) != null) + { + BaseRemoveAt(index); + } + BaseAdd(index, value); + } + } + + new public BellowsConfigElement this[string Name] + { + get + { + return (BellowsConfigElement)BaseGet(Name); + } + } + + public int IndexOf(BellowsConfigElement e) + { + return BaseIndexOf(e); + } + + public void Add(BellowsConfigElement e) + { + BaseAdd(e); + } + protected override void BaseAdd(ConfigurationElement element) + { + BaseAdd(element, false); + } + + public void Remove(BellowsConfigElement e) + { + if (BaseIndexOf(e) >= 0) + BaseRemove(e.Name); + } + + public void RemoveAt(int index) + { + BaseRemoveAt(index); + } + + public void Remove(string name) + { + BaseRemove(name); + } + + public void Clear() + { + BaseClear(); + } + } +} diff --git a/Ressource/Bellows/Software/BellowsConfigElement.cs b/Ressource/Bellows/Software/BellowsConfigElement.cs new file mode 100644 index 0000000..e77ac5c --- /dev/null +++ b/Ressource/Bellows/Software/BellowsConfigElement.cs @@ -0,0 +1,157 @@ +// Bellows - bellows fold pattern printer, based on US Patent No 6,054,194, +// Mathematically optimized family of ultra low distortion bellow fold patterns, Nathan R. Kane. +// Copyright (C) 2008, Frank Tkalcevic, www.franksworkshop.com + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// any later version. + +// This program 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 General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +using System; +using System.Collections.Generic; +using System.Text; +using System.Configuration; + +namespace Bellows +{ + public sealed class BellowsConfigElement : ConfigurationSection + { + public BellowsConfigElement() + { + } + + public enum EBellowsShape + { + HalfCover=1, + EnclosedBox=2 + }; + + [ConfigurationProperty("Name", DefaultValue = "Default", IsRequired = true, IsKey = true)] + public string Name + { + get + { + return (string)this["Name"]; + } + set + { + this["Name"] = value; + } + } + + [ConfigurationProperty("BellowsShape", DefaultValue = EBellowsShape.HalfCover)] + //[IntegerValidator(MinValue = 1, MaxValue = 2)] + public EBellowsShape BellowsShape + { + get + { + return (EBellowsShape)this["BellowsShape"]; + } + set + { + this["BellowsShape"] = value; + } + } + + [ConfigurationProperty("Inversions", DefaultValue = 2)] + //[IntegerValidator(MinValue = 1, MaxValue = 4)] + public int Inversions + { + get + { + return (int)this["Inversions"]; + } + set + { + this["Inversions"] = value; + } + } + + [ConfigurationProperty("Width", DefaultValue = 50.0)] + public double Width + { + get + { + return (double)this["Width"]; + } + set + { + this["Width"] = value; + } + } + [ConfigurationProperty("Height", DefaultValue = 80.0)] + public double Height + { + get + { + return (double)this["Height"]; + } + set + { + this["Height"] = value; + } + } + [ConfigurationProperty("Length", DefaultValue = 150.0)] + public double Length + { + get + { + return (double)this["Length"]; + } + set + { + this["Length"] = value; + } + } + [ConfigurationProperty("FoldWidth", DefaultValue = 10.0)] + public double FoldWidth + { + get + { + return (double)this["FoldWidth"]; + } + set + { + this["FoldWidth"] = value; + } + } + [ConfigurationProperty("MountFolds", DefaultValue = 4)] + //[IntegerValidator(MinValue = 0, MaxValue = 10)] + public int MountFolds + { + get + { + return (int)this["MountFolds"]; + } + set + { + this["MountFolds"] = value; + } + } + [ConfigurationProperty("AlternateFolds", DefaultValue = false)] + public bool AlternateFolds + { + get + { + return (bool)this["AlternateFolds"]; + } + set + { + this["AlternateFolds"] = value; + } + } + + public override string ToString() + { + return Name; + } + } +} diff --git a/Ressource/Bellows/Software/COPYING.txt b/Ressource/Bellows/Software/COPYING.txt new file mode 100644 index 0000000..94a9ed0 --- /dev/null +++ b/Ressource/Bellows/Software/COPYING.txt @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If 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 convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU 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 +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "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 PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM 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 PROGRAM (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 PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state 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 program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program 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 General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/Ressource/Bellows/Software/Cutter.emf b/Ressource/Bellows/Software/Cutter.emf new file mode 100644 index 0000000..3b4bcc0 Binary files /dev/null and b/Ressource/Bellows/Software/Cutter.emf differ diff --git a/Ressource/Bellows/Software/Cutter.vsd b/Ressource/Bellows/Software/Cutter.vsd new file mode 100644 index 0000000..1b0d1b2 Binary files /dev/null and b/Ressource/Bellows/Software/Cutter.vsd differ diff --git a/Ressource/Bellows/Software/Cutter.wmf b/Ressource/Bellows/Software/Cutter.wmf new file mode 100644 index 0000000..031ddfb Binary files /dev/null and b/Ressource/Bellows/Software/Cutter.wmf differ diff --git a/Ressource/Bellows/Software/Form1.Designer.cs b/Ressource/Bellows/Software/Form1.Designer.cs new file mode 100644 index 0000000..a227e3f --- /dev/null +++ b/Ressource/Bellows/Software/Form1.Designer.cs @@ -0,0 +1,445 @@ +// Bellows - bellows fold pattern printer, based on US Patent No 6,054,194, +// Mathematically optimized family of ultra low distortion bellow fold patterns, Nathan R. Kane. +// Copyright (C) 2008, Frank Tkalcevic, www.franksworkshop.com + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// any later version. + +// This program 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 General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +namespace Bellows +{ + partial class Form1 + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1)); + this.cboInversions = new System.Windows.Forms.ComboBox(); + this.label1 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.cboShape = new System.Windows.Forms.ComboBox(); + this.label3 = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.txtWidth = new System.Windows.Forms.TextBox(); + this.txtHeight = new System.Windows.Forms.TextBox(); + this.label5 = new System.Windows.Forms.Label(); + this.txtLength = new System.Windows.Forms.TextBox(); + this.chkAlternateFolds = new System.Windows.Forms.CheckBox(); + this.label6 = new System.Windows.Forms.Label(); + this.txtFoldWidth = new System.Windows.Forms.TextBox(); + this.txtMountFolds = new System.Windows.Forms.TextBox(); + this.label7 = new System.Windows.Forms.Label(); + this.btnPrint = new System.Windows.Forms.Button(); + this.btnPrintSetup = new System.Windows.Forms.Button(); + this.pageSetupDialog1 = new System.Windows.Forms.PageSetupDialog(); + this.printDialog1 = new System.Windows.Forms.PrintDialog(); + this.printDocument1 = new System.Drawing.Printing.PrintDocument(); + this.printPreviewDialog1 = new System.Windows.Forms.PrintPreviewDialog(); + this.btnPageSetup = new System.Windows.Forms.Button(); + this.cboConfig = new System.Windows.Forms.ComboBox(); + this.label8 = new System.Windows.Forms.Label(); + this.btnNewConfig = new System.Windows.Forms.Button(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.panel1 = new System.Windows.Forms.Panel(); + this.lblPageWidth = new System.Windows.Forms.Label(); + this.label10 = new System.Windows.Forms.Label(); + this.lblPageHeight = new System.Windows.Forms.Label(); + this.label9 = new System.Windows.Forms.Label(); + this.btnGCode = new System.Windows.Forms.Button(); + this.groupBox1.SuspendLayout(); + this.SuspendLayout(); + // + // cboInversions + // + this.cboInversions.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cboInversions.FormattingEnabled = true; + this.cboInversions.Location = new System.Drawing.Point(96, 44); + this.cboInversions.Name = "cboInversions"; + this.cboInversions.Size = new System.Drawing.Size(55, 21); + this.cboInversions.TabIndex = 1; + this.cboInversions.SelectedIndexChanged += new System.EventHandler(this.cboInversions_SelectedIndexChanged); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(12, 47); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(55, 13); + this.label1.TabIndex = 2; + this.label1.Text = "Inversions"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(12, 20); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(38, 13); + this.label2.TabIndex = 3; + this.label2.Text = "Shape"; + // + // cboShape + // + this.cboShape.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cboShape.FormattingEnabled = true; + this.cboShape.Location = new System.Drawing.Point(96, 17); + this.cboShape.Name = "cboShape"; + this.cboShape.Size = new System.Drawing.Size(121, 21); + this.cboShape.TabIndex = 0; + this.cboShape.SelectedIndexChanged += new System.EventHandler(this.cboShape_SelectedIndexChanged); + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(263, 17); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(66, 13); + this.label3.TabIndex = 5; + this.label3.Text = "Inside Width"; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(263, 43); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(69, 13); + this.label4.TabIndex = 6; + this.label4.Text = "Inside Height"; + // + // txtWidth + // + this.txtWidth.Location = new System.Drawing.Point(355, 14); + this.txtWidth.Name = "txtWidth"; + this.txtWidth.Size = new System.Drawing.Size(100, 20); + this.txtWidth.TabIndex = 4; + this.txtWidth.Leave += new System.EventHandler(this.txtWidth_Leave); + // + // txtHeight + // + this.txtHeight.Location = new System.Drawing.Point(355, 40); + this.txtHeight.Name = "txtHeight"; + this.txtHeight.Size = new System.Drawing.Size(100, 20); + this.txtHeight.TabIndex = 5; + this.txtHeight.Leave += new System.EventHandler(this.txtHeight_Leave); + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(263, 69); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(89, 13); + this.label5.TabIndex = 9; + this.label5.Text = "Protected Length"; + // + // txtLength + // + this.txtLength.Location = new System.Drawing.Point(355, 66); + this.txtLength.Name = "txtLength"; + this.txtLength.Size = new System.Drawing.Size(100, 20); + this.txtLength.TabIndex = 6; + this.txtLength.Leave += new System.EventHandler(this.txtLength_Leave); + // + // chkAlternateFolds + // + this.chkAlternateFolds.AutoSize = true; + this.chkAlternateFolds.CheckAlign = System.Drawing.ContentAlignment.MiddleRight; + this.chkAlternateFolds.Location = new System.Drawing.Point(15, 94); + this.chkAlternateFolds.Name = "chkAlternateFolds"; + this.chkAlternateFolds.Size = new System.Drawing.Size(96, 17); + this.chkAlternateFolds.TabIndex = 3; + this.chkAlternateFolds.Text = "Alternate Folds"; + this.chkAlternateFolds.UseVisualStyleBackColor = true; + this.chkAlternateFolds.CheckedChanged += new System.EventHandler(this.chkAlternateFolds_CheckedChanged); + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(263, 95); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(58, 13); + this.label6.TabIndex = 12; + this.label6.Text = "Fold Width"; + // + // txtFoldWidth + // + this.txtFoldWidth.Location = new System.Drawing.Point(355, 92); + this.txtFoldWidth.Name = "txtFoldWidth"; + this.txtFoldWidth.Size = new System.Drawing.Size(100, 20); + this.txtFoldWidth.TabIndex = 7; + this.txtFoldWidth.Leave += new System.EventHandler(this.txtFoldWidth_Leave); + // + // txtMountFolds + // + this.txtMountFolds.Location = new System.Drawing.Point(96, 69); + this.txtMountFolds.Name = "txtMountFolds"; + this.txtMountFolds.Size = new System.Drawing.Size(55, 20); + this.txtMountFolds.TabIndex = 2; + this.txtMountFolds.Leave += new System.EventHandler(this.txtMountFolds_Leave); + // + // label7 + // + this.label7.AutoSize = true; + this.label7.Location = new System.Drawing.Point(12, 72); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(79, 13); + this.label7.TabIndex = 14; + this.label7.Text = "Mounting Folds"; + // + // btnPrint + // + this.btnPrint.Location = new System.Drawing.Point(96, 120); + this.btnPrint.Name = "btnPrint"; + this.btnPrint.Size = new System.Drawing.Size(94, 23); + this.btnPrint.TabIndex = 9; + this.btnPrint.Text = "Print Preview"; + this.btnPrint.UseVisualStyleBackColor = true; + this.btnPrint.Click += new System.EventHandler(this.btnPrint_Click); + // + // btnPrintSetup + // + this.btnPrintSetup.Location = new System.Drawing.Point(196, 120); + this.btnPrintSetup.Name = "btnPrintSetup"; + this.btnPrintSetup.Size = new System.Drawing.Size(99, 23); + this.btnPrintSetup.TabIndex = 10; + this.btnPrintSetup.Text = "Print..."; + this.btnPrintSetup.UseVisualStyleBackColor = true; + this.btnPrintSetup.Click += new System.EventHandler(this.btnPrintSetup_Click); + // + // printDialog1 + // + this.printDialog1.UseEXDialog = true; + // + // printDocument1 + // + this.printDocument1.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(this.printDocument1_PrintPage); + this.printDocument1.BeginPrint += new System.Drawing.Printing.PrintEventHandler(this.printDocument1_BeginPrint); + // + // printPreviewDialog1 + // + this.printPreviewDialog1.AutoScrollMargin = new System.Drawing.Size(0, 0); + this.printPreviewDialog1.AutoScrollMinSize = new System.Drawing.Size(0, 0); + this.printPreviewDialog1.ClientSize = new System.Drawing.Size(400, 300); + this.printPreviewDialog1.Enabled = true; + this.printPreviewDialog1.Icon = ((System.Drawing.Icon)(resources.GetObject("printPreviewDialog1.Icon"))); + this.printPreviewDialog1.Name = "printPreviewDialog1"; + this.printPreviewDialog1.Visible = false; + // + // btnPageSetup + // + this.btnPageSetup.Location = new System.Drawing.Point(15, 120); + this.btnPageSetup.Name = "btnPageSetup"; + this.btnPageSetup.Size = new System.Drawing.Size(75, 23); + this.btnPageSetup.TabIndex = 8; + this.btnPageSetup.Text = "Page Setup"; + this.btnPageSetup.UseVisualStyleBackColor = true; + this.btnPageSetup.Click += new System.EventHandler(this.btnPageSetup_Click); + // + // cboConfig + // + this.cboConfig.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cboConfig.FormattingEnabled = true; + this.cboConfig.Location = new System.Drawing.Point(74, 14); + this.cboConfig.Name = "cboConfig"; + this.cboConfig.Size = new System.Drawing.Size(121, 21); + this.cboConfig.TabIndex = 0; + this.cboConfig.SelectedIndexChanged += new System.EventHandler(this.cboConfig_SelectedIndexChanged); + // + // label8 + // + this.label8.AutoSize = true; + this.label8.Location = new System.Drawing.Point(15, 17); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(37, 13); + this.label8.TabIndex = 19; + this.label8.Text = "Config"; + // + // btnNewConfig + // + this.btnNewConfig.Location = new System.Drawing.Point(213, 12); + this.btnNewConfig.Name = "btnNewConfig"; + this.btnNewConfig.Size = new System.Drawing.Size(75, 23); + this.btnNewConfig.TabIndex = 1; + this.btnNewConfig.Text = "New"; + this.btnNewConfig.UseVisualStyleBackColor = true; + this.btnNewConfig.Click += new System.EventHandler(this.btnNewConfig_Click); + // + // groupBox1 + // + this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBox1.Controls.Add(this.btnGCode); + this.groupBox1.Controls.Add(this.panel1); + this.groupBox1.Controls.Add(this.cboShape); + this.groupBox1.Controls.Add(this.cboInversions); + this.groupBox1.Controls.Add(this.label1); + this.groupBox1.Controls.Add(this.btnPageSetup); + this.groupBox1.Controls.Add(this.label2); + this.groupBox1.Controls.Add(this.btnPrintSetup); + this.groupBox1.Controls.Add(this.lblPageWidth); + this.groupBox1.Controls.Add(this.label10); + this.groupBox1.Controls.Add(this.label3); + this.groupBox1.Controls.Add(this.lblPageHeight); + this.groupBox1.Controls.Add(this.btnPrint); + this.groupBox1.Controls.Add(this.label9); + this.groupBox1.Controls.Add(this.label4); + this.groupBox1.Controls.Add(this.txtMountFolds); + this.groupBox1.Controls.Add(this.txtWidth); + this.groupBox1.Controls.Add(this.label7); + this.groupBox1.Controls.Add(this.txtHeight); + this.groupBox1.Controls.Add(this.txtFoldWidth); + this.groupBox1.Controls.Add(this.label5); + this.groupBox1.Controls.Add(this.label6); + this.groupBox1.Controls.Add(this.txtLength); + this.groupBox1.Controls.Add(this.chkAlternateFolds); + this.groupBox1.Location = new System.Drawing.Point(12, 41); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(674, 435); + this.groupBox1.TabIndex = 22; + this.groupBox1.TabStop = false; + // + // panel1 + // + this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel1.Location = new System.Drawing.Point(6, 150); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(662, 279); + this.panel1.TabIndex = 19; + this.panel1.Paint += new System.Windows.Forms.PaintEventHandler(this.panel1_Paint); + // + // lblPageWidth + // + this.lblPageWidth.AutoSize = true; + this.lblPageWidth.Location = new System.Drawing.Point(559, 17); + this.lblPageWidth.Name = "lblPageWidth"; + this.lblPageWidth.Size = new System.Drawing.Size(63, 13); + this.lblPageWidth.TabIndex = 5; + this.lblPageWidth.Text = "Page Width"; + // + // label10 + // + this.label10.AutoSize = true; + this.label10.Location = new System.Drawing.Point(490, 17); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(63, 13); + this.label10.TabIndex = 5; + this.label10.Text = "Page Width"; + // + // lblPageHeight + // + this.lblPageHeight.AutoSize = true; + this.lblPageHeight.Location = new System.Drawing.Point(559, 43); + this.lblPageHeight.Name = "lblPageHeight"; + this.lblPageHeight.Size = new System.Drawing.Size(66, 13); + this.lblPageHeight.TabIndex = 6; + this.lblPageHeight.Text = "Page Height"; + // + // label9 + // + this.label9.AutoSize = true; + this.label9.Location = new System.Drawing.Point(490, 43); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(66, 13); + this.label9.TabIndex = 6; + this.label9.Text = "Page Height"; + // + // btnGCode + // + this.btnGCode.Location = new System.Drawing.Point(302, 120); + this.btnGCode.Name = "btnGCode"; + this.btnGCode.Size = new System.Drawing.Size(99, 23); + this.btnGCode.TabIndex = 20; + this.btnGCode.Text = "Generate G Code"; + this.btnGCode.UseVisualStyleBackColor = true; + this.btnGCode.Click += new System.EventHandler(this.btnGCode_Click); + // + // Form1 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(698, 488); + this.Controls.Add(this.groupBox1); + this.Controls.Add(this.btnNewConfig); + this.Controls.Add(this.cboConfig); + this.Controls.Add(this.label8); + this.Name = "Form1"; + this.Text = "Bellows Calculator"; + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.ComboBox cboInversions; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.ComboBox cboShape; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.TextBox txtWidth; + private System.Windows.Forms.TextBox txtHeight; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.TextBox txtLength; + private System.Windows.Forms.CheckBox chkAlternateFolds; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.TextBox txtFoldWidth; + private System.Windows.Forms.TextBox txtMountFolds; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.Button btnPrint; + private System.Windows.Forms.Button btnPrintSetup; + private System.Windows.Forms.PageSetupDialog pageSetupDialog1; + private System.Windows.Forms.PrintDialog printDialog1; + private System.Drawing.Printing.PrintDocument printDocument1; + private System.Windows.Forms.PrintPreviewDialog printPreviewDialog1; + private System.Windows.Forms.Button btnPageSetup; + private System.Windows.Forms.ComboBox cboConfig; + private System.Windows.Forms.Label label8; + private System.Windows.Forms.Button btnNewConfig; + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.Label lblPageWidth; + private System.Windows.Forms.Label lblPageHeight; + private System.Windows.Forms.Button btnGCode; + } +} + diff --git a/Ressource/Bellows/Software/Form1.cs b/Ressource/Bellows/Software/Form1.cs new file mode 100644 index 0000000..d0e605c --- /dev/null +++ b/Ressource/Bellows/Software/Form1.cs @@ -0,0 +1,414 @@ +// Bellows - bellows fold pattern printer, based on US Patent No 6,054,194, +// Mathematically optimized family of ultra low distortion bellow fold patterns, Nathan R. Kane. +// Copyright (C) 2008, Frank Tkalcevic, www.franksworkshop.com + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// any later version. + +// This program 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 General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; +using System.Configuration; + +namespace Bellows +{ + public partial class Form1 : Form + { + double dblPaperWidth; + int nFolds; + int nPage; + int nPages; + Configuration m_Config; + BellowsConfigElement m_CurrentElement; + bool m_bCalculationError; + + public Form1() + { + m_bCalculationError = true; + InitializeComponent(); + + cboShape.Items.Add(BellowsConfigElement.EBellowsShape.HalfCover); + cboShape.Items.Add(BellowsConfigElement.EBellowsShape.EnclosedBox); + + cboInversions.Items.Add(1); + cboInversions.Items.Add(2); + cboInversions.Items.Add(3); + cboInversions.Items.Add(4); + + m_Config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); + + BellowConfig cfg = (BellowConfig)m_Config.Sections["BellowConfig"]; + if (cfg == null) + { + cfg = new BellowConfig(); + m_Config.Sections.Add("BellowConfig", cfg); + cfg = (BellowConfig)m_Config.Sections["BellowConfig"]; + cfg.SectionInformation.ForceSave = true; + } + + foreach (BellowsConfigElement b in cfg.Bellows) + { + cboConfig.Items.Add(b); + } + int nItem = cboConfig.FindStringExact( ((BellowConfig)m_Config.Sections["BellowConfig"]).SelectedItem ); + if (nItem >= 0) + cboConfig.SelectedIndex = nItem; + else + { + if ( cboConfig.Items.Count > 0 ) + cboConfig.SelectedIndex = 0; + } + + printDocument1.PrinterSettings = printDialog1.PrinterSettings; + + UpdateCalculations(); + } + + private bool UpdateCalculations() + { + bool bRet = false; + try + { + double dblLength = double.Parse(txtLength.Text); + double dblFoldWidth = double.Parse(txtFoldWidth.Text); + int nMountFolds = int.Parse(txtMountFolds.Text); + double dblExtensionAngle = 120.0; + double dblWidth = double.Parse(txtWidth.Text); + double dblHeight = double.Parse(txtHeight.Text); + + // Compute the number of folds + // = Length / (FoldWidth*sin(120)) + double dblFolds = dblLength / (dblFoldWidth * Math.Sin(dblExtensionAngle / 2 / 180 * Math.PI)); + nFolds = (int)(dblFolds + 1.0); + // Round up to even number. + if ((nFolds & 1) == 1) + nFolds++; + // Then add mount folds + nFolds += nMountFolds; + + // Use width and height to calculate fold dimensions + double dblTopWidth = dblWidth + 2 * dblFoldWidth; + double dblSideHeight = dblHeight + dblFoldWidth; + + dblPaperWidth = dblTopWidth + 2 * dblSideHeight; + + lblPageWidth.Text = dblPaperWidth.ToString() + " mm"; + lblPageHeight.Text = ((double)nFolds * dblFoldWidth).ToString() + "mm"; + + + bRet = true; + m_bCalculationError = false; + } + catch (Exception ) + { + bRet = false; + m_bCalculationError = true; + } + + panel1.Invalidate(); + return bRet; + } + + private void panel1_Paint(object sender, PaintEventArgs e) + { + DrawBellows(e.Graphics); + } + + private void DrawBellows( Graphics g ) + { + double dblFoldWidth; + double dblHeight; + + if (!double.TryParse(txtFoldWidth.Text, out dblFoldWidth)) + return; + + if (!double.TryParse(txtHeight.Text, out dblHeight)) + return; + + double dblPaperHeight = (double)nFolds * dblFoldWidth; + + Pen oSolidPen; + Pen oDottedPen; + if (!m_bCalculationError) + { + oSolidPen = new Pen(Color.Black, 0.25f); + oDottedPen = new Pen(Color.Black, 0.25f); + } + else + { + oSolidPen = new Pen(Color.Red, 0.25f); + oDottedPen = new Pen(Color.Red, 0.25f); + } + + oDottedPen.DashStyle = System.Drawing.Drawing2D.DashStyle.DashDot; + + double a1 = 72.57 / 180.0 * Math.PI; + double a2 = 27.57 / 180.0 * Math.PI; + + double x1 = dblHeight + dblFoldWidth; + double x2 = dblPaperWidth - x1; + + bool bAlternate = chkAlternateFolds.Checked; + + g.DrawRectangle(oSolidPen, 0, 0, (float)dblPaperWidth, (float)dblPaperHeight); + g.DrawLine(oSolidPen, 0, 0, (float)dblPaperWidth, (float)dblPaperHeight); + for (int i = 0; i < nFolds; i += 2) + { + double dxa1 = dblFoldWidth / Math.Tan(a1); + double dxa2 = dblFoldWidth / Math.Tan(a2); + + double y = (double)(i + 1) * dblFoldWidth; + g.DrawLine(oSolidPen, 0, (float)y, (float)dblPaperWidth, (float)y); + g.DrawLine(oSolidPen, 0, (float)(y - dblFoldWidth), 0, (float)(float)(y + dblFoldWidth)); + g.DrawLine(oSolidPen, (float)dblPaperWidth, (float)(y - dblFoldWidth), (float)dblPaperWidth, (float)(float)(y + dblFoldWidth)); + + double dblAlt = 1.0; + if (bAlternate) + if ((i & 2) == 0) + dblAlt = 1.0; + else + dblAlt = -1.0; + + g.DrawLine(oDottedPen, 0, (float)(y + dblFoldWidth), (float)(x1 - dblAlt * dxa2), (float)(y + dblFoldWidth)); + g.DrawLine(oSolidPen, (float)(x1 - dblAlt * dxa2), (float)(y + dblFoldWidth), (float)(x1 - dblAlt * dxa1), (float)(y + dblFoldWidth)); + g.DrawLine(oDottedPen, (float)(x1 - dblAlt * dxa1), (float)(y + dblFoldWidth), (float)(x2 + dblAlt * dxa1), (float)(y + dblFoldWidth)); + g.DrawLine(oSolidPen, (float)(x2 + dblAlt * dxa1), (float)(y + dblFoldWidth), (float)(x2 + dblAlt * dxa2), (float)(y + dblFoldWidth)); + g.DrawLine(oDottedPen, (float)(x2 + dblAlt * dxa1), (float)(y + dblFoldWidth), (float)(dblPaperWidth), (float)(y + dblFoldWidth)); + + + if ( bAlternate ) + if ( (i&2)== 0 ) + dblAlt = -1.0; + else + dblAlt = 1.0; + + g.DrawLine(oDottedPen, (float)(x1 - dblAlt*dxa2), (float)(y - dblFoldWidth), (float)(x1), (float)(y)); + g.DrawLine(oSolidPen, (float)(x1 - dblAlt * dxa1), (float)(y - dblFoldWidth), (float)(x1), (float)(y)); + g.DrawLine(oDottedPen, (float)(x2 + dblAlt * dxa2), (float)(y - dblFoldWidth), (float)(x2), (float)(y)); + g.DrawLine(oSolidPen, (float)(x2 + dblAlt * dxa1), (float)(y - dblFoldWidth), (float)(x2), (float)(y)); + + if (bAlternate) + if ( (i & 2) == 0) + dblAlt = 1.0; + else + dblAlt = -1.0; + + g.DrawLine(oDottedPen, (float)(x1 - dblAlt * dxa2), (float)(y + dblFoldWidth), (float)(x1), (float)(y)); + g.DrawLine(oSolidPen, (float)(x1 - dblAlt * dxa1), (float)(y + dblFoldWidth), (float)(x1), (float)(y)); + g.DrawLine(oDottedPen, (float)(x2 + dblAlt * dxa2), (float)(y + dblFoldWidth), (float)(x2), (float)(y)); + g.DrawLine(oSolidPen, (float)(x2 + dblAlt * dxa1), (float)(y + dblFoldWidth), (float)(x2), (float)(y)); + } + + } + + private void btnPrint_Click(object sender, EventArgs e) + { + UpdateCalculations(); + printPreviewDialog1.Document = printDocument1; + nPage = 0; + if (printPreviewDialog1.ShowDialog() == DialogResult.OK) + { + } + } + + private void btnPrintSetup_Click(object sender, EventArgs e) + { + UpdateCalculations(); + printDialog1.Document = printDocument1; + if (printDialog1.ShowDialog() == DialogResult.OK) + { + nPage = 0; + printDocument1.Print(); + } + } + + double dblPageWidth; + double dblPageHeight; + int nPartsVertical; + int nPartsHorizontal; + + private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e) + { + if (nPage == 0) + { + // First page. Compute the number of pages we will need. + if (e.PageSettings.Landscape) + { + dblPageWidth = (double)e.PageSettings.PrintableArea.Height * 25.4 / 100.0; + dblPageHeight = (double)e.PageSettings.PrintableArea.Width * 25.4 / 100.0; + } + else + { + dblPageWidth = (double)e.PageSettings.PrintableArea.Width * 25.4 / 100.0; + dblPageHeight = (double)e.PageSettings.PrintableArea.Height * 25.4 / 100.0; + } + + // 10mm overlap. + dblPageWidth -= 10; + dblPageHeight -= 10; + + double dblFoldWidth = double.Parse(txtFoldWidth.Text); + double dblPaperHeight = (double)nFolds * dblFoldWidth; + + // Parts vertically. + nPartsVertical = (int)(dblPaperHeight / dblPageHeight + 1.0); + + // Parts horizontal. + nPartsHorizontal = (int)(dblPaperWidth / dblPageWidth + 1.0); + + nPages = nPartsVertical * nPartsHorizontal; + } + + int nPageX = nPage / nPartsVertical; + int nPageY = nPage % nPartsVertical; + + e.Graphics.PageUnit = GraphicsUnit.Millimeter; + e.Graphics.TranslateTransform(-(float)nPageX * (float)dblPageWidth, -(float)nPageY * (float)dblPageHeight); + + DrawBellows(e.Graphics); + if (nPage+1 < nPages ) + { + nPage++; + e.HasMorePages = true; + } + } + + private void btnPageSetup_Click(object sender, EventArgs e) + { + pageSetupDialog1.Document = printDocument1; + pageSetupDialog1.ShowDialog(); + } + + private void printDocument1_BeginPrint(object sender, System.Drawing.Printing.PrintEventArgs e) + { + nPage = 0; + } + + private void StoreItems() + { + if (m_CurrentElement != null) + { + m_CurrentElement.Inversions = (int)cboInversions.SelectedItem; + m_CurrentElement.BellowsShape = (BellowsConfigElement.EBellowsShape)cboShape.SelectedItem; + m_CurrentElement.FoldWidth = Double.Parse(txtFoldWidth.Text); + m_CurrentElement.Height = Double.Parse(txtHeight.Text); + m_CurrentElement.Width = Double.Parse(txtWidth.Text); + m_CurrentElement.Length = Double.Parse(txtLength.Text); + m_CurrentElement.MountFolds = Int32.Parse(txtMountFolds.Text); + m_CurrentElement.AlternateFolds = chkAlternateFolds.Checked; + } + } + + private void cboConfig_SelectedIndexChanged(object sender, EventArgs e) + { + // Store old values + StoreItems(); + // Load new values + m_CurrentElement = (BellowsConfigElement)(((ComboBox)sender).SelectedItem); + + cboInversions.SelectedItem = m_CurrentElement.Inversions; + cboShape.SelectedItem = m_CurrentElement.BellowsShape; + txtFoldWidth.Text = m_CurrentElement.FoldWidth.ToString(); + txtHeight.Text = m_CurrentElement.Height.ToString(); + txtWidth.Text = m_CurrentElement.Width.ToString(); + txtLength.Text = m_CurrentElement.Length.ToString(); + txtMountFolds.Text = m_CurrentElement.MountFolds.ToString(); + chkAlternateFolds.Checked = m_CurrentElement.AlternateFolds; + } + + private void Form1_FormClosing(object sender, FormClosingEventArgs e) + { + StoreItems(); + ((BellowConfig)m_Config.Sections["BellowConfig"]).SelectedItem = cboConfig.SelectedItem.ToString(); + m_Config.Save(ConfigurationSaveMode.Full); + } + + private void btnNewConfig_Click(object sender, EventArgs ev) + { + NewName frm = new NewName(); + if ( frm.ShowDialog(this) == DialogResult.OK ) + { + BellowsCollection col = ((BellowConfig)m_Config.Sections["BellowConfig"]).Bellows; + if (col[frm.NameText] != null) + { + MessageBox.Show(this,"Configuration '" + frm.NameText + "' already exists"); + } + else + { + BellowsConfigElement e = new BellowsConfigElement(); + e.Name = frm.NameText; + col.Add(e); + cboConfig.Items.Add( e ); + cboConfig.SelectedItem = e; + } + } + } + + private void cboShape_SelectedIndexChanged(object sender, EventArgs e) + { + UpdateCalculations(); + } + + private void cboInversions_SelectedIndexChanged(object sender, EventArgs e) + { + UpdateCalculations(); + } + + private void chkAlternateFolds_CheckedChanged(object sender, EventArgs e) + { + UpdateCalculations(); + } + + private void txtMountFolds_Leave(object sender, EventArgs e) + { + UpdateCalculations(); + } + + private void txtWidth_Leave(object sender, EventArgs e) + { + UpdateCalculations(); + } + + private void txtHeight_Leave(object sender, EventArgs e) + { + UpdateCalculations(); + } + + private void txtLength_Leave(object sender, EventArgs e) + { + UpdateCalculations(); + } + + private void txtFoldWidth_Leave(object sender, EventArgs e) + { + UpdateCalculations(); + } + + private void btnGCode_Click(object sender, EventArgs e) + { + GenerateGCode dlg = new GenerateGCode(); + if ( dlg.ShowDialog(this) == DialogResult.OK ) + { + } + + string sFilename = @"c:\temp\Bellows"; + double dCutterOffset = 0.75; + + } + + } +} \ No newline at end of file diff --git a/Ressource/Bellows/Software/Form1.resx b/Ressource/Bellows/Software/Form1.resx new file mode 100644 index 0000000..63db3e7 --- /dev/null +++ b/Ressource/Bellows/Software/Form1.resx @@ -0,0 +1,306 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + + 159, 17 + + + 271, 17 + + + 402, 17 + + + + + AAABAAYAICAQAAAAAADoAgAAZgAAABAQEAAAAAAAKAEAAE4DAAAgIAAAAQAIAKgIAAB2BAAAEBAAAAEA + CABoBQAAHg0AACAgAAABACAAqBAAAIYSAAAQEAAAAQAgAGgEAAAuIwAAKAAAACAAAABAAAAAAQAEAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAACAgACAAAAAgACAAICAAACAgIAAwMDAAAAA + /wAA/wAAAP//AP8AAAD/AP8A//8AAP///wAiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIoiI + iIiIiIiIiIiIiIiIiIiCIigiIiIozMzMzMzMyCIogiIoIiIiKM7m5ubm5sgiKIIiKCIiIijObm5ubm7I + IiiCIigiIiIozubm5ubmyCIogiIoIiIiKM5ubm5ubsgiKIIiKCIiIijO5ubm5ubIIiiIiIiIiIiIzm5u + bm5uyCIogRERERERGM7u7u7u7sgiKIHZWVlZWRjMzMzMzMzIIiiB1ZWVlZUYiIiIiIiIiIiIgdlZWVlZ + GDMzMzMzMzMzOIHVlZWVlRg/uLi4uLi4uDiB2VlZWVkYP7uLi4uLi4s4gdWVlZWVGD+4uLi4uLi4OIHZ + WVlZWRg/u4uLi4uLiziB1ZWVlZUYP7i4uLi4uLg4gdlZWVlZGD+7i4uLi4uLOIHVlZWVlRg/uLi4uLi4 + uDiB3d3d3d0YP7uLi4uLi4s4gRERERERGD+4uLi4uLi4OIiIiIiIiIg/u4uLi4uLiziCIiIiIiIoP7i4 + uLi4uLg4giIiIiIiKD+7i4uLi4uLOIIiIiIiIig/uLi4uLi4uDiCIiIiIiIoP7u7u7u7u7s4giIiIiIi + KD//////////OIIiIiIiIigzMzMzMzMzMziIiIiIiIiIiIiIiIiIiIiIIiIiIiIiIiIiIiIiIiIiIv// + ////////AAAAAHv4AA57+AAOe/gADnv4AA57+AAOe/gADgAAAA4AAAAOAAAADgAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH/4AAB/+AAAf/gAAH/4AAB/+AAAf/gAAAAA + AAD/////KAAAABAAAAAgAAAAAQAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAACA + gACAAAAAgACAAICAAACAgIAAwMDAAAAA/wAA/wAAAP//AP8AAAD/AP8A//8AAP///wAiIiIiIiIiIoiI + iIiIiIiIgigijMzMyCiCKCKM5mbIKIiIiIzu7sgogRERjMzMyCiB2ZGIiIiIiIHZkYMzMzM4gdmRg/u7 + uziB3dGD+7u7OIEREYP7u7s4iIiIg/u7uziCIiKD+7u7OIIiIoP///84giIigzMzMziIiIiIiIiIiP// + KCIAACjObALm5mwCIigAAoiIAAKIzgAAbm4AACIoAAAREQAAGM4AAO7uAAAiKHwAWVl8ABjMfADMzAAA + IigoAAAAIAAAAEAAAAABAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAgAAAAICAAIAA + AACAAIAAgIAAAICAgADA3MAA8MqmAKo/KgD/PyoAAF8qAFVfKgCqXyoA/18qAAB/KgBVfyoAqn8qAP9/ + KgAAnyoAVZ8qAKqfKgD/nyoAAL8qAFW/KgCqvyoA/78qAADfKgBV3yoAqt8qAP/fKgAA/yoAVf8qAKr/ + KgD//yoAAABVAFUAVQCqAFUA/wBVAAAfVQBVH1UAqh9VAP8fVQAAP1UAVT9VAKo/VQD/P1UAAF9VAFVf + VQCqX1UA/19VAAB/VQBVf1UAqn9VAP9/VQAAn1UAVZ9VAKqfVQD/n1UAAL9VAFW/VQCqv1UA/79VAADf + VQBV31UAqt9VAP/fVQAA/1UAVf9VAKr/VQD//1UAAAB/AFUAfwCqAH8A/wB/AAAffwBVH38Aqh9/AP8f + fwAAP38AVT9/AKo/fwD/P38AAF9/AFVffwCqX38A/19/AAB/fwBVf38Aqn9/AP9/fwAAn38AVZ9/AKqf + fwD/n38AAL9/AFW/fwCqv38A/79/AADffwBV338Aqt9/AP/ffwAA/38AVf9/AKr/fwD//38AAACqAFUA + qgCqAKoA/wCqAAAfqgBVH6oAqh+qAP8fqgAAP6oAVT+qAKo/qgD/P6oAAF+qAFVfqgCqX6oA/1+qAAB/ + qgBVf6oAqn+qAP9/qgAAn6oAVZ+qAKqfqgD/n6oAAL+qAFW/qgCqv6oA/7+qAADfqgBV36oAqt+qAP/f + qgAA/6oAVf+qAKr/qgD//6oAAADUAFUA1ACqANQA/wDUAAAf1ABVH9QAqh/UAP8f1AAAP9QAVT/UAKo/ + 1AD/P9QAAF/UAFVf1ACqX9QA/1/UAAB/1ABVf9QAqn/UAP9/1AAAn9QAVZ/UAKqf1AD/n9QAAL/UAFW/ + 1ACqv9QA/7/UAADf1ABV39QAqt/UAP/f1AAA/9QAVf/UAKr/1AD//9QAVQD/AKoA/wAAH/8AVR//AKof + /wD/H/8AAD//AFU//wCqP/8A/z//AABf/wBVX/8Aql//AP9f/wAAf/8AVX//AKp//wD/f/8AAJ//AFWf + /wCqn/8A/5//AAC//wBVv/8Aqr//AP+//wAA3/8AVd//AKrf/wD/3/8AVf//AKr//wD/zMwA/8z/AP// + MwD//2YA//+ZAP//zAAAfwAAVX8AAKp/AAD/fwAAAJ8AAFWfAACqnwAA/58AAAC/AABVvwAAqr8AAP+/ + AAAA3wAAVd8AAKrfAAD/3wAAVf8AAKr/AAAAACoAVQAqAKoAKgD/ACoAAB8qAFUfKgCqHyoA/x8qAAA/ + KgBVPyoA8Pv/AKSgoACAgIAAAAD/AAD/AAAA//8A/wAAAAAAAAD//wAA////AP39/f39/f39/f39/f39 + /f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39 + /f39/f39/f39/f39/f39/f39/f39/f39qoYIqoYIhqoIqgiqCaoIqgiqhqqGhoYIhoYIqv39/f0I/f39 + /ar9/f39/YY2Ng4yDg4ODgoOCgoKCgqG/f39/Yb9/f39CP39/f39qjY7Ozs3Nzc3NjMSMjIOCqr9/f39 + qv39/f2G/f39/f0IN19fOzs3Nzc3NjcODg4KCP39/f0I/f39/ar9/f39/ao6X19fXzs7Ozc3NzY3NgqG + /f39/Yb9/f39CP39/f39hl9jY19jX187Ozs7Nzc3Dqr9/f39qv39/f2G/f39/f0IOodjh19jX19fXztf + OzcOCP39/f0ICAmqCAiqCKoICapfCYdjh2ODY19fXzs7Ow6q/f39/QhITEwoSCUoKSQoqmMJCYcJCWNj + Y2NfY19fNgj9/f39qkyZmZmYmJRwlCmqX19fXl9fX186WzY3Njc2gv39/f0JcJ2dmZmZlJmUJAmqCaoJ + hggIqggICKoIqggI/f39/YZwnp2dnZmZmJVMqnx8fHx8fFR8VHhUVFRUVKr9/f39CHChoZ2dnZ2ZmUwJ + fKSkxqSkxqSkpKSkpKBUCP39/f2qcKLDoqGdnZ2ZTKp8ysakxqSkxqSkxqSkpFSq/f39/QiUpqbDoqHE + nZ1Mq3ykqMakyqSkxqSkpKSkVAj9/f39hpTIyKbHoqGhoXAIfMrLpMqkxqSkxqTGpKRUqv39/f0IlMym + yKbIpcShcAh8y6jKpMqkxsqkpKSkxlQI/f39/aqUzMzMyKbIpqJwqnzLy8qpxsqkpMakxqSkeAj9/f39 + CJSUlJSUlJSUlJQJgMupy8qpysqkyqSkxqRUqv39/f2GCKoIqgiqCKoIhgigrcvPqcuoy8qkxsqkxnyG + /f39/ar9/f39/f39/f39qnzPz6nLy8uoyqnKpKTKVAj9/f39CP39/f39/f39/f0IfNDPz8+py8upyqjG + yqR8hv39/f2G/f39/f39/f39/Qik0K7P0M+ty8vLy6jKpXyq/f39/ar9/f39/f39/f39CHzQ09Ctz8/P + qcupy6jKeAj9/f39CP39/f39/f39/f2qoNPQ0NPQ0M/Qz8vLy6l8CP39/f2G/f39/f39/f39/QmkfKR8 + oHx8fHx8fHx8fHyG/f39/aoIqgiqCKoIqgiqCKoIqgiqCKoIqgiqCKoIqgj9/f39/f39/f39/f39/f39 + /f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f3///////////// + ///AAAAD3vgAA974AAPe+AAD3vgAA974AAPe+AADwAAAA8AAAAPAAAADwAAAA8AAAAPAAAADwAAAA8AA + AAPAAAADwAAAA8AAAAPAAAADwAAAA9/4AAPf+AAD3/gAA9/4AAPf+AAD3/gAA8AAAAP//////////ygA + AAAQAAAAIAAAAAEACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAACAAAAAgIAAgAAAAIAA + gACAgAAAgICAAMDcwADwyqYAqj8qAP8/KgAAXyoAVV8qAKpfKgD/XyoAAH8qAFV/KgCqfyoA/38qAACf + KgBVnyoAqp8qAP+fKgAAvyoAVb8qAKq/KgD/vyoAAN8qAFXfKgCq3yoA/98qAAD/KgBV/yoAqv8qAP// + KgAAAFUAVQBVAKoAVQD/AFUAAB9VAFUfVQCqH1UA/x9VAAA/VQBVP1UAqj9VAP8/VQAAX1UAVV9VAKpf + VQD/X1UAAH9VAFV/VQCqf1UA/39VAACfVQBVn1UAqp9VAP+fVQAAv1UAVb9VAKq/VQD/v1UAAN9VAFXf + VQCq31UA/99VAAD/VQBV/1UAqv9VAP//VQAAAH8AVQB/AKoAfwD/AH8AAB9/AFUffwCqH38A/x9/AAA/ + fwBVP38Aqj9/AP8/fwAAX38AVV9/AKpffwD/X38AAH9/AFV/fwCqf38A/39/AACffwBVn38Aqp9/AP+f + fwAAv38AVb9/AKq/fwD/v38AAN9/AFXffwCq338A/99/AAD/fwBV/38Aqv9/AP//fwAAAKoAVQCqAKoA + qgD/AKoAAB+qAFUfqgCqH6oA/x+qAAA/qgBVP6oAqj+qAP8/qgAAX6oAVV+qAKpfqgD/X6oAAH+qAFV/ + qgCqf6oA/3+qAACfqgBVn6oAqp+qAP+fqgAAv6oAVb+qAKq/qgD/v6oAAN+qAFXfqgCq36oA/9+qAAD/ + qgBV/6oAqv+qAP//qgAAANQAVQDUAKoA1AD/ANQAAB/UAFUf1ACqH9QA/x/UAAA/1ABVP9QAqj/UAP8/ + 1AAAX9QAVV/UAKpf1AD/X9QAAH/UAFV/1ACqf9QA/3/UAACf1ABVn9QAqp/UAP+f1AAAv9QAVb/UAKq/ + 1AD/v9QAAN/UAFXf1ACq39QA/9/UAAD/1ABV/9QAqv/UAP//1ABVAP8AqgD/AAAf/wBVH/8Aqh//AP8f + /wAAP/8AVT//AKo//wD/P/8AAF//AFVf/wCqX/8A/1//AAB//wBVf/8Aqn//AP9//wAAn/8AVZ//AKqf + /wD/n/8AAL//AFW//wCqv/8A/7//AADf/wBV3/8Aqt//AP/f/wBV//8Aqv//AP/MzAD/zP8A//8zAP// + ZgD//5kA///MAAB/AABVfwAAqn8AAP9/AAAAnwAAVZ8AAKqfAAD/nwAAAL8AAFW/AACqvwAA/78AAADf + AABV3wAAqt8AAP/fAABV/wAAqv8AAAAAKgBVACoAqgAqAP8AKgAAHyoAVR8qAKofKgD/HyoAAD8qAFU/ + KgDw+/8ApKCgAICAgAAAAP8AAP8AAAD//wD/AAAAAAAAAP//AAD///8A/f39/f39/f39/f39/f39/f0I + hgiqCKoICKoICKaGCP39qv39hv2GNg4ODjII/ar9/Yb9/ar9qjdjXzsOCP2G/f0IhquGCAleCWNfNob9 + qv39qkxMTEgIX19fX18I/Qj9/QhwnZlMqoYIqggIqgiG/f2qcKadcAl8fFQDVFQDqv39CHDMpnCqfMvL + ysrKVAj9/QiUlHBwCYDPy8/LylSG/f2GqoYIqgig0M/Py8t8qv39CP39/f2GpNDQ0M/PfAn9/ar9/f39 + qqT20NDQ0Hyq/f2G/f39/QmkpKSloKR8CP39CKoIhgiqCIYIqgiGCKr9/f39/f39/f39/f39/f39/f// + hv2AAf0ItAX9/bQFX2OABWNfgAU7O4ABNzeAAf39gAGq/YAB/YaAAf39vAE6h7wBX2O8AV9fgAE7N/// + /f0oAAAAIAAAAEAAAAABACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAADCv8H/wr/B/8K/wf/Cv8H/wr/B/8K/wf/Cv8H/wr/B/8K/wf/Cv8H/wr/B/8K/ + wf/Cv8H/wr/B/8K/wf/Cv8H/wr/B/8K/wf/Cv8H/wr/B/8K/wf/Cv8H/wr/B/8K/wf/Cv8H/wr/B/8K/ + wf/Cv8H/AAAAAAAAAAAAAAAAAAAAAMK/wf8AAAAAAAAAAAAAAAAAAAAAwr/B/wAAAAAAAAAAAAAAAAAA + AAAAAAAAwr/B/7Z3Sf+zckT/rm0//6toO/+nYjb/pF4y/6BZLv+dVCr/mlEn/5dNI/+VSiH/kkce/5FE + HP+RRBz/kUUb/8K/wf8AAAAAAAAAAAAAAAAAAAAAwr/B/wAAAAAAAAAAAAAAAAAAAADCv8H/AAAAAAAA + AAAAAAAAAAAAAAAAAADCv8H/v4JS//+aZv//lWD/+5Bc//WLV//uh1P/54FO/997S//Wdkb/zXBD/8Vr + QP+9Zj3/tGI5/65dN/+RRRz/wr/B/wAAAAAAAAAAAAAAAAAAAADCv8H/AAAAAAAAAAAAAAAAAAAAAMK/ + wf8AAAAAAAAAAAAAAAAAAAAAAAAAAMK/wf/GjFv//6Rz//+fbf//m2f//5Zh//yRXf/3jVj/8IhV/+mD + UP/hfUz/2HhI/9ByRP/HbED/v2c9/5VJIf/Cv8H/AAAAAAAAAAAAAAAAAAAAAMK/wf8AAAAAAAAAAAAA + AAAAAAAAwr/B/wAAAAAAAAAAAAAAAAAAAAAAAAAAwr/B/86WZP//r4L//6p7//+mdf//oW7//5xo//+X + Yv/9kl7/+I5a//KJVf/rhFH/4n5N/9t4SP/Sc0X/mlEm/8K/wf8AAAAAAAAAAAAAAAAAAAAAwr/B/wAA + AAAAAAAAAAAAAAAAAADCv8H/AAAAAAAAAAAAAAAAAAAAAAAAAADCv8H/1J9s//+4kf//tIv//6+E//+r + ff//p3f//6Jw//+eav//mWT//pRf//qQWv/0i1b/7IVS/+V/Tv+gWC7/wr/B/wAAAAAAAAAAAAAAAAAA + AADCv8H/AAAAAAAAAAAAAAAAAAAAAMK/wf8AAAAAAAAAAAAAAAAAAAAAAAAAAMK/wf/apnP//7+d//+7 + mP//uJL//7WM//+whv//rH///6d4//+jcf//n2v//5ll//+VYP/6kVv/9YxY/6diN//Cv8H/AAAAAAAA + AAAAAAAAAAAAAMK/wf/Cv8H/wr/B/8K/wf/Cv8H/wr/B/8K/wf/Cv8H/wr/B/8K/wf/Cv8H/wr/B/96t + eP//wqL//8Gi//+/nv//vJn//7mT//+2jv//sYj//66A//+pev//pHP//6Bt//+bZ///l2L/r20//8K/ + wf8AAAAAAAAAAAAAAAAAAAAAwr/B/xYXev8XF3b/GBVx/xkUbf8ZFGr/GhNm/xoSY/8bEV//HBFd/xwQ + W//Cv8H/4K96///Cov//wqL//8Ki///Cov//wJ///72b//+6lf//t4///7KJ//+ugv//qnv//6V0//+h + bv+3d0n/wr/B/wAAAAAAAAAAAAAAAAAAAADCv8H/FRqE/0dN1v8/RNL/Nz3Q/y40zv8nLcz/ISfK/xwh + yf8WHMf/GxJh/8K/wf/gr3r/4K96/+Cvev/gr3r/3614/9yqdf/apnL/16Nw/9Sea//Rmmj/zZZk/8qR + X//GjFz/w4dW/7+CUv/Cv8H/AAAAAAAAAAAAAAAAAAAAAMK/wf8SHZD/WF3a/05U1/9FS9X/PUPS/zU7 + 0P8uM83/JyzL/yAmyf8aFGn/wr/B/8K/wf/Cv8H/wr/B/8K/wf/Cv8H/wr/B/8K/wf/Cv8H/wr/B/8K/ + wf/Cv8H/wr/B/8K/wf/Cv8H/wr/B/8K/wf8AAAAAAAAAAAAAAAAAAAAAwr/B/xAfnP9obt7/YGTc/1Zb + 2f9NU9f/RUrU/ztB0v80OdD/LDHO/xgWcv/Cv8H/Dn+n/w18pP8MeqH/DHie/wt1m/8Kc5j/CXGV/wlv + k/8JbJD/CGqN/wdpi/8HZ4j/BmWH/wZkhf8GYoP/wr/B/wAAAAAAAAAAAAAAAAAAAADCv8H/DiKp/3l+ + 4/9vdeH/Zmze/11i2/9UWtn/S1HW/0NI1P86P9H/Fhh9/8K/wf8Ogar/Barp/wGo6P8Apef/AKPm/wCi + 5P8An+L/AJ7h/wCd3/8AnN7/AJnc/wCY2/8AmNn/AJbX/wZjhP/Cv8H/AAAAAAAAAAAAAAAAAAAAAMK/ + wf8MJbX/iI7n/4CF5v93fOP/bnPg/2Vr3f9bYdv/UljY/0lP1v8UGoj/wr/B/w+Erf8Lrur/Bqvq/wOo + 6f8Apuf/AKTm/wCi5f8AoOT/AJ/i/wCd4f8AnN//AJrd/wCZ2/8AmNr/BmWH/8K/wf8AAAAAAAAAAAAA + AAAAAAAAwr/B/wkowP+WnOz/jpTq/4aL6P9+hOX/dXri/2xx4P9jaN3/WV/b/xEek//Cv8H/EIaw/xay + 7P8Or+z/Cavr/wWq6v8Bp+j/AKbn/wCj5f8AoeT/AJ/j/wCe4f8AnOD/AJve/wCa3f8HZ4n/wr/B/wAA + AAAAAAAAAAAAAAAAAADCv8H/CCrK/6Ko7/+coe7/lZrr/42T6f+Fiub/fIHl/3N54v9rcN//ECGg/8K/ + wf8QiLP/I7nu/xq07f8Ssez/C63r/war6v8Cqen/AKbo/wCk5v8AouX/AKHk/wCf4f8AneH/AJzf/who + i//Cv8H/AAAAAAAAAAAAAAAAAAAAAMK/wf8GLNP/q7Hy/6as8P+hpu//mp/u/5OY6/+LkOj/g4nm/3qA + 5P8NI6z/wr/B/xCKtv8xvvD/J7rv/x627f8Vsuz/Dq/s/wmr6/8Equn/Aafo/wCl5/8Ao+X/AKHk/wCf + 4v8AnuH/CGqO/8K/wf8AAAAAAAAAAAAAAAAAAAAAwr/B/wUu2/+vtPP/r7Tz/6qv8v+mq/D/oKXv/5me + 7f+Sl+v/io/p/wsmt//Cv8H/Eo24/0HF8f82wfD/LLzv/yK47v8atO3/EbHs/wut6/8Gq+r/A6np/wCm + 6P8Apeb/AKLl/wCh5P8IbJD/wr/B/wAAAAAAAAAAAAAAAAAAAADCv8H/BC/h/wQv3/8FL9z/BS3Z/wYt + 1v8GLNL/ByvP/wgqy/8IKcb/CSnC/8K/wf8Sjrv/Uszy/0fH8f87w/H/Mb7v/ye67/8et+7/FbPt/w6v + 6/8IrOv/BKnp/wGo6P8Apef/AKPl/wluk//Cv8H/AAAAAAAAAAAAAAAAAAAAAMK/wf/Cv8H/wr/B/8K/ + wf/Cv8H/wr/B/8K/wf/Cv8H/wr/B/8K/wf/Cv8H/wr/B/xKRvf9j0/P/WM/z/0zK8f9BxfH/N8Hw/yy8 + 7/8iuO7/GbTt/xGx7P8Lruv/Bqrq/wOo6f8Apuf/CnGV/8K/wf8AAAAAAAAAAAAAAAAAAAAAwr/B/wAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADCv8H/E5LA/3Ta8/9q1fP/XtHz/1LM + 8v9Hx/H/O8Pw/zG+7/8nu+//Hrbt/xay7f8Or+v/CKzq/wSq6f8Kc5j/wr/B/wAAAAAAAAAAAAAAAAAA + AADCv8H/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMK/wf8UlMH/hOD1/3rc + 9f9v2PP/ZNTy/1jO8v9NyvH/Qsbx/zbB8P8svO//I7ju/xm07f8SsOz/C67r/wt2m//Cv8H/AAAAAAAA + AAAAAAAAAAAAAMK/wf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwr/B/xSW + w/+T5vb/iuL1/3/e9P912vT/adbz/13R8/9SzPL/R8jx/zzD8P8xvvD/J7rv/x627v8Vsuz/C3ie/8K/ + wf8AAAAAAAAAAAAAAAAAAAAAwr/B/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AADCv8H/FJbG/57r9/+X6Pb/juT1/4Th9f963fX/b9j0/2PT8/9Yz/L/TMrx/0HF8f83wO//LLzv/yK4 + 7v8MeqH/wr/B/wAAAAAAAAAAAAAAAAAAAADCv8H/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAMK/wf8VmMf/qO/3/6Lt9/+b6vb/kub2/4rj9f9/3vX/dNrz/2rV8/9d0fP/Uszy/0fI + 8f88w/D/Mr7v/w19pP/Cv8H/AAAAAAAAAAAAAAAAAAAAAMK/wf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAwr/B/xWZyP8UmMf/FZfF/xSVw/8TlML/E5K//xOQvf8Sjrv/EYy4/xGK + tv8QiLL/D4Ww/w+Erf8Pgar/Dn+n/8K/wf8AAAAAAAAAAAAAAAAAAAAAwr/B/8K/wf/Cv8H/wr/B/8K/ + wf/Cv8H/wr/B/8K/wf/Cv8H/wr/B/8K/wf/Cv8H/wr/B/8K/wf/Cv8H/wr/B/8K/wf/Cv8H/wr/B/8K/ + wf/Cv8H/wr/B/8K/wf/Cv8H/wr/B/8K/wf/Cv8H/wr/B/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP// + /////////////8AAAAPe+AAD3vgAA974AAPe+AAD3vgAA974AAPAAAADwAAAA8AAAAPAAAADwAAAA8AA + AAPAAAADwAAAA8AAAAPAAAADwAAAA8AAAAPAAAAD3/gAA9/4AAPf+AAD3/gAA9/4AAPf+AADwAAAA/// + ////////KAAAABAAAAAgAAAAAQAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwMDA/8DA + wP/AwMD/wMDA/8DAwP/AwMD/wMDA/8DAwP/AwMD/wMDA/8DAwP/AwMD/wMDA/8DAwP8AAAAAAAAAAMDA + wP8AAAAAAAAAAMDAwP8AAAAAwMDA/8F2R/+9bj//umc6/7diNf+3YjX/wMDA/wAAAADAwMD/AAAAAAAA + AADAwMD/AAAAAAAAAADAwMD/AAAAAMDAwP/RkmD//7aP//+ldP/8kl3/vW0//8DAwP8AAAAAwMDA/wAA + AAAAAAAAwMDA/8DAwP/AwMD/wMDA/8DAwP/AwMD/3ap2///Cov//to7//6V0/8uJWP/AwMD/AAAAAMDA + wP8AAAAAAAAAAMDAwP8THI7/FBqF/xYYfP8XFnP/wMDA/+Cvev/gr3r/4K96/92qdv/ao3D/wMDA/wAA + AADAwMD/AAAAAAAAAADAwMD/ECCd/2Fn3P8zOc//FRmC/8DAwP/AwMD/wMDA/8DAwP/AwMD/wMDA/8DA + wP/AwMD/wMDA/wAAAAAAAAAAwMDA/w0krP+Pler/YWbd/xIcj//AwMD/DHmf/wpzmP8Ib5L/B2uO/wdq + jf8Gao3/B2qN/8DAwP8AAAAAAAAAAMDAwP8KJrv/r7Tz/5CU6v8PIJ//wMDA/w+Dq/87y/z/Kcb8/xrD + /P8QwPv/EMD7/wdqjf/AwMD/AAAAAAAAAADAwMD/CCrI/woowP8LJrf/DSSu/8DAwP8Sjbj/Zdb9/0/Q + /P88y/v/Kcf7/xrC+/8IbZD/wMDA/wAAAAAAAAAAwMDA/8DAwP/AwMD/wMDA/8DAwP/AwMD/FpfG/43h + /f962/3/Zdb8/0/Q/P87zPz/CXSZ/8DAwP8AAAAAAAAAAMDAwP8AAAAAAAAAAAAAAAAAAAAAwMDA/xif + z/+u6f7/n+X9/47h/f953P3/ZNb9/w19pP/AwMD/AAAAAAAAAADAwMD/AAAAAAAAAAAAAAAAAAAAAMDA + wP8apNX/uez+/7ns/v+u6f7/oOX9/43h/f8Rh7H/wMDA/wAAAAAAAAAAwMDA/wAAAAAAAAAAAAAAAAAA + AADAwMD/GqTV/xqk1f8apNX/GaHR/xecy/8WmMb/FJK+/8DAwP8AAAAAAAAAAMDAwP/AwMD/wMDA/8DA + wP/AwMD/wMDA/8DAwP/AwMD/wMDA/8DAwP/AwMD/wMDA/8DAwP/AwMD/AAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//wAAgAEAALQF + wf+0BQAAgAUAAIAFAACAAQAAgAHB/4ABAACAAQAAgAEAALwBAAC8AQAAvAHB/4ABbP///5H/ + + + \ No newline at end of file diff --git a/Ressource/Bellows/Software/GenerateGCode.Designer.cs b/Ressource/Bellows/Software/GenerateGCode.Designer.cs new file mode 100644 index 0000000..9566740 --- /dev/null +++ b/Ressource/Bellows/Software/GenerateGCode.Designer.cs @@ -0,0 +1,153 @@ +// Bellows - bellows fold pattern printer, based on US Patent No 6,054,194, +// Mathematically optimized family of ultra low distortion bellow fold patterns, Nathan R. Kane. +// Copyright (C) 2008, Frank Tkalcevic, www.franksworkshop.com + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// any later version. + +// This program 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 General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +namespace Bellows +{ + partial class GenerateGCode + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.txtOutputFile = new System.Windows.Forms.TextBox(); + this.lblOutputFile = new System.Windows.Forms.Label(); + this.txtCutterOffset = new System.Windows.Forms.TextBox(); + this.label1 = new System.Windows.Forms.Label(); + this.pictureBox1 = new System.Windows.Forms.PictureBox(); + this.btnOK = new System.Windows.Forms.Button(); + this.btnCancel = new System.Windows.Forms.Button(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); + this.SuspendLayout(); + // + // txtOutputFile + // + this.txtOutputFile.Location = new System.Drawing.Point(83, 13); + this.txtOutputFile.Name = "txtOutputFile"; + this.txtOutputFile.Size = new System.Drawing.Size(157, 20); + this.txtOutputFile.TabIndex = 0; + this.txtOutputFile.Text = "c:\\temp\\Bellows"; + // + // lblOutputFile + // + this.lblOutputFile.AutoSize = true; + this.lblOutputFile.Location = new System.Drawing.Point(13, 16); + this.lblOutputFile.Name = "lblOutputFile"; + this.lblOutputFile.Size = new System.Drawing.Size(58, 13); + this.lblOutputFile.TabIndex = 1; + this.lblOutputFile.Text = "Output File"; + // + // txtCutterOffset + // + this.txtCutterOffset.Location = new System.Drawing.Point(122, 40); + this.txtCutterOffset.Name = "txtCutterOffset"; + this.txtCutterOffset.Size = new System.Drawing.Size(118, 20); + this.txtCutterOffset.TabIndex = 2; + this.txtCutterOffset.Text = "0.75"; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(13, 43); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(91, 13); + this.label1.TabIndex = 3; + this.label1.Text = "Cutter Offset (mm)"; + // + // pictureBox1 + // + this.pictureBox1.Image = global::Bellows.Properties.Resources.Cutter1; + this.pictureBox1.Location = new System.Drawing.Point(246, 12); + this.pictureBox1.Name = "pictureBox1"; + this.pictureBox1.Size = new System.Drawing.Size(239, 242); + this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.pictureBox1.TabIndex = 4; + this.pictureBox1.TabStop = false; + // + // btnOK + // + this.btnOK.Location = new System.Drawing.Point(16, 231); + this.btnOK.Name = "btnOK"; + this.btnOK.Size = new System.Drawing.Size(75, 23); + this.btnOK.TabIndex = 5; + this.btnOK.Text = "OK"; + this.btnOK.UseVisualStyleBackColor = true; + // + // btnCancel + // + this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.btnCancel.Location = new System.Drawing.Point(98, 231); + this.btnCancel.Name = "btnCancel"; + this.btnCancel.Size = new System.Drawing.Size(75, 23); + this.btnCancel.TabIndex = 6; + this.btnCancel.Text = "Cancel"; + this.btnCancel.UseVisualStyleBackColor = true; + // + // GenerateGCode + // + this.AcceptButton = this.btnOK; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.CancelButton = this.btnCancel; + this.ClientSize = new System.Drawing.Size(495, 268); + this.Controls.Add(this.btnCancel); + this.Controls.Add(this.btnOK); + this.Controls.Add(this.pictureBox1); + this.Controls.Add(this.label1); + this.Controls.Add(this.txtCutterOffset); + this.Controls.Add(this.lblOutputFile); + this.Controls.Add(this.txtOutputFile); + this.Name = "GenerateGCode"; + this.Text = "GenerateGCode"; + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.TextBox txtOutputFile; + private System.Windows.Forms.Label lblOutputFile; + private System.Windows.Forms.TextBox txtCutterOffset; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.PictureBox pictureBox1; + private System.Windows.Forms.Button btnOK; + private System.Windows.Forms.Button btnCancel; + } +} \ No newline at end of file diff --git a/Ressource/Bellows/Software/GenerateGCode.cs b/Ressource/Bellows/Software/GenerateGCode.cs new file mode 100644 index 0000000..40de379 --- /dev/null +++ b/Ressource/Bellows/Software/GenerateGCode.cs @@ -0,0 +1,35 @@ +// Bellows - bellows fold pattern printer, based on US Patent No 6,054,194, +// Mathematically optimized family of ultra low distortion bellow fold patterns, Nathan R. Kane. +// Copyright (C) 2008, Frank Tkalcevic, www.franksworkshop.com + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// any later version. + +// This program 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 General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; + +namespace Bellows +{ + public partial class GenerateGCode : Form + { + public GenerateGCode() + { + InitializeComponent(); + } + } +} \ No newline at end of file diff --git a/Ressource/Bellows/Software/GenerateGCode.resx b/Ressource/Bellows/Software/GenerateGCode.resx new file mode 100644 index 0000000..ff31a6d --- /dev/null +++ b/Ressource/Bellows/Software/GenerateGCode.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Ressource/Bellows/Software/NewName.Designer.cs b/Ressource/Bellows/Software/NewName.Designer.cs new file mode 100644 index 0000000..7fec77c --- /dev/null +++ b/Ressource/Bellows/Software/NewName.Designer.cs @@ -0,0 +1,122 @@ +// Bellows - bellows fold pattern printer, based on US Patent No 6,054,194, +// Mathematically optimized family of ultra low distortion bellow fold patterns, Nathan R. Kane. +// Copyright (C) 2008, Frank Tkalcevic, www.franksworkshop.com + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// any later version. + +// This program 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 General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +namespace Bellows +{ + partial class NewName + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.label1 = new System.Windows.Forms.Label(); + this.btnOK = new System.Windows.Forms.Button(); + this.btnCancel = new System.Windows.Forms.Button(); + this.txtName = new System.Windows.Forms.TextBox(); + this.SuspendLayout(); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(13, 13); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(151, 13); + this.label1.TabIndex = 0; + this.label1.Text = "Enter new configuration name."; + // + // btnOK + // + this.btnOK.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK; + this.btnOK.Location = new System.Drawing.Point(77, 53); + this.btnOK.Name = "btnOK"; + this.btnOK.Size = new System.Drawing.Size(75, 23); + this.btnOK.TabIndex = 1; + this.btnOK.Text = "OK"; + this.btnOK.UseVisualStyleBackColor = true; + // + // btnCancel + // + this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.btnCancel.Location = new System.Drawing.Point(217, 53); + this.btnCancel.Name = "btnCancel"; + this.btnCancel.Size = new System.Drawing.Size(75, 23); + this.btnCancel.TabIndex = 2; + this.btnCancel.Text = "Cancel"; + this.btnCancel.UseVisualStyleBackColor = true; + // + // txtName + // + this.txtName.Location = new System.Drawing.Point(170, 10); + this.txtName.Name = "txtName"; + this.txtName.Size = new System.Drawing.Size(186, 20); + this.txtName.TabIndex = 0; + // + // NewName + // + this.AcceptButton = this.btnOK; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.CancelButton = this.btnCancel; + this.ClientSize = new System.Drawing.Size(368, 87); + this.ControlBox = false; + this.Controls.Add(this.txtName); + this.Controls.Add(this.btnCancel); + this.Controls.Add(this.btnOK); + this.Controls.Add(this.label1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.Name = "NewName"; + this.Text = "NewName"; + this.Load += new System.EventHandler(this.NewName_Load); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Button btnOK; + private System.Windows.Forms.Button btnCancel; + private System.Windows.Forms.TextBox txtName; + } +} \ No newline at end of file diff --git a/Ressource/Bellows/Software/NewName.cs b/Ressource/Bellows/Software/NewName.cs new file mode 100644 index 0000000..87b4bce --- /dev/null +++ b/Ressource/Bellows/Software/NewName.cs @@ -0,0 +1,42 @@ +// Bellows - bellows fold pattern printer, based on US Patent No 6,054,194, +// Mathematically optimized family of ultra low distortion bellow fold patterns, Nathan R. Kane. +// Copyright (C) 2008, Frank Tkalcevic, www.franksworkshop.com + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// any later version. + +// This program 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 General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; + +namespace Bellows +{ + public partial class NewName : Form + { + public NewName() + { + InitializeComponent(); + } + + public String NameText { get { return txtName.Text; } set { txtName.Text = value; } } + + private void NewName_Load(object sender, EventArgs e) + { + txtName.Focus(); + } + } +} \ No newline at end of file diff --git a/Ressource/Bellows/Software/NewName.resx b/Ressource/Bellows/Software/NewName.resx new file mode 100644 index 0000000..ff31a6d --- /dev/null +++ b/Ressource/Bellows/Software/NewName.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Ressource/Bellows/Software/Program.cs b/Ressource/Bellows/Software/Program.cs new file mode 100644 index 0000000..e2a8c02 --- /dev/null +++ b/Ressource/Bellows/Software/Program.cs @@ -0,0 +1,37 @@ +// Bellows - bellows fold pattern printer, based on US Patent No 6,054,194, +// Mathematically optimized family of ultra low distortion bellow fold patterns, Nathan R. Kane. +// Copyright (C) 2008, Frank Tkalcevic, www.franksworkshop.com + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// any later version. + +// This program 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 General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +using System; +using System.Collections.Generic; +using System.Windows.Forms; + +namespace Bellows +{ + static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new Form1()); + } + } +} \ No newline at end of file diff --git a/Ressource/Bellows/Software/Properties/AssemblyInfo.cs b/Ressource/Bellows/Software/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..df8a1ec --- /dev/null +++ b/Ressource/Bellows/Software/Properties/AssemblyInfo.cs @@ -0,0 +1,33 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Bellows")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Bellows")] +[assembly: AssemblyCopyright("Copyright © 2006")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("79778602-54e6-4936-a86f-da1188de53e4")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Ressource/Bellows/Software/Properties/Resources.Designer.cs b/Ressource/Bellows/Software/Properties/Resources.Designer.cs new file mode 100644 index 0000000..87a28ed --- /dev/null +++ b/Ressource/Bellows/Software/Properties/Resources.Designer.cs @@ -0,0 +1,77 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:2.0.50727.1433 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Bellows.Properties { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Bellows.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + internal static System.Drawing.Bitmap Cutter { + get { + object obj = ResourceManager.GetObject("Cutter", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + internal static System.Drawing.Bitmap Cutter1 { + get { + object obj = ResourceManager.GetObject("Cutter1", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + } +} diff --git a/Ressource/Bellows/Software/Properties/Resources.resx b/Ressource/Bellows/Software/Properties/Resources.resx new file mode 100644 index 0000000..7cd26a9 --- /dev/null +++ b/Ressource/Bellows/Software/Properties/Resources.resx @@ -0,0 +1,127 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + ..\Cutter.wmf;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Cutter.wmf;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + \ No newline at end of file diff --git a/Ressource/Bellows/Software/Properties/Settings.Designer.cs b/Ressource/Bellows/Software/Properties/Settings.Designer.cs new file mode 100644 index 0000000..01943b6 --- /dev/null +++ b/Ressource/Bellows/Software/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:2.0.50727.42 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Bellows.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "8.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/Ressource/Bellows/Software/Properties/Settings.settings b/Ressource/Bellows/Software/Properties/Settings.settings new file mode 100644 index 0000000..abf36c5 --- /dev/null +++ b/Ressource/Bellows/Software/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Ressource/Bellows/Software/bin/Release/Bellows.exe b/Ressource/Bellows/Software/bin/Release/Bellows.exe new file mode 100644 index 0000000..7860533 Binary files /dev/null and b/Ressource/Bellows/Software/bin/Release/Bellows.exe differ diff --git a/Ressource/Bellows/Software/bin/Release/Bellows.exe.config b/Ressource/Bellows/Software/bin/Release/Bellows.exe.config new file mode 100644 index 0000000..61f36f7 --- /dev/null +++ b/Ressource/Bellows/Software/bin/Release/Bellows.exe.config @@ -0,0 +1,21 @@ + + + +
+ + + + + + + + + + + + \ No newline at end of file diff --git a/Ressource/Bellows/Software/bin/Release/Bellows.pdb b/Ressource/Bellows/Software/bin/Release/Bellows.pdb new file mode 100644 index 0000000..10c9dbf Binary files /dev/null and b/Ressource/Bellows/Software/bin/Release/Bellows.pdb differ diff --git a/Ressource/Bellows/Software/bin/Release/Bellows.vshost.exe b/Ressource/Bellows/Software/bin/Release/Bellows.vshost.exe new file mode 100644 index 0000000..ce3f102 Binary files /dev/null and b/Ressource/Bellows/Software/bin/Release/Bellows.vshost.exe differ diff --git a/Ressource/Bellows/Software/bin/Release/Bellows.vshost.exe.config b/Ressource/Bellows/Software/bin/Release/Bellows.vshost.exe.config new file mode 100644 index 0000000..61f36f7 --- /dev/null +++ b/Ressource/Bellows/Software/bin/Release/Bellows.vshost.exe.config @@ -0,0 +1,21 @@ + + + +
+ + + + + + + + + + + + \ No newline at end of file diff --git a/Ressource/Bellows/Tuto/1/Bellows.htm b/Ressource/Bellows/Tuto/1/Bellows.htm new file mode 100644 index 0000000..7322c4a --- /dev/null +++ b/Ressource/Bellows/Tuto/1/Bellows.htm @@ -0,0 +1,275 @@ + + + + + + Bellows + + + + + + +
+
+

Bellows

+
+ +
+ +
+

The linear slides I got off ebay didn't come with covers to stop swarf getting to the rails and ballscrews. So I decided to cover them with a bellows.

+

+

I did a little bit of research. There are some stock sized + commercial bellows available; these are usually rubberised fabric, welded at the seams.  + I couldn't find any that fit, nor could I afford them.  So + I googled for DIY bellows folding.  Again, I drew a blank.  + Then I checked the USPTO, and I hit a gold.

+

+ Patent number 6,054,194, + invented by Nathan R. Kane, is not just a description of + bellows, but it is a complete thesis on optimal fold patterns + for bellows.  The optimal patterns will maximise the + bellows extension length, while minimising the side wall + distortion.  By using just the fold pattern, a bellows can + be created that holds its shape without external support.

+

Polypropylene sheet was selected to make the bellows.  + Polypropylene is a good "hinge" material, meaning it can be fold + back and forward repeatedly with fatigue.  I tried a couple + different thicknesses, 1.2mm, 1mm, .7mm, and finally settled on + 0.39mm - not that this is the best size, its just the thinnest + stuff I could find in large sheets.  I think thinner sheet + would be better, but I couldn't find any.  I found it at my + local craft store.

+ + +
+

Update!

+

Just a note on polypropylene.  Polypropylene has grain!  + I'm sure my terminology is incorrect, but polypropylene, like + paper or timber, has a preferred strong direction and a weak + direction.  If you try to tear polypropylene sheet in its + weak direction, it will continue to tear in the direction it is + forced.  In the other direction, 90° to the weak + direction, the polypropylene will not tear, in fact it will turn + 90° to the weak direction.  This is because of the + polymer chains (so I've read). 

+

Why is this a problem?  If you try to fold the + polypropylene with the folds running parallel to the weak + direction, the polypropylene will crack.  It is important + to get the direction correct so the folds are perpendicular to + the weak direction.

+

So how do you find the weak direction?  On the corner of + a sheet of polypropylene, make a small cut, 5mm long and about + 5mm from the edge.  Grab this tab and pull it.  The + pictures below show the results.

+

+ + + + + + + + + +
Against the grainWith the grain
+

+ The photo on the left shows trying to tear against the grain - + you can't do it.  The photo on the right shows tearing with + the grain.  The polypropylene tears easily.  It is + imporant that the bellows fold lines are placed perpendicular to + this weak direction.

+
+

 

+

Building the Bellows

+

1) Print the fold pattern

+

The first step is to produce a fold pattern for the bellows.  + For my first bellows, I used MS-Visio to lay out the lines.  + This was a bit tedious, so I wrote a simple program.

+

+

+

The program will only create a fold pattern for a simple bellows with either + regular or alternating folds.  The "generate g-code" option + is not functional.  I want to be able to generate g-code to + guide a knife to score the bellows material, however all the + bellows I need to create are larger than my mill, so this + feature was postponed.

+

The parameters are...

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ConfigDifferent configurations can be selected.  + Configurations are automatically saved when the program + exits, or a new configuration is selected.
NewCreates a new configuration. 
ShapeOnly a "Half Cover" is supported (2 sides and a top)
InversionOnly 2 inversion are supported
Mounting FoldsThe total number of extra folds to add for mounting + the ends of the bellows
Alternate FoldsIf true, adjacent folds will alternate up and down, + rather than being in the same direction.  This + makes the compressed bellows smaller, but the top of the + bellows has folds that may collect swarf.
Inside WidthThe inside width that the bellows is going to cover.
Inside HeigthThe inside height that the bellows is going to + cover.
Protected LengthThe length of the area the bellows is going to + cover.
Fold WidthThe width of one fold.
+

The program will print out the fold pattern.  It will + tile the output over multiple pages.  The diagonal line is + used for lining up the pages when they are stuck together.

+

The image below shows a snippet of the fold pattern.  + Note the solid and dotted lines.  A solid line is a peak + fold, and a dotted line is a valley fold (or vice-versa, it + doesn't matter).

+

+

The picture shows the fold pattern with a sheet of + clear/translucent polypropylene on top.

+

+

The program and source can be downloaded here + + .  + The code isn't terribly stable.  It was only used to + generate a couple of patterns.  The displayed pattern will + only be updated when you tab between fields.  There is no + zoom - make the window bigger to see more of the pattern.

+ + + +

2) Trim

+

The polypropylene sheet is cut to size.  It is then + stuck to the fold pattern using tape.

+

3) Score the lines

+

The next step is to encourage the polypropylene sheet to fold + at the correct place.  If these were being produced + commercially, they could be vacuum formed, or pressed.  + Since this is overkill for a couple of one-offs, I tried a + couple of manual techniques.

+

First I tried scoring with a hobby knife.  This was + fine, but in a few spots the cuts went a bit deep and made the + fold weak.  Next, I tried using my soldering iron to melt a + grove.  This wasn't terribly successful as shown by the + video below.  I did learn though that the scoring and + folding needs to be very accurate, or the bellows will not fold + properly.  Finally, I settled on a scriber - a pen with a + sharp carbide tip used for scratching metal, to scratch the + polypropylene.

+

Use a metal ruler and carefully trace over the peak folds.  + Take care and do this accurately or the bellows will not fold + properly.  Don't score the diagonal guide line running the + length of page.

+

The picture below shows the scored peak folds.  The + lighting in the picture makes them appear black. 

+

+

When scoring fold corners (line intersections), make sure you + overshoot the intersection by 2 or 3mm.  This will help + with the folding later.

+

+

+

When the top is finished, remove the polypropylene sheet, + flip it over and stick it back down on the fold pattern.  + You can use the scored peak folds to line up with the printed + peak lines as the bellows patterns are symetrical.  Then + score the valley fold lines.

+

The photo below shows a scored polypropylene sheet.

+

+

4) Crease the Folds

+

Next, each of the scored lines needs to be creased.  + Here, we are not trying to fold the bellows, just get the folds + going in the right direction.  Just bend each fold and + squeeze them with your fingers, like in the photo below.

+

+

It is important to get all the small angle folds.    + The folds must also be done in the right direction.  If a + scored line is on the top of the sheet, the two sides of the + fold should fold down, like this...

+

+

+

The creased bellows will look like this...

+

+

5) Folding

+

The final folding is the tricky bit.  Although the + initial creasing does help the bellows want to go in the right + direction, it still takes a lot of finger muscle and patience to + fold the bellows.  It is important that the corners are + sharp, otherwise they will be a source of ballooning.

+

I found it easiest to fold the bellows if I worked on one + side, folded 3 or 4 folds, clamp it, then do the other side.

+

+

+

The quick release clamps worked well holding a few folds at a + time.

+

+

Finally, all folded.

+

+

+

The bellows is clamped between two chunks of timber to + encourage it to stay in place.

+

+

The completed (blurry) bellows.

+

+

6) Mounting

+

Obviously this will depend on what you plan to use the + bellows for.  I used some 3mm steel plate to mount on each + end of the bellows.  The bellows are held to the plates by + M4 screws and small lengths of 3x10mm bar, tapped for the M4 + screws.   These were then mounted to my X axis slide.

+

+

+

3mm steel plate probably wasn't the best choice for mounting + the bellows, as I have already hit tall hold down bolts with it.  + In the future, I may tray thick plastic, and self adhesive + velcro strips.

+ + + +

When good bellows go bad!

+

The video below shows what happens when a bellows isn't + folded correctly.  The bellows on the right was bubbling + out when it was closing.  This snagged when moving in the Y + direction, leaving what you see now...

+ + +
+
+ + + + \ No newline at end of file diff --git a/Ressource/Bellows/Tuto/1/Bellows_files/1O0ln1kLFCI.swf b/Ressource/Bellows/Tuto/1/Bellows_files/1O0ln1kLFCI.swf new file mode 100644 index 0000000..d4ef9c1 Binary files /dev/null and b/Ressource/Bellows/Tuto/1/Bellows_files/1O0ln1kLFCI.swf differ diff --git a/Ressource/Bellows/Tuto/1/Bellows_files/AndClamp.jpg b/Ressource/Bellows/Tuto/1/Bellows_files/AndClamp.jpg new file mode 100644 index 0000000..d9afb61 Binary files /dev/null and b/Ressource/Bellows/Tuto/1/Bellows_files/AndClamp.jpg differ diff --git a/Ressource/Bellows/Tuto/1/Bellows_files/Application.png b/Ressource/Bellows/Tuto/1/Bellows_files/Application.png new file mode 100644 index 0000000..2cdee88 Binary files /dev/null and b/Ressource/Bellows/Tuto/1/Bellows_files/Application.png differ diff --git a/Ressource/Bellows/Tuto/1/Bellows_files/BigClamp.jpg b/Ressource/Bellows/Tuto/1/Bellows_files/BigClamp.jpg new file mode 100644 index 0000000..7475946 Binary files /dev/null and b/Ressource/Bellows/Tuto/1/Bellows_files/BigClamp.jpg differ diff --git a/Ressource/Bellows/Tuto/1/Bellows_files/Crease.jpg b/Ressource/Bellows/Tuto/1/Bellows_files/Crease.jpg new file mode 100644 index 0000000..9bf733e Binary files /dev/null and b/Ressource/Bellows/Tuto/1/Bellows_files/Crease.jpg differ diff --git a/Ressource/Bellows/Tuto/1/Bellows_files/Creased.jpg b/Ressource/Bellows/Tuto/1/Bellows_files/Creased.jpg new file mode 100644 index 0000000..1a376b1 Binary files /dev/null and b/Ressource/Bellows/Tuto/1/Bellows_files/Creased.jpg differ diff --git a/Ressource/Bellows/Tuto/1/Bellows_files/DoubleClamp.jpg b/Ressource/Bellows/Tuto/1/Bellows_files/DoubleClamp.jpg new file mode 100644 index 0000000..4fcca84 Binary files /dev/null and b/Ressource/Bellows/Tuto/1/Bellows_files/DoubleClamp.jpg differ diff --git a/Ressource/Bellows/Tuto/1/Bellows_files/FingerFold.jpg b/Ressource/Bellows/Tuto/1/Bellows_files/FingerFold.jpg new file mode 100644 index 0000000..89aff6c Binary files /dev/null and b/Ressource/Bellows/Tuto/1/Bellows_files/FingerFold.jpg differ diff --git a/Ressource/Bellows/Tuto/1/Bellows_files/FoldDirection.png b/Ressource/Bellows/Tuto/1/Bellows_files/FoldDirection.png new file mode 100644 index 0000000..1796664 Binary files /dev/null and b/Ressource/Bellows/Tuto/1/Bellows_files/FoldDirection.png differ diff --git a/Ressource/Bellows/Tuto/1/Bellows_files/Folded.jpg b/Ressource/Bellows/Tuto/1/Bellows_files/Folded.jpg new file mode 100644 index 0000000..46a9031 Binary files /dev/null and b/Ressource/Bellows/Tuto/1/Bellows_files/Folded.jpg differ diff --git a/Ressource/Bellows/Tuto/1/Bellows_files/Layout.jpg b/Ressource/Bellows/Tuto/1/Bellows_files/Layout.jpg new file mode 100644 index 0000000..4dfd952 Binary files /dev/null and b/Ressource/Bellows/Tuto/1/Bellows_files/Layout.jpg differ diff --git a/Ressource/Bellows/Tuto/1/Bellows_files/Mounted.jpg b/Ressource/Bellows/Tuto/1/Bellows_files/Mounted.jpg new file mode 100644 index 0000000..ebf5ee3 Binary files /dev/null and b/Ressource/Bellows/Tuto/1/Bellows_files/Mounted.jpg differ diff --git a/Ressource/Bellows/Tuto/1/Bellows_files/MountingParts.jpg b/Ressource/Bellows/Tuto/1/Bellows_files/MountingParts.jpg new file mode 100644 index 0000000..4b5dcb5 Binary files /dev/null and b/Ressource/Bellows/Tuto/1/Bellows_files/MountingParts.jpg differ diff --git a/Ressource/Bellows/Tuto/1/Bellows_files/Pattern.png b/Ressource/Bellows/Tuto/1/Bellows_files/Pattern.png new file mode 100644 index 0000000..d1f012f Binary files /dev/null and b/Ressource/Bellows/Tuto/1/Bellows_files/Pattern.png differ diff --git a/Ressource/Bellows/Tuto/1/Bellows_files/Score.jpg b/Ressource/Bellows/Tuto/1/Bellows_files/Score.jpg new file mode 100644 index 0000000..aa53028 Binary files /dev/null and b/Ressource/Bellows/Tuto/1/Bellows_files/Score.jpg differ diff --git a/Ressource/Bellows/Tuto/1/Bellows_files/ScoredOver.jpg b/Ressource/Bellows/Tuto/1/Bellows_files/ScoredOver.jpg new file mode 100644 index 0000000..6ce6c72 Binary files /dev/null and b/Ressource/Bellows/Tuto/1/Bellows_files/ScoredOver.jpg differ diff --git a/Ressource/Bellows/Tuto/1/Bellows_files/ScoredTop.jpg b/Ressource/Bellows/Tuto/1/Bellows_files/ScoredTop.jpg new file mode 100644 index 0000000..4d87244 Binary files /dev/null and b/Ressource/Bellows/Tuto/1/Bellows_files/ScoredTop.jpg differ diff --git a/Ressource/Bellows/Tuto/1/Bellows_files/Site.css b/Ressource/Bellows/Tuto/1/Bellows_files/Site.css new file mode 100644 index 0000000..a7a92e4 --- /dev/null +++ b/Ressource/Bellows/Tuto/1/Bellows_files/Site.css @@ -0,0 +1,131 @@ + +html{ + height:100%; + font-family: Sans-Serif; +} + +body{ + background-color:#B0E0E6; +} + +h1 +{ + text-align: center; + font-family: Serif; + font-size: 24pt; +} +h2 +{ +} +h3 +{ +} +p +{ + line-height: 130%; +} +.code { + font-family:monospace; + font-size:10pt; +} +#mainContainer{ + margin: 0 auto; + margin-bottom: 10px; + height:100%; + text-align:left; +} +#leftColumn{ + width:170px; + position:absolute; + top: 90px; + left: 0; + padding-left:10px; + background-color:#B0E0E6; +} +#mainContent{ + /*width:590px;*/ + padding-left:10px; + padding-right:10px; + position:absolute; + left: 170px; + top: 90px; + margin-left: 10px; + margin-right: 10px; + margin-top: 10px; + margin-bottom: 10px; + background-color:azure; +} +#topBar{ + height:90px; + width:100%; + position:absolute; + top: 0; + left: 0; +} + + +/**************************************************************************************** +* LAYOUT CSS FOR THE MENU +****************************************************************************************/ +#dhtmlgoodies_listMenu a, #dhtmlgoodies_listMenu p{ /* Main menu items */ + margin:1px; + padding:0px; + width:150px; /* Width of menu */ + + color:#000; /* Black text color */ + background-color:#70BAD5; + + text-decoration:none; /* No underline */ + font-size:1em; /* Fixed font size */ + padding-left:3px; + line-height:25px; /* Height of menu links */ + display:block; + overflow:auto; + font-family:sans-serif; + +} + +#dhtmlgoodies_listMenu ul li p /* Sub menu no-link */ +{ + color: #0092a3; + font-weight:normal; + font-size:0.8em; +} + +#dhtmlgoodies_listMenu ul li a /* Sub menu link */ +{ + font-weight:normal; + font-size:0.8em; +} + +#dhtmlgoodies_listMenu ul li ul li a, #dhtmlgoodies_listMenu ul li ul li{ /* Sub Sub menu */ + color: #000; + font-size:0.9em; + font-weight:normal; +} + +#dhtmlgoodies_listMenu .activeMenuLink{ /* Styling of active menu item */ + background-color:#7099d5; +} + + +/* +No bullets +*/ +#dhtmlgoodies_listMenu li{ + list-style-type:none; +} + +/* +No margin and padding +*/ +#dhtmlgoodies_listMenu, #dhtmlgoodies_listMenu ul{ + margin:0px; + padding:0px; +} + +/* Margin of sub menu items */ +#dhtmlgoodies_listMenu ul{ + display:none; + margin-left:10px; +} \ No newline at end of file diff --git a/Ressource/Bellows/Tuto/1/Bellows_files/TearAgainst.jpg b/Ressource/Bellows/Tuto/1/Bellows_files/TearAgainst.jpg new file mode 100644 index 0000000..5c0e48e Binary files /dev/null and b/Ressource/Bellows/Tuto/1/Bellows_files/TearAgainst.jpg differ diff --git a/Ressource/Bellows/Tuto/1/Bellows_files/TearWith.jpg b/Ressource/Bellows/Tuto/1/Bellows_files/TearWith.jpg new file mode 100644 index 0000000..5455fa9 Binary files /dev/null and b/Ressource/Bellows/Tuto/1/Bellows_files/TearWith.jpg differ diff --git a/Ressource/Bellows/Tuto/1/Bellows_files/bellows.jpg b/Ressource/Bellows/Tuto/1/Bellows_files/bellows.jpg new file mode 100644 index 0000000..18a8033 Binary files /dev/null and b/Ressource/Bellows/Tuto/1/Bellows_files/bellows.jpg differ diff --git a/Ressource/Bellows/Tuto/1/Bellows_files/dot.png b/Ressource/Bellows/Tuto/1/Bellows_files/dot.png new file mode 100644 index 0000000..e04ddfe Binary files /dev/null and b/Ressource/Bellows/Tuto/1/Bellows_files/dot.png differ diff --git a/Ressource/Bellows/Tuto/1/Bellows_files/gplv3-88x31.png b/Ressource/Bellows/Tuto/1/Bellows_files/gplv3-88x31.png new file mode 100644 index 0000000..b06e043 Binary files /dev/null and b/Ressource/Bellows/Tuto/1/Bellows_files/gplv3-88x31.png differ diff --git a/Ressource/Bellows/Tuto/1/Bellows_files/menu.js b/Ressource/Bellows/Tuto/1/Bellows_files/menu.js new file mode 100644 index 0000000..df3bdc8 --- /dev/null +++ b/Ressource/Bellows/Tuto/1/Bellows_files/menu.js @@ -0,0 +1,278 @@ + + /************************************************************************************************************ + (C) www.dhtmlgoodies.com, October 2005 + + This is a script from www.dhtmlgoodies.com. You will find this and a lot of other scripts at our website. + + Terms of use: + You are free to use this script as long as the copyright message is kept intact. However, you may not + redistribute, sell or repost it without our permission. + + Thank you! + + www.dhtmlgoodies.com + Alf Magne Kalleland + + ************************************************************************************************************/ + + /************************************************************************************************************ + (C) www.franksworkshop.com, October 2008 + + This was originally from www.dhtmlgoodies.com, but I made significant changes to support hrefs on branches, + and match the full URL path to locate the current menu item. I couldn't really follow the code, so I rewrote + most of it, but used the same concepts as the original. + + Terms of use: + You are free to use this script as long as the copyright message is kept intact. However, you may not + redistribute, sell or repost it without our permission. + + ************************************************************************************************************/ + + var activeNode = null; + var bAutoClose = true; + + function isIE() + { + var ua = window.navigator.userAgent + var msie = ua.indexOf ( "MSIE " ) + + if ( msie > 0 ) // If Internet Explorer, return true + return true; + else // If another browser, return 0 + return false; + } + + function getChildUL(node) + { + var ul = null; + + for ( var i = 0; i < node.childNodes.length; i++ ) + { + if ( node.childNodes[i].tagName == 'UL' ) + { + ul = node.childNodes[i]; + break; + } + } + return ul; + } + + function getParentUL(node) + { + while ( node != null ) + { + if ( node.parentNode != null && node.parentNode.tagName == 'UL' ) + return node.parentNode; + node = node.parentNode; + } + return null; + } + + function toggleSubMenu(e) + { + var node = this; + var ul = getChildUL(node); + + // first toggle this menu item. + if ( ul != null ) + { + if ( ul.style.display == 'none' ) + ul.style.display = 'block'; + else + ul.style.display = 'none'; + } + + // next, optionally close any open menu items at the same level + if ( bAutoClose ) + { + ul = getParentUL(node); + if ( ul != null ) + { + for ( var i = 0; i < ul.childNodes.length; i++ ) + { + var item = ul.childNodes[i]; + if ( item != node ) + { + var childUL = getChildUL(item); + if ( childUL != null ) + childUL.style.display = 'none'; + } + } + } + } + + + if (!e) + e = window.event; + e.cancelBubble = true; + if (e.stopPropagation) + e.stopPropagation(); + } + + function showPath(node) + { + // May need to make child nodes visible + var ul = getChildUL(node); + if ( ul != null ) + ul.style.display = 'block'; + + // make the path to the parent visibile. + while ( node != null ) + { + ul = getParentUL(node); + if ( ul != null ) + ul.style.display = 'block'; + node = ul; + } + } + + function GetAElement( node ) + { + for ( var i = 0; i < node.childNodes.length; i++ ) + { + var node = node.childNodes[i]; + if ( node.tagName == 'A' ) + { + return node; + } + } + return null; + } + + function getHRefPath( node ) + { + var s = node.pathname; + while ( s != null && s.length > 0 && s.indexOf("/") == 0 ) + { + s = s.substr(1); + } + return s; + } + + function ProcessList( root, fileNameThis ) + { + var hasChildren = false; + for ( var i = 0; i < root.childNodes.length; i++ ) + { + var node = root.childNodes[i]; + if ( node.tagName == 'LI' || node.tagName == 'UL' ) + { + if ( node.tagName == 'LI' ) + { + hasChildren = true; + // if this item has an A tag, check if it is the current page + var atag = GetAElement( node ); + if ( atag != null && atag.href.charAt(atag.href.length-1)!='#') + { + var path = getHRefPath(atag).toLowerCase(); + if ( path == fileNameThis ) + { + // match + activeNode = node; + } + } + else // No A tag. Is either a branch or dead leaf + { + } + } + else // node.tagName == 'UL' + { + node.style.display='none'; + } + + if ( ProcessList( node, fileNameThis ) ) + { + hasChildren = true; + // this is a branch node + if ( node.tagName == 'LI' ) + { + node.onclick = toggleSubMenu; + + var atag = node.firstChild; + var pointer = document.createElement("div"); + if ( isIE() ) + { + pointer.style.position = 'absolute'; + pointer.style.left = "145px"; + pointer.style.top = "20px"; + } + else + { + pointer.style.position = 'relative'; + pointer.style.left = "145px"; + pointer.style.top = "0px"; + } + pointer.style.width = "5px"; + pointer.style.height = "5px"; + pointer.style.borderStyle = "none"; + pointer.style.padding = "0"; + var img = document.createElement("img"); + img.src = "/dot.png"; + img.style.width = "5px"; + img.style.height = "5px"; + img.style.borderStyle = "none"; + img.style.padding = "0"; + atag.style.borderStyle = "none"; + pointer.appendChild(img); + atag.appendChild(pointer); + } + } + + } + } + return hasChildren; + } + + // http://w3schools.com/ somewhere + function w3IncludeHTML() { + var z, i, a, file, xhttp; + z = document.getElementsByTagName("div"); + for (i = 0; i < z.length; i++) { + if (z[i].getAttribute("w3-include-html")) { + a = z[i].cloneNode(false); + file = z[i].getAttribute("w3-include-html"); + var xhttp = new XMLHttpRequest(); + xhttp.onreadystatechange = function () { + if (xhttp.readyState == 4 && xhttp.status == 200) { + a.removeAttribute("w3-include-html"); + a.innerHTML = xhttp.responseText; + + z[i].parentNode.replaceChild(a, z[i]); + initMenu(); + } + } + xhttp.open("GET", file, true); + xhttp.send(); + return; + } + } + } + + function initMenu() + { + // Find tree branch nodes and add onclick handlers + // Find the current node and select it + var objMenuRoot = document.getElementById('dhtmlgoodies_listMenu'); + + // We use the file path part of the URL to match A tag hrefs + var fileNameThis = getHRefPath(location).toLowerCase(); + // strip any trailing guff + if (fileNameThis.indexOf('?') > 0) + fileNameThis = fileNameThis.substr(0,fileNameThis.indexOf('?')); + if (fileNameThis.indexOf('#') > 0) + fileNameThis = fileNameThis.substr(0,fileNameThis.indexOf('#')); + + + + // Recurse through the lists + ProcessList( objMenuRoot, fileNameThis ); + + if ( activeNode != null ) + { + activeNode.firstChild.className='activeMenuLink'; + showPath(activeNode); + } + + } + window.onload = w3IncludeHTML; + \ No newline at end of file diff --git a/Ressource/Bellows/Tuto/2/Machine bellows.html b/Ressource/Bellows/Tuto/2/Machine bellows.html new file mode 100644 index 0000000..e92afc3 --- /dev/null +++ b/Ressource/Bellows/Tuto/2/Machine bellows.html @@ -0,0 +1,255 @@ + + + + + + + + + Machine bellows + + + + + + + + + + +
+
+ +
+
 
+
+
+ +
+
+
+
+
 
+
+
+ PROTECT MACHINE SLIDES
+or 
+HOW TO MAKE BELLOWS
+ By Joerg Hugel 
+
+M4. C4n
+ +
+
+ + + +
+ +
+ + + +
+ +
+ + + +
+
+
+

The + slide ways of machine tools are very sensitive components and should +always be clean and free from any debris. The machines for industrial +production are carefully designed today with protective elements, not +only to keep the slide, slide ways and sensors clean but also avoid any +pollution of the environment. However, in the enthusiasts' workshops +this is not the standard. Most lathes and milling machines the author +has seen have no or at best very rudimentary devices for the protection +of the slide ways or lead screws. Clearly any protective cover needs +some space and reduces the usable travelling distances of the carriages, + slides or work heads. As long, as the machines are operated manually +the operator may be responsible for removing the swarf. For CNC +controlled machines another solution is necessary. For grinding +equipment an effective slide protection is a must because the dust of +abrasives together with the lubricant of the slides is a very efficient +lapping paste.

+
Photo 1: A Sherline CNC mill with bellows
+


+

There + are different solutions to protect the sensitive components of a lathe, + milling or grinding machine. One very simple answer are bellows and +this short article will show, how they can be made. In Photo 1 + is my Sherline milling machine, converted into a CNC machine. The slide + and lead screw of X-axis are protected from swarf in the design of the +machine but not the respective components for the Y-axis. Therefore, two + bellows were installed. One end is mounted to the cross slide, the +other ends are held by two flanges, fixed to the base plate by a spring +loaded ball detent. So the bellows can be easily lifted for cleaning and + lubricating the slide ways, no tool is necessary. In Photo 2 the bellows for a Stent tool grinder is seen.

+
Photo 2: Bellows for a Stent tool grinder
+


+

Figure 1 + shows the folding scheme for bellows. It is a simple matter to make +this from a sheet of paper. But with other materials, e.g. leather or +fabrics this would be difficult or even impossible. Paper has the +necessary stiffness and if folded becomes flexible at the edges.

+
Figure 1: The folding scheme for bellows
+


+

The bellows in Photo 3 + were commercially manufactured. To make these from different materials, + even from sheet metal, very special jigs are used. I would not go into +the details. But please notice, the folding scheme is different from +Figure 1. + This has the property that the side parts of stretched bellows move +together, opposite to the behaviour of the bellows of Figure 1. In the experience of the author these features are not really essential.

+
Photo 3: An example of commercially manufactured bellows
+


+

Clearly + bellows from paper wouldn't be suitable for the purpose regarded here. +But a combination of paper, more precisely, polyester paper, and a  + protective layer could be the solution. By accident the author received + a somewhat worn out protective cover for an ironing board. This is a +compound of a thin foam layer and a fabric which has a metalized +surface. The foam was easily scraped off. he metalized fabric together +with the polyester paper has proved to be the perfect material for +bellows for milling and grinding machines.

+


+

Manufacturing Details

+

First + it is necessary to make the design, a drawing with the folding lines. +In the compressed state the folding angles are zero, for the maximum +length a folding angle of 45 Deg. is recommended, however not more than +60 Deg. To avoid errors the lines should show the folding direction by +different line pattern or colours. An example is seen in Figure 2.

+
Figure 2: Drawing for the folding lines
+


+
Photo 4: Polyester paper and metalized fabric
+


+

The materials for the bellows can be seen in Photo 4. The drawing for the folding lines is now transferred to a sheet of polyester paper as seen in Photo 4a. Recommended grade is  120 to 180 g/mm2, + equivalent to 0,1 to 0,15 mm thickness. In this case the drawing was +made with an inkjet printer. However, to dry the drawing takes several +hours if not a day. A laser printer cannot be used, because the +polyester paper becomes warped by the heat. But as seen in Photo 4b + the polyester paper is available with a millimetre grid and then a +manual drawing of the folding lines is really a simple matter. In Photo 4 c the metalized fabric is shown from the rear side.

+
Photo 5: Two folding legs
+


+

Now + the polyester paper is folded in several steps. Here the bookbinder's +traditional tool, the folding leg, comes into its own; two examples are +shown in Photo 5. The folded paper bellows are seen in Photo 6.

+
Photo 6: The bellows from polyester paper
+


+

Then the fabric and paper bellows are put together with white PVAC glue as seen in Photo 7. The completed bellows are shown in Photo 8.

+
Photo 7: The metalized fabric glued to the paper
+


+
Photo 8: The bellows completed.
+


+


+

Joerg + Hugel is a Member of the Society of Model & Experimental Engineers +and this article first appeared in the SMEE Journal in February 2014.

+
+
 
+
+
+ + + +
+
+
+
+
+ + + + +
 
+
+ +
+
+ + + + + \ No newline at end of file diff --git a/Ressource/Bellows/Tuto/2/Machine bellows_files/Figure-1.jpg b/Ressource/Bellows/Tuto/2/Machine bellows_files/Figure-1.jpg new file mode 100644 index 0000000..9b062ad Binary files /dev/null and b/Ressource/Bellows/Tuto/2/Machine bellows_files/Figure-1.jpg differ diff --git a/Ressource/Bellows/Tuto/2/Machine bellows_files/Figure-2.jpg b/Ressource/Bellows/Tuto/2/Machine bellows_files/Figure-2.jpg new file mode 100644 index 0000000..18c8d09 Binary files /dev/null and b/Ressource/Bellows/Tuto/2/Machine bellows_files/Figure-2.jpg differ diff --git a/Ressource/Bellows/Tuto/2/Machine bellows_files/Machine_bellows.css b/Ressource/Bellows/Tuto/2/Machine bellows_files/Machine_bellows.css new file mode 100644 index 0000000..dc7948a --- /dev/null +++ b/Ressource/Bellows/Tuto/2/Machine bellows_files/Machine_bellows.css @@ -0,0 +1,365 @@ +.paragraph_style { + color: rgb(0, 0, 0); + font-family: 'GillSans-Light', 'Gill Sans', 'Trebuchet MS', sans-serif; + font-size: 15px; + font-stretch: normal; + font-style: normal; + font-variant: normal; + font-weight: 300; + letter-spacing: 0; + line-height: 19px; + margin-bottom: 0px; + margin-left: 0px; + margin-right: 0px; + margin-top: 0px; + opacity: 1.00; + padding-bottom: 0px; + padding-top: 0px; + text-align: justify; + text-decoration: none; + text-indent: 0px; + text-transform: none; +} +.style { + font-family: 'GillSans-LightItalic', 'Gill Sans', 'Trebuchet MS', sans-serif; + font-size: 15px; + font-stretch: normal; + font-style: italic; + font-weight: 300; + line-height: 19px; +} +.style_1 { + line-height: 19px; +} +.paragraph_style_1 { + color: rgb(0, 0, 0); + font-family: 'TimesNewRomanPSMT', 'Times New Roman', serif; + font-size: 14px; + font-stretch: normal; + font-style: normal; + font-variant: normal; + font-weight: 400; + letter-spacing: 0; + line-height: 18px; + margin-bottom: 0px; + margin-left: 0px; + margin-right: 0px; + margin-top: 0px; + opacity: 1.00; + padding-bottom: 0px; + padding-top: 0px; + text-align: justify; + text-decoration: none; + text-indent: 0px; + text-transform: none; +} +.paragraph_style_2 { + color: rgb(0, 0, 0); + font-family: 'GillSans-Bold', 'Gill Sans', 'Trebuchet MS', sans-serif; + font-size: 15px; + font-stretch: normal; + font-style: normal; + font-variant: normal; + font-weight: 700; + letter-spacing: 0; + line-height: 20px; + margin-bottom: 0px; + margin-left: 0px; + margin-right: 0px; + margin-top: 0px; + opacity: 1.00; + padding-bottom: 3px; + padding-top: 12px; + text-align: justify; + text-decoration: none; + text-indent: 0px; + text-transform: none; +} +.style_2 { + font-family: 'GillSans-Light', 'Gill Sans', 'Trebuchet MS', sans-serif; + font-size: 10px; + font-stretch: normal; + font-style: normal; + font-weight: 300; + line-height: 19px; + vertical-align: 4px; +} +.style_SkipStroke_2 { + background: transparent; + opacity: 1.00; +} +.paragraph_style_3 { + color: rgb(0, 0, 0); + font-family: 'GillSans-LightItalic', 'Gill Sans', 'Trebuchet MS', sans-serif; + font-size: 15px; + font-stretch: normal; + font-style: italic; + font-variant: normal; + font-weight: 300; + letter-spacing: 0; + line-height: 19px; + margin-bottom: 0px; + margin-left: 0px; + margin-right: 0px; + margin-top: 0px; + opacity: 1.00; + padding-bottom: 6px; + padding-top: 6px; + text-align: left; + text-decoration: none; + text-indent: 0px; + text-transform: none; +} +.style_SkipStroke_3 { + background: transparent; + opacity: 1.00; +} +.style_SkipStrokeSkipFillSkipOpacity { +} +.style_SkipStroke { + background: transparent; + opacity: 1.00; +} +.style_SkipStroke_1 { + background: transparent; + opacity: 1.00; +} +.paragraph_style_4 { + color: rgb(0, 0, 0); + font-family: 'BankGothic-Medium', 'Bank Gothic', 'Arial', sans-serif; + font-size: 1px; + font-stretch: normal; + font-style: normal; + font-variant: normal; + font-weight: 500; + letter-spacing: 0; + line-height: 1px; + margin-bottom: 0px; + margin-left: 0px; + margin-right: 0px; + margin-top: 0px; + opacity: 1.00; + padding-bottom: 0px; + padding-top: 0px; + text-align: left; + text-decoration: none; + text-indent: 0px; + text-transform: none; +} +.paragraph_style_5 { + color: rgb(0, 0, 0); + font-family: 'BankGothic-Medium', 'Bank Gothic', 'Arial', sans-serif; + font-size: 16px; + font-stretch: normal; + font-style: normal; + font-variant: normal; + font-weight: 500; + letter-spacing: 0; + line-height: 17px; + margin-bottom: 0px; + margin-left: 0px; + margin-right: 0px; + margin-top: 0px; + opacity: 1.00; + padding-bottom: 0px; + padding-top: 0px; + text-align: left; + text-decoration: none; + text-indent: 0px; + text-transform: none; +} +.paragraph_style_6 { + color: rgb(0, 0, 0); + font-family: 'BankGothic-Medium', 'Bank Gothic', 'Arial', sans-serif; + font-size: 16px; + font-stretch: normal; + font-style: normal; + font-variant: normal; + font-weight: 500; + letter-spacing: 0; + line-height: 17px; + margin-bottom: 0px; + margin-left: 0px; + margin-right: 0px; + margin-top: 0px; + opacity: 1.00; + padding-bottom: 0px; + padding-top: 0px; + text-align: center; + text-decoration: none; + text-indent: 0px; + text-transform: none; +} +.style_3 { + line-height: 17px; +} +.Beschriftung { + color: rgb(0, 0, 0); + font-family: 'TimesNewRomanPSMT', 'Times New Roman', serif; + font-size: 14px; + font-stretch: normal; + font-style: normal; + font-variant: normal; + font-weight: 400; + letter-spacing: 0; + line-height: 16px; + margin-bottom: 0px; + margin-left: 0px; + margin-right: 0px; + margin-top: 0px; + opacity: 1.00; + padding-bottom: 6px; + padding-top: 6px; + text-align: left; + text-decoration: none; + text-indent: 0px; + text-transform: none; +} +.Free_Form { + color: rgb(88, 77, 77); + font-family: 'ArialMT', 'Arial', sans-serif; + font-size: 15px; + font-stretch: normal; + font-style: normal; + font-variant: normal; + font-weight: 400; + letter-spacing: 0; + line-height: 20px; + margin-bottom: 0px; + margin-left: 0px; + margin-right: 0px; + margin-top: 0px; + opacity: 1.00; + padding-bottom: 0px; + padding-top: 0px; + text-align: left; + text-decoration: none; + text-indent: 0px; + text-transform: none; +} +.Standard { + color: rgb(0, 0, 0); + font-family: 'TimesNewRomanPSMT', 'Times New Roman', serif; + font-size: 14px; + font-stretch: normal; + font-style: normal; + font-variant: normal; + font-weight: 400; + letter-spacing: 0; + line-height: 24px; + margin-bottom: 0px; + margin-left: 0px; + margin-right: 0px; + margin-top: 0px; + opacity: 1.00; + padding-bottom: 0px; + padding-top: 0px; + text-align: justify; + text-decoration: none; + text-indent: 0px; + text-transform: none; +} +.Überschrift_1 { + color: rgb(0, 0, 0); + font-family: 'TimesNewRomanPS-BoldMT', 'Times New Roman', serif; + font-size: 16px; + font-stretch: normal; + font-style: normal; + font-variant: normal; + font-weight: 700; + letter-spacing: 0; + line-height: 27px; + margin-bottom: 0px; + margin-left: 0px; + margin-right: 0px; + margin-top: 0px; + opacity: 1.00; + padding-bottom: 3px; + padding-top: 12px; + text-align: justify; + text-decoration: none; + text-indent: 0px; + text-transform: none; +} +.graphic_image_style_default_SkipStroke { + background: transparent; + opacity: 1.00; +} +.graphic_shape_style_default_SkipStrokeSkipFillSkipOpacity { +} +.graphic_textbox_layout_style_default { + padding: 4px; +} +.graphic_textbox_layout_style_default_External_536_133 { + position: relative; +} +.graphic_textbox_layout_style_default_External_546_5383 { + position: relative; +} +.graphic_textbox_layout_style_default_External_100_100 { + position: relative; +} +.graphic_textbox_style_default_SkipStroke { + background: transparent; + opacity: 1.00; +} +a { + color: rgb(88, 77, 77); + text-decoration: underline; +} +a:visited { + color: rgb(121, 121, 121); + text-decoration: underline; +} +a:hover { + color: rgb(0, 0, 0); + text-decoration: underline; +} +.bumper { + font-size: 1px; + line-height: 1px; +} +.tinyText { + font-size: 1px; + line-height: 1px; +} +.spacer { + font-size: 1px; + line-height: 1px; +} +body { + -webkit-text-size-adjust: none; +} +div { + overflow: visible; +} +img { + border: none; +} +.InlineBlock { + display: inline; +} +.InlineBlock { + display: inline-block; +} +.inline-block { + display: inline-block; + vertical-align: baseline; + margin-bottom:0.3em; +} +.inline-block.shape-with-text { + vertical-align: bottom; +} +.vertical-align-middle-middlebox { + display: table; +} +.vertical-align-middle-innerbox { + display: table-cell; + vertical-align: middle; +} +div.paragraph { + position: relative; +} +li.full-width { + width: 100; +} diff --git a/Ressource/Bellows/Tuto/2/Machine bellows_files/Machine_bellows.js b/Ressource/Bellows/Tuto/2/Machine bellows_files/Machine_bellows.js new file mode 100644 index 0000000..7c3b70e --- /dev/null +++ b/Ressource/Bellows/Tuto/2/Machine bellows_files/Machine_bellows.js @@ -0,0 +1,9 @@ +// Created by iWeb 3.0.4 local-build-20140326 + +setTransparentGifURL('Media/transparent.gif');function applyEffects() +{var registry=IWCreateEffectRegistry();registry.registerEffects({stroke_1:new IWStrokeParts([{rect:new IWRect(-1,1,2,401),url:'Machine_bellows_files/stroke.png'},{rect:new IWRect(-1,-1,2,2),url:'Machine_bellows_files/stroke_1.png'},{rect:new IWRect(1,-1,535,2),url:'Machine_bellows_files/stroke_2.png'},{rect:new IWRect(536,-1,2,2),url:'Machine_bellows_files/stroke_3.png'},{rect:new IWRect(536,1,2,401),url:'Machine_bellows_files/stroke_4.png'},{rect:new IWRect(536,402,2,2),url:'Machine_bellows_files/stroke_5.png'},{rect:new IWRect(1,402,535,2),url:'Machine_bellows_files/stroke_6.png'},{rect:new IWRect(-1,402,2,2),url:'Machine_bellows_files/stroke_7.png'}],new IWSize(537,403)),stroke_7:new IWStrokeParts([{rect:new IWRect(-1,1,2,163),url:'Machine_bellows_files/stroke_48.png'},{rect:new IWRect(-1,-1,2,2),url:'Machine_bellows_files/stroke_49.png'},{rect:new IWRect(1,-1,535,2),url:'Machine_bellows_files/stroke_50.png'},{rect:new IWRect(536,-1,2,2),url:'Machine_bellows_files/stroke_51.png'},{rect:new IWRect(536,1,2,163),url:'Machine_bellows_files/stroke_52.png'},{rect:new IWRect(536,164,2,2),url:'Machine_bellows_files/stroke_53.png'},{rect:new IWRect(1,164,535,2),url:'Machine_bellows_files/stroke_54.png'},{rect:new IWRect(-1,164,2,2),url:'Machine_bellows_files/stroke_55.png'}],new IWSize(537,165)),stroke_8:new IWStrokeParts([{rect:new IWRect(-1,1,2,401),url:'Machine_bellows_files/stroke_56.png'},{rect:new IWRect(-1,-1,2,2),url:'Machine_bellows_files/stroke_57.png'},{rect:new IWRect(1,-1,535,2),url:'Machine_bellows_files/stroke_58.png'},{rect:new IWRect(536,-1,2,2),url:'Machine_bellows_files/stroke_59.png'},{rect:new IWRect(536,1,2,401),url:'Machine_bellows_files/stroke_60.png'},{rect:new IWRect(536,402,2,2),url:'Machine_bellows_files/stroke_61.png'},{rect:new IWRect(1,402,535,2),url:'Machine_bellows_files/stroke_62.png'},{rect:new IWRect(-1,402,2,2),url:'Machine_bellows_files/stroke_63.png'}],new IWSize(537,403)),stroke_2:new IWStrokeParts([{rect:new IWRect(-1,1,2,401),url:'Machine_bellows_files/stroke_8.png'},{rect:new IWRect(-1,-1,2,2),url:'Machine_bellows_files/stroke_9.png'},{rect:new IWRect(1,-1,535,2),url:'Machine_bellows_files/stroke_10.png'},{rect:new IWRect(536,-1,2,2),url:'Machine_bellows_files/stroke_11.png'},{rect:new IWRect(536,1,2,401),url:'Machine_bellows_files/stroke_12.png'},{rect:new IWRect(536,402,2,2),url:'Machine_bellows_files/stroke_13.png'},{rect:new IWRect(1,402,535,2),url:'Machine_bellows_files/stroke_14.png'},{rect:new IWRect(-1,402,2,2),url:'Machine_bellows_files/stroke_15.png'}],new IWSize(537,403)),stroke_9:new IWStrokeParts([{rect:new IWRect(-1,1,2,401),url:'Machine_bellows_files/stroke_64.png'},{rect:new IWRect(-1,-1,2,2),url:'Machine_bellows_files/stroke_65.png'},{rect:new IWRect(1,-1,535,2),url:'Machine_bellows_files/stroke_66.png'},{rect:new IWRect(536,-1,2,2),url:'Machine_bellows_files/stroke_67.png'},{rect:new IWRect(536,1,2,401),url:'Machine_bellows_files/stroke_68.png'},{rect:new IWRect(536,402,2,2),url:'Machine_bellows_files/stroke_69.png'},{rect:new IWRect(1,402,535,2),url:'Machine_bellows_files/stroke_70.png'},{rect:new IWRect(-1,402,2,2),url:'Machine_bellows_files/stroke_71.png'}],new IWSize(537,403)),stroke_0:new IWEmptyStroke(),stroke_10:new IWStrokeParts([{rect:new IWRect(-1,1,2,505),url:'Machine_bellows_files/stroke_72.png'},{rect:new IWRect(-1,-1,2,2),url:'Machine_bellows_files/stroke_73.png'},{rect:new IWRect(1,-1,535,2),url:'Machine_bellows_files/stroke_74.png'},{rect:new IWRect(536,-1,2,2),url:'Machine_bellows_files/stroke_75.png'},{rect:new IWRect(536,1,2,505),url:'Machine_bellows_files/stroke_76.png'},{rect:new IWRect(536,506,2,2),url:'Machine_bellows_files/stroke_77.png'},{rect:new IWRect(1,506,535,2),url:'Machine_bellows_files/stroke_78.png'},{rect:new IWRect(-1,506,2,2),url:'Machine_bellows_files/stroke_79.png'}],new IWSize(537,507)),stroke_3:new IWStrokeParts([{rect:new IWRect(-1,1,2,320),url:'Machine_bellows_files/stroke_16.png'},{rect:new IWRect(-1,-1,2,2),url:'Machine_bellows_files/stroke_17.png'},{rect:new IWRect(1,-1,535,2),url:'Machine_bellows_files/stroke_18.png'},{rect:new IWRect(536,-1,2,2),url:'Machine_bellows_files/stroke_19.png'},{rect:new IWRect(536,1,2,320),url:'Machine_bellows_files/stroke_20.png'},{rect:new IWRect(536,321,2,2),url:'Machine_bellows_files/stroke_21.png'},{rect:new IWRect(1,321,535,2),url:'Machine_bellows_files/stroke_22.png'},{rect:new IWRect(-1,321,2,2),url:'Machine_bellows_files/stroke_23.png'}],new IWSize(537,322)),stroke_4:new IWStrokeParts([{rect:new IWRect(-1,1,2,397),url:'Machine_bellows_files/stroke_24.png'},{rect:new IWRect(-1,-1,2,2),url:'Machine_bellows_files/stroke_25.png'},{rect:new IWRect(1,-1,535,2),url:'Machine_bellows_files/stroke_26.png'},{rect:new IWRect(536,-1,2,2),url:'Machine_bellows_files/stroke_27.png'},{rect:new IWRect(536,1,2,397),url:'Machine_bellows_files/stroke_28.png'},{rect:new IWRect(536,398,2,2),url:'Machine_bellows_files/stroke_29.png'},{rect:new IWRect(1,398,535,2),url:'Machine_bellows_files/stroke_30.png'},{rect:new IWRect(-1,398,2,2),url:'Machine_bellows_files/stroke_31.png'}],new IWSize(537,399)),stroke_5:new IWStrokeParts([{rect:new IWRect(-1,1,2,375),url:'Machine_bellows_files/stroke_32.png'},{rect:new IWRect(-1,-1,2,2),url:'Machine_bellows_files/stroke_33.png'},{rect:new IWRect(1,-1,535,2),url:'Machine_bellows_files/stroke_34.png'},{rect:new IWRect(536,-1,2,2),url:'Machine_bellows_files/stroke_35.png'},{rect:new IWRect(536,1,2,375),url:'Machine_bellows_files/stroke_36.png'},{rect:new IWRect(536,376,2,2),url:'Machine_bellows_files/stroke_37.png'},{rect:new IWRect(1,376,535,2),url:'Machine_bellows_files/stroke_38.png'},{rect:new IWRect(-1,376,2,2),url:'Machine_bellows_files/stroke_39.png'}],new IWSize(537,377)),stroke_6:new IWStrokeParts([{rect:new IWRect(-1,1,2,373),url:'Machine_bellows_files/stroke_40.png'},{rect:new IWRect(-1,-1,2,2),url:'Machine_bellows_files/stroke_41.png'},{rect:new IWRect(1,-1,535,2),url:'Machine_bellows_files/stroke_42.png'},{rect:new IWRect(536,-1,2,2),url:'Machine_bellows_files/stroke_43.png'},{rect:new IWRect(536,1,2,373),url:'Machine_bellows_files/stroke_44.png'},{rect:new IWRect(536,374,2,2),url:'Machine_bellows_files/stroke_45.png'},{rect:new IWRect(1,374,535,2),url:'Machine_bellows_files/stroke_46.png'},{rect:new IWRect(-1,374,2,2),url:'Machine_bellows_files/stroke_47.png'}],new IWSize(537,375))});registry.applyEffects();} +function hostedOnDM() +{return false;} +function onPageLoad() +{loadMozillaCSS('Machine_bellows_files/Machine_bellowsMoz.css') +adjustLineHeightIfTooBig('id1');adjustFontSizeIfTooBig('id1');adjustLineHeightIfTooBig('id2');adjustFontSizeIfTooBig('id2');adjustLineHeightIfTooBig('id3');adjustFontSizeIfTooBig('id3');fixAllIEPNGs('Media/transparent.gif');applyEffects()} diff --git a/Ressource/Bellows/Tuto/2/Machine bellows_files/Machine_bellowsMoz.css b/Ressource/Bellows/Tuto/2/Machine bellows_files/Machine_bellowsMoz.css new file mode 100644 index 0000000..4d16bb0 --- /dev/null +++ b/Ressource/Bellows/Tuto/2/Machine bellows_files/Machine_bellowsMoz.css @@ -0,0 +1,6 @@ +.inline-block { + display: -moz-inline-box; + display: inline-block; + vertical-align: baseline; + margin-bottom:3px; +} diff --git a/Ressource/Bellows/Tuto/2/Machine bellows_files/Photo-1.jpg b/Ressource/Bellows/Tuto/2/Machine bellows_files/Photo-1.jpg new file mode 100644 index 0000000..411ae71 Binary files /dev/null and b/Ressource/Bellows/Tuto/2/Machine bellows_files/Photo-1.jpg differ diff --git a/Ressource/Bellows/Tuto/2/Machine bellows_files/Photo-2.jpg b/Ressource/Bellows/Tuto/2/Machine bellows_files/Photo-2.jpg new file mode 100644 index 0000000..92be4fc Binary files /dev/null and b/Ressource/Bellows/Tuto/2/Machine bellows_files/Photo-2.jpg differ diff --git a/Ressource/Bellows/Tuto/2/Machine bellows_files/Photo-3.jpg b/Ressource/Bellows/Tuto/2/Machine bellows_files/Photo-3.jpg new file mode 100644 index 0000000..a3e73f6 Binary files /dev/null and b/Ressource/Bellows/Tuto/2/Machine bellows_files/Photo-3.jpg differ diff --git a/Ressource/Bellows/Tuto/2/Machine bellows_files/Photo-4.jpg b/Ressource/Bellows/Tuto/2/Machine bellows_files/Photo-4.jpg new file mode 100644 index 0000000..6512cfd Binary files /dev/null and b/Ressource/Bellows/Tuto/2/Machine bellows_files/Photo-4.jpg differ diff --git a/Ressource/Bellows/Tuto/2/Machine bellows_files/Photo-5.jpg b/Ressource/Bellows/Tuto/2/Machine bellows_files/Photo-5.jpg new file mode 100644 index 0000000..aaf8eb4 Binary files /dev/null and b/Ressource/Bellows/Tuto/2/Machine bellows_files/Photo-5.jpg differ diff --git a/Ressource/Bellows/Tuto/2/Machine bellows_files/Photo-6.jpg b/Ressource/Bellows/Tuto/2/Machine bellows_files/Photo-6.jpg new file mode 100644 index 0000000..caf2a83 Binary files /dev/null and b/Ressource/Bellows/Tuto/2/Machine bellows_files/Photo-6.jpg differ diff --git a/Ressource/Bellows/Tuto/2/Machine bellows_files/Photo-7.jpg b/Ressource/Bellows/Tuto/2/Machine bellows_files/Photo-7.jpg new file mode 100644 index 0000000..8758717 Binary files /dev/null and b/Ressource/Bellows/Tuto/2/Machine bellows_files/Photo-7.jpg differ diff --git a/Ressource/Bellows/Tuto/2/Machine bellows_files/Photo-8.jpg b/Ressource/Bellows/Tuto/2/Machine bellows_files/Photo-8.jpg new file mode 100644 index 0000000..4df3f39 Binary files /dev/null and b/Ressource/Bellows/Tuto/2/Machine bellows_files/Photo-8.jpg differ diff --git a/Ressource/Bellows/Tuto/2/Machine bellows_files/WidgetCommon.js b/Ressource/Bellows/Tuto/2/Machine bellows_files/WidgetCommon.js new file mode 100644 index 0000000..6c7ba96 --- /dev/null +++ b/Ressource/Bellows/Tuto/2/Machine bellows_files/WidgetCommon.js @@ -0,0 +1,423 @@ +// +// iWeb - WidgetCommon.js +// Copyright (c) 2007-2008 Apple Inc. All rights reserved. +// + +var widgets=[];var identifiersToStringLocalizations=[];var Widget=Class.create({initialize:function(instanceID,widgetPath,sharedPath,sitePath,preferences,runningInApp) +{if(instanceID) +{this.instanceID=instanceID;this.widgetPath=widgetPath;this.sharedPath=sharedPath;this.sitePath=sitePath;this.preferences=preferences;this.runningInApp=(runningInApp===undefined)?false:runningInApp;this.onloadReceived=false;if(this.preferences&&this.runningInApp==true) +{this.preferences.widget=this;setTransparentGifURL(this.sharedPath.stringByAppendingPathComponent("None.gif"));} +this.div().widget=this;window[instanceID]=this;widgets.push(this);widgets[instanceID]=this;if(!this.constructor.instances) +{this.constructor.instances=new Array();} +this.constructor.instances.push(this);}},div:function() +{var divID=this.instanceID;if(arguments.length==1) +{divID=this.instanceID+"-"+arguments[0];} +return $(divID);},onload:function() +{this.onloadReceived=true;},onunload:function() +{},didBecomeSelected:function() +{},didBecomeDeselected:function() +{},didBeginEditing:function() +{},didEndEditing:function() +{},setNeedsDisplay:function() +{},preferenceForKey:function(key) +{var value;if(this.preferences) +value=this.preferences[key];return value;},initializeDefaultPreferences:function(prefs) +{var self=this;$H(prefs).each(function(pair) +{if(self.preferenceForKey(pair.key)===undefined) +{self.setPreferenceForKey(pair.value,pair.key,false);}});},setPreferenceForKey:function(preference,key,registerUndo) +{if(this.runningInApp) +{if(registerUndo===undefined) +registerUndo=true;if((registerUndo==false)&&this.preferences.disableUndoRegistration) +this.preferences.disableUndoRegistration();this.preferences[key]=preference;if((registerUndo==false)&&this.preferences.enableUndoRegistration) +this.preferences.enableUndoRegistration();} +else +{this.preferences[key]=preference;this.changedPreferenceForKey(key);}},changedPreferenceForKey:function(key) +{},postNotificationWithNameAndUserInfo:function(name,userInfo) +{if(window.NotificationCenter!==undefined) +{NotificationCenter.postNotification(new IWNotification(name,null,userInfo));}},sizeWillChange:function() +{},sizeDidChange:function() +{},widgetWidth:function() +{var enclosingDiv=this.div();if(enclosingDiv) +return enclosingDiv.offsetWidth;else +return null;},widgetHeight:function() +{var enclosingDiv=this.div();if(enclosingDiv) +return enclosingDiv.offsetHeight;else +return null;},getInstanceId:function(id) +{var fullId=this.instanceID+"-"+id;if(arguments.length==2) +{fullId+=("$"+arguments[1]);} +return fullId;},getElementById:function(id) +{var fullId=this.getInstanceId.apply(this,arguments);return $(fullId);},localizedString:function(string) +{return LocalizedString(this.widgetIdentifier,string);},showView:function(viewName) +{var futureView=this.m_views[viewName];if((futureView!=this.m_currentView)&&(futureView!=this.m_futureView)) +{this.m_futureView=futureView;if(this.m_fadeAnimation) +{this.m_fadeAnimation.stop();} +var previousView=this.m_currentView;this.m_currentView=futureView;var currentView=this.m_currentView;this.m_futureView=null;this.m_fadeAnimation=new SimpleAnimation(function(){delete this.m_fadeAnimation;}.bind(this));this.m_fadeAnimation.pre=function() +{if(previousView) +{previousView.ensureDiv().setStyle({zIndex:0,opacity:1});} +if(currentView) +{currentView.ensureDiv().setStyle({zIndex:1,opacity:0});currentView.show();currentView.render();}} +this.m_fadeAnimation.post=function() +{!previousView||previousView.hide();!currentView||currentView.ensureDiv().setStyle({zIndex:'',opacity:1});!currentView||!currentView.doneFadingIn||currentView.doneFadingIn();} +this.m_fadeAnimation.update=function(now) +{!currentView||currentView.ensureDiv().setOpacity(now);!previousView||previousView.ensureDiv().setOpacity(1-now);}.bind(this);this.m_fadeAnimation.start();}}});Widget.onload=function() +{for(var i=0;icropped.aspectRatio()) +{scaleFactor=cropped.height/natural.height;} +var scaled=natural.scale(scaleFactor);var offset=new IWPoint(Math.abs(scaled.width-cropped.width)/2,Math.abs(scaled.height-cropped.height)/2);img.setStyle({width:px(scaled.width),height:px(scaled.height),marginLeft:px(-offset.x),marginTop:px(-offset.y),position:'relative'});cropDiv.setStyle({width:px(cropped.width),height:px(cropped.height),overflow:"hidden",position:'relative'});cropDiv.className="crop";} +if(windowsInternetExplorer&&effectiveBrowserVersion<7&&img.src.indexOf(transparentGifURL())!=-1) +{var originalImage=new Image();originalImage.src=img.originalSrc;if(originalImage.complete) +{croppingDivForImage_helper(originalImage);} +else +{originalImage.onload=croppingDivForImage_helper.bind(null,originalImage);}} +else +{croppingDivForImage_helper(null);}} +return cropDiv;},applyEffects:function(div) +{if(this.sfrShadow||this.sfrReflection||this.sfrStroke) +{if((div.offsetWidth===undefined)||(div.offsetHeight===undefined)||(div.offsetWidth===0)||(div.offsetHeight===0)) +{setTimeout(JSONFeedRendererWidget.prototype.applyEffects.bind(this,div),0) +return;} +if(this.sfrStroke&&(div.strokeApplied==false)) +{this.sfrStroke.applyToElement(div);div.strokeApplied=true;} +if(this.sfrReflection&&(div.reflectionApplied==false)) +{this.sfrReflection.applyToElement(div);div.reflectionApplied=true;} +if(this.sfrShadow&&(!this.disableShadows)&&(div.shadowApplied==false)) +{this.sfrShadow.applyToElement(div);div.shadowApplied=true;} +if(this.runningInApp&&(window.webKitVersion<=419)&&this.preferences.setNeedsDisplay) +{this.preferences.setNeedsDisplay();}} +if(windowsInternetExplorer) +{var cropDivs=div.select(".crop");var cropDiv=cropDivs[cropDivs.length-1];if(cropDiv) +{cropDiv.onclick=function() +{var anchorNode=div.parentNode;var targetHref=locationHRef();while(anchorNode&&(anchorNode.tagName!="A")) +{anchorNode=anchorNode.parentNode} +if(anchorNode) +{targetHref=anchorNode.href;} +window.location=targetHref;};cropDiv.onmouseover=function() +{this.style.cursor='pointer';}}}},summaryExcerpt:function(descriptionHTML,maxSummaryLength) +{var div=document.createElement("div");div.innerHTML=descriptionHTML;if(maxSummaryLength>0) +{var model=new HTMLTextModel(div);model.truncateAroundPosition(maxSummaryLength,"...");} +else if(maxSummaryLength===0) +{div.innerHTML="";} +return div.innerHTML;}});var PrefMarkupWidget=Class.create(Widget,{initialize:function($super,instanceID,widgetPath,sharedPath,sitePath,preferences,runningInApp) +{if(instanceID) +{$super(instanceID,widgetPath,sharedPath,sitePath,preferences,runningInApp);}},onload:function() +{if(!this.runningInApp) +{this.setUpSubDocumentOnLoad();}},setUpSubDocumentOnLoad:function() +{var self=this;var oIFrame=this.getElementById("frame");if(oIFrame) +{setTimeout(function(){self.loadedSubDocument()},250);}},loadedSubDocument:function() +{var oIFrame=this.getElementById("frame");var oSubDocument=oIFrame.contentWindow||oIFrame.contentDocument;if(oSubDocument.document) +{oSubDocument=oSubDocument.document;} +if(oSubDocument.body) +{this.fixTargetOnElements(oSubDocument,"a");this.fixTargetOnElements(oSubDocument,"form");} +else +{var self=this;setTimeout(function(){self.loadedSubDocument()},250);}},fixTargetOnElements:function(doc,tagName) +{var elements=doc.getElementsByTagName(tagName);for(var i=0;i(self._thumbStart+self._thumbLength)) +self.scrollByThumbDelta(deltaScroll);} +IWScrollbar.prototype.setScrollArea=function(scrollarea) +{if(this.scrollarea) +{Event.stopObserving(this.scrollbar,"mousewheel",this.scrollarea._mousewheelScrollHandler,true);Event.stopObserving(this.scrollbar,"DOMMouseScroll",this.scrollarea._mousewheelScrollHandler,true);} +this.scrollarea=scrollarea;Event.observe(this.scrollbar,"mousewheel",this.scrollarea._mousewheelScrollHandler,true);Event.observe(this.scrollbar,"DOMMouseScroll",this.scrollarea._mousewheelScrollHandler,true);} +IWScrollbar.prototype.refresh=function() +{this._trackOffset=this._computeTrackOffset();this._trackLength=this._computeTrackLength();var ratio=this._getViewToContentRatio();if(ratio>=1.0||!this._canScroll()) +{if(this.autohide) +{this.hide();} +this._thumb.style.display="none";this.scrollbar.style.appleDashboardRegion="none";} +else +{this._thumbLength=Math.max(Math.round(this._trackLength*ratio),this.minThumbSize);this._numScrollablePixels=this._trackLength-this._thumbLength-(2*this.padding);this._setObjectLength(this._thumb,this._thumbLength);if(windowsInternetExplorer) +{this._setObjectStart(this._thumb.down().next(),this.thumbStartLength);this._setObjectLength(this._thumb.down().next(),this._thumbLength +-this.thumbStartLength-this.thumbEndLength);this._setObjectStart(this._thumb.down().next(1),this._thumbLength-this.thumbEndLength);this._setObjectLength(this._thumb.down().next(1),this.thumbEndLength);if(!this.fixedUpIEPNGBGs) +{fixupIEPNGBGsInTree(this._track);Event.stopObserving(this._track,"mousedown",this._mousedownTrackHandler);Event.stopObserving(this._thumb,"mousedown",this._mousedownThumbHandler);Event.observe(this._track,"mousedown",this._mousedownTrackHandler);Event.observe(this._thumb,"mousedown",this._mousedownThumbHandler);this.fixedUpIEPNGBGs=true;}} +this._thumb.style.display="block";this.scrollbar.style.appleDashboardRegion="dashboard-region(control rectangle)";this.show();} +this.verticalHasScrolled();this.horizontalHasScrolled();} +IWScrollbar.prototype.setAutohide=function(autohide) +{this.autohide=autohide;if(this._getViewToContentRatio()>=1.0&&autohide) +{this.hide();} +else +{this.show();}} +IWScrollbar.prototype.hide=function() +{this._track.style.display="none";this.hidden=true;} +IWScrollbar.prototype.show=function() +{this._track.style.display="block";this.hidden=false;} +IWScrollbar.prototype.setSize=function(size) +{this.size=size;this._setObjectSize(this.scrollbar,size);this._setObjectSize(this._track.down().next(),size);this._setObjectSize(this._thumb.down().next(),size);} +IWScrollbar.prototype.setTrackStart=function(imgpath,length) +{this.trackStartPath=imgpath;this.trackStartLength=length;var element=this._track.down();element.style.background="url("+imgpath+") no-repeat top left";this._setObjectLength(element,length);this._setObjectSize(element,this.size);this._setObjectStart(this._track.down().next(),length);} +IWScrollbar.prototype.setTrackMiddle=function(imgpath) +{this.trackMiddlePath=imgpath;this._track.down().next().style.background="url("+imgpath+") "+this._repeatType+" top left";} +IWScrollbar.prototype.setTrackEnd=function(imgpath,length) +{this.trackEndPath=imgpath;this.trackEndLength=length;var element=this._track.down().next(1);element.style.background="url("+imgpath+") no-repeat top left";this._setObjectLength(element,length);this._setObjectSize(element,this.size);windowsInternetExplorer||this._setObjectEnd(this._track.down().next(),length);} +IWScrollbar.prototype.setThumbStart=function(imgpath,length) +{this.thumbStartPath=imgpath;this.thumbStartLength=length;var element=this._thumb.down();element.style.background="url("+imgpath+") no-repeat top left";this._setObjectLength(element,length);this._setObjectSize(element,this.size);this._setObjectStart(this._thumb.down().next(),length);} +IWScrollbar.prototype.setThumbMiddle=function(imgpath) +{this.thumbMiddlePath=imgpath;this._thumb.down().next().style.background="url("+imgpath+") "+this._repeatType+" top left";} +IWScrollbar.prototype.setThumbEnd=function(imgpath,length) +{this.thumbEndPath=imgpath;this.thumbEndLength=length;var element=this._thumb.down().next(1);element.style.background="url("+imgpath+") no-repeat top left";this._setObjectLength(element,length);this._setObjectSize(element,this.size);windowsInternetExplorer||this._setObjectEnd(this._thumb.down().next(),length);} +IWScrollbar.prototype._contentPositionForThumbPosition=function(thumb_pos) +{if(this._getViewToContentRatio()>=1.0) +{return 0;} +else +{return(thumb_pos-this.padding)*((this._getContentLength()-this._getViewLength())/this._numScrollablePixels);}} +IWScrollbar.prototype._thumbPositionForContentPosition=function(page_pos) +{if(this._getViewToContentRatio()>=1.0) +{return this.padding;} +else +{var result=this.padding+(page_pos/((this._getContentLength()-this._getViewLength())/this._numScrollablePixels));if(isNaN(result)) +result=0;return result;}} +IWScrollbar.prototype.scrollByThumbDelta=function(deltaScroll) +{if(deltaScroll==0) +return;this.scrollTo(this._contentPositionForThumbPosition(this._thumbStart+deltaScroll));} +function IWVerticalScrollbar(scrollbar) +{this.scrollarea=null;this.scrollbar=$(scrollbar);this.minThumbSize=28;this.padding=-1;this.autohide=true;this.hidden=true;this.size=19;this.trackStartPath=transparentGifURL();this.trackStartLength=18;this.trackMiddlePath=transparentGifURL();this.trackEndPath=transparentGifURL();this.trackEndLength=18;this.thumbStartPath=transparentGifURL();this.thumbStartLength=9;this.thumbMiddlePath=transparentGifURL();this.thumbEndPath=transparentGifURL();this.thumbEndLength=9;this._track=null;this._thumb=null;this._trackOffset=0;this._trackLength=0;this._numScrollablePixels=0;this._thumbLength=0;this._repeatType="repeat-y";this._thumbStart=this.padding;var _self=this;this._captureEventHandler=function(event){_self._captureEvent(event);};this._mousedownThumbHandler=function(event){_self._mousedownThumb(event);};this._mousemoveThumbHandler=function(event){_self._mousemoveThumb(event);};this._mouseupThumbHandler=function(event){_self._mouseupThumb(event);};this._mousedownTrackHandler=function(event){_self._mousedownTrack(event);};this._mousemoveTrackHandler=function(event){_self._mousemoveTrack(event);};this._mouseoverTrackHandler=function(event){_self._mouseoverTrack(event);};this._mouseoutTrackHandler=function(event){_self._mouseoutTrack(event);};this._mouseupTrackHandler=function(event){_self._mouseupTrack(event);};this._init();} +IWVerticalScrollbar.prototype=new IWScrollbar(null);IWVerticalScrollbar.prototype.scrollTo=function(pos) +{this.scrollarea.verticalScrollTo(pos);} +IWVerticalScrollbar.prototype._setObjectSize=function(object,size) +{object.style.width=size+"px";} +IWVerticalScrollbar.prototype._setObjectLength=function(object,length) +{object.style.height=length+"px";} +IWVerticalScrollbar.prototype._setObjectStart=function(object,start) +{object.style.top=start+"px";} +IWVerticalScrollbar.prototype._setObjectEnd=function(object,end) +{object.style.bottom=end+"px";} +IWVerticalScrollbar.prototype._getMousePosition=function(event) +{if(event!=undefined) +return Event.pointerY(event);else +return 0;} +IWVerticalScrollbar.prototype._getThumbStartPos=function() +{return this._thumb.offsetTop;} +IWVerticalScrollbar.prototype._computeTrackOffset=function() +{var obj=this.scrollbar;var curtop=0;while(obj.offsetParent) +{curtop+=obj.offsetTop;obj=obj.offsetParent;} +return curtop;} +IWVerticalScrollbar.prototype._computeTrackLength=function() +{return this.scrollbar.offsetHeight;} +IWVerticalScrollbar.prototype._getViewToContentRatio=function() +{return this.scrollarea.viewToContentHeightRatio;} +IWVerticalScrollbar.prototype._getContentLength=function() +{return this.scrollarea.content.scrollHeight;} +IWVerticalScrollbar.prototype._getViewLength=function() +{return this.scrollarea.viewHeight;} +IWVerticalScrollbar.prototype._canScroll=function() +{return this.scrollarea.scrollsVertically;} +IWVerticalScrollbar.prototype.verticalHasScrolled=function() +{var new_thumb_pos=this._thumbPositionForContentPosition(this.scrollarea.content.scrollTop);this._thumbStart=new_thumb_pos;this._thumb.style.top=new_thumb_pos+"px";} +IWVerticalScrollbar.prototype.horizontalHasScrolled=function() +{} +function IWHorizontalScrollbar(scrollbar) +{this.scrollarea=null;this.scrollbar=$(scrollbar);this.minThumbSize=28;this.padding=-1;this.autohide=true;this.hidden=true;this.size=19;this.trackStartPath=transparentGifURL();this.trackStartLength=18;this.trackMiddlePath=transparentGifURL();this.trackEndPath=transparentGifURL();this.trackEndLength=18;this.thumbStartPath=transparentGifURL();this.thumbStartLength=9;this.thumbMiddlePath=transparentGifURL();this.thumbEndPath=transparentGifURL();this.thumbEndLength=9;this._track=null;this._thumb=null;this._trackOffset=0;this._trackLength=0;this._numScrollablePixels=0;this._thumbLength=0;this._repeatType="repeat-x";this._thumbStart=this.padding;var _self=this;this._captureEventHandler=function(event){_self._captureEvent(event);};this._mousedownThumbHandler=function(event){_self._mousedownThumb(event);};this._mousemoveThumbHandler=function(event){_self._mousemoveThumb(event);};this._mouseupThumbHandler=function(event){_self._mouseupThumb(event);};this._mousedownTrackHandler=function(event){_self._mousedownTrack(event);};this._mousemoveTrackHandler=function(event){_self._mousemoveTrack(event);};this._mouseoverTrackHandler=function(event){_self._mouseoverTrack(event);};this._mouseoutTrackHandler=function(event){_self._mouseoutTrack(event);};this._mouseupTrackHandler=function(event){_self._mouseupTrack(event);};this._init();} +IWHorizontalScrollbar.prototype=new IWScrollbar(null);IWHorizontalScrollbar.prototype.scrollTo=function(pos) +{this.scrollarea.horizontalScrollTo(pos);} +IWHorizontalScrollbar.prototype._setObjectSize=function(object,size) +{object.style.height=size+"px";} +IWHorizontalScrollbar.prototype._setObjectLength=function(object,length) +{object.style.width=length+"px";} +IWHorizontalScrollbar.prototype._setObjectStart=function(object,start) +{object.style.left=start+"px";} +IWHorizontalScrollbar.prototype._setObjectEnd=function(object,end) +{object.style.right=end+"px";} +IWHorizontalScrollbar.prototype._getMousePosition=function(event) +{if(event!=undefined) +return Event.pointerX(event);else +return 0;} +IWHorizontalScrollbar.prototype._getThumbStartPos=function() +{return this._thumb.offsetLeft;} +IWHorizontalScrollbar.prototype._computeTrackOffset=function() +{var obj=this.scrollbar;var curtop=0;while(obj.offsetParent) +{curtop+=obj.offsetLeft;obj=obj.offsetParent;} +return curtop;} +IWHorizontalScrollbar.prototype._computeTrackLength=function() +{return this.scrollbar.offsetWidth;} +IWHorizontalScrollbar.prototype._getViewToContentRatio=function() +{return this.scrollarea.viewToContentWidthRatio;} +IWHorizontalScrollbar.prototype._getContentLength=function() +{return this.scrollarea.content.scrollWidth;} +IWHorizontalScrollbar.prototype._getViewLength=function() +{return this.scrollarea.viewWidth;} +IWHorizontalScrollbar.prototype._canScroll=function() +{return this.scrollarea.scrollsHorizontally;} +IWHorizontalScrollbar.prototype.verticalHasScrolled=function() +{} +IWHorizontalScrollbar.prototype.horizontalHasScrolled=function() +{var new_thumb_pos=this._thumbPositionForContentPosition(this.scrollarea.content.scrollLeft);this._thumbStart=new_thumb_pos;this._thumb.style.left=new_thumb_pos+"px";} +function IWScrollArea(content) +{this.content=$(content);this.scrollsVertically=true;this.scrollsHorizontally=true;this.singlepressScrollPixels=10;this.viewHeight=0;this.viewToContentHeightRatio=1.0;this.viewWidth=0;this.viewToContentWidthRatio=1.0;this._scrollbars=new Array();var _self=this;this._refreshHandler=function(){_self.refresh();};this._keyPressedHandler=function(){_self.keyPressed(event);};this._mousewheelScrollHandler=function(event){_self.mousewheelScroll(event);};this.content.style.overflow="hidden";this.content.scrollTop=0;this.content.scrollLeft=0;Event.observe(this.content,"mousewheel",this._mousewheelScrollHandler,true);Event.observe(this.content,"DOMMouseScroll",this._mousewheelScrollHandler,true);this.refresh();var c=arguments.length;for(var i=1;ithis.viewHeight) +{this.viewToContentHeightRatio=this.viewHeight/this.content.scrollHeight;this.verticalScrollTo(this.content.scrollTop);} +else +{this.viewToContentHeightRatio=1.0;this.verticalScrollTo(0);} +if(this.content.scrollWidth>this.viewWidth) +{this.viewToContentWidthRatio=this.viewWidth/this.content.scrollWidth;this.horizontalScrollTo(this.content.scrollLeft);} +else +{this.viewToContentWidthRatio=1.0;this.horizontalScrollTo(0);} +var scrollbars=this._scrollbars;var c=scrollbars.length;for(var i=0;ibottom) +{new_content_top=bottom;} +this.content.scrollTop=new_content_top;var scrollbars=this._scrollbars;var c=scrollbars.length;for(var i=0;iright) +{new_content_left=right;} +this.content.scrollLeft=new_content_left;var scrollbars=this._scrollbars;var c=scrollbars.length;for(var i=0;i"+ +this.m_widget.localizedString(this.statusMessageKey)+"";} +this.ensureDiv().update(markup);this.resize();},resize:function() +{var widgetWidth=(this.runningInApp)?window.innerWidth:this.m_widget.div().offsetWidth;var widgetHeight=(this.runningInApp)?window.innerHeight:this.m_widget.div().offsetHeight;if(this.badgeImage) +{var badgeImageEl=$(this.p_badgeImgId());var badgeSize=new IWSize(this.badgeImageWidth,this.badgeImageHeight);if((badgeSize.width>widgetWidth)||(badgeSize.height>widgetHeight)) +{var widgetSize=new IWSize(widgetWidth,widgetHeight);badgeSize=badgeSize.scaleToFit(widgetSize);} +badgeImageEl.width=badgeSize.width;badgeImageEl.height=badgeSize.height;} +var overlayNativeWidth=700;var overlayNativeHeight=286;var overlayWidth=Math.max(widgetWidth,overlayNativeWidth);var overlayHeight=overlayNativeHeight;var overlayTop=Math.min(((widgetHeight/2)-overlayNativeHeight),0);var overlayLeft=Math.min(((widgetWidth/2)-(overlayNativeWidth/2)),0);var overlayImage=$(this.p_overlayImgId());overlayImage.width=overlayWidth;overlayImage.height=overlayHeight;overlayImage.setStyle({left:px(overlayLeft),top:px(overlayTop)});var statusMessageBlock=$(this.p_statusMessageBlockId());if(statusMessageBlock) +{var leftValue=px(Math.max(((widgetWidth-statusMessageBlock.offsetWidth)/2),0));var positionStyles={left:leftValue};if(this.statusMessageVerticallyCentered) +{var topValue=px(Math.max(((widgetHeight-statusMessageBlock.offsetHeight)/2),0));positionStyles.top=topValue;} +statusMessageBlock.setStyle(positionStyles);} +if(this.footerView) +{this.footerView.resize();}},doneFadingIn:function() +{this.m_widget.setPreferenceForKey(true,"x-viewDoneFadingIn",false);},p_badgeImgId:function() +{return this.m_widget.getInstanceId(this.m_divId+"-badge");},p_overlayImgId:function() +{return this.m_widget.getInstanceId(this.m_divId+"-overlay");},p_statusMessageBlockId:function() +{return this.m_widget.getInstanceId(this.m_divId+"-messageBlock");}}); \ No newline at end of file diff --git a/Ressource/Bellows/Tuto/2/Machine bellows_files/iWebImage.js b/Ressource/Bellows/Tuto/2/Machine bellows_files/iWebImage.js new file mode 100644 index 0000000..c7589b4 --- /dev/null +++ b/Ressource/Bellows/Tuto/2/Machine bellows_files/iWebImage.js @@ -0,0 +1,339 @@ +// +// iWeb - iWebImage.js +// Copyright 2007-2008 Apple Inc. +// All rights reserved. +// + +var IWAllImages={};var IWAllImageObjects={};function IWCreateImage(url) +{return IWAllImages[url]||new IWImage(url);} +var IWNamedImages={};function IWImageNamed(name) +{var url=IWNamedImages[name];return url?IWCreateImage(url):null} +function IWRegisterNamedImage(name,url) +{IWNamedImages[name]=url;} +var IWImageEnableUnload=isiPhone;var IWImage=Class.create({initialize:function(url) +{if(IWAllImages.hasOwnProperty(url)) +{iWLog("warning -- use IWCreateImage rather than new IWImage and you'll get better performance");} +this.mPreventUnloading=0;this.mLoading=false;this.mLoaded=false;this.mURL=url;this.mCallbacks=[];IWAllImages[url]=this;},sourceURL:function() +{return this.mURL;},loaded:function() +{return this.mLoaded;},load:function(callback,delayCallbackIfLoaded) +{if(this.mLoaded&&(callback!=null)) +{delayCallbackIfLoaded?setTimeout(callback,0):callback();} +else +{if(callback!=null) +{this.mCallbacks.push(callback);} +if(this.mLoading==false) +{this.mLoading=true;var img=new Image();IWAllImageObjects[this.sourceURL()]=img;img.onload=this.p_onload.bind(this);img.src=this.mURL;}}},unload:function(evenIfNotEnabled) +{if((evenIfNotEnabled||IWImageEnableUnload)&&this.mLoaded) +{if(this.mPreventUnloading<=0) +{this.mLoaded=false;this.mLoading=false;IWAllImageObjects[this.sourceURL()]=null;} +else +{this.mPreventedUnload=true;}}},preventUnloading:function() +{if(this.mPreventUnloading==0) +{this.mPreventedUnload=false;} +++this.mPreventUnloading;},allowUnloading:function() +{--this.mPreventUnloading;if(this.mPreventUnloading<=0&&this.mPreventedUnload) +{this.unload();}},naturalSize:function() +{(function(){return this.mNaturalSize!==undefined}).bind(this).assert();return this.mNaturalSize;},imgObject:function() +{return IWAllImageObjects[this.sourceURL()];},p_onload:function() +{this.preventUnloading();this.mLoaded=true;if(this.mNaturalSize===undefined) +{var imgObject=this.imgObject();(function(){return imgObject!==undefined}).assert();this.mNaturalSize=new IWSize(imgObject.width,imgObject.height);} +for(var i=0;i0) +{var element=elements.shift();var children=element.select("."+effectClass);if(children.length>0) +{elements=elements.minusArray(children);effectQueue=effectQueue.concat(this.p_queueForEffectClass(effect,effectClass,children));} +effectQueue.push({element:element,effect:effect});} +return effectQueue;},p_allStyleSheetsLoaded:function() +{if(isCamino||isFirefox) +{if(timeStyleSheetsAppearedInDOM!=null) +{duration=(new Date().getTime())-timeStyleSheetsAppearedInDOM;if(duration>100) +{allStyleSheetsLoaded=true;timeStyleSheetsAppearedInDOM=null;}} +else if(!allStyleSheetsLoaded) +{for(var i=0,sheetCount=document.styleSheets.length;i0&&duration<100&&readyToApplyEffects) +{var queueEntry=queue.shift();if(queueEntry&&queueEntry.effect&&queueEntry.element) +{queueEntry.effect.applyToElement(queueEntry.element);} +duration=(new Date().getTime())-startTime;} +if(queue.length>0) +{setTimeout(this.p_applyEffectsFromQueue.bind(this,queue),0);} +else +{performPostEffectsFixups();}}});function IWChildOffset(child,parent,positionedOnly) +{var l=0;var t=0;if(parent) +{var current=child;while(current&¤t!=parent) +{if(!positionedOnly||(current.style.position=="absolute")||(current.style.position=="relative")) +{l+=current.offsetLeft;t+=current.offsetTop;} +current=current.parentNode;}} +return new IWPoint(l,t);} +function IWImageExtents(ancestor,images,left,top,right,bottom) +{var unionedBounds=new IWRect(left,top,right-left,bottom-top);for(var e=0;e0)&&(imageClippedBounds.size.height>0)) +{if((unionedBounds.size.width>0)&&(unionedBounds.size.height>0)) +{unionedBounds=unionedBounds.union(imageClippedBounds);} +else +{unionedBounds=imageClippedBounds.clone();}}} +var extents={left:unionedBounds.origin.x,top:unionedBounds.origin.y,right:unionedBounds.origin.x+unionedBounds.size.width,bottom:unionedBounds.origin.y+unionedBounds.size.height};return extents;} +function IWEffectChildren(element,imagesOnly) +{element=$(element);var inlineBlocks=element.select('.inline-block');return element.descendants().findAll(function(child){if((!imagesOnly&&child.match("div.badge-fill"))||child.match("img")) +{var inline=false;for(var index=0,end=inlineBlocks.length;inline==false&&index0);var divBounds=new IWRect(-leftOffset,-topOffset,frameSize.width,frameSize.height).round();if(fillBackground) +{context.fillStyle='rgba(0,0,0,1)';divBounds.fill(context);} +for(var k=0;k=4) +{context.shadowColor="rgba("+parseInt(components[1],16)+", "+parseInt(components[2],16)+", "+parseInt(components[3],16)+", "+self.mOpacity+")";} +else +{components=self.mColor.match(/rgb\(([0-9\.]+),[ ]*([0-9\.]+),[ ]*([0-9\.]+)\)/);if(components&&components.length>=4) +{context.shadowColor="rgba("+components[1]+", "+components[2]+", "+components[3]+", "+self.mOpacity+")";} +else +{iWLog("not using shadow alpha, failed to match "+self.mColor);usingShadowAlpha=false;}}} +if(usingShadowAlpha==false) +{context.globalAlpha*=self.mOpacity;context.shadowColor=self.mColor;} +context.shadowBlur=self.mBlurRadius;context.shadowOffsetX=self.mOffset.x;context.shadowOffsetY=self.mOffset.y;context.drawImage(workingCanvas,0,0);context.restore();if(usingShadowAlpha==false) +{drawImageUnshadowed=self.mOpacity<1.0;} +else +{drawImageUnshadowed=false;}} +if(drawImageUnshadowed) +{context.drawImage(workingCanvas,0,0);} +if(fillBackground) +{divBounds.clear(context);context.save();context.globalAlpha=opacity;context.rect(divBounds.origin.x,divBounds.origin.y,divBounds.size.width,divBounds.size.height);context.clip();for(var k=0;k0) +{for(var j=0;j=this.imgCount) +{allImagesLoaded=true;for(var k=0;allImagesLoaded&&k';clippingDivPost='';thumbRect.origin.x-=left;thumbRect.origin.y-=top;} +var markup='
';markup+=clippingDivPre;markup+=imageStreamEntry.thumbnailMarkupForRect(thumbRect);markup+=clippingDivPost;markup+=this.p_imageMarkup(imageSize,2);markup+='
';return markup;},applyToElement:function(div) +{div=$(div);if(div!=null) +{if(div.parentNode) +{$(div.parentNode).ensureHasLayoutForIE();} +var size=new IWSize(div.offsetWidth,div.offsetHeight);div.insert(this.p_imageMarkup(size,(div.hasClassName("aboveStrokesAndFrames")?-1:"auto")));if(!div.hasClassName("flowDefining")) +{if(div.style.position!='absolute') +{var divRect=new IWRect(0,0,div.offsetWidth,div.offsetHeight);var unionRect=IWZeroRect();var layoutRects=this.p_imageLayout(size);layoutRects.each(function(r) +{unionRect=unionRect.union(r);});var padding=divRect.paddingToRect(unionRect);var marginLeft=Element.getStyle(div,"marginLeft");marginLeft=marginLeft?(toPixelsAtElement(div,marginLeft,false)):0;var marginTop=Element.getStyle(div,"marginTop");marginTop=marginTop?(toPixelsAtElement(div,marginTop,true)):0;var marginRight=Element.getStyle(div,"marginRight");marginRight=marginRight?(toPixelsAtElement(div,marginRight,false)):0;var marginBottom=Element.getStyle(div,"marginBottom");marginBottom=marginBottom?(toPixelsAtElement(div,marginBottom,true)):0;if(windowsInternetExplorer) +{div.setStyle({marginLeft:px(Math.max(0,padding.left-1)+marginLeft),marginTop:px(Math.max(0,padding.top-1)+marginTop),marginRight:px(Math.max(0,padding.right-1)+marginRight),marginBottom:px(Math.max(0,padding.bottom-1)+marginBottom)});if(effectiveBrowserVersion==7) +{updateListOfIE7FloatsFix(div);}} +else +{div.setStyle({marginLeft:px(padding.left+marginLeft),marginTop:px(padding.top+marginTop),marginRight:px(padding.right+marginRight),marginBottom:px(padding.bottom+marginBottom)});}}}}},strokeExtra:function(imageSize) +{if(!imageSize) +{imageSize=this.mMaxImageSize;} +rect=new IWRect(IWZeroPoint(),imageSize);var layout=this.p_imageLayout(rect.size);var unionRect=IWZeroRect();layout.each(function(r) +{unionRect=unionRect.union(r);});return rect.paddingToRect(unionRect);}});var IWStroke=Class.create({initialize:function(strokeURL,strokeRect,maxImageSize) +{this.mStrokeURL=strokeURL;this.mStrokeRect=strokeRect;this.mMaxImageSize=maxImageSize;},p_strokeRect:function(imageSize) +{var hScale=imageSize.width/this.mMaxImageSize.width;var vScale=imageSize.height/this.mMaxImageSize.height;var strokeRect=this.mStrokeRect.scale(hScale,vScale,true);return strokeRect;},p_imageMarkup:function(imageSize,zIndex) +{var style=this.p_strokeRect(imageSize).position();if(zIndex) +{style+='z-index: '+zIndex+';';} +return imgMarkup(this.mStrokeURL,style);},markupForImageStreamEntry:function(imageStreamEntry,imageSize) +{var rect=new IWRect(0,0,imageSize.width,imageSize.height);var markup='
';markup+=imageStreamEntry.thumbnailMarkupForRect(rect);markup+=this.p_imageMarkup(imageSize,2);markup+='
';return markup;},applyToElement:function(div) +{div=$(div);if(div!=null) +{if(div.parentNode) +{$(div.parentNode).ensureHasLayoutForIE();} +var size=new IWSize(div.offsetWidth,div.offsetHeight);div.insert(this.p_imageMarkup(size,(div.hasClassName("aboveStrokesAndFrames")?-1:"auto")));if(!div.hasClassName("flowDefining")) +{if(div.style.position!='absolute') +{var divRect=new IWRect(0,0,div.offsetWidth,div.offsetHeight);var padding=divRect.paddingToRect(this.mStrokeRect);var marginLeft=Element.getStyle(div,"marginLeft");marginLeft=marginLeft?(toPixelsAtElement(div,marginLeft,false)):0;var marginTop=Element.getStyle(div,"marginTop");marginTop=marginTop?(toPixelsAtElement(div,marginTop,true)):0;var marginRight=Element.getStyle(div,"marginRight");marginRight=marginRight?(toPixelsAtElement(div,marginRight,false)):0;var marginBottom=Element.getStyle(div,"marginBottom");marginBottom=marginBottom?(toPixelsAtElement(div,marginBottom,true)):0;div.setStyle({marginLeft:px(padding.left+marginLeft),marginTop:px(padding.top+marginTop),marginRight:px(padding.right+marginRight),marginBottom:px(padding.bottom+marginBottom)});if(windowsInternetExplorer&&effectiveBrowserVersion==7) +{updateListOfIE7FloatsFix(div);}}}}},strokeExtra:function(imageSize) +{if(imageSize===undefined) +{imageSize=this.mMaxImageSize;} +var imageRect=new IWRect(IWZeroPoint(),imageSize);return imageRect.paddingToRect(this.p_strokeRect(imageSize));}});var IWEmptyStroke=Class.create({initialize:function() +{},markupForImageStreamEntry:function(imageStreamEntry,imageSize) +{var rect=new IWRect(0,0,imageSize.width,imageSize.height);var markup='
';markup+=imageStreamEntry.thumbnailMarkupForRect(rect);markup+='
';return markup;},applyToElement:function(div) +{},strokeExtra:function() +{return new IWPadding(0,0,0,0);}});var kSFRFrameTopLeft=0;var kSFRFrameTop=1;var kSFRFrameTopRight=2;var kSFRFrameRight=3;var kSFRFrameBottomRight=4;var kSFRFrameBottom=5;var kSFRFrameBottomLeft=6;var kSFRFrameLeft=7;var kSFRFrameClip=0;var kSFRFrameStretchEvenly=1;var kSFRFrameStretchToFit=2;var IWPhotoFrame=Class.create({initialize:function(images,maskImages,tilingMode,assetScale,leftInset,topInset,rightInset,bottomInset,unscaledLeftWidth,unscaledTopHeight,unscaledRightWidth,unscaledBottomHeight,leftTileHeight,topTileWidth,rightTileHeight,bottomTileWidth,adornmentURL,adornmentPosition,adornmentSize,minimumAssetScale) +{this.mImages=images;this.mMaskImages=maskImages;this.mTilingMode=tilingMode;this.mLeftInset=leftInset;this.mTopInset=topInset;this.mRightInset=rightInset;this.mBottomInset=bottomInset;this.mUnscaledLeftWidth=unscaledLeftWidth;this.mUnscaledTopHeight=unscaledTopHeight;this.mUnscaledRightWidth=unscaledRightWidth;this.mUnscaledBottomHeight=unscaledBottomHeight;this.mLeftTileHeight=leftTileHeight;this.mTopTileWidth=topTileWidth;this.mRightTileHeight=rightTileHeight;this.mBottomTileWidth=bottomTileWidth;this.mAdornmentURL=adornmentURL;this.mAdornmentPosition=adornmentPosition;this.mAdornmentSize=adornmentSize;this.mMinimumAssetScale=minimumAssetScale;this.setAssetScale(assetScale);},setAssetScale:function(assetScale) +{assetScale=Math.min(assetScale,1.0);assetScale=Math.max(this.mMinimumAssetScale,assetScale);this.mAssetScale=assetScale;this.mLeftWidth=this.scaledValue(this.mUnscaledLeftWidth);this.mTopHeight=this.scaledValue(this.mUnscaledTopHeight);this.mRightWidth=this.scaledValue(this.mUnscaledRightWidth);this.mBottomHeight=this.scaledValue(this.mUnscaledBottomHeight);},scaledValue:function(valueToScale) +{return Math.ceil(valueToScale*this.mAssetScale);},markupForImageStreamEntry:function(imageStreamEntry,size) +{var oldAssetScale=this.mAssetScale;var maximumScale=this.maximumAssetScaleForImageSize(size);if((maximumScale=this.mMinimumAssetScale)) +{this.setAssetScale(maximumScale);} +var coverageRect=this.coverageRect(new IWRect(0,0,size.width,size.height));var imageRect=new IWRect(-coverageRect.origin.x,-coverageRect.origin.y,size.width,size.height);coverageRect=coverageRect.offsetToOrigin();var markup='
';markup+=imageStreamEntry.thumbnailMarkupForRect(imageRect);if(maximumScale>=this.mMinimumAssetScale) +{if(this.mImages!=null) +{markup+=this.p_buildFrame(this.mImages,coverageRect.size,2);} +if(this.mAdornmentURL!=null) +{markup+=this.p_adornmentMarkupForRect(imageRect,2);} +if(this.mMaskImages) +{}} +markup+='
';if(oldAssetScale!=this.mAssetScale)this.setAssetScale(oldAssetScale);return markup;},strokeExtra:function() +{var adornmentExtraTopMargin=0;if(this.mAdornmentURL) +{adornmentExtraTopMargin=Math.max(0,(this.scaledValue(this.mAdornmentSize.height)-this.mTopHeight)/2.0-this.mAdornmentPosition.y);} +return new IWPadding(this.mLeftWidth-this.scaledValue(this.mLeftInset),this.mTopHeight-this.scaledValue(this.mTopInset)+adornmentExtraTopMargin,this.mRightWidth-this.scaledValue(this.mRightInset),this.mBottomHeight-this.scaledValue(this.mBottomInset));},applyToElement:function(div) +{div=$(div);if(div!=null) +{if(div.parentNode) +{$(div.parentNode).ensureHasLayoutForIE();} +var markup='';var divRect=new IWRect(0,0,div.offsetWidth,div.offsetHeight);if((divRect.size.width>=(this.scaledValue(this.mLeftInset)+this.scaledValue(this.mRightInset)))&&(divRect.size.height>=(this.scaledValue(this.mTopInset)+this.scaledValue(this.mTopInset)))) +{if(this.mImages!=null) +{var coverageRect=this.coverageRect(divRect);var containerRect=new IWRect(coverageRect.origin.x,coverageRect.origin.y,0,0);markup+='
';markup+=this.p_buildFrame(this.mImages,coverageRect.size,(div.hasClassName("aboveStrokesAndFrames")?-1:"auto"));markup+='
';} +if(this.mAdornmentURL!=null) +{markup+=this.p_adornmentMarkupForRect(divRect);}} +div.insert(markup);if(!div.hasClassName("flowDefining")) +{if(div.style.position!='absolute') +{var frameExtra=this.strokeExtra();var marginLeft=Element.getStyle(div,"marginLeft");marginLeft=marginLeft?(toPixelsAtElement(div,marginLeft,false)):0;var marginTop=Element.getStyle(div,"marginTop");marginTop=marginTop?(toPixelsAtElement(div,marginTop,true)):0;var marginRight=Element.getStyle(div,"marginRight");marginRight=marginRight?(toPixelsAtElement(div,marginRight,false)):0;var marginBottom=Element.getStyle(div,"marginBottom");marginBottom=marginBottom?(toPixelsAtElement(div,marginBottom,true)):0;div.setStyle({marginLeft:px(frameExtra.left+marginLeft),marginTop:px(frameExtra.top+marginTop),marginRight:px(frameExtra.right+marginRight),marginBottom:px(frameExtra.bottom+marginBottom)});if(windowsInternetExplorer&&effectiveBrowserVersion==7) +{updateListOfIE7FloatsFix(div);}}}}},maximumAssetScaleForImageSize:function(in_imgSize) +{var maxScale=1;if((in_imgSize.width>this.mLeftInset+this.mRightInset)&&(in_imgSize.height>this.mTopInset+this.mBottomInset)) +{maxScale=1;} +else if((in_imgSize.width=in_imgSize.width)&&((this.mLeftInset+this.mRightInset)>0)) +{var leftChunkRatio=Math.floor(this.mLeftInset/(this.mLeftInset+this.mRightInset)*in_imgSize.width)/this.mLeftInset;var rightChunkRatio=Math.floor(this.mRightInset/(this.mLeftInset+this.mRightInset)*in_imgSize.width)/this.mRightInset;leftChunkRatio-=floatEpsilon;rightChunkRatio-=floatEpsilon;maxWidthScale=Math.max(leftChunkRatio,rightChunkRatio);if(in_imgSize.width<(Math.ceil(this.mLeftInset*maxWidthScale)+Math.ceil(this.mRightInset*maxWidthScale))) +{maxWidthScale=Math.min(leftChunkRatio,rightChunkRatio);} +if((maxWidthScale=in_imgSize.height)&&((this.mTopInset+this.mBottomInset)>0)) +{var topChunkRatio=Math.floor(this.mTopInset/(this.mTopInset+this.mBottomInset)*in_imgSize.height)/this.mTopInset;var bottomChunkRatio=Math.floor(this.mBottomInset/(this.mTopInset+this.mBottomInset)*in_imgSize.height)/this.mBottomInset;topChunkRatio-=floatEpsilon;bottomChunkRatio-=floatEpsilon;maxHeightScale=Math.max(topChunkRatio,bottomChunkRatio);if(in_imgSize.height<(Math.ceil(this.mTopInset*maxHeightScale)+Math.ceil(this.mBottomInset*maxHeightScale))) +{maxHeightScale=Math.min(topChunkRatio,bottomChunkRatio);} +if((maxHeightScale20) +{IWAssert(function(){return true},"Please remove this assert and the surrouding block.");iWLog("Too many frame image tiles are getting generated. Performance may be affected.");} +if(tilingMode==kSFRFrameStretchEvenly) +{offset=(end-start)/maxTiles;if(vertical) +{imageRect.size.height=offset;} +else +{imageRect.size.width=offset;}} +else if(tilingMode==kSFRFrameClip) +{markup+='
';imageRect.origin.x=0;imageRect.origin.y=0;} +for(var i=0;i-1,Gecko:navigator.userAgent.indexOf('Gecko')>-1&&navigator.userAgent.indexOf('KHTML')==-1,MobileSafari:!!navigator.userAgent.match(/Apple.*Mobile.*Safari/)},BrowserFeatures:{XPath:!!document.evaluate,ElementExtensions:!!window.HTMLElement,SpecificElementExtensions:document.createElement('div').__proto__&&document.createElement('div').__proto__!==document.createElement('form').__proto__},ScriptFragment:']*>([\\S\\s]*?)<\/script>',JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,emptyFunction:function(){},K:function(x){return x}};if(Prototype.Browser.MobileSafari) +Prototype.BrowserFeatures.SpecificElementExtensions=false;if(Prototype.Browser.WebKit) +Prototype.BrowserFeatures.XPath=false;var Class={create:function(){var parent=null,properties=$A(arguments);if(Object.isFunction(properties[0])) +parent=properties.shift();function klass(){this.initialize.apply(this,arguments);} +Object.extend(klass,Class.Methods);klass.superclass=parent;klass.subclasses=[];if(parent){var subclass=function(){};subclass.prototype=parent.prototype;klass.prototype=new subclass;parent.subclasses.push(klass);} +for(var i=0;i0){if(match=source.match(pattern)){result+=source.slice(0,match.index);result+=String.interpret(replacement(match));source=source.slice(match.index+match[0].length);}else{result+=source,source='';}} +return result;},sub:function(pattern,replacement,count){replacement=this.gsub.prepareReplacement(replacement);count=count===undefined?1:count;return this.gsub(pattern,function(match){if(--count<0)return match[0];return replacement(match);});},scan:function(pattern,iterator){this.gsub(pattern,iterator);return String(this);},truncate:function(length,truncation){length=length||30;truncation=truncation===undefined?'...':truncation;return this.length>length?this.slice(0,length-truncation.length)+truncation:String(this);},strip:function(){return this.replace(/^\s+/,'').replace(/\s+$/,'');},stripTags:function(){return this.replace(/<\/?[^>]+>/gi,'');},stripScripts:function(){return this.replace(new RegExp(Prototype.ScriptFragment,'img'),'');},extractScripts:function(){var matchAll=new RegExp(Prototype.ScriptFragment,'img');var matchOne=new RegExp(Prototype.ScriptFragment,'im');return(this.match(matchAll)||[]).map(function(scriptTag){return(scriptTag.match(matchOne)||['',''])[1];});},evalScripts:function(){return this.extractScripts().map(function(script){return eval(script)});},escapeHTML:function(){var self=arguments.callee;self.text.data=this;return self.div.innerHTML;},unescapeHTML:function(){var div=new Element('div');div.innerHTML=this.stripTags();return div.childNodes[0]?(div.childNodes.length>1?$A(div.childNodes).inject('',function(memo,node){return memo+node.nodeValue}):div.childNodes[0].nodeValue):'';},toQueryParams:function(separator){var match=this.strip().match(/([^?#]*)(#.*)?$/);if(!match)return{};return match[1].split(separator||'&').inject({},function(hash,pair){if((pair=pair.split('='))[0]){var key=decodeURIComponent(pair.shift());var value=pair.length>1?pair.join('='):pair[0];if(value!=undefined)value=decodeURIComponent(value);if(key in hash){if(!Object.isArray(hash[key]))hash[key]=[hash[key]];hash[key].push(value);} +else hash[key]=value;} +return hash;});},toArray:function(){return this.split('');},succ:function(){return this.slice(0,this.length-1)+ +String.fromCharCode(this.charCodeAt(this.length-1)+1);},times:function(count){return count<1?'':new Array(count+1).join(this);},camelize:function(){var parts=this.split('-'),len=parts.length;if(len==1)return parts[0];var camelized=this.charAt(0)=='-'?parts[0].charAt(0).toUpperCase()+parts[0].substring(1):parts[0];for(var i=1;i-1;},startsWith:function(pattern){return this.indexOf(pattern)===0;},endsWith:function(pattern){var d=this.length-pattern.length;return d>=0&&this.lastIndexOf(pattern)===d;},empty:function(){return this=='';},blank:function(){return/^\s*$/.test(this);},interpolate:function(object,pattern){return new Template(this,pattern).evaluate(object);}});if(Prototype.Browser.WebKit||Prototype.Browser.IE)Object.extend(String.prototype,{escapeHTML:function(){return this.replace(/&/g,'&').replace(//g,'>');},unescapeHTML:function(){return this.replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>');}});String.prototype.gsub.prepareReplacement=function(replacement){if(Object.isFunction(replacement))return replacement;var template=new Template(replacement);return function(match){return template.evaluate(match)};};String.prototype.parseQuery=String.prototype.toQueryParams;Object.extend(String.prototype.escapeHTML,{div:document.createElement('div'),text:document.createTextNode('')});with(String.prototype.escapeHTML)div.appendChild(text);var Template=Class.create({initialize:function(template,pattern){this.template=template.toString();this.pattern=pattern||Template.Pattern;},evaluate:function(object){if(Object.isFunction(object.toTemplateReplacements)) +object=object.toTemplateReplacements();return this.template.gsub(this.pattern,function(match){if(object==null)return'';var before=match[1]||'';if(before=='\\')return match[2];var ctx=object,expr=match[3];var pattern=/^([^.[]+|\[((?:.*?[^\\])?)\])(\.|\[|$)/,match=pattern.exec(expr);if(match==null)return before;while(match!=null){var comp=match[1].startsWith('[')?match[2].gsub('\\\\]',']'):match[1];ctx=ctx[comp];if(null==ctx||''==match[3])break;expr=expr.substring('['==match[3]?match[1].length:match[0].length);match=pattern.exec(expr);} +return before+String.interpret(ctx);}.bind(this));}});Template.Pattern=/(^|.|\r|\n)(#\{(.*?)\})/;var $break={};var Enumerable={each:function(iterator,context){var index=0;iterator=iterator.bind(context);try{this._each(function(value){iterator(value,index++);});}catch(e){if(e!=$break)throw e;} +return this;},eachSlice:function(number,iterator,context){iterator=iterator?iterator.bind(context):Prototype.K;var index=-number,slices=[],array=this.toArray();while((index+=number)=result) +result=value;});return result;},min:function(iterator,context){iterator=iterator?iterator.bind(context):Prototype.K;var result;this.each(function(value,index){value=iterator(value,index);if(result==undefined||valueb?1:0;}).pluck('value');},toArray:function(){return this.map();},zip:function(){var iterator=Prototype.K,args=$A(arguments);if(Object.isFunction(args.last())) +iterator=args.pop();var collections=[this].concat(args).map($A);return this.map(function(value,index){return iterator(collections.pluck(index));});},size:function(){return this.toArray().length;},inspect:function(){return'#';}};Object.extend(Enumerable,{map:Enumerable.collect,find:Enumerable.detect,select:Enumerable.findAll,filter:Enumerable.findAll,member:Enumerable.include,entries:Enumerable.toArray,every:Enumerable.all,some:Enumerable.any});function $A(iterable){if(!iterable)return[];if(iterable.toArray)return iterable.toArray();var length=iterable.length,results=new Array(length);while(length--)results[length]=iterable[length];return results;} +if(Prototype.Browser.WebKit){function $A(iterable){if(!iterable)return[];if(!(Object.isFunction(iterable)&&iterable=='[object NodeList]')&&iterable.toArray)return iterable.toArray();var length=iterable.length,results=new Array(length);while(length--)results[length]=iterable[length];return results;}} +Array.from=$A;Object.extend(Array.prototype,Enumerable);if(!Array.prototype._reverse)Array.prototype._reverse=Array.prototype.reverse;Object.extend(Array.prototype,{_each:function(iterator){for(var i=0,length=this.length;i1?this:this[0];},uniq:function(sorted){return this.inject([],function(array,value,index){if(0==index||(sorted?array.last()!=value:!array.include(value))) +array.push(value);return array;});},intersect:function(array){return this.uniq().findAll(function(item){return array.detect(function(value){return item===value});});},clone:function(){return[].concat(this);},size:function(){return this.length;},inspect:function(){return'['+this.map(Object.inspect).join(', ')+']';},toJSON:function(){var results=[];this.each(function(object){var value=Object.toJSON(object);if(value!==undefined)results.push(value);});return'['+results.join(', ')+']';}});if(Object.isFunction(Array.prototype.forEach)) +Array.prototype._each=Array.prototype.forEach;if(!Array.prototype.indexOf)Array.prototype.indexOf=function(item,i){i||(i=0);var length=this.length;if(i<0)i=length+i;for(;i1;}()){function each(iterator){var cache=[];for(var key in this._object){var value=this._object[key];if(cache.include(key))continue;cache.push(key);var pair=[key,value];pair.key=key;pair.value=value;iterator(pair);}}}else{function each(iterator){for(var key in this._object){var value=this._object[key],pair=[key,value];pair.key=key;pair.value=value;iterator(pair);}}} +function toQueryPair(key,value){if(Object.isUndefined(value))return key;return key+'='+encodeURIComponent(String.interpret(value));} +return{initialize:function(object){this._object=Object.isHash(object)?object.toObject():Object.clone(object);},_each:each,set:function(key,value){return this._object[key]=value;},get:function(key){return this._object[key];},unset:function(key){var value=this._object[key];delete this._object[key];return value;},toObject:function(){return Object.clone(this._object);},keys:function(){return this.pluck('key');},values:function(){return this.pluck('value');},index:function(value){var match=this.detect(function(pair){return pair.value===value;});return match&&match.key;},merge:function(object){return this.clone().update(object);},update:function(object){return new Hash(object).inject(this,function(result,pair){result.set(pair.key,pair.value);return result;});},toQueryString:function(){return this.map(function(pair){var key=encodeURIComponent(pair.key),values=pair.value;if(values&&typeof values=='object'){if(Object.isArray(values)) +return values.map(toQueryPair.curry(key)).join('&');} +return toQueryPair(key,values);}).join('&');},inspect:function(){return'#';},toJSON:function(){return Object.toJSON(this.toObject());},clone:function(){return new Hash(this);}}})());Hash.prototype.toTemplateReplacements=Hash.prototype.toObject;Hash.from=$H;var ObjectRange=Class.create(Enumerable,{initialize:function(start,end,exclusive){this.start=start;this.end=end;this.exclusive=exclusive;},_each:function(iterator){var value=this.start;while(this.include(value)){iterator(value);value=value.succ();}},include:function(value){if(value1&&!((readyState==4)&&this._complete)) +this.respondToReadyState(this.transport.readyState);},setRequestHeaders:function(){var headers={'X-Requested-With':'XMLHttpRequest','X-Prototype-Version':Prototype.Version,'Accept':'text/javascript, text/html, application/xml, text/xml, */*'};if(this.method=='post'){headers['Content-type']=this.options.contentType+ +(this.options.encoding?'; charset='+this.options.encoding:'');if(this.transport.overrideMimeType&&(navigator.userAgent.match(/Gecko\/(\d{4})/)||[0,2005])[1]<2005) +headers['Connection']='close';} +if(typeof this.options.requestHeaders=='object'){var extras=this.options.requestHeaders;if(Object.isFunction(extras.push)) +for(var i=0,length=extras.length;i=200&&status<300);},getStatus:function(){try{return this.transport.status||0;}catch(e){return 0}},respondToReadyState:function(readyState){var state=Ajax.Request.Events[readyState],response=new Ajax.Response(this);if(state=='Complete'){try{this._complete=true;(this.options['on'+response.status]||this.options['on'+(this.success()?'Success':'Failure')]||Prototype.emptyFunction)(response,response.headerJSON);}catch(e){this.dispatchException(e);} +var contentType=response.getHeader('Content-type');if(this.options.evalJS=='force'||(this.options.evalJS&&contentType&&contentType.match(/^\s*(text|application)\/(x-)?(java|ecma)script(;.*)?\s*$/i))) +this.evalResponse();} +try{(this.options['on'+state]||Prototype.emptyFunction)(response,response.headerJSON);Ajax.Responders.dispatch('on'+state,this,response,response.headerJSON);}catch(e){this.dispatchException(e);} +if(state=='Complete'){this.transport.onreadystatechange=Prototype.emptyFunction;}},getHeader:function(name){try{return this.transport.getResponseHeader(name);}catch(e){return null}},evalResponse:function(){try{return eval((this.transport.responseText||'').unfilterJSON());}catch(e){this.dispatchException(e);}},dispatchException:function(exception){(this.options.onException||Prototype.emptyFunction)(this,exception);Ajax.Responders.dispatch('onException',this,exception);}});Ajax.Request.Events=['Uninitialized','Loading','Loaded','Interactive','Complete'];Ajax.Response=Class.create({initialize:function(request){this.request=request;var transport=this.transport=request.transport,readyState=this.readyState=transport.readyState;if((readyState>2&&!Prototype.Browser.IE)||readyState==4){this.status=this.getStatus();this.statusText=this.getStatusText();this.responseText=String.interpret(transport.responseText);this.headerJSON=this._getHeaderJSON();} +if(readyState==4){var xml=transport.responseXML;this.responseXML=xml===undefined?null:xml;this.responseJSON=this._getResponseJSON();}},status:0,statusText:'',getStatus:Ajax.Request.prototype.getStatus,getStatusText:function(){try{return this.transport.statusText||'';}catch(e){return''}},getHeader:Ajax.Request.prototype.getHeader,getAllHeaders:function(){try{return this.getAllResponseHeaders();}catch(e){return null}},getResponseHeader:function(name){return this.transport.getResponseHeader(name);},getAllResponseHeaders:function(){return this.transport.getAllResponseHeaders();},_getHeaderJSON:function(){var json=this.getHeader('X-JSON');if(!json)return null;json=decodeURIComponent(escape(json));try{return json.evalJSON(this.request.options.sanitizeJSON);}catch(e){this.request.dispatchException(e);}},_getResponseJSON:function(){var options=this.request.options;if(!options.evalJSON||(options.evalJSON!='force'&&!(this.getHeader('Content-type')||'').include('application/json'))) +return null;try{return this.transport.responseText.evalJSON(options.sanitizeJSON);}catch(e){this.request.dispatchException(e);}}});Ajax.Updater=Class.create(Ajax.Request,{initialize:function($super,container,url,options){this.container={success:(container.success||container),failure:(container.failure||(container.success?null:container))};options=options||{};var onComplete=options.onComplete;options.onComplete=(function(response,param){this.updateContent(response.responseText);if(Object.isFunction(onComplete))onComplete(response,param);}).bind(this);$super(url,options);},updateContent:function(responseText){var receiver=this.container[this.success()?'success':'failure'],options=this.options;if(!options.evalScripts)responseText=responseText.stripScripts();if(receiver=$(receiver)){if(options.insertion){if(Object.isString(options.insertion)){var insertion={};insertion[options.insertion]=responseText;receiver.insert(insertion);} +else options.insertion(receiver,responseText);} +else receiver.update(responseText);} +if(this.success()){if(this.onComplete)this.onComplete.bind(this).defer();}}});Ajax.PeriodicalUpdater=Class.create(Ajax.Base,{initialize:function($super,container,url,options){$super(options);this.onComplete=this.options.onComplete;this.frequency=(this.options.frequency||2);this.decay=(this.options.decay||1);this.updater={};this.container=container;this.url=url;this.start();},start:function(){this.options.onComplete=this.updateComplete.bind(this);this.onTimerEvent();},stop:function(){this.updater.options.onComplete=undefined;clearTimeout(this.timer);(this.onComplete||Prototype.emptyFunction).apply(this,arguments);},updateComplete:function(response){if(this.options.decay){this.decay=(response.responseText==this.lastText?this.decay*this.options.decay:1);this.lastText=response.responseText;} +this.timer=this.onTimerEvent.bind(this).delay(this.decay*this.frequency);},onTimerEvent:function(){this.updater=new Ajax.Updater(this.container,this.url,this.options);}});function $(element){if(arguments.length>1){for(var i=0,elements=[],length=arguments.length;i';delete attributes.name;return Element.writeAttribute(document.createElement(tagName),attributes);} +if(!cache[tagName])cache[tagName]=Element.extend(document.createElement(tagName));return Element.writeAttribute(cache[tagName].cloneNode(false),attributes);};Object.extend(this.Element,element||{});}).call(window);Element.cache={};Element.Methods={visible:function(element){return $(element).style.display!='none';},toggle:function(element){element=$(element);Element[Element.visible(element)?'hide':'show'](element);return element;},hide:function(element){$(element).style.display='none';return element;},show:function(element){$(element).style.display='';return element;},remove:function(element){element=$(element);element.parentNode.removeChild(element);return element;},update:function(element,content){element=$(element);if(content&&content.toElement)content=content.toElement();if(Object.isElement(content))return element.update().insert(content);content=Object.toHTML(content);element.innerHTML=content.stripScripts();content.evalScripts.bind(content).defer();return element;},replace:function(element,content){element=$(element);if(content&&content.toElement)content=content.toElement();else if(!Object.isElement(content)){content=Object.toHTML(content);var range=element.ownerDocument.createRange();range.selectNode(element);content.evalScripts.bind(content).defer();content=range.createContextualFragment(content.stripScripts());} +element.parentNode.replaceChild(content,element);return element;},insert:function(element,insertions){element=$(element);if(Object.isString(insertions)||Object.isNumber(insertions)||Object.isElement(insertions)||(insertions&&(insertions.toElement||insertions.toHTML))) +insertions={bottom:insertions};var content,t,range;for(position in insertions){content=insertions[position];position=position.toLowerCase();t=Element._insertionTranslations[position];if(content&&content.toElement)content=content.toElement();if(Object.isElement(content)){t.insert(element,content);continue;} +content=Object.toHTML(content);range=element.ownerDocument.createRange();t.initializeRange(element,range);t.insert(element,range.createContextualFragment(content.stripScripts()));content.evalScripts.bind(content).defer();} +return element;},wrap:function(element,wrapper,attributes){element=$(element);if(Object.isElement(wrapper)) +$(wrapper).writeAttribute(attributes||{});else if(Object.isString(wrapper))wrapper=new Element(wrapper,attributes);else wrapper=new Element('div',wrapper);if(element.parentNode) +element.parentNode.replaceChild(wrapper,element);wrapper.appendChild(element);return wrapper;},inspect:function(element){element=$(element);var result='<'+element.tagName.toLowerCase();$H({'id':'id','className':'class'}).each(function(pair){var property=pair.first(),attribute=pair.last();var value=(element[property]||'').toString();if(value)result+=' '+attribute+'='+value.inspect(true);});return result+'>';},recursivelyCollect:function(element,property){element=$(element);var elements=[];while(element=element[property]) +if(element.nodeType==1) +elements.push(Element.extend(element));return elements;},ancestors:function(element){return $(element).recursivelyCollect('parentNode');},descendants:function(element){return $A($(element).getElementsByTagName('*')).each(Element.extend);},firstDescendant:function(element){element=$(element).firstChild;while(element&&element.nodeType!=1)element=element.nextSibling;return $(element);},immediateDescendants:function(element){if(!(element=$(element).firstChild))return[];while(element&&element.nodeType!=1)element=element.nextSibling;if(element)return[element].concat($(element).nextSiblings());return[];},previousSiblings:function(element){return $(element).recursivelyCollect('previousSibling');},nextSiblings:function(element){return $(element).recursivelyCollect('nextSibling');},siblings:function(element){element=$(element);return element.previousSiblings().reverse().concat(element.nextSiblings());},match:function(element,selector){if(Object.isString(selector)) +selector=new Selector(selector);return selector.match($(element));},up:function(element,expression,index){element=$(element);if(arguments.length==1)return $(element.parentNode);var ancestors=element.ancestors();return expression?Selector.findElement(ancestors,expression,index):ancestors[index||0];},down:function(element,expression,index){element=$(element);if(arguments.length==1)return element.firstDescendant();var descendants=element.descendants();return expression?Selector.findElement(descendants,expression,index):descendants[index||0];},previous:function(element,expression,index){element=$(element);if(arguments.length==1)return $(Selector.handlers.previousElementSibling(element));var previousSiblings=element.previousSiblings();return expression?Selector.findElement(previousSiblings,expression,index):previousSiblings[index||0];},next:function(element,expression,index){element=$(element);if(arguments.length==1)return $(Selector.handlers.nextElementSibling(element));var nextSiblings=element.nextSiblings();return expression?Selector.findElement(nextSiblings,expression,index):nextSiblings[index||0];},select:function(){var args=$A(arguments),element=$(args.shift());return Selector.findChildElements(element,args);},adjacent:function(){var args=$A(arguments),element=$(args.shift());return Selector.findChildElements(element.parentNode,args).without(element);},identify:function(element){element=$(element);var id=element.readAttribute('id'),self=arguments.callee;if(id)return id;do{id='anonymous_element_'+self.counter++}while($(id));element.writeAttribute('id',id);return id;},readAttribute:function(element,name){element=$(element);if(Prototype.Browser.IE){var t=Element._attributeTranslations.read;if(t.values[name])return t.values[name](element,name);if(t.names[name])name=t.names[name];if(name.include(':')){return(!element.attributes||!element.attributes[name])?null:element.attributes[name].value;}} +return element.getAttribute(name);},writeAttribute:function(element,name,value){element=$(element);var attributes={},t=Element._attributeTranslations.write;if(typeof name=='object')attributes=name;else attributes[name]=value===undefined?true:value;for(var attr in attributes){var name=t.names[attr]||attr,value=attributes[attr];if(t.values[attr])name=t.values[attr](element,value);if(value===false||value===null) +element.removeAttribute(name);else if(value===true) +element.setAttribute(name,name);else element.setAttribute(name,value);} +return element;},getHeight:function(element){return $(element).getDimensions().height;},getWidth:function(element){return $(element).getDimensions().width;},classNames:function(element){return new Element.ClassNames(element);},hasClassName:function(element,className){if(!(element=$(element)))return;var elementClassName=element.className;return(elementClassName.length>0&&(elementClassName==className||new RegExp("(^|\\s)"+className+"(\\s|$)").test(elementClassName)));},addClassName:function(element,className){if(!(element=$(element)))return;if(!element.hasClassName(className)) +element.className+=(element.className?' ':'')+className;return element;},removeClassName:function(element,className){if(!(element=$(element)))return;element.className=element.className.replace(new RegExp("(^|\\s+)"+className+"(\\s+|$)"),' ').strip();return element;},toggleClassName:function(element,className){if(!(element=$(element)))return;return element[element.hasClassName(className)?'removeClassName':'addClassName'](className);},cleanWhitespace:function(element){element=$(element);var node=element.firstChild;while(node){var nextNode=node.nextSibling;if(node.nodeType==3&&!/\S/.test(node.nodeValue)) +element.removeChild(node);node=nextNode;} +return element;},empty:function(element){return $(element).innerHTML.blank();},descendantOf:function(element,ancestor){element=$(element),ancestor=$(ancestor);if(element.compareDocumentPosition) +return(element.compareDocumentPosition(ancestor)&8)===8;if(element.sourceIndex&&!Prototype.Browser.Opera){var e=element.sourceIndex,a=ancestor.sourceIndex,nextAncestor=ancestor.nextSibling;if(!nextAncestor){do{ancestor=ancestor.parentNode;} +while(!(nextAncestor=ancestor.nextSibling)&&ancestor.parentNode);} +if(nextAncestor)return(e>a&&e','',1],TBODY:['','
',2],TR:['','
',3],TD:['
','
',4],SELECT:['',1]}};(function(){this.bottom.initializeRange=this.top.initializeRange;Object.extend(this.tags,{THEAD:this.tags.TBODY,TFOOT:this.tags.TBODY,TH:this.tags.TD});}).call(Element._insertionTranslations);Element.Methods.Simulated={hasAttribute:function(element,attribute){attribute=Element._attributeTranslations.has[attribute]||attribute;var node=$(element).getAttributeNode(attribute);return node&&node.specified;}};Element.Methods.ByTag={};Object.extend(Element,Element.Methods);if(!Prototype.BrowserFeatures.ElementExtensions&&document.createElement('div').__proto__){window.HTMLElement={};window.HTMLElement.prototype=document.createElement('div').__proto__;Prototype.BrowserFeatures.ElementExtensions=true;} +Element.extend=(function(){if(Prototype.BrowserFeatures.SpecificElementExtensions) +return Prototype.K;var Methods={},ByTag=Element.Methods.ByTag;var extend=Object.extend(function(element){if(!element||element._extendedByPrototype||element.nodeType!=1||element==window)return element;var methods=Object.clone(Methods),tagName=element.tagName,property,value;if(ByTag[tagName])Object.extend(methods,ByTag[tagName]);for(property in methods){value=methods[property];if(Object.isFunction(value)&&!(property in element)) +element[property]=value.methodize();} +element._extendedByPrototype=Prototype.emptyFunction;return element;},{refresh:function(){if(!Prototype.BrowserFeatures.ElementExtensions){Object.extend(Methods,Element.Methods);Object.extend(Methods,Element.Methods.Simulated);}}});extend.refresh();return extend;})();Element.hasAttribute=function(element,attribute){if(element.hasAttribute)return element.hasAttribute(attribute);return Element.Methods.Simulated.hasAttribute(element,attribute);};Element.addMethods=function(methods){var F=Prototype.BrowserFeatures,T=Element.Methods.ByTag;if(!methods){Object.extend(Form,Form.Methods);Object.extend(Form.Element,Form.Element.Methods);Object.extend(Element.Methods.ByTag,{"FORM":Object.clone(Form.Methods),"INPUT":Object.clone(Form.Element.Methods),"SELECT":Object.clone(Form.Element.Methods),"TEXTAREA":Object.clone(Form.Element.Methods)});} +if(arguments.length==2){var tagName=methods;methods=arguments[1];} +if(!tagName)Object.extend(Element.Methods,methods||{});else{if(Object.isArray(tagName))tagName.each(extend);else extend(tagName);} +function extend(tagName){tagName=tagName.toUpperCase();if(!Element.Methods.ByTag[tagName]) +Element.Methods.ByTag[tagName]={};Object.extend(Element.Methods.ByTag[tagName],methods);} +function copy(methods,destination,onlyIfAbsent){onlyIfAbsent=onlyIfAbsent||false;for(var property in methods){var value=methods[property];if(!Object.isFunction(value))continue;if(!onlyIfAbsent||!(property in destination)) +destination[property]=value.methodize();}} +function findDOMClass(tagName){var klass;var trans={"OPTGROUP":"OptGroup","TEXTAREA":"TextArea","P":"Paragraph","FIELDSET":"FieldSet","UL":"UList","OL":"OList","DL":"DList","DIR":"Directory","H1":"Heading","H2":"Heading","H3":"Heading","H4":"Heading","H5":"Heading","H6":"Heading","Q":"Quote","INS":"Mod","DEL":"Mod","A":"Anchor","IMG":"Image","CAPTION":"TableCaption","COL":"TableCol","COLGROUP":"TableCol","THEAD":"TableSection","TFOOT":"TableSection","TBODY":"TableSection","TR":"TableRow","TH":"TableCell","TD":"TableCell","FRAMESET":"FrameSet","IFRAME":"IFrame"};if(trans[tagName])klass='HTML'+trans[tagName]+'Element';if(window[klass])return window[klass];klass='HTML'+tagName+'Element';if(window[klass])return window[klass];klass='HTML'+tagName.capitalize()+'Element';if(window[klass])return window[klass];window[klass]={};window[klass].prototype=document.createElement(tagName).__proto__;return window[klass];} +if(F.ElementExtensions){copy(Element.Methods,HTMLElement.prototype);copy(Element.Methods.Simulated,HTMLElement.prototype,true);} +if(F.SpecificElementExtensions){for(var tag in Element.Methods.ByTag){var klass=findDOMClass(tag);if(Object.isUndefined(klass))continue;copy(T[tag],klass.prototype);}} +Object.extend(Element,Element.Methods);delete Element.ByTag;if(Element.extend.refresh)Element.extend.refresh();Element.cache={};};document.viewport={getDimensions:function(){var dimensions={};$w('width height').each(function(d){var D=d.capitalize();dimensions[d]=self['inner'+D]||(document.documentElement['client'+D]||document.body['client'+D]);});return dimensions;},getWidth:function(){return this.getDimensions().width;},getHeight:function(){return this.getDimensions().height;},getScrollOffsets:function(){return Element._returnOffset(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft,window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop);}};var Selector=Class.create({initialize:function(expression){this.expression=expression.strip();this.compileMatcher();},compileMatcher:function(){if(Prototype.BrowserFeatures.XPath&&!(/(\[[\w-]*?:|:checked)/).test(this.expression)) +return this.compileXPathMatcher();var e=this.expression,ps=Selector.patterns,h=Selector.handlers,c=Selector.criteria,le,p,m;if(Selector._cache[e]){this.matcher=Selector._cache[e];return;} +this.matcher=["this.matcher = function(root) {","var r = root, h = Selector.handlers, c = false, n;"];while(e&&le!=e&&(/\S/).test(e)){le=e;for(var i in ps){p=ps[i];if(m=e.match(p)){this.matcher.push(Object.isFunction(c[i])?c[i](m):new Template(c[i]).evaluate(m));e=e.replace(m[0],'');break;}}} +this.matcher.push("return h.unique(n);\n}");eval(this.matcher.join('\n'));Selector._cache[this.expression]=this.matcher;},compileXPathMatcher:function(){var e=this.expression,ps=Selector.patterns,x=Selector.xpath,le,m;if(Selector._cache[e]){this.xpath=Selector._cache[e];return;} +this.matcher=['.//*'];while(e&&le!=e&&(/\S/).test(e)){le=e;for(var i in ps){if(m=e.match(ps[i])){this.matcher.push(Object.isFunction(x[i])?x[i](m):new Template(x[i]).evaluate(m));e=e.replace(m[0],'');break;}}} +this.xpath=this.matcher.join('');Selector._cache[this.expression]=this.xpath;},findElements:function(root){root=root||document;if(this.xpath)return document._getElementsByXPath(this.xpath,root);return this.matcher(root);},match:function(element){this.tokens=[];var e=this.expression,ps=Selector.patterns,as=Selector.assertions;var le,p,m;while(e&&le!==e&&(/\S/).test(e)){le=e;for(var i in ps){p=ps[i];if(m=e.match(p)){if(as[i]){this.tokens.push([i,Object.clone(m)]);e=e.replace(m[0],'');}else{return this.findElements(document).include(element);}}}} +var match=true,name,matches;for(var i=0,token;token=this.tokens[i];i++){name=token[0],matches=token[1];if(!Selector.assertions[name](element,matches)){match=false;break;}} +return match;},toString:function(){return this.expression;},inspect:function(){return"#";}});Object.extend(Selector,{_cache:{},xpath:{descendant:"//*",child:"/*",adjacent:"/following-sibling::*[1]",laterSibling:'/following-sibling::*',tagName:function(m){if(m[1]=='*')return'';return"[local-name()='"+m[1].toLowerCase()+"' or local-name()='"+m[1].toUpperCase()+"']";},className:"[contains(concat(' ', @class, ' '), ' #{1} ')]",id:"[@id='#{1}']",attrPresence:"[@#{1}]",attr:function(m){m[3]=m[5]||m[6];return new Template(Selector.xpath.operators[m[2]]).evaluate(m);},pseudo:function(m){var h=Selector.xpath.pseudos[m[1]];if(!h)return'';if(Object.isFunction(h))return h(m);return new Template(Selector.xpath.pseudos[m[1]]).evaluate(m);},operators:{'=':"[@#{1}='#{3}']",'!=':"[@#{1}!='#{3}']",'^=':"[starts-with(@#{1}, '#{3}')]",'$=':"[substring(@#{1}, (string-length(@#{1}) - string-length('#{3}') + 1))='#{3}']",'*=':"[contains(@#{1}, '#{3}')]",'~=':"[contains(concat(' ', @#{1}, ' '), ' #{3} ')]",'|=':"[contains(concat('-', @#{1}, '-'), '-#{3}-')]"},pseudos:{'first-child':'[not(preceding-sibling::*)]','last-child':'[not(following-sibling::*)]','only-child':'[not(preceding-sibling::* or following-sibling::*)]','empty':"[count(*) = 0 and (count(text()) = 0 or translate(text(), ' \t\r\n', '') = '')]",'checked':"[@checked]",'disabled':"[@disabled]",'enabled':"[not(@disabled)]",'not':function(m){var e=m[6],p=Selector.patterns,x=Selector.xpath,le,m,v;var exclusion=[];while(e&&le!=e&&(/\S/).test(e)){le=e;for(var i in p){if(m=e.match(p[i])){v=Object.isFunction(x[i])?x[i](m):new Template(x[i]).evaluate(m);exclusion.push("("+v.substring(1,v.length-1)+")");e=e.replace(m[0],'');break;}}} +return"[not("+exclusion.join(" and ")+")]";},'nth-child':function(m){return Selector.xpath.pseudos.nth("(count(./preceding-sibling::*) + 1) ",m);},'nth-last-child':function(m){return Selector.xpath.pseudos.nth("(count(./following-sibling::*) + 1) ",m);},'nth-of-type':function(m){return Selector.xpath.pseudos.nth("position() ",m);},'nth-last-of-type':function(m){return Selector.xpath.pseudos.nth("(last() + 1 - position()) ",m);},'first-of-type':function(m){m[6]="1";return Selector.xpath.pseudos['nth-of-type'](m);},'last-of-type':function(m){m[6]="1";return Selector.xpath.pseudos['nth-last-of-type'](m);},'only-of-type':function(m){var p=Selector.xpath.pseudos;return p['first-of-type'](m)+p['last-of-type'](m);},nth:function(fragment,m){var mm,formula=m[6],predicate;if(formula=='even')formula='2n+0';if(formula=='odd')formula='2n+1';if(mm=formula.match(/^(\d+)$/)) +return'['+fragment+"= "+mm[1]+']';if(mm=formula.match(/^(-?\d*)?n(([+-])(\d+))?/)){if(mm[1]=="-")mm[1]=-1;var a=mm[1]?Number(mm[1]):1;var b=mm[2]?Number(mm[2]):0;predicate="[((#{fragment} - #{b}) mod #{a} = 0) and "+"((#{fragment} - #{b}) div #{a} >= 0)]";return new Template(predicate).evaluate({fragment:fragment,a:a,b:b});}}}},criteria:{tagName:'n = h.tagName(n, r, "#{1}", c); c = false;',className:'n = h.className(n, r, "#{1}", c); c = false;',id:'n = h.id(n, r, "#{1}", c); c = false;',attrPresence:'n = h.attrPresence(n, r, "#{1}"); c = false;',attr:function(m){m[3]=(m[5]||m[6]);return new Template('n = h.attr(n, r, "#{1}", "#{3}", "#{2}"); c = false;').evaluate(m);},pseudo:function(m){if(m[6])m[6]=m[6].replace(/"/g,'\\"');return new Template('n = h.pseudo(n, "#{1}", "#{6}", r, c); c = false;').evaluate(m);},descendant:'c = "descendant";',child:'c = "child";',adjacent:'c = "adjacent";',laterSibling:'c = "laterSibling";'},patterns:{laterSibling:/^\s*~\s*/,child:/^\s*>\s*/,adjacent:/^\s*\+\s*/,descendant:/^\s/,tagName:/^\s*(\*|[\w\-]+)(\b|$)?/,id:/^#([\w\-\*]+)(\b|$)/,className:/^\.([\w\-\*]+)(\b|$)/,pseudo:/^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis)abled|not)(\((.*?)\))?(\b|$|(?=\s)|(?=:))/,attrPresence:/^\[([\w]+)\]/,attr:/\[((?:[\w-]*:)?[\w-]+)\s*(?:([!^$*~|]?=)\s*((['"])([^\4]*?)\4|([^'"][^\]]*?)))?\]/},assertions:{tagName:function(element,matches){return matches[1].toUpperCase()==element.tagName.toUpperCase();},className:function(element,matches){return Element.hasClassName(element,matches[1]);},id:function(element,matches){return element.id===matches[1];},attrPresence:function(element,matches){return Element.hasAttribute(element,matches[1]);},attr:function(element,matches){var nodeValue=Element.readAttribute(element,matches[1]);return Selector.operators[matches[2]](nodeValue,matches[3]);}},handlers:{concat:function(a,b){for(var i=0,node;node=b[i];i++) +a.push(node);return a;},mark:function(nodes){for(var i=0,node;node=nodes[i];i++) +node._counted=true;return nodes;},unmark:function(nodes){for(var i=0,node;node=nodes[i];i++) +node._counted=undefined;return nodes;},index:function(parentNode,reverse,ofType){parentNode._counted=true;if(reverse){for(var nodes=parentNode.childNodes,i=nodes.length-1,j=1;i>=0;i--){var node=nodes[i];if(node.nodeType==1&&(!ofType||node._counted))node.nodeIndex=j++;}}else{for(var i=0,j=1,nodes=parentNode.childNodes;node=nodes[i];i++) +if(node.nodeType==1&&(!ofType||node._counted))node.nodeIndex=j++;}},unique:function(nodes){if(nodes.length==0)return nodes;var results=[],n;for(var i=0,l=nodes.length;i0?[b]:[];return $R(1,total).inject([],function(memo,i){if(0==(i-b)%a&&(i-b)/a>=0)memo.push(i);return memo;});},nth:function(nodes,formula,root,reverse,ofType){if(nodes.length==0)return[];if(formula=='even')formula='2n+0';if(formula=='odd')formula='2n+1';var h=Selector.handlers,results=[],indexed=[],m;h.mark(nodes);for(var i=0,node;node=nodes[i];i++){if(!node.parentNode._counted){h.index(node.parentNode,reverse,ofType);indexed.push(node.parentNode);}} +if(formula.match(/^\d+$/)){formula=Number(formula);for(var i=0,node;node=nodes[i];i++) +if(node.nodeIndex==formula)results.push(node);}else if(m=formula.match(/^(-?\d*)?n(([+-])(\d+))?/)){if(m[1]=="-")m[1]=-1;var a=m[1]?Number(m[1]):1;var b=m[2]?Number(m[2]):0;var indices=Selector.pseudos.getIndices(a,b,nodes.length);for(var i=0,node,l=indices.length;node=nodes[i];i++){for(var j=0;j+()\s-]+|\*|\[.*?\])+)\s*(,|$)/,function(m){expressions.push(m[1].strip());});var results=[],h=Selector.handlers;for(var i=0,l=expressions.length,selector;i1)?h.unique(results):results;}});function $$(){return Selector.findChildElements(document,$A(arguments));} +var Form={reset:function(form){$(form).reset();return form;},serializeElements:function(elements,options){if(typeof options!='object')options={hash:!!options};else if(options.hash===undefined)options.hash=true;var key,value,submitted=false,submit=options.submit;var data=elements.inject({},function(result,element){if(!element.disabled&&element.name){key=element.name;value=$(element).getValue();if(value!=null&&(element.type!='submit'||(!submitted&&submit!==false&&(!submit||key==submit)&&(submitted=true)))){if(key in result){if(!Object.isArray(result[key]))result[key]=[result[key]];result[key].push(value);} +else result[key]=value;}} +return result;});return options.hash?data:Object.toQueryString(data);}};Form.Methods={serialize:function(form,options){return Form.serializeElements(Form.getElements(form),options);},getElements:function(form){return $A($(form).getElementsByTagName('*')).inject([],function(elements,child){if(Form.Element.Serializers[child.tagName.toLowerCase()]) +elements.push(Element.extend(child));return elements;});},getInputs:function(form,typeName,name){form=$(form);var inputs=form.getElementsByTagName('input');if(!typeName&&!name)return $A(inputs).map(Element.extend);for(var i=0,matchingInputs=[],length=inputs.length;i=0;}).sortBy(function(element){return element.tabIndex}).first();return firstByIndex?firstByIndex:elements.find(function(element){return['input','select','textarea'].include(element.tagName.toLowerCase());});},focusFirstElement:function(form){form=$(form);form.findFirstElement().activate();return form;},request:function(form,options){form=$(form),options=Object.clone(options||{});var params=options.parameters,action=form.readAttribute('action')||'';if(action.blank())action=window.location.href;options.parameters=form.serialize(true);if(params){if(Object.isString(params))params=params.toQueryParams();Object.extend(options.parameters,params);} +if(form.hasAttribute('method')&&!options.method) +options.method=form.method;return new Ajax.Request(action,options);}};Form.Element={focus:function(element){$(element).focus();return element;},select:function(element){$(element).select();return element;}};Form.Element.Methods={serialize:function(element){element=$(element);if(!element.disabled&&element.name){var value=element.getValue();if(value!=undefined){var pair={};pair[element.name]=value;return Object.toQueryString(pair);}} +return'';},getValue:function(element){element=$(element);var method=element.tagName.toLowerCase();return Form.Element.Serializers[method](element);},setValue:function(element,value){element=$(element);var method=element.tagName.toLowerCase();Form.Element.Serializers[method](element,value);return element;},clear:function(element){$(element).value='';return element;},present:function(element){return $(element).value!='';},activate:function(element){element=$(element);try{element.focus();if(element.select&&(element.tagName.toLowerCase()!='input'||!['button','reset','submit'].include(element.type))) +element.select();}catch(e){} +return element;},disable:function(element){element=$(element);element.blur();element.disabled=true;return element;},enable:function(element){element=$(element);element.disabled=false;return element;}};var Field=Form.Element;var $F=Form.Element.Methods.getValue;Form.Element.Serializers={input:function(element,value){switch(element.type.toLowerCase()){case'checkbox':case'radio':return Form.Element.Serializers.inputSelector(element,value);default:return Form.Element.Serializers.textarea(element,value);}},inputSelector:function(element,value){if(value===undefined)return element.checked?element.value:null;else element.checked=!!value;},textarea:function(element,value){if(value===undefined)return element.value;else element.value=value;},select:function(element,index){if(index===undefined) +return this[element.type=='select-one'?'selectOne':'selectMany'](element);else{var opt,value,single=!Object.isArray(index);for(var i=0,length=element.length;i=0?this.optionValue(element.options[index]):null;},selectMany:function(element){var values,length=element.length;if(!length)return null;for(var i=0,values=[];i<\/script>");$("__onDOMContentLoaded").onreadystatechange=function(){if(this.readyState=="complete"){this.onreadystatechange=null;fireContentLoadedEvent();}};}})();Hash.toQueryString=Object.toQueryString;var Toggle={display:Element.toggle};Element.Methods.childOf=Element.Methods.descendantOf;var Insertion={Before:function(element,content){return Element.insert(element,{before:content});},Top:function(element,content){return Element.insert(element,{top:content});},Bottom:function(element,content){return Element.insert(element,{bottom:content});},After:function(element,content){return Element.insert(element,{after:content});}};var $continue=new Error('"throw $continue" is deprecated, use "return" instead');var Position={includeScrollOffsets:false,prepare:function(){this.deltaX=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;this.deltaY=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;},within:function(element,x,y){if(this.includeScrollOffsets) +return this.withinIncludingScrolloffsets(element,x,y);this.xcomp=x;this.ycomp=y;this.offset=Element.cumulativeOffset(element);return(y>=this.offset[1]&&y=this.offset[0]&&x=this.offset[1]&&this.ycomp=this.offset[0]&&this.xcomp0;})._each(iterator);},set:function(className){this.element.className=className;},add:function(classNameToAdd){if(this.include(classNameToAdd))return;this.set($A(this).concat(classNameToAdd).join(' '));},remove:function(classNameToRemove){if(!this.include(classNameToRemove))return;this.set($A(this).without(classNameToRemove).join(' '));},toString:function(){return $A(this).join(' ');}};Object.extend(Element.ClassNames.prototype,Enumerable);Element.addMethods();try +{if(NodeList&&NodeList.prototype&&!NodeList.prototype._each) +{Object.extend(NodeList.prototype,{_each:function(iterator){for(var i=0,length=this.length;i0) +{var iPhoto=navigator.mimeTypes[iPhotoMimeTypePlugin];if(iPhoto) +{var description=iPhoto.description;try +{var components=description.split(" ");if(components&&components.length>1) +{var pluginVersion=components[1];if(pluginVersion>=iPhotoVersionMin) +{feed.mProtocol="photo";}}} +catch(exception) +{}}} +window.location=feed.toURLString();} +function loadCSS(file) +{var cssNode=document.createElement('link');cssNode.setAttribute('rel','stylesheet');cssNode.setAttribute('type','text/css');cssNode.setAttribute('href',file);document.getElementsByTagName('head')[0].appendChild(cssNode);} +function loadMozillaCSS(file) +{if(isMozilla||isFirefox||isCamino) +{loadCSS(file);}} +function utf8sequence(c) +{if(c<=0x0000007f)return[c];if(c<=0x000007ff)return[(0xc0|(c>>>6)),(0x80|(c&0x3f))];if(c<=0x0000ffff)return[(0xe0|(c>>>12)),(0x80|((c>>>6)&0x3f)),(0x80|(c&0x3f))];if(c<=0x001fffff)return[(0xf0|(c>>>18)),(0x80|((c>>>12)&0x3f)),(0x80|((c>>>6)&0x3f)),(0x80|(c&0x3f))];if(c<=0x03ffffff)return[(0xf8|(c>>>24)),(0x80|((c>>>18)&0x3f)),(0x80|((c>>>12)&0x3f)),(0x80|((c>>>6)&0x3f)),(0x80|(c&0x3f))];if(c<=0x7fffffff)return[(0xfc|(c>>>30)),(0x80|((c>>>24)&0x3f)),(0x80|((c>>>18)&0x3f)),(0x80|((c>>>12)&0x3f)),(0x80|((c>>>6)&0x3f)),(0x80|(c&0x3f))];return[];} +function utf8encode(s) +{var result=[];var firstSurrogate=0;for(var i=0;i=0xDC00)&&(code<=0xDFFF)) +{code=(firstSurrogate-0xD800)*0x400+(code-0xDC00)+0x10000;firstSurrogate=0;}} +else +{if((code<0xD800)||(code>0xDFFF)) +{} +else if((code>=0xD800)&&(code<0xDC00)) +{firstSurrogate=code;continue;} +else +{continue;}} +result=result.concat(utf8sequence(code));} +var resultString="";for(i=0;i0) +{converted=parseFloat(value);} +else if(value.indexOf("pt")>0) +{converted=px_per_pt*parseFloat(value);} +else if(value.indexOf("in")>0) +{converted=72*px_per_pt*parseFloat(value);} +else if(value.indexOf("pc")>0) +{converted=12*px_per_pt*parseFloat(value);} +else if(value.indexOf("mm")>0) +{converted=2.83465*px_per_pt*parseFloat(value);} +else if(value.indexOf("cm")>0) +{converted=28.3465*px_per_pt*parseFloat(value);} +return converted;} +function toPixelsAtElement(element,value,vertical) +{var converted=0;if(value.indexOf("%")>0) +{var containerSize=0;if(vertical) +{containerSize=$(element.parentNode).getHeight();} +else +{containerSize=$(element.parentNode).getWidth();} +converted=containerSize*parseFloat(value)/100.0;} +else if(value.indexOf("em")>0) +{converted=parseFloat(value)*toPixels(Element.getStyle(element,'fontSize'));} +else +{converted=toPixels(value);} +return converted;} +function backgroundPositionDimension(oBlock,currentBGPosition,blockDimension,imageDimension) +{var position=0;if(currentBGPosition==='center') +{position=(blockDimension/2)-(imageDimension/2);} +else if((currentBGPosition==='right')||(currentBGPosition==='bottom')) +{position=blockDimension-imageDimension;} +else if((currentBGPosition==='left')||(currentBGPosition==='top')) +{position=0;} +else if(currentBGPosition.indexOf("px")>0) +{position=parseFloat(currentBGPosition);} +else if(currentBGPosition.indexOf("em")>0) +{position=parseFloat(currentBGPosition)*toPixels(oBlock.currentStyle.fontSize);} +else if(currentBGPosition.indexOf("%")>0) +{position=parseFloat(currentBGPosition)*blockDimension/100.0;} +else if((currentBGPosition.indexOf("pt")>0)||(currentBGPosition.indexOf("in")>0)||(currentBGPosition.indexOf("pc")>0)||(currentBGPosition.indexOf("cm")>0)||(currentBGPosition.indexOf("mm")>0)) +{position=toPixels(currentBGPosition);} +return position;} +function elementHasCSSBGPNG(element) +{return(element.currentStyle&&element.currentStyle.backgroundImage&&(element.currentStyle.backgroundImage.indexOf('url(')!=-1)&&(element.currentStyle.backgroundImage.indexOf('.png")')!=-1));} +function fixupIEPNGBG(oBlock) +{if(oBlock) +{if(elementHasCSSBGPNG(oBlock)) +{var currentBGImage=oBlock.currentStyle.backgroundImage;var currentBGRepeat=oBlock.currentStyle.backgroundRepeat;var currentBGPositionX=oBlock.currentStyle.backgroundPositionX;var currentBGPositionY=oBlock.currentStyle.backgroundPositionY;var urlStart=currentBGImage.indexOf('url(');var urlEnd=currentBGImage.indexOf(')',urlStart);var imageURL=currentBGImage.substring(urlStart+4,urlEnd);if(imageURL.charAt(0)=='"') +{imageURL=imageURL.substring(1);} +if(imageURL.charAt(imageURL.length-1)=='"') +{imageURL=imageURL.substring(0,imageURL.length-1);} +imageURL=IEConvertURLForPNGFix(imageURL);var overrideRepeat=false;var filterStyle="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ +imageURL+"', sizingMethod='crop');";var fixupIEPNGBG_helper=function(img) +{var tileWidth=img.width;var tileHeight=img.height;var blockWidth=0;var blockHeight=0;if(oBlock.style.width) +{blockWidth=parseInt(oBlock.style.width,10);} +else +{blockWidth=oBlock.offsetWidth;} +if(oBlock.style.height) +{blockHeight=parseInt(oBlock.style.height,10);} +else +{blockHeight=oBlock.offsetHeight;} +var blockPaddingLeft=parseInt(oBlock.style.paddingLeft||0,10);if((blockWidth===0)||(blockHeight===0)) +{return;} +var wholeRows=1;var wholeCols=1;var extraHeight=0;var extraWidth=0;if(((currentBGRepeat.indexOf("repeat-x")!=-1)&&(tileWidth==1)&&(tileHeight==blockHeight))||((currentBGRepeat.indexOf("repeat-y")!=-1)&&(tileWidth==blockWidth)&&(tileHeight==1))||((currentBGRepeat=="repeat")&&(tileWidth==1)&&(tileHeight==1))) +{tileWidth=blockWidth;tileHeight=blockHeight;filterStyle="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ +imageURL+"', sizingMethod='scale');";} +else if((currentBGRepeat.indexOf("no-repeat")!=-1)||((tileWidth===0)&&(tileHeight===0))) +{tileWidth=blockWidth;tileHeight=blockHeight;} +else if((currentBGRepeat.indexOf("repeat-x")!=-1)||(tileHeight===0)) +{wholeCols=Math.floor(blockWidth/tileWidth);extraWidth=blockWidth-(tileWidth*wholeCols);tileHeight=blockHeight;} +else if(currentBGRepeat.indexOf("repeat-y")!=-1) +{wholeRows=Math.floor(blockHeight/tileHeight);extraHeight=blockHeight-(tileHeight*wholeRows);tileWidth=blockWidth;} +else +{wholeCols=Math.floor(blockWidth/tileWidth);wholeRows=Math.floor(blockHeight/tileHeight);extraWidth=blockWidth-(tileWidth*wholeCols);extraHeight=blockHeight-(tileHeight*wholeRows);} +var wrappedContent=$(document.createElement("div"));var pngBGFixIsWrappedContentEmpty=true;wrappedContent.setStyle({position:"relative",zIndex:"1",left:0,top:0,background:"transparent"});if(!isNaN(parseInt(oBlock.style.width,10))) +{wrappedContent.style.width=px(blockWidth);} +if(!isNaN(parseInt(oBlock.style.height,10))) +{wrappedContent.style.height=px(blockHeight);} +while(oBlock.hasChildNodes()) +{if(oBlock.firstChild.nodeType==3) +{if(RegExp("^ *$").exec(oBlock.firstChild.data)===null) +{pngBGFixIsWrappedContentEmpty=false;}} +else +{pngBGFixIsWrappedContentEmpty=false;} +wrappedContent.appendChild(oBlock.firstChild);} +if(pngBGFixIsWrappedContentEmpty) +{wrappedContent.style.lineHeight=0;} +var bgPositionX=backgroundPositionDimension(oBlock,currentBGPositionX,blockWidth,img.width);var bgPositionY=backgroundPositionDimension(oBlock,currentBGPositionY,blockHeight,img.height);bgPositionX-=blockPaddingLeft;var newMarkup="";for(var currentRow=0;currentRow
";} +if(extraWidth!==0) +{newMarkup+="
";}} +if(extraHeight!==0) +{for(currentCol=0;currentCol ";} +if(extraWidth!==0) +{newMarkup+="
";}} +oBlock.innerHTML=newMarkup;if(!pngBGFixIsWrappedContentEmpty) +{oBlock.appendChild(wrappedContent);} +oBlock.style.background="";} +var backgroundImage=new Image();backgroundImage.src=imageURL;if(backgroundImage.complete) +{fixupIEPNGBG_helper(backgroundImage);} +else +{backgroundImage.onload=fixupIEPNGBG_helper.bind(null,backgroundImage);}}}} +function fixupIEPNGBGsInTree(oAncestor,forceAutoFixup) +{if(shouldApplyCSSBackgroundPNGFix()) +{try +{var allDivs=$(oAncestor).select('div');if(isDiv(oAncestor)) +{allDivs.push(oAncestor);} +allDivs.each(function(oNode) +{if((!($(oNode).hasClassName("noAutoPNGFix"))&&!($(oNode).hasClassName("noAutoPNGFixInTree"))&&($(oNode.up(".noAutoPNGFixInTree")==undefined)))||forceAutoFixup) +{fixupIEPNGBG(oNode);}});} +catch(e) +{}}} +function fixupAllIEPNGBGs() +{setTimeout(fixupIEPNGBGsInTree.bind(null,document),1);} +function optOutOfCSSBackgroundPNGFix(element) +{if(shouldApplyCSSBackgroundPNGFix()) +{$(element).select('div').each(function(div) +{if(elementHasCSSBGPNG(div)) +{$(div).addClassName("noAutoPNGFix");}});}} +function fixupIECSS3Opacity(strElementID) +{if(windowsInternetExplorer) +{var oNode=$(strElementID);if(oNode&&(parseFloat(oNode.currentStyle.getAttribute('opacity'))<1)) +{var opacity=parseFloat(oNode.currentStyle.getAttribute('opacity'));oNode.style.height=px(oNode.offsetHeight);var targetNode=oNode;if(oNode.tagName.toLowerCase()=='img') +{targetNode=$(document.createElement('div'));targetNode.setStyle({position:oNode.style.position,top:oNode.style.top,left:oNode.style.left,width:oNode.style.width,height:oNode.style.height,opacity:oNode.style.opacity,zIndex:oNode.style.zIndex});oNode.setStyle({left:0,top:0,opacity:''});if(oNode.parentNode.tagName.toLowerCase()=='a') +{var anchor=oNode.parentNode;anchor.parentNode.insertBefore(targetNode,anchor);targetNode.appendChild(anchor);} +else +{oNode.parentNode.insertBefore(targetNode,oNode);targetNode.appendChild(oNode);}} +else if(oNode.tagName.toLowerCase()=='div') +{var bufferWidth=100;var oNodeWidth=oNode.offsetWidth;var oNodeHeight=oNode.offsetHeight;extents=new IWExtents(-bufferWidth,-bufferWidth,oNodeWidth+bufferWidth,oNodeHeight*2+bufferWidth);var positionStyleVal=oNode.getStyle("position");var floatStyleVal=oNode.getStyle("float");var positioned=((positionStyleVal=="relative")||(positionStyleVal=="absolute"));var absolutelyPositioned=(positionStyleVal=="absolute"&&(floatStyleVal=="none"));targetNode=$(document.createElement('div'));var classString=oNode.className;classString=classString.replace(/(shadow_\d+)/g,'');classString=classString.replace(/(stroke_\d+)/g,'');classString=classString.replace(/(reflection_\d+)/g,'');targetNode.className=classString;targetNode.setStyle({position:positioned?positionStyleVal:"relative",styleFloat:floatStyleVal,clear:oNode.getStyle("clear"),width:px(extents.right-extents.left),height:px(extents.bottom-extents.top),opacity:oNode.style.opacity,zIndex:oNode.style.zIndex});if(absolutelyPositioned) +{targetNode.setStyle({top:px((parseFloat(oNode.getStyle("top"))||0)+extents.top),left:px((parseFloat(oNode.getStyle("left"))||0)+extents.left)});} +else +{targetNode.setStyle({marginTop:px((parseFloat(oNode.getStyle("marginTop"))||0)+extents.top),marginLeft:px((parseFloat(oNode.getStyle("marginLeft"))||0)+extents.left),marginBottom:px((parseFloat(oNode.getStyle("marginBottom"))||0)- +(extents.bottom-oNodeHeight)),marginRight:px((parseFloat(oNode.getStyle("marginRight"))||0)- +(extents.right-oNodeWidth))});} +oNode.setStyle({position:"absolute",styleFloat:"none",clear:"none",left:px(-extents.left),top:px(-extents.top),margin:0,verticalAlign:'baseline',display:'block',opacity:''});if(effectiveBrowserVersion<7||actualBrowserVersion>=8) +{oNode.className=oNode.className.replace(/(shadow_\d+)/g,'');} +oNode.parentNode.insertBefore(targetNode,oNode);targetNode.appendChild(oNode);} +$(targetNode).setFilter('progid:DXImageTransform.Microsoft.BasicImage','opacity='+opacity);}}} +function IWSetDivOpacity(div,fraction,suppressFilterRemoval) +{if(windowsInternetExplorer) +{if(fraction<.99||(suppressFilterRemoval==true)) +{$(div).setFilter('alpha','opacity='+fraction*100);} +else +{$(div).killFilter('alpha');}} +else +{$(div).setOpacity(fraction);}} +function IMpreload(path,name,areaIndex) +{var rolloverName=name+'_rollover_'+areaIndex;var rolloverPath=path+'/'+rolloverName+'.png';self[rolloverName]=new Image();self[rolloverName].src=rolloverPath;var linkName=name+'_link_'+areaIndex;var linkPath=path+'/'+linkName+'.png';self[linkName]=new Image();self[linkName].src=linkPath;return true;} +function swapAlphaImageLoaderFilterSrc(img,src) +{var filterName='progid:DXImageTransform.Microsoft.AlphaImageLoader';var filterParams='src="'+IEConvertURLForPNGFix(src)+'", sizingMethod="scale"';img.setFilter(filterName,filterParams);img.originalSrc=img.src;} +function IMmouseover(name,areaIndex) +{var rolloverName=name+'_rollover_'+areaIndex;var linkName=name+'_link_'+areaIndex;var img=$(linkName);if(img) +{if(windowsInternetExplorer&&img.originalSrc) +{swapAlphaImageLoaderFilterSrc(img,self[rolloverName].src);} +else +{img.src=self[rolloverName].src;}} +return true;} +function IMmouseout(name,areaIndex) +{var linkName=name+'_link_'+areaIndex;var img=$(linkName);if(img) +{if(windowsInternetExplorer&&img.originalSrc) +{swapAlphaImageLoaderFilterSrc(img,self[linkName].src);} +else +{img.src=self[linkName].src;}} +return true;} +var quicktimeAvailable=false;var quicktimeVersion702=false;var isQuicktimeDetectionInitialized=false;var minVersionNum=0x7028000;var minVersionArray=['7','0','2'];function initializeQuicktimeDetection() +{if((navigator.plugins!==null)&&(navigator.plugins.length>0)) +{for(i=0;iminVersionComponent)||((qtVersionComponent==minVersionComponent)&&(j==minVersionArray.length-1))) +{quicktimeVersion702=true;break;} +else if(qtVersionComponent=minVersionNum) +{quicktimeVersion702=true;}}} +catch(e) +{}} +isQuicktimeDetectionInitialized=true;} +function fixupPodcast(mediaId,anchorId) +{if(!isQuicktimeDetectionInitialized) +{initializeQuicktimeDetection();} +if(!quicktimeVersion702) +{var oMediaElem=$(mediaId);var oAnchorElem=$(anchorId);if(oMediaElem&&oAnchorElem) +{oAnchorElem.style.display='inline';oMediaElem.parentNode.removeChild(oMediaElem);}}} +function allListBulletImagesContainedBy(node) +{var result=[];for(var i=0;i0) +{return true;} +else +{return containsFixedHeightIntermediate(oDescendant.parentNode,oAncestor);}} +function getShrinkableParaDescendants(oAncestor) +{return $(oAncestor).select('div.paragraph, p').findAll(function(paragraph){return!containsFixedHeightIntermediate(paragraph,oAncestor);});} +var MINIMUM_FONT="10";var UNITS="";function elementFontSize(element) +{var fontSize=MINIMUM_FONT;if(document.defaultView) +{var computedStyle=document.defaultView.getComputedStyle(element,null);if(computedStyle) +{fontSize=computedStyle.getPropertyValue("font-size");}} +else if(element.currentStyle) +{fontSize=element.currentStyle.fontSize;} +if((UNITS.length===0)&&(fontSize!=MINIMUM_FONT)) +{UNITS=fontSize.substring(fontSize.length-2,fontSize.length);} +return parseFloat(fontSize);} +function isExceptionToOneLineRule(element) +{return $(element).hasClassName("Header");} +var HEIGHT_ERROR_MARGIN=2;function adjustFontSizeIfTooBig(idOfElement) +{var oParagraphDiv;var oSpan;var oTextBoxInnerDiv;var oTextBoxOuterDiv=$(idOfElement);if(oTextBoxOuterDiv) +{oTextBoxInnerDiv=oTextBoxOuterDiv.selectFirst("div.text-content");if(oTextBoxInnerDiv) +{hideAllListBulletImagesContainedBy(oTextBoxInnerDiv);var offsetHeight=oTextBoxInnerDiv.offsetHeight;var specifiedHeight=offsetHeight;if(oTextBoxOuterDiv.style.height!=="") +{specifiedHeight=parseFloat(oTextBoxOuterDiv.style.height);} +if(offsetHeight>(specifiedHeight+HEIGHT_ERROR_MARGIN)) +{var smallestFontSize=200;var aParaChildren=getShrinkableParaDescendants(oTextBoxInnerDiv);var oneLine=false;var exceptionToOneLineRule=false;for(i=0;i=specifiedHeight);exceptionToOneLineRule=oneLine&&isExceptionToOneLineRule(oParagraphDiv);} +var fontSize=elementFontSize(oParagraphDiv);if(!isNaN(fontSize)) +{smallestFontSize=Math.min(smallestFontSize,fontSize);} +for(j=0;jminimum)&&(offsetHeight>(specifiedHeight+HEIGHT_ERROR_MARGIN))&&(count<10)) +{++count;if(oneLine&&!exceptionToOneLineRule) +{var oldWidth=parseInt(oTextBoxOuterDiv.style.width,10);oTextBoxInnerDiv.style.width=px(oldWidth*Math.pow(1.05,count));} +else +{var scale=Math.max(0.95,minimum/smallestFontSize);for(i=0;i(specifiedHeight+HEIGHT_ERROR_MARGIN)) +{var adjusted=true;var count=0;while((adjusted)&&(offsetHeight>(specifiedHeight+HEIGHT_ERROR_MARGIN))&&(count<10)) +{adjusted=false;++count;var aParaChildren=getShrinkableParaDescendants(oTextBoxInnerDiv);for(i=0;i=(fontSize*1.1)) +{oParagraphDiv.style.lineHeight=lineHeight+UNITS;adjusted=true;} +for(j=0;j=(fontSize*1.1)) +{oSpan.style.lineHeight=lineHeight+UNITS;adjusted=true;}}}} +offsetHeight=oTextBoxInnerDiv.offsetHeight;}} +showAllListBulletImagesContainedBy(oTextBoxInnerDiv);}}} +function isDiv(node) +{return(node.nodeType==Node.ELEMENT_NODE)&&(node.tagName=="DIV");} +function fixupAllMozInlineBlocks() +{if(isFirefox||isCamino) +{var oInlineBlocks=$$("div.inline-block");for(var i=0,inlineBlocksLength=oInlineBlocks.length;i0) +{var floatElem=floatDescendants.shift();floatValue=floatElem.getStyle("float");if(floatValue=="left"||floatValue=="right") +{var floatAncestor=getWidthDefiningAncestor(floatElem);if(floatAncestor===commonAncestor) +{if(!listOfIE7FloatsFix.include(floatElem)) +{listOfIE7FloatsFix.push(floatElem);}}}}}} +function fixupFloatsIfIE7() +{if(windowsInternetExplorer&&effectiveBrowserVersion==7) +{if(listOfIE7FloatsFix.length>0) +{var floatsToRestore=[];var floatElem;var displayStyle;while(listOfIE7FloatsFix.length>0) +{floatElem=listOfIE7FloatsFix.shift();displayStyle=floatElem.getStyle("display");$(floatElem).hide();floatsToRestore.push({element:floatElem,displayStyle:displayStyle});} +while(floatsToRestore.length>0) +{var queueEntry=floatsToRestore.shift();floatElem=queueEntry.element;displayStyle=queueEntry.displayStyle;$(floatElem).setStyle({"display":displayStyle});}}}} +function joltLater(element) +{setTimeout(function(element){$(element).hide();}.bind(null,element),100);setTimeout(function(element){$(element).show();}.bind(null,element),200);} +function performPostEffectsFixups() +{fixupAllMozInlineBlocks();fixupFloatsIfIE7();} +function reduceLeftMarginIfIE6(element) +{if(windowsInternetExplorer&&effectiveBrowserVersion<7) +{$(element).style.marginLeft=px(parseFloat($(element).style.marginLeft||0)-1);}} +function reduceRightMarginIfIE6(element) +{if(windowsInternetExplorer&&effectiveBrowserVersion<7) +{$(element).style.marginRight=px(parseFloat($(element).style.marginRight||0)-1);}} +Object.objectType=function(obj) +{var result=typeof obj;if(result=="object") +{if(obj.constructor==Array) +result="Array";} +return result;} +var trace=function(){};function ajaxGetDocumentElement(req) +{var dom=null;if(req) +{if(req.responseXML&&req.responseXML.documentElement) +{dom=req.responseXML;} +else if(req.responseText) +{if(window.DOMParser) +{dom=(new DOMParser()).parseFromString(req.responseText,"text/xml");} +else if(window.ActiveXObject) +{dom=new ActiveXObject("MSXML.DOMDocument");if(dom) +{dom.async=false;dom.loadXML(req.responseText);}}}} +return dom?dom.documentElement:null;} +function iWLog(str) +{if(window.console) +{window.console.log(str);} +else if(window.dump) +{window.dump(str+"\n");}} +function iWPosition(abs,left,top,width,height) +{var pos="";if(abs) +pos="position: absolute; ";var size="";if(width&&height) +size=' width: '+width+'px; height: '+height+'px;';return pos+'left: '+left+'px; top: '+top+'px;'+size;} +var gIWUtilsTransparentGifURL="";function setTransparentGifURL(url) +{if(gIWUtilsTransparentGifURL=="") +{gIWUtilsTransparentGifURL=url;}} +function transparentGifURL() +{(function(){return gIWUtilsTransparentGifURL!=""}).assert("Transparent image URL not set");return gIWUtilsTransparentGifURL;} +function imgMarkup(src,style,attributes,alt,forceFixupIE7) +{var markup="";if(src) +{style=style||"";attributes=attributes||"";alt=alt||"";if(windowsInternetExplorer&&((effectiveBrowserVersion<7)||(effectiveBrowserVersion<8&&forceFixupIE7!==false))) +{style+=" filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+IEConvertURLForPNGFix(src)+"', sizingMethod='scale');";src=gIWUtilsTransparentGifURL;} +if(style.length>0) +{style=' style="'+style+'"';} +if(attributes.length>0) +{attributes=' '+attributes;} +if(alt.length>0) +{alt=' alt="'+alt.stringByEscapingXML(true)+'"';} +markup='';} +return markup;} +function setImgSrc(imgElement,src,forceFixupIE7) +{if(windowsInternetExplorer&&((effectiveBrowserVersion<7)||(effectiveBrowserVersion<8&&forceFixupIE7!==false))&&src.slice(-4).toLowerCase()==".png") +{$(imgElement).setFilter('progid:DXImageTransform.Microsoft.AlphaImageLoader','src="'+IEConvertURLForPNGFix(src)+'", sizingMethod="scale"');imgElement.src=gIWUtilsTransparentGifURL;} +else +{imgElement.src=src;}} +function iWOpacity(opacity) +{var style="";if(windowsInternetExplorer) +{style=" progid:DXImageTransform.Microsoft.Alpha(opacity="+opacity*100+"); ";} +else +{style=" opacity: "+opacity+"; ";} +return style;} +var IWRange=Class.create({initialize:function(location,length) +{this.setLocation(location);this.setLength(length);},length:function() +{return this.p_length;},setLength:function(length) +{this.p_length=parseFloat(length);},location:function() +{return this.p_location;},setLocation:function(location) +{this.p_location=parseFloat(location);},max:function() +{return this.location()+this.length();},min:function() +{return this.location();},shift:function(amount) +{this.setLocation(this.location()+amount);},containsLocation:function(location) +{return((location>=this.min())&&(location0&&scaledSize.height>0) +{var wScale=targetSize.width/scaledSize.width;var hScale=targetSize.height/scaledSize.height;var scale=fitTarget?Math.min(wScale,hScale):Math.max(wScale,hScale);scaledSize.width*=scale;scaledSize.height*=scale;} +return scaledSize;},scaleToFit:function(sizeToFit) +{return this.scaleToTargetSize(sizeToFit,true);},round:function() +{return this.scale(1,1,true);},toString:function() +{return"Size("+this.width+", "+this.height+")";},aspectRatio:function() +{return this.width/this.height;},subtractSize:function(s) +{return new IWSize(this.width-s.width,this.height-s.height);}});function IWZeroPoint() +{return new IWPoint(0,0);} +var IWPoint=Class.create({initialize:function(x,y) +{this.x=x;this.y=y;},scale:function(hscale,vscale,round) +{if(round===undefined)round=false;if(vscale===undefined)vscale=hscale;var scaled=new IWPoint(this.x*hscale,this.y*vscale);if(round) +{scaled.x=Math.round(scaled.x);scaled.y=Math.round(scaled.y);} +return scaled;},round:function() +{return this.scale(1,1,true);},offset:function(deltaX,deltaY) +{return new IWPoint(this.x+deltaX,this.y+deltaY);},toString:function() +{return"Point("+this.x+", "+this.y+")";}});function IWZeroRect() +{return new IWRect(0,0,0,0);} +var IWRect=Class.create({initialize:function() +{if(arguments.length==1) +{this.origin=arguments[0].origin;this.size=arguments[0].size;} +else if(arguments.length==2) +{this.origin=arguments[0];this.size=arguments[1];} +else if(arguments.length==4) +{this.origin=new IWPoint(arguments[0],arguments[1]);this.size=new IWSize(arguments[2],arguments[3]);}},clone:function() +{return new IWRect(this.origin.x,this.origin.y,this.size.width,this.size.height);},toString:function() +{return"Rect("+this.origin.toString()+", "+this.size.toString()+")";},maxX:function() +{return this.origin.x+this.size.width;},maxY:function() +{return this.origin.y+this.size.height;},union:function(that) +{var minX=Math.min(this.origin.x,that.origin.x);var minY=Math.min(this.origin.y,that.origin.y);var maxX=Math.max(this.maxX(),that.maxX());var maxY=Math.max(this.maxY(),that.maxY());return new IWRect(minX,minY,maxX-minX,maxY-minY);},intersection:function(that) +{var intersectionRect;var minX=Math.max(this.origin.x,that.origin.x);var minY=Math.max(this.origin.y,that.origin.y);var maxX=Math.min(this.maxX(),that.maxX());var maxY=Math.min(this.maxY(),that.maxY());if((minX0)?children[0]:null;} +function getChildElementTextByTagName(node,tagName) +{var result="";if(node!==null) +{var children=node.getElementsByTagName(tagName);if(children.length>1) +{throw"MultipleResults";} +if(children.length==1) +{result=getTextFromNode(children[0]);}} +return result;} +function getChildElementTextByTagNameNS(node,ns,nsPrefix,localName) +{var result="";if(node) +{var children=getChildElementsByTagNameNS(node,ns,nsPrefix,localName);if(children.length>1) +throw"MultipleResults";if(children.length==1) +{result=getTextFromNode(children[0]);}} +return result;} +function adjustNodeIds(node,suffix) +{var undefined;if(node.id!="") +{node.id+=("$"+suffix);} +$(node).childElements().each(function(e){adjustNodeIds(e,suffix);});} +function substituteSpans(parentNode,replacements) +{$H(replacements).each(function(pair) +{var selector="span."+pair.key;$(parentNode).select(selector).each(function(node) +{var contentType=pair.value[0];var newContent=pair.value[1];if(contentType=="text") +{node.update(newContent);} +else if(contentType=="html") +{node.innerHTML=newContent;}});});} +Element.addMethods({selectFirst:function(element,tag_name){var elements=$(element).select(tag_name);return(elements.length>0)?$(elements[0]):null;},setVisibility:function(element,visible){element=$(element);if(visible) +{element.style.display='inline';} +else +{element.style.display='none';} +return element;},ensureHasLayoutForIE:function(element) +{element=$(element);if(windowsInternetExplorer&&effectiveBrowserVersion<8) +{if(!element.currentStyle.hasLayout) +{element.style.zoom=1;}}},setFilter:function(element,filterName,filterParams) +{element=$(element);var regex=new RegExp(filterName+'\\([^\\)]*\\);','gi');element.style.filter=element.style.filter.replace(regex,'')+ +filterName+'('+filterParams+'); ';return element;},killFilter:function(element,filterName) +{element=$(element);var regex=new RegExp(filterName+'\\([^\\)]*\\);','gi');element.style.filter=element.style.filter.replace(regex,'');return element;},cloneNodeExcludingIDs:function(element,deep) +{var clone=element.cloneNode(deep);if(deep) +{var descendantsWithID=clone.select("[id]");for(var i=0,length=descendantsWithID.length;i0) +{formatted+=format.substring(0,foundIndex)} +var matchInfo=format.match(formatPattern);var formatCharacter=matchInfo[3];if(formatCharacter=="%") +{formatted+="%";} +else +{if(matchInfo[2]) +{argumentNumber=parseInt(matchInfo[2]);} +else +{argumentNumber=nextArgument++;} +argument=(argumentNumberlastSeparatorIndex+1)&&lastDotIndex>0)?this.slice(lastDotIndex+1):this;},stringByDeletingLastPathComponent:function() +{return this.substr(0,this.lastIndexOf("/"));},stringByDeletingPathExtension:function() +{var lastSeparatorIndex=this.lastIndexOf("/");var lastDotIndex=this.lastIndexOf(".");if((lastDotIndex>lastSeparatorIndex+1)&&lastDotIndex>0) +return this.slice(0,lastDotIndex);return this;},stringByAppendingPathComponent:function(component) +{return this.endsWith("/")?(this+component):(this+"/"+component);},stringByAppendingAsQueryString:function(parameters) +{return this+'?'+$H(parameters).toQueryString();},stringByUnescapingXML:function() +{var str=this.replace(/</g,'<');str=str.replace(/>/g,'>');str=str.replace(/"/g,'"');str=str.replace(/'/g,"'");str=str.replace(/&/g,'&');return str;},stringByEscapingXML:function(escapeAdditionalCharacters) +{var str=this.replace(/&/g,'&');str=str.replace(//g,'>');str=str.replace(/"/g,'"');str=str.replace(/'/g,''');} +return str;},stringByConvertingNewlinesToBreakTags:function() +{return this.replace(/\n\r|\n|\r/g,'
');},urlStringByDeletingQueryAndFragment:function() +{var result=this;var lastIndex=result.lastIndexOf("?");if(lastIndex>0) +return result.substr(0,lastIndex);lastIndex=result.lastIndexOf("#");if(lastIndex>0) +result=result.substr(0,lastIndex);return result;},toRelativeURL:function(baseURL) +{var result=this;if(baseURL&&this.indexOf(baseURL)==0) +{var chop=baseURL.length;if(this.charAt(chop)=='/') +++chop;result=this.substring(chop);} +return result;},toAbsoluteURL:function() +{var result=this;if(this.indexOf(":/")==-1) +{var pageURL=document.URL.urlStringByDeletingQueryAndFragment();var pathURL=pageURL.stringByDeletingLastPathComponent();result=pathURL.stringByAppendingPathComponent(this);} +return result;},toRebasedURL:function(baseURL) +{return this.toRelativeURL(baseURL).toAbsoluteURL();},httpURLRegExp:function() +{if(String.m_httpurlRegExp==undefined) +{var alpha="[A-Za-z]";var digit="[0-9]";var safe="[$_.+-]";var extra="[!*'(),]";var unreserved="("+alpha+"|"+digit+"|"+safe+"|"+extra+")";var hex="("+digit+"|"+"[A-Fa-f])";var escapeSeq="(%"+hex+hex+")";var uchar="("+unreserved+"|"+escapeSeq+")";var alphadigit="("+alpha+"|"+digit+")";var digits=digit+"+";var hostnumber="("+digits+"\\."+digits+"\\."+digits+"\\."+digits+")";var toplabel="(("+alpha+"("+alpha+"|"+"-)*"+alphadigit+")|"+alpha+")";var domainlabel="(("+alphadigit+"("+alphadigit+"|"+"-)*"+alphadigit+")|"+alphadigit+")";var hostname="(("+domainlabel+"\\.)*"+toplabel+")";var host="("+hostname+"|"+hostnumber+")";var port=digits;var hostport="(("+host+")(:"+port+")?)";var hsegment="((("+uchar+")|[;:@&=])*)";var search="((("+uchar+")|[;:@&=])*)";var hpath="("+hsegment+"(/"+hsegment+")*)";var httpurl="((http)|(feed)|(https))://"+hostport+"(/"+hpath+"(\\?"+search+")?)?" +String.m_httpurlRegExp=new RegExp(httpurl);} +return String.m_httpurlRegExp;},isHTTPURL:function() +{var matchResult=this.match(this.httpURLRegExp());return matchResult?(matchResult[0]==this):false;},firstHTTPURL:function() +{var matchResult=this.match(this.httpURLRegExp());return matchResult?matchResult[0]:undefined;},httpURLQueryString:function() +{var charIndex=this.indexOf("?");charIndex=((charIndex==-1)?this.indexOf("&"):charIndex);return(charIndex==-1)?"":this.slice(charIndex+1);},plaintextgsub:function(pattern,replacement) +{var value=this;while(true) +{var index=value.indexOf(pattern);if(index==-1) +break;value=value.substr(0,index)+replacement+value.substr(index+pattern.length);} +return value;}});function IWURL(urlString) +{try +{if((arguments.length==0)||(arguments.length==1&&(urlString==""||urlString==null))) +{this.p_initWithParts(null,null,null,null,null);} +else if(arguments.length==1) +{urlString.replace("file://localhost/","file:///");var urlParts=urlString.match(/^([A-Z]+):\/\/([^/]*)((\/[^?#]*)(\?([^#]*))?(#(.*))?)?/i);if(urlParts) +{this.p_initWithParts(urlParts[1],urlParts[2],urlParts[4]||"/",urlParts[6]||null,urlParts[8]||null);} +else +{urlParts=urlString.match(/^([^?#]*)(\?([^#]*))?(#(.*))?/);if(urlParts) +{this.p_initWithParts(null,null,urlParts[1],urlParts[3]||null,urlParts[5]||null);} +else +{}}}} +catch(e) +{print("Exception Parsing URL:"+e);}} +Object.extend(IWURL,{p_normalizePathComponents:function(components) +{var index=0;while(index0) +{var previousComponent=components[index-1];if(previousComponent=="/") +{components.splice(index,1);} +else if(previousComponent!="..") +{components.splice(index-1,2);index-=1;} +else +{index+=1;}} +else +{index+=1;}} +else +{index+=1;}} +return components;}});Object.extend(IWURL.prototype,{p_initWithParts:function(inProtocol,inAuthority,inPath,inQuery,inFragment) +{this.mProtocol=inProtocol;this.mAuthority=inAuthority;this.mQuery=inQuery;this.mFragment=inFragment;this.mPathComponents=null;if(inPath) +{this.mPathComponents=inPath.split('/');if(this.mPathComponents[0]=="") +this.mPathComponents[0]='/';for(var i=0;i0)&&(this.mProtocol==base.mProtocol)&&(this.mAuthority==base.mAuthority)) +{var commonAncestorIndex=0;for(var index=0;indexcommonAncestorIndex;--up) +{relativePath.push("..");} +for(var down=commonAncestorIndex+1;down