diff --git a/.editorconfig b/.editorconfig
index 2e9da850b9..465fe0e053 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -1,6 +1,10 @@
; Top-most EditorConfig file
root = true
+[*]
+insert_final_newline = true
+end_of_line = lf
+
; 4-column tab indentation
[*.cpp]
indent_style = tab
diff --git a/tool/quick_start/docker/ryzombuild_focal_amd64/Dockerfile b/tool/quick_start/docker/ryzombuild_focal_amd64/Dockerfile
index 38781bec60..3711ca1f1e 100644
--- a/tool/quick_start/docker/ryzombuild_focal_amd64/Dockerfile
+++ b/tool/quick_start/docker/ryzombuild_focal_amd64/Dockerfile
@@ -1,5 +1,5 @@
FROM --platform=linux/amd64 ubuntu:focal
-MAINTAINER Ryzom Core
+LABEL org.opencontainers.image.authors="Ryzom Core "
RUN sed -i -e 's/archive\.ubuntu\.com/mirrors\.digitalocean\.com/' /etc/apt/sources.list
diff --git a/tool/quick_start/docker/ryzombuild_jammy_amd64/Dockerfile b/tool/quick_start/docker/ryzombuild_jammy_amd64/Dockerfile
index 9ec051bd41..6b30a965cd 100644
--- a/tool/quick_start/docker/ryzombuild_jammy_amd64/Dockerfile
+++ b/tool/quick_start/docker/ryzombuild_jammy_amd64/Dockerfile
@@ -1,15 +1,15 @@
FROM --platform=linux/amd64 ubuntu:jammy
-MAINTAINER Ryzom Core
+LABEL org.opencontainers.image.authors="Ryzom Core "
RUN sed -i -e 's/archive\.ubuntu\.com/mirrors\.digitalocean\.com/' /etc/apt/sources.list
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
software-properties-common aria2 wget \
- && aria2c https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb \
+ && aria2c https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb \
&& dpkg -i packages-microsoft-prod.deb \
&& rm packages-microsoft-prod.deb \
&& apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
- cmake ninja-build curl build-essential ccache \
+ ninja-build curl build-essential ccache \
bison autoconf automake \
libpng-dev \
libjpeg-dev \
@@ -32,6 +32,10 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
&& mv msquic.h /usr/include/msquic.h \
&& mv msquic_posix.h /usr/include/msquic_posix.h \
&& mv quic_sal_stub.h /usr/include/quic_sal_stub.h \
+ && wget --output-document=/tmp/cmake.sh https://github.com/Kitware/CMake/releases/download/v3.27.9/cmake-3.27.9-linux-x86_64.sh \
+ && mkdir /opt/cmake \
+ && sh /tmp/cmake.sh --skip-license --prefix=/opt/cmake \
+ && ln --symbolic --force /opt/cmake/bin/cmake /usr/local/bin/cmake \
&& rm -rf /var/lib/apt/lists/*
ENV CC=/usr/lib/ccache/gcc
diff --git a/tool/quick_start/docker/ryzombuild_scout_amd64_gcc9/Dockerfile b/tool/quick_start/docker/ryzombuild_scout_amd64_gcc9/Dockerfile
index a0e2585835..16d4a6ad43 100644
--- a/tool/quick_start/docker/ryzombuild_scout_amd64_gcc9/Dockerfile
+++ b/tool/quick_start/docker/ryzombuild_scout_amd64_gcc9/Dockerfile
@@ -1,5 +1,5 @@
FROM --platform=linux/amd64 steamrt_scout_amd64:latest
-MAINTAINER Ryzom Core
+LABEL org.opencontainers.image.authors="Ryzom Core "
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 90 \
&& update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 90 \
diff --git a/tool/quick_start/docker/ryzombuild_scout_i386_gcc9/Dockerfile b/tool/quick_start/docker/ryzombuild_scout_i386_gcc9/Dockerfile
index 6895ad1f12..0d8bc74464 100644
--- a/tool/quick_start/docker/ryzombuild_scout_i386_gcc9/Dockerfile
+++ b/tool/quick_start/docker/ryzombuild_scout_i386_gcc9/Dockerfile
@@ -1,5 +1,5 @@
FROM --platform=linux/386 steamrt_scout_i386:latest
-MAINTAINER Ryzom Core
+LABEL org.opencontainers.image.authors="Ryzom Core "
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 90 \
&& update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 90 \
diff --git a/web/docs/admin/shard_restart/H38.css b/web/docs/admin/shard_restart/H38.css
index f14991eb49..704622119e 100644
--- a/web/docs/admin/shard_restart/H38.css
+++ b/web/docs/admin/shard_restart/H38.css
@@ -1,106 +1,106 @@
-BODY {background:#FFFFFF}
-
-.menuItem {
- font-family:sans-serif; font-size:small;
- width:220;padding-left:20;
- background-color:menu;
- color:black
-}
-
-.highlightItem {
- font-family:sans-serif; font-size:small;
- width:220; padding-left:20;
- background-Color:highlight; color:white;
-}
-
-.navBar {
- background-Color:buttonface;
-}
-
-.oldNavBar {
- background-Color:black;
-}
-
-.pageView {
- background-Color:white;
-}
-
-.propViewer {
- background-Color:white;
- color: black;
- font-family: Verdana;
- font-style: italic;
- font-weight: bold;
- font-size: medium;
- text-align: center;
-}
-
-.propViewerTABLE {
- background-Color: black;
- font-weight: medium;
- border-width: 1pt;
- border-color: black;
-}
-
-.propViewerTHEAD {
- background-Color: rgb(230,230,230);
- color: black;
- font-family: Verdana;
- font-style: italic;
- font-weight: medium;
- font-size: small;
-}
-
-.propViewerHeaderSep {
- background-Color: black;
- height: 0pt;
-}
-
-.propViewerLines {
- background-Color: black;
- height: 2pt;
-}
-
-.propViewerTD {
- font-family: Verdana;
- color: black;
- font-size: x-small;
- font-style: normal;
- align: center;
-}
-
-.propViewerEvenRow {
- background-Color: rgb(253,254,238);
-}
-
-.propViewerOddRow {
- background-Color: rgb(254,254,247);
-}
-
-.clTab {
- cursor:hand;
- background:buttonface;
- font: 0.7em Arial;
- padding-left:3px;
- padding-right:3px;
- text-align:center;
-}
-
-.clBorder {
- background:windowframe;
- font:1pt;
-}
-
-.clScroll {
- font:8pt Courier New;
- color:threeddarkshadow;
- cursor:default;
- line-height:10pt;
-}
-
-.clScroll2 {
- font:10pt Arial;
- color:threeddarkshadow;
- cursor:default;
- line-height:11pt;
-}
+BODY {background:#FFFFFF}
+
+.menuItem {
+ font-family:sans-serif; font-size:small;
+ width:220;padding-left:20;
+ background-color:menu;
+ color:black
+}
+
+.highlightItem {
+ font-family:sans-serif; font-size:small;
+ width:220; padding-left:20;
+ background-Color:highlight; color:white;
+}
+
+.navBar {
+ background-Color:buttonface;
+}
+
+.oldNavBar {
+ background-Color:black;
+}
+
+.pageView {
+ background-Color:white;
+}
+
+.propViewer {
+ background-Color:white;
+ color: black;
+ font-family: Verdana;
+ font-style: italic;
+ font-weight: bold;
+ font-size: medium;
+ text-align: center;
+}
+
+.propViewerTABLE {
+ background-Color: black;
+ font-weight: medium;
+ border-width: 1pt;
+ border-color: black;
+}
+
+.propViewerTHEAD {
+ background-Color: rgb(230,230,230);
+ color: black;
+ font-family: Verdana;
+ font-style: italic;
+ font-weight: medium;
+ font-size: small;
+}
+
+.propViewerHeaderSep {
+ background-Color: black;
+ height: 0pt;
+}
+
+.propViewerLines {
+ background-Color: black;
+ height: 2pt;
+}
+
+.propViewerTD {
+ font-family: Verdana;
+ color: black;
+ font-size: x-small;
+ font-style: normal;
+ align: center;
+}
+
+.propViewerEvenRow {
+ background-Color: rgb(253,254,238);
+}
+
+.propViewerOddRow {
+ background-Color: rgb(254,254,247);
+}
+
+.clTab {
+ cursor:hand;
+ background:buttonface;
+ font: 0.7em Arial;
+ padding-left:3px;
+ padding-right:3px;
+ text-align:center;
+}
+
+.clBorder {
+ background:windowframe;
+ font:1pt;
+}
+
+.clScroll {
+ font:8pt Courier New;
+ color:threeddarkshadow;
+ cursor:default;
+ line-height:10pt;
+}
+
+.clScroll2 {
+ font:10pt Arial;
+ color:threeddarkshadow;
+ cursor:default;
+ line-height:11pt;
+}
diff --git a/web/docs/admin/shard_restart/Hu37.js b/web/docs/admin/shard_restart/Hu37.js
index ad988e049c..ad21c0336c 100644
--- a/web/docs/admin/shard_restart/Hu37.js
+++ b/web/docs/admin/shard_restart/Hu37.js
@@ -1,761 +1,761 @@
-
-var g_theApp = parent.g_theApp;
-
-var layerRef="";
-var layerStyleRef = "";
-var styleSwitch = "";
-var FILEProtocol = "file://";
-var HTTPProtocol = "http://";
-
-if (navigator.appName == "Netscape")
- {
- layerStyleRef="layer.";
- layerRef="document.layers";
- styleSwitch="";
- }
-else
- {
- layerStyleRef="layer.style.";
- layerRef="document.all";
- styleSwitch=".style";
- }
-
-function CImage(id)
- {
- this.id = id;
-
- if ( g_theApp.isIE )
- this.image = eval('document.images.' + this.id);
- else
- this.image = eval('document.images["' + this.id + '"]');
-
- this.put_Source = SetSource;
- this.get_Source = GetSource;
- this.put_Title = put_Title;
- this.get_Title = get_Title;
- }
-
-function SetSource(newsrc)
- {
- if ( this.image )
- this.image.src = newsrc;
- }
-
-function GetSource()
- {
- if ( this.image )
- return this.image.src;
- }
-
-function put_Title(txt)
- {
- if ( this.image && g_theApp.isIE )
- this.image.title = txt;
- }
-
-function get_Title(txt)
- {
- if ( this.image && g_theApp.isIE )
- return this.image.title;
- }
-
-function CDiv(id, doc)
- {
- this.id = id;
- this.layer = FindLayer(id, doc);
-
- this.Show = Show;
- this.Hide = Hide;
- this.IsHidden = IsHidden;
- this.put_innerHTML = put_innerHTML;
- }
-
-function Show()
- {
- if ( this.layer )
- eval('this.' + layerStyleRef + 'visibility' + '= "visible"');
- }
-
-function Hide()
- {
- if ( this.layer )
- eval('this.' + layerStyleRef + 'visibility' + '= "hidden"');
- }
-
-function IsHidden()
- {
- if ( this.layer &&
- (-1 != eval('this.' + layerStyleRef + 'visibility').indexOf("hid")) )
- return true;
-
- return false;
- }
-
-function put_innerHTML(txt)
- {
- if ( this.layer )
- {
- if ( g_theApp.isIE )
- this.layer.innerHTML = txt;
- else
- {
- this.layer.document.writeln(txt);
- this.layer.document.close();
- }
- }
- }
-
-function SetZoomControl(f)
- {
- if ( !parent.g_NavBarLoaded )
- return;
-
- var formZoom = FindForm("zoomForm", parent.frmZoomBox.document);
- if (formZoom != null)
- {
- s = formZoom.zoomFactor;
-
- if ( -1 != f )
- f *= 100;
-
- for ( i = 0 ; i < s.options.length ; i++ )
- {
- if ( s.options[i].value == f )
- {
- s.selectedIndex = i;
- break;
- }
- }
- }
- }
-
-function zoom_onchange(val)
-{
- if ( g_theApp.ActiveViewMgr )
- {
- if ( g_theApp.ActiveViewMgr.ZoomIsPresent == true)
- {
- g_theApp.ActiveViewMgr.put_Zoom(parseInt(val));
- }
- }
-}
-
-function CViewMgr()
- {
-//Set all zoom functions to null assuming the addons related
-//to the data will provide their own functions.
- this.onResize = null;
- this.put_Zoom = null;
- this.get_Zoom = null;
- this.ApplyZoom = null;
-
- //General functions.
- this.onLoad = ViewMgrOnLoad;
- this.put_Location = ViewMgrDefaultFind; //MUST BE SET FOR FIND FEATURE
- this.ZoomIsPresent = false;
- }
-
-function ViewMgrOnLoad()
- {
- this.id = "ConvertedImage";
- this.zoomFactor = -1;
- this.zoomLast = -1;
- this.origWH = 1;
- this.origWidth = 100;
-
- if ( g_theApp.isIE )
- {
- p = document.all;
- this.s = document.all(this.id).style;
-
-
- if ( this.s )
- {
- this.s.position = "absolute";
- this.origWidth = this.s.pixelWidth;
- this.origWH = this.s.pixelWidth / this.s.pixelHeight;
- }
- }
- else
- {
- this.s = null;
- }
- SetZoomControl(this.zoomFactor);
-}
-
-function ViewMgrDefaultFind()
-{
- return;
-}
-
-function handleResize()
- {
- location.reload();
- return false;
- }
-
-function IsFrame(frameName)
- {
- return window.name == frameName;
- }
-
-function UpdNavBar()
- {
- if (g_theApp.PageUpdateFunc != null)
- g_theApp.PageUpdateFunc ();
-
- if ( parent.g_NavBarLoaded )
- //parent.frmZoomBox.UpdateNavBar();
- parent.frmNavBar.UpdateNavBar();
- }
-
-function UpdZoom()
- {
- if (g_theApp.ZoomResetFunc != null)
- g_theApp.ZoomResetFunc ();
- }
-
-function UpdCPViewer()
- {
- if (g_theApp.CPResetFunc != null)
- g_theApp.CPResetFunc ();
- }
-
-function UpdTitleBar()
- {
- if ( parent.g_TitleBarLoaded )
- parent.frmTitleBar.UpdateTitleBar();
- }
-
-function GetCurPageNum() { return g_theApp.CurrentPageIX; }
-function GetNumPages() { return g_theApp.FileList.length; }
-
-function GoToNextPage() { GoToPage(g_theApp.CurrentPageIX + 1); }
-function GoToPrevPage() { GoToPage(g_theApp.CurrentPageIX - 1); }
-function GoToFirstPage() { GoToPage(0); }
-function GoToLastPage() { GoToPage(gDocTable.length - 1) };
-
-function GoToPage(ix)
- {
- var entry;
-
- if ( (g_theApp != null) &&
- (ix != g_theApp.CurrentPageIX) &&
- (null != (entry = g_theApp.FileList[ix])) )
- {
- var newPage;
-
- if (SupportsPriOutputType ())
- {
- newPage = entry.PriImage;
-
- if ( "" == newPage )
- newPage = newPage = entry.SecImage;
- }
- else
- newPage = entry.SecImage;
-
- if (frames["frmPageView"] != null)
- {
- frames["frmPageView"].window.location = newPage;
- }
- else
- {
- parent.frmPageView.location = newPage;
- }
-
- PageUpdated (ix);
- }
- }
-
-function PageUpdated (ix)
-{
- g_theApp.CurrentPageIX = ix;
- NotifyPageSyncs(ix);
-}
-
-function GoToPageByName(pageName)
-{
- var pageIndex = PageIndexFromName (pageName);
- if (pageIndex >= 0)
- {
- GoToPage (pageIndex);
- }
-}
-
-function GoToPageByID(pageID)
-{
- var pageIndex = PageIndexFromID (pageID);
- if (pageIndex >= 0)
- {
- GoToPage (pageIndex);
- }
-}
-
-function PageIndexFromName (pageName)
-{
- if (g_theApp != null)
- {
- var entry;
-
- var count;
- var fileEntry;
- var bFoundEntry = false;
- for (count = 0;
- count < g_theApp.FileList.length && !bFoundEntry;
- count++)
- {
- fileEntry = g_theApp.FileList[count];
- if (pageName == fileEntry.PageName)
- {
- return count;
- }
- }
- }
-
- return -1;
-}
-
-function PageIndexFromID (pageID)
-{
- if (g_theApp != null)
- {
- var entry;
-
- var count;
- var fileEntry;
- var bFoundEntry = false;
- for (count = 0;
- count < g_theApp.FileList.length && !bFoundEntry;
- count++)
- {
- fileEntry = g_theApp.FileList[count];
- if (pageID == fileEntry.PageID)
- {
- return count;
- }
- }
- }
- return -1;
-}
-
-function ZoomAvailable()
-{
- if (SupportsPriOutputType () && g_theApp.FileList[0].PriImage != "")
- {
- return g_theApp.PriFormatSupportsZoom;
- }
- else
- {
- return (g_theApp.SecFormatSupportsZoom && g_theApp.FileList[0].SecImage != "");
- }
-}
-
-function NotifyPageSyncs(ix)
- {
- UpdNavBar();
- UpdTitleBar();
- UpdZoom();
- UpdCPViewer();
- }
-
-function HasPrevSld() { return (GetCurPageNum() > 0); }
-function HasNextSld() { return ((GetCurPageNum() + 1) < GetNumPages()); }
-
-function CancelDrag()
- {
- window.event.cancelBubble=true;
- window.event.returnValue=false
- }
-
-function html_escape(txt)
- {
- var result = "";
-
- for ( var i = 0 ; i < txt.length ; i++ )
- {
- if ( txt.charAt(i) == '&' )
- result += "&";
- else if ( txt.charAt(i) == '<' )
- result += "<";
- else if ( txt.charAt(i) == '>' )
- result += ">";
- else
- result += txt.charAt(i);
- }
-
- return result;
- }
-
-function FindForm(form, doc)
- {
- if ( g_theApp.isIE )
- return doc.forms[form];
- else if ( null != doc )
- {
- if ( null != doc.forms )
- {
- for ( i = 0 ; i < doc.forms.length ; i++ )
- {
- if ( form == doc.forms[i].name )
- return doc.forms[i];
- }
- }
-
- if ( null != doc.layers )
- {
- for ( i = 0 ; i < doc.layers.length ; i++ )
- {
- result = FindForm(form, doc.layers[i].document);
-
- if ( null != result )
- return result;
- }
- }
- }
-
- return null;
- }
-
-function FindLayer(layer, doc)
- {
- var result = null;
-
- if ( g_theApp.isIE )
- return doc.all(layer);
- else if ( (null != doc) && (null != doc.layers) )
- {
- for ( i = 0 ; i < doc.layers.length ; i++ )
- {
- result = doc.layers[i];
-
- if ( layer == result.name )
- return result;
-
- result = FindLayer(layer, result.document);
-
- if ( null != result )
- return result;
- }
- }
-
- return null;
- }
-
-function Unquote (str)
-{
- var nStartIndex = 0;
- var nEndIndex = str.length;
-
- if (str.charAt (0) == '"')
- {
- nStartIndex = 1;
- }
-
- if (str.charAt (nEndIndex - 1) == '"')
- {
- nEndIndex -= 1;
- }
-
- return str.substring (nStartIndex, nEndIndex);
-}
-
-function ConvertXorYCoordinate(PosValue, OldMin, OldMax, NewMin, NewMax, MapBackwards)
-{
-//This is a simple conversion routine that changes from one system to another.
- var OldMid = (OldMax - OldMin) / 2;
- var NewMid = (NewMax - NewMin) / 2;
- var ConvertResult = 1 * PosValue;
- ConvertResult = ConvertResult - (OldMin + OldMid);
- ConvertResult = ConvertResult / OldMid;
- if(MapBackwards != 0)
- {
- ConvertResult = 0 - ConvertResult;
- }
- ConvertResult = ConvertResult * NewMid;
- ConvertResult = ConvertResult + (NewMin + NewMid);
- return ConvertResult;
-}
-
-function GoToURL (defURL)
-{
- if ((g_theApp == null) || !SupportsXML () || (g_theApp.objParser == null))
- {
- if (defURL.indexOf ("javascript:") == 0)
- {
- // This is actually a function call, not a URL.
- eval (defURL);
- return;
- }
-
- parent.location = defURL;
- }
-}
-
-var el;
-function showMenu(pageID, shapeID) {
-
- if (SupportsXML ())
- {
- var shapeXML = FindShapeXML (pageID, shapeID);
- if (shapeXML != null)
- {
- CreateHLMenu (shapeXML);
-
- //ContextElement=window.event.srcElement;
- parent.frmPageView.menu1.style.leftPos += 10;
- parent.frmPageView.menu1.style.posLeft = event.clientX;
- parent.frmPageView.menu1.style.posTop = event.clientY;
- parent.frmPageView.menu1.style.display = "";
-
- var clientWidth = event.srcElement.document.body.clientWidth;
- var clientHeight = event.srcElement.document.body.clientHeight;
-
- var menuWidth = parseInt (parent.frmPageView.menu1.style.width);
- var margin = 10;
-
- // Figure out where to place the menu (X).
- var menuX = event.clientX;
- if (event.clientX + parent.frmPageView.menu1.clientWidth > clientWidth)
- {
- menuX = clientWidth - parent.frmPageView.menu1.clientWidth - margin;
- if (menuX < margin)
- {
- menuX = margin;
- }
- }
-
- // Figure out where to place the menu (Y).
- var menuY = event.clientY;
- if (event.clientY + parent.frmPageView.menu1.clientHeight > clientHeight)
- {
- menuY = clientHeight - parent.frmPageView.menu1.clientHeight - margin;
- if (menuY < margin)
- {
- menuY = margin;
- }
- }
-
- parent.frmPageView.menu1.style.posLeft = menuX;
- parent.frmPageView.menu1.style.posTop = menuY;
-
- parent.frmPageView.menu1.setCapture();
-
- event.cancelBubble = true;
- }
- }
-}
-
-function toggleMenu() {
- el=event.srcElement;
- if (el.className=="menuItem") {
- el.className="highlightItem";
- } else if (el.className=="highlightItem") {
- el.className="menuItem";
- }
-}
-
-function clickMenu()
-{
- if (parent.frmPageView.menu1.style.display != "none")
- {
- parent.frmPageView.menu1.releaseCapture();
- parent.frmPageView.menu1.style.display="none";
- el=event.srcElement;
- if (el.doFunction != null) {
- eval(el.doFunction);
- }
- }
-}
-
-function CreateHLMenu (shapeNode)
-{
- // Create the HTML string.
- var strHLMenuHTML = "";
-
- if (shapeNode != null)
- {
- // Look up all the Hyperlink nodes.
- var hlColl = shapeNode.selectNodes ("Scratch/B/SolutionXML/HLURL:Hyperlinks/HLURL:Hyperlink");
-
- // Walk the list of Hyperlink nodes to generate the menu.
- var hlCount = hlColl.length;
- for (var count = 0; count < hlCount; count++)
- {
- var strDoFunction = "";
- var strDesc = "";
- var strAddress = "";
-
- var hlAddress = hlColl.item(count).selectSingleNode("HLURL:Address/textnode()");
- if (hlAddress != null && hlAddress.text.length > 0 && IsValidAddress (hlAddress.text))
- {
- strDoFunction = "'parent.location.href=";
-
- // Get the absolute URL.
- var absoluteURL = hlColl.item(count).selectSingleNode("HLURL:AbsoluteURL/textnode()");
- if (g_theApp.DocHasBaseHL && absoluteURL != null && absoluteURL.text.length > 0)
- {
- // Use the absolute URL for our hyperlink.
- strAddress = absoluteURL.text;
- }
- else
- {
- // Just use the address field.
- strAddress = hlAddress.text;
- }
-
- strDoFunction += '"' + EscapePath (strAddress) + '"' + ";'";
-
- // Now try to get the description field. If empty, use the address as the description.
- hlDesc = hlColl.item(count).selectSingleNode("HLURL:Description/textnode()");
- if (hlDesc != null && hlDesc.text.length > 0)
- {
- strDesc = hlDesc.text;
- }
- else
- {
- strDesc = strAddress;
- }
- }
- else // Address is not present, assume it's a link into a different page in this document.
- {
- hlAddress = hlColl.item(count).selectSingleNode("HLURL:SubAddress/textnode()");
- if (hlAddress != null && hlAddress.text.length > 0)
- {
- strAddress = hlAddress.text;
-
- // Strip off the shape id (if present).
- var pageShapeSep = strAddress.lastIndexOf ('/');
- if (pageShapeSep > 0)
- {
- strAddress = strAddress.substring (0, pageShapeSep);
- }
-
- strAddress = unescape(strAddress);
-
- var pageIndex = PageIndexFromName (strAddress);
-
- strDoFunction = "'GoToPage (" + pageIndex + ");'";
-
- // Just set the description to the page name as well.
- strDesc = strAddress;
- }
- }
-
- if (strDoFunction.length > 0 && strDesc.length > 0)
- {
- strHLMenuHTML += "
";
- }
- }
- }
-
- parent.frmPageView.menu1.innerHTML = strHLMenuHTML;
-}
-
-function IsValidAddress (strAddress)
-{
- var ret = false;
-
- if (strAddress != null && strAddress.length > 0)
- {
- var strFullPath = g_theApp.VisDocPath + g_theApp.VisDocName;
-
- if (strAddress != strFullPath &&
- strAddress != g_theApp.VisDocName)
- {
- // Points to something other than this file, go ahead
- // and consider it valid.
- ret = true;
- }
- }
-
- return ret;
-}
-
-function FindShapeXML (pageID, shapeID)
-{
- var shapeObj = null;
-
- if (g_theApp != null && g_theApp.objParser != null)
- {
- // Get the Pages collection.
- var pagesObj = g_theApp.objParser.selectSingleNode("VisioDocument/Pages");
- if(!pagesObj)
- {
- return null;
- }
-
- // Get the correct page.
- var pageQuerryString = './/Page[@ID = "' + pageID + '"]';
- var pageObj = pagesObj.selectSingleNode(pageQuerryString);
- if(!pageObj)
- {
- return null;
- }
-
- // Get the correct shape.
- var shapeQuerryString = './/Shape[@ID = "' + shapeID + '"]';
- shapeObj = pageObj.selectSingleNode(shapeQuerryString);
- }
-
- return shapeObj;
-}
-
-function UpdateProps(pageID, shapeID)
-{
- // Check to see if we should ignore this event.
- if (window.event != null &&
- window.event.ctrlKey)
- {
- // If the control key is down, do nothing!
- return;
- }
-
- if (SupportsXML ())
- {
- var shape = FindShapeXML (pageID, shapeID);
-
- if (g_theApp.custPropEntryPoint != null)
- g_theApp.custPropEntryPoint (shape);
- }
-}
-
-function SupportsXML ()
-{
- return (g_theApp != null && g_theApp.isIE && g_theApp.verIE >= 5.0);
-}
-
-function SupportsPriOutputType ()
-{
- if (g_theApp.isIE) // IE
- {
- return ((g_theApp.verIE >= g_theApp.PriFormatMinIE) && (g_theApp.PriFormatMinIE > 0.0));
- }
- else if (g_theApp.isNav) // Nav
- {
- return ((g_theApp.verNav >= g_theApp.PriFormatMinNav) && (g_theApp.PriFormatMinNav > 0.0));
- }
-
- // Unsupported browser.
- return false;
-}
-
-function EscapePath (strPath)
-{
- var strResult = "";
-
- for ( var i = 0 ; i < strPath.length ; i++ )
- {
- if ( strPath.charAt(i) == '\\' )
- {
- strResult += "\\\\";
- }
- else
- {
- strResult += strPath.charAt(i);
- }
- }
-
- return strResult;
-}
+
+var g_theApp = parent.g_theApp;
+
+var layerRef="";
+var layerStyleRef = "";
+var styleSwitch = "";
+var FILEProtocol = "file://";
+var HTTPProtocol = "http://";
+
+if (navigator.appName == "Netscape")
+ {
+ layerStyleRef="layer.";
+ layerRef="document.layers";
+ styleSwitch="";
+ }
+else
+ {
+ layerStyleRef="layer.style.";
+ layerRef="document.all";
+ styleSwitch=".style";
+ }
+
+function CImage(id)
+ {
+ this.id = id;
+
+ if ( g_theApp.isIE )
+ this.image = eval('document.images.' + this.id);
+ else
+ this.image = eval('document.images["' + this.id + '"]');
+
+ this.put_Source = SetSource;
+ this.get_Source = GetSource;
+ this.put_Title = put_Title;
+ this.get_Title = get_Title;
+ }
+
+function SetSource(newsrc)
+ {
+ if ( this.image )
+ this.image.src = newsrc;
+ }
+
+function GetSource()
+ {
+ if ( this.image )
+ return this.image.src;
+ }
+
+function put_Title(txt)
+ {
+ if ( this.image && g_theApp.isIE )
+ this.image.title = txt;
+ }
+
+function get_Title(txt)
+ {
+ if ( this.image && g_theApp.isIE )
+ return this.image.title;
+ }
+
+function CDiv(id, doc)
+ {
+ this.id = id;
+ this.layer = FindLayer(id, doc);
+
+ this.Show = Show;
+ this.Hide = Hide;
+ this.IsHidden = IsHidden;
+ this.put_innerHTML = put_innerHTML;
+ }
+
+function Show()
+ {
+ if ( this.layer )
+ eval('this.' + layerStyleRef + 'visibility' + '= "visible"');
+ }
+
+function Hide()
+ {
+ if ( this.layer )
+ eval('this.' + layerStyleRef + 'visibility' + '= "hidden"');
+ }
+
+function IsHidden()
+ {
+ if ( this.layer &&
+ (-1 != eval('this.' + layerStyleRef + 'visibility').indexOf("hid")) )
+ return true;
+
+ return false;
+ }
+
+function put_innerHTML(txt)
+ {
+ if ( this.layer )
+ {
+ if ( g_theApp.isIE )
+ this.layer.innerHTML = txt;
+ else
+ {
+ this.layer.document.writeln(txt);
+ this.layer.document.close();
+ }
+ }
+ }
+
+function SetZoomControl(f)
+ {
+ if ( !parent.g_NavBarLoaded )
+ return;
+
+ var formZoom = FindForm("zoomForm", parent.frmZoomBox.document);
+ if (formZoom != null)
+ {
+ s = formZoom.zoomFactor;
+
+ if ( -1 != f )
+ f *= 100;
+
+ for ( i = 0 ; i < s.options.length ; i++ )
+ {
+ if ( s.options[i].value == f )
+ {
+ s.selectedIndex = i;
+ break;
+ }
+ }
+ }
+ }
+
+function zoom_onchange(val)
+{
+ if ( g_theApp.ActiveViewMgr )
+ {
+ if ( g_theApp.ActiveViewMgr.ZoomIsPresent == true)
+ {
+ g_theApp.ActiveViewMgr.put_Zoom(parseInt(val));
+ }
+ }
+}
+
+function CViewMgr()
+ {
+//Set all zoom functions to null assuming the addons related
+//to the data will provide their own functions.
+ this.onResize = null;
+ this.put_Zoom = null;
+ this.get_Zoom = null;
+ this.ApplyZoom = null;
+
+ //General functions.
+ this.onLoad = ViewMgrOnLoad;
+ this.put_Location = ViewMgrDefaultFind; //MUST BE SET FOR FIND FEATURE
+ this.ZoomIsPresent = false;
+ }
+
+function ViewMgrOnLoad()
+ {
+ this.id = "ConvertedImage";
+ this.zoomFactor = -1;
+ this.zoomLast = -1;
+ this.origWH = 1;
+ this.origWidth = 100;
+
+ if ( g_theApp.isIE )
+ {
+ p = document.all;
+ this.s = document.all(this.id).style;
+
+
+ if ( this.s )
+ {
+ this.s.position = "absolute";
+ this.origWidth = this.s.pixelWidth;
+ this.origWH = this.s.pixelWidth / this.s.pixelHeight;
+ }
+ }
+ else
+ {
+ this.s = null;
+ }
+ SetZoomControl(this.zoomFactor);
+}
+
+function ViewMgrDefaultFind()
+{
+ return;
+}
+
+function handleResize()
+ {
+ location.reload();
+ return false;
+ }
+
+function IsFrame(frameName)
+ {
+ return window.name == frameName;
+ }
+
+function UpdNavBar()
+ {
+ if (g_theApp.PageUpdateFunc != null)
+ g_theApp.PageUpdateFunc ();
+
+ if ( parent.g_NavBarLoaded )
+ //parent.frmZoomBox.UpdateNavBar();
+ parent.frmNavBar.UpdateNavBar();
+ }
+
+function UpdZoom()
+ {
+ if (g_theApp.ZoomResetFunc != null)
+ g_theApp.ZoomResetFunc ();
+ }
+
+function UpdCPViewer()
+ {
+ if (g_theApp.CPResetFunc != null)
+ g_theApp.CPResetFunc ();
+ }
+
+function UpdTitleBar()
+ {
+ if ( parent.g_TitleBarLoaded )
+ parent.frmTitleBar.UpdateTitleBar();
+ }
+
+function GetCurPageNum() { return g_theApp.CurrentPageIX; }
+function GetNumPages() { return g_theApp.FileList.length; }
+
+function GoToNextPage() { GoToPage(g_theApp.CurrentPageIX + 1); }
+function GoToPrevPage() { GoToPage(g_theApp.CurrentPageIX - 1); }
+function GoToFirstPage() { GoToPage(0); }
+function GoToLastPage() { GoToPage(gDocTable.length - 1) };
+
+function GoToPage(ix)
+ {
+ var entry;
+
+ if ( (g_theApp != null) &&
+ (ix != g_theApp.CurrentPageIX) &&
+ (null != (entry = g_theApp.FileList[ix])) )
+ {
+ var newPage;
+
+ if (SupportsPriOutputType ())
+ {
+ newPage = entry.PriImage;
+
+ if ( "" == newPage )
+ newPage = newPage = entry.SecImage;
+ }
+ else
+ newPage = entry.SecImage;
+
+ if (frames["frmPageView"] != null)
+ {
+ frames["frmPageView"].window.location = newPage;
+ }
+ else
+ {
+ parent.frmPageView.location = newPage;
+ }
+
+ PageUpdated (ix);
+ }
+ }
+
+function PageUpdated (ix)
+{
+ g_theApp.CurrentPageIX = ix;
+ NotifyPageSyncs(ix);
+}
+
+function GoToPageByName(pageName)
+{
+ var pageIndex = PageIndexFromName (pageName);
+ if (pageIndex >= 0)
+ {
+ GoToPage (pageIndex);
+ }
+}
+
+function GoToPageByID(pageID)
+{
+ var pageIndex = PageIndexFromID (pageID);
+ if (pageIndex >= 0)
+ {
+ GoToPage (pageIndex);
+ }
+}
+
+function PageIndexFromName (pageName)
+{
+ if (g_theApp != null)
+ {
+ var entry;
+
+ var count;
+ var fileEntry;
+ var bFoundEntry = false;
+ for (count = 0;
+ count < g_theApp.FileList.length && !bFoundEntry;
+ count++)
+ {
+ fileEntry = g_theApp.FileList[count];
+ if (pageName == fileEntry.PageName)
+ {
+ return count;
+ }
+ }
+ }
+
+ return -1;
+}
+
+function PageIndexFromID (pageID)
+{
+ if (g_theApp != null)
+ {
+ var entry;
+
+ var count;
+ var fileEntry;
+ var bFoundEntry = false;
+ for (count = 0;
+ count < g_theApp.FileList.length && !bFoundEntry;
+ count++)
+ {
+ fileEntry = g_theApp.FileList[count];
+ if (pageID == fileEntry.PageID)
+ {
+ return count;
+ }
+ }
+ }
+ return -1;
+}
+
+function ZoomAvailable()
+{
+ if (SupportsPriOutputType () && g_theApp.FileList[0].PriImage != "")
+ {
+ return g_theApp.PriFormatSupportsZoom;
+ }
+ else
+ {
+ return (g_theApp.SecFormatSupportsZoom && g_theApp.FileList[0].SecImage != "");
+ }
+}
+
+function NotifyPageSyncs(ix)
+ {
+ UpdNavBar();
+ UpdTitleBar();
+ UpdZoom();
+ UpdCPViewer();
+ }
+
+function HasPrevSld() { return (GetCurPageNum() > 0); }
+function HasNextSld() { return ((GetCurPageNum() + 1) < GetNumPages()); }
+
+function CancelDrag()
+ {
+ window.event.cancelBubble=true;
+ window.event.returnValue=false
+ }
+
+function html_escape(txt)
+ {
+ var result = "";
+
+ for ( var i = 0 ; i < txt.length ; i++ )
+ {
+ if ( txt.charAt(i) == '&' )
+ result += "&";
+ else if ( txt.charAt(i) == '<' )
+ result += "<";
+ else if ( txt.charAt(i) == '>' )
+ result += ">";
+ else
+ result += txt.charAt(i);
+ }
+
+ return result;
+ }
+
+function FindForm(form, doc)
+ {
+ if ( g_theApp.isIE )
+ return doc.forms[form];
+ else if ( null != doc )
+ {
+ if ( null != doc.forms )
+ {
+ for ( i = 0 ; i < doc.forms.length ; i++ )
+ {
+ if ( form == doc.forms[i].name )
+ return doc.forms[i];
+ }
+ }
+
+ if ( null != doc.layers )
+ {
+ for ( i = 0 ; i < doc.layers.length ; i++ )
+ {
+ result = FindForm(form, doc.layers[i].document);
+
+ if ( null != result )
+ return result;
+ }
+ }
+ }
+
+ return null;
+ }
+
+function FindLayer(layer, doc)
+ {
+ var result = null;
+
+ if ( g_theApp.isIE )
+ return doc.all(layer);
+ else if ( (null != doc) && (null != doc.layers) )
+ {
+ for ( i = 0 ; i < doc.layers.length ; i++ )
+ {
+ result = doc.layers[i];
+
+ if ( layer == result.name )
+ return result;
+
+ result = FindLayer(layer, result.document);
+
+ if ( null != result )
+ return result;
+ }
+ }
+
+ return null;
+ }
+
+function Unquote (str)
+{
+ var nStartIndex = 0;
+ var nEndIndex = str.length;
+
+ if (str.charAt (0) == '"')
+ {
+ nStartIndex = 1;
+ }
+
+ if (str.charAt (nEndIndex - 1) == '"')
+ {
+ nEndIndex -= 1;
+ }
+
+ return str.substring (nStartIndex, nEndIndex);
+}
+
+function ConvertXorYCoordinate(PosValue, OldMin, OldMax, NewMin, NewMax, MapBackwards)
+{
+//This is a simple conversion routine that changes from one system to another.
+ var OldMid = (OldMax - OldMin) / 2;
+ var NewMid = (NewMax - NewMin) / 2;
+ var ConvertResult = 1 * PosValue;
+ ConvertResult = ConvertResult - (OldMin + OldMid);
+ ConvertResult = ConvertResult / OldMid;
+ if(MapBackwards != 0)
+ {
+ ConvertResult = 0 - ConvertResult;
+ }
+ ConvertResult = ConvertResult * NewMid;
+ ConvertResult = ConvertResult + (NewMin + NewMid);
+ return ConvertResult;
+}
+
+function GoToURL (defURL)
+{
+ if ((g_theApp == null) || !SupportsXML () || (g_theApp.objParser == null))
+ {
+ if (defURL.indexOf ("javascript:") == 0)
+ {
+ // This is actually a function call, not a URL.
+ eval (defURL);
+ return;
+ }
+
+ parent.location = defURL;
+ }
+}
+
+var el;
+function showMenu(pageID, shapeID) {
+
+ if (SupportsXML ())
+ {
+ var shapeXML = FindShapeXML (pageID, shapeID);
+ if (shapeXML != null)
+ {
+ CreateHLMenu (shapeXML);
+
+ //ContextElement=window.event.srcElement;
+ parent.frmPageView.menu1.style.leftPos += 10;
+ parent.frmPageView.menu1.style.posLeft = event.clientX;
+ parent.frmPageView.menu1.style.posTop = event.clientY;
+ parent.frmPageView.menu1.style.display = "";
+
+ var clientWidth = event.srcElement.document.body.clientWidth;
+ var clientHeight = event.srcElement.document.body.clientHeight;
+
+ var menuWidth = parseInt (parent.frmPageView.menu1.style.width);
+ var margin = 10;
+
+ // Figure out where to place the menu (X).
+ var menuX = event.clientX;
+ if (event.clientX + parent.frmPageView.menu1.clientWidth > clientWidth)
+ {
+ menuX = clientWidth - parent.frmPageView.menu1.clientWidth - margin;
+ if (menuX < margin)
+ {
+ menuX = margin;
+ }
+ }
+
+ // Figure out where to place the menu (Y).
+ var menuY = event.clientY;
+ if (event.clientY + parent.frmPageView.menu1.clientHeight > clientHeight)
+ {
+ menuY = clientHeight - parent.frmPageView.menu1.clientHeight - margin;
+ if (menuY < margin)
+ {
+ menuY = margin;
+ }
+ }
+
+ parent.frmPageView.menu1.style.posLeft = menuX;
+ parent.frmPageView.menu1.style.posTop = menuY;
+
+ parent.frmPageView.menu1.setCapture();
+
+ event.cancelBubble = true;
+ }
+ }
+}
+
+function toggleMenu() {
+ el=event.srcElement;
+ if (el.className=="menuItem") {
+ el.className="highlightItem";
+ } else if (el.className=="highlightItem") {
+ el.className="menuItem";
+ }
+}
+
+function clickMenu()
+{
+ if (parent.frmPageView.menu1.style.display != "none")
+ {
+ parent.frmPageView.menu1.releaseCapture();
+ parent.frmPageView.menu1.style.display="none";
+ el=event.srcElement;
+ if (el.doFunction != null) {
+ eval(el.doFunction);
+ }
+ }
+}
+
+function CreateHLMenu (shapeNode)
+{
+ // Create the HTML string.
+ var strHLMenuHTML = "";
+
+ if (shapeNode != null)
+ {
+ // Look up all the Hyperlink nodes.
+ var hlColl = shapeNode.selectNodes ("Scratch/B/SolutionXML/HLURL:Hyperlinks/HLURL:Hyperlink");
+
+ // Walk the list of Hyperlink nodes to generate the menu.
+ var hlCount = hlColl.length;
+ for (var count = 0; count < hlCount; count++)
+ {
+ var strDoFunction = "";
+ var strDesc = "";
+ var strAddress = "";
+
+ var hlAddress = hlColl.item(count).selectSingleNode("HLURL:Address/textnode()");
+ if (hlAddress != null && hlAddress.text.length > 0 && IsValidAddress (hlAddress.text))
+ {
+ strDoFunction = "'parent.location.href=";
+
+ // Get the absolute URL.
+ var absoluteURL = hlColl.item(count).selectSingleNode("HLURL:AbsoluteURL/textnode()");
+ if (g_theApp.DocHasBaseHL && absoluteURL != null && absoluteURL.text.length > 0)
+ {
+ // Use the absolute URL for our hyperlink.
+ strAddress = absoluteURL.text;
+ }
+ else
+ {
+ // Just use the address field.
+ strAddress = hlAddress.text;
+ }
+
+ strDoFunction += '"' + EscapePath (strAddress) + '"' + ";'";
+
+ // Now try to get the description field. If empty, use the address as the description.
+ hlDesc = hlColl.item(count).selectSingleNode("HLURL:Description/textnode()");
+ if (hlDesc != null && hlDesc.text.length > 0)
+ {
+ strDesc = hlDesc.text;
+ }
+ else
+ {
+ strDesc = strAddress;
+ }
+ }
+ else // Address is not present, assume it's a link into a different page in this document.
+ {
+ hlAddress = hlColl.item(count).selectSingleNode("HLURL:SubAddress/textnode()");
+ if (hlAddress != null && hlAddress.text.length > 0)
+ {
+ strAddress = hlAddress.text;
+
+ // Strip off the shape id (if present).
+ var pageShapeSep = strAddress.lastIndexOf ('/');
+ if (pageShapeSep > 0)
+ {
+ strAddress = strAddress.substring (0, pageShapeSep);
+ }
+
+ strAddress = unescape(strAddress);
+
+ var pageIndex = PageIndexFromName (strAddress);
+
+ strDoFunction = "'GoToPage (" + pageIndex + ");'";
+
+ // Just set the description to the page name as well.
+ strDesc = strAddress;
+ }
+ }
+
+ if (strDoFunction.length > 0 && strDesc.length > 0)
+ {
+ strHLMenuHTML += "";
+ }
+ }
+ }
+
+ parent.frmPageView.menu1.innerHTML = strHLMenuHTML;
+}
+
+function IsValidAddress (strAddress)
+{
+ var ret = false;
+
+ if (strAddress != null && strAddress.length > 0)
+ {
+ var strFullPath = g_theApp.VisDocPath + g_theApp.VisDocName;
+
+ if (strAddress != strFullPath &&
+ strAddress != g_theApp.VisDocName)
+ {
+ // Points to something other than this file, go ahead
+ // and consider it valid.
+ ret = true;
+ }
+ }
+
+ return ret;
+}
+
+function FindShapeXML (pageID, shapeID)
+{
+ var shapeObj = null;
+
+ if (g_theApp != null && g_theApp.objParser != null)
+ {
+ // Get the Pages collection.
+ var pagesObj = g_theApp.objParser.selectSingleNode("VisioDocument/Pages");
+ if(!pagesObj)
+ {
+ return null;
+ }
+
+ // Get the correct page.
+ var pageQuerryString = './/Page[@ID = "' + pageID + '"]';
+ var pageObj = pagesObj.selectSingleNode(pageQuerryString);
+ if(!pageObj)
+ {
+ return null;
+ }
+
+ // Get the correct shape.
+ var shapeQuerryString = './/Shape[@ID = "' + shapeID + '"]';
+ shapeObj = pageObj.selectSingleNode(shapeQuerryString);
+ }
+
+ return shapeObj;
+}
+
+function UpdateProps(pageID, shapeID)
+{
+ // Check to see if we should ignore this event.
+ if (window.event != null &&
+ window.event.ctrlKey)
+ {
+ // If the control key is down, do nothing!
+ return;
+ }
+
+ if (SupportsXML ())
+ {
+ var shape = FindShapeXML (pageID, shapeID);
+
+ if (g_theApp.custPropEntryPoint != null)
+ g_theApp.custPropEntryPoint (shape);
+ }
+}
+
+function SupportsXML ()
+{
+ return (g_theApp != null && g_theApp.isIE && g_theApp.verIE >= 5.0);
+}
+
+function SupportsPriOutputType ()
+{
+ if (g_theApp.isIE) // IE
+ {
+ return ((g_theApp.verIE >= g_theApp.PriFormatMinIE) && (g_theApp.PriFormatMinIE > 0.0));
+ }
+ else if (g_theApp.isNav) // Nav
+ {
+ return ((g_theApp.verNav >= g_theApp.PriFormatMinNav) && (g_theApp.PriFormatMinNav > 0.0));
+ }
+
+ // Unsupported browser.
+ return false;
+}
+
+function EscapePath (strPath)
+{
+ var strResult = "";
+
+ for ( var i = 0 ; i < strPath.length ; i++ )
+ {
+ if ( strPath.charAt(i) == '\\' )
+ {
+ strResult += "\\\\";
+ }
+ else
+ {
+ strResult += strPath.charAt(i);
+ }
+ }
+
+ return strResult;
+}
diff --git a/web/public_php/admin/overlib/overlib.js b/web/public_php/admin/overlib/overlib.js
index 7fc66d4a3a..e9e1823f5e 100644
--- a/web/public_php/admin/overlib/overlib.js
+++ b/web/public_php/admin/overlib/overlib.js
@@ -1,1491 +1,1491 @@
-//\/////
-//\ overLIB 4.21 - You may not remove or change this notice.
-//\ Copyright Erik Bosrup 1998-2004. All rights reserved.
-//\
-//\ Contributors are listed on the homepage.
-//\ This file might be old, always check for the latest version at:
-//\ http://www.bosrup.com/web/overlib/
-//\
-//\ Please read the license agreement (available through the link above)
-//\ before using overLIB. Direct any licensing questions to erik@bosrup.com.
-//\
-//\ Do not sell this as your own work or remove this copyright notice.
-//\ For full details on copying or changing this script please read the
-//\ license agreement at the link above. Please give credit on sites that
-//\ use overLIB and submit changes of the script so other people can use
-//\ them as well.
-// $Revision: 1.1 $ $Date: 2006/05/29 16:38:21 $
-//\/////
-//\mini
-
-////////
-// PRE-INIT
-// Ignore these lines, configuration is below.
-////////
-var olLoaded = 0;var pmStart = 10000000; var pmUpper = 10001000; var pmCount = pmStart+1; var pmt=''; var pms = new Array(); var olInfo = new Info('4.21', 1);
-var FREPLACE = 0; var FBEFORE = 1; var FAFTER = 2; var FALTERNATE = 3; var FCHAIN=4;
-var olHideForm=0; // parameter for hiding SELECT and ActiveX elements in IE5.5+
-var olHautoFlag = 0; // flags for over-riding VAUTO and HAUTO if corresponding
-var olVautoFlag = 0; // positioning commands are used on the command line
-var hookPts = new Array(), postParse = new Array(), cmdLine = new Array(), runTime = new Array();
-// for plugins
-registerCommands('donothing,inarray,caparray,sticky,background,noclose,caption,left,right,center,offsetx,offsety,fgcolor,bgcolor,textcolor,capcolor,closecolor,width,border,cellpad,status,autostatus,autostatuscap,height,closetext,snapx,snapy,fixx,fixy,relx,rely,fgbackground,bgbackground,padx,pady,fullhtml,above,below,capicon,textfont,captionfont,closefont,textsize,captionsize,closesize,timeout,function,delay,hauto,vauto,closeclick,wrap,followmouse,mouseoff,closetitle,cssoff,compatmode,cssclass,fgclass,bgclass,textfontclass,captionfontclass,closefontclass');
-
-////////
-// DEFAULT CONFIGURATION
-// Settings you want everywhere are set here. All of this can also be
-// changed on your html page or through an overLIB call.
-////////
-if (typeof ol_fgcolor=='undefined') var ol_fgcolor="#99BBDD";
-if (typeof ol_bgcolor=='undefined') var ol_bgcolor="#7799BB";
-if (typeof ol_textcolor=='undefined') var ol_textcolor="#000000";
-if (typeof ol_capcolor=='undefined') var ol_capcolor="#000033";
-if (typeof ol_closecolor=='undefined') var ol_closecolor="#000000";
-if (typeof ol_textfont=='undefined') var ol_textfont="Verdana,Arial,Helvetica";
-if (typeof ol_captionfont=='undefined') var ol_captionfont="Verdana,Arial,Helvetica";
-if (typeof ol_closefont=='undefined') var ol_closefont="Verdana,Arial,Helvetica";
-if (typeof ol_textsize=='undefined') var ol_textsize="1";
-if (typeof ol_captionsize=='undefined') var ol_captionsize="1";
-if (typeof ol_closesize=='undefined') var ol_closesize="1";
-if (typeof ol_width=='undefined') var ol_width="200";
-if (typeof ol_border=='undefined') var ol_border="1";
-if (typeof ol_cellpad=='undefined') var ol_cellpad=2;
-if (typeof ol_offsetx=='undefined') var ol_offsetx=10;
-if (typeof ol_offsety=='undefined') var ol_offsety=10;
-if (typeof ol_text=='undefined') var ol_text="Default Text";
-if (typeof ol_cap=='undefined') var ol_cap="";
-if (typeof ol_sticky=='undefined') var ol_sticky=0;
-if (typeof ol_background=='undefined') var ol_background="";
-if (typeof ol_close=='undefined') var ol_close="Close";
-if (typeof ol_hpos=='undefined') var ol_hpos=RIGHT;
-if (typeof ol_status=='undefined') var ol_status="";
-if (typeof ol_autostatus=='undefined') var ol_autostatus=0;
-if (typeof ol_height=='undefined') var ol_height=-1;
-if (typeof ol_snapx=='undefined') var ol_snapx=0;
-if (typeof ol_snapy=='undefined') var ol_snapy=0;
-if (typeof ol_fixx=='undefined') var ol_fixx=-1;
-if (typeof ol_fixy=='undefined') var ol_fixy=-1;
-if (typeof ol_relx=='undefined') var ol_relx=null;
-if (typeof ol_rely=='undefined') var ol_rely=null;
-if (typeof ol_fgbackground=='undefined') var ol_fgbackground="";
-if (typeof ol_bgbackground=='undefined') var ol_bgbackground="";
-if (typeof ol_padxl=='undefined') var ol_padxl=1;
-if (typeof ol_padxr=='undefined') var ol_padxr=1;
-if (typeof ol_padyt=='undefined') var ol_padyt=1;
-if (typeof ol_padyb=='undefined') var ol_padyb=1;
-if (typeof ol_fullhtml=='undefined') var ol_fullhtml=0;
-if (typeof ol_vpos=='undefined') var ol_vpos=BELOW;
-if (typeof ol_aboveheight=='undefined') var ol_aboveheight=0;
-if (typeof ol_capicon=='undefined') var ol_capicon="";
-if (typeof ol_frame=='undefined') var ol_frame=self;
-if (typeof ol_timeout=='undefined') var ol_timeout=0;
-if (typeof ol_function=='undefined') var ol_function=null;
-if (typeof ol_delay=='undefined') var ol_delay=0;
-if (typeof ol_hauto=='undefined') var ol_hauto=0;
-if (typeof ol_vauto=='undefined') var ol_vauto=0;
-if (typeof ol_closeclick=='undefined') var ol_closeclick=0;
-if (typeof ol_wrap=='undefined') var ol_wrap=0;
-if (typeof ol_followmouse=='undefined') var ol_followmouse=1;
-if (typeof ol_mouseoff=='undefined') var ol_mouseoff=0;
-if (typeof ol_closetitle=='undefined') var ol_closetitle='Close';
-if (typeof ol_compatmode=='undefined') var ol_compatmode=0;
-if (typeof ol_css=='undefined') var ol_css=CSSOFF;
-if (typeof ol_fgclass=='undefined') var ol_fgclass="";
-if (typeof ol_bgclass=='undefined') var ol_bgclass="";
-if (typeof ol_textfontclass=='undefined') var ol_textfontclass="";
-if (typeof ol_captionfontclass=='undefined') var ol_captionfontclass="";
-if (typeof ol_closefontclass=='undefined') var ol_closefontclass="";
-
-////////
-// ARRAY CONFIGURATION
-////////
-
-// You can use these arrays to store popup text here instead of in the html.
-if (typeof ol_texts=='undefined') var ol_texts = new Array("Text 0", "Text 1");
-if (typeof ol_caps=='undefined') var ol_caps = new Array("Caption 0", "Caption 1");
-
-////////
-// END OF CONFIGURATION
-// Don't change anything below this line, all configuration is above.
-////////
-
-
-
-
-
-////////
-// INIT
-////////
-// Runtime variables init. Don't change for config!
-var o3_text="";
-var o3_cap="";
-var o3_sticky=0;
-var o3_background="";
-var o3_close="Close";
-var o3_hpos=RIGHT;
-var o3_offsetx=2;
-var o3_offsety=2;
-var o3_fgcolor="";
-var o3_bgcolor="";
-var o3_textcolor="";
-var o3_capcolor="";
-var o3_closecolor="";
-var o3_width=100;
-var o3_border=1;
-var o3_cellpad=2;
-var o3_status="";
-var o3_autostatus=0;
-var o3_height=-1;
-var o3_snapx=0;
-var o3_snapy=0;
-var o3_fixx=-1;
-var o3_fixy=-1;
-var o3_relx=null;
-var o3_rely=null;
-var o3_fgbackground="";
-var o3_bgbackground="";
-var o3_padxl=0;
-var o3_padxr=0;
-var o3_padyt=0;
-var o3_padyb=0;
-var o3_fullhtml=0;
-var o3_vpos=BELOW;
-var o3_aboveheight=0;
-var o3_capicon="";
-var o3_textfont="Verdana,Arial,Helvetica";
-var o3_captionfont="Verdana,Arial,Helvetica";
-var o3_closefont="Verdana,Arial,Helvetica";
-var o3_textsize="1";
-var o3_captionsize="1";
-var o3_closesize="1";
-var o3_frame=self;
-var o3_timeout=0;
-var o3_timerid=0;
-var o3_allowmove=0;
-var o3_function=null;
-var o3_delay=0;
-var o3_delayid=0;
-var o3_hauto=0;
-var o3_vauto=0;
-var o3_closeclick=0;
-var o3_wrap=0;
-var o3_followmouse=1;
-var o3_mouseoff=0;
-var o3_closetitle='';
-var o3_compatmode=0;
-var o3_css=CSSOFF;
-var o3_fgclass="";
-var o3_bgclass="";
-var o3_textfontclass="";
-var o3_captionfontclass="";
-var o3_closefontclass="";
-
-// Display state variables
-var o3_x = 0;
-var o3_y = 0;
-var o3_showingsticky = 0;
-var o3_removecounter = 0;
-
-// Our layer
-var over = null;
-var fnRef, hoveringSwitch = false;
-var olHideDelay;
-
-// Decide browser version
-var isMac = (navigator.userAgent.indexOf("Mac") != -1);
-var olOp = (navigator.userAgent.toLowerCase().indexOf('opera') > -1 && document.createTextNode); // Opera 7
-var olNs4 = (navigator.appName=='Netscape' && parseInt(navigator.appVersion) == 4);
-var olNs6 = (document.getElementById) ? true : false;
-var olKq = (olNs6 && /konqueror/i.test(navigator.userAgent));
-var olIe4 = (document.all) ? true : false;
-var olIe5 = false;
-var olIe55 = false; // Added additional variable to identify IE5.5+
-var docRoot = 'document.body';
-
-// Resize fix for NS4.x to keep track of layer
-if (olNs4) {
- var oW = window.innerWidth;
- var oH = window.innerHeight;
- window.onresize = function() { if (oW != window.innerWidth || oH != window.innerHeight) location.reload(); }
-}
-
-// Microsoft Stupidity Check(tm).
-if (olIe4) {
- var agent = navigator.userAgent;
- if (/MSIE/.test(agent)) {
- var versNum = parseFloat(agent.match(/MSIE[ ](\d\.\d+)\.*/i)[1]);
- if (versNum >= 5){
- olIe5=true;
- olIe55=(versNum>=5.5&&!olOp) ? true : false;
- if (olNs6) olNs6=false;
- }
- }
- if (olNs6) olIe4 = false;
-}
-
-// Check for compatability mode.
-if (document.compatMode && document.compatMode == 'CSS1Compat') {
- docRoot= ((olIe4 && !olOp) ? 'document.documentElement' : docRoot);
-}
-
-// Add window onload handlers to indicate when all modules have been loaded
-// For Netscape 6+ and Mozilla, uses addEventListener method on the window object
-// For IE it uses the attachEvent method of the window object and for Netscape 4.x
-// it sets the window.onload handler to the OLonload_handler function for Bubbling
-if(window.addEventListener) window.addEventListener("load",OLonLoad_handler,false);
-else if (window.attachEvent) window.attachEvent("onload",OLonLoad_handler);
-
-var capExtent;
-
-////////
-// PUBLIC FUNCTIONS
-////////
-
-// overlib(arg0,...,argN)
-// Loads parameters into global runtime variables.
-function overlib() {
- if (!olLoaded || isExclusive(overlib.arguments)) return true;
- if (olCheckMouseCapture) olMouseCapture();
- if (over) {
- over = (typeof over.id != 'string') ? o3_frame.document.all['overDiv'] : over;
- cClick();
- }
-
- // Load defaults to runtime.
- olHideDelay=0;
- o3_text=ol_text;
- o3_cap=ol_cap;
- o3_sticky=ol_sticky;
- o3_background=ol_background;
- o3_close=ol_close;
- o3_hpos=ol_hpos;
- o3_offsetx=ol_offsetx;
- o3_offsety=ol_offsety;
- o3_fgcolor=ol_fgcolor;
- o3_bgcolor=ol_bgcolor;
- o3_textcolor=ol_textcolor;
- o3_capcolor=ol_capcolor;
- o3_closecolor=ol_closecolor;
- o3_width=ol_width;
- o3_border=ol_border;
- o3_cellpad=ol_cellpad;
- o3_status=ol_status;
- o3_autostatus=ol_autostatus;
- o3_height=ol_height;
- o3_snapx=ol_snapx;
- o3_snapy=ol_snapy;
- o3_fixx=ol_fixx;
- o3_fixy=ol_fixy;
- o3_relx=ol_relx;
- o3_rely=ol_rely;
- o3_fgbackground=ol_fgbackground;
- o3_bgbackground=ol_bgbackground;
- o3_padxl=ol_padxl;
- o3_padxr=ol_padxr;
- o3_padyt=ol_padyt;
- o3_padyb=ol_padyb;
- o3_fullhtml=ol_fullhtml;
- o3_vpos=ol_vpos;
- o3_aboveheight=ol_aboveheight;
- o3_capicon=ol_capicon;
- o3_textfont=ol_textfont;
- o3_captionfont=ol_captionfont;
- o3_closefont=ol_closefont;
- o3_textsize=ol_textsize;
- o3_captionsize=ol_captionsize;
- o3_closesize=ol_closesize;
- o3_timeout=ol_timeout;
- o3_function=ol_function;
- o3_delay=ol_delay;
- o3_hauto=ol_hauto;
- o3_vauto=ol_vauto;
- o3_closeclick=ol_closeclick;
- o3_wrap=ol_wrap;
- o3_followmouse=ol_followmouse;
- o3_mouseoff=ol_mouseoff;
- o3_closetitle=ol_closetitle;
- o3_css=ol_css;
- o3_compatmode=ol_compatmode;
- o3_fgclass=ol_fgclass;
- o3_bgclass=ol_bgclass;
- o3_textfontclass=ol_textfontclass;
- o3_captionfontclass=ol_captionfontclass;
- o3_closefontclass=ol_closefontclass;
-
- setRunTimeVariables();
-
- fnRef = '';
-
- // Special for frame support, over must be reset...
- o3_frame = ol_frame;
-
- if(!(over=createDivContainer())) return false;
-
- parseTokens('o3_', overlib.arguments);
- if (!postParseChecks()) return false;
-
- if (o3_delay == 0) {
- return runHook("olMain", FREPLACE);
- } else {
- o3_delayid = setTimeout("runHook('olMain', FREPLACE)", o3_delay);
- return false;
- }
-}
-
-// Clears popups if appropriate
-function nd(time) {
- if (olLoaded && !isExclusive()) {
- hideDelay(time); // delay popup close if time specified
-
- if (o3_removecounter >= 1) { o3_showingsticky = 0 };
-
- if (o3_showingsticky == 0) {
- o3_allowmove = 0;
- if (over != null && o3_timerid == 0) runHook("hideObject", FREPLACE, over);
- } else {
- o3_removecounter++;
- }
- }
-
- return true;
-}
-
-// The Close onMouseOver function for stickies
-function cClick() {
- if (olLoaded) {
- runHook("hideObject", FREPLACE, over);
- o3_showingsticky = 0;
- }
- return false;
-}
-
-// Method for setting page specific defaults.
-function overlib_pagedefaults() {
- parseTokens('ol_', overlib_pagedefaults.arguments);
-}
-
-
-////////
-// OVERLIB MAIN FUNCTION
-////////
-
-// This function decides what it is we want to display and how we want it done.
-function olMain() {
- var layerhtml, styleType;
- runHook("olMain", FBEFORE);
-
- if (o3_background!="" || o3_fullhtml) {
- // Use background instead of box.
- layerhtml = runHook('ol_content_background', FALTERNATE, o3_css, o3_text, o3_background, o3_fullhtml);
- } else {
- // They want a popup box.
- styleType = (pms[o3_css-1-pmStart] == "cssoff" || pms[o3_css-1-pmStart] == "cssclass");
-
- // Prepare popup background
- if (o3_fgbackground != "") o3_fgbackground = "background=\""+o3_fgbackground+"\"";
- if (o3_bgbackground != "") o3_bgbackground = (styleType ? "background=\""+o3_bgbackground+"\"" : o3_bgbackground);
-
- // Prepare popup colors
- if (o3_fgcolor != "") o3_fgcolor = (styleType ? "bgcolor=\""+o3_fgcolor+"\"" : o3_fgcolor);
- if (o3_bgcolor != "") o3_bgcolor = (styleType ? "bgcolor=\""+o3_bgcolor+"\"" : o3_bgcolor);
-
- // Prepare popup height
- if (o3_height > 0) o3_height = (styleType ? "height=\""+o3_height+"\"" : o3_height);
- else o3_height = "";
-
- // Decide which kinda box.
- if (o3_cap=="") {
- // Plain
- layerhtml = runHook('ol_content_simple', FALTERNATE, o3_css, o3_text);
- } else {
- // With caption
- if (o3_sticky) {
- // Show close text
- layerhtml = runHook('ol_content_caption', FALTERNATE, o3_css, o3_text, o3_cap, o3_close);
- } else {
- // No close text
- layerhtml = runHook('ol_content_caption', FALTERNATE, o3_css, o3_text, o3_cap, "");
- }
- }
- }
-
- // We want it to stick!
- if (o3_sticky) {
- if (o3_timerid > 0) {
- clearTimeout(o3_timerid);
- o3_timerid = 0;
- }
- o3_showingsticky = 1;
- o3_removecounter = 0;
- }
-
- // Created a separate routine to generate the popup to make it easier
- // to implement a plugin capability
- if (!runHook("createPopup", FREPLACE, layerhtml)) return false;
-
- // Prepare status bar
- if (o3_autostatus > 0) {
- o3_status = o3_text;
- if (o3_autostatus > 1) o3_status = o3_cap;
- }
-
- // When placing the layer the first time, even stickies may be moved.
- o3_allowmove = 0;
-
- // Initiate a timer for timeout
- if (o3_timeout > 0) {
- if (o3_timerid > 0) clearTimeout(o3_timerid);
- o3_timerid = setTimeout("cClick()", o3_timeout);
- }
-
- // Show layer
- runHook("disp", FREPLACE, o3_status);
- runHook("olMain", FAFTER);
-
- return (olOp && event && event.type == 'mouseover' && !o3_status) ? '' : (o3_status != '');
-}
-
-////////
-// LAYER GENERATION FUNCTIONS
-////////
-// These functions just handle popup content with tags that should adhere to the W3C standards specification.
-
-// Makes simple table without caption
-function ol_content_simple(text) {
- var cpIsMultiple = /,/.test(o3_cellpad);
- var txt = '' : ((!olNs4&&cpIsMultiple) ? ' style="'+setCellPadStr(o3_cellpad)+'">' : '>'))+(o3_textfontclass ? '' : wrapStr(0,o3_textsize,'text'))+text+(o3_textfontclass ? '' : wrapStr(1,o3_textsize))+' |
|
';
-
- set_background("");
- return txt;
-}
-
-// Makes table with caption and optional close link
-function ol_content_caption(text,title,close) {
- var nameId, txt, cpIsMultiple = /,/.test(o3_cellpad);
- var closing, closeevent;
-
- closing = "";
- closeevent = "onmouseover";
- if (o3_closeclick == 1) closeevent = (o3_closetitle ? "title='" + o3_closetitle +"'" : "") + " onclick";
- if (o3_capicon != "") {
- nameId = ' hspace = \"5\"'+' align = \"middle\" alt = \"\"';
- if (typeof o3_dragimg != 'undefined' && o3_dragimg) nameId =' hspace=\"5\"'+' name=\"'+o3_dragimg+'\" id=\"'+o3_dragimg+'\" align=\"middle\" alt=\"Drag Enabled\" title=\"Drag Enabled\"';
- o3_capicon = '';
- }
-
- if (close != "")
- closing = ''+(o3_closefontclass ? '' : wrapStr(0,o3_closesize,'close'))+close+(o3_closefontclass ? '' : wrapStr(1,o3_closesize,'close'))+' | ';
- txt = '' : '>')+(o3_captionfontclass ? '' : ''+wrapStr(0,o3_captionsize,'caption'))+o3_capicon+title+(o3_captionfontclass ? '' : wrapStr(1,o3_captionsize)+'')+' | '+closing+'
' :((!olNs4&&cpIsMultiple) ? ' style="'+setCellPadStr(o3_cellpad)+'">' : '>'))+(o3_textfontclass ? '' : wrapStr(0,o3_textsize,'text'))+text+(o3_textfontclass ? '' : wrapStr(1,o3_textsize)) + ' |
|
';
-
- set_background("");
- return txt;
-}
-
-// Sets the background picture,padding and lots more. :)
-function ol_content_background(text,picture,hasfullhtml) {
- if (hasfullhtml) {
- txt=text;
- } else {
- txt=' |
| '+(o3_textfontclass ? '' : wrapStr(0,o3_textsize,'text'))+text+(o3_textfontclass ? '' : wrapStr(1,o3_textsize))+' | |
|
';
- }
-
- set_background(picture);
- return txt;
-}
-
-// Loads a picture into the div.
-function set_background(pic) {
- if (pic == "") {
- if (olNs4) {
- over.background.src = null;
- } else if (over.style) {
- over.style.backgroundImage = "none";
- }
- } else {
- if (olNs4) {
- over.background.src = pic;
- } else if (over.style) {
- over.style.width=o3_width + 'px';
- over.style.backgroundImage = "url("+pic+")";
- }
- }
-}
-
-////////
-// HANDLING FUNCTIONS
-////////
-var olShowId=-1;
-
-// Displays the popup
-function disp(statustext) {
- runHook("disp", FBEFORE);
-
- if (o3_allowmove == 0) {
- runHook("placeLayer", FREPLACE);
- (olNs6&&olShowId<0) ? olShowId=setTimeout("runHook('showObject', FREPLACE, over)", 1) : runHook("showObject", FREPLACE, over);
- o3_allowmove = (o3_sticky || o3_followmouse==0) ? 0 : 1;
- }
-
- runHook("disp", FAFTER);
-
- if (statustext != "") self.status = statustext;
-}
-
-// Creates the actual popup structure
-function createPopup(lyrContent){
- runHook("createPopup", FBEFORE);
-
- if (o3_wrap) {
- var wd,ww,theObj = (olNs4 ? over : over.style);
- theObj.top = theObj.left = ((olIe4&&!olOp) ? 0 : -10000) + (!olNs4 ? 'px' : 0);
- layerWrite(lyrContent);
- wd = (olNs4 ? over.clip.width : over.offsetWidth);
- if (wd > (ww=windowWidth())) {
- lyrContent=lyrContent.replace(/\ /g, ' ');
- o3_width=ww;
- o3_wrap=0;
- }
- }
-
- layerWrite(lyrContent);
-
- // Have to set o3_width for placeLayer() routine if o3_wrap is turned on
- if (o3_wrap) o3_width=(olNs4 ? over.clip.width : over.offsetWidth);
-
- runHook("createPopup", FAFTER, lyrContent);
-
- return true;
-}
-
-// Decides where we want the popup.
-function placeLayer() {
- var placeX, placeY, widthFix = 0;
-
- // HORIZONTAL PLACEMENT, re-arranged to work in Safari
- if (o3_frame.innerWidth) widthFix=18;
- iwidth = windowWidth();
-
- // Horizontal scroll offset
- winoffset=(olIe4) ? eval('o3_frame.'+docRoot+'.scrollLeft') : o3_frame.pageXOffset;
-
- placeX = runHook('horizontalPlacement',FCHAIN,iwidth,winoffset,widthFix);
-
- // VERTICAL PLACEMENT, re-arranged to work in Safari
- if (o3_frame.innerHeight) {
- iheight=o3_frame.innerHeight;
- } else if (eval('o3_frame.'+docRoot)&&eval("typeof o3_frame."+docRoot+".clientHeight=='number'")&&eval('o3_frame.'+docRoot+'.clientHeight')) {
- iheight=eval('o3_frame.'+docRoot+'.clientHeight');
- }
-
- // Vertical scroll offset
- scrolloffset=(olIe4) ? eval('o3_frame.'+docRoot+'.scrollTop') : o3_frame.pageYOffset;
- placeY = runHook('verticalPlacement',FCHAIN,iheight,scrolloffset);
-
- // Actually move the object.
- repositionTo(over, placeX, placeY);
-}
-
-// Moves the layer
-function olMouseMove(e) {
- var e = (e) ? e : event;
-
- if (e.pageX) {
- o3_x = e.pageX;
- o3_y = e.pageY;
- } else if (e.clientX) {
- o3_x = eval('e.clientX+o3_frame.'+docRoot+'.scrollLeft');
- o3_y = eval('e.clientY+o3_frame.'+docRoot+'.scrollTop');
- }
-
- if (o3_allowmove == 1) runHook("placeLayer", FREPLACE);
-
- // MouseOut handler
- if (hoveringSwitch && !olNs4 && runHook("cursorOff", FREPLACE)) {
- (olHideDelay ? hideDelay(olHideDelay) : cClick());
- hoveringSwitch = !hoveringSwitch;
- }
-}
-
-// Fake function for 3.0 users.
-function no_overlib() { return ver3fix; }
-
-// Capture the mouse and chain other scripts.
-function olMouseCapture() {
- capExtent = document;
- var fN, str = '', l, k, f, wMv, sS, mseHandler = olMouseMove;
- var re = /function[ ]*(\w*)\(/;
-
- wMv = (!olIe4 && window.onmousemove);
- if (document.onmousemove || wMv) {
- if (wMv) capExtent = window;
- f = capExtent.onmousemove.toString();
- fN = f.match(re);
- if (fN == null) {
- str = f+'(e); ';
- } else if (fN[1] == 'anonymous' || fN[1] == 'olMouseMove' || (wMv && fN[1] == 'onmousemove')) {
- if (!olOp && wMv) {
- l = f.indexOf('{')+1;
- k = f.lastIndexOf('}');
- sS = f.substring(l,k);
- if ((l = sS.indexOf('(')) != -1) {
- sS = sS.substring(0,l).replace(/^\s+/,'').replace(/\s+$/,'');
- if (eval("typeof " + sS + " == 'undefined'")) window.onmousemove = null;
- else str = sS + '(e);';
- }
- }
- if (!str) {
- olCheckMouseCapture = false;
- return;
- }
- } else {
- if (fN[1]) str = fN[1]+'(e); ';
- else {
- l = f.indexOf('{')+1;
- k = f.lastIndexOf('}');
- str = f.substring(l,k) + '\n';
- }
- }
- str += 'olMouseMove(e); ';
- mseHandler = new Function('e', str);
- }
-
- capExtent.onmousemove = mseHandler;
- if (olNs4) capExtent.captureEvents(Event.MOUSEMOVE);
-}
-
-////////
-// PARSING FUNCTIONS
-////////
-
-// Does the actual command parsing.
-function parseTokens(pf, ar) {
- // What the next argument is expected to be.
- var v, i, mode=-1, par = (pf != 'ol_');
- var fnMark = (par && !ar.length ? 1 : 0);
-
- for (i = 0; i < ar.length; i++) {
- if (mode < 0) {
- // Arg is maintext,unless its a number between pmStart and pmUpper
- // then its a command.
- if (typeof ar[i] == 'number' && ar[i] > pmStart && ar[i] < pmUpper) {
- fnMark = (par ? 1 : 0);
- i--; // backup one so that the next block can parse it
- } else {
- switch(pf) {
- case 'ol_':
- ol_text = ar[i].toString();
- break;
- default:
- o3_text=ar[i].toString();
- }
- }
- mode = 0;
- } else {
- // Note: NS4 doesn't like switch cases with vars.
- if (ar[i] >= pmCount || ar[i]==DONOTHING) { continue; }
- if (ar[i]==INARRAY) { fnMark = 0; eval(pf+'text=ol_texts['+ar[++i]+'].toString()'); continue; }
- if (ar[i]==CAPARRAY) { eval(pf+'cap=ol_caps['+ar[++i]+'].toString()'); continue; }
- if (ar[i]==STICKY) { if (pf!='ol_') eval(pf+'sticky=1'); continue; }
- if (ar[i]==BACKGROUND) { eval(pf+'background="'+ar[++i]+'"'); continue; }
- if (ar[i]==NOCLOSE) { if (pf!='ol_') opt_NOCLOSE(); continue; }
- if (ar[i]==CAPTION) { eval(pf+"cap='"+escSglQuote(ar[++i])+"'"); continue; }
- if (ar[i]==CENTER || ar[i]==LEFT || ar[i]==RIGHT) { eval(pf+'hpos='+ar[i]); if(pf!='ol_') olHautoFlag=1; continue; }
- if (ar[i]==OFFSETX) { eval(pf+'offsetx='+ar[++i]); continue; }
- if (ar[i]==OFFSETY) { eval(pf+'offsety='+ar[++i]); continue; }
- if (ar[i]==FGCOLOR) { eval(pf+'fgcolor="'+ar[++i]+'"'); continue; }
- if (ar[i]==BGCOLOR) { eval(pf+'bgcolor="'+ar[++i]+'"'); continue; }
- if (ar[i]==TEXTCOLOR) { eval(pf+'textcolor="'+ar[++i]+'"'); continue; }
- if (ar[i]==CAPCOLOR) { eval(pf+'capcolor="'+ar[++i]+'"'); continue; }
- if (ar[i]==CLOSECOLOR) { eval(pf+'closecolor="'+ar[++i]+'"'); continue; }
- if (ar[i]==WIDTH) { eval(pf+'width='+ar[++i]); continue; }
- if (ar[i]==BORDER) { eval(pf+'border='+ar[++i]); continue; }
- if (ar[i]==CELLPAD) { i=opt_MULTIPLEARGS(++i,ar,(pf+'cellpad')); continue; }
- if (ar[i]==STATUS) { eval(pf+"status='"+escSglQuote(ar[++i])+"'"); continue; }
- if (ar[i]==AUTOSTATUS) { eval(pf +'autostatus=('+pf+'autostatus == 1) ? 0 : 1'); continue; }
- if (ar[i]==AUTOSTATUSCAP) { eval(pf +'autostatus=('+pf+'autostatus == 2) ? 0 : 2'); continue; }
- if (ar[i]==HEIGHT) { eval(pf+'height='+pf+'aboveheight='+ar[++i]); continue; } // Same param again.
- if (ar[i]==CLOSETEXT) { eval(pf+"close='"+escSglQuote(ar[++i])+"'"); continue; }
- if (ar[i]==SNAPX) { eval(pf+'snapx='+ar[++i]); continue; }
- if (ar[i]==SNAPY) { eval(pf+'snapy='+ar[++i]); continue; }
- if (ar[i]==FIXX) { eval(pf+'fixx='+ar[++i]); continue; }
- if (ar[i]==FIXY) { eval(pf+'fixy='+ar[++i]); continue; }
- if (ar[i]==RELX) { eval(pf+'relx='+ar[++i]); continue; }
- if (ar[i]==RELY) { eval(pf+'rely='+ar[++i]); continue; }
- if (ar[i]==FGBACKGROUND) { eval(pf+'fgbackground="'+ar[++i]+'"'); continue; }
- if (ar[i]==BGBACKGROUND) { eval(pf+'bgbackground="'+ar[++i]+'"'); continue; }
- if (ar[i]==PADX) { eval(pf+'padxl='+ar[++i]); eval(pf+'padxr='+ar[++i]); continue; }
- if (ar[i]==PADY) { eval(pf+'padyt='+ar[++i]); eval(pf+'padyb='+ar[++i]); continue; }
- if (ar[i]==FULLHTML) { if (pf!='ol_') eval(pf+'fullhtml=1'); continue; }
- if (ar[i]==BELOW || ar[i]==ABOVE) { eval(pf+'vpos='+ar[i]); if (pf!='ol_') olVautoFlag=1; continue; }
- if (ar[i]==CAPICON) { eval(pf+'capicon="'+ar[++i]+'"'); continue; }
- if (ar[i]==TEXTFONT) { eval(pf+"textfont='"+escSglQuote(ar[++i])+"'"); continue; }
- if (ar[i]==CAPTIONFONT) { eval(pf+"captionfont='"+escSglQuote(ar[++i])+"'"); continue; }
- if (ar[i]==CLOSEFONT) { eval(pf+"closefont='"+escSglQuote(ar[++i])+"'"); continue; }
- if (ar[i]==TEXTSIZE) { eval(pf+'textsize="'+ar[++i]+'"'); continue; }
- if (ar[i]==CAPTIONSIZE) { eval(pf+'captionsize="'+ar[++i]+'"'); continue; }
- if (ar[i]==CLOSESIZE) { eval(pf+'closesize="'+ar[++i]+'"'); continue; }
- if (ar[i]==TIMEOUT) { eval(pf+'timeout='+ar[++i]); continue; }
- if (ar[i]==FUNCTION) { if (pf=='ol_') { if (typeof ar[i+1]!='number') { v=ar[++i]; ol_function=(typeof v=='function' ? v : null); }} else {fnMark = 0; v = null; if (typeof ar[i+1]!='number') v = ar[++i]; opt_FUNCTION(v); } continue; }
- if (ar[i]==DELAY) { eval(pf+'delay='+ar[++i]); continue; }
- if (ar[i]==HAUTO) { eval(pf+'hauto=('+pf+'hauto == 0) ? 1 : 0'); continue; }
- if (ar[i]==VAUTO) { eval(pf+'vauto=('+pf+'vauto == 0) ? 1 : 0'); continue; }
- if (ar[i]==CLOSECLICK) { eval(pf +'closeclick=('+pf+'closeclick == 0) ? 1 : 0'); continue; }
- if (ar[i]==WRAP) { eval(pf +'wrap=('+pf+'wrap == 0) ? 1 : 0'); continue; }
- if (ar[i]==FOLLOWMOUSE) { eval(pf +'followmouse=('+pf+'followmouse == 1) ? 0 : 1'); continue; }
- if (ar[i]==MOUSEOFF) { eval(pf +'mouseoff=('+pf+'mouseoff==0) ? 1 : 0'); v=ar[i+1]; if (pf != 'ol_' && eval(pf+'mouseoff') && typeof v == 'number' && (v < pmStart || v > pmUpper)) olHideDelay=ar[++i]; continue; }
- if (ar[i]==CLOSETITLE) { eval(pf+"closetitle='"+escSglQuote(ar[++i])+"'"); continue; }
- if (ar[i]==CSSOFF||ar[i]==CSSCLASS) { eval(pf+'css='+ar[i]); continue; }
- if (ar[i]==COMPATMODE) { eval(pf+'compatmode=('+pf+'compatmode==0) ? 1 : 0'); continue; }
- if (ar[i]==FGCLASS) { eval(pf+'fgclass="'+ar[++i]+'"'); continue; }
- if (ar[i]==BGCLASS) { eval(pf+'bgclass="'+ar[++i]+'"'); continue; }
- if (ar[i]==TEXTFONTCLASS) { eval(pf+'textfontclass="'+ar[++i]+'"'); continue; }
- if (ar[i]==CAPTIONFONTCLASS) { eval(pf+'captionfontclass="'+ar[++i]+'"'); continue; }
- if (ar[i]==CLOSEFONTCLASS) { eval(pf+'closefontclass="'+ar[++i]+'"'); continue; }
- i = parseCmdLine(pf, i, ar);
- }
- }
-
- if (fnMark && o3_function) o3_text = o3_function();
-
- if ((pf == 'o3_') && o3_wrap) {
- o3_width = 0;
-
- var tReg=/<.*\n*>/ig;
- if (!tReg.test(o3_text)) o3_text = o3_text.replace(/[ ]+/g, ' ');
- if (!tReg.test(o3_cap))o3_cap = o3_cap.replace(/[ ]+/g, ' ');
- }
- if ((pf == 'o3_') && o3_sticky) {
- if (!o3_close && (o3_frame != ol_frame)) o3_close = ol_close;
- if (o3_mouseoff && (o3_frame == ol_frame)) opt_NOCLOSE(' ');
- }
-}
-
-
-////////
-// LAYER FUNCTIONS
-////////
-
-// Writes to a layer
-function layerWrite(txt) {
- txt += "\n";
- if (olNs4) {
- var lyr = o3_frame.document.layers['overDiv'].document
- lyr.write(txt)
- lyr.close()
- } else if (typeof over.innerHTML != 'undefined') {
- if (olIe5 && isMac) over.innerHTML = '';
- over.innerHTML = txt;
- } else {
- range = o3_frame.document.createRange();
- range.setStartAfter(over);
- domfrag = range.createContextualFragment(txt);
-
- while (over.hasChildNodes()) {
- over.removeChild(over.lastChild);
- }
-
- over.appendChild(domfrag);
- }
-}
-
-// Make an object visible
-function showObject(obj) {
- runHook("showObject", FBEFORE);
-
- var theObj=(olNs4 ? obj : obj.style);
- theObj.visibility = 'visible';
-
- runHook("showObject", FAFTER);
-}
-
-// Hides an object
-function hideObject(obj) {
- runHook("hideObject", FBEFORE);
-
- var theObj=(olNs4 ? obj : obj.style);
- if (olNs6 && olShowId>0) { clearTimeout(olShowId); olShowId=0; }
- theObj.visibility = 'hidden';
- theObj.top = theObj.left = ((olIe4&&!olOp) ? 0 : -10000) + (!olNs4 ? 'px' : 0);
-
- if (o3_timerid > 0) clearTimeout(o3_timerid);
- if (o3_delayid > 0) clearTimeout(o3_delayid);
-
- o3_timerid = 0;
- o3_delayid = 0;
- self.status = "";
-
- if (obj.onmouseout||obj.onmouseover) {
- if (olNs4) obj.releaseEvents(Event.MOUSEOUT || Event.MOUSEOVER);
- obj.onmouseout = obj.onmouseover = null;
- }
-
- runHook("hideObject", FAFTER);
-}
-
-// Move a layer
-function repositionTo(obj, xL, yL) {
- var theObj=(olNs4 ? obj : obj.style);
- theObj.left = xL + (!olNs4 ? 'px' : 0);
- theObj.top = yL + (!olNs4 ? 'px' : 0);
-}
-
-// Check position of cursor relative to overDiv DIVision; mouseOut function
-function cursorOff() {
- var left = parseInt(over.style.left);
- var top = parseInt(over.style.top);
- var right = left + (over.offsetWidth >= parseInt(o3_width) ? over.offsetWidth : parseInt(o3_width));
- var bottom = top + (over.offsetHeight >= o3_aboveheight ? over.offsetHeight : o3_aboveheight);
-
- if (o3_x < left || o3_x > right || o3_y < top || o3_y > bottom) return true;
-
- return false;
-}
-
-
-////////
-// COMMAND FUNCTIONS
-////////
-
-// Calls callme or the default function.
-function opt_FUNCTION(callme) {
- o3_text = (callme ? (typeof callme=='string' ? (/.+\(.*\)/.test(callme) ? eval(callme) : callme) : callme()) : (o3_function ? o3_function() : 'No Function'));
-
- return 0;
-}
-
-// Handle hovering
-function opt_NOCLOSE(unused) {
- if (!unused) o3_close = "";
-
- if (olNs4) {
- over.captureEvents(Event.MOUSEOUT || Event.MOUSEOVER);
- over.onmouseover = function () { if (o3_timerid > 0) { clearTimeout(o3_timerid); o3_timerid = 0; } }
- over.onmouseout = function (e) { if (olHideDelay) hideDelay(olHideDelay); else cClick(e); }
- } else {
- over.onmouseover = function () {hoveringSwitch = true; if (o3_timerid > 0) { clearTimeout(o3_timerid); o3_timerid =0; } }
- }
-
- return 0;
-}
-
-// Function to scan command line arguments for multiples
-function opt_MULTIPLEARGS(i, args, parameter) {
- var k=i, re, pV, str='';
-
- for(k=i; kpmStart) break;
- str += args[k] + ',';
- }
- if (str) str = str.substring(0,--str.length);
-
- k--; // reduce by one so the for loop this is in works correctly
- pV=(olNs4 && /cellpad/i.test(parameter)) ? str.split(',')[0] : str;
- eval(parameter + '="' + pV + '"');
-
- return k;
-}
-
-// Remove in texts when done.
-function nbspCleanup() {
- if (o3_wrap) {
- o3_text = o3_text.replace(/\ /g, ' ');
- o3_cap = o3_cap.replace(/\ /g, ' ');
- }
-}
-
-// Escape embedded single quotes in text strings
-function escSglQuote(str) {
- return str.toString().replace(/'/g,"\\'");
-}
-
-// Onload handler for window onload event
-function OLonLoad_handler(e) {
- var re = /\w+\(.*\)[;\s]+/g, olre = /overlib\(|nd\(|cClick\(/, fn, l, i;
-
- if(!olLoaded) olLoaded=1;
-
- // Remove it for Gecko based browsers
- if(window.removeEventListener && e.eventPhase == 3) window.removeEventListener("load",OLonLoad_handler,false);
- else if(window.detachEvent) { // and for IE and Opera 4.x but execute calls to overlib, nd, or cClick()
- window.detachEvent("onload",OLonLoad_handler);
- var fN = document.body.getAttribute('onload');
- if (fN) {
- fN=fN.toString().match(re);
- if (fN && fN.length) {
- for (i=0; i' : '') : '';
- else {
- fontStr='o3_'+whichString+'font';
- fontColor='o3_'+((whichString=='caption')? 'cap' : whichString)+'color';
- return (hasDims&&!olNs4) ? (isClose ? '' : '') : '
';
- }
-}
-
-// Quotes Multi word font names; needed for CSS Standards adherence in font-family
-function quoteMultiNameFonts(theFont) {
- var v, pM=theFont.split(',');
- for (var i=0; i 0) clearTimeout(o3_timerid);
-
- o3_timerid=setTimeout("cClick()",(o3_timeout=time));
- }
-}
-
-// Was originally in the placeLayer() routine; separated out for future ease
-function horizontalPlacement(browserWidth, horizontalScrollAmount, widthFix) {
- var placeX, iwidth=browserWidth, winoffset=horizontalScrollAmount;
- var parsedWidth = parseInt(o3_width);
-
- if (o3_fixx > -1 || o3_relx != null) {
- // Fixed position
- placeX=(o3_relx != null ? ( o3_relx < 0 ? winoffset +o3_relx+ iwidth - parsedWidth - widthFix : winoffset+o3_relx) : o3_fixx);
- } else {
- // If HAUTO, decide what to use.
- if (o3_hauto == 1) {
- if ((o3_x - winoffset) > (iwidth / 2)) {
- o3_hpos = LEFT;
- } else {
- o3_hpos = RIGHT;
- }
- }
-
- // From mouse
- if (o3_hpos == CENTER) { // Center
- placeX = o3_x+o3_offsetx-(parsedWidth/2);
-
- if (placeX < winoffset) placeX = winoffset;
- }
-
- if (o3_hpos == RIGHT) { // Right
- placeX = o3_x+o3_offsetx;
-
- if ((placeX+parsedWidth) > (winoffset+iwidth - widthFix)) {
- placeX = iwidth+winoffset - parsedWidth - widthFix;
- if (placeX < 0) placeX = 0;
- }
- }
- if (o3_hpos == LEFT) { // Left
- placeX = o3_x-o3_offsetx-parsedWidth;
- if (placeX < winoffset) placeX = winoffset;
- }
-
- // Snapping!
- if (o3_snapx > 1) {
- var snapping = placeX % o3_snapx;
-
- if (o3_hpos == LEFT) {
- placeX = placeX - (o3_snapx+snapping);
- } else {
- // CENTER and RIGHT
- placeX = placeX+(o3_snapx - snapping);
- }
-
- if (placeX < winoffset) placeX = winoffset;
- }
- }
-
- return placeX;
-}
-
-// was originally in the placeLayer() routine; separated out for future ease
-function verticalPlacement(browserHeight,verticalScrollAmount) {
- var placeY, iheight=browserHeight, scrolloffset=verticalScrollAmount;
- var parsedHeight=(o3_aboveheight ? parseInt(o3_aboveheight) : (olNs4 ? over.clip.height : over.offsetHeight));
-
- if (o3_fixy > -1 || o3_rely != null) {
- // Fixed position
- placeY=(o3_rely != null ? (o3_rely < 0 ? scrolloffset+o3_rely+iheight - parsedHeight : scrolloffset+o3_rely) : o3_fixy);
- } else {
- // If VAUTO, decide what to use.
- if (o3_vauto == 1) {
- if ((o3_y - scrolloffset) > (iheight / 2) && o3_vpos == BELOW && (o3_y + parsedHeight + o3_offsety - (scrolloffset + iheight) > 0)) {
- o3_vpos = ABOVE;
- } else if (o3_vpos == ABOVE && (o3_y - (parsedHeight + o3_offsety) - scrolloffset < 0)) {
- o3_vpos = BELOW;
- }
- }
-
- // From mouse
- if (o3_vpos == ABOVE) {
- if (o3_aboveheight == 0) o3_aboveheight = parsedHeight;
-
- placeY = o3_y - (o3_aboveheight+o3_offsety);
- if (placeY < scrolloffset) placeY = scrolloffset;
- } else {
- // BELOW
- placeY = o3_y+o3_offsety;
- }
-
- // Snapping!
- if (o3_snapy > 1) {
- var snapping = placeY % o3_snapy;
-
- if (o3_aboveheight > 0 && o3_vpos == ABOVE) {
- placeY = placeY - (o3_snapy+snapping);
- } else {
- placeY = placeY+(o3_snapy - snapping);
- }
-
- if (placeY < scrolloffset) placeY = scrolloffset;
- }
- }
-
- return placeY;
-}
-
-// checks positioning flags
-function checkPositionFlags() {
- if (olHautoFlag) olHautoFlag = o3_hauto=0;
- if (olVautoFlag) olVautoFlag = o3_vauto=0;
- return true;
-}
-
-// get Browser window width
-function windowWidth() {
- var w;
- if (o3_frame.innerWidth) w=o3_frame.innerWidth;
- else if (eval('o3_frame.'+docRoot)&&eval("typeof o3_frame."+docRoot+".clientWidth=='number'")&&eval('o3_frame.'+docRoot+'.clientWidth'))
- w=eval('o3_frame.'+docRoot+'.clientWidth');
- return w;
-}
-
-// create the div container for popup content if it doesn't exist
-function createDivContainer(id,frm,zValue) {
- id = (id || 'overDiv'), frm = (frm || o3_frame), zValue = (zValue || 1000);
- var objRef, divContainer = layerReference(id);
-
- if (divContainer == null) {
- if (olNs4) {
- divContainer = frm.document.layers[id] = new Layer(window.innerWidth, frm);
- objRef = divContainer;
- } else {
- var body = (olIe4 ? frm.document.all.tags('BODY')[0] : frm.document.getElementsByTagName("BODY")[0]);
- if (olIe4&&!document.getElementById) {
- body.insertAdjacentHTML("beforeEnd",'');
- divContainer=layerReference(id);
- } else {
- divContainer = frm.document.createElement("DIV");
- divContainer.id = id;
- body.appendChild(divContainer);
- }
- objRef = divContainer.style;
- }
-
- objRef.position = 'absolute';
- objRef.visibility = 'hidden';
- objRef.zIndex = zValue;
- if (olIe4&&!olOp) objRef.left = objRef.top = '0px';
- else objRef.left = objRef.top = -10000 + (!olNs4 ? 'px' : 0);
- }
-
- return divContainer;
-}
-
-// get reference to a layer with ID=id
-function layerReference(id) {
- return (olNs4 ? o3_frame.document.layers[id] : (document.all ? o3_frame.document.all[id] : o3_frame.document.getElementById(id)));
-}
-////////
-// UTILITY FUNCTIONS
-////////
-
-// Checks if something is a function.
-function isFunction(fnRef) {
- var rtn = true;
-
- if (typeof fnRef == 'object') {
- for (var i = 0; i < fnRef.length; i++) {
- if (typeof fnRef[i]=='function') continue;
- rtn = false;
- break;
- }
- } else if (typeof fnRef != 'function') {
- rtn = false;
- }
-
- return rtn;
-}
-
-// Converts an array into an argument string for use in eval.
-function argToString(array, strtInd, argName) {
- var jS = strtInd, aS = '', ar = array;
- argName=(argName ? argName : 'ar');
-
- if (ar.length > jS) {
- for (var k = jS; k < ar.length; k++) aS += argName+'['+k+'], ';
- aS = aS.substring(0, aS.length-2);
- }
-
- return aS;
-}
-
-// Places a hook in the correct position in a hook point.
-function reOrder(hookPt, fnRef, order) {
- var newPt = new Array(), match, i, j;
-
- if (!order || typeof order == 'undefined' || typeof order == 'number') return hookPt;
-
- if (typeof order=='function') {
- if (typeof fnRef=='object') {
- newPt = newPt.concat(fnRef);
- } else {
- newPt[newPt.length++]=fnRef;
- }
-
- for (i = 0; i < hookPt.length; i++) {
- match = false;
- if (typeof fnRef == 'function' && hookPt[i] == fnRef) {
- continue;
- } else {
- for(j = 0; j < fnRef.length; j++) if (hookPt[i] == fnRef[j]) {
- match = true;
- break;
- }
- }
- if (!match) newPt[newPt.length++] = hookPt[i];
- }
-
- newPt[newPt.length++] = order;
-
- } else if (typeof order == 'object') {
- if (typeof fnRef == 'object') {
- newPt = newPt.concat(fnRef);
- } else {
- newPt[newPt.length++] = fnRef;
- }
-
- for (j = 0; j < hookPt.length; j++) {
- match = false;
- if (typeof fnRef == 'function' && hookPt[j] == fnRef) {
- continue;
- } else {
- for (i = 0; i < fnRef.length; i++) if (hookPt[j] == fnRef[i]) {
- match = true;
- break;
- }
- }
- if (!match) newPt[newPt.length++]=hookPt[j];
- }
-
- for (i = 0; i < newPt.length; i++) hookPt[i] = newPt[i];
- newPt.length = 0;
-
- for (j = 0; j < hookPt.length; j++) {
- match = false;
- for (i = 0; i < order.length; i++) {
- if (hookPt[j] == order[i]) {
- match = true;
- break;
- }
- }
- if (!match) newPt[newPt.length++] = hookPt[j];
- }
- newPt = newPt.concat(order);
- }
-
- hookPt = newPt;
-
- return hookPt;
-}
-
-////////
-// PLUGIN ACTIVATION FUNCTIONS
-////////
-
-// Runs plugin functions to set runtime variables.
-function setRunTimeVariables(){
- if (typeof runTime != 'undefined' && runTime.length) {
- for (var k = 0; k < runTime.length; k++) {
- runTime[k]();
- }
- }
-}
-
-// Runs plugin functions to parse commands.
-function parseCmdLine(pf, i, args) {
- if (typeof cmdLine != 'undefined' && cmdLine.length) {
- for (var k = 0; k < cmdLine.length; k++) {
- var j = cmdLine[k](pf, i, args);
- if (j >- 1) {
- i = j;
- break;
- }
- }
- }
-
- return i;
-}
-
-// Runs plugin functions to do things after parse.
-function postParseChecks(pf,args){
- if (typeof postParse != 'undefined' && postParse.length) {
- for (var k = 0; k < postParse.length; k++) {
- if (postParse[k](pf,args)) continue;
- return false; // end now since have an error
- }
- }
- return true;
-}
-
-
-////////
-// PLUGIN REGISTRATION FUNCTIONS
-////////
-
-// Registers commands and creates constants.
-function registerCommands(cmdStr) {
- if (typeof cmdStr!='string') return;
-
- var pM = cmdStr.split(',');
- pms = pms.concat(pM);
-
- for (var i = 0; i< pM.length; i++) {
- eval(pM[i].toUpperCase()+'='+pmCount++);
- }
-}
-
-// Registers no-parameter commands
-function registerNoParameterCommands(cmdStr) {
- if (!cmdStr && typeof cmdStr != 'string') return;
- pmt=(!pmt) ? cmdStr : pmt + ',' + cmdStr;
-}
-
-// Register a function to hook at a certain point.
-function registerHook(fnHookTo, fnRef, hookType, optPm) {
- var hookPt, last = typeof optPm;
-
- if (fnHookTo == 'plgIn'||fnHookTo == 'postParse') return;
- if (typeof hookPts[fnHookTo] == 'undefined') hookPts[fnHookTo] = new FunctionReference();
-
- hookPt = hookPts[fnHookTo];
-
- if (hookType != null) {
- if (hookType == FREPLACE) {
- hookPt.ovload = fnRef; // replace normal overlib routine
- if (fnHookTo.indexOf('ol_content_') > -1) hookPt.alt[pms[CSSOFF-1-pmStart]]=fnRef;
-
- } else if (hookType == FBEFORE || hookType == FAFTER) {
- var hookPt=(hookType == 1 ? hookPt.before : hookPt.after);
-
- if (typeof fnRef == 'object') {
- hookPt = hookPt.concat(fnRef);
- } else {
- hookPt[hookPt.length++] = fnRef;
- }
-
- if (optPm) hookPt = reOrder(hookPt, fnRef, optPm);
-
- } else if (hookType == FALTERNATE) {
- if (last=='number') hookPt.alt[pms[optPm-1-pmStart]] = fnRef;
- } else if (hookType == FCHAIN) {
- hookPt = hookPt.chain;
- if (typeof fnRef=='object') hookPt=hookPt.concat(fnRef); // add other functions
- else hookPt[hookPt.length++]=fnRef;
- }
-
- return;
- }
-}
-
-// Register a function that will set runtime variables.
-function registerRunTimeFunction(fn) {
- if (isFunction(fn)) {
- if (typeof fn == 'object') {
- runTime = runTime.concat(fn);
- } else {
- runTime[runTime.length++] = fn;
- }
- }
-}
-
-// Register a function that will handle command parsing.
-function registerCmdLineFunction(fn){
- if (isFunction(fn)) {
- if (typeof fn == 'object') {
- cmdLine = cmdLine.concat(fn);
- } else {
- cmdLine[cmdLine.length++] = fn;
- }
- }
-}
-
-// Register a function that does things after command parsing.
-function registerPostParseFunction(fn){
- if (isFunction(fn)) {
- if (typeof fn == 'object') {
- postParse = postParse.concat(fn);
- } else {
- postParse[postParse.length++] = fn;
- }
- }
-}
-
-////////
-// PLUGIN REGISTRATION FUNCTIONS
-////////
-
-// Runs any hooks registered.
-function runHook(fnHookTo, hookType) {
- var l = hookPts[fnHookTo], k, rtnVal = null, optPm, arS, ar = runHook.arguments;
-
- if (hookType == FREPLACE) {
- arS = argToString(ar, 2);
-
- if (typeof l == 'undefined' || !(l = l.ovload)) rtnVal = eval(fnHookTo+'('+arS+')');
- else rtnVal = eval('l('+arS+')');
-
- } else if (hookType == FBEFORE || hookType == FAFTER) {
- if (typeof l != 'undefined') {
- l=(hookType == 1 ? l.before : l.after);
-
- if (l.length) {
- arS = argToString(ar, 2);
- for (var k = 0; k < l.length; k++) eval('l[k]('+arS+')');
- }
- }
- } else if (hookType == FALTERNATE) {
- optPm = ar[2];
- arS = argToString(ar, 3);
-
- if (typeof l == 'undefined' || (l = l.alt[pms[optPm-1-pmStart]]) == 'undefined') {
- rtnVal = eval(fnHookTo+'('+arS+')');
- } else {
- rtnVal = eval('l('+arS+')');
- }
- } else if (hookType == FCHAIN) {
- arS=argToString(ar,2);
- l=l.chain;
-
- for (k=l.length; k > 0; k--) if((rtnVal=eval('l[k-1]('+arS+')'))!=void(0)) break;
- }
-
- return rtnVal;
-}
-
-////////
-// OBJECT CONSTRUCTORS
-////////
-
-// Object for handling hooks.
-function FunctionReference() {
- this.ovload = null;
- this.before = new Array();
- this.after = new Array();
- this.alt = new Array();
- this.chain = new Array();
-}
-
-// Object for simple access to the overLIB version used.
-// Examples: simpleversion:351 major:3 minor:5 revision:1
-function Info(version, prerelease) {
- this.version = version;
- this.prerelease = prerelease;
-
- this.simpleversion = Math.round(this.version*100);
- this.major = parseInt(this.simpleversion / 100);
- this.minor = parseInt(this.simpleversion / 10) - this.major * 10;
- this.revision = parseInt(this.simpleversion) - this.major * 100 - this.minor * 10;
- this.meets = meets;
-}
-
-// checks for Core Version required
-function meets(reqdVersion) {
- return (!reqdVersion) ? false : this.simpleversion >= Math.round(100*parseFloat(reqdVersion));
-}
-
-
-////////
-// STANDARD REGISTRATIONS
-////////
-registerHook("ol_content_simple", ol_content_simple, FALTERNATE, CSSOFF);
-registerHook("ol_content_caption", ol_content_caption, FALTERNATE, CSSOFF);
-registerHook("ol_content_background", ol_content_background, FALTERNATE, CSSOFF);
-registerHook("ol_content_simple", ol_content_simple, FALTERNATE, CSSCLASS);
-registerHook("ol_content_caption", ol_content_caption, FALTERNATE, CSSCLASS);
-registerHook("ol_content_background", ol_content_background, FALTERNATE, CSSCLASS);
-registerPostParseFunction(checkPositionFlags);
-registerHook("hideObject", nbspCleanup, FAFTER);
-registerHook("horizontalPlacement", horizontalPlacement, FCHAIN);
-registerHook("verticalPlacement", verticalPlacement, FCHAIN);
-if (olNs4||(olIe5&&isMac)||olKq) olLoaded=1;
-registerNoParameterCommands('sticky,autostatus,autostatuscap,fullhtml,hauto,vauto,closeclick,wrap,followmouse,mouseoff,compatmode');
-///////
-// ESTABLISH MOUSECAPTURING
-///////
-
-// Capture events, alt. diffuses the overlib function.
-var olCheckMouseCapture=true;
-if ((olNs4 || olNs6 || olIe4)) {
- olMouseCapture();
-} else {
- overlib = no_overlib;
- nd = no_overlib;
- ver3fix = true;
-}
+//\/////
+//\ overLIB 4.21 - You may not remove or change this notice.
+//\ Copyright Erik Bosrup 1998-2004. All rights reserved.
+//\
+//\ Contributors are listed on the homepage.
+//\ This file might be old, always check for the latest version at:
+//\ http://www.bosrup.com/web/overlib/
+//\
+//\ Please read the license agreement (available through the link above)
+//\ before using overLIB. Direct any licensing questions to erik@bosrup.com.
+//\
+//\ Do not sell this as your own work or remove this copyright notice.
+//\ For full details on copying or changing this script please read the
+//\ license agreement at the link above. Please give credit on sites that
+//\ use overLIB and submit changes of the script so other people can use
+//\ them as well.
+// $Revision: 1.1 $ $Date: 2006/05/29 16:38:21 $
+//\/////
+//\mini
+
+////////
+// PRE-INIT
+// Ignore these lines, configuration is below.
+////////
+var olLoaded = 0;var pmStart = 10000000; var pmUpper = 10001000; var pmCount = pmStart+1; var pmt=''; var pms = new Array(); var olInfo = new Info('4.21', 1);
+var FREPLACE = 0; var FBEFORE = 1; var FAFTER = 2; var FALTERNATE = 3; var FCHAIN=4;
+var olHideForm=0; // parameter for hiding SELECT and ActiveX elements in IE5.5+
+var olHautoFlag = 0; // flags for over-riding VAUTO and HAUTO if corresponding
+var olVautoFlag = 0; // positioning commands are used on the command line
+var hookPts = new Array(), postParse = new Array(), cmdLine = new Array(), runTime = new Array();
+// for plugins
+registerCommands('donothing,inarray,caparray,sticky,background,noclose,caption,left,right,center,offsetx,offsety,fgcolor,bgcolor,textcolor,capcolor,closecolor,width,border,cellpad,status,autostatus,autostatuscap,height,closetext,snapx,snapy,fixx,fixy,relx,rely,fgbackground,bgbackground,padx,pady,fullhtml,above,below,capicon,textfont,captionfont,closefont,textsize,captionsize,closesize,timeout,function,delay,hauto,vauto,closeclick,wrap,followmouse,mouseoff,closetitle,cssoff,compatmode,cssclass,fgclass,bgclass,textfontclass,captionfontclass,closefontclass');
+
+////////
+// DEFAULT CONFIGURATION
+// Settings you want everywhere are set here. All of this can also be
+// changed on your html page or through an overLIB call.
+////////
+if (typeof ol_fgcolor=='undefined') var ol_fgcolor="#99BBDD";
+if (typeof ol_bgcolor=='undefined') var ol_bgcolor="#7799BB";
+if (typeof ol_textcolor=='undefined') var ol_textcolor="#000000";
+if (typeof ol_capcolor=='undefined') var ol_capcolor="#000033";
+if (typeof ol_closecolor=='undefined') var ol_closecolor="#000000";
+if (typeof ol_textfont=='undefined') var ol_textfont="Verdana,Arial,Helvetica";
+if (typeof ol_captionfont=='undefined') var ol_captionfont="Verdana,Arial,Helvetica";
+if (typeof ol_closefont=='undefined') var ol_closefont="Verdana,Arial,Helvetica";
+if (typeof ol_textsize=='undefined') var ol_textsize="1";
+if (typeof ol_captionsize=='undefined') var ol_captionsize="1";
+if (typeof ol_closesize=='undefined') var ol_closesize="1";
+if (typeof ol_width=='undefined') var ol_width="200";
+if (typeof ol_border=='undefined') var ol_border="1";
+if (typeof ol_cellpad=='undefined') var ol_cellpad=2;
+if (typeof ol_offsetx=='undefined') var ol_offsetx=10;
+if (typeof ol_offsety=='undefined') var ol_offsety=10;
+if (typeof ol_text=='undefined') var ol_text="Default Text";
+if (typeof ol_cap=='undefined') var ol_cap="";
+if (typeof ol_sticky=='undefined') var ol_sticky=0;
+if (typeof ol_background=='undefined') var ol_background="";
+if (typeof ol_close=='undefined') var ol_close="Close";
+if (typeof ol_hpos=='undefined') var ol_hpos=RIGHT;
+if (typeof ol_status=='undefined') var ol_status="";
+if (typeof ol_autostatus=='undefined') var ol_autostatus=0;
+if (typeof ol_height=='undefined') var ol_height=-1;
+if (typeof ol_snapx=='undefined') var ol_snapx=0;
+if (typeof ol_snapy=='undefined') var ol_snapy=0;
+if (typeof ol_fixx=='undefined') var ol_fixx=-1;
+if (typeof ol_fixy=='undefined') var ol_fixy=-1;
+if (typeof ol_relx=='undefined') var ol_relx=null;
+if (typeof ol_rely=='undefined') var ol_rely=null;
+if (typeof ol_fgbackground=='undefined') var ol_fgbackground="";
+if (typeof ol_bgbackground=='undefined') var ol_bgbackground="";
+if (typeof ol_padxl=='undefined') var ol_padxl=1;
+if (typeof ol_padxr=='undefined') var ol_padxr=1;
+if (typeof ol_padyt=='undefined') var ol_padyt=1;
+if (typeof ol_padyb=='undefined') var ol_padyb=1;
+if (typeof ol_fullhtml=='undefined') var ol_fullhtml=0;
+if (typeof ol_vpos=='undefined') var ol_vpos=BELOW;
+if (typeof ol_aboveheight=='undefined') var ol_aboveheight=0;
+if (typeof ol_capicon=='undefined') var ol_capicon="";
+if (typeof ol_frame=='undefined') var ol_frame=self;
+if (typeof ol_timeout=='undefined') var ol_timeout=0;
+if (typeof ol_function=='undefined') var ol_function=null;
+if (typeof ol_delay=='undefined') var ol_delay=0;
+if (typeof ol_hauto=='undefined') var ol_hauto=0;
+if (typeof ol_vauto=='undefined') var ol_vauto=0;
+if (typeof ol_closeclick=='undefined') var ol_closeclick=0;
+if (typeof ol_wrap=='undefined') var ol_wrap=0;
+if (typeof ol_followmouse=='undefined') var ol_followmouse=1;
+if (typeof ol_mouseoff=='undefined') var ol_mouseoff=0;
+if (typeof ol_closetitle=='undefined') var ol_closetitle='Close';
+if (typeof ol_compatmode=='undefined') var ol_compatmode=0;
+if (typeof ol_css=='undefined') var ol_css=CSSOFF;
+if (typeof ol_fgclass=='undefined') var ol_fgclass="";
+if (typeof ol_bgclass=='undefined') var ol_bgclass="";
+if (typeof ol_textfontclass=='undefined') var ol_textfontclass="";
+if (typeof ol_captionfontclass=='undefined') var ol_captionfontclass="";
+if (typeof ol_closefontclass=='undefined') var ol_closefontclass="";
+
+////////
+// ARRAY CONFIGURATION
+////////
+
+// You can use these arrays to store popup text here instead of in the html.
+if (typeof ol_texts=='undefined') var ol_texts = new Array("Text 0", "Text 1");
+if (typeof ol_caps=='undefined') var ol_caps = new Array("Caption 0", "Caption 1");
+
+////////
+// END OF CONFIGURATION
+// Don't change anything below this line, all configuration is above.
+////////
+
+
+
+
+
+////////
+// INIT
+////////
+// Runtime variables init. Don't change for config!
+var o3_text="";
+var o3_cap="";
+var o3_sticky=0;
+var o3_background="";
+var o3_close="Close";
+var o3_hpos=RIGHT;
+var o3_offsetx=2;
+var o3_offsety=2;
+var o3_fgcolor="";
+var o3_bgcolor="";
+var o3_textcolor="";
+var o3_capcolor="";
+var o3_closecolor="";
+var o3_width=100;
+var o3_border=1;
+var o3_cellpad=2;
+var o3_status="";
+var o3_autostatus=0;
+var o3_height=-1;
+var o3_snapx=0;
+var o3_snapy=0;
+var o3_fixx=-1;
+var o3_fixy=-1;
+var o3_relx=null;
+var o3_rely=null;
+var o3_fgbackground="";
+var o3_bgbackground="";
+var o3_padxl=0;
+var o3_padxr=0;
+var o3_padyt=0;
+var o3_padyb=0;
+var o3_fullhtml=0;
+var o3_vpos=BELOW;
+var o3_aboveheight=0;
+var o3_capicon="";
+var o3_textfont="Verdana,Arial,Helvetica";
+var o3_captionfont="Verdana,Arial,Helvetica";
+var o3_closefont="Verdana,Arial,Helvetica";
+var o3_textsize="1";
+var o3_captionsize="1";
+var o3_closesize="1";
+var o3_frame=self;
+var o3_timeout=0;
+var o3_timerid=0;
+var o3_allowmove=0;
+var o3_function=null;
+var o3_delay=0;
+var o3_delayid=0;
+var o3_hauto=0;
+var o3_vauto=0;
+var o3_closeclick=0;
+var o3_wrap=0;
+var o3_followmouse=1;
+var o3_mouseoff=0;
+var o3_closetitle='';
+var o3_compatmode=0;
+var o3_css=CSSOFF;
+var o3_fgclass="";
+var o3_bgclass="";
+var o3_textfontclass="";
+var o3_captionfontclass="";
+var o3_closefontclass="";
+
+// Display state variables
+var o3_x = 0;
+var o3_y = 0;
+var o3_showingsticky = 0;
+var o3_removecounter = 0;
+
+// Our layer
+var over = null;
+var fnRef, hoveringSwitch = false;
+var olHideDelay;
+
+// Decide browser version
+var isMac = (navigator.userAgent.indexOf("Mac") != -1);
+var olOp = (navigator.userAgent.toLowerCase().indexOf('opera') > -1 && document.createTextNode); // Opera 7
+var olNs4 = (navigator.appName=='Netscape' && parseInt(navigator.appVersion) == 4);
+var olNs6 = (document.getElementById) ? true : false;
+var olKq = (olNs6 && /konqueror/i.test(navigator.userAgent));
+var olIe4 = (document.all) ? true : false;
+var olIe5 = false;
+var olIe55 = false; // Added additional variable to identify IE5.5+
+var docRoot = 'document.body';
+
+// Resize fix for NS4.x to keep track of layer
+if (olNs4) {
+ var oW = window.innerWidth;
+ var oH = window.innerHeight;
+ window.onresize = function() { if (oW != window.innerWidth || oH != window.innerHeight) location.reload(); }
+}
+
+// Microsoft Stupidity Check(tm).
+if (olIe4) {
+ var agent = navigator.userAgent;
+ if (/MSIE/.test(agent)) {
+ var versNum = parseFloat(agent.match(/MSIE[ ](\d\.\d+)\.*/i)[1]);
+ if (versNum >= 5){
+ olIe5=true;
+ olIe55=(versNum>=5.5&&!olOp) ? true : false;
+ if (olNs6) olNs6=false;
+ }
+ }
+ if (olNs6) olIe4 = false;
+}
+
+// Check for compatability mode.
+if (document.compatMode && document.compatMode == 'CSS1Compat') {
+ docRoot= ((olIe4 && !olOp) ? 'document.documentElement' : docRoot);
+}
+
+// Add window onload handlers to indicate when all modules have been loaded
+// For Netscape 6+ and Mozilla, uses addEventListener method on the window object
+// For IE it uses the attachEvent method of the window object and for Netscape 4.x
+// it sets the window.onload handler to the OLonload_handler function for Bubbling
+if(window.addEventListener) window.addEventListener("load",OLonLoad_handler,false);
+else if (window.attachEvent) window.attachEvent("onload",OLonLoad_handler);
+
+var capExtent;
+
+////////
+// PUBLIC FUNCTIONS
+////////
+
+// overlib(arg0,...,argN)
+// Loads parameters into global runtime variables.
+function overlib() {
+ if (!olLoaded || isExclusive(overlib.arguments)) return true;
+ if (olCheckMouseCapture) olMouseCapture();
+ if (over) {
+ over = (typeof over.id != 'string') ? o3_frame.document.all['overDiv'] : over;
+ cClick();
+ }
+
+ // Load defaults to runtime.
+ olHideDelay=0;
+ o3_text=ol_text;
+ o3_cap=ol_cap;
+ o3_sticky=ol_sticky;
+ o3_background=ol_background;
+ o3_close=ol_close;
+ o3_hpos=ol_hpos;
+ o3_offsetx=ol_offsetx;
+ o3_offsety=ol_offsety;
+ o3_fgcolor=ol_fgcolor;
+ o3_bgcolor=ol_bgcolor;
+ o3_textcolor=ol_textcolor;
+ o3_capcolor=ol_capcolor;
+ o3_closecolor=ol_closecolor;
+ o3_width=ol_width;
+ o3_border=ol_border;
+ o3_cellpad=ol_cellpad;
+ o3_status=ol_status;
+ o3_autostatus=ol_autostatus;
+ o3_height=ol_height;
+ o3_snapx=ol_snapx;
+ o3_snapy=ol_snapy;
+ o3_fixx=ol_fixx;
+ o3_fixy=ol_fixy;
+ o3_relx=ol_relx;
+ o3_rely=ol_rely;
+ o3_fgbackground=ol_fgbackground;
+ o3_bgbackground=ol_bgbackground;
+ o3_padxl=ol_padxl;
+ o3_padxr=ol_padxr;
+ o3_padyt=ol_padyt;
+ o3_padyb=ol_padyb;
+ o3_fullhtml=ol_fullhtml;
+ o3_vpos=ol_vpos;
+ o3_aboveheight=ol_aboveheight;
+ o3_capicon=ol_capicon;
+ o3_textfont=ol_textfont;
+ o3_captionfont=ol_captionfont;
+ o3_closefont=ol_closefont;
+ o3_textsize=ol_textsize;
+ o3_captionsize=ol_captionsize;
+ o3_closesize=ol_closesize;
+ o3_timeout=ol_timeout;
+ o3_function=ol_function;
+ o3_delay=ol_delay;
+ o3_hauto=ol_hauto;
+ o3_vauto=ol_vauto;
+ o3_closeclick=ol_closeclick;
+ o3_wrap=ol_wrap;
+ o3_followmouse=ol_followmouse;
+ o3_mouseoff=ol_mouseoff;
+ o3_closetitle=ol_closetitle;
+ o3_css=ol_css;
+ o3_compatmode=ol_compatmode;
+ o3_fgclass=ol_fgclass;
+ o3_bgclass=ol_bgclass;
+ o3_textfontclass=ol_textfontclass;
+ o3_captionfontclass=ol_captionfontclass;
+ o3_closefontclass=ol_closefontclass;
+
+ setRunTimeVariables();
+
+ fnRef = '';
+
+ // Special for frame support, over must be reset...
+ o3_frame = ol_frame;
+
+ if(!(over=createDivContainer())) return false;
+
+ parseTokens('o3_', overlib.arguments);
+ if (!postParseChecks()) return false;
+
+ if (o3_delay == 0) {
+ return runHook("olMain", FREPLACE);
+ } else {
+ o3_delayid = setTimeout("runHook('olMain', FREPLACE)", o3_delay);
+ return false;
+ }
+}
+
+// Clears popups if appropriate
+function nd(time) {
+ if (olLoaded && !isExclusive()) {
+ hideDelay(time); // delay popup close if time specified
+
+ if (o3_removecounter >= 1) { o3_showingsticky = 0 };
+
+ if (o3_showingsticky == 0) {
+ o3_allowmove = 0;
+ if (over != null && o3_timerid == 0) runHook("hideObject", FREPLACE, over);
+ } else {
+ o3_removecounter++;
+ }
+ }
+
+ return true;
+}
+
+// The Close onMouseOver function for stickies
+function cClick() {
+ if (olLoaded) {
+ runHook("hideObject", FREPLACE, over);
+ o3_showingsticky = 0;
+ }
+ return false;
+}
+
+// Method for setting page specific defaults.
+function overlib_pagedefaults() {
+ parseTokens('ol_', overlib_pagedefaults.arguments);
+}
+
+
+////////
+// OVERLIB MAIN FUNCTION
+////////
+
+// This function decides what it is we want to display and how we want it done.
+function olMain() {
+ var layerhtml, styleType;
+ runHook("olMain", FBEFORE);
+
+ if (o3_background!="" || o3_fullhtml) {
+ // Use background instead of box.
+ layerhtml = runHook('ol_content_background', FALTERNATE, o3_css, o3_text, o3_background, o3_fullhtml);
+ } else {
+ // They want a popup box.
+ styleType = (pms[o3_css-1-pmStart] == "cssoff" || pms[o3_css-1-pmStart] == "cssclass");
+
+ // Prepare popup background
+ if (o3_fgbackground != "") o3_fgbackground = "background=\""+o3_fgbackground+"\"";
+ if (o3_bgbackground != "") o3_bgbackground = (styleType ? "background=\""+o3_bgbackground+"\"" : o3_bgbackground);
+
+ // Prepare popup colors
+ if (o3_fgcolor != "") o3_fgcolor = (styleType ? "bgcolor=\""+o3_fgcolor+"\"" : o3_fgcolor);
+ if (o3_bgcolor != "") o3_bgcolor = (styleType ? "bgcolor=\""+o3_bgcolor+"\"" : o3_bgcolor);
+
+ // Prepare popup height
+ if (o3_height > 0) o3_height = (styleType ? "height=\""+o3_height+"\"" : o3_height);
+ else o3_height = "";
+
+ // Decide which kinda box.
+ if (o3_cap=="") {
+ // Plain
+ layerhtml = runHook('ol_content_simple', FALTERNATE, o3_css, o3_text);
+ } else {
+ // With caption
+ if (o3_sticky) {
+ // Show close text
+ layerhtml = runHook('ol_content_caption', FALTERNATE, o3_css, o3_text, o3_cap, o3_close);
+ } else {
+ // No close text
+ layerhtml = runHook('ol_content_caption', FALTERNATE, o3_css, o3_text, o3_cap, "");
+ }
+ }
+ }
+
+ // We want it to stick!
+ if (o3_sticky) {
+ if (o3_timerid > 0) {
+ clearTimeout(o3_timerid);
+ o3_timerid = 0;
+ }
+ o3_showingsticky = 1;
+ o3_removecounter = 0;
+ }
+
+ // Created a separate routine to generate the popup to make it easier
+ // to implement a plugin capability
+ if (!runHook("createPopup", FREPLACE, layerhtml)) return false;
+
+ // Prepare status bar
+ if (o3_autostatus > 0) {
+ o3_status = o3_text;
+ if (o3_autostatus > 1) o3_status = o3_cap;
+ }
+
+ // When placing the layer the first time, even stickies may be moved.
+ o3_allowmove = 0;
+
+ // Initiate a timer for timeout
+ if (o3_timeout > 0) {
+ if (o3_timerid > 0) clearTimeout(o3_timerid);
+ o3_timerid = setTimeout("cClick()", o3_timeout);
+ }
+
+ // Show layer
+ runHook("disp", FREPLACE, o3_status);
+ runHook("olMain", FAFTER);
+
+ return (olOp && event && event.type == 'mouseover' && !o3_status) ? '' : (o3_status != '');
+}
+
+////////
+// LAYER GENERATION FUNCTIONS
+////////
+// These functions just handle popup content with tags that should adhere to the W3C standards specification.
+
+// Makes simple table without caption
+function ol_content_simple(text) {
+ var cpIsMultiple = /,/.test(o3_cellpad);
+ var txt = '' : ((!olNs4&&cpIsMultiple) ? ' style="'+setCellPadStr(o3_cellpad)+'">' : '>'))+(o3_textfontclass ? '' : wrapStr(0,o3_textsize,'text'))+text+(o3_textfontclass ? '' : wrapStr(1,o3_textsize))+' |
|
';
+
+ set_background("");
+ return txt;
+}
+
+// Makes table with caption and optional close link
+function ol_content_caption(text,title,close) {
+ var nameId, txt, cpIsMultiple = /,/.test(o3_cellpad);
+ var closing, closeevent;
+
+ closing = "";
+ closeevent = "onmouseover";
+ if (o3_closeclick == 1) closeevent = (o3_closetitle ? "title='" + o3_closetitle +"'" : "") + " onclick";
+ if (o3_capicon != "") {
+ nameId = ' hspace = \"5\"'+' align = \"middle\" alt = \"\"';
+ if (typeof o3_dragimg != 'undefined' && o3_dragimg) nameId =' hspace=\"5\"'+' name=\"'+o3_dragimg+'\" id=\"'+o3_dragimg+'\" align=\"middle\" alt=\"Drag Enabled\" title=\"Drag Enabled\"';
+ o3_capicon = '';
+ }
+
+ if (close != "")
+ closing = ''+(o3_closefontclass ? '' : wrapStr(0,o3_closesize,'close'))+close+(o3_closefontclass ? '' : wrapStr(1,o3_closesize,'close'))+' | ';
+ txt = '' : '>')+(o3_captionfontclass ? '' : ''+wrapStr(0,o3_captionsize,'caption'))+o3_capicon+title+(o3_captionfontclass ? '' : wrapStr(1,o3_captionsize)+'')+' | '+closing+'
' :((!olNs4&&cpIsMultiple) ? ' style="'+setCellPadStr(o3_cellpad)+'">' : '>'))+(o3_textfontclass ? '' : wrapStr(0,o3_textsize,'text'))+text+(o3_textfontclass ? '' : wrapStr(1,o3_textsize)) + ' |
|
';
+
+ set_background("");
+ return txt;
+}
+
+// Sets the background picture,padding and lots more. :)
+function ol_content_background(text,picture,hasfullhtml) {
+ if (hasfullhtml) {
+ txt=text;
+ } else {
+ txt=' |
| '+(o3_textfontclass ? '' : wrapStr(0,o3_textsize,'text'))+text+(o3_textfontclass ? '' : wrapStr(1,o3_textsize))+' | |
|
';
+ }
+
+ set_background(picture);
+ return txt;
+}
+
+// Loads a picture into the div.
+function set_background(pic) {
+ if (pic == "") {
+ if (olNs4) {
+ over.background.src = null;
+ } else if (over.style) {
+ over.style.backgroundImage = "none";
+ }
+ } else {
+ if (olNs4) {
+ over.background.src = pic;
+ } else if (over.style) {
+ over.style.width=o3_width + 'px';
+ over.style.backgroundImage = "url("+pic+")";
+ }
+ }
+}
+
+////////
+// HANDLING FUNCTIONS
+////////
+var olShowId=-1;
+
+// Displays the popup
+function disp(statustext) {
+ runHook("disp", FBEFORE);
+
+ if (o3_allowmove == 0) {
+ runHook("placeLayer", FREPLACE);
+ (olNs6&&olShowId<0) ? olShowId=setTimeout("runHook('showObject', FREPLACE, over)", 1) : runHook("showObject", FREPLACE, over);
+ o3_allowmove = (o3_sticky || o3_followmouse==0) ? 0 : 1;
+ }
+
+ runHook("disp", FAFTER);
+
+ if (statustext != "") self.status = statustext;
+}
+
+// Creates the actual popup structure
+function createPopup(lyrContent){
+ runHook("createPopup", FBEFORE);
+
+ if (o3_wrap) {
+ var wd,ww,theObj = (olNs4 ? over : over.style);
+ theObj.top = theObj.left = ((olIe4&&!olOp) ? 0 : -10000) + (!olNs4 ? 'px' : 0);
+ layerWrite(lyrContent);
+ wd = (olNs4 ? over.clip.width : over.offsetWidth);
+ if (wd > (ww=windowWidth())) {
+ lyrContent=lyrContent.replace(/\ /g, ' ');
+ o3_width=ww;
+ o3_wrap=0;
+ }
+ }
+
+ layerWrite(lyrContent);
+
+ // Have to set o3_width for placeLayer() routine if o3_wrap is turned on
+ if (o3_wrap) o3_width=(olNs4 ? over.clip.width : over.offsetWidth);
+
+ runHook("createPopup", FAFTER, lyrContent);
+
+ return true;
+}
+
+// Decides where we want the popup.
+function placeLayer() {
+ var placeX, placeY, widthFix = 0;
+
+ // HORIZONTAL PLACEMENT, re-arranged to work in Safari
+ if (o3_frame.innerWidth) widthFix=18;
+ iwidth = windowWidth();
+
+ // Horizontal scroll offset
+ winoffset=(olIe4) ? eval('o3_frame.'+docRoot+'.scrollLeft') : o3_frame.pageXOffset;
+
+ placeX = runHook('horizontalPlacement',FCHAIN,iwidth,winoffset,widthFix);
+
+ // VERTICAL PLACEMENT, re-arranged to work in Safari
+ if (o3_frame.innerHeight) {
+ iheight=o3_frame.innerHeight;
+ } else if (eval('o3_frame.'+docRoot)&&eval("typeof o3_frame."+docRoot+".clientHeight=='number'")&&eval('o3_frame.'+docRoot+'.clientHeight')) {
+ iheight=eval('o3_frame.'+docRoot+'.clientHeight');
+ }
+
+ // Vertical scroll offset
+ scrolloffset=(olIe4) ? eval('o3_frame.'+docRoot+'.scrollTop') : o3_frame.pageYOffset;
+ placeY = runHook('verticalPlacement',FCHAIN,iheight,scrolloffset);
+
+ // Actually move the object.
+ repositionTo(over, placeX, placeY);
+}
+
+// Moves the layer
+function olMouseMove(e) {
+ var e = (e) ? e : event;
+
+ if (e.pageX) {
+ o3_x = e.pageX;
+ o3_y = e.pageY;
+ } else if (e.clientX) {
+ o3_x = eval('e.clientX+o3_frame.'+docRoot+'.scrollLeft');
+ o3_y = eval('e.clientY+o3_frame.'+docRoot+'.scrollTop');
+ }
+
+ if (o3_allowmove == 1) runHook("placeLayer", FREPLACE);
+
+ // MouseOut handler
+ if (hoveringSwitch && !olNs4 && runHook("cursorOff", FREPLACE)) {
+ (olHideDelay ? hideDelay(olHideDelay) : cClick());
+ hoveringSwitch = !hoveringSwitch;
+ }
+}
+
+// Fake function for 3.0 users.
+function no_overlib() { return ver3fix; }
+
+// Capture the mouse and chain other scripts.
+function olMouseCapture() {
+ capExtent = document;
+ var fN, str = '', l, k, f, wMv, sS, mseHandler = olMouseMove;
+ var re = /function[ ]*(\w*)\(/;
+
+ wMv = (!olIe4 && window.onmousemove);
+ if (document.onmousemove || wMv) {
+ if (wMv) capExtent = window;
+ f = capExtent.onmousemove.toString();
+ fN = f.match(re);
+ if (fN == null) {
+ str = f+'(e); ';
+ } else if (fN[1] == 'anonymous' || fN[1] == 'olMouseMove' || (wMv && fN[1] == 'onmousemove')) {
+ if (!olOp && wMv) {
+ l = f.indexOf('{')+1;
+ k = f.lastIndexOf('}');
+ sS = f.substring(l,k);
+ if ((l = sS.indexOf('(')) != -1) {
+ sS = sS.substring(0,l).replace(/^\s+/,'').replace(/\s+$/,'');
+ if (eval("typeof " + sS + " == 'undefined'")) window.onmousemove = null;
+ else str = sS + '(e);';
+ }
+ }
+ if (!str) {
+ olCheckMouseCapture = false;
+ return;
+ }
+ } else {
+ if (fN[1]) str = fN[1]+'(e); ';
+ else {
+ l = f.indexOf('{')+1;
+ k = f.lastIndexOf('}');
+ str = f.substring(l,k) + '\n';
+ }
+ }
+ str += 'olMouseMove(e); ';
+ mseHandler = new Function('e', str);
+ }
+
+ capExtent.onmousemove = mseHandler;
+ if (olNs4) capExtent.captureEvents(Event.MOUSEMOVE);
+}
+
+////////
+// PARSING FUNCTIONS
+////////
+
+// Does the actual command parsing.
+function parseTokens(pf, ar) {
+ // What the next argument is expected to be.
+ var v, i, mode=-1, par = (pf != 'ol_');
+ var fnMark = (par && !ar.length ? 1 : 0);
+
+ for (i = 0; i < ar.length; i++) {
+ if (mode < 0) {
+ // Arg is maintext,unless its a number between pmStart and pmUpper
+ // then its a command.
+ if (typeof ar[i] == 'number' && ar[i] > pmStart && ar[i] < pmUpper) {
+ fnMark = (par ? 1 : 0);
+ i--; // backup one so that the next block can parse it
+ } else {
+ switch(pf) {
+ case 'ol_':
+ ol_text = ar[i].toString();
+ break;
+ default:
+ o3_text=ar[i].toString();
+ }
+ }
+ mode = 0;
+ } else {
+ // Note: NS4 doesn't like switch cases with vars.
+ if (ar[i] >= pmCount || ar[i]==DONOTHING) { continue; }
+ if (ar[i]==INARRAY) { fnMark = 0; eval(pf+'text=ol_texts['+ar[++i]+'].toString()'); continue; }
+ if (ar[i]==CAPARRAY) { eval(pf+'cap=ol_caps['+ar[++i]+'].toString()'); continue; }
+ if (ar[i]==STICKY) { if (pf!='ol_') eval(pf+'sticky=1'); continue; }
+ if (ar[i]==BACKGROUND) { eval(pf+'background="'+ar[++i]+'"'); continue; }
+ if (ar[i]==NOCLOSE) { if (pf!='ol_') opt_NOCLOSE(); continue; }
+ if (ar[i]==CAPTION) { eval(pf+"cap='"+escSglQuote(ar[++i])+"'"); continue; }
+ if (ar[i]==CENTER || ar[i]==LEFT || ar[i]==RIGHT) { eval(pf+'hpos='+ar[i]); if(pf!='ol_') olHautoFlag=1; continue; }
+ if (ar[i]==OFFSETX) { eval(pf+'offsetx='+ar[++i]); continue; }
+ if (ar[i]==OFFSETY) { eval(pf+'offsety='+ar[++i]); continue; }
+ if (ar[i]==FGCOLOR) { eval(pf+'fgcolor="'+ar[++i]+'"'); continue; }
+ if (ar[i]==BGCOLOR) { eval(pf+'bgcolor="'+ar[++i]+'"'); continue; }
+ if (ar[i]==TEXTCOLOR) { eval(pf+'textcolor="'+ar[++i]+'"'); continue; }
+ if (ar[i]==CAPCOLOR) { eval(pf+'capcolor="'+ar[++i]+'"'); continue; }
+ if (ar[i]==CLOSECOLOR) { eval(pf+'closecolor="'+ar[++i]+'"'); continue; }
+ if (ar[i]==WIDTH) { eval(pf+'width='+ar[++i]); continue; }
+ if (ar[i]==BORDER) { eval(pf+'border='+ar[++i]); continue; }
+ if (ar[i]==CELLPAD) { i=opt_MULTIPLEARGS(++i,ar,(pf+'cellpad')); continue; }
+ if (ar[i]==STATUS) { eval(pf+"status='"+escSglQuote(ar[++i])+"'"); continue; }
+ if (ar[i]==AUTOSTATUS) { eval(pf +'autostatus=('+pf+'autostatus == 1) ? 0 : 1'); continue; }
+ if (ar[i]==AUTOSTATUSCAP) { eval(pf +'autostatus=('+pf+'autostatus == 2) ? 0 : 2'); continue; }
+ if (ar[i]==HEIGHT) { eval(pf+'height='+pf+'aboveheight='+ar[++i]); continue; } // Same param again.
+ if (ar[i]==CLOSETEXT) { eval(pf+"close='"+escSglQuote(ar[++i])+"'"); continue; }
+ if (ar[i]==SNAPX) { eval(pf+'snapx='+ar[++i]); continue; }
+ if (ar[i]==SNAPY) { eval(pf+'snapy='+ar[++i]); continue; }
+ if (ar[i]==FIXX) { eval(pf+'fixx='+ar[++i]); continue; }
+ if (ar[i]==FIXY) { eval(pf+'fixy='+ar[++i]); continue; }
+ if (ar[i]==RELX) { eval(pf+'relx='+ar[++i]); continue; }
+ if (ar[i]==RELY) { eval(pf+'rely='+ar[++i]); continue; }
+ if (ar[i]==FGBACKGROUND) { eval(pf+'fgbackground="'+ar[++i]+'"'); continue; }
+ if (ar[i]==BGBACKGROUND) { eval(pf+'bgbackground="'+ar[++i]+'"'); continue; }
+ if (ar[i]==PADX) { eval(pf+'padxl='+ar[++i]); eval(pf+'padxr='+ar[++i]); continue; }
+ if (ar[i]==PADY) { eval(pf+'padyt='+ar[++i]); eval(pf+'padyb='+ar[++i]); continue; }
+ if (ar[i]==FULLHTML) { if (pf!='ol_') eval(pf+'fullhtml=1'); continue; }
+ if (ar[i]==BELOW || ar[i]==ABOVE) { eval(pf+'vpos='+ar[i]); if (pf!='ol_') olVautoFlag=1; continue; }
+ if (ar[i]==CAPICON) { eval(pf+'capicon="'+ar[++i]+'"'); continue; }
+ if (ar[i]==TEXTFONT) { eval(pf+"textfont='"+escSglQuote(ar[++i])+"'"); continue; }
+ if (ar[i]==CAPTIONFONT) { eval(pf+"captionfont='"+escSglQuote(ar[++i])+"'"); continue; }
+ if (ar[i]==CLOSEFONT) { eval(pf+"closefont='"+escSglQuote(ar[++i])+"'"); continue; }
+ if (ar[i]==TEXTSIZE) { eval(pf+'textsize="'+ar[++i]+'"'); continue; }
+ if (ar[i]==CAPTIONSIZE) { eval(pf+'captionsize="'+ar[++i]+'"'); continue; }
+ if (ar[i]==CLOSESIZE) { eval(pf+'closesize="'+ar[++i]+'"'); continue; }
+ if (ar[i]==TIMEOUT) { eval(pf+'timeout='+ar[++i]); continue; }
+ if (ar[i]==FUNCTION) { if (pf=='ol_') { if (typeof ar[i+1]!='number') { v=ar[++i]; ol_function=(typeof v=='function' ? v : null); }} else {fnMark = 0; v = null; if (typeof ar[i+1]!='number') v = ar[++i]; opt_FUNCTION(v); } continue; }
+ if (ar[i]==DELAY) { eval(pf+'delay='+ar[++i]); continue; }
+ if (ar[i]==HAUTO) { eval(pf+'hauto=('+pf+'hauto == 0) ? 1 : 0'); continue; }
+ if (ar[i]==VAUTO) { eval(pf+'vauto=('+pf+'vauto == 0) ? 1 : 0'); continue; }
+ if (ar[i]==CLOSECLICK) { eval(pf +'closeclick=('+pf+'closeclick == 0) ? 1 : 0'); continue; }
+ if (ar[i]==WRAP) { eval(pf +'wrap=('+pf+'wrap == 0) ? 1 : 0'); continue; }
+ if (ar[i]==FOLLOWMOUSE) { eval(pf +'followmouse=('+pf+'followmouse == 1) ? 0 : 1'); continue; }
+ if (ar[i]==MOUSEOFF) { eval(pf +'mouseoff=('+pf+'mouseoff==0) ? 1 : 0'); v=ar[i+1]; if (pf != 'ol_' && eval(pf+'mouseoff') && typeof v == 'number' && (v < pmStart || v > pmUpper)) olHideDelay=ar[++i]; continue; }
+ if (ar[i]==CLOSETITLE) { eval(pf+"closetitle='"+escSglQuote(ar[++i])+"'"); continue; }
+ if (ar[i]==CSSOFF||ar[i]==CSSCLASS) { eval(pf+'css='+ar[i]); continue; }
+ if (ar[i]==COMPATMODE) { eval(pf+'compatmode=('+pf+'compatmode==0) ? 1 : 0'); continue; }
+ if (ar[i]==FGCLASS) { eval(pf+'fgclass="'+ar[++i]+'"'); continue; }
+ if (ar[i]==BGCLASS) { eval(pf+'bgclass="'+ar[++i]+'"'); continue; }
+ if (ar[i]==TEXTFONTCLASS) { eval(pf+'textfontclass="'+ar[++i]+'"'); continue; }
+ if (ar[i]==CAPTIONFONTCLASS) { eval(pf+'captionfontclass="'+ar[++i]+'"'); continue; }
+ if (ar[i]==CLOSEFONTCLASS) { eval(pf+'closefontclass="'+ar[++i]+'"'); continue; }
+ i = parseCmdLine(pf, i, ar);
+ }
+ }
+
+ if (fnMark && o3_function) o3_text = o3_function();
+
+ if ((pf == 'o3_') && o3_wrap) {
+ o3_width = 0;
+
+ var tReg=/<.*\n*>/ig;
+ if (!tReg.test(o3_text)) o3_text = o3_text.replace(/[ ]+/g, ' ');
+ if (!tReg.test(o3_cap))o3_cap = o3_cap.replace(/[ ]+/g, ' ');
+ }
+ if ((pf == 'o3_') && o3_sticky) {
+ if (!o3_close && (o3_frame != ol_frame)) o3_close = ol_close;
+ if (o3_mouseoff && (o3_frame == ol_frame)) opt_NOCLOSE(' ');
+ }
+}
+
+
+////////
+// LAYER FUNCTIONS
+////////
+
+// Writes to a layer
+function layerWrite(txt) {
+ txt += "\n";
+ if (olNs4) {
+ var lyr = o3_frame.document.layers['overDiv'].document
+ lyr.write(txt)
+ lyr.close()
+ } else if (typeof over.innerHTML != 'undefined') {
+ if (olIe5 && isMac) over.innerHTML = '';
+ over.innerHTML = txt;
+ } else {
+ range = o3_frame.document.createRange();
+ range.setStartAfter(over);
+ domfrag = range.createContextualFragment(txt);
+
+ while (over.hasChildNodes()) {
+ over.removeChild(over.lastChild);
+ }
+
+ over.appendChild(domfrag);
+ }
+}
+
+// Make an object visible
+function showObject(obj) {
+ runHook("showObject", FBEFORE);
+
+ var theObj=(olNs4 ? obj : obj.style);
+ theObj.visibility = 'visible';
+
+ runHook("showObject", FAFTER);
+}
+
+// Hides an object
+function hideObject(obj) {
+ runHook("hideObject", FBEFORE);
+
+ var theObj=(olNs4 ? obj : obj.style);
+ if (olNs6 && olShowId>0) { clearTimeout(olShowId); olShowId=0; }
+ theObj.visibility = 'hidden';
+ theObj.top = theObj.left = ((olIe4&&!olOp) ? 0 : -10000) + (!olNs4 ? 'px' : 0);
+
+ if (o3_timerid > 0) clearTimeout(o3_timerid);
+ if (o3_delayid > 0) clearTimeout(o3_delayid);
+
+ o3_timerid = 0;
+ o3_delayid = 0;
+ self.status = "";
+
+ if (obj.onmouseout||obj.onmouseover) {
+ if (olNs4) obj.releaseEvents(Event.MOUSEOUT || Event.MOUSEOVER);
+ obj.onmouseout = obj.onmouseover = null;
+ }
+
+ runHook("hideObject", FAFTER);
+}
+
+// Move a layer
+function repositionTo(obj, xL, yL) {
+ var theObj=(olNs4 ? obj : obj.style);
+ theObj.left = xL + (!olNs4 ? 'px' : 0);
+ theObj.top = yL + (!olNs4 ? 'px' : 0);
+}
+
+// Check position of cursor relative to overDiv DIVision; mouseOut function
+function cursorOff() {
+ var left = parseInt(over.style.left);
+ var top = parseInt(over.style.top);
+ var right = left + (over.offsetWidth >= parseInt(o3_width) ? over.offsetWidth : parseInt(o3_width));
+ var bottom = top + (over.offsetHeight >= o3_aboveheight ? over.offsetHeight : o3_aboveheight);
+
+ if (o3_x < left || o3_x > right || o3_y < top || o3_y > bottom) return true;
+
+ return false;
+}
+
+
+////////
+// COMMAND FUNCTIONS
+////////
+
+// Calls callme or the default function.
+function opt_FUNCTION(callme) {
+ o3_text = (callme ? (typeof callme=='string' ? (/.+\(.*\)/.test(callme) ? eval(callme) : callme) : callme()) : (o3_function ? o3_function() : 'No Function'));
+
+ return 0;
+}
+
+// Handle hovering
+function opt_NOCLOSE(unused) {
+ if (!unused) o3_close = "";
+
+ if (olNs4) {
+ over.captureEvents(Event.MOUSEOUT || Event.MOUSEOVER);
+ over.onmouseover = function () { if (o3_timerid > 0) { clearTimeout(o3_timerid); o3_timerid = 0; } }
+ over.onmouseout = function (e) { if (olHideDelay) hideDelay(olHideDelay); else cClick(e); }
+ } else {
+ over.onmouseover = function () {hoveringSwitch = true; if (o3_timerid > 0) { clearTimeout(o3_timerid); o3_timerid =0; } }
+ }
+
+ return 0;
+}
+
+// Function to scan command line arguments for multiples
+function opt_MULTIPLEARGS(i, args, parameter) {
+ var k=i, re, pV, str='';
+
+ for(k=i; kpmStart) break;
+ str += args[k] + ',';
+ }
+ if (str) str = str.substring(0,--str.length);
+
+ k--; // reduce by one so the for loop this is in works correctly
+ pV=(olNs4 && /cellpad/i.test(parameter)) ? str.split(',')[0] : str;
+ eval(parameter + '="' + pV + '"');
+
+ return k;
+}
+
+// Remove in texts when done.
+function nbspCleanup() {
+ if (o3_wrap) {
+ o3_text = o3_text.replace(/\ /g, ' ');
+ o3_cap = o3_cap.replace(/\ /g, ' ');
+ }
+}
+
+// Escape embedded single quotes in text strings
+function escSglQuote(str) {
+ return str.toString().replace(/'/g,"\\'");
+}
+
+// Onload handler for window onload event
+function OLonLoad_handler(e) {
+ var re = /\w+\(.*\)[;\s]+/g, olre = /overlib\(|nd\(|cClick\(/, fn, l, i;
+
+ if(!olLoaded) olLoaded=1;
+
+ // Remove it for Gecko based browsers
+ if(window.removeEventListener && e.eventPhase == 3) window.removeEventListener("load",OLonLoad_handler,false);
+ else if(window.detachEvent) { // and for IE and Opera 4.x but execute calls to overlib, nd, or cClick()
+ window.detachEvent("onload",OLonLoad_handler);
+ var fN = document.body.getAttribute('onload');
+ if (fN) {
+ fN=fN.toString().match(re);
+ if (fN && fN.length) {
+ for (i=0; i' : ' ') : '';
+ else {
+ fontStr='o3_'+whichString+'font';
+ fontColor='o3_'+((whichString=='caption')? 'cap' : whichString)+'color';
+ return (hasDims&&!olNs4) ? (isClose ? '' : '') : '
';
+ }
+}
+
+// Quotes Multi word font names; needed for CSS Standards adherence in font-family
+function quoteMultiNameFonts(theFont) {
+ var v, pM=theFont.split(',');
+ for (var i=0; i 0) clearTimeout(o3_timerid);
+
+ o3_timerid=setTimeout("cClick()",(o3_timeout=time));
+ }
+}
+
+// Was originally in the placeLayer() routine; separated out for future ease
+function horizontalPlacement(browserWidth, horizontalScrollAmount, widthFix) {
+ var placeX, iwidth=browserWidth, winoffset=horizontalScrollAmount;
+ var parsedWidth = parseInt(o3_width);
+
+ if (o3_fixx > -1 || o3_relx != null) {
+ // Fixed position
+ placeX=(o3_relx != null ? ( o3_relx < 0 ? winoffset +o3_relx+ iwidth - parsedWidth - widthFix : winoffset+o3_relx) : o3_fixx);
+ } else {
+ // If HAUTO, decide what to use.
+ if (o3_hauto == 1) {
+ if ((o3_x - winoffset) > (iwidth / 2)) {
+ o3_hpos = LEFT;
+ } else {
+ o3_hpos = RIGHT;
+ }
+ }
+
+ // From mouse
+ if (o3_hpos == CENTER) { // Center
+ placeX = o3_x+o3_offsetx-(parsedWidth/2);
+
+ if (placeX < winoffset) placeX = winoffset;
+ }
+
+ if (o3_hpos == RIGHT) { // Right
+ placeX = o3_x+o3_offsetx;
+
+ if ((placeX+parsedWidth) > (winoffset+iwidth - widthFix)) {
+ placeX = iwidth+winoffset - parsedWidth - widthFix;
+ if (placeX < 0) placeX = 0;
+ }
+ }
+ if (o3_hpos == LEFT) { // Left
+ placeX = o3_x-o3_offsetx-parsedWidth;
+ if (placeX < winoffset) placeX = winoffset;
+ }
+
+ // Snapping!
+ if (o3_snapx > 1) {
+ var snapping = placeX % o3_snapx;
+
+ if (o3_hpos == LEFT) {
+ placeX = placeX - (o3_snapx+snapping);
+ } else {
+ // CENTER and RIGHT
+ placeX = placeX+(o3_snapx - snapping);
+ }
+
+ if (placeX < winoffset) placeX = winoffset;
+ }
+ }
+
+ return placeX;
+}
+
+// was originally in the placeLayer() routine; separated out for future ease
+function verticalPlacement(browserHeight,verticalScrollAmount) {
+ var placeY, iheight=browserHeight, scrolloffset=verticalScrollAmount;
+ var parsedHeight=(o3_aboveheight ? parseInt(o3_aboveheight) : (olNs4 ? over.clip.height : over.offsetHeight));
+
+ if (o3_fixy > -1 || o3_rely != null) {
+ // Fixed position
+ placeY=(o3_rely != null ? (o3_rely < 0 ? scrolloffset+o3_rely+iheight - parsedHeight : scrolloffset+o3_rely) : o3_fixy);
+ } else {
+ // If VAUTO, decide what to use.
+ if (o3_vauto == 1) {
+ if ((o3_y - scrolloffset) > (iheight / 2) && o3_vpos == BELOW && (o3_y + parsedHeight + o3_offsety - (scrolloffset + iheight) > 0)) {
+ o3_vpos = ABOVE;
+ } else if (o3_vpos == ABOVE && (o3_y - (parsedHeight + o3_offsety) - scrolloffset < 0)) {
+ o3_vpos = BELOW;
+ }
+ }
+
+ // From mouse
+ if (o3_vpos == ABOVE) {
+ if (o3_aboveheight == 0) o3_aboveheight = parsedHeight;
+
+ placeY = o3_y - (o3_aboveheight+o3_offsety);
+ if (placeY < scrolloffset) placeY = scrolloffset;
+ } else {
+ // BELOW
+ placeY = o3_y+o3_offsety;
+ }
+
+ // Snapping!
+ if (o3_snapy > 1) {
+ var snapping = placeY % o3_snapy;
+
+ if (o3_aboveheight > 0 && o3_vpos == ABOVE) {
+ placeY = placeY - (o3_snapy+snapping);
+ } else {
+ placeY = placeY+(o3_snapy - snapping);
+ }
+
+ if (placeY < scrolloffset) placeY = scrolloffset;
+ }
+ }
+
+ return placeY;
+}
+
+// checks positioning flags
+function checkPositionFlags() {
+ if (olHautoFlag) olHautoFlag = o3_hauto=0;
+ if (olVautoFlag) olVautoFlag = o3_vauto=0;
+ return true;
+}
+
+// get Browser window width
+function windowWidth() {
+ var w;
+ if (o3_frame.innerWidth) w=o3_frame.innerWidth;
+ else if (eval('o3_frame.'+docRoot)&&eval("typeof o3_frame."+docRoot+".clientWidth=='number'")&&eval('o3_frame.'+docRoot+'.clientWidth'))
+ w=eval('o3_frame.'+docRoot+'.clientWidth');
+ return w;
+}
+
+// create the div container for popup content if it doesn't exist
+function createDivContainer(id,frm,zValue) {
+ id = (id || 'overDiv'), frm = (frm || o3_frame), zValue = (zValue || 1000);
+ var objRef, divContainer = layerReference(id);
+
+ if (divContainer == null) {
+ if (olNs4) {
+ divContainer = frm.document.layers[id] = new Layer(window.innerWidth, frm);
+ objRef = divContainer;
+ } else {
+ var body = (olIe4 ? frm.document.all.tags('BODY')[0] : frm.document.getElementsByTagName("BODY")[0]);
+ if (olIe4&&!document.getElementById) {
+ body.insertAdjacentHTML("beforeEnd",'');
+ divContainer=layerReference(id);
+ } else {
+ divContainer = frm.document.createElement("DIV");
+ divContainer.id = id;
+ body.appendChild(divContainer);
+ }
+ objRef = divContainer.style;
+ }
+
+ objRef.position = 'absolute';
+ objRef.visibility = 'hidden';
+ objRef.zIndex = zValue;
+ if (olIe4&&!olOp) objRef.left = objRef.top = '0px';
+ else objRef.left = objRef.top = -10000 + (!olNs4 ? 'px' : 0);
+ }
+
+ return divContainer;
+}
+
+// get reference to a layer with ID=id
+function layerReference(id) {
+ return (olNs4 ? o3_frame.document.layers[id] : (document.all ? o3_frame.document.all[id] : o3_frame.document.getElementById(id)));
+}
+////////
+// UTILITY FUNCTIONS
+////////
+
+// Checks if something is a function.
+function isFunction(fnRef) {
+ var rtn = true;
+
+ if (typeof fnRef == 'object') {
+ for (var i = 0; i < fnRef.length; i++) {
+ if (typeof fnRef[i]=='function') continue;
+ rtn = false;
+ break;
+ }
+ } else if (typeof fnRef != 'function') {
+ rtn = false;
+ }
+
+ return rtn;
+}
+
+// Converts an array into an argument string for use in eval.
+function argToString(array, strtInd, argName) {
+ var jS = strtInd, aS = '', ar = array;
+ argName=(argName ? argName : 'ar');
+
+ if (ar.length > jS) {
+ for (var k = jS; k < ar.length; k++) aS += argName+'['+k+'], ';
+ aS = aS.substring(0, aS.length-2);
+ }
+
+ return aS;
+}
+
+// Places a hook in the correct position in a hook point.
+function reOrder(hookPt, fnRef, order) {
+ var newPt = new Array(), match, i, j;
+
+ if (!order || typeof order == 'undefined' || typeof order == 'number') return hookPt;
+
+ if (typeof order=='function') {
+ if (typeof fnRef=='object') {
+ newPt = newPt.concat(fnRef);
+ } else {
+ newPt[newPt.length++]=fnRef;
+ }
+
+ for (i = 0; i < hookPt.length; i++) {
+ match = false;
+ if (typeof fnRef == 'function' && hookPt[i] == fnRef) {
+ continue;
+ } else {
+ for(j = 0; j < fnRef.length; j++) if (hookPt[i] == fnRef[j]) {
+ match = true;
+ break;
+ }
+ }
+ if (!match) newPt[newPt.length++] = hookPt[i];
+ }
+
+ newPt[newPt.length++] = order;
+
+ } else if (typeof order == 'object') {
+ if (typeof fnRef == 'object') {
+ newPt = newPt.concat(fnRef);
+ } else {
+ newPt[newPt.length++] = fnRef;
+ }
+
+ for (j = 0; j < hookPt.length; j++) {
+ match = false;
+ if (typeof fnRef == 'function' && hookPt[j] == fnRef) {
+ continue;
+ } else {
+ for (i = 0; i < fnRef.length; i++) if (hookPt[j] == fnRef[i]) {
+ match = true;
+ break;
+ }
+ }
+ if (!match) newPt[newPt.length++]=hookPt[j];
+ }
+
+ for (i = 0; i < newPt.length; i++) hookPt[i] = newPt[i];
+ newPt.length = 0;
+
+ for (j = 0; j < hookPt.length; j++) {
+ match = false;
+ for (i = 0; i < order.length; i++) {
+ if (hookPt[j] == order[i]) {
+ match = true;
+ break;
+ }
+ }
+ if (!match) newPt[newPt.length++] = hookPt[j];
+ }
+ newPt = newPt.concat(order);
+ }
+
+ hookPt = newPt;
+
+ return hookPt;
+}
+
+////////
+// PLUGIN ACTIVATION FUNCTIONS
+////////
+
+// Runs plugin functions to set runtime variables.
+function setRunTimeVariables(){
+ if (typeof runTime != 'undefined' && runTime.length) {
+ for (var k = 0; k < runTime.length; k++) {
+ runTime[k]();
+ }
+ }
+}
+
+// Runs plugin functions to parse commands.
+function parseCmdLine(pf, i, args) {
+ if (typeof cmdLine != 'undefined' && cmdLine.length) {
+ for (var k = 0; k < cmdLine.length; k++) {
+ var j = cmdLine[k](pf, i, args);
+ if (j >- 1) {
+ i = j;
+ break;
+ }
+ }
+ }
+
+ return i;
+}
+
+// Runs plugin functions to do things after parse.
+function postParseChecks(pf,args){
+ if (typeof postParse != 'undefined' && postParse.length) {
+ for (var k = 0; k < postParse.length; k++) {
+ if (postParse[k](pf,args)) continue;
+ return false; // end now since have an error
+ }
+ }
+ return true;
+}
+
+
+////////
+// PLUGIN REGISTRATION FUNCTIONS
+////////
+
+// Registers commands and creates constants.
+function registerCommands(cmdStr) {
+ if (typeof cmdStr!='string') return;
+
+ var pM = cmdStr.split(',');
+ pms = pms.concat(pM);
+
+ for (var i = 0; i< pM.length; i++) {
+ eval(pM[i].toUpperCase()+'='+pmCount++);
+ }
+}
+
+// Registers no-parameter commands
+function registerNoParameterCommands(cmdStr) {
+ if (!cmdStr && typeof cmdStr != 'string') return;
+ pmt=(!pmt) ? cmdStr : pmt + ',' + cmdStr;
+}
+
+// Register a function to hook at a certain point.
+function registerHook(fnHookTo, fnRef, hookType, optPm) {
+ var hookPt, last = typeof optPm;
+
+ if (fnHookTo == 'plgIn'||fnHookTo == 'postParse') return;
+ if (typeof hookPts[fnHookTo] == 'undefined') hookPts[fnHookTo] = new FunctionReference();
+
+ hookPt = hookPts[fnHookTo];
+
+ if (hookType != null) {
+ if (hookType == FREPLACE) {
+ hookPt.ovload = fnRef; // replace normal overlib routine
+ if (fnHookTo.indexOf('ol_content_') > -1) hookPt.alt[pms[CSSOFF-1-pmStart]]=fnRef;
+
+ } else if (hookType == FBEFORE || hookType == FAFTER) {
+ var hookPt=(hookType == 1 ? hookPt.before : hookPt.after);
+
+ if (typeof fnRef == 'object') {
+ hookPt = hookPt.concat(fnRef);
+ } else {
+ hookPt[hookPt.length++] = fnRef;
+ }
+
+ if (optPm) hookPt = reOrder(hookPt, fnRef, optPm);
+
+ } else if (hookType == FALTERNATE) {
+ if (last=='number') hookPt.alt[pms[optPm-1-pmStart]] = fnRef;
+ } else if (hookType == FCHAIN) {
+ hookPt = hookPt.chain;
+ if (typeof fnRef=='object') hookPt=hookPt.concat(fnRef); // add other functions
+ else hookPt[hookPt.length++]=fnRef;
+ }
+
+ return;
+ }
+}
+
+// Register a function that will set runtime variables.
+function registerRunTimeFunction(fn) {
+ if (isFunction(fn)) {
+ if (typeof fn == 'object') {
+ runTime = runTime.concat(fn);
+ } else {
+ runTime[runTime.length++] = fn;
+ }
+ }
+}
+
+// Register a function that will handle command parsing.
+function registerCmdLineFunction(fn){
+ if (isFunction(fn)) {
+ if (typeof fn == 'object') {
+ cmdLine = cmdLine.concat(fn);
+ } else {
+ cmdLine[cmdLine.length++] = fn;
+ }
+ }
+}
+
+// Register a function that does things after command parsing.
+function registerPostParseFunction(fn){
+ if (isFunction(fn)) {
+ if (typeof fn == 'object') {
+ postParse = postParse.concat(fn);
+ } else {
+ postParse[postParse.length++] = fn;
+ }
+ }
+}
+
+////////
+// PLUGIN REGISTRATION FUNCTIONS
+////////
+
+// Runs any hooks registered.
+function runHook(fnHookTo, hookType) {
+ var l = hookPts[fnHookTo], k, rtnVal = null, optPm, arS, ar = runHook.arguments;
+
+ if (hookType == FREPLACE) {
+ arS = argToString(ar, 2);
+
+ if (typeof l == 'undefined' || !(l = l.ovload)) rtnVal = eval(fnHookTo+'('+arS+')');
+ else rtnVal = eval('l('+arS+')');
+
+ } else if (hookType == FBEFORE || hookType == FAFTER) {
+ if (typeof l != 'undefined') {
+ l=(hookType == 1 ? l.before : l.after);
+
+ if (l.length) {
+ arS = argToString(ar, 2);
+ for (var k = 0; k < l.length; k++) eval('l[k]('+arS+')');
+ }
+ }
+ } else if (hookType == FALTERNATE) {
+ optPm = ar[2];
+ arS = argToString(ar, 3);
+
+ if (typeof l == 'undefined' || (l = l.alt[pms[optPm-1-pmStart]]) == 'undefined') {
+ rtnVal = eval(fnHookTo+'('+arS+')');
+ } else {
+ rtnVal = eval('l('+arS+')');
+ }
+ } else if (hookType == FCHAIN) {
+ arS=argToString(ar,2);
+ l=l.chain;
+
+ for (k=l.length; k > 0; k--) if((rtnVal=eval('l[k-1]('+arS+')'))!=void(0)) break;
+ }
+
+ return rtnVal;
+}
+
+////////
+// OBJECT CONSTRUCTORS
+////////
+
+// Object for handling hooks.
+function FunctionReference() {
+ this.ovload = null;
+ this.before = new Array();
+ this.after = new Array();
+ this.alt = new Array();
+ this.chain = new Array();
+}
+
+// Object for simple access to the overLIB version used.
+// Examples: simpleversion:351 major:3 minor:5 revision:1
+function Info(version, prerelease) {
+ this.version = version;
+ this.prerelease = prerelease;
+
+ this.simpleversion = Math.round(this.version*100);
+ this.major = parseInt(this.simpleversion / 100);
+ this.minor = parseInt(this.simpleversion / 10) - this.major * 10;
+ this.revision = parseInt(this.simpleversion) - this.major * 100 - this.minor * 10;
+ this.meets = meets;
+}
+
+// checks for Core Version required
+function meets(reqdVersion) {
+ return (!reqdVersion) ? false : this.simpleversion >= Math.round(100*parseFloat(reqdVersion));
+}
+
+
+////////
+// STANDARD REGISTRATIONS
+////////
+registerHook("ol_content_simple", ol_content_simple, FALTERNATE, CSSOFF);
+registerHook("ol_content_caption", ol_content_caption, FALTERNATE, CSSOFF);
+registerHook("ol_content_background", ol_content_background, FALTERNATE, CSSOFF);
+registerHook("ol_content_simple", ol_content_simple, FALTERNATE, CSSCLASS);
+registerHook("ol_content_caption", ol_content_caption, FALTERNATE, CSSCLASS);
+registerHook("ol_content_background", ol_content_background, FALTERNATE, CSSCLASS);
+registerPostParseFunction(checkPositionFlags);
+registerHook("hideObject", nbspCleanup, FAFTER);
+registerHook("horizontalPlacement", horizontalPlacement, FCHAIN);
+registerHook("verticalPlacement", verticalPlacement, FCHAIN);
+if (olNs4||(olIe5&&isMac)||olKq) olLoaded=1;
+registerNoParameterCommands('sticky,autostatus,autostatuscap,fullhtml,hauto,vauto,closeclick,wrap,followmouse,mouseoff,compatmode');
+///////
+// ESTABLISH MOUSECAPTURING
+///////
+
+// Capture events, alt. diffuses the overlib function.
+var olCheckMouseCapture=true;
+if ((olNs4 || olNs6 || olIe4)) {
+ olMouseCapture();
+} else {
+ overlib = no_overlib;
+ nd = no_overlib;
+ ver3fix = true;
+}
diff --git a/web/public_php/admin/overlib/overlib_anchor.js b/web/public_php/admin/overlib/overlib_anchor.js
index c97b58c783..510b2dd7ef 100644
--- a/web/public_php/admin/overlib/overlib_anchor.js
+++ b/web/public_php/admin/overlib/overlib_anchor.js
@@ -1,333 +1,333 @@
-//\/////
-//\ overLIB Anchor Plugin
-//\ This file requires overLIB 4.10 or later.
-//\
-//\ overLIB 4.10 - You may not remove or change this notice.
-//\ Copyright Erik Bosrup 1998-2004. All rights reserved.
-//\ Contributors are listed on the homepage.
-//\ See http://www.bosrup.com/web/overlib/ for details.
-// $Revision: 1.1 $ $Date: 2006/05/29 16:38:21 $
-//\/////
-//\mini
-
-
-////////
-// PRE-INIT
-// Ignore these lines, configuration is below.
-////////
-if (typeof olInfo == 'undefined' || typeof olInfo.meets == 'undefined' || !olInfo.meets(4.10)) alert('overLIB 4.10 or later is required for the Anchor Plugin.');
-else {
-registerCommands('anchor,anchorx,anchory,noanchorwarn,anchoralign');
-
-
-
-////////
-// DEFAULT CONFIGURATION
-// Settings you want everywhere are set here. All of this can also be
-// changed on your html page or through an overLIB call.
-////////
-if (typeof ol_anchor == 'undefined') var ol_anchor = '';
-if (typeof ol_anchorx == 'undefined') var ol_anchorx = 0;
-if (typeof ol_anchory == 'undefined') var ol_anchory = 0;
-if (typeof ol_noanchorwarn == 'undefined') var ol_noanchorwarn = 1;
-if (typeof ol_anchoralign == 'undefined') var ol_anchoralign = 'UL';
-
-////////
-// END OF CONFIGURATION
-// Don't change anything below this line, all configuration is above.
-////////
-
-
-
-
-
-////////
-// INIT
-////////
-// Runtime variables init. Don't change for config!
-var o3_anchor = "";
-var o3_anchorx = 0;
-var o3_anchory = 0;
-var o3_noanchorwarn = 1;
-var o3_anchoralign = 'UL';
-var mrkObj, rmrkPosition; //reference mark object, reference mark position, an array;
-
-
-////////
-// PLUGIN FUNCTIONS
-////////
-function setAnchorVariables() {
- o3_anchor = ol_anchor;
- o3_anchorx = ol_anchorx;
- o3_anchory = ol_anchory;
- o3_noanchorwarn = ol_noanchorwarn;
- o3_anchoralign = ol_anchoralign;
- mrkObj = null; // initialize this variable
-}
-
-// Parses Reference Mark commands
-function parseAnchorExtras(pf,i,ar) {
- var v, k=i;
-
- if (k < ar.length) {
- if (ar[k] == ANCHOR) { eval(pf + "anchor = '" + escSglQuote(ar[++k]) + "'"); return k; }
- if (ar[k] == ANCHORX) { eval(pf + 'anchorx = ' + ar[++k]); return k; }
- if (ar[k] == ANCHORY) { eval(pf + 'anchory = ' + ar[++k]); return k; }
- if (ar[k] == NOANCHORWARN) { eval(pf + 'noanchorwarn = (' + pf + 'noanchorwarn==1) ? 0 : 1'); return k; }
- if (ar[k] == ANCHORALIGN) { k = opt_MULTIPLEARGS(++k, ar, (pf + 'anchoralign')); return k; }
- }
-
- return -1;
-}
-
-
-///////
-// FUNCTION WHICH CHECKS FOR THE EXISTENCE OF A REFERENCE MARKER
-///////
-function checkAnchorObject() {
- var w = o3_anchor;
-
- if (w) {
- if (!(mrkObj = getAnchorObjectRef(w))) {
- if (o3_noanchorwarn) {
- alert('WARNING! Reference mark "' + w + '" not found.');
- return false;
- } else w = '';
- }
- }
-
- return true;
-}
-
-///////
-// EXTERNAL SUPPORT FUNCTIONS TO HANDLE ANCHOR PROPERTIES
-///////
-
-// Horizontal placement routine with anchors
-function anchorHorizontal(browserWidth, horizontalScrollAmount, widthFix) {
- var hasAnchor = (typeof o3_anchor != 'undefined' && o3_anchor);
- if (!hasAnchor) return void(0);
-
- // set o3_relx for follow scroll if defined
- if (typeof o3_followscroll != 'undefined' && o3_followscroll && o3_sticky) o3_relx = rmrkPosition[0];
-
- return rmrkPosition[0];
-}
-
-// Vertical placement routine with anchors
-function anchorVertical(browserHeight,verticalScrollAmount) {
- var hasAnchor = (typeof o3_anchor != 'undefined' && o3_anchor);
- if (!hasAnchor) return void(0);
-
- // set o3_rely for follow scroll if defined
- if (typeof o3_followscroll != 'undefined' && o3_followscroll && o3_sticky) o3_rely = rmrkPosition[1];
-
- return rmrkPosition[1];
-}
-
-// Stub function for the runHook routine
-function anchorPreface() {
- if (!mrkObj) return;
- rmrkPosition = getAnchorLocation(mrkObj);
-}
-
-// Get Reference Mark object
-function getAnchorObjectRef(aObj) {
- return getRefById(aObj, o3_frame.document) || getRefByName(aObj, o3_frame.document)
-}
-
-// Adapted to overlib from jwin by Jason Anderson -- http://www.jwinlib.com
-function getAnchorLocation(objRef){
- var mkObj, of, offsets, mlyr
-
- mkObj = mlyr = objRef
- offsets = [o3_anchorx, o3_anchory]
-
- if (document.layers){
- if (typeof mlyr.length != 'undefined' && mlyr.length > 1) {
- mkObj = mlyr[0]
- offsets[0] += mlyr[0].x + mlyr[1].pageX
- offsets[1] += mlyr[0].y + mlyr[1].pageY
- } else {
- if(mlyr.toString().indexOf('Image') != -1 || mlyr.toString().indexOf('Anchor') != -1){
- offsets[0] += mlyr.x
- offsets[1] += mlyr.y
- } else {
- offsets[0] += mlyr.pageX
- offsets[1] += mlyr.pageY
- }
- }
- } else {
- offsets[0] += pageLocation(mlyr, 'Left')
- offsets[1] += pageLocation(mlyr, 'Top')
- }
-
- of = getAnchorOffsets(mkObj)
-
- if (typeof o3_dragimg != 'undefined' && o3_dragimg) {
- olImgLeft = offsets[0];
- olImgTop = offsets[1];
- }
-
- offsets[0] += of[0]
- offsets[1] += of[1]
-
- if (typeof o3_dragimg != 'undefined' && o3_dragimg) {
- olImgRight = offsets[0];
- olImgBottom = offsets[1];
- return;
- }
-
- return offsets;
-}
-
-// Adapted to overlib from jwin by Jason Anderson -- http://www.jwinlib.com
-function getAnchorOffsets(mkObj){
- var fx = fy = 0, mp, puc, mkAry, sx = sy = 0, w = o3_anchoralign
- var mW = mH = pW = pH = 0
- var off = [0, 0]
-
- mkAry = w.split(',');
-
- if (mkAry.length < 3) {
- mp = mkAry[0].toUpperCase();
- puc = (mkAry.length == 1) ? mp : mkAry[1].toUpperCase();
- } else if (mkAry.length == 3) {
- if (!isNaN(mkAry[0])) {
- mp = mkAry.slice(0, 2);
- puc = mkAry[2].toUpperCase();
- } else {
- mp = mkAry[0].toUpperCase();
- puc = mkAry.slice(1);
- }
- } else {
- mp = mkAry.slice(0, 2);
- puc = mkAry.slice(2);
- }
-
- var shdwPresent = typeof o3_shadow != 'undefined' && o3_shadow
-
- if (shdwPresent) {
- sx = Math.abs(o3_shadowx);
- sy = Math.abs(o3_shadowy);
- }
-
- pW = (shdwPresent ? parseInt(o3_width) : (olNs4 ? over.clip.width : over.offsetWidth))
- pH = (shdwPresent ? parseInt(o3_aboveheight) : (olNs4 ? over.clip.height : over.offsetHeight))
-
- if (olOp && o3_wrap) {
- pW = (shdwPresent ? parseInt(o3_width) : (olNs4 ? over.clip.width : over.offsetWidth))
- pH = (shdwPresent ? parseInt(o3_aboveheight) : (olNs4 ? over.clip.height : over.offsetHeight))
- }
-
- if (!olOp && mkObj.toString().indexOf('Image') != -1){
- mW = mkObj.width
- mH = mkObj.height
- } else if (!olOp && mkObj.toString().indexOf('Anchor') != -1) { // enforced only for NS4
- mp = 'UL'
- } else {
- mW = (olNs4) ? mkObj.clip.width : mkObj.offsetWidth
- mH = (olNs4) ? mkObj.clip.height : mkObj.offsetHeight
- }
-
- if (!isNaN(mp) || typeof mp == 'object') {
- if (typeof mp == 'object') {
- fx = parseFloat(mp[0]);
- fy = parseFloat(mp[1]);
- } else
- fx = fy = parseFloat(mp);
- off = [Math.round(fx*mW), Math.round(fy*mH)];
- } else {
- if (mp == 'UR') off = [mW, 0]
- else if (mp == 'LL') off = [0, mH]
- else if (mp == 'LR') off = [mW, mH]
- }
-
- if (typeof o3_dragimg != 'undefined' && o3_dragimg) return off;
- else {
- if (!isNaN(puc) || typeof puc == 'object' ) {
- if (typeof puc == 'object') {
- fx = parseFloat(puc[0]);
- fy = parseFloat(puc[1]);
- } else
- fx = fy = parseFloat(puc);
- off[0] -= Math.round(fx*(pW - sx));
- off[1] -= Math.round(fy*(pH - sy));
- } else {
- if (puc == 'UR') {
- off[0] -= (pW - sx);
- off[1] -= sy
- } else if (puc == 'LL') {
- off[0] -= sx;
- off[1] -= (pH - sy)
- } else if (puc == 'LR') {
- off[0] -= (pW-sx);
- off[1] -= (pH - sy)
- }
- }
- return off
- }
-}
-
-// Adapted to overlib from jwin by Jason Anderson -- http://www.jwinlib.com
-function pageLocation(o, t){
- var x = 0
-
- while(o.offsetParent){
- x += o['offset' + t]
- o = o.offsetParent
- }
- x += o['offset' + t]
-
- return x
-}
-
-// Adapted to overlib from jwin by Jason Anderson -- http://www.jwinlib.com
-function getRefById(l, d){
- var r = "", j
-
- d = (d || document)
- if (d.all) return d.all[l]
- else if (d.getElementById) return d.getElementById(l)
- else if (d.layers && d.layers.length > 0) {
- if (d.layers[l]) return d.layers[l]
-
- for (j=0; j < d.layers.length; j++) {
- r = getRefById(l, d.layers[j].document)
- if(r) return r
- }
- }
-
- return false
-}
-
-// Adapted to overlib from jwin by Jason Anderson -- http://www.jwinlib.com
-function getRefByName(l, d) {
- var r = null, j
-
- d = (d || document)
-
- if (d.images[l]) return d.images[l]
- else if (d.anchors[l]) return d.anchors[l];
- else if (d.layers && d.layers.length > 0) {
- for (j=0; j < d.layers.length; j++) {
- r = getRefByName(l, d.layers[j].document)
- if (r && r.length > 0) return r
- else if (r) return [r, d.layers[j]]
- }
- }
-
- return null
-}
-
-////////
-// PLUGIN REGISTRATIONS
-////////
-registerRunTimeFunction(setAnchorVariables);
-registerCmdLineFunction(parseAnchorExtras);
-registerPostParseFunction(checkAnchorObject);
-registerHook("createPopup", anchorPreface, FAFTER);
-registerHook("horizontalPlacement", anchorHorizontal, FCHAIN);
-registerHook("verticalPlacement", anchorVertical, FCHAIN);
-if(olInfo.meets(4.10)) registerNoParameterCommands('noanchorwarn');
-}
\ No newline at end of file
+//\/////
+//\ overLIB Anchor Plugin
+//\ This file requires overLIB 4.10 or later.
+//\
+//\ overLIB 4.10 - You may not remove or change this notice.
+//\ Copyright Erik Bosrup 1998-2004. All rights reserved.
+//\ Contributors are listed on the homepage.
+//\ See http://www.bosrup.com/web/overlib/ for details.
+// $Revision: 1.1 $ $Date: 2006/05/29 16:38:21 $
+//\/////
+//\mini
+
+
+////////
+// PRE-INIT
+// Ignore these lines, configuration is below.
+////////
+if (typeof olInfo == 'undefined' || typeof olInfo.meets == 'undefined' || !olInfo.meets(4.10)) alert('overLIB 4.10 or later is required for the Anchor Plugin.');
+else {
+registerCommands('anchor,anchorx,anchory,noanchorwarn,anchoralign');
+
+
+
+////////
+// DEFAULT CONFIGURATION
+// Settings you want everywhere are set here. All of this can also be
+// changed on your html page or through an overLIB call.
+////////
+if (typeof ol_anchor == 'undefined') var ol_anchor = '';
+if (typeof ol_anchorx == 'undefined') var ol_anchorx = 0;
+if (typeof ol_anchory == 'undefined') var ol_anchory = 0;
+if (typeof ol_noanchorwarn == 'undefined') var ol_noanchorwarn = 1;
+if (typeof ol_anchoralign == 'undefined') var ol_anchoralign = 'UL';
+
+////////
+// END OF CONFIGURATION
+// Don't change anything below this line, all configuration is above.
+////////
+
+
+
+
+
+////////
+// INIT
+////////
+// Runtime variables init. Don't change for config!
+var o3_anchor = "";
+var o3_anchorx = 0;
+var o3_anchory = 0;
+var o3_noanchorwarn = 1;
+var o3_anchoralign = 'UL';
+var mrkObj, rmrkPosition; //reference mark object, reference mark position, an array;
+
+
+////////
+// PLUGIN FUNCTIONS
+////////
+function setAnchorVariables() {
+ o3_anchor = ol_anchor;
+ o3_anchorx = ol_anchorx;
+ o3_anchory = ol_anchory;
+ o3_noanchorwarn = ol_noanchorwarn;
+ o3_anchoralign = ol_anchoralign;
+ mrkObj = null; // initialize this variable
+}
+
+// Parses Reference Mark commands
+function parseAnchorExtras(pf,i,ar) {
+ var v, k=i;
+
+ if (k < ar.length) {
+ if (ar[k] == ANCHOR) { eval(pf + "anchor = '" + escSglQuote(ar[++k]) + "'"); return k; }
+ if (ar[k] == ANCHORX) { eval(pf + 'anchorx = ' + ar[++k]); return k; }
+ if (ar[k] == ANCHORY) { eval(pf + 'anchory = ' + ar[++k]); return k; }
+ if (ar[k] == NOANCHORWARN) { eval(pf + 'noanchorwarn = (' + pf + 'noanchorwarn==1) ? 0 : 1'); return k; }
+ if (ar[k] == ANCHORALIGN) { k = opt_MULTIPLEARGS(++k, ar, (pf + 'anchoralign')); return k; }
+ }
+
+ return -1;
+}
+
+
+///////
+// FUNCTION WHICH CHECKS FOR THE EXISTENCE OF A REFERENCE MARKER
+///////
+function checkAnchorObject() {
+ var w = o3_anchor;
+
+ if (w) {
+ if (!(mrkObj = getAnchorObjectRef(w))) {
+ if (o3_noanchorwarn) {
+ alert('WARNING! Reference mark "' + w + '" not found.');
+ return false;
+ } else w = '';
+ }
+ }
+
+ return true;
+}
+
+///////
+// EXTERNAL SUPPORT FUNCTIONS TO HANDLE ANCHOR PROPERTIES
+///////
+
+// Horizontal placement routine with anchors
+function anchorHorizontal(browserWidth, horizontalScrollAmount, widthFix) {
+ var hasAnchor = (typeof o3_anchor != 'undefined' && o3_anchor);
+ if (!hasAnchor) return void(0);
+
+ // set o3_relx for follow scroll if defined
+ if (typeof o3_followscroll != 'undefined' && o3_followscroll && o3_sticky) o3_relx = rmrkPosition[0];
+
+ return rmrkPosition[0];
+}
+
+// Vertical placement routine with anchors
+function anchorVertical(browserHeight,verticalScrollAmount) {
+ var hasAnchor = (typeof o3_anchor != 'undefined' && o3_anchor);
+ if (!hasAnchor) return void(0);
+
+ // set o3_rely for follow scroll if defined
+ if (typeof o3_followscroll != 'undefined' && o3_followscroll && o3_sticky) o3_rely = rmrkPosition[1];
+
+ return rmrkPosition[1];
+}
+
+// Stub function for the runHook routine
+function anchorPreface() {
+ if (!mrkObj) return;
+ rmrkPosition = getAnchorLocation(mrkObj);
+}
+
+// Get Reference Mark object
+function getAnchorObjectRef(aObj) {
+ return getRefById(aObj, o3_frame.document) || getRefByName(aObj, o3_frame.document)
+}
+
+// Adapted to overlib from jwin by Jason Anderson -- http://www.jwinlib.com
+function getAnchorLocation(objRef){
+ var mkObj, of, offsets, mlyr
+
+ mkObj = mlyr = objRef
+ offsets = [o3_anchorx, o3_anchory]
+
+ if (document.layers){
+ if (typeof mlyr.length != 'undefined' && mlyr.length > 1) {
+ mkObj = mlyr[0]
+ offsets[0] += mlyr[0].x + mlyr[1].pageX
+ offsets[1] += mlyr[0].y + mlyr[1].pageY
+ } else {
+ if(mlyr.toString().indexOf('Image') != -1 || mlyr.toString().indexOf('Anchor') != -1){
+ offsets[0] += mlyr.x
+ offsets[1] += mlyr.y
+ } else {
+ offsets[0] += mlyr.pageX
+ offsets[1] += mlyr.pageY
+ }
+ }
+ } else {
+ offsets[0] += pageLocation(mlyr, 'Left')
+ offsets[1] += pageLocation(mlyr, 'Top')
+ }
+
+ of = getAnchorOffsets(mkObj)
+
+ if (typeof o3_dragimg != 'undefined' && o3_dragimg) {
+ olImgLeft = offsets[0];
+ olImgTop = offsets[1];
+ }
+
+ offsets[0] += of[0]
+ offsets[1] += of[1]
+
+ if (typeof o3_dragimg != 'undefined' && o3_dragimg) {
+ olImgRight = offsets[0];
+ olImgBottom = offsets[1];
+ return;
+ }
+
+ return offsets;
+}
+
+// Adapted to overlib from jwin by Jason Anderson -- http://www.jwinlib.com
+function getAnchorOffsets(mkObj){
+ var fx = fy = 0, mp, puc, mkAry, sx = sy = 0, w = o3_anchoralign
+ var mW = mH = pW = pH = 0
+ var off = [0, 0]
+
+ mkAry = w.split(',');
+
+ if (mkAry.length < 3) {
+ mp = mkAry[0].toUpperCase();
+ puc = (mkAry.length == 1) ? mp : mkAry[1].toUpperCase();
+ } else if (mkAry.length == 3) {
+ if (!isNaN(mkAry[0])) {
+ mp = mkAry.slice(0, 2);
+ puc = mkAry[2].toUpperCase();
+ } else {
+ mp = mkAry[0].toUpperCase();
+ puc = mkAry.slice(1);
+ }
+ } else {
+ mp = mkAry.slice(0, 2);
+ puc = mkAry.slice(2);
+ }
+
+ var shdwPresent = typeof o3_shadow != 'undefined' && o3_shadow
+
+ if (shdwPresent) {
+ sx = Math.abs(o3_shadowx);
+ sy = Math.abs(o3_shadowy);
+ }
+
+ pW = (shdwPresent ? parseInt(o3_width) : (olNs4 ? over.clip.width : over.offsetWidth))
+ pH = (shdwPresent ? parseInt(o3_aboveheight) : (olNs4 ? over.clip.height : over.offsetHeight))
+
+ if (olOp && o3_wrap) {
+ pW = (shdwPresent ? parseInt(o3_width) : (olNs4 ? over.clip.width : over.offsetWidth))
+ pH = (shdwPresent ? parseInt(o3_aboveheight) : (olNs4 ? over.clip.height : over.offsetHeight))
+ }
+
+ if (!olOp && mkObj.toString().indexOf('Image') != -1){
+ mW = mkObj.width
+ mH = mkObj.height
+ } else if (!olOp && mkObj.toString().indexOf('Anchor') != -1) { // enforced only for NS4
+ mp = 'UL'
+ } else {
+ mW = (olNs4) ? mkObj.clip.width : mkObj.offsetWidth
+ mH = (olNs4) ? mkObj.clip.height : mkObj.offsetHeight
+ }
+
+ if (!isNaN(mp) || typeof mp == 'object') {
+ if (typeof mp == 'object') {
+ fx = parseFloat(mp[0]);
+ fy = parseFloat(mp[1]);
+ } else
+ fx = fy = parseFloat(mp);
+ off = [Math.round(fx*mW), Math.round(fy*mH)];
+ } else {
+ if (mp == 'UR') off = [mW, 0]
+ else if (mp == 'LL') off = [0, mH]
+ else if (mp == 'LR') off = [mW, mH]
+ }
+
+ if (typeof o3_dragimg != 'undefined' && o3_dragimg) return off;
+ else {
+ if (!isNaN(puc) || typeof puc == 'object' ) {
+ if (typeof puc == 'object') {
+ fx = parseFloat(puc[0]);
+ fy = parseFloat(puc[1]);
+ } else
+ fx = fy = parseFloat(puc);
+ off[0] -= Math.round(fx*(pW - sx));
+ off[1] -= Math.round(fy*(pH - sy));
+ } else {
+ if (puc == 'UR') {
+ off[0] -= (pW - sx);
+ off[1] -= sy
+ } else if (puc == 'LL') {
+ off[0] -= sx;
+ off[1] -= (pH - sy)
+ } else if (puc == 'LR') {
+ off[0] -= (pW-sx);
+ off[1] -= (pH - sy)
+ }
+ }
+ return off
+ }
+}
+
+// Adapted to overlib from jwin by Jason Anderson -- http://www.jwinlib.com
+function pageLocation(o, t){
+ var x = 0
+
+ while(o.offsetParent){
+ x += o['offset' + t]
+ o = o.offsetParent
+ }
+ x += o['offset' + t]
+
+ return x
+}
+
+// Adapted to overlib from jwin by Jason Anderson -- http://www.jwinlib.com
+function getRefById(l, d){
+ var r = "", j
+
+ d = (d || document)
+ if (d.all) return d.all[l]
+ else if (d.getElementById) return d.getElementById(l)
+ else if (d.layers && d.layers.length > 0) {
+ if (d.layers[l]) return d.layers[l]
+
+ for (j=0; j < d.layers.length; j++) {
+ r = getRefById(l, d.layers[j].document)
+ if(r) return r
+ }
+ }
+
+ return false
+}
+
+// Adapted to overlib from jwin by Jason Anderson -- http://www.jwinlib.com
+function getRefByName(l, d) {
+ var r = null, j
+
+ d = (d || document)
+
+ if (d.images[l]) return d.images[l]
+ else if (d.anchors[l]) return d.anchors[l];
+ else if (d.layers && d.layers.length > 0) {
+ for (j=0; j < d.layers.length; j++) {
+ r = getRefByName(l, d.layers[j].document)
+ if (r && r.length > 0) return r
+ else if (r) return [r, d.layers[j]]
+ }
+ }
+
+ return null
+}
+
+////////
+// PLUGIN REGISTRATIONS
+////////
+registerRunTimeFunction(setAnchorVariables);
+registerCmdLineFunction(parseAnchorExtras);
+registerPostParseFunction(checkAnchorObject);
+registerHook("createPopup", anchorPreface, FAFTER);
+registerHook("horizontalPlacement", anchorHorizontal, FCHAIN);
+registerHook("verticalPlacement", anchorVertical, FCHAIN);
+if(olInfo.meets(4.10)) registerNoParameterCommands('noanchorwarn');
+}
diff --git a/web/public_php/admin/overlib/overlib_anchor_mini.js b/web/public_php/admin/overlib/overlib_anchor_mini.js
index c12a034dfc..e1e952e418 100644
--- a/web/public_php/admin/overlib/overlib_anchor_mini.js
+++ b/web/public_php/admin/overlib/overlib_anchor_mini.js
@@ -1,98 +1,98 @@
-//\/////
-//\ overLIB Anchor Plugin
-//\ This file requires overLIB 4.10 or later.
-//\
-//\ overLIB 4.10 - You may not remove or change this notice.
-//\ Copyright Erik Bosrup 1998-2004. All rights reserved.
-//\ Contributors are listed on the homepage.
-//\ See http://www.bosrup.com/web/overlib/ for details.
-//\/////
-//\ THIS IS A VERY MODIFIED VERSION. DO NOT EDIT OR PUBLISH. GET THE ORIGINAL!
-if(typeof olInfo=='undefined'||typeof olInfo.meets=='undefined'||!olInfo.meets(4.10))alert('overLIB 4.10 or later is required for the Anchor Plugin.');else{registerCommands('anchor,anchorx,anchory,noanchorwarn,anchoralign');
-if(typeof ol_anchor=='undefined')var ol_anchor='';if(typeof ol_anchorx=='undefined')var ol_anchorx=0;if(typeof ol_anchory=='undefined')var ol_anchory=0;if(typeof ol_noanchorwarn=='undefined')var ol_noanchorwarn=1;if(typeof ol_anchoralign=='undefined')var ol_anchoralign='UL';
-var o3_anchor="",o3_anchorx=0,o3_anchory=0,o3_noanchorwarn=1,o3_anchoralign='UL',mrkObj,rmrkPosition;
-function setAnchorVariables(){o3_anchor=ol_anchor;o3_anchorx=ol_anchorx;o3_anchory=ol_anchory;o3_noanchorwarn=ol_noanchorwarn;o3_anchoralign=ol_anchoralign;mrkObj=null;}
-function parseAnchorExtras(pf,i,ar){var v,k=i;
-if(k1){mkObj=mlyr[0]
-offsets[0]+=mlyr[0].x+mlyr[1].pageX
-offsets[1]+=mlyr[0].y+mlyr[1].pageY
-}else{if(mlyr.toString().indexOf('Image')!=-1||mlyr.toString().indexOf('Anchor')!=-1){offsets[0]+=mlyr.x
-offsets[1]+=mlyr.y
-}else{offsets[0]+=mlyr.pageX
-offsets[1]+=mlyr.pageY}}
-}else{offsets[0]+=pageLocation(mlyr,'Left')
-offsets[1]+=pageLocation(mlyr,'Top')}
-of=getAnchorOffsets(mkObj)
-if(typeof o3_dragimg!='undefined'&& o3_dragimg){olImgLeft=offsets[0];olImgTop=offsets[1];}
-offsets[0]+=of[0]
-offsets[1]+=of[1]
-if(typeof o3_dragimg!='undefined'&& o3_dragimg){olImgRight=offsets[0];olImgBottom=offsets[1];return;}
-return offsets;}
-function getAnchorOffsets(mkObj){var fx=fy=0, mp,puc,mkAry,sx=sy=0,w=o3_anchoralign
-var mW=mH=pW=pH=0
-var off=[0,0]
-mkAry=w.split(',');
-if(mkAry.length<3){mp=mkAry[0].toUpperCase();puc=(mkAry.length==1)?mp:mkAry[1].toUpperCase();}else if(mkAry.length==3){if(!isNaN(mkAry[0])){mp=mkAry.slice(0,2);puc=mkAry[2].toUpperCase();}else{mp=mkAry[0].toUpperCase();puc=mkAry.slice(1);}
-}else{mp=mkAry.slice(0,2);puc=mkAry.slice(2);}
-var shdwPresent=typeof o3_shadow!='undefined'&& o3_shadow
-if(shdwPresent){sx=Math.abs(o3_shadowx);sy=Math.abs(o3_shadowy);}
-pW=(shdwPresent?parseInt(o3_width):(olNs4?over.clip.width:over.offsetWidth))
-pH=(shdwPresent?parseInt(o3_aboveheight):(olNs4?over.clip.height:over.offsetHeight))
-if(olOp&& o3_wrap){pW=(shdwPresent?parseInt(o3_width):(olNs4?over.clip.width:over.offsetWidth))
-pH=(shdwPresent?parseInt(o3_aboveheight):(olNs4?over.clip.height:over.offsetHeight))}
-if(!olOp&& mkObj.toString().indexOf('Image')!=-1){mW=mkObj.width
-mH=mkObj.height
-}else if(!olOp&& mkObj.toString().indexOf('Anchor')!=-1){mp='UL'
-}else{mW=(olNs4)?mkObj.clip.width:mkObj.offsetWidth
-mH=(olNs4)?mkObj.clip.height:mkObj.offsetHeight}
-if(!isNaN(mp)||typeof mp=='object'){if(typeof mp=='object'){fx=parseFloat(mp[0]);fy=parseFloat(mp[1]);}else
-fx=fy=parseFloat(mp);off=[Math.round(fx*mW),Math.round(fy*mH)];}else{if(mp=='UR')off=[mW,0]
-else if(mp=='LL')off=[0,mH]
-else if(mp=='LR')off=[mW,mH]}
-if(typeof o3_dragimg!='undefined'&& o3_dragimg)return off;else{if(!isNaN(puc)||typeof puc=='object' ){if(typeof puc=='object'){fx=parseFloat(puc[0]);fy=parseFloat(puc[1]);}else
-fx=fy=parseFloat(puc);off[0]-=Math.round(fx*(pW-sx));off[1]-=Math.round(fy*(pH-sy));}else{if(puc=='UR'){off[0]-=(pW-sx);off[1]-=sy
-}else if(puc=='LL'){off[0]-=sx;off[1]-=(pH-sy)
-}else if(puc=='LR'){off[0]-=(pW-sx);off[1]-=(pH-sy)}}
-return off}}
-function pageLocation(o,t){var x=0
-while(o.offsetParent){x+=o['offset'+t]
-o=o.offsetParent}
-x+=o['offset'+t]
-return x}
-function getRefById(l,d){var r="",j
-d=(d||document)
-if(d.all)return d.all[l]
-else if(d.getElementById)return d.getElementById(l)
-else if(d.layers&& d.layers.length>0){if(d.layers[l])return d.layers[l]
-for(j=0;j0){for(j=0;j0)return r
-else if(r)return [r,d.layers[j]]}}
-return null}
-registerRunTimeFunction(setAnchorVariables);registerCmdLineFunction(parseAnchorExtras);registerPostParseFunction(checkAnchorObject);registerHook("createPopup",anchorPreface,FAFTER);registerHook("horizontalPlacement",anchorHorizontal,FCHAIN);registerHook("verticalPlacement",anchorVertical,FCHAIN);if(olInfo.meets(4.10))registerNoParameterCommands('noanchorwarn');
-}
+//\/////
+//\ overLIB Anchor Plugin
+//\ This file requires overLIB 4.10 or later.
+//\
+//\ overLIB 4.10 - You may not remove or change this notice.
+//\ Copyright Erik Bosrup 1998-2004. All rights reserved.
+//\ Contributors are listed on the homepage.
+//\ See http://www.bosrup.com/web/overlib/ for details.
+//\/////
+//\ THIS IS A VERY MODIFIED VERSION. DO NOT EDIT OR PUBLISH. GET THE ORIGINAL!
+if(typeof olInfo=='undefined'||typeof olInfo.meets=='undefined'||!olInfo.meets(4.10))alert('overLIB 4.10 or later is required for the Anchor Plugin.');else{registerCommands('anchor,anchorx,anchory,noanchorwarn,anchoralign');
+if(typeof ol_anchor=='undefined')var ol_anchor='';if(typeof ol_anchorx=='undefined')var ol_anchorx=0;if(typeof ol_anchory=='undefined')var ol_anchory=0;if(typeof ol_noanchorwarn=='undefined')var ol_noanchorwarn=1;if(typeof ol_anchoralign=='undefined')var ol_anchoralign='UL';
+var o3_anchor="",o3_anchorx=0,o3_anchory=0,o3_noanchorwarn=1,o3_anchoralign='UL',mrkObj,rmrkPosition;
+function setAnchorVariables(){o3_anchor=ol_anchor;o3_anchorx=ol_anchorx;o3_anchory=ol_anchory;o3_noanchorwarn=ol_noanchorwarn;o3_anchoralign=ol_anchoralign;mrkObj=null;}
+function parseAnchorExtras(pf,i,ar){var v,k=i;
+if(k1){mkObj=mlyr[0]
+offsets[0]+=mlyr[0].x+mlyr[1].pageX
+offsets[1]+=mlyr[0].y+mlyr[1].pageY
+}else{if(mlyr.toString().indexOf('Image')!=-1||mlyr.toString().indexOf('Anchor')!=-1){offsets[0]+=mlyr.x
+offsets[1]+=mlyr.y
+}else{offsets[0]+=mlyr.pageX
+offsets[1]+=mlyr.pageY}}
+}else{offsets[0]+=pageLocation(mlyr,'Left')
+offsets[1]+=pageLocation(mlyr,'Top')}
+of=getAnchorOffsets(mkObj)
+if(typeof o3_dragimg!='undefined'&& o3_dragimg){olImgLeft=offsets[0];olImgTop=offsets[1];}
+offsets[0]+=of[0]
+offsets[1]+=of[1]
+if(typeof o3_dragimg!='undefined'&& o3_dragimg){olImgRight=offsets[0];olImgBottom=offsets[1];return;}
+return offsets;}
+function getAnchorOffsets(mkObj){var fx=fy=0, mp,puc,mkAry,sx=sy=0,w=o3_anchoralign
+var mW=mH=pW=pH=0
+var off=[0,0]
+mkAry=w.split(',');
+if(mkAry.length<3){mp=mkAry[0].toUpperCase();puc=(mkAry.length==1)?mp:mkAry[1].toUpperCase();}else if(mkAry.length==3){if(!isNaN(mkAry[0])){mp=mkAry.slice(0,2);puc=mkAry[2].toUpperCase();}else{mp=mkAry[0].toUpperCase();puc=mkAry.slice(1);}
+}else{mp=mkAry.slice(0,2);puc=mkAry.slice(2);}
+var shdwPresent=typeof o3_shadow!='undefined'&& o3_shadow
+if(shdwPresent){sx=Math.abs(o3_shadowx);sy=Math.abs(o3_shadowy);}
+pW=(shdwPresent?parseInt(o3_width):(olNs4?over.clip.width:over.offsetWidth))
+pH=(shdwPresent?parseInt(o3_aboveheight):(olNs4?over.clip.height:over.offsetHeight))
+if(olOp&& o3_wrap){pW=(shdwPresent?parseInt(o3_width):(olNs4?over.clip.width:over.offsetWidth))
+pH=(shdwPresent?parseInt(o3_aboveheight):(olNs4?over.clip.height:over.offsetHeight))}
+if(!olOp&& mkObj.toString().indexOf('Image')!=-1){mW=mkObj.width
+mH=mkObj.height
+}else if(!olOp&& mkObj.toString().indexOf('Anchor')!=-1){mp='UL'
+}else{mW=(olNs4)?mkObj.clip.width:mkObj.offsetWidth
+mH=(olNs4)?mkObj.clip.height:mkObj.offsetHeight}
+if(!isNaN(mp)||typeof mp=='object'){if(typeof mp=='object'){fx=parseFloat(mp[0]);fy=parseFloat(mp[1]);}else
+fx=fy=parseFloat(mp);off=[Math.round(fx*mW),Math.round(fy*mH)];}else{if(mp=='UR')off=[mW,0]
+else if(mp=='LL')off=[0,mH]
+else if(mp=='LR')off=[mW,mH]}
+if(typeof o3_dragimg!='undefined'&& o3_dragimg)return off;else{if(!isNaN(puc)||typeof puc=='object' ){if(typeof puc=='object'){fx=parseFloat(puc[0]);fy=parseFloat(puc[1]);}else
+fx=fy=parseFloat(puc);off[0]-=Math.round(fx*(pW-sx));off[1]-=Math.round(fy*(pH-sy));}else{if(puc=='UR'){off[0]-=(pW-sx);off[1]-=sy
+}else if(puc=='LL'){off[0]-=sx;off[1]-=(pH-sy)
+}else if(puc=='LR'){off[0]-=(pW-sx);off[1]-=(pH-sy)}}
+return off}}
+function pageLocation(o,t){var x=0
+while(o.offsetParent){x+=o['offset'+t]
+o=o.offsetParent}
+x+=o['offset'+t]
+return x}
+function getRefById(l,d){var r="",j
+d=(d||document)
+if(d.all)return d.all[l]
+else if(d.getElementById)return d.getElementById(l)
+else if(d.layers&& d.layers.length>0){if(d.layers[l])return d.layers[l]
+for(j=0;j0){for(j=0;j0)return r
+else if(r)return [r,d.layers[j]]}}
+return null}
+registerRunTimeFunction(setAnchorVariables);registerCmdLineFunction(parseAnchorExtras);registerPostParseFunction(checkAnchorObject);registerHook("createPopup",anchorPreface,FAFTER);registerHook("horizontalPlacement",anchorHorizontal,FCHAIN);registerHook("verticalPlacement",anchorVertical,FCHAIN);if(olInfo.meets(4.10))registerNoParameterCommands('noanchorwarn');
+}
diff --git a/web/public_php/admin/overlib/overlib_draggable.js b/web/public_php/admin/overlib/overlib_draggable.js
index d6797982c1..ab06c992b2 100644
--- a/web/public_php/admin/overlib/overlib_draggable.js
+++ b/web/public_php/admin/overlib/overlib_draggable.js
@@ -1,174 +1,174 @@
-//\/////
-//\ overLIB Draggable Plugin
-//\
-//\ You may not remove or change this notice.
-//\ Copyright Erik Bosrup 1998-2003. All rights reserved.
-//\ Contributors are listed on the homepage.
-//\ See http://www.bosrup.com/web/overlib/ for details.
-//\/////
-////////
-// PRE-INIT
-// Ignore these lines, configuration is below.
-////////
-if (typeof olInfo == 'undefined' || typeof olInfo.meets == 'undefined' || !olInfo.meets(4.14)) alert('overLIB 4.14 or later is required for the Draggable Plugin.');
-else {
-registerCommands('draggable,altcut,dragimg');
-////////
-// DEFAULT CONFIGURATION
-// Settings you want everywhere are set here. All of this can also be
-// changed on your html page or through an overLIB call.
-////////
-if (typeof ol_draggable=='undefined') var ol_draggable=0;
-if (typeof ol_altcut=='undefined') var ol_altcut=0;
-if (typeof ol_dragimg=='undefined') var ol_dragimg='';
-////////
-// END OF CONFIGURATION
-// Don't change anything below this line, all configuration is above.
-////////
-////////
-// INIT
-////////
-// Runtime variables init. Don't change for config!
-var o3_draggable=0;
-var o3_altcut=0;
-var o3_dragimg='';
-var olImgLeft,olImgTop;
-var olImgObj;
-var olMseMv; // hold old mouseMove routine
-////////
-// PLUGIN FUNCTIONS
-////////
-function setDragVariables() {
- o3_draggable=ol_draggable;
- o3_altcut=ol_altcut;
- o3_dragimg=ol_dragimg;
- olImgObj=null;
-}
-// Parses Draggable commands
-function parseDragExtras(pf,i,ar) {
- var k=i;
- if (k < ar.length) {
- if (ar[k]==DRAGGABLE) { eval(pf+'draggable=('+pf+'draggable==0) ? 1 : 0'); return k; }
- if (ar[k]==ALTCUT) { eval(pf+'altcut=('+pf+'altcut==0) ? 1 : 0'); return k; }
- if (ar[k]==DRAGIMG) { eval(pf+'dragimg="'+ar[++k]+'"'); return k; }
- }
- return -1;
-}
-//////
-// PRESHOW PROCESSING FOR DRAGGABLE POPUPS
-//////
-function startDrag() {
- // Initiate dragging if in same frame and its a sticky
- if (o3_draggable) {
- if (o3_sticky&&(o3_frame==ol_frame)) initDrag();
- else o3_draggable=0;
- }
-}
-//////
-// POSTHIDE PROCESSING FOR DRAGGABLE POPUPS
-//////
-function stopDrag() {
- if (o3_draggable) endDrag();
-}
-//////
-// DRAGGABLE FUNCTIONS
-//////
-function initDrag() {
- olMseMv=capExtent.onmousemove;
- if(olNs4) {
- document.captureEvents(Event.MOUSEDOWN | Event.CLICK);
- document.onmousedown=grabEl;
- document.onclick=function(e) {return routeEvent(e);}
- } else {
- over.onmousedown=grabEl;
- }
- if (o3_dragimg) chkForImgSupport(o3_dragimg);
- return true;
-}
-// Checks for image for dragging
-function chkForImgSupport(dragImg) {
- if (dragImg) {
- if (typeof getAnchorObjRef!='undefined') olImgObj=getAnchorObjRef(dragImg);
- if (olImgObj==null) o3_dragimg='';
- }
-}
-// Sets cursor symbol
-function setCursor(on) {
- if (olNs4) return;
- over.style.cursor=(on ? 'move' : 'auto');
-}
-// Checks cursor position relative to image
-function chkCursorPosition(Obj,XPos,YPos) {
- if (Obj) {
- o3_anchorx=o3_anchory=0;
- o3_anchoralign='UL';
- getAnchorLocation(Obj);
- if (XPos < olImgLeft||XPos > (olImgLeft+Obj.width)||YPos < olImgTop||YPos > (olImgTop+Obj.height)) return false;
- }
- return true;
-}
-// Sets up mouse grab for moving
-function grabEl(e) {
- var e=(e) ? e : event;
- var X,Y;
- var cKy=(olNs4 ? e.modifiers & Event.ALT_MASK : (!olOp ? e.altKey : e.ctrlKey));
- if ((o3_altcut ? !cKy : cKy)) {
- // get mouse's current x,y location
- X=(e.pageX || eval('e.clientX+o3_frame.'+docRoot+'.scrollLeft'));
- Y=(e.pageY || eval('e.clientY+o3_frame.'+docRoot+'.scrollTop'));
- if (chkCursorPosition(olImgObj,X,Y)) {
- if (olNs4) document.captureEvents(Event.MOUSEUP);
- capExtent.onmousemove=moveEl;
- document.onmouseup=function() {setCursor(0); if (olIe4) over.onselectstart=null; capExtent.onmousemove=olMseMv;}
- setCursor(1);
- if (olIe4) over.onselectstart=function() {return false;}
- if (olNs4) {
- cX=X
- cY=Y
- } else {
- // get offsets from upper left hand corner of popup to keep popup from jummping
- // when first starting to drag
- cX=X-(olNs4 ? over.left : parseInt(over.style.left));
- cY=Y-(olNs4 ? over.top : parseInt(over.style.top));
- }
- return (olNs4 ? routeEvent(e) : false);
- }
- } else setCursor(0);
-}
-// Moves popup to follow mouse
-function moveEl(e) {
- var e=(e) ? e : event;
- var dX,dY,X,Y;
- // get new mouse location
- X=(e.pageX || eval('e.clientX+o3_frame.'+docRoot+'.scrollLeft'));
- Y=(e.pageY || eval('e.clientY+o3_frame.'+docRoot+'.scrollTop'));
- if (chkCursorPosition(olImgObj,X,Y)){
- if (olNs4) {
- dX=X-cX; cX=X;
- dY=Y-cY; cY=Y;
- over.moveBy(dX,dY);
- } else
- repositionTo(over,X-cX,Y-cY); // move popup to that position
- }
-}
-// Cleanup for Drag end
-function endDrag(obj) {
- if (olNs4) {
- document.releaseEvents(Event.MOUSEDOWN | Event.MOUSEUP | Event.CLICK);
- document.onmousedown=document.onclick=null;
- } else {
- if(!obj) obj=over;
- obj.onmousedown=null;
- }
- document.onmouseup= null;
-}
-////////
-// PLUGIN REGISTRATIONS
-////////
-registerRunTimeFunction(setDragVariables);
-registerCmdLineFunction(parseDragExtras);
-registerHook("disp",startDrag,FBEFORE);
-registerHook("hideObject",stopDrag,FAFTER);
-if (olInfo.meets(4.14)) registerNoParameterCommands('draggable,altcut');
-}
-//end
+//\/////
+//\ overLIB Draggable Plugin
+//\
+//\ You may not remove or change this notice.
+//\ Copyright Erik Bosrup 1998-2003. All rights reserved.
+//\ Contributors are listed on the homepage.
+//\ See http://www.bosrup.com/web/overlib/ for details.
+//\/////
+////////
+// PRE-INIT
+// Ignore these lines, configuration is below.
+////////
+if (typeof olInfo == 'undefined' || typeof olInfo.meets == 'undefined' || !olInfo.meets(4.14)) alert('overLIB 4.14 or later is required for the Draggable Plugin.');
+else {
+registerCommands('draggable,altcut,dragimg');
+////////
+// DEFAULT CONFIGURATION
+// Settings you want everywhere are set here. All of this can also be
+// changed on your html page or through an overLIB call.
+////////
+if (typeof ol_draggable=='undefined') var ol_draggable=0;
+if (typeof ol_altcut=='undefined') var ol_altcut=0;
+if (typeof ol_dragimg=='undefined') var ol_dragimg='';
+////////
+// END OF CONFIGURATION
+// Don't change anything below this line, all configuration is above.
+////////
+////////
+// INIT
+////////
+// Runtime variables init. Don't change for config!
+var o3_draggable=0;
+var o3_altcut=0;
+var o3_dragimg='';
+var olImgLeft,olImgTop;
+var olImgObj;
+var olMseMv; // hold old mouseMove routine
+////////
+// PLUGIN FUNCTIONS
+////////
+function setDragVariables() {
+ o3_draggable=ol_draggable;
+ o3_altcut=ol_altcut;
+ o3_dragimg=ol_dragimg;
+ olImgObj=null;
+}
+// Parses Draggable commands
+function parseDragExtras(pf,i,ar) {
+ var k=i;
+ if (k < ar.length) {
+ if (ar[k]==DRAGGABLE) { eval(pf+'draggable=('+pf+'draggable==0) ? 1 : 0'); return k; }
+ if (ar[k]==ALTCUT) { eval(pf+'altcut=('+pf+'altcut==0) ? 1 : 0'); return k; }
+ if (ar[k]==DRAGIMG) { eval(pf+'dragimg="'+ar[++k]+'"'); return k; }
+ }
+ return -1;
+}
+//////
+// PRESHOW PROCESSING FOR DRAGGABLE POPUPS
+//////
+function startDrag() {
+ // Initiate dragging if in same frame and its a sticky
+ if (o3_draggable) {
+ if (o3_sticky&&(o3_frame==ol_frame)) initDrag();
+ else o3_draggable=0;
+ }
+}
+//////
+// POSTHIDE PROCESSING FOR DRAGGABLE POPUPS
+//////
+function stopDrag() {
+ if (o3_draggable) endDrag();
+}
+//////
+// DRAGGABLE FUNCTIONS
+//////
+function initDrag() {
+ olMseMv=capExtent.onmousemove;
+ if(olNs4) {
+ document.captureEvents(Event.MOUSEDOWN | Event.CLICK);
+ document.onmousedown=grabEl;
+ document.onclick=function(e) {return routeEvent(e);}
+ } else {
+ over.onmousedown=grabEl;
+ }
+ if (o3_dragimg) chkForImgSupport(o3_dragimg);
+ return true;
+}
+// Checks for image for dragging
+function chkForImgSupport(dragImg) {
+ if (dragImg) {
+ if (typeof getAnchorObjRef!='undefined') olImgObj=getAnchorObjRef(dragImg);
+ if (olImgObj==null) o3_dragimg='';
+ }
+}
+// Sets cursor symbol
+function setCursor(on) {
+ if (olNs4) return;
+ over.style.cursor=(on ? 'move' : 'auto');
+}
+// Checks cursor position relative to image
+function chkCursorPosition(Obj,XPos,YPos) {
+ if (Obj) {
+ o3_anchorx=o3_anchory=0;
+ o3_anchoralign='UL';
+ getAnchorLocation(Obj);
+ if (XPos < olImgLeft||XPos > (olImgLeft+Obj.width)||YPos < olImgTop||YPos > (olImgTop+Obj.height)) return false;
+ }
+ return true;
+}
+// Sets up mouse grab for moving
+function grabEl(e) {
+ var e=(e) ? e : event;
+ var X,Y;
+ var cKy=(olNs4 ? e.modifiers & Event.ALT_MASK : (!olOp ? e.altKey : e.ctrlKey));
+ if ((o3_altcut ? !cKy : cKy)) {
+ // get mouse's current x,y location
+ X=(e.pageX || eval('e.clientX+o3_frame.'+docRoot+'.scrollLeft'));
+ Y=(e.pageY || eval('e.clientY+o3_frame.'+docRoot+'.scrollTop'));
+ if (chkCursorPosition(olImgObj,X,Y)) {
+ if (olNs4) document.captureEvents(Event.MOUSEUP);
+ capExtent.onmousemove=moveEl;
+ document.onmouseup=function() {setCursor(0); if (olIe4) over.onselectstart=null; capExtent.onmousemove=olMseMv;}
+ setCursor(1);
+ if (olIe4) over.onselectstart=function() {return false;}
+ if (olNs4) {
+ cX=X
+ cY=Y
+ } else {
+ // get offsets from upper left hand corner of popup to keep popup from jummping
+ // when first starting to drag
+ cX=X-(olNs4 ? over.left : parseInt(over.style.left));
+ cY=Y-(olNs4 ? over.top : parseInt(over.style.top));
+ }
+ return (olNs4 ? routeEvent(e) : false);
+ }
+ } else setCursor(0);
+}
+// Moves popup to follow mouse
+function moveEl(e) {
+ var e=(e) ? e : event;
+ var dX,dY,X,Y;
+ // get new mouse location
+ X=(e.pageX || eval('e.clientX+o3_frame.'+docRoot+'.scrollLeft'));
+ Y=(e.pageY || eval('e.clientY+o3_frame.'+docRoot+'.scrollTop'));
+ if (chkCursorPosition(olImgObj,X,Y)){
+ if (olNs4) {
+ dX=X-cX; cX=X;
+ dY=Y-cY; cY=Y;
+ over.moveBy(dX,dY);
+ } else
+ repositionTo(over,X-cX,Y-cY); // move popup to that position
+ }
+}
+// Cleanup for Drag end
+function endDrag(obj) {
+ if (olNs4) {
+ document.releaseEvents(Event.MOUSEDOWN | Event.MOUSEUP | Event.CLICK);
+ document.onmousedown=document.onclick=null;
+ } else {
+ if(!obj) obj=over;
+ obj.onmousedown=null;
+ }
+ document.onmouseup= null;
+}
+////////
+// PLUGIN REGISTRATIONS
+////////
+registerRunTimeFunction(setDragVariables);
+registerCmdLineFunction(parseDragExtras);
+registerHook("disp",startDrag,FBEFORE);
+registerHook("hideObject",stopDrag,FAFTER);
+if (olInfo.meets(4.14)) registerNoParameterCommands('draggable,altcut');
+}
+//end
diff --git a/web/public_php/admin/overlib/overlib_draggable_mini.js b/web/public_php/admin/overlib/overlib_draggable_mini.js
index d956eda1c7..59f8aafeb1 100644
--- a/web/public_php/admin/overlib/overlib_draggable_mini.js
+++ b/web/public_php/admin/overlib/overlib_draggable_mini.js
@@ -1,11 +1,11 @@
-//\/////
-//\ overLIB Draggable Plugin
-//\
-//\ You may not remove or change this notice.
-//\ Copyright Erik Bosrup 1998-2003. All rights reserved.
-//\ Contributors are listed on the homepage.
-//\ See http://www.bosrup.com/web/overlib/ for details.
-//\/////
+//\/////
+//\ overLIB Draggable Plugin
+//\
+//\ You may not remove or change this notice.
+//\ Copyright Erik Bosrup 1998-2003. All rights reserved.
+//\ Contributors are listed on the homepage.
+//\ See http://www.bosrup.com/web/overlib/ for details.
+//\/////
if(typeof olInfo=='undefined'||typeof olInfo.meets=='undefined'||!olInfo.meets(4.14))alert('overLIB 4.14 or later is required for the Draggable Plugin.');else{registerCommands('draggable,altcut,dragimg');
if(typeof ol_draggable=='undefined')var ol_draggable=0;if(typeof ol_altcut=='undefined')var ol_altcut=0;if(typeof ol_dragimg=='undefined')var ol_dragimg='';
var o3_draggable=0,o3_altcut=0,o3_dragimg='',olImgLeft,olImgTop,olImgObj,olMseMv;
diff --git a/web/public_php/admin/overlib/overlib_mini.js b/web/public_php/admin/overlib/overlib_mini.js
index a2df535b22..6262e3ee5b 100644
--- a/web/public_php/admin/overlib/overlib_mini.js
+++ b/web/public_php/admin/overlib/overlib_mini.js
@@ -1,20 +1,20 @@
-//\/////
-//\ overLIB 4.21 - You may not remove or change this notice.
-//\ Copyright Erik Bosrup 1998-2004. All rights reserved.
-//\
-//\ Contributors are listed on the homepage.
-//\ This file might be old, always check for the latest version at:
-//\ http://www.bosrup.com/web/overlib/
-//\
-//\ Please read the license agreement (available through the link above)
-//\ before using overLIB. Direct any licensing questions to erik@bosrup.com.
-//\
-//\ Do not sell this as your own work or remove this copyright notice.
-//\ For full details on copying or changing this script please read the
-//\ license agreement at the link above. Please give credit on sites that
-//\ use overLIB and submit changes of the script so other people can use
-//\ them as well.
-//\/////
+//\/////
+//\ overLIB 4.21 - You may not remove or change this notice.
+//\ Copyright Erik Bosrup 1998-2004. All rights reserved.
+//\
+//\ Contributors are listed on the homepage.
+//\ This file might be old, always check for the latest version at:
+//\ http://www.bosrup.com/web/overlib/
+//\
+//\ Please read the license agreement (available through the link above)
+//\ before using overLIB. Direct any licensing questions to erik@bosrup.com.
+//\
+//\ Do not sell this as your own work or remove this copyright notice.
+//\ For full details on copying or changing this script please read the
+//\ license agreement at the link above. Please give credit on sites that
+//\ use overLIB and submit changes of the script so other people can use
+//\ them as well.
+//\/////
//\ THIS IS A VERY MODIFIED VERSION. DO NOT EDIT OR PUBLISH. GET THE ORIGINAL!
var olLoaded=0,pmStart=10000000,pmUpper=10001000,pmCount=pmStart+1,pmt='',pms=new Array(),olInfo=new Info('4.21',1),FREPLACE=0,FBEFORE=1,FAFTER=2,FALTERNATE=3,FCHAIN=4,olHideForm=0,olHautoFlag=0,olVautoFlag=0,hookPts=new Array(),postParse=new Array(),cmdLine=new Array(),runTime=new Array();
registerCommands('donothing,inarray,caparray,sticky,background,noclose,caption,left,right,center,offsetx,offsety,fgcolor,bgcolor,textcolor,capcolor,closecolor,width,border,cellpad,status,autostatus,autostatuscap,height,closetext,snapx,snapy,fixx,fixy,relx,rely,fgbackground,bgbackground,padx,pady,fullhtml,above,below,capicon,textfont,captionfont,closefont,textsize,captionsize,closesize,timeout,function,delay,hauto,vauto,closeclick,wrap,followmouse,mouseoff,closetitle,cssoff,compatmode,cssclass,fgclass,bgclass,textfontclass,captionfontclass,closefontclass');
diff --git a/web/public_php/ams/css/custom.css b/web/public_php/ams/css/custom.css
index 7a36a67992..ec7b90139d 100644
--- a/web/public_php/ams/css/custom.css
+++ b/web/public_php/ams/css/custom.css
@@ -1,139 +1,139 @@
-.box-content {
- background: white;
-}
-
-.box-header {
- background-color: white;
-}
-
-.top-block {
- background-color: white;
- border-radius: 5px;
-}
-
-.row-fluid [class*="span"] {
- min-height: 28px;
-}
-
-.login-header
-{
- height:190px;
-}
-
-.brand img
-{
- height:100%;
- margin-bottom:-18px;
- margin-top:-15px;
- width:auto;
-}
-
-#for-is-ajax
-{
- display:none;
-}
-
-.navbar {
- border-bottom: 0px;
-}
-
-.flags {
- display: block;
- position:relative;
- left:290px;
- top:28px;
-}
-
-.flags_no_visible_elements{
- display: block;
- position:relative;
- left:67%;
- top:210px;
-}
-
-.input-prepend .add-on,
-.input-append .add-on {
- height: auto;
-}
-
-select,
-textarea,
-input[type="text"],
-input[type="password"],
-input[type="datetime"],
-input[type="datetime-local"],
-input[type="date"],
-input[type="month"],
-input[type="time"],
-input[type="week"],
-input[type="number"],
-input[type="email"],
-input[type="url"],
-input[type="search"],
-input[type="tel"],
-input[type="color"],
-.uneditable-input {
- height: auto;
-}
-
-.btn .caret {
- margin: 10px;
-}
-
-.btn .caret {
- border-top-color: #333;
-}
-
-.table-bordered {
- border-collapse: collapse;
-}
-
-.table {
-margin-top: 10px;
-}
-
-.nav {
- margin-bottom: 22px;
-}
-
-.radio, .checkbox {
- display: table-row-group;
-}
-
-.gender-list {
- margin-left: 22px;
-}
-
-.lg-icon {
- font-size: 20px;
- margin: 5px;
-}
-
-.sidebar-nav {
- padding-top: 5px;
-}
-
-.sidebar-nav .nav-header{
- color:#666;
-}
-
-.flags_logged_in{
- display: inline;
- position:absolute;
- margin:7px;
-}
-
-.setup-width {
- width:75%;
-}
-
-.js-masonry {
- padding-left: -1;
- padding-right: -1;
- margin-left: -1;
- margin-right: -1;
-}
-
-.col-sm-4 {
- width: 33.333%;
+.box-content {
+ background: white;
+}
+
+.box-header {
+ background-color: white;
+}
+
+.top-block {
+ background-color: white;
+ border-radius: 5px;
+}
+
+.row-fluid [class*="span"] {
+ min-height: 28px;
+}
+
+.login-header
+{
+ height:190px;
+}
+
+.brand img
+{
+ height:100%;
+ margin-bottom:-18px;
+ margin-top:-15px;
+ width:auto;
+}
+
+#for-is-ajax
+{
+ display:none;
+}
+
+.navbar {
+ border-bottom: 0px;
+}
+
+.flags {
+ display: block;
+ position:relative;
+ left:290px;
+ top:28px;
+}
+
+.flags_no_visible_elements{
+ display: block;
+ position:relative;
+ left:67%;
+ top:210px;
+}
+
+.input-prepend .add-on,
+.input-append .add-on {
+ height: auto;
+}
+
+select,
+textarea,
+input[type="text"],
+input[type="password"],
+input[type="datetime"],
+input[type="datetime-local"],
+input[type="date"],
+input[type="month"],
+input[type="time"],
+input[type="week"],
+input[type="number"],
+input[type="email"],
+input[type="url"],
+input[type="search"],
+input[type="tel"],
+input[type="color"],
+.uneditable-input {
+ height: auto;
+}
+
+.btn .caret {
+ margin: 10px;
+}
+
+.btn .caret {
+ border-top-color: #333;
+}
+
+.table-bordered {
+ border-collapse: collapse;
+}
+
+.table {
+margin-top: 10px;
+}
+
+.nav {
+ margin-bottom: 22px;
+}
+
+.radio, .checkbox {
+ display: table-row-group;
+}
+
+.gender-list {
+ margin-left: 22px;
+}
+
+.lg-icon {
+ font-size: 20px;
+ margin: 5px;
+}
+
+.sidebar-nav {
+ padding-top: 5px;
+}
+
+.sidebar-nav .nav-header{
+ color:#666;
+}
+
+.flags_logged_in{
+ display: inline;
+ position:absolute;
+ margin:7px;
+}
+
+.setup-width {
+ width:75%;
+}
+
+.js-masonry {
+ padding-left: -1;
+ padding-right: -1;
+ margin-left: -1;
+ margin-right: -1;
+}
+
+.col-sm-4 {
+ width: 33.333%;
}
\ No newline at end of file
diff --git a/web/public_php/ams/css/uploadify.css b/web/public_php/ams/css/uploadify.css
index 1df3e3e9dd..1185a4d1ac 100644
--- a/web/public_php/ams/css/uploadify.css
+++ b/web/public_php/ams/css/uploadify.css
@@ -1,92 +1,92 @@
-/*
-Uploadify
-Copyright (c) 2012 Reactive Apps, Ronnie Garcia
-Released under the MIT License
-*/
-
-.uploadify {
- position: relative;
- margin-bottom: 1em;
-}
-.uploadify-button {
- background-color: #505050;
- background-image: linear-gradient(bottom, #505050 0%, #707070 100%);
- background-image: -o-linear-gradient(bottom, #505050 0%, #707070 100%);
- background-image: -moz-linear-gradient(bottom, #505050 0%, #707070 100%);
- background-image: -webkit-linear-gradient(bottom, #505050 0%, #707070 100%);
- background-image: -ms-linear-gradient(bottom, #505050 0%, #707070 100%);
- background-image: -webkit-gradient(
- linear,
- left bottom,
- left top,
- color-stop(0, #505050),
- color-stop(1, #707070)
- );
- background-position: center top;
- background-repeat: no-repeat;
- -webkit-border-radius: 30px;
- -moz-border-radius: 30px;
- border-radius: 30px;
- border: 2px solid #808080;
- color: #FFF;
- font: bold 12px Arial, Helvetica, sans-serif;
- text-align: center;
- text-shadow: 0 -1px 0 rgba(0,0,0,0.25);
- width: 100%;
-}
-.uploadify:hover .uploadify-button {
- background-color: #606060;
- background-image: linear-gradient(top, #606060 0%, #808080 100%);
- background-image: -o-linear-gradient(top, #606060 0%, #808080 100%);
- background-image: -moz-linear-gradient(top, #606060 0%, #808080 100%);
- background-image: -webkit-linear-gradient(top, #606060 0%, #808080 100%);
- background-image: -ms-linear-gradient(top, #606060 0%, #808080 100%);
- background-image: -webkit-gradient(
- linear,
- left bottom,
- left top,
- color-stop(0, #606060),
- color-stop(1, #808080)
- );
- background-position: center bottom;
-}
-.uploadify-button.disabled {
- background-color: #D0D0D0;
- color: #808080;
-}
-.uploadify-queue {
- margin-bottom: 1em;
-}
-.uploadify-queue-item {
- background-color: #F5F5F5;
- -webkit-border-radius: 3px;
- -moz-border-radius: 3px;
- border-radius: 3px;
- font: 11px Verdana, Geneva, sans-serif;
- margin-top: 5px;
- max-width: 350px;
- padding: 10px;
-}
-.uploadify-error {
- background-color: #FDE5DD !important;
-}
-.uploadify-queue-item .cancel a {
- background: url('../img/uploadify-cancel.png') 0 0 no-repeat;
- float: right;
- height: 16px;
- text-indent: -9999px;
- width: 16px;
-}
-.uploadify-queue-item.completed {
- background-color: #E5E5E5;
-}
-.uploadify-progress {
- background-color: #E5E5E5;
- margin-top: 10px;
- width: 100%;
-}
-.uploadify-progress-bar {
- background-color: #0099FF;
- height: 3px;
- width: 1px;
-}
\ No newline at end of file
+/*
+Uploadify
+Copyright (c) 2012 Reactive Apps, Ronnie Garcia
+Released under the MIT License
+*/
+
+.uploadify {
+ position: relative;
+ margin-bottom: 1em;
+}
+.uploadify-button {
+ background-color: #505050;
+ background-image: linear-gradient(bottom, #505050 0%, #707070 100%);
+ background-image: -o-linear-gradient(bottom, #505050 0%, #707070 100%);
+ background-image: -moz-linear-gradient(bottom, #505050 0%, #707070 100%);
+ background-image: -webkit-linear-gradient(bottom, #505050 0%, #707070 100%);
+ background-image: -ms-linear-gradient(bottom, #505050 0%, #707070 100%);
+ background-image: -webkit-gradient(
+ linear,
+ left bottom,
+ left top,
+ color-stop(0, #505050),
+ color-stop(1, #707070)
+ );
+ background-position: center top;
+ background-repeat: no-repeat;
+ -webkit-border-radius: 30px;
+ -moz-border-radius: 30px;
+ border-radius: 30px;
+ border: 2px solid #808080;
+ color: #FFF;
+ font: bold 12px Arial, Helvetica, sans-serif;
+ text-align: center;
+ text-shadow: 0 -1px 0 rgba(0,0,0,0.25);
+ width: 100%;
+}
+.uploadify:hover .uploadify-button {
+ background-color: #606060;
+ background-image: linear-gradient(top, #606060 0%, #808080 100%);
+ background-image: -o-linear-gradient(top, #606060 0%, #808080 100%);
+ background-image: -moz-linear-gradient(top, #606060 0%, #808080 100%);
+ background-image: -webkit-linear-gradient(top, #606060 0%, #808080 100%);
+ background-image: -ms-linear-gradient(top, #606060 0%, #808080 100%);
+ background-image: -webkit-gradient(
+ linear,
+ left bottom,
+ left top,
+ color-stop(0, #606060),
+ color-stop(1, #808080)
+ );
+ background-position: center bottom;
+}
+.uploadify-button.disabled {
+ background-color: #D0D0D0;
+ color: #808080;
+}
+.uploadify-queue {
+ margin-bottom: 1em;
+}
+.uploadify-queue-item {
+ background-color: #F5F5F5;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+ font: 11px Verdana, Geneva, sans-serif;
+ margin-top: 5px;
+ max-width: 350px;
+ padding: 10px;
+}
+.uploadify-error {
+ background-color: #FDE5DD !important;
+}
+.uploadify-queue-item .cancel a {
+ background: url('../img/uploadify-cancel.png') 0 0 no-repeat;
+ float: right;
+ height: 16px;
+ text-indent: -9999px;
+ width: 16px;
+}
+.uploadify-queue-item.completed {
+ background-color: #E5E5E5;
+}
+.uploadify-progress {
+ background-color: #E5E5E5;
+ margin-top: 10px;
+ width: 100%;
+}
+.uploadify-progress-bar {
+ background-color: #0099FF;
+ height: 3px;
+ width: 1px;
+}
diff --git a/web/public_php/ams/js/jquery.uploadify-3.1.js b/web/public_php/ams/js/jquery.uploadify-3.1.js
index 9590681506..a4c6409e3d 100644
--- a/web/public_php/ams/js/jquery.uploadify-3.1.js
+++ b/web/public_php/ams/js/jquery.uploadify-3.1.js
@@ -1,1971 +1,1971 @@
-/*
-Uploadify v3.1.1
-Copyright (c) 2012 Reactive Apps, Ronnie Garcia
-Released under the MIT License
-
-SWFUpload: http://www.swfupload.org, http://swfupload.googlecode.com
-mmSWFUpload 1.0: Flash upload dialog - http://profandesign.se/swfupload/, http://www.vinterwebb.se/
-SWFUpload is (c) 2006-2007 Lars Huring, Olov Nilzén and Mammon Media and is released under the MIT License:
-http://www.opensource.org/licenses/mit-license.php
-SWFUpload 2 is (c) 2007-2008 Jake Roberts and is released under the MIT License:
-http://www.opensource.org/licenses/mit-license.php
-
-SWFObject v2.2
-is released under the MIT License
-*/
-;
-var swfobject = function () {
- var aq = "undefined",
- aD = "object",
- ab = "Shockwave Flash",
- X = "ShockwaveFlash.ShockwaveFlash",
- aE = "application/x-shockwave-flash",
- ac = "SWFObjectExprInst",
- ax = "onreadystatechange",
- af = window,
- aL = document,
- aB = navigator,
- aa = false,
- Z = [aN],
- aG = [],
- ag = [],
- al = [],
- aJ, ad, ap, at, ak = false,
- aU = false,
- aH, an, aI = true,
- ah = function () {
- var a = typeof aL.getElementById != aq && typeof aL.getElementsByTagName != aq && typeof aL.createElement != aq,
- e = aB.userAgent.toLowerCase(),
- c = aB.platform.toLowerCase(),
- h = c ? /win/.test(c) : /win/.test(e),
- j = c ? /mac/.test(c) : /mac/.test(e),
- g = /webkit/.test(e) ? parseFloat(e.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false,
- d = !+"\v1",
- f = [0, 0, 0],
- k = null;
- if (typeof aB.plugins != aq && typeof aB.plugins[ab] == aD) {
- k = aB.plugins[ab].description;
- if (k && !(typeof aB.mimeTypes != aq && aB.mimeTypes[aE] && !aB.mimeTypes[aE].enabledPlugin)) {
- aa = true;
- d = false;
- k = k.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
- f[0] = parseInt(k.replace(/^(.*)\..*$/, "$1"), 10);
- f[1] = parseInt(k.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
- f[2] = /[a-zA-Z]/.test(k) ? parseInt(k.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0;
- }
- } else {
- if (typeof af.ActiveXObject != aq) {
- try {
- var i = new ActiveXObject(X);
- if (i) {
- k = i.GetVariable("$version");
- if (k) {
- d = true;
- k = k.split(" ")[1].split(",");
- f = [parseInt(k[0], 10), parseInt(k[1], 10), parseInt(k[2], 10)];
- }
- }
- } catch (b) {}
- }
- }
- return {
- w3: a,
- pv: f,
- wk: g,
- ie: d,
- win: h,
- mac: j
- };
- }(),
- aK = function () {
- if (!ah.w3) {
- return;
- }
- if ((typeof aL.readyState != aq && aL.readyState == "complete") || (typeof aL.readyState == aq && (aL.getElementsByTagName("body")[0] || aL.body))) {
- aP();
- }
- if (!ak) {
- if (typeof aL.addEventListener != aq) {
- aL.addEventListener("DOMContentLoaded", aP, false);
- }
- if (ah.ie && ah.win) {
- aL.attachEvent(ax, function () {
- if (aL.readyState == "complete") {
- aL.detachEvent(ax, arguments.callee);
- aP();
- }
- });
- if (af == top) {
- (function () {
- if (ak) {
- return;
- }
- try {
- aL.documentElement.doScroll("left");
- } catch (a) {
- setTimeout(arguments.callee, 0);
- return;
- }
- aP();
- })();
- }
- }
- if (ah.wk) {
- (function () {
- if (ak) {
- return;
- }
- if (!/loaded|complete/.test(aL.readyState)) {
- setTimeout(arguments.callee, 0);
- return;
- }
- aP();
- })();
- }
- aC(aP);
- }
- }();
-
- function aP() {
- if (ak) {
- return;
- }
- try {
- var b = aL.getElementsByTagName("body")[0].appendChild(ar("span"));
- b.parentNode.removeChild(b);
- } catch (a) {
- return;
- }
- ak = true;
- var d = Z.length;
- for (var c = 0; c < d; c++) {
- Z[c]();
- }
- }
- function aj(a) {
- if (ak) {
- a();
- } else {
- Z[Z.length] = a;
- }
- }
- function aC(a) {
- if (typeof af.addEventListener != aq) {
- af.addEventListener("load", a, false);
- } else {
- if (typeof aL.addEventListener != aq) {
- aL.addEventListener("load", a, false);
- } else {
- if (typeof af.attachEvent != aq) {
- aM(af, "onload", a);
- } else {
- if (typeof af.onload == "function") {
- var b = af.onload;
- af.onload = function () {
- b();
- a();
- };
- } else {
- af.onload = a;
- }
- }
- }
- }
- }
- function aN() {
- if (aa) {
- Y();
- } else {
- am();
- }
- }
- function Y() {
- var d = aL.getElementsByTagName("body")[0];
- var b = ar(aD);
- b.setAttribute("type", aE);
- var a = d.appendChild(b);
- if (a) {
- var c = 0;
- (function () {
- if (typeof a.GetVariable != aq) {
- var e = a.GetVariable("$version");
- if (e) {
- e = e.split(" ")[1].split(",");
- ah.pv = [parseInt(e[0], 10), parseInt(e[1], 10), parseInt(e[2], 10)];
- }
- } else {
- if (c < 10) {
- c++;
- setTimeout(arguments.callee, 10);
- return;
- }
- }
- d.removeChild(b);
- a = null;
- am();
- })();
- } else {
- am();
- }
- }
- function am() {
- var g = aG.length;
- if (g > 0) {
- for (var h = 0; h < g; h++) {
- var c = aG[h].id;
- var l = aG[h].callbackFn;
- var a = {
- success: false,
- id: c
- };
- if (ah.pv[0] > 0) {
- var i = aS(c);
- if (i) {
- if (ao(aG[h].swfVersion) && !(ah.wk && ah.wk < 312)) {
- ay(c, true);
- if (l) {
- a.success = true;
- a.ref = av(c);
- l(a);
- }
- } else {
- if (aG[h].expressInstall && au()) {
- var e = {};
- e.data = aG[h].expressInstall;
- e.width = i.getAttribute("width") || "0";
- e.height = i.getAttribute("height") || "0";
- if (i.getAttribute("class")) {
- e.styleclass = i.getAttribute("class");
- }
- if (i.getAttribute("align")) {
- e.align = i.getAttribute("align");
- }
- var f = {};
- var d = i.getElementsByTagName("param");
- var k = d.length;
- for (var j = 0; j < k; j++) {
- if (d[j].getAttribute("name").toLowerCase() != "movie") {
- f[d[j].getAttribute("name")] = d[j].getAttribute("value");
- }
- }
- ae(e, f, c, l);
- } else {
- aF(i);
- if (l) {
- l(a);
- }
- }
- }
- }
- } else {
- ay(c, true);
- if (l) {
- var b = av(c);
- if (b && typeof b.SetVariable != aq) {
- a.success = true;
- a.ref = b;
- }
- l(a);
- }
- }
- }
- }
- }
- function av(b) {
- var d = null;
- var c = aS(b);
- if (c && c.nodeName == "OBJECT") {
- if (typeof c.SetVariable != aq) {
- d = c;
- } else {
- var a = c.getElementsByTagName(aD)[0];
- if (a) {
- d = a;
- }
- }
- }
- return d;
- }
- function au() {
- return !aU && ao("6.0.65") && (ah.win || ah.mac) && !(ah.wk && ah.wk < 312);
- }
- function ae(f, d, h, e) {
- aU = true;
- ap = e || null;
- at = {
- success: false,
- id: h
- };
- var a = aS(h);
- if (a) {
- if (a.nodeName == "OBJECT") {
- aJ = aO(a);
- ad = null;
- } else {
- aJ = a;
- ad = h;
- }
- f.id = ac;
- if (typeof f.width == aq || (!/%$/.test(f.width) && parseInt(f.width, 10) < 310)) {
- f.width = "310";
- }
- if (typeof f.height == aq || (!/%$/.test(f.height) && parseInt(f.height, 10) < 137)) {
- f.height = "137";
- }
- aL.title = aL.title.slice(0, 47) + " - Flash Player Installation";
- var b = ah.ie && ah.win ? "ActiveX" : "PlugIn",
- c = "MMredirectURL=" + af.location.toString().replace(/&/g, "%26") + "&MMplayerType=" + b + "&MMdoctitle=" + aL.title;
- if (typeof d.flashvars != aq) {
- d.flashvars += "&" + c;
- } else {
- d.flashvars = c;
- }
- if (ah.ie && ah.win && a.readyState != 4) {
- var g = ar("div");
- h += "SWFObjectNew";
- g.setAttribute("id", h);
- a.parentNode.insertBefore(g, a);
- a.style.display = "none";
- (function () {
- if (a.readyState == 4) {
- a.parentNode.removeChild(a);
- } else {
- setTimeout(arguments.callee, 10);
- }
- })();
- }
- aA(f, d, h);
- }
- }
- function aF(a) {
- if (ah.ie && ah.win && a.readyState != 4) {
- var b = ar("div");
- a.parentNode.insertBefore(b, a);
- b.parentNode.replaceChild(aO(a), b);
- a.style.display = "none";
- (function () {
- if (a.readyState == 4) {
- a.parentNode.removeChild(a);
- } else {
- setTimeout(arguments.callee, 10);
- }
- })();
- } else {
- a.parentNode.replaceChild(aO(a), a);
- }
- }
- function aO(b) {
- var d = ar("div");
- if (ah.win && ah.ie) {
- d.innerHTML = b.innerHTML;
- } else {
- var e = b.getElementsByTagName(aD)[0];
- if (e) {
- var a = e.childNodes;
- if (a) {
- var f = a.length;
- for (var c = 0; c < f; c++) {
- if (!(a[c].nodeType == 1 && a[c].nodeName == "PARAM") && !(a[c].nodeType == 8)) {
- d.appendChild(a[c].cloneNode(true));
- }
- }
- }
- }
- }
- return d;
- }
- function aA(e, g, c) {
- var d, a = aS(c);
- if (ah.wk && ah.wk < 312) {
- return d;
- }
- if (a) {
- if (typeof e.id == aq) {
- e.id = c;
- }
- if (ah.ie && ah.win) {
- var f = "";
- for (var i in e) {
- if (e[i] != Object.prototype[i]) {
- if (i.toLowerCase() == "data") {
- g.movie = e[i];
- } else {
- if (i.toLowerCase() == "styleclass") {
- f += ' class="' + e[i] + '"';
- } else {
- if (i.toLowerCase() != "classid") {
- f += " " + i + '="' + e[i] + '"';
- }
- }
- }
- }
- }
- var h = "";
- for (var j in g) {
- if (g[j] != Object.prototype[j]) {
- h += '';
- }
- }
- a.outerHTML = '";
- ag[ag.length] = e.id;
- d = aS(e.id);
- } else {
- var b = ar(aD);
- b.setAttribute("type", aE);
- for (var k in e) {
- if (e[k] != Object.prototype[k]) {
- if (k.toLowerCase() == "styleclass") {
- b.setAttribute("class", e[k]);
- } else {
- if (k.toLowerCase() != "classid") {
- b.setAttribute(k, e[k]);
- }
- }
- }
- }
- for (var l in g) {
- if (g[l] != Object.prototype[l] && l.toLowerCase() != "movie") {
- aQ(b, l, g[l]);
- }
- }
- a.parentNode.replaceChild(b, a);
- d = b;
- }
- }
- return d;
- }
- function aQ(b, d, c) {
- var a = ar("param");
- a.setAttribute("name", d);
- a.setAttribute("value", c);
- b.appendChild(a);
- }
- function aw(a) {
- var b = aS(a);
- if (b && b.nodeName == "OBJECT") {
- if (ah.ie && ah.win) {
- b.style.display = "none";
- (function () {
- if (b.readyState == 4) {
- aT(a);
- } else {
- setTimeout(arguments.callee, 10);
- }
- })();
- } else {
- b.parentNode.removeChild(b);
- }
- }
- }
- function aT(a) {
- var b = aS(a);
- if (b) {
- for (var c in b) {
- if (typeof b[c] == "function") {
- b[c] = null;
- }
- }
- b.parentNode.removeChild(b);
- }
- }
- function aS(a) {
- var c = null;
- try {
- c = aL.getElementById(a);
- } catch (b) {}
- return c;
- }
- function ar(a) {
- return aL.createElement(a);
- }
- function aM(a, c, b) {
- a.attachEvent(c, b);
- al[al.length] = [a, c, b];
- }
- function ao(a) {
- var b = ah.pv,
- c = a.split(".");
- c[0] = parseInt(c[0], 10);
- c[1] = parseInt(c[1], 10) || 0;
- c[2] = parseInt(c[2], 10) || 0;
- return (b[0] > c[0] || (b[0] == c[0] && b[1] > c[1]) || (b[0] == c[0] && b[1] == c[1] && b[2] >= c[2])) ? true : false;
- }
- function az(b, f, a, c) {
- if (ah.ie && ah.mac) {
- return;
- }
- var e = aL.getElementsByTagName("head")[0];
- if (!e) {
- return;
- }
- var g = (a && typeof a == "string") ? a : "screen";
- if (c) {
- aH = null;
- an = null;
- }
- if (!aH || an != g) {
- var d = ar("style");
- d.setAttribute("type", "text/css");
- d.setAttribute("media", g);
- aH = e.appendChild(d);
- if (ah.ie && ah.win && typeof aL.styleSheets != aq && aL.styleSheets.length > 0) {
- aH = aL.styleSheets[aL.styleSheets.length - 1];
- }
- an = g;
- }
- if (ah.ie && ah.win) {
- if (aH && typeof aH.addRule == aD) {
- aH.addRule(b, f);
- }
- } else {
- if (aH && typeof aL.createTextNode != aq) {
- aH.appendChild(aL.createTextNode(b + " {" + f + "}"));
- }
- }
- }
- function ay(a, c) {
- if (!aI) {
- return;
- }
- var b = c ? "visible" : "hidden";
- if (ak && aS(a)) {
- aS(a).style.visibility = b;
- } else {
- az("#" + a, "visibility:" + b);
- }
- }
- function ai(b) {
- var a = /[\\\"<>\.;]/;
- var c = a.exec(b) != null;
- return c && typeof encodeURIComponent != aq ? encodeURIComponent(b) : b;
- }
- var aR = function () {
- if (ah.ie && ah.win) {
- window.attachEvent("onunload", function () {
- var a = al.length;
- for (var b = 0; b < a; b++) {
- al[b][0].detachEvent(al[b][1], al[b][2]);
- }
- var d = ag.length;
- for (var c = 0; c < d; c++) {
- aw(ag[c]);
- }
- for (var e in ah) {
- ah[e] = null;
- }
- ah = null;
- for (var f in swfobject) {
- swfobject[f] = null;
- }
- swfobject = null;
- });
- }
- }();
- return {
- registerObject: function (a, e, c, b) {
- if (ah.w3 && a && e) {
- var d = {};
- d.id = a;
- d.swfVersion = e;
- d.expressInstall = c;
- d.callbackFn = b;
- aG[aG.length] = d;
- ay(a, false);
- } else {
- if (b) {
- b({
- success: false,
- id: a
- });
- }
- }
- },
- getObjectById: function (a) {
- if (ah.w3) {
- return av(a);
- }
- },
- embedSWF: function (k, e, h, f, c, a, b, i, g, j) {
- var d = {
- success: false,
- id: e
- };
- if (ah.w3 && !(ah.wk && ah.wk < 312) && k && e && h && f && c) {
- ay(e, false);
- aj(function () {
- h += "";
- f += "";
- var q = {};
- if (g && typeof g === aD) {
- for (var o in g) {
- q[o] = g[o];
- }
- }
- q.data = k;
- q.width = h;
- q.height = f;
- var n = {};
- if (i && typeof i === aD) {
- for (var p in i) {
- n[p] = i[p];
- }
- }
- if (b && typeof b === aD) {
- for (var l in b) {
- if (typeof n.flashvars != aq) {
- n.flashvars += "&" + l + "=" + b[l];
- } else {
- n.flashvars = l + "=" + b[l];
- }
- }
- }
- if (ao(c)) {
- var m = aA(q, n, e);
- if (q.id == e) {
- ay(e, true);
- }
- d.success = true;
- d.ref = m;
- } else {
- if (a && au()) {
- q.data = a;
- ae(q, n, e, j);
- return;
- } else {
- ay(e, true);
- }
- }
- if (j) {
- j(d);
- }
- });
- } else {
- if (j) {
- j(d);
- }
- }
- },
- switchOffAutoHideShow: function () {
- aI = false;
- },
- ua: ah,
- getFlashPlayerVersion: function () {
- return {
- major: ah.pv[0],
- minor: ah.pv[1],
- release: ah.pv[2]
- };
- },
- hasFlashPlayerVersion: ao,
- createSWF: function (a, b, c) {
- if (ah.w3) {
- return aA(a, b, c);
- } else {
- return undefined;
- }
- },
- showExpressInstall: function (b, a, d, c) {
- if (ah.w3 && au()) {
- ae(b, a, d, c);
- }
- },
- removeSWF: function (a) {
- if (ah.w3) {
- aw(a);
- }
- },
- createCSS: function (b, a, c, d) {
- if (ah.w3) {
- az(b, a, c, d);
- }
- },
- addDomLoadEvent: aj,
- addLoadEvent: aC,
- getQueryParamValue: function (b) {
- var a = aL.location.search || aL.location.hash;
- if (a) {
- if (/\?/.test(a)) {
- a = a.split("?")[1];
- }
- if (b == null) {
- return ai(a);
- }
- var c = a.split("&");
- for (var d = 0; d < c.length; d++) {
- if (c[d].substring(0, c[d].indexOf("=")) == b) {
- return ai(c[d].substring((c[d].indexOf("=") + 1)));
- }
- }
- }
- return "";
- },
- expressInstallCallback: function () {
- if (aU) {
- var a = aS(ac);
- if (a && aJ) {
- a.parentNode.replaceChild(aJ, a);
- if (ad) {
- ay(ad, true);
- if (ah.ie && ah.win) {
- aJ.style.display = "block";
- }
- }
- if (ap) {
- ap(at);
- }
- }
- aU = false;
- }
- }
- };
-}();
-var SWFUpload;
-if (SWFUpload == undefined) {
- SWFUpload = function (b) {
- this.initSWFUpload(b);
- };
-}
-SWFUpload.prototype.initSWFUpload = function (c) {
- try {
- this.customSettings = {};
- this.settings = c;
- this.eventQueue = [];
- this.movieName = "SWFUpload_" + SWFUpload.movieCount++;
- this.movieElement = null;
- SWFUpload.instances[this.movieName] = this;
- this.initSettings();
- this.loadFlash();
- this.displayDebugInfo();
- } catch (d) {
- delete SWFUpload.instances[this.movieName];
- throw d;
- }
-};
-SWFUpload.instances = {};
-SWFUpload.movieCount = 0;
-SWFUpload.version = "2.2.0 2009-03-25";
-SWFUpload.QUEUE_ERROR = {
- QUEUE_LIMIT_EXCEEDED: -100,
- FILE_EXCEEDS_SIZE_LIMIT: -110,
- ZERO_BYTE_FILE: -120,
- INVALID_FILETYPE: -130
-};
-SWFUpload.UPLOAD_ERROR = {
- HTTP_ERROR: -200,
- MISSING_UPLOAD_URL: -210,
- IO_ERROR: -220,
- SECURITY_ERROR: -230,
- UPLOAD_LIMIT_EXCEEDED: -240,
- UPLOAD_FAILED: -250,
- SPECIFIED_FILE_ID_NOT_FOUND: -260,
- FILE_VALIDATION_FAILED: -270,
- FILE_CANCELLED: -280,
- UPLOAD_STOPPED: -290
-};
-SWFUpload.FILE_STATUS = {
- QUEUED: -1,
- IN_PROGRESS: -2,
- ERROR: -3,
- COMPLETE: -4,
- CANCELLED: -5
-};
-SWFUpload.BUTTON_ACTION = {
- SELECT_FILE: -100,
- SELECT_FILES: -110,
- START_UPLOAD: -120
-};
-SWFUpload.CURSOR = {
- ARROW: -1,
- HAND: -2
-};
-SWFUpload.WINDOW_MODE = {
- WINDOW: "window",
- TRANSPARENT: "transparent",
- OPAQUE: "opaque"
-};
-SWFUpload.completeURL = function (e) {
- if (typeof(e) !== "string" || e.match(/^https?:\/\//i) || e.match(/^\//)) {
- return e;
- }
- var f = window.location.protocol + "//" + window.location.hostname + (window.location.port ? ":" + window.location.port : "");
- var d = window.location.pathname.lastIndexOf("/");
- if (d <= 0) {
- path = "/";
- } else {
- path = window.location.pathname.substr(0, d) + "/";
- }
- return path + e;
-};
-SWFUpload.prototype.initSettings = function () {
- this.ensureDefault = function (c, d) {
- this.settings[c] = (this.settings[c] == undefined) ? d : this.settings[c];
- };
- this.ensureDefault("upload_url", "");
- this.ensureDefault("preserve_relative_urls", false);
- this.ensureDefault("file_post_name", "Filedata");
- this.ensureDefault("post_params", {});
- this.ensureDefault("use_query_string", false);
- this.ensureDefault("requeue_on_error", false);
- this.ensureDefault("http_success", []);
- this.ensureDefault("assume_success_timeout", 0);
- this.ensureDefault("file_types", "*.*");
- this.ensureDefault("file_types_description", "All Files");
- this.ensureDefault("file_size_limit", 0);
- this.ensureDefault("file_upload_limit", 0);
- this.ensureDefault("file_queue_limit", 0);
- this.ensureDefault("flash_url", "swfupload.swf");
- this.ensureDefault("prevent_swf_caching", true);
- this.ensureDefault("button_image_url", "");
- this.ensureDefault("button_width", 1);
- this.ensureDefault("button_height", 1);
- this.ensureDefault("button_text", "");
- this.ensureDefault("button_text_style", "color: #000000; font-size: 16pt;");
- this.ensureDefault("button_text_top_padding", 0);
- this.ensureDefault("button_text_left_padding", 0);
- this.ensureDefault("button_action", SWFUpload.BUTTON_ACTION.SELECT_FILES);
- this.ensureDefault("button_disabled", false);
- this.ensureDefault("button_placeholder_id", "");
- this.ensureDefault("button_placeholder", null);
- this.ensureDefault("button_cursor", SWFUpload.CURSOR.ARROW);
- this.ensureDefault("button_window_mode", SWFUpload.WINDOW_MODE.WINDOW);
- this.ensureDefault("debug", false);
- this.settings.debug_enabled = this.settings.debug;
- this.settings.return_upload_start_handler = this.returnUploadStart;
- this.ensureDefault("swfupload_loaded_handler", null);
- this.ensureDefault("file_dialog_start_handler", null);
- this.ensureDefault("file_queued_handler", null);
- this.ensureDefault("file_queue_error_handler", null);
- this.ensureDefault("file_dialog_complete_handler", null);
- this.ensureDefault("upload_start_handler", null);
- this.ensureDefault("upload_progress_handler", null);
- this.ensureDefault("upload_error_handler", null);
- this.ensureDefault("upload_success_handler", null);
- this.ensureDefault("upload_complete_handler", null);
- this.ensureDefault("debug_handler", this.debugMessage);
- this.ensureDefault("custom_settings", {});
- this.customSettings = this.settings.custom_settings;
- if ( !! this.settings.prevent_swf_caching) {
- this.settings.flash_url = this.settings.flash_url + (this.settings.flash_url.indexOf("?") < 0 ? "?" : "&") + "preventswfcaching=" + new Date().getTime();
- }
- if (!this.settings.preserve_relative_urls) {
- this.settings.upload_url = SWFUpload.completeURL(this.settings.upload_url);
- this.settings.button_image_url = SWFUpload.completeURL(this.settings.button_image_url);
- }
- delete this.ensureDefault;
-};
-SWFUpload.prototype.loadFlash = function () {
- var d, c;
- if (document.getElementById(this.movieName) !== null) {
- throw "ID " + this.movieName + " is already in use. The Flash Object could not be added";
- }
- d = document.getElementById(this.settings.button_placeholder_id) || this.settings.button_placeholder;
- if (d == undefined) {
- throw "Could not find the placeholder element: " + this.settings.button_placeholder_id;
- }
- c = document.createElement("div");
- c.innerHTML = this.getFlashHTML();
- d.parentNode.replaceChild(c.firstChild, d);
- if (window[this.movieName] == undefined) {
- window[this.movieName] = this.getMovieElement();
- }
-};
-SWFUpload.prototype.getFlashHTML = function () {
- return ['"].join("");
-};
-SWFUpload.prototype.getFlashVars = function () {
- var c = this.buildParamString();
- var d = this.settings.http_success.join(",");
- return ["movieName=", encodeURIComponent(this.movieName), "&uploadURL=", encodeURIComponent(this.settings.upload_url), "&useQueryString=", encodeURIComponent(this.settings.use_query_string), "&requeueOnError=", encodeURIComponent(this.settings.requeue_on_error), "&httpSuccess=", encodeURIComponent(d), "&assumeSuccessTimeout=", encodeURIComponent(this.settings.assume_success_timeout), "¶ms=", encodeURIComponent(c), "&filePostName=", encodeURIComponent(this.settings.file_post_name), "&fileTypes=", encodeURIComponent(this.settings.file_types), "&fileTypesDescription=", encodeURIComponent(this.settings.file_types_description), "&fileSizeLimit=", encodeURIComponent(this.settings.file_size_limit), "&fileUploadLimit=", encodeURIComponent(this.settings.file_upload_limit), "&fileQueueLimit=", encodeURIComponent(this.settings.file_queue_limit), "&debugEnabled=", encodeURIComponent(this.settings.debug_enabled), "&buttonImageURL=", encodeURIComponent(this.settings.button_image_url), "&buttonWidth=", encodeURIComponent(this.settings.button_width), "&buttonHeight=", encodeURIComponent(this.settings.button_height), "&buttonText=", encodeURIComponent(this.settings.button_text), "&buttonTextTopPadding=", encodeURIComponent(this.settings.button_text_top_padding), "&buttonTextLeftPadding=", encodeURIComponent(this.settings.button_text_left_padding), "&buttonTextStyle=", encodeURIComponent(this.settings.button_text_style), "&buttonAction=", encodeURIComponent(this.settings.button_action), "&buttonDisabled=", encodeURIComponent(this.settings.button_disabled), "&buttonCursor=", encodeURIComponent(this.settings.button_cursor)].join("");
-};
-SWFUpload.prototype.getMovieElement = function () {
- if (this.movieElement == undefined) {
- this.movieElement = document.getElementById(this.movieName);
- }
- if (this.movieElement === null) {
- throw "Could not find Flash element";
- }
- return this.movieElement;
-};
-SWFUpload.prototype.buildParamString = function () {
- var f = this.settings.post_params;
- var d = [];
- if (typeof(f) === "object") {
- for (var e in f) {
- if (f.hasOwnProperty(e)) {
- d.push(encodeURIComponent(e.toString()) + "=" + encodeURIComponent(f[e].toString()));
- }
- }
- }
- return d.join("&");
-};
-SWFUpload.prototype.destroy = function () {
- try {
- this.cancelUpload(null, false);
- var g = null;
- g = this.getMovieElement();
- if (g && typeof(g.CallFunction) === "unknown") {
- for (var j in g) {
- try {
- if (typeof(g[j]) === "function") {
- g[j] = null;
- }
- } catch (h) {}
- }
- try {
- g.parentNode.removeChild(g);
- } catch (f) {}
- }
- window[this.movieName] = null;
- SWFUpload.instances[this.movieName] = null;
- delete SWFUpload.instances[this.movieName];
- this.movieElement = null;
- this.settings = null;
- this.customSettings = null;
- this.eventQueue = null;
- this.movieName = null;
- return true;
- } catch (i) {
- return false;
- }
-};
-SWFUpload.prototype.displayDebugInfo = function () {
- this.debug(["---SWFUpload Instance Info---\n", "Version: ", SWFUpload.version, "\n", "Movie Name: ", this.movieName, "\n", "Settings:\n", "\t", "upload_url: ", this.settings.upload_url, "\n", "\t", "flash_url: ", this.settings.flash_url, "\n", "\t", "use_query_string: ", this.settings.use_query_string.toString(), "\n", "\t", "requeue_on_error: ", this.settings.requeue_on_error.toString(), "\n", "\t", "http_success: ", this.settings.http_success.join(", "), "\n", "\t", "assume_success_timeout: ", this.settings.assume_success_timeout, "\n", "\t", "file_post_name: ", this.settings.file_post_name, "\n", "\t", "post_params: ", this.settings.post_params.toString(), "\n", "\t", "file_types: ", this.settings.file_types, "\n", "\t", "file_types_description: ", this.settings.file_types_description, "\n", "\t", "file_size_limit: ", this.settings.file_size_limit, "\n", "\t", "file_upload_limit: ", this.settings.file_upload_limit, "\n", "\t", "file_queue_limit: ", this.settings.file_queue_limit, "\n", "\t", "debug: ", this.settings.debug.toString(), "\n", "\t", "prevent_swf_caching: ", this.settings.prevent_swf_caching.toString(), "\n", "\t", "button_placeholder_id: ", this.settings.button_placeholder_id.toString(), "\n", "\t", "button_placeholder: ", (this.settings.button_placeholder ? "Set" : "Not Set"), "\n", "\t", "button_image_url: ", this.settings.button_image_url.toString(), "\n", "\t", "button_width: ", this.settings.button_width.toString(), "\n", "\t", "button_height: ", this.settings.button_height.toString(), "\n", "\t", "button_text: ", this.settings.button_text.toString(), "\n", "\t", "button_text_style: ", this.settings.button_text_style.toString(), "\n", "\t", "button_text_top_padding: ", this.settings.button_text_top_padding.toString(), "\n", "\t", "button_text_left_padding: ", this.settings.button_text_left_padding.toString(), "\n", "\t", "button_action: ", this.settings.button_action.toString(), "\n", "\t", "button_disabled: ", this.settings.button_disabled.toString(), "\n", "\t", "custom_settings: ", this.settings.custom_settings.toString(), "\n", "Event Handlers:\n", "\t", "swfupload_loaded_handler assigned: ", (typeof this.settings.swfupload_loaded_handler === "function").toString(), "\n", "\t", "file_dialog_start_handler assigned: ", (typeof this.settings.file_dialog_start_handler === "function").toString(), "\n", "\t", "file_queued_handler assigned: ", (typeof this.settings.file_queued_handler === "function").toString(), "\n", "\t", "file_queue_error_handler assigned: ", (typeof this.settings.file_queue_error_handler === "function").toString(), "\n", "\t", "upload_start_handler assigned: ", (typeof this.settings.upload_start_handler === "function").toString(), "\n", "\t", "upload_progress_handler assigned: ", (typeof this.settings.upload_progress_handler === "function").toString(), "\n", "\t", "upload_error_handler assigned: ", (typeof this.settings.upload_error_handler === "function").toString(), "\n", "\t", "upload_success_handler assigned: ", (typeof this.settings.upload_success_handler === "function").toString(), "\n", "\t", "upload_complete_handler assigned: ", (typeof this.settings.upload_complete_handler === "function").toString(), "\n", "\t", "debug_handler assigned: ", (typeof this.settings.debug_handler === "function").toString(), "\n"].join(""));
-};
-SWFUpload.prototype.addSetting = function (d, f, e) {
- if (f == undefined) {
- return (this.settings[d] = e);
- } else {
- return (this.settings[d] = f);
- }
-};
-SWFUpload.prototype.getSetting = function (b) {
- if (this.settings[b] != undefined) {
- return this.settings[b];
- }
- return "";
-};
-SWFUpload.prototype.callFlash = function (functionName, argumentArray) {
- argumentArray = argumentArray || [];
- var movieElement = this.getMovieElement();
- var returnValue, returnString;
- try {
- returnString = movieElement.CallFunction('' + __flash__argumentsToXML(argumentArray, 0) + "");
- returnValue = eval(returnString);
- } catch (ex) {
- throw "Call to " + functionName + " failed";
- }
- if (returnValue != undefined && typeof returnValue.post === "object") {
- returnValue = this.unescapeFilePostParams(returnValue);
- }
- return returnValue;
-};
-SWFUpload.prototype.selectFile = function () {
- this.callFlash("SelectFile");
-};
-SWFUpload.prototype.selectFiles = function () {
- this.callFlash("SelectFiles");
-};
-SWFUpload.prototype.startUpload = function (b) {
- this.callFlash("StartUpload", [b]);
-};
-SWFUpload.prototype.cancelUpload = function (d, c) {
- if (c !== false) {
- c = true;
- }
- this.callFlash("CancelUpload", [d, c]);
-};
-SWFUpload.prototype.stopUpload = function () {
- this.callFlash("StopUpload");
-};
-SWFUpload.prototype.getStats = function () {
- return this.callFlash("GetStats");
-};
-SWFUpload.prototype.setStats = function (b) {
- this.callFlash("SetStats", [b]);
-};
-SWFUpload.prototype.getFile = function (b) {
- if (typeof(b) === "number") {
- return this.callFlash("GetFileByIndex", [b]);
- } else {
- return this.callFlash("GetFile", [b]);
- }
-};
-SWFUpload.prototype.addFileParam = function (e, d, f) {
- return this.callFlash("AddFileParam", [e, d, f]);
-};
-SWFUpload.prototype.removeFileParam = function (d, c) {
- this.callFlash("RemoveFileParam", [d, c]);
-};
-SWFUpload.prototype.setUploadURL = function (b) {
- this.settings.upload_url = b.toString();
- this.callFlash("SetUploadURL", [b]);
-};
-SWFUpload.prototype.setPostParams = function (b) {
- this.settings.post_params = b;
- this.callFlash("SetPostParams", [b]);
-};
-SWFUpload.prototype.addPostParam = function (d, c) {
- this.settings.post_params[d] = c;
- this.callFlash("SetPostParams", [this.settings.post_params]);
-};
-SWFUpload.prototype.removePostParam = function (b) {
- delete this.settings.post_params[b];
- this.callFlash("SetPostParams", [this.settings.post_params]);
-};
-SWFUpload.prototype.setFileTypes = function (d, c) {
- this.settings.file_types = d;
- this.settings.file_types_description = c;
- this.callFlash("SetFileTypes", [d, c]);
-};
-SWFUpload.prototype.setFileSizeLimit = function (b) {
- this.settings.file_size_limit = b;
- this.callFlash("SetFileSizeLimit", [b]);
-};
-SWFUpload.prototype.setFileUploadLimit = function (b) {
- this.settings.file_upload_limit = b;
- this.callFlash("SetFileUploadLimit", [b]);
-};
-SWFUpload.prototype.setFileQueueLimit = function (b) {
- this.settings.file_queue_limit = b;
- this.callFlash("SetFileQueueLimit", [b]);
-};
-SWFUpload.prototype.setFilePostName = function (b) {
- this.settings.file_post_name = b;
- this.callFlash("SetFilePostName", [b]);
-};
-SWFUpload.prototype.setUseQueryString = function (b) {
- this.settings.use_query_string = b;
- this.callFlash("SetUseQueryString", [b]);
-};
-SWFUpload.prototype.setRequeueOnError = function (b) {
- this.settings.requeue_on_error = b;
- this.callFlash("SetRequeueOnError", [b]);
-};
-SWFUpload.prototype.setHTTPSuccess = function (b) {
- if (typeof b === "string") {
- b = b.replace(" ", "").split(",");
- }
- this.settings.http_success = b;
- this.callFlash("SetHTTPSuccess", [b]);
-};
-SWFUpload.prototype.setAssumeSuccessTimeout = function (b) {
- this.settings.assume_success_timeout = b;
- this.callFlash("SetAssumeSuccessTimeout", [b]);
-};
-SWFUpload.prototype.setDebugEnabled = function (b) {
- this.settings.debug_enabled = b;
- this.callFlash("SetDebugEnabled", [b]);
-};
-SWFUpload.prototype.setButtonImageURL = function (b) {
- if (b == undefined) {
- b = "";
- }
- this.settings.button_image_url = b;
- this.callFlash("SetButtonImageURL", [b]);
-};
-SWFUpload.prototype.setButtonDimensions = function (f, e) {
- this.settings.button_width = f;
- this.settings.button_height = e;
- var d = this.getMovieElement();
- if (d != undefined) {
- d.style.width = f + "px";
- d.style.height = e + "px";
- }
- this.callFlash("SetButtonDimensions", [f, e]);
-};
-SWFUpload.prototype.setButtonText = function (b) {
- this.settings.button_text = b;
- this.callFlash("SetButtonText", [b]);
-};
-SWFUpload.prototype.setButtonTextPadding = function (c, d) {
- this.settings.button_text_top_padding = d;
- this.settings.button_text_left_padding = c;
- this.callFlash("SetButtonTextPadding", [c, d]);
-};
-SWFUpload.prototype.setButtonTextStyle = function (b) {
- this.settings.button_text_style = b;
- this.callFlash("SetButtonTextStyle", [b]);
-};
-SWFUpload.prototype.setButtonDisabled = function (b) {
- this.settings.button_disabled = b;
- this.callFlash("SetButtonDisabled", [b]);
-};
-SWFUpload.prototype.setButtonAction = function (b) {
- this.settings.button_action = b;
- this.callFlash("SetButtonAction", [b]);
-};
-SWFUpload.prototype.setButtonCursor = function (b) {
- this.settings.button_cursor = b;
- this.callFlash("SetButtonCursor", [b]);
-};
-SWFUpload.prototype.queueEvent = function (d, f) {
- if (f == undefined) {
- f = [];
- } else {
- if (!(f instanceof Array)) {
- f = [f];
- }
- }
- var e = this;
- if (typeof this.settings[d] === "function") {
- this.eventQueue.push(function () {
- this.settings[d].apply(this, f);
- });
- setTimeout(function () {
- e.executeNextEvent();
- }, 0);
- } else {
- if (this.settings[d] !== null) {
- throw "Event handler " + d + " is unknown or is not a function";
- }
- }
-};
-SWFUpload.prototype.executeNextEvent = function () {
- var b = this.eventQueue ? this.eventQueue.shift() : null;
- if (typeof(b) === "function") {
- b.apply(this);
- }
-};
-SWFUpload.prototype.unescapeFilePostParams = function (l) {
- var j = /[$]([0-9a-f]{4})/i;
- var i = {};
- var k;
- if (l != undefined) {
- for (var h in l.post) {
- if (l.post.hasOwnProperty(h)) {
- k = h;
- var g;
- while ((g = j.exec(k)) !== null) {
- k = k.replace(g[0], String.fromCharCode(parseInt("0x" + g[1], 16)));
- }
- i[k] = l.post[h];
- }
- }
- l.post = i;
- }
- return l;
-};
-SWFUpload.prototype.testExternalInterface = function () {
- try {
- return this.callFlash("TestExternalInterface");
- } catch (b) {
- return false;
- }
-};
-SWFUpload.prototype.flashReady = function () {
- var b = this.getMovieElement();
- if (!b) {
- this.debug("Flash called back ready but the flash movie can't be found.");
- return;
- }
- this.cleanUp(b);
- this.queueEvent("swfupload_loaded_handler");
-};
-SWFUpload.prototype.cleanUp = function (f) {
- try {
- if (this.movieElement && typeof(f.CallFunction) === "unknown") {
- this.debug("Removing Flash functions hooks (this should only run in IE and should prevent memory leaks)");
- for (var h in f) {
- try {
- if (typeof(f[h]) === "function") {
- f[h] = null;
- }
- } catch (e) {}
- }
- }
- } catch (g) {}
- window.__flash__removeCallback = function (c, b) {
- try {
- if (c) {
- c[b] = null;
- }
- } catch (a) {}
- };
-};
-SWFUpload.prototype.fileDialogStart = function () {
- this.queueEvent("file_dialog_start_handler");
-};
-SWFUpload.prototype.fileQueued = function (b) {
- b = this.unescapeFilePostParams(b);
- this.queueEvent("file_queued_handler", b);
-};
-SWFUpload.prototype.fileQueueError = function (e, f, d) {
- e = this.unescapeFilePostParams(e);
- this.queueEvent("file_queue_error_handler", [e, f, d]);
-};
-SWFUpload.prototype.fileDialogComplete = function (d, f, e) {
- this.queueEvent("file_dialog_complete_handler", [d, f, e]);
-};
-SWFUpload.prototype.uploadStart = function (b) {
- b = this.unescapeFilePostParams(b);
- this.queueEvent("return_upload_start_handler", b);
-};
-SWFUpload.prototype.returnUploadStart = function (d) {
- var c;
- if (typeof this.settings.upload_start_handler === "function") {
- d = this.unescapeFilePostParams(d);
- c = this.settings.upload_start_handler.call(this, d);
- } else {
- if (this.settings.upload_start_handler != undefined) {
- throw "upload_start_handler must be a function";
- }
- }
- if (c === undefined) {
- c = true;
- }
- c = !! c;
- this.callFlash("ReturnUploadStart", [c]);
-};
-SWFUpload.prototype.uploadProgress = function (e, f, d) {
- e = this.unescapeFilePostParams(e);
- this.queueEvent("upload_progress_handler", [e, f, d]);
-};
-SWFUpload.prototype.uploadError = function (e, f, d) {
- e = this.unescapeFilePostParams(e);
- this.queueEvent("upload_error_handler", [e, f, d]);
-};
-SWFUpload.prototype.uploadSuccess = function (d, e, f) {
- d = this.unescapeFilePostParams(d);
- this.queueEvent("upload_success_handler", [d, e, f]);
-};
-SWFUpload.prototype.uploadComplete = function (b) {
- b = this.unescapeFilePostParams(b);
- this.queueEvent("upload_complete_handler", b);
-};
-SWFUpload.prototype.debug = function (b) {
- this.queueEvent("debug_handler", b);
-};
-SWFUpload.prototype.debugMessage = function (h) {
- if (this.settings.debug) {
- var f, g = [];
- if (typeof h === "object" && typeof h.name === "string" && typeof h.message === "string") {
- for (var e in h) {
- if (h.hasOwnProperty(e)) {
- g.push(e + ": " + h[e]);
- }
- }
- f = g.join("\n") || "";
- g = f.split("\n");
- f = "EXCEPTION: " + g.join("\nEXCEPTION: ");
- SWFUpload.Console.writeLine(f);
- } else {
- SWFUpload.Console.writeLine(h);
- }
- }
-};
-SWFUpload.Console = {};
-SWFUpload.Console.writeLine = function (g) {
- var e, f;
- try {
- e = document.getElementById("SWFUpload_Console");
- if (!e) {
- f = document.createElement("form");
- document.getElementsByTagName("body")[0].appendChild(f);
- e = document.createElement("textarea");
- e.id = "SWFUpload_Console";
- e.style.fontFamily = "monospace";
- e.setAttribute("wrap", "off");
- e.wrap = "off";
- e.style.overflow = "auto";
- e.style.width = "700px";
- e.style.height = "350px";
- e.style.margin = "5px";
- f.appendChild(e);
- }
- e.value += g + "\n";
- e.scrollTop = e.scrollHeight - e.clientHeight;
- } catch (h) {
- alert("Exception: " + h.name + " Message: " + h.message);
- }
-};
-(function (c) {
- var b = {
- init: function (d, e) {
- return this.each(function () {
- var n = c(this);
- var m = n.clone();
- var j = c.extend({
- id: n.attr("id"),
- swf: "uploadify.swf",
- uploader: "uploadify.php",
- auto: true,
- buttonClass: "",
- buttonCursor: "hand",
- buttonImage: null,
- buttonText: "SELECT FILES",
- checkExisting: false,
- debug: false,
- fileObjName: "Filedata",
- fileSizeLimit: 0,
- fileTypeDesc: "All Files",
- fileTypeExts: "*.*",
- height: 30,
- method: "post",
- multi: true,
- formData: {},
- preventCaching: true,
- progressData: "percentage",
- queueID: false,
- queueSizeLimit: 999,
- removeCompleted: true,
- removeTimeout: 3,
- requeueErrors: false,
- successTimeout: 30,
- uploadLimit: 0,
- width: 120,
- overrideEvents: []
- }, d);
- var g = {
- assume_success_timeout: j.successTimeout,
- button_placeholder_id: j.id,
- button_width: j.width,
- button_height: j.height,
- button_text: null,
- button_text_style: null,
- button_text_top_padding: 0,
- button_text_left_padding: 0,
- button_action: (j.multi ? SWFUpload.BUTTON_ACTION.SELECT_FILES : SWFUpload.BUTTON_ACTION.SELECT_FILE),
- button_disabled: false,
- button_cursor: (j.buttonCursor == "arrow" ? SWFUpload.CURSOR.ARROW : SWFUpload.CURSOR.HAND),
- button_window_mode: SWFUpload.WINDOW_MODE.TRANSPARENT,
- debug: j.debug,
- requeue_on_error: j.requeueErrors,
- file_post_name: j.fileObjName,
- file_size_limit: j.fileSizeLimit,
- file_types: j.fileTypeExts,
- file_types_description: j.fileTypeDesc,
- file_queue_limit: j.queueSizeLimit,
- file_upload_limit: j.uploadLimit,
- flash_url: j.swf,
- prevent_swf_caching: j.preventCaching,
- post_params: j.formData,
- upload_url: j.uploader,
- use_query_string: (j.method == "get"),
- file_dialog_complete_handler: a.onDialogClose,
- file_dialog_start_handler: a.onDialogOpen,
- file_queued_handler: a.onSelect,
- file_queue_error_handler: a.onSelectError,
- swfupload_loaded_handler: j.onSWFReady,
- upload_complete_handler: a.onUploadComplete,
- upload_error_handler: a.onUploadError,
- upload_progress_handler: a.onUploadProgress,
- upload_start_handler: a.onUploadStart,
- upload_success_handler: a.onUploadSuccess
- };
- if (e) {
- g = c.extend(g, e);
- }
- g = c.extend(g, j);
- var o = swfobject.getFlashPlayerVersion();
- var h = (o.major >= 9);
- if (h) {
- window["uploadify_" + j.id] = new SWFUpload(g);
- var i = window["uploadify_" + j.id];
- n.data("uploadify", i);
- var l = c("", {
- id: j.id,
- "class": "uploadify",
- css: {
- height: j.height + "px",
- width: j.width + "px"
- }
- });
- c("#" + i.movieName).wrap(l);
- l = c("#" + j.id);
- l.data("uploadify", i);
- var f = c("", {
- id: j.id + "-button",
- "class": "uploadify-button " + j.buttonClass
- });
- if (j.buttonImage) {
- f.css({
- "background-image": "url('" + j.buttonImage + "')",
- "text-indent": "-9999px"
- });
- }
- f.html('' + j.buttonText + "").css({
- height: j.height + "px",
- "line-height": j.height + "px",
- width: j.width + "px"
- });
- l.append(f);
- c("#" + i.movieName).css({
- position: "absolute",
- "z-index": 1
- });
- if (!j.queueID) {
- var k = c("", {
- id: j.id + "-queue",
- "class": "uploadify-queue"
- });
- l.after(k);
- i.settings.queueID = j.id + "-queue";
- i.settings.defaultQueue = true;
- }
- i.queueData = {
- files: {},
- filesSelected: 0,
- filesQueued: 0,
- filesReplaced: 0,
- filesCancelled: 0,
- filesErrored: 0,
- uploadsSuccessful: 0,
- uploadsErrored: 0,
- averageSpeed: 0,
- queueLength: 0,
- queueSize: 0,
- uploadSize: 0,
- queueBytesUploaded: 0,
- uploadQueue: [],
- errorMsg: "Some files were not added to the queue:"
- };
- i.original = m;
- i.wrapper = l;
- i.button = f;
- i.queue = k;
- if (j.onInit) {
- j.onInit.call(n, i);
- }
- } else {
- if (j.onFallback) {
- j.onFallback.call(n);
- }
- }
- });
- },
- cancel: function (d, f) {
- var e = arguments;
- this.each(function () {
- var l = c(this),
- i = l.data("uploadify"),
- j = i.settings,
- h = -1;
- if (e[0]) {
- if (e[0] == "*") {
- var g = i.queueData.queueLength;
- c("#" + j.queueID).find(".uploadify-queue-item").each(function () {
- h++;
- if (e[1] === true) {
- i.cancelUpload(c(this).attr("id"), false);
- } else {
- i.cancelUpload(c(this).attr("id"));
- }
- c(this).find(".data").removeClass("data").html(" - Cancelled");
- c(this).find(".uploadify-progress-bar").remove();
- c(this).delay(1000 + 100 * h).fadeOut(500, function () {
- c(this).remove();
- });
- });
- i.queueData.queueSize = 0;
- i.queueData.queueLength = 0;
- if (j.onClearQueue) {
- j.onClearQueue.call(l, g);
- }
- } else {
- for (var m = 0; m < e.length; m++) {
- i.cancelUpload(e[m]);
- c("#" + e[m]).find(".data").removeClass("data").html(" - Cancelled");
- c("#" + e[m]).find(".uploadify-progress-bar").remove();
- c("#" + e[m]).delay(1000 + 100 * m).fadeOut(500, function () {
- c(this).remove();
- });
- }
- }
- } else {
- var k = c("#" + j.queueID).find(".uploadify-queue-item").get(0);
- $item = c(k);
- i.cancelUpload($item.attr("id"));
- $item.find(".data").removeClass("data").html(" - Cancelled");
- $item.find(".uploadify-progress-bar").remove();
- $item.delay(1000).fadeOut(500, function () {
- c(this).remove();
- });
- }
- });
- },
- destroy: function () {
- this.each(function () {
- var f = c(this),
- d = f.data("uploadify"),
- e = d.settings;
- d.destroy();
- if (e.defaultQueue) {
- c("#" + e.queueID).remove();
- }
- c("#" + e.id).replaceWith(d.original);
- if (e.onDestroy) {
- e.onDestroy.call(this);
- }
- delete d;
- });
- },
- disable: function (d) {
- this.each(function () {
- var g = c(this),
- e = g.data("uploadify"),
- f = e.settings;
- if (d) {
- e.button.addClass("disabled");
- if (f.onDisable) {
- f.onDisable.call(this);
- }
- } else {
- e.button.removeClass("disabled");
- if (f.onEnable) {
- f.onEnable.call(this);
- }
- }
- e.setButtonDisabled(d);
- });
- },
- settings: function (e, g, h) {
- var d = arguments;
- var f = g;
- this.each(function () {
- var k = c(this),
- i = k.data("uploadify"),
- j = i.settings;
- if (typeof(d[0]) == "object") {
- for (var l in g) {
- setData(l, g[l]);
- }
- }
- if (d.length === 1) {
- f = j[e];
- } else {
- switch (e) {
- case "uploader":
- i.setUploadURL(g);
- break;
- case "formData":
- if (!h) {
- g = c.extend(j.formData, g);
- }
- i.setPostParams(j.formData);
- break;
- case "method":
- if (g == "get") {
- i.setUseQueryString(true);
- } else {
- i.setUseQueryString(false);
- }
- break;
- case "fileObjName":
- i.setFilePostName(g);
- break;
- case "fileTypeExts":
- i.setFileTypes(g, j.fileTypeDesc);
- break;
- case "fileTypeDesc":
- i.setFileTypes(j.fileTypeExts, g);
- break;
- case "fileSizeLimit":
- i.setFileSizeLimit(g);
- break;
- case "uploadLimit":
- i.setFileUploadLimit(g);
- break;
- case "queueSizeLimit":
- i.setFileQueueLimit(g);
- break;
- case "buttonImage":
- i.button.css("background-image", settingValue);
- break;
- case "buttonCursor":
- if (g == "arrow") {
- i.setButtonCursor(SWFUpload.CURSOR.ARROW);
- } else {
- i.setButtonCursor(SWFUpload.CURSOR.HAND);
- }
- break;
- case "buttonText":
- c("#" + j.id + "-button").find(".uploadify-button-text").html(g);
- break;
- case "width":
- i.setButtonDimensions(g, j.height);
- break;
- case "height":
- i.setButtonDimensions(j.width, g);
- break;
- case "multi":
- if (g) {
- i.setButtonAction(SWFUpload.BUTTON_ACTION.SELECT_FILES);
- } else {
- i.setButtonAction(SWFUpload.BUTTON_ACTION.SELECT_FILE);
- }
- break;
- }
- j[e] = g;
- }
- });
- if (d.length === 1) {
- return f;
- }
- },
- stop: function () {
- this.each(function () {
- var e = c(this),
- d = e.data("uploadify");
- d.queueData.averageSpeed = 0;
- d.queueData.uploadSize = 0;
- d.queueData.bytesUploaded = 0;
- d.queueData.uploadQueue = [];
- d.stopUpload();
- });
- },
- upload: function () {
- var d = arguments;
- this.each(function () {
- var f = c(this),
- e = f.data("uploadify");
- e.queueData.averageSpeed = 0;
- e.queueData.uploadSize = 0;
- e.queueData.bytesUploaded = 0;
- e.queueData.uploadQueue = [];
- if (d[0]) {
- if (d[0] == "*") {
- e.queueData.uploadSize = e.queueData.queueSize;
- e.queueData.uploadQueue.push("*");
- e.startUpload();
- } else {
- for (var g = 0; g < d.length; g++) {
- e.queueData.uploadSize += e.queueData.files[d[g]].size;
- e.queueData.uploadQueue.push(d[g]);
- }
- e.startUpload(e.queueData.uploadQueue.shift());
- }
- } else {
- e.startUpload();
- }
- });
- }
- };
- var a = {
- onDialogOpen: function () {
- var d = this.settings;
- this.queueData.errorMsg = "Some files were not added to the queue:";
- this.queueData.filesReplaced = 0;
- this.queueData.filesCancelled = 0;
- if (d.onDialogOpen) {
- d.onDialogOpen.call(this);
- }
- },
- onDialogClose: function (d, f, g) {
- var e = this.settings;
- this.queueData.filesErrored = d - f;
- this.queueData.filesSelected = d;
- this.queueData.filesQueued = f - this.queueData.filesCancelled;
- this.queueData.queueLength = g;
- if (c.inArray("onDialogClose", e.overrideEvents) < 0) {
- if (this.queueData.filesErrored > 0) {
- alert(this.queueData.errorMsg);
- }
- }
- if (e.onDialogClose) {
- e.onDialogClose.call(this, this.queueData);
- }
- if (e.auto) {
- c("#" + e.id).uploadify("upload", "*");
- }
- },
- onSelect: function (g) {
- var h = this.settings;
- var e = {};
- for (var f in this.queueData.files) {
- e = this.queueData.files[f];
- if (e.uploaded != true && e.name == g.name) {
- var d = confirm('The file named "' + g.name + '" is already in the queue.\nDo you want to replace the existing item in the queue?');
- if (!d) {
- this.cancelUpload(g.id);
- this.queueData.filesCancelled++;
- return false;
- } else {
- c("#" + e.id).remove();
- this.cancelUpload(e.id);
- this.queueData.filesReplaced++;
- }
- }
- }
- var i = Math.round(g.size / 1024);
- var l = "KB";
- if (i > 1000) {
- i = Math.round(i / 1000);
- l = "MB";
- }
- var k = i.toString().split(".");
- i = k[0];
- if (k.length > 1) {
- i += "." + k[1].substr(0, 2);
- }
- i += l;
- var j = g.name;
- if (j.length > 25) {
- j = j.substr(0, 25) + "...";
- }
- if (c.inArray("onSelect", h.overrideEvents) < 0) {
- c("#" + h.queueID).append('');
- }
- this.queueData.queueSize += g.size;
- this.queueData.files[g.id] = g;
- if (h.onSelect) {
- h.onSelect.apply(this, arguments);
- }
- },
- onSelectError: function (d, g, f) {
- var e = this.settings;
- if (c.inArray("onSelectError", e.overrideEvents) < 0) {
- switch (g) {
- case SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED:
- if (e.queueSizeLimit > f) {
- this.queueData.errorMsg += "\nThe number of files selected exceeds the remaining upload limit (" + f + ").";
- } else {
- this.queueData.errorMsg += "\nThe number of files selected exceeds the queue size limit (" + e.queueSizeLimit + ").";
- }
- break;
- case SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT:
- this.queueData.errorMsg += '\nThe file "' + d.name + '" exceeds the size limit (' + e.fileSizeLimit + ").";
- break;
- case SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE:
- this.queueData.errorMsg += '\nThe file "' + d.name + '" is empty.';
- break;
- case SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT:
- this.queueData.errorMsg += '\nThe file "' + d.name + '" is not an accepted file type (' + e.fileTypeDesc + ").";
- break;
- }
- }
- if (g != SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED) {
- delete this.queueData.files[d.id];
- }
- if (e.onSelectError) {
- e.onSelectError.apply(this, arguments);
- }
- },
- onQueueComplete: function () {
- if (this.settings.onQueueComplete) {
- this.settings.onQueueComplete.call(this, this.settings.queueData);
- }
- },
- onUploadComplete: function (f) {
- var g = this.settings,
- d = this;
- var e = this.getStats();
- this.queueData.queueLength = e.files_queued;
- if (this.queueData.uploadQueue[0] == "*") {
- if (this.queueData.queueLength > 0) {
- this.startUpload();
- } else {
- this.queueData.uploadQueue = [];
- if (g.onQueueComplete) {
- g.onQueueComplete.call(this, this.queueData);
- }
- }
- } else {
- if (this.queueData.uploadQueue.length > 0) {
- this.startUpload(this.queueData.uploadQueue.shift());
- } else {
- this.queueData.uploadQueue = [];
- if (g.onQueueComplete) {
- g.onQueueComplete.call(this, this.queueData);
- }
- }
- }
- if (c.inArray("onUploadComplete", g.overrideEvents) < 0) {
- if (g.removeCompleted) {
- switch (f.filestatus) {
- case SWFUpload.FILE_STATUS.COMPLETE:
- setTimeout(function () {
- if (c("#" + f.id)) {
- d.queueData.queueSize -= f.size;
- d.queueData.queueLength -= 1;
- delete d.queueData.files[f.id];
- c("#" + f.id).fadeOut(500, function () {
- c(this).remove();
- });
- }
- }, g.removeTimeout * 1000);
- break;
- case SWFUpload.FILE_STATUS.ERROR:
- if (!g.requeueErrors) {
- setTimeout(function () {
- if (c("#" + f.id)) {
- d.queueData.queueSize -= f.size;
- d.queueData.queueLength -= 1;
- delete d.queueData.files[f.id];
- c("#" + f.id).fadeOut(500, function () {
- c(this).remove();
- });
- }
- }, g.removeTimeout * 1000);
- }
- break;
- }
- } else {
- f.uploaded = true;
- }
- }
- if (g.onUploadComplete) {
- g.onUploadComplete.call(this, f);
- }
- },
- onUploadError: function (e, i, h) {
- var f = this.settings;
- var g = "Error";
- switch (i) {
- case SWFUpload.UPLOAD_ERROR.HTTP_ERROR:
- g = "HTTP Error (" + h + ")";
- break;
- case SWFUpload.UPLOAD_ERROR.MISSING_UPLOAD_URL:
- g = "Missing Upload URL";
- break;
- case SWFUpload.UPLOAD_ERROR.IO_ERROR:
- g = "IO Error";
- break;
- case SWFUpload.UPLOAD_ERROR.SECURITY_ERROR:
- g = "Security Error";
- break;
- case SWFUpload.UPLOAD_ERROR.UPLOAD_LIMIT_EXCEEDED:
- alert("The upload limit has been reached (" + h + ").");
- g = "Exceeds Upload Limit";
- break;
- case SWFUpload.UPLOAD_ERROR.UPLOAD_FAILED:
- g = "Failed";
- break;
- case SWFUpload.UPLOAD_ERROR.SPECIFIED_FILE_ID_NOT_FOUND:
- break;
- case SWFUpload.UPLOAD_ERROR.FILE_VALIDATION_FAILED:
- g = "Validation Error";
- break;
- case SWFUpload.UPLOAD_ERROR.FILE_CANCELLED:
- g = "Cancelled";
- this.queueData.queueSize -= e.size;
- this.queueData.queueLength -= 1;
- if (e.status == SWFUpload.FILE_STATUS.IN_PROGRESS || c.inArray(e.id, this.queueData.uploadQueue) >= 0) {
- this.queueData.uploadSize -= e.size;
- }
- if (f.onCancel) {
- f.onCancel.call(this, e);
- }
- delete this.queueData.files[e.id];
- break;
- case SWFUpload.UPLOAD_ERROR.UPLOAD_STOPPED:
- g = "Stopped";
- break;
- }
- if (c.inArray("onUploadError", f.overrideEvents) < 0) {
- if (i != SWFUpload.UPLOAD_ERROR.FILE_CANCELLED && i != SWFUpload.UPLOAD_ERROR.UPLOAD_STOPPED) {
- c("#" + e.id).addClass("uploadify-error");
- }
- c("#" + e.id).find(".uploadify-progress-bar").css("width", "1px");
- if (i != SWFUpload.UPLOAD_ERROR.SPECIFIED_FILE_ID_NOT_FOUND && e.status != SWFUpload.FILE_STATUS.COMPLETE) {
- c("#" + e.id).find(".data").html(" - " + g);
- }
- }
- var d = this.getStats();
- this.queueData.uploadsErrored = d.upload_errors;
- if (f.onUploadError) {
- f.onUploadError.call(this, e, i, h, g);
- }
- },
- onUploadProgress: function (g, m, j) {
- var h = this.settings;
- var e = new Date();
- var n = e.getTime();
- var k = n - this.timer;
- if (k > 500) {
- this.timer = n;
- }
- var i = m - this.bytesLoaded;
- this.bytesLoaded = m;
- var d = this.queueData.queueBytesUploaded + m;
- var p = Math.round(m / j * 100);
- var o = "KB/s";
- var l = 0;
- var f = (i / 1024) / (k / 1000);
- f = Math.floor(f * 10) / 10;
- if (this.queueData.averageSpeed > 0) {
- this.queueData.averageSpeed = Math.floor((this.queueData.averageSpeed + f) / 2);
- } else {
- this.queueData.averageSpeed = Math.floor(f);
- }
- if (f > 1000) {
- l = (f * 0.001);
- this.queueData.averageSpeed = Math.floor(l);
- o = "MB/s";
- }
- if (c.inArray("onUploadProgress", h.overrideEvents) < 0) {
- if (h.progressData == "percentage") {
- c("#" + g.id).find(".data").html(" - " + p + "%");
- } else {
- if (h.progressData == "speed" && k > 500) {
- c("#" + g.id).find(".data").html(" - " + this.queueData.averageSpeed + o);
- }
- }
- c("#" + g.id).find(".uploadify-progress-bar").css("width", p + "%");
- }
- if (h.onUploadProgress) {
- h.onUploadProgress.call(this, g, m, j, d, this.queueData.uploadSize);
- }
- },
- onUploadStart: function (d) {
- var e = this.settings;
- var f = new Date();
- this.timer = f.getTime();
- this.bytesLoaded = 0;
- if (this.queueData.uploadQueue.length == 0) {
- this.queueData.uploadSize = d.size;
- }
- if (e.checkExisting) {
- c.ajax({
- type: "POST",
- async: false,
- url: e.checkExisting,
- data: {
- filename: d.name
- },
- success: function (h) {
- if (h == 1) {
- var g = confirm('A file with the name "' + d.name + '" already exists on the server.\nWould you like to replace the existing file?');
- if (!g) {
- this.cancelUpload(d.id);
- c("#" + d.id).remove();
- if (this.queueData.uploadQueue.length > 0 && this.queueData.queueLength > 0) {
- if (this.queueData.uploadQueue[0] == "*") {
- this.startUpload();
- } else {
- this.startUpload(this.queueData.uploadQueue.shift());
- }
- }
- }
- }
- }
- });
- }
- if (e.onUploadStart) {
- e.onUploadStart.call(this, d);
- }
- },
- onUploadSuccess: function (f, h, d) {
- var g = this.settings;
- var e = this.getStats();
- this.queueData.uploadsSuccessful = e.successful_uploads;
- this.queueData.queueBytesUploaded += f.size;
- if (c.inArray("onUploadSuccess", g.overrideEvents) < 0) {
- c("#" + f.id).find(".data").html(" - Complete");
- }
- if (g.onUploadSuccess) {
- g.onUploadSuccess.call(this, f, h, d);
- }
- }
- };
- c.fn.uploadify = function (d) {
- if (b[d]) {
- return b[d].apply(this, Array.prototype.slice.call(arguments, 1));
- } else {
- if (typeof d === "object" || !d) {
- return b.init.apply(this, arguments);
- } else {
- c.error("The method " + d + " does not exist in $.uploadify");
- }
- }
- };
+/*
+Uploadify v3.1.1
+Copyright (c) 2012 Reactive Apps, Ronnie Garcia
+Released under the MIT License
+
+SWFUpload: http://www.swfupload.org, http://swfupload.googlecode.com
+mmSWFUpload 1.0: Flash upload dialog - http://profandesign.se/swfupload/, http://www.vinterwebb.se/
+SWFUpload is (c) 2006-2007 Lars Huring, Olov Nilzén and Mammon Media and is released under the MIT License:
+http://www.opensource.org/licenses/mit-license.php
+SWFUpload 2 is (c) 2007-2008 Jake Roberts and is released under the MIT License:
+http://www.opensource.org/licenses/mit-license.php
+
+SWFObject v2.2
+is released under the MIT License
+*/
+;
+var swfobject = function () {
+ var aq = "undefined",
+ aD = "object",
+ ab = "Shockwave Flash",
+ X = "ShockwaveFlash.ShockwaveFlash",
+ aE = "application/x-shockwave-flash",
+ ac = "SWFObjectExprInst",
+ ax = "onreadystatechange",
+ af = window,
+ aL = document,
+ aB = navigator,
+ aa = false,
+ Z = [aN],
+ aG = [],
+ ag = [],
+ al = [],
+ aJ, ad, ap, at, ak = false,
+ aU = false,
+ aH, an, aI = true,
+ ah = function () {
+ var a = typeof aL.getElementById != aq && typeof aL.getElementsByTagName != aq && typeof aL.createElement != aq,
+ e = aB.userAgent.toLowerCase(),
+ c = aB.platform.toLowerCase(),
+ h = c ? /win/.test(c) : /win/.test(e),
+ j = c ? /mac/.test(c) : /mac/.test(e),
+ g = /webkit/.test(e) ? parseFloat(e.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false,
+ d = !+"\v1",
+ f = [0, 0, 0],
+ k = null;
+ if (typeof aB.plugins != aq && typeof aB.plugins[ab] == aD) {
+ k = aB.plugins[ab].description;
+ if (k && !(typeof aB.mimeTypes != aq && aB.mimeTypes[aE] && !aB.mimeTypes[aE].enabledPlugin)) {
+ aa = true;
+ d = false;
+ k = k.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
+ f[0] = parseInt(k.replace(/^(.*)\..*$/, "$1"), 10);
+ f[1] = parseInt(k.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
+ f[2] = /[a-zA-Z]/.test(k) ? parseInt(k.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0;
+ }
+ } else {
+ if (typeof af.ActiveXObject != aq) {
+ try {
+ var i = new ActiveXObject(X);
+ if (i) {
+ k = i.GetVariable("$version");
+ if (k) {
+ d = true;
+ k = k.split(" ")[1].split(",");
+ f = [parseInt(k[0], 10), parseInt(k[1], 10), parseInt(k[2], 10)];
+ }
+ }
+ } catch (b) {}
+ }
+ }
+ return {
+ w3: a,
+ pv: f,
+ wk: g,
+ ie: d,
+ win: h,
+ mac: j
+ };
+ }(),
+ aK = function () {
+ if (!ah.w3) {
+ return;
+ }
+ if ((typeof aL.readyState != aq && aL.readyState == "complete") || (typeof aL.readyState == aq && (aL.getElementsByTagName("body")[0] || aL.body))) {
+ aP();
+ }
+ if (!ak) {
+ if (typeof aL.addEventListener != aq) {
+ aL.addEventListener("DOMContentLoaded", aP, false);
+ }
+ if (ah.ie && ah.win) {
+ aL.attachEvent(ax, function () {
+ if (aL.readyState == "complete") {
+ aL.detachEvent(ax, arguments.callee);
+ aP();
+ }
+ });
+ if (af == top) {
+ (function () {
+ if (ak) {
+ return;
+ }
+ try {
+ aL.documentElement.doScroll("left");
+ } catch (a) {
+ setTimeout(arguments.callee, 0);
+ return;
+ }
+ aP();
+ })();
+ }
+ }
+ if (ah.wk) {
+ (function () {
+ if (ak) {
+ return;
+ }
+ if (!/loaded|complete/.test(aL.readyState)) {
+ setTimeout(arguments.callee, 0);
+ return;
+ }
+ aP();
+ })();
+ }
+ aC(aP);
+ }
+ }();
+
+ function aP() {
+ if (ak) {
+ return;
+ }
+ try {
+ var b = aL.getElementsByTagName("body")[0].appendChild(ar("span"));
+ b.parentNode.removeChild(b);
+ } catch (a) {
+ return;
+ }
+ ak = true;
+ var d = Z.length;
+ for (var c = 0; c < d; c++) {
+ Z[c]();
+ }
+ }
+ function aj(a) {
+ if (ak) {
+ a();
+ } else {
+ Z[Z.length] = a;
+ }
+ }
+ function aC(a) {
+ if (typeof af.addEventListener != aq) {
+ af.addEventListener("load", a, false);
+ } else {
+ if (typeof aL.addEventListener != aq) {
+ aL.addEventListener("load", a, false);
+ } else {
+ if (typeof af.attachEvent != aq) {
+ aM(af, "onload", a);
+ } else {
+ if (typeof af.onload == "function") {
+ var b = af.onload;
+ af.onload = function () {
+ b();
+ a();
+ };
+ } else {
+ af.onload = a;
+ }
+ }
+ }
+ }
+ }
+ function aN() {
+ if (aa) {
+ Y();
+ } else {
+ am();
+ }
+ }
+ function Y() {
+ var d = aL.getElementsByTagName("body")[0];
+ var b = ar(aD);
+ b.setAttribute("type", aE);
+ var a = d.appendChild(b);
+ if (a) {
+ var c = 0;
+ (function () {
+ if (typeof a.GetVariable != aq) {
+ var e = a.GetVariable("$version");
+ if (e) {
+ e = e.split(" ")[1].split(",");
+ ah.pv = [parseInt(e[0], 10), parseInt(e[1], 10), parseInt(e[2], 10)];
+ }
+ } else {
+ if (c < 10) {
+ c++;
+ setTimeout(arguments.callee, 10);
+ return;
+ }
+ }
+ d.removeChild(b);
+ a = null;
+ am();
+ })();
+ } else {
+ am();
+ }
+ }
+ function am() {
+ var g = aG.length;
+ if (g > 0) {
+ for (var h = 0; h < g; h++) {
+ var c = aG[h].id;
+ var l = aG[h].callbackFn;
+ var a = {
+ success: false,
+ id: c
+ };
+ if (ah.pv[0] > 0) {
+ var i = aS(c);
+ if (i) {
+ if (ao(aG[h].swfVersion) && !(ah.wk && ah.wk < 312)) {
+ ay(c, true);
+ if (l) {
+ a.success = true;
+ a.ref = av(c);
+ l(a);
+ }
+ } else {
+ if (aG[h].expressInstall && au()) {
+ var e = {};
+ e.data = aG[h].expressInstall;
+ e.width = i.getAttribute("width") || "0";
+ e.height = i.getAttribute("height") || "0";
+ if (i.getAttribute("class")) {
+ e.styleclass = i.getAttribute("class");
+ }
+ if (i.getAttribute("align")) {
+ e.align = i.getAttribute("align");
+ }
+ var f = {};
+ var d = i.getElementsByTagName("param");
+ var k = d.length;
+ for (var j = 0; j < k; j++) {
+ if (d[j].getAttribute("name").toLowerCase() != "movie") {
+ f[d[j].getAttribute("name")] = d[j].getAttribute("value");
+ }
+ }
+ ae(e, f, c, l);
+ } else {
+ aF(i);
+ if (l) {
+ l(a);
+ }
+ }
+ }
+ }
+ } else {
+ ay(c, true);
+ if (l) {
+ var b = av(c);
+ if (b && typeof b.SetVariable != aq) {
+ a.success = true;
+ a.ref = b;
+ }
+ l(a);
+ }
+ }
+ }
+ }
+ }
+ function av(b) {
+ var d = null;
+ var c = aS(b);
+ if (c && c.nodeName == "OBJECT") {
+ if (typeof c.SetVariable != aq) {
+ d = c;
+ } else {
+ var a = c.getElementsByTagName(aD)[0];
+ if (a) {
+ d = a;
+ }
+ }
+ }
+ return d;
+ }
+ function au() {
+ return !aU && ao("6.0.65") && (ah.win || ah.mac) && !(ah.wk && ah.wk < 312);
+ }
+ function ae(f, d, h, e) {
+ aU = true;
+ ap = e || null;
+ at = {
+ success: false,
+ id: h
+ };
+ var a = aS(h);
+ if (a) {
+ if (a.nodeName == "OBJECT") {
+ aJ = aO(a);
+ ad = null;
+ } else {
+ aJ = a;
+ ad = h;
+ }
+ f.id = ac;
+ if (typeof f.width == aq || (!/%$/.test(f.width) && parseInt(f.width, 10) < 310)) {
+ f.width = "310";
+ }
+ if (typeof f.height == aq || (!/%$/.test(f.height) && parseInt(f.height, 10) < 137)) {
+ f.height = "137";
+ }
+ aL.title = aL.title.slice(0, 47) + " - Flash Player Installation";
+ var b = ah.ie && ah.win ? "ActiveX" : "PlugIn",
+ c = "MMredirectURL=" + af.location.toString().replace(/&/g, "%26") + "&MMplayerType=" + b + "&MMdoctitle=" + aL.title;
+ if (typeof d.flashvars != aq) {
+ d.flashvars += "&" + c;
+ } else {
+ d.flashvars = c;
+ }
+ if (ah.ie && ah.win && a.readyState != 4) {
+ var g = ar("div");
+ h += "SWFObjectNew";
+ g.setAttribute("id", h);
+ a.parentNode.insertBefore(g, a);
+ a.style.display = "none";
+ (function () {
+ if (a.readyState == 4) {
+ a.parentNode.removeChild(a);
+ } else {
+ setTimeout(arguments.callee, 10);
+ }
+ })();
+ }
+ aA(f, d, h);
+ }
+ }
+ function aF(a) {
+ if (ah.ie && ah.win && a.readyState != 4) {
+ var b = ar("div");
+ a.parentNode.insertBefore(b, a);
+ b.parentNode.replaceChild(aO(a), b);
+ a.style.display = "none";
+ (function () {
+ if (a.readyState == 4) {
+ a.parentNode.removeChild(a);
+ } else {
+ setTimeout(arguments.callee, 10);
+ }
+ })();
+ } else {
+ a.parentNode.replaceChild(aO(a), a);
+ }
+ }
+ function aO(b) {
+ var d = ar("div");
+ if (ah.win && ah.ie) {
+ d.innerHTML = b.innerHTML;
+ } else {
+ var e = b.getElementsByTagName(aD)[0];
+ if (e) {
+ var a = e.childNodes;
+ if (a) {
+ var f = a.length;
+ for (var c = 0; c < f; c++) {
+ if (!(a[c].nodeType == 1 && a[c].nodeName == "PARAM") && !(a[c].nodeType == 8)) {
+ d.appendChild(a[c].cloneNode(true));
+ }
+ }
+ }
+ }
+ }
+ return d;
+ }
+ function aA(e, g, c) {
+ var d, a = aS(c);
+ if (ah.wk && ah.wk < 312) {
+ return d;
+ }
+ if (a) {
+ if (typeof e.id == aq) {
+ e.id = c;
+ }
+ if (ah.ie && ah.win) {
+ var f = "";
+ for (var i in e) {
+ if (e[i] != Object.prototype[i]) {
+ if (i.toLowerCase() == "data") {
+ g.movie = e[i];
+ } else {
+ if (i.toLowerCase() == "styleclass") {
+ f += ' class="' + e[i] + '"';
+ } else {
+ if (i.toLowerCase() != "classid") {
+ f += " " + i + '="' + e[i] + '"';
+ }
+ }
+ }
+ }
+ }
+ var h = "";
+ for (var j in g) {
+ if (g[j] != Object.prototype[j]) {
+ h += '';
+ }
+ }
+ a.outerHTML = '";
+ ag[ag.length] = e.id;
+ d = aS(e.id);
+ } else {
+ var b = ar(aD);
+ b.setAttribute("type", aE);
+ for (var k in e) {
+ if (e[k] != Object.prototype[k]) {
+ if (k.toLowerCase() == "styleclass") {
+ b.setAttribute("class", e[k]);
+ } else {
+ if (k.toLowerCase() != "classid") {
+ b.setAttribute(k, e[k]);
+ }
+ }
+ }
+ }
+ for (var l in g) {
+ if (g[l] != Object.prototype[l] && l.toLowerCase() != "movie") {
+ aQ(b, l, g[l]);
+ }
+ }
+ a.parentNode.replaceChild(b, a);
+ d = b;
+ }
+ }
+ return d;
+ }
+ function aQ(b, d, c) {
+ var a = ar("param");
+ a.setAttribute("name", d);
+ a.setAttribute("value", c);
+ b.appendChild(a);
+ }
+ function aw(a) {
+ var b = aS(a);
+ if (b && b.nodeName == "OBJECT") {
+ if (ah.ie && ah.win) {
+ b.style.display = "none";
+ (function () {
+ if (b.readyState == 4) {
+ aT(a);
+ } else {
+ setTimeout(arguments.callee, 10);
+ }
+ })();
+ } else {
+ b.parentNode.removeChild(b);
+ }
+ }
+ }
+ function aT(a) {
+ var b = aS(a);
+ if (b) {
+ for (var c in b) {
+ if (typeof b[c] == "function") {
+ b[c] = null;
+ }
+ }
+ b.parentNode.removeChild(b);
+ }
+ }
+ function aS(a) {
+ var c = null;
+ try {
+ c = aL.getElementById(a);
+ } catch (b) {}
+ return c;
+ }
+ function ar(a) {
+ return aL.createElement(a);
+ }
+ function aM(a, c, b) {
+ a.attachEvent(c, b);
+ al[al.length] = [a, c, b];
+ }
+ function ao(a) {
+ var b = ah.pv,
+ c = a.split(".");
+ c[0] = parseInt(c[0], 10);
+ c[1] = parseInt(c[1], 10) || 0;
+ c[2] = parseInt(c[2], 10) || 0;
+ return (b[0] > c[0] || (b[0] == c[0] && b[1] > c[1]) || (b[0] == c[0] && b[1] == c[1] && b[2] >= c[2])) ? true : false;
+ }
+ function az(b, f, a, c) {
+ if (ah.ie && ah.mac) {
+ return;
+ }
+ var e = aL.getElementsByTagName("head")[0];
+ if (!e) {
+ return;
+ }
+ var g = (a && typeof a == "string") ? a : "screen";
+ if (c) {
+ aH = null;
+ an = null;
+ }
+ if (!aH || an != g) {
+ var d = ar("style");
+ d.setAttribute("type", "text/css");
+ d.setAttribute("media", g);
+ aH = e.appendChild(d);
+ if (ah.ie && ah.win && typeof aL.styleSheets != aq && aL.styleSheets.length > 0) {
+ aH = aL.styleSheets[aL.styleSheets.length - 1];
+ }
+ an = g;
+ }
+ if (ah.ie && ah.win) {
+ if (aH && typeof aH.addRule == aD) {
+ aH.addRule(b, f);
+ }
+ } else {
+ if (aH && typeof aL.createTextNode != aq) {
+ aH.appendChild(aL.createTextNode(b + " {" + f + "}"));
+ }
+ }
+ }
+ function ay(a, c) {
+ if (!aI) {
+ return;
+ }
+ var b = c ? "visible" : "hidden";
+ if (ak && aS(a)) {
+ aS(a).style.visibility = b;
+ } else {
+ az("#" + a, "visibility:" + b);
+ }
+ }
+ function ai(b) {
+ var a = /[\\\"<>\.;]/;
+ var c = a.exec(b) != null;
+ return c && typeof encodeURIComponent != aq ? encodeURIComponent(b) : b;
+ }
+ var aR = function () {
+ if (ah.ie && ah.win) {
+ window.attachEvent("onunload", function () {
+ var a = al.length;
+ for (var b = 0; b < a; b++) {
+ al[b][0].detachEvent(al[b][1], al[b][2]);
+ }
+ var d = ag.length;
+ for (var c = 0; c < d; c++) {
+ aw(ag[c]);
+ }
+ for (var e in ah) {
+ ah[e] = null;
+ }
+ ah = null;
+ for (var f in swfobject) {
+ swfobject[f] = null;
+ }
+ swfobject = null;
+ });
+ }
+ }();
+ return {
+ registerObject: function (a, e, c, b) {
+ if (ah.w3 && a && e) {
+ var d = {};
+ d.id = a;
+ d.swfVersion = e;
+ d.expressInstall = c;
+ d.callbackFn = b;
+ aG[aG.length] = d;
+ ay(a, false);
+ } else {
+ if (b) {
+ b({
+ success: false,
+ id: a
+ });
+ }
+ }
+ },
+ getObjectById: function (a) {
+ if (ah.w3) {
+ return av(a);
+ }
+ },
+ embedSWF: function (k, e, h, f, c, a, b, i, g, j) {
+ var d = {
+ success: false,
+ id: e
+ };
+ if (ah.w3 && !(ah.wk && ah.wk < 312) && k && e && h && f && c) {
+ ay(e, false);
+ aj(function () {
+ h += "";
+ f += "";
+ var q = {};
+ if (g && typeof g === aD) {
+ for (var o in g) {
+ q[o] = g[o];
+ }
+ }
+ q.data = k;
+ q.width = h;
+ q.height = f;
+ var n = {};
+ if (i && typeof i === aD) {
+ for (var p in i) {
+ n[p] = i[p];
+ }
+ }
+ if (b && typeof b === aD) {
+ for (var l in b) {
+ if (typeof n.flashvars != aq) {
+ n.flashvars += "&" + l + "=" + b[l];
+ } else {
+ n.flashvars = l + "=" + b[l];
+ }
+ }
+ }
+ if (ao(c)) {
+ var m = aA(q, n, e);
+ if (q.id == e) {
+ ay(e, true);
+ }
+ d.success = true;
+ d.ref = m;
+ } else {
+ if (a && au()) {
+ q.data = a;
+ ae(q, n, e, j);
+ return;
+ } else {
+ ay(e, true);
+ }
+ }
+ if (j) {
+ j(d);
+ }
+ });
+ } else {
+ if (j) {
+ j(d);
+ }
+ }
+ },
+ switchOffAutoHideShow: function () {
+ aI = false;
+ },
+ ua: ah,
+ getFlashPlayerVersion: function () {
+ return {
+ major: ah.pv[0],
+ minor: ah.pv[1],
+ release: ah.pv[2]
+ };
+ },
+ hasFlashPlayerVersion: ao,
+ createSWF: function (a, b, c) {
+ if (ah.w3) {
+ return aA(a, b, c);
+ } else {
+ return undefined;
+ }
+ },
+ showExpressInstall: function (b, a, d, c) {
+ if (ah.w3 && au()) {
+ ae(b, a, d, c);
+ }
+ },
+ removeSWF: function (a) {
+ if (ah.w3) {
+ aw(a);
+ }
+ },
+ createCSS: function (b, a, c, d) {
+ if (ah.w3) {
+ az(b, a, c, d);
+ }
+ },
+ addDomLoadEvent: aj,
+ addLoadEvent: aC,
+ getQueryParamValue: function (b) {
+ var a = aL.location.search || aL.location.hash;
+ if (a) {
+ if (/\?/.test(a)) {
+ a = a.split("?")[1];
+ }
+ if (b == null) {
+ return ai(a);
+ }
+ var c = a.split("&");
+ for (var d = 0; d < c.length; d++) {
+ if (c[d].substring(0, c[d].indexOf("=")) == b) {
+ return ai(c[d].substring((c[d].indexOf("=") + 1)));
+ }
+ }
+ }
+ return "";
+ },
+ expressInstallCallback: function () {
+ if (aU) {
+ var a = aS(ac);
+ if (a && aJ) {
+ a.parentNode.replaceChild(aJ, a);
+ if (ad) {
+ ay(ad, true);
+ if (ah.ie && ah.win) {
+ aJ.style.display = "block";
+ }
+ }
+ if (ap) {
+ ap(at);
+ }
+ }
+ aU = false;
+ }
+ }
+ };
+}();
+var SWFUpload;
+if (SWFUpload == undefined) {
+ SWFUpload = function (b) {
+ this.initSWFUpload(b);
+ };
+}
+SWFUpload.prototype.initSWFUpload = function (c) {
+ try {
+ this.customSettings = {};
+ this.settings = c;
+ this.eventQueue = [];
+ this.movieName = "SWFUpload_" + SWFUpload.movieCount++;
+ this.movieElement = null;
+ SWFUpload.instances[this.movieName] = this;
+ this.initSettings();
+ this.loadFlash();
+ this.displayDebugInfo();
+ } catch (d) {
+ delete SWFUpload.instances[this.movieName];
+ throw d;
+ }
+};
+SWFUpload.instances = {};
+SWFUpload.movieCount = 0;
+SWFUpload.version = "2.2.0 2009-03-25";
+SWFUpload.QUEUE_ERROR = {
+ QUEUE_LIMIT_EXCEEDED: -100,
+ FILE_EXCEEDS_SIZE_LIMIT: -110,
+ ZERO_BYTE_FILE: -120,
+ INVALID_FILETYPE: -130
+};
+SWFUpload.UPLOAD_ERROR = {
+ HTTP_ERROR: -200,
+ MISSING_UPLOAD_URL: -210,
+ IO_ERROR: -220,
+ SECURITY_ERROR: -230,
+ UPLOAD_LIMIT_EXCEEDED: -240,
+ UPLOAD_FAILED: -250,
+ SPECIFIED_FILE_ID_NOT_FOUND: -260,
+ FILE_VALIDATION_FAILED: -270,
+ FILE_CANCELLED: -280,
+ UPLOAD_STOPPED: -290
+};
+SWFUpload.FILE_STATUS = {
+ QUEUED: -1,
+ IN_PROGRESS: -2,
+ ERROR: -3,
+ COMPLETE: -4,
+ CANCELLED: -5
+};
+SWFUpload.BUTTON_ACTION = {
+ SELECT_FILE: -100,
+ SELECT_FILES: -110,
+ START_UPLOAD: -120
+};
+SWFUpload.CURSOR = {
+ ARROW: -1,
+ HAND: -2
+};
+SWFUpload.WINDOW_MODE = {
+ WINDOW: "window",
+ TRANSPARENT: "transparent",
+ OPAQUE: "opaque"
+};
+SWFUpload.completeURL = function (e) {
+ if (typeof(e) !== "string" || e.match(/^https?:\/\//i) || e.match(/^\//)) {
+ return e;
+ }
+ var f = window.location.protocol + "//" + window.location.hostname + (window.location.port ? ":" + window.location.port : "");
+ var d = window.location.pathname.lastIndexOf("/");
+ if (d <= 0) {
+ path = "/";
+ } else {
+ path = window.location.pathname.substr(0, d) + "/";
+ }
+ return path + e;
+};
+SWFUpload.prototype.initSettings = function () {
+ this.ensureDefault = function (c, d) {
+ this.settings[c] = (this.settings[c] == undefined) ? d : this.settings[c];
+ };
+ this.ensureDefault("upload_url", "");
+ this.ensureDefault("preserve_relative_urls", false);
+ this.ensureDefault("file_post_name", "Filedata");
+ this.ensureDefault("post_params", {});
+ this.ensureDefault("use_query_string", false);
+ this.ensureDefault("requeue_on_error", false);
+ this.ensureDefault("http_success", []);
+ this.ensureDefault("assume_success_timeout", 0);
+ this.ensureDefault("file_types", "*.*");
+ this.ensureDefault("file_types_description", "All Files");
+ this.ensureDefault("file_size_limit", 0);
+ this.ensureDefault("file_upload_limit", 0);
+ this.ensureDefault("file_queue_limit", 0);
+ this.ensureDefault("flash_url", "swfupload.swf");
+ this.ensureDefault("prevent_swf_caching", true);
+ this.ensureDefault("button_image_url", "");
+ this.ensureDefault("button_width", 1);
+ this.ensureDefault("button_height", 1);
+ this.ensureDefault("button_text", "");
+ this.ensureDefault("button_text_style", "color: #000000; font-size: 16pt;");
+ this.ensureDefault("button_text_top_padding", 0);
+ this.ensureDefault("button_text_left_padding", 0);
+ this.ensureDefault("button_action", SWFUpload.BUTTON_ACTION.SELECT_FILES);
+ this.ensureDefault("button_disabled", false);
+ this.ensureDefault("button_placeholder_id", "");
+ this.ensureDefault("button_placeholder", null);
+ this.ensureDefault("button_cursor", SWFUpload.CURSOR.ARROW);
+ this.ensureDefault("button_window_mode", SWFUpload.WINDOW_MODE.WINDOW);
+ this.ensureDefault("debug", false);
+ this.settings.debug_enabled = this.settings.debug;
+ this.settings.return_upload_start_handler = this.returnUploadStart;
+ this.ensureDefault("swfupload_loaded_handler", null);
+ this.ensureDefault("file_dialog_start_handler", null);
+ this.ensureDefault("file_queued_handler", null);
+ this.ensureDefault("file_queue_error_handler", null);
+ this.ensureDefault("file_dialog_complete_handler", null);
+ this.ensureDefault("upload_start_handler", null);
+ this.ensureDefault("upload_progress_handler", null);
+ this.ensureDefault("upload_error_handler", null);
+ this.ensureDefault("upload_success_handler", null);
+ this.ensureDefault("upload_complete_handler", null);
+ this.ensureDefault("debug_handler", this.debugMessage);
+ this.ensureDefault("custom_settings", {});
+ this.customSettings = this.settings.custom_settings;
+ if ( !! this.settings.prevent_swf_caching) {
+ this.settings.flash_url = this.settings.flash_url + (this.settings.flash_url.indexOf("?") < 0 ? "?" : "&") + "preventswfcaching=" + new Date().getTime();
+ }
+ if (!this.settings.preserve_relative_urls) {
+ this.settings.upload_url = SWFUpload.completeURL(this.settings.upload_url);
+ this.settings.button_image_url = SWFUpload.completeURL(this.settings.button_image_url);
+ }
+ delete this.ensureDefault;
+};
+SWFUpload.prototype.loadFlash = function () {
+ var d, c;
+ if (document.getElementById(this.movieName) !== null) {
+ throw "ID " + this.movieName + " is already in use. The Flash Object could not be added";
+ }
+ d = document.getElementById(this.settings.button_placeholder_id) || this.settings.button_placeholder;
+ if (d == undefined) {
+ throw "Could not find the placeholder element: " + this.settings.button_placeholder_id;
+ }
+ c = document.createElement("div");
+ c.innerHTML = this.getFlashHTML();
+ d.parentNode.replaceChild(c.firstChild, d);
+ if (window[this.movieName] == undefined) {
+ window[this.movieName] = this.getMovieElement();
+ }
+};
+SWFUpload.prototype.getFlashHTML = function () {
+ return ['"].join("");
+};
+SWFUpload.prototype.getFlashVars = function () {
+ var c = this.buildParamString();
+ var d = this.settings.http_success.join(",");
+ return ["movieName=", encodeURIComponent(this.movieName), "&uploadURL=", encodeURIComponent(this.settings.upload_url), "&useQueryString=", encodeURIComponent(this.settings.use_query_string), "&requeueOnError=", encodeURIComponent(this.settings.requeue_on_error), "&httpSuccess=", encodeURIComponent(d), "&assumeSuccessTimeout=", encodeURIComponent(this.settings.assume_success_timeout), "¶ms=", encodeURIComponent(c), "&filePostName=", encodeURIComponent(this.settings.file_post_name), "&fileTypes=", encodeURIComponent(this.settings.file_types), "&fileTypesDescription=", encodeURIComponent(this.settings.file_types_description), "&fileSizeLimit=", encodeURIComponent(this.settings.file_size_limit), "&fileUploadLimit=", encodeURIComponent(this.settings.file_upload_limit), "&fileQueueLimit=", encodeURIComponent(this.settings.file_queue_limit), "&debugEnabled=", encodeURIComponent(this.settings.debug_enabled), "&buttonImageURL=", encodeURIComponent(this.settings.button_image_url), "&buttonWidth=", encodeURIComponent(this.settings.button_width), "&buttonHeight=", encodeURIComponent(this.settings.button_height), "&buttonText=", encodeURIComponent(this.settings.button_text), "&buttonTextTopPadding=", encodeURIComponent(this.settings.button_text_top_padding), "&buttonTextLeftPadding=", encodeURIComponent(this.settings.button_text_left_padding), "&buttonTextStyle=", encodeURIComponent(this.settings.button_text_style), "&buttonAction=", encodeURIComponent(this.settings.button_action), "&buttonDisabled=", encodeURIComponent(this.settings.button_disabled), "&buttonCursor=", encodeURIComponent(this.settings.button_cursor)].join("");
+};
+SWFUpload.prototype.getMovieElement = function () {
+ if (this.movieElement == undefined) {
+ this.movieElement = document.getElementById(this.movieName);
+ }
+ if (this.movieElement === null) {
+ throw "Could not find Flash element";
+ }
+ return this.movieElement;
+};
+SWFUpload.prototype.buildParamString = function () {
+ var f = this.settings.post_params;
+ var d = [];
+ if (typeof(f) === "object") {
+ for (var e in f) {
+ if (f.hasOwnProperty(e)) {
+ d.push(encodeURIComponent(e.toString()) + "=" + encodeURIComponent(f[e].toString()));
+ }
+ }
+ }
+ return d.join("&");
+};
+SWFUpload.prototype.destroy = function () {
+ try {
+ this.cancelUpload(null, false);
+ var g = null;
+ g = this.getMovieElement();
+ if (g && typeof(g.CallFunction) === "unknown") {
+ for (var j in g) {
+ try {
+ if (typeof(g[j]) === "function") {
+ g[j] = null;
+ }
+ } catch (h) {}
+ }
+ try {
+ g.parentNode.removeChild(g);
+ } catch (f) {}
+ }
+ window[this.movieName] = null;
+ SWFUpload.instances[this.movieName] = null;
+ delete SWFUpload.instances[this.movieName];
+ this.movieElement = null;
+ this.settings = null;
+ this.customSettings = null;
+ this.eventQueue = null;
+ this.movieName = null;
+ return true;
+ } catch (i) {
+ return false;
+ }
+};
+SWFUpload.prototype.displayDebugInfo = function () {
+ this.debug(["---SWFUpload Instance Info---\n", "Version: ", SWFUpload.version, "\n", "Movie Name: ", this.movieName, "\n", "Settings:\n", "\t", "upload_url: ", this.settings.upload_url, "\n", "\t", "flash_url: ", this.settings.flash_url, "\n", "\t", "use_query_string: ", this.settings.use_query_string.toString(), "\n", "\t", "requeue_on_error: ", this.settings.requeue_on_error.toString(), "\n", "\t", "http_success: ", this.settings.http_success.join(", "), "\n", "\t", "assume_success_timeout: ", this.settings.assume_success_timeout, "\n", "\t", "file_post_name: ", this.settings.file_post_name, "\n", "\t", "post_params: ", this.settings.post_params.toString(), "\n", "\t", "file_types: ", this.settings.file_types, "\n", "\t", "file_types_description: ", this.settings.file_types_description, "\n", "\t", "file_size_limit: ", this.settings.file_size_limit, "\n", "\t", "file_upload_limit: ", this.settings.file_upload_limit, "\n", "\t", "file_queue_limit: ", this.settings.file_queue_limit, "\n", "\t", "debug: ", this.settings.debug.toString(), "\n", "\t", "prevent_swf_caching: ", this.settings.prevent_swf_caching.toString(), "\n", "\t", "button_placeholder_id: ", this.settings.button_placeholder_id.toString(), "\n", "\t", "button_placeholder: ", (this.settings.button_placeholder ? "Set" : "Not Set"), "\n", "\t", "button_image_url: ", this.settings.button_image_url.toString(), "\n", "\t", "button_width: ", this.settings.button_width.toString(), "\n", "\t", "button_height: ", this.settings.button_height.toString(), "\n", "\t", "button_text: ", this.settings.button_text.toString(), "\n", "\t", "button_text_style: ", this.settings.button_text_style.toString(), "\n", "\t", "button_text_top_padding: ", this.settings.button_text_top_padding.toString(), "\n", "\t", "button_text_left_padding: ", this.settings.button_text_left_padding.toString(), "\n", "\t", "button_action: ", this.settings.button_action.toString(), "\n", "\t", "button_disabled: ", this.settings.button_disabled.toString(), "\n", "\t", "custom_settings: ", this.settings.custom_settings.toString(), "\n", "Event Handlers:\n", "\t", "swfupload_loaded_handler assigned: ", (typeof this.settings.swfupload_loaded_handler === "function").toString(), "\n", "\t", "file_dialog_start_handler assigned: ", (typeof this.settings.file_dialog_start_handler === "function").toString(), "\n", "\t", "file_queued_handler assigned: ", (typeof this.settings.file_queued_handler === "function").toString(), "\n", "\t", "file_queue_error_handler assigned: ", (typeof this.settings.file_queue_error_handler === "function").toString(), "\n", "\t", "upload_start_handler assigned: ", (typeof this.settings.upload_start_handler === "function").toString(), "\n", "\t", "upload_progress_handler assigned: ", (typeof this.settings.upload_progress_handler === "function").toString(), "\n", "\t", "upload_error_handler assigned: ", (typeof this.settings.upload_error_handler === "function").toString(), "\n", "\t", "upload_success_handler assigned: ", (typeof this.settings.upload_success_handler === "function").toString(), "\n", "\t", "upload_complete_handler assigned: ", (typeof this.settings.upload_complete_handler === "function").toString(), "\n", "\t", "debug_handler assigned: ", (typeof this.settings.debug_handler === "function").toString(), "\n"].join(""));
+};
+SWFUpload.prototype.addSetting = function (d, f, e) {
+ if (f == undefined) {
+ return (this.settings[d] = e);
+ } else {
+ return (this.settings[d] = f);
+ }
+};
+SWFUpload.prototype.getSetting = function (b) {
+ if (this.settings[b] != undefined) {
+ return this.settings[b];
+ }
+ return "";
+};
+SWFUpload.prototype.callFlash = function (functionName, argumentArray) {
+ argumentArray = argumentArray || [];
+ var movieElement = this.getMovieElement();
+ var returnValue, returnString;
+ try {
+ returnString = movieElement.CallFunction('' + __flash__argumentsToXML(argumentArray, 0) + "");
+ returnValue = eval(returnString);
+ } catch (ex) {
+ throw "Call to " + functionName + " failed";
+ }
+ if (returnValue != undefined && typeof returnValue.post === "object") {
+ returnValue = this.unescapeFilePostParams(returnValue);
+ }
+ return returnValue;
+};
+SWFUpload.prototype.selectFile = function () {
+ this.callFlash("SelectFile");
+};
+SWFUpload.prototype.selectFiles = function () {
+ this.callFlash("SelectFiles");
+};
+SWFUpload.prototype.startUpload = function (b) {
+ this.callFlash("StartUpload", [b]);
+};
+SWFUpload.prototype.cancelUpload = function (d, c) {
+ if (c !== false) {
+ c = true;
+ }
+ this.callFlash("CancelUpload", [d, c]);
+};
+SWFUpload.prototype.stopUpload = function () {
+ this.callFlash("StopUpload");
+};
+SWFUpload.prototype.getStats = function () {
+ return this.callFlash("GetStats");
+};
+SWFUpload.prototype.setStats = function (b) {
+ this.callFlash("SetStats", [b]);
+};
+SWFUpload.prototype.getFile = function (b) {
+ if (typeof(b) === "number") {
+ return this.callFlash("GetFileByIndex", [b]);
+ } else {
+ return this.callFlash("GetFile", [b]);
+ }
+};
+SWFUpload.prototype.addFileParam = function (e, d, f) {
+ return this.callFlash("AddFileParam", [e, d, f]);
+};
+SWFUpload.prototype.removeFileParam = function (d, c) {
+ this.callFlash("RemoveFileParam", [d, c]);
+};
+SWFUpload.prototype.setUploadURL = function (b) {
+ this.settings.upload_url = b.toString();
+ this.callFlash("SetUploadURL", [b]);
+};
+SWFUpload.prototype.setPostParams = function (b) {
+ this.settings.post_params = b;
+ this.callFlash("SetPostParams", [b]);
+};
+SWFUpload.prototype.addPostParam = function (d, c) {
+ this.settings.post_params[d] = c;
+ this.callFlash("SetPostParams", [this.settings.post_params]);
+};
+SWFUpload.prototype.removePostParam = function (b) {
+ delete this.settings.post_params[b];
+ this.callFlash("SetPostParams", [this.settings.post_params]);
+};
+SWFUpload.prototype.setFileTypes = function (d, c) {
+ this.settings.file_types = d;
+ this.settings.file_types_description = c;
+ this.callFlash("SetFileTypes", [d, c]);
+};
+SWFUpload.prototype.setFileSizeLimit = function (b) {
+ this.settings.file_size_limit = b;
+ this.callFlash("SetFileSizeLimit", [b]);
+};
+SWFUpload.prototype.setFileUploadLimit = function (b) {
+ this.settings.file_upload_limit = b;
+ this.callFlash("SetFileUploadLimit", [b]);
+};
+SWFUpload.prototype.setFileQueueLimit = function (b) {
+ this.settings.file_queue_limit = b;
+ this.callFlash("SetFileQueueLimit", [b]);
+};
+SWFUpload.prototype.setFilePostName = function (b) {
+ this.settings.file_post_name = b;
+ this.callFlash("SetFilePostName", [b]);
+};
+SWFUpload.prototype.setUseQueryString = function (b) {
+ this.settings.use_query_string = b;
+ this.callFlash("SetUseQueryString", [b]);
+};
+SWFUpload.prototype.setRequeueOnError = function (b) {
+ this.settings.requeue_on_error = b;
+ this.callFlash("SetRequeueOnError", [b]);
+};
+SWFUpload.prototype.setHTTPSuccess = function (b) {
+ if (typeof b === "string") {
+ b = b.replace(" ", "").split(",");
+ }
+ this.settings.http_success = b;
+ this.callFlash("SetHTTPSuccess", [b]);
+};
+SWFUpload.prototype.setAssumeSuccessTimeout = function (b) {
+ this.settings.assume_success_timeout = b;
+ this.callFlash("SetAssumeSuccessTimeout", [b]);
+};
+SWFUpload.prototype.setDebugEnabled = function (b) {
+ this.settings.debug_enabled = b;
+ this.callFlash("SetDebugEnabled", [b]);
+};
+SWFUpload.prototype.setButtonImageURL = function (b) {
+ if (b == undefined) {
+ b = "";
+ }
+ this.settings.button_image_url = b;
+ this.callFlash("SetButtonImageURL", [b]);
+};
+SWFUpload.prototype.setButtonDimensions = function (f, e) {
+ this.settings.button_width = f;
+ this.settings.button_height = e;
+ var d = this.getMovieElement();
+ if (d != undefined) {
+ d.style.width = f + "px";
+ d.style.height = e + "px";
+ }
+ this.callFlash("SetButtonDimensions", [f, e]);
+};
+SWFUpload.prototype.setButtonText = function (b) {
+ this.settings.button_text = b;
+ this.callFlash("SetButtonText", [b]);
+};
+SWFUpload.prototype.setButtonTextPadding = function (c, d) {
+ this.settings.button_text_top_padding = d;
+ this.settings.button_text_left_padding = c;
+ this.callFlash("SetButtonTextPadding", [c, d]);
+};
+SWFUpload.prototype.setButtonTextStyle = function (b) {
+ this.settings.button_text_style = b;
+ this.callFlash("SetButtonTextStyle", [b]);
+};
+SWFUpload.prototype.setButtonDisabled = function (b) {
+ this.settings.button_disabled = b;
+ this.callFlash("SetButtonDisabled", [b]);
+};
+SWFUpload.prototype.setButtonAction = function (b) {
+ this.settings.button_action = b;
+ this.callFlash("SetButtonAction", [b]);
+};
+SWFUpload.prototype.setButtonCursor = function (b) {
+ this.settings.button_cursor = b;
+ this.callFlash("SetButtonCursor", [b]);
+};
+SWFUpload.prototype.queueEvent = function (d, f) {
+ if (f == undefined) {
+ f = [];
+ } else {
+ if (!(f instanceof Array)) {
+ f = [f];
+ }
+ }
+ var e = this;
+ if (typeof this.settings[d] === "function") {
+ this.eventQueue.push(function () {
+ this.settings[d].apply(this, f);
+ });
+ setTimeout(function () {
+ e.executeNextEvent();
+ }, 0);
+ } else {
+ if (this.settings[d] !== null) {
+ throw "Event handler " + d + " is unknown or is not a function";
+ }
+ }
+};
+SWFUpload.prototype.executeNextEvent = function () {
+ var b = this.eventQueue ? this.eventQueue.shift() : null;
+ if (typeof(b) === "function") {
+ b.apply(this);
+ }
+};
+SWFUpload.prototype.unescapeFilePostParams = function (l) {
+ var j = /[$]([0-9a-f]{4})/i;
+ var i = {};
+ var k;
+ if (l != undefined) {
+ for (var h in l.post) {
+ if (l.post.hasOwnProperty(h)) {
+ k = h;
+ var g;
+ while ((g = j.exec(k)) !== null) {
+ k = k.replace(g[0], String.fromCharCode(parseInt("0x" + g[1], 16)));
+ }
+ i[k] = l.post[h];
+ }
+ }
+ l.post = i;
+ }
+ return l;
+};
+SWFUpload.prototype.testExternalInterface = function () {
+ try {
+ return this.callFlash("TestExternalInterface");
+ } catch (b) {
+ return false;
+ }
+};
+SWFUpload.prototype.flashReady = function () {
+ var b = this.getMovieElement();
+ if (!b) {
+ this.debug("Flash called back ready but the flash movie can't be found.");
+ return;
+ }
+ this.cleanUp(b);
+ this.queueEvent("swfupload_loaded_handler");
+};
+SWFUpload.prototype.cleanUp = function (f) {
+ try {
+ if (this.movieElement && typeof(f.CallFunction) === "unknown") {
+ this.debug("Removing Flash functions hooks (this should only run in IE and should prevent memory leaks)");
+ for (var h in f) {
+ try {
+ if (typeof(f[h]) === "function") {
+ f[h] = null;
+ }
+ } catch (e) {}
+ }
+ }
+ } catch (g) {}
+ window.__flash__removeCallback = function (c, b) {
+ try {
+ if (c) {
+ c[b] = null;
+ }
+ } catch (a) {}
+ };
+};
+SWFUpload.prototype.fileDialogStart = function () {
+ this.queueEvent("file_dialog_start_handler");
+};
+SWFUpload.prototype.fileQueued = function (b) {
+ b = this.unescapeFilePostParams(b);
+ this.queueEvent("file_queued_handler", b);
+};
+SWFUpload.prototype.fileQueueError = function (e, f, d) {
+ e = this.unescapeFilePostParams(e);
+ this.queueEvent("file_queue_error_handler", [e, f, d]);
+};
+SWFUpload.prototype.fileDialogComplete = function (d, f, e) {
+ this.queueEvent("file_dialog_complete_handler", [d, f, e]);
+};
+SWFUpload.prototype.uploadStart = function (b) {
+ b = this.unescapeFilePostParams(b);
+ this.queueEvent("return_upload_start_handler", b);
+};
+SWFUpload.prototype.returnUploadStart = function (d) {
+ var c;
+ if (typeof this.settings.upload_start_handler === "function") {
+ d = this.unescapeFilePostParams(d);
+ c = this.settings.upload_start_handler.call(this, d);
+ } else {
+ if (this.settings.upload_start_handler != undefined) {
+ throw "upload_start_handler must be a function";
+ }
+ }
+ if (c === undefined) {
+ c = true;
+ }
+ c = !! c;
+ this.callFlash("ReturnUploadStart", [c]);
+};
+SWFUpload.prototype.uploadProgress = function (e, f, d) {
+ e = this.unescapeFilePostParams(e);
+ this.queueEvent("upload_progress_handler", [e, f, d]);
+};
+SWFUpload.prototype.uploadError = function (e, f, d) {
+ e = this.unescapeFilePostParams(e);
+ this.queueEvent("upload_error_handler", [e, f, d]);
+};
+SWFUpload.prototype.uploadSuccess = function (d, e, f) {
+ d = this.unescapeFilePostParams(d);
+ this.queueEvent("upload_success_handler", [d, e, f]);
+};
+SWFUpload.prototype.uploadComplete = function (b) {
+ b = this.unescapeFilePostParams(b);
+ this.queueEvent("upload_complete_handler", b);
+};
+SWFUpload.prototype.debug = function (b) {
+ this.queueEvent("debug_handler", b);
+};
+SWFUpload.prototype.debugMessage = function (h) {
+ if (this.settings.debug) {
+ var f, g = [];
+ if (typeof h === "object" && typeof h.name === "string" && typeof h.message === "string") {
+ for (var e in h) {
+ if (h.hasOwnProperty(e)) {
+ g.push(e + ": " + h[e]);
+ }
+ }
+ f = g.join("\n") || "";
+ g = f.split("\n");
+ f = "EXCEPTION: " + g.join("\nEXCEPTION: ");
+ SWFUpload.Console.writeLine(f);
+ } else {
+ SWFUpload.Console.writeLine(h);
+ }
+ }
+};
+SWFUpload.Console = {};
+SWFUpload.Console.writeLine = function (g) {
+ var e, f;
+ try {
+ e = document.getElementById("SWFUpload_Console");
+ if (!e) {
+ f = document.createElement("form");
+ document.getElementsByTagName("body")[0].appendChild(f);
+ e = document.createElement("textarea");
+ e.id = "SWFUpload_Console";
+ e.style.fontFamily = "monospace";
+ e.setAttribute("wrap", "off");
+ e.wrap = "off";
+ e.style.overflow = "auto";
+ e.style.width = "700px";
+ e.style.height = "350px";
+ e.style.margin = "5px";
+ f.appendChild(e);
+ }
+ e.value += g + "\n";
+ e.scrollTop = e.scrollHeight - e.clientHeight;
+ } catch (h) {
+ alert("Exception: " + h.name + " Message: " + h.message);
+ }
+};
+(function (c) {
+ var b = {
+ init: function (d, e) {
+ return this.each(function () {
+ var n = c(this);
+ var m = n.clone();
+ var j = c.extend({
+ id: n.attr("id"),
+ swf: "uploadify.swf",
+ uploader: "uploadify.php",
+ auto: true,
+ buttonClass: "",
+ buttonCursor: "hand",
+ buttonImage: null,
+ buttonText: "SELECT FILES",
+ checkExisting: false,
+ debug: false,
+ fileObjName: "Filedata",
+ fileSizeLimit: 0,
+ fileTypeDesc: "All Files",
+ fileTypeExts: "*.*",
+ height: 30,
+ method: "post",
+ multi: true,
+ formData: {},
+ preventCaching: true,
+ progressData: "percentage",
+ queueID: false,
+ queueSizeLimit: 999,
+ removeCompleted: true,
+ removeTimeout: 3,
+ requeueErrors: false,
+ successTimeout: 30,
+ uploadLimit: 0,
+ width: 120,
+ overrideEvents: []
+ }, d);
+ var g = {
+ assume_success_timeout: j.successTimeout,
+ button_placeholder_id: j.id,
+ button_width: j.width,
+ button_height: j.height,
+ button_text: null,
+ button_text_style: null,
+ button_text_top_padding: 0,
+ button_text_left_padding: 0,
+ button_action: (j.multi ? SWFUpload.BUTTON_ACTION.SELECT_FILES : SWFUpload.BUTTON_ACTION.SELECT_FILE),
+ button_disabled: false,
+ button_cursor: (j.buttonCursor == "arrow" ? SWFUpload.CURSOR.ARROW : SWFUpload.CURSOR.HAND),
+ button_window_mode: SWFUpload.WINDOW_MODE.TRANSPARENT,
+ debug: j.debug,
+ requeue_on_error: j.requeueErrors,
+ file_post_name: j.fileObjName,
+ file_size_limit: j.fileSizeLimit,
+ file_types: j.fileTypeExts,
+ file_types_description: j.fileTypeDesc,
+ file_queue_limit: j.queueSizeLimit,
+ file_upload_limit: j.uploadLimit,
+ flash_url: j.swf,
+ prevent_swf_caching: j.preventCaching,
+ post_params: j.formData,
+ upload_url: j.uploader,
+ use_query_string: (j.method == "get"),
+ file_dialog_complete_handler: a.onDialogClose,
+ file_dialog_start_handler: a.onDialogOpen,
+ file_queued_handler: a.onSelect,
+ file_queue_error_handler: a.onSelectError,
+ swfupload_loaded_handler: j.onSWFReady,
+ upload_complete_handler: a.onUploadComplete,
+ upload_error_handler: a.onUploadError,
+ upload_progress_handler: a.onUploadProgress,
+ upload_start_handler: a.onUploadStart,
+ upload_success_handler: a.onUploadSuccess
+ };
+ if (e) {
+ g = c.extend(g, e);
+ }
+ g = c.extend(g, j);
+ var o = swfobject.getFlashPlayerVersion();
+ var h = (o.major >= 9);
+ if (h) {
+ window["uploadify_" + j.id] = new SWFUpload(g);
+ var i = window["uploadify_" + j.id];
+ n.data("uploadify", i);
+ var l = c("", {
+ id: j.id,
+ "class": "uploadify",
+ css: {
+ height: j.height + "px",
+ width: j.width + "px"
+ }
+ });
+ c("#" + i.movieName).wrap(l);
+ l = c("#" + j.id);
+ l.data("uploadify", i);
+ var f = c("", {
+ id: j.id + "-button",
+ "class": "uploadify-button " + j.buttonClass
+ });
+ if (j.buttonImage) {
+ f.css({
+ "background-image": "url('" + j.buttonImage + "')",
+ "text-indent": "-9999px"
+ });
+ }
+ f.html('' + j.buttonText + "").css({
+ height: j.height + "px",
+ "line-height": j.height + "px",
+ width: j.width + "px"
+ });
+ l.append(f);
+ c("#" + i.movieName).css({
+ position: "absolute",
+ "z-index": 1
+ });
+ if (!j.queueID) {
+ var k = c("", {
+ id: j.id + "-queue",
+ "class": "uploadify-queue"
+ });
+ l.after(k);
+ i.settings.queueID = j.id + "-queue";
+ i.settings.defaultQueue = true;
+ }
+ i.queueData = {
+ files: {},
+ filesSelected: 0,
+ filesQueued: 0,
+ filesReplaced: 0,
+ filesCancelled: 0,
+ filesErrored: 0,
+ uploadsSuccessful: 0,
+ uploadsErrored: 0,
+ averageSpeed: 0,
+ queueLength: 0,
+ queueSize: 0,
+ uploadSize: 0,
+ queueBytesUploaded: 0,
+ uploadQueue: [],
+ errorMsg: "Some files were not added to the queue:"
+ };
+ i.original = m;
+ i.wrapper = l;
+ i.button = f;
+ i.queue = k;
+ if (j.onInit) {
+ j.onInit.call(n, i);
+ }
+ } else {
+ if (j.onFallback) {
+ j.onFallback.call(n);
+ }
+ }
+ });
+ },
+ cancel: function (d, f) {
+ var e = arguments;
+ this.each(function () {
+ var l = c(this),
+ i = l.data("uploadify"),
+ j = i.settings,
+ h = -1;
+ if (e[0]) {
+ if (e[0] == "*") {
+ var g = i.queueData.queueLength;
+ c("#" + j.queueID).find(".uploadify-queue-item").each(function () {
+ h++;
+ if (e[1] === true) {
+ i.cancelUpload(c(this).attr("id"), false);
+ } else {
+ i.cancelUpload(c(this).attr("id"));
+ }
+ c(this).find(".data").removeClass("data").html(" - Cancelled");
+ c(this).find(".uploadify-progress-bar").remove();
+ c(this).delay(1000 + 100 * h).fadeOut(500, function () {
+ c(this).remove();
+ });
+ });
+ i.queueData.queueSize = 0;
+ i.queueData.queueLength = 0;
+ if (j.onClearQueue) {
+ j.onClearQueue.call(l, g);
+ }
+ } else {
+ for (var m = 0; m < e.length; m++) {
+ i.cancelUpload(e[m]);
+ c("#" + e[m]).find(".data").removeClass("data").html(" - Cancelled");
+ c("#" + e[m]).find(".uploadify-progress-bar").remove();
+ c("#" + e[m]).delay(1000 + 100 * m).fadeOut(500, function () {
+ c(this).remove();
+ });
+ }
+ }
+ } else {
+ var k = c("#" + j.queueID).find(".uploadify-queue-item").get(0);
+ $item = c(k);
+ i.cancelUpload($item.attr("id"));
+ $item.find(".data").removeClass("data").html(" - Cancelled");
+ $item.find(".uploadify-progress-bar").remove();
+ $item.delay(1000).fadeOut(500, function () {
+ c(this).remove();
+ });
+ }
+ });
+ },
+ destroy: function () {
+ this.each(function () {
+ var f = c(this),
+ d = f.data("uploadify"),
+ e = d.settings;
+ d.destroy();
+ if (e.defaultQueue) {
+ c("#" + e.queueID).remove();
+ }
+ c("#" + e.id).replaceWith(d.original);
+ if (e.onDestroy) {
+ e.onDestroy.call(this);
+ }
+ delete d;
+ });
+ },
+ disable: function (d) {
+ this.each(function () {
+ var g = c(this),
+ e = g.data("uploadify"),
+ f = e.settings;
+ if (d) {
+ e.button.addClass("disabled");
+ if (f.onDisable) {
+ f.onDisable.call(this);
+ }
+ } else {
+ e.button.removeClass("disabled");
+ if (f.onEnable) {
+ f.onEnable.call(this);
+ }
+ }
+ e.setButtonDisabled(d);
+ });
+ },
+ settings: function (e, g, h) {
+ var d = arguments;
+ var f = g;
+ this.each(function () {
+ var k = c(this),
+ i = k.data("uploadify"),
+ j = i.settings;
+ if (typeof(d[0]) == "object") {
+ for (var l in g) {
+ setData(l, g[l]);
+ }
+ }
+ if (d.length === 1) {
+ f = j[e];
+ } else {
+ switch (e) {
+ case "uploader":
+ i.setUploadURL(g);
+ break;
+ case "formData":
+ if (!h) {
+ g = c.extend(j.formData, g);
+ }
+ i.setPostParams(j.formData);
+ break;
+ case "method":
+ if (g == "get") {
+ i.setUseQueryString(true);
+ } else {
+ i.setUseQueryString(false);
+ }
+ break;
+ case "fileObjName":
+ i.setFilePostName(g);
+ break;
+ case "fileTypeExts":
+ i.setFileTypes(g, j.fileTypeDesc);
+ break;
+ case "fileTypeDesc":
+ i.setFileTypes(j.fileTypeExts, g);
+ break;
+ case "fileSizeLimit":
+ i.setFileSizeLimit(g);
+ break;
+ case "uploadLimit":
+ i.setFileUploadLimit(g);
+ break;
+ case "queueSizeLimit":
+ i.setFileQueueLimit(g);
+ break;
+ case "buttonImage":
+ i.button.css("background-image", settingValue);
+ break;
+ case "buttonCursor":
+ if (g == "arrow") {
+ i.setButtonCursor(SWFUpload.CURSOR.ARROW);
+ } else {
+ i.setButtonCursor(SWFUpload.CURSOR.HAND);
+ }
+ break;
+ case "buttonText":
+ c("#" + j.id + "-button").find(".uploadify-button-text").html(g);
+ break;
+ case "width":
+ i.setButtonDimensions(g, j.height);
+ break;
+ case "height":
+ i.setButtonDimensions(j.width, g);
+ break;
+ case "multi":
+ if (g) {
+ i.setButtonAction(SWFUpload.BUTTON_ACTION.SELECT_FILES);
+ } else {
+ i.setButtonAction(SWFUpload.BUTTON_ACTION.SELECT_FILE);
+ }
+ break;
+ }
+ j[e] = g;
+ }
+ });
+ if (d.length === 1) {
+ return f;
+ }
+ },
+ stop: function () {
+ this.each(function () {
+ var e = c(this),
+ d = e.data("uploadify");
+ d.queueData.averageSpeed = 0;
+ d.queueData.uploadSize = 0;
+ d.queueData.bytesUploaded = 0;
+ d.queueData.uploadQueue = [];
+ d.stopUpload();
+ });
+ },
+ upload: function () {
+ var d = arguments;
+ this.each(function () {
+ var f = c(this),
+ e = f.data("uploadify");
+ e.queueData.averageSpeed = 0;
+ e.queueData.uploadSize = 0;
+ e.queueData.bytesUploaded = 0;
+ e.queueData.uploadQueue = [];
+ if (d[0]) {
+ if (d[0] == "*") {
+ e.queueData.uploadSize = e.queueData.queueSize;
+ e.queueData.uploadQueue.push("*");
+ e.startUpload();
+ } else {
+ for (var g = 0; g < d.length; g++) {
+ e.queueData.uploadSize += e.queueData.files[d[g]].size;
+ e.queueData.uploadQueue.push(d[g]);
+ }
+ e.startUpload(e.queueData.uploadQueue.shift());
+ }
+ } else {
+ e.startUpload();
+ }
+ });
+ }
+ };
+ var a = {
+ onDialogOpen: function () {
+ var d = this.settings;
+ this.queueData.errorMsg = "Some files were not added to the queue:";
+ this.queueData.filesReplaced = 0;
+ this.queueData.filesCancelled = 0;
+ if (d.onDialogOpen) {
+ d.onDialogOpen.call(this);
+ }
+ },
+ onDialogClose: function (d, f, g) {
+ var e = this.settings;
+ this.queueData.filesErrored = d - f;
+ this.queueData.filesSelected = d;
+ this.queueData.filesQueued = f - this.queueData.filesCancelled;
+ this.queueData.queueLength = g;
+ if (c.inArray("onDialogClose", e.overrideEvents) < 0) {
+ if (this.queueData.filesErrored > 0) {
+ alert(this.queueData.errorMsg);
+ }
+ }
+ if (e.onDialogClose) {
+ e.onDialogClose.call(this, this.queueData);
+ }
+ if (e.auto) {
+ c("#" + e.id).uploadify("upload", "*");
+ }
+ },
+ onSelect: function (g) {
+ var h = this.settings;
+ var e = {};
+ for (var f in this.queueData.files) {
+ e = this.queueData.files[f];
+ if (e.uploaded != true && e.name == g.name) {
+ var d = confirm('The file named "' + g.name + '" is already in the queue.\nDo you want to replace the existing item in the queue?');
+ if (!d) {
+ this.cancelUpload(g.id);
+ this.queueData.filesCancelled++;
+ return false;
+ } else {
+ c("#" + e.id).remove();
+ this.cancelUpload(e.id);
+ this.queueData.filesReplaced++;
+ }
+ }
+ }
+ var i = Math.round(g.size / 1024);
+ var l = "KB";
+ if (i > 1000) {
+ i = Math.round(i / 1000);
+ l = "MB";
+ }
+ var k = i.toString().split(".");
+ i = k[0];
+ if (k.length > 1) {
+ i += "." + k[1].substr(0, 2);
+ }
+ i += l;
+ var j = g.name;
+ if (j.length > 25) {
+ j = j.substr(0, 25) + "...";
+ }
+ if (c.inArray("onSelect", h.overrideEvents) < 0) {
+ c("#" + h.queueID).append('');
+ }
+ this.queueData.queueSize += g.size;
+ this.queueData.files[g.id] = g;
+ if (h.onSelect) {
+ h.onSelect.apply(this, arguments);
+ }
+ },
+ onSelectError: function (d, g, f) {
+ var e = this.settings;
+ if (c.inArray("onSelectError", e.overrideEvents) < 0) {
+ switch (g) {
+ case SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED:
+ if (e.queueSizeLimit > f) {
+ this.queueData.errorMsg += "\nThe number of files selected exceeds the remaining upload limit (" + f + ").";
+ } else {
+ this.queueData.errorMsg += "\nThe number of files selected exceeds the queue size limit (" + e.queueSizeLimit + ").";
+ }
+ break;
+ case SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT:
+ this.queueData.errorMsg += '\nThe file "' + d.name + '" exceeds the size limit (' + e.fileSizeLimit + ").";
+ break;
+ case SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE:
+ this.queueData.errorMsg += '\nThe file "' + d.name + '" is empty.';
+ break;
+ case SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT:
+ this.queueData.errorMsg += '\nThe file "' + d.name + '" is not an accepted file type (' + e.fileTypeDesc + ").";
+ break;
+ }
+ }
+ if (g != SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED) {
+ delete this.queueData.files[d.id];
+ }
+ if (e.onSelectError) {
+ e.onSelectError.apply(this, arguments);
+ }
+ },
+ onQueueComplete: function () {
+ if (this.settings.onQueueComplete) {
+ this.settings.onQueueComplete.call(this, this.settings.queueData);
+ }
+ },
+ onUploadComplete: function (f) {
+ var g = this.settings,
+ d = this;
+ var e = this.getStats();
+ this.queueData.queueLength = e.files_queued;
+ if (this.queueData.uploadQueue[0] == "*") {
+ if (this.queueData.queueLength > 0) {
+ this.startUpload();
+ } else {
+ this.queueData.uploadQueue = [];
+ if (g.onQueueComplete) {
+ g.onQueueComplete.call(this, this.queueData);
+ }
+ }
+ } else {
+ if (this.queueData.uploadQueue.length > 0) {
+ this.startUpload(this.queueData.uploadQueue.shift());
+ } else {
+ this.queueData.uploadQueue = [];
+ if (g.onQueueComplete) {
+ g.onQueueComplete.call(this, this.queueData);
+ }
+ }
+ }
+ if (c.inArray("onUploadComplete", g.overrideEvents) < 0) {
+ if (g.removeCompleted) {
+ switch (f.filestatus) {
+ case SWFUpload.FILE_STATUS.COMPLETE:
+ setTimeout(function () {
+ if (c("#" + f.id)) {
+ d.queueData.queueSize -= f.size;
+ d.queueData.queueLength -= 1;
+ delete d.queueData.files[f.id];
+ c("#" + f.id).fadeOut(500, function () {
+ c(this).remove();
+ });
+ }
+ }, g.removeTimeout * 1000);
+ break;
+ case SWFUpload.FILE_STATUS.ERROR:
+ if (!g.requeueErrors) {
+ setTimeout(function () {
+ if (c("#" + f.id)) {
+ d.queueData.queueSize -= f.size;
+ d.queueData.queueLength -= 1;
+ delete d.queueData.files[f.id];
+ c("#" + f.id).fadeOut(500, function () {
+ c(this).remove();
+ });
+ }
+ }, g.removeTimeout * 1000);
+ }
+ break;
+ }
+ } else {
+ f.uploaded = true;
+ }
+ }
+ if (g.onUploadComplete) {
+ g.onUploadComplete.call(this, f);
+ }
+ },
+ onUploadError: function (e, i, h) {
+ var f = this.settings;
+ var g = "Error";
+ switch (i) {
+ case SWFUpload.UPLOAD_ERROR.HTTP_ERROR:
+ g = "HTTP Error (" + h + ")";
+ break;
+ case SWFUpload.UPLOAD_ERROR.MISSING_UPLOAD_URL:
+ g = "Missing Upload URL";
+ break;
+ case SWFUpload.UPLOAD_ERROR.IO_ERROR:
+ g = "IO Error";
+ break;
+ case SWFUpload.UPLOAD_ERROR.SECURITY_ERROR:
+ g = "Security Error";
+ break;
+ case SWFUpload.UPLOAD_ERROR.UPLOAD_LIMIT_EXCEEDED:
+ alert("The upload limit has been reached (" + h + ").");
+ g = "Exceeds Upload Limit";
+ break;
+ case SWFUpload.UPLOAD_ERROR.UPLOAD_FAILED:
+ g = "Failed";
+ break;
+ case SWFUpload.UPLOAD_ERROR.SPECIFIED_FILE_ID_NOT_FOUND:
+ break;
+ case SWFUpload.UPLOAD_ERROR.FILE_VALIDATION_FAILED:
+ g = "Validation Error";
+ break;
+ case SWFUpload.UPLOAD_ERROR.FILE_CANCELLED:
+ g = "Cancelled";
+ this.queueData.queueSize -= e.size;
+ this.queueData.queueLength -= 1;
+ if (e.status == SWFUpload.FILE_STATUS.IN_PROGRESS || c.inArray(e.id, this.queueData.uploadQueue) >= 0) {
+ this.queueData.uploadSize -= e.size;
+ }
+ if (f.onCancel) {
+ f.onCancel.call(this, e);
+ }
+ delete this.queueData.files[e.id];
+ break;
+ case SWFUpload.UPLOAD_ERROR.UPLOAD_STOPPED:
+ g = "Stopped";
+ break;
+ }
+ if (c.inArray("onUploadError", f.overrideEvents) < 0) {
+ if (i != SWFUpload.UPLOAD_ERROR.FILE_CANCELLED && i != SWFUpload.UPLOAD_ERROR.UPLOAD_STOPPED) {
+ c("#" + e.id).addClass("uploadify-error");
+ }
+ c("#" + e.id).find(".uploadify-progress-bar").css("width", "1px");
+ if (i != SWFUpload.UPLOAD_ERROR.SPECIFIED_FILE_ID_NOT_FOUND && e.status != SWFUpload.FILE_STATUS.COMPLETE) {
+ c("#" + e.id).find(".data").html(" - " + g);
+ }
+ }
+ var d = this.getStats();
+ this.queueData.uploadsErrored = d.upload_errors;
+ if (f.onUploadError) {
+ f.onUploadError.call(this, e, i, h, g);
+ }
+ },
+ onUploadProgress: function (g, m, j) {
+ var h = this.settings;
+ var e = new Date();
+ var n = e.getTime();
+ var k = n - this.timer;
+ if (k > 500) {
+ this.timer = n;
+ }
+ var i = m - this.bytesLoaded;
+ this.bytesLoaded = m;
+ var d = this.queueData.queueBytesUploaded + m;
+ var p = Math.round(m / j * 100);
+ var o = "KB/s";
+ var l = 0;
+ var f = (i / 1024) / (k / 1000);
+ f = Math.floor(f * 10) / 10;
+ if (this.queueData.averageSpeed > 0) {
+ this.queueData.averageSpeed = Math.floor((this.queueData.averageSpeed + f) / 2);
+ } else {
+ this.queueData.averageSpeed = Math.floor(f);
+ }
+ if (f > 1000) {
+ l = (f * 0.001);
+ this.queueData.averageSpeed = Math.floor(l);
+ o = "MB/s";
+ }
+ if (c.inArray("onUploadProgress", h.overrideEvents) < 0) {
+ if (h.progressData == "percentage") {
+ c("#" + g.id).find(".data").html(" - " + p + "%");
+ } else {
+ if (h.progressData == "speed" && k > 500) {
+ c("#" + g.id).find(".data").html(" - " + this.queueData.averageSpeed + o);
+ }
+ }
+ c("#" + g.id).find(".uploadify-progress-bar").css("width", p + "%");
+ }
+ if (h.onUploadProgress) {
+ h.onUploadProgress.call(this, g, m, j, d, this.queueData.uploadSize);
+ }
+ },
+ onUploadStart: function (d) {
+ var e = this.settings;
+ var f = new Date();
+ this.timer = f.getTime();
+ this.bytesLoaded = 0;
+ if (this.queueData.uploadQueue.length == 0) {
+ this.queueData.uploadSize = d.size;
+ }
+ if (e.checkExisting) {
+ c.ajax({
+ type: "POST",
+ async: false,
+ url: e.checkExisting,
+ data: {
+ filename: d.name
+ },
+ success: function (h) {
+ if (h == 1) {
+ var g = confirm('A file with the name "' + d.name + '" already exists on the server.\nWould you like to replace the existing file?');
+ if (!g) {
+ this.cancelUpload(d.id);
+ c("#" + d.id).remove();
+ if (this.queueData.uploadQueue.length > 0 && this.queueData.queueLength > 0) {
+ if (this.queueData.uploadQueue[0] == "*") {
+ this.startUpload();
+ } else {
+ this.startUpload(this.queueData.uploadQueue.shift());
+ }
+ }
+ }
+ }
+ }
+ });
+ }
+ if (e.onUploadStart) {
+ e.onUploadStart.call(this, d);
+ }
+ },
+ onUploadSuccess: function (f, h, d) {
+ var g = this.settings;
+ var e = this.getStats();
+ this.queueData.uploadsSuccessful = e.successful_uploads;
+ this.queueData.queueBytesUploaded += f.size;
+ if (c.inArray("onUploadSuccess", g.overrideEvents) < 0) {
+ c("#" + f.id).find(".data").html(" - Complete");
+ }
+ if (g.onUploadSuccess) {
+ g.onUploadSuccess.call(this, f, h, d);
+ }
+ }
+ };
+ c.fn.uploadify = function (d) {
+ if (b[d]) {
+ return b[d].apply(this, Array.prototype.slice.call(arguments, 1));
+ } else {
+ if (typeof d === "object" || !d) {
+ return b.init.apply(this, arguments);
+ } else {
+ c.error("The method " + d + " does not exist in $.uploadify");
+ }
+ }
+ };
})($);
\ No newline at end of file
diff --git a/web/public_php/ams/js/jquery.uploadify-3.1.min.js b/web/public_php/ams/js/jquery.uploadify-3.1.min.js
index f475d7c05d..2ecda85b02 100644
--- a/web/public_php/ams/js/jquery.uploadify-3.1.min.js
+++ b/web/public_php/ams/js/jquery.uploadify-3.1.min.js
@@ -1,16 +1,16 @@
-/*
-Uploadify v3.1.1
-Copyright (c) 2012 Reactive Apps, Ronnie Garcia
-Released under the MIT License
-
-SWFUpload: http://www.swfupload.org, http://swfupload.googlecode.com
-mmSWFUpload 1.0: Flash upload dialog - http://profandesign.se/swfupload/, http://www.vinterwebb.se/
-SWFUpload is (c) 2006-2007 Lars Huring, Olov Nilzén and Mammon Media and is released under the MIT License:
-http://www.opensource.org/licenses/mit-license.php
-SWFUpload 2 is (c) 2007-2008 Jake Roberts and is released under the MIT License:
-http://www.opensource.org/licenses/mit-license.php
-
-SWFObject v2.2
-is released under the MIT License
-*/
+/*
+Uploadify v3.1.1
+Copyright (c) 2012 Reactive Apps, Ronnie Garcia
+Released under the MIT License
+
+SWFUpload: http://www.swfupload.org, http://swfupload.googlecode.com
+mmSWFUpload 1.0: Flash upload dialog - http://profandesign.se/swfupload/, http://www.vinterwebb.se/
+SWFUpload is (c) 2006-2007 Lars Huring, Olov Nilzén and Mammon Media and is released under the MIT License:
+http://www.opensource.org/licenses/mit-license.php
+SWFUpload 2 is (c) 2007-2008 Jake Roberts and is released under the MIT License:
+http://www.opensource.org/licenses/mit-license.php
+
+SWFObject v2.2
+is released under the MIT License
+*/
;var swfobject=function(){var aq="undefined",aD="object",ab="Shockwave Flash",X="ShockwaveFlash.ShockwaveFlash",aE="application/x-shockwave-flash",ac="SWFObjectExprInst",ax="onreadystatechange",af=window,aL=document,aB=navigator,aa=false,Z=[aN],aG=[],ag=[],al=[],aJ,ad,ap,at,ak=false,aU=false,aH,an,aI=true,ah=function(){var a=typeof aL.getElementById!=aq&&typeof aL.getElementsByTagName!=aq&&typeof aL.createElement!=aq,e=aB.userAgent.toLowerCase(),c=aB.platform.toLowerCase(),h=c?/win/.test(c):/win/.test(e),j=c?/mac/.test(c):/mac/.test(e),g=/webkit/.test(e)?parseFloat(e.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,d=!+"\v1",f=[0,0,0],k=null;if(typeof aB.plugins!=aq&&typeof aB.plugins[ab]==aD){k=aB.plugins[ab].description;if(k&&!(typeof aB.mimeTypes!=aq&&aB.mimeTypes[aE]&&!aB.mimeTypes[aE].enabledPlugin)){aa=true;d=false;k=k.replace(/^.*\s+(\S+\s+\S+$)/,"$1");f[0]=parseInt(k.replace(/^(.*)\..*$/,"$1"),10);f[1]=parseInt(k.replace(/^.*\.(.*)\s.*$/,"$1"),10);f[2]=/[a-zA-Z]/.test(k)?parseInt(k.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0;}}else{if(typeof af.ActiveXObject!=aq){try{var i=new ActiveXObject(X);if(i){k=i.GetVariable("$version");if(k){d=true;k=k.split(" ")[1].split(",");f=[parseInt(k[0],10),parseInt(k[1],10),parseInt(k[2],10)];}}}catch(b){}}}return{w3:a,pv:f,wk:g,ie:d,win:h,mac:j};}(),aK=function(){if(!ah.w3){return;}if((typeof aL.readyState!=aq&&aL.readyState=="complete")||(typeof aL.readyState==aq&&(aL.getElementsByTagName("body")[0]||aL.body))){aP();}if(!ak){if(typeof aL.addEventListener!=aq){aL.addEventListener("DOMContentLoaded",aP,false);}if(ah.ie&&ah.win){aL.attachEvent(ax,function(){if(aL.readyState=="complete"){aL.detachEvent(ax,arguments.callee);aP();}});if(af==top){(function(){if(ak){return;}try{aL.documentElement.doScroll("left");}catch(a){setTimeout(arguments.callee,0);return;}aP();})();}}if(ah.wk){(function(){if(ak){return;}if(!/loaded|complete/.test(aL.readyState)){setTimeout(arguments.callee,0);return;}aP();})();}aC(aP);}}();function aP(){if(ak){return;}try{var b=aL.getElementsByTagName("body")[0].appendChild(ar("span"));b.parentNode.removeChild(b);}catch(a){return;}ak=true;var d=Z.length;for(var c=0;c0){for(var h=0;h0){var i=aS(c);if(i){if(ao(aG[h].swfVersion)&&!(ah.wk&&ah.wk<312)){ay(c,true);if(l){a.success=true;a.ref=av(c);l(a);}}else{if(aG[h].expressInstall&&au()){var e={};e.data=aG[h].expressInstall;e.width=i.getAttribute("width")||"0";e.height=i.getAttribute("height")||"0";if(i.getAttribute("class")){e.styleclass=i.getAttribute("class");}if(i.getAttribute("align")){e.align=i.getAttribute("align");}var f={};var d=i.getElementsByTagName("param");var k=d.length;for(var j=0;j';}}a.outerHTML='";ag[ag.length]=e.id;d=aS(e.id);}else{var b=ar(aD);b.setAttribute("type",aE);for(var k in e){if(e[k]!=Object.prototype[k]){if(k.toLowerCase()=="styleclass"){b.setAttribute("class",e[k]);}else{if(k.toLowerCase()!="classid"){b.setAttribute(k,e[k]);}}}}for(var l in g){if(g[l]!=Object.prototype[l]&&l.toLowerCase()!="movie"){aQ(b,l,g[l]);}}a.parentNode.replaceChild(b,a);d=b;}}return d;}function aQ(b,d,c){var a=ar("param");a.setAttribute("name",d);a.setAttribute("value",c);b.appendChild(a);}function aw(a){var b=aS(a);if(b&&b.nodeName=="OBJECT"){if(ah.ie&&ah.win){b.style.display="none";(function(){if(b.readyState==4){aT(a);}else{setTimeout(arguments.callee,10);}})();}else{b.parentNode.removeChild(b);}}}function aT(a){var b=aS(a);if(b){for(var c in b){if(typeof b[c]=="function"){b[c]=null;}}b.parentNode.removeChild(b);}}function aS(a){var c=null;try{c=aL.getElementById(a);}catch(b){}return c;}function ar(a){return aL.createElement(a);}function aM(a,c,b){a.attachEvent(c,b);al[al.length]=[a,c,b];}function ao(a){var b=ah.pv,c=a.split(".");c[0]=parseInt(c[0],10);c[1]=parseInt(c[1],10)||0;c[2]=parseInt(c[2],10)||0;return(b[0]>c[0]||(b[0]==c[0]&&b[1]>c[1])||(b[0]==c[0]&&b[1]==c[1]&&b[2]>=c[2]))?true:false;}function az(b,f,a,c){if(ah.ie&&ah.mac){return;}var e=aL.getElementsByTagName("head")[0];if(!e){return;}var g=(a&&typeof a=="string")?a:"screen";if(c){aH=null;an=null;}if(!aH||an!=g){var d=ar("style");d.setAttribute("type","text/css");d.setAttribute("media",g);aH=e.appendChild(d);if(ah.ie&&ah.win&&typeof aL.styleSheets!=aq&&aL.styleSheets.length>0){aH=aL.styleSheets[aL.styleSheets.length-1];}an=g;}if(ah.ie&&ah.win){if(aH&&typeof aH.addRule==aD){aH.addRule(b,f);}}else{if(aH&&typeof aL.createTextNode!=aq){aH.appendChild(aL.createTextNode(b+" {"+f+"}"));}}}function ay(a,c){if(!aI){return;}var b=c?"visible":"hidden";if(ak&&aS(a)){aS(a).style.visibility=b;}else{az("#"+a,"visibility:"+b);}}function ai(b){var a=/[\\\"<>\.;]/;var c=a.exec(b)!=null;return c&&typeof encodeURIComponent!=aq?encodeURIComponent(b):b;}var aR=function(){if(ah.ie&&ah.win){window.attachEvent("onunload",function(){var a=al.length;for(var b=0;b','','','','','','',""].join("");};SWFUpload.prototype.getFlashVars=function(){var c=this.buildParamString();var d=this.settings.http_success.join(",");return["movieName=",encodeURIComponent(this.movieName),"&uploadURL=",encodeURIComponent(this.settings.upload_url),"&useQueryString=",encodeURIComponent(this.settings.use_query_string),"&requeueOnError=",encodeURIComponent(this.settings.requeue_on_error),"&httpSuccess=",encodeURIComponent(d),"&assumeSuccessTimeout=",encodeURIComponent(this.settings.assume_success_timeout),"¶ms=",encodeURIComponent(c),"&filePostName=",encodeURIComponent(this.settings.file_post_name),"&fileTypes=",encodeURIComponent(this.settings.file_types),"&fileTypesDescription=",encodeURIComponent(this.settings.file_types_description),"&fileSizeLimit=",encodeURIComponent(this.settings.file_size_limit),"&fileUploadLimit=",encodeURIComponent(this.settings.file_upload_limit),"&fileQueueLimit=",encodeURIComponent(this.settings.file_queue_limit),"&debugEnabled=",encodeURIComponent(this.settings.debug_enabled),"&buttonImageURL=",encodeURIComponent(this.settings.button_image_url),"&buttonWidth=",encodeURIComponent(this.settings.button_width),"&buttonHeight=",encodeURIComponent(this.settings.button_height),"&buttonText=",encodeURIComponent(this.settings.button_text),"&buttonTextTopPadding=",encodeURIComponent(this.settings.button_text_top_padding),"&buttonTextLeftPadding=",encodeURIComponent(this.settings.button_text_left_padding),"&buttonTextStyle=",encodeURIComponent(this.settings.button_text_style),"&buttonAction=",encodeURIComponent(this.settings.button_action),"&buttonDisabled=",encodeURIComponent(this.settings.button_disabled),"&buttonCursor=",encodeURIComponent(this.settings.button_cursor)].join("");};SWFUpload.prototype.getMovieElement=function(){if(this.movieElement==undefined){this.movieElement=document.getElementById(this.movieName);}if(this.movieElement===null){throw"Could not find Flash element";}return this.movieElement;};SWFUpload.prototype.buildParamString=function(){var f=this.settings.post_params;var d=[];if(typeof(f)==="object"){for(var e in f){if(f.hasOwnProperty(e)){d.push(encodeURIComponent(e.toString())+"="+encodeURIComponent(f[e].toString()));}}}return d.join("&");};SWFUpload.prototype.destroy=function(){try{this.cancelUpload(null,false);var g=null;g=this.getMovieElement();if(g&&typeof(g.CallFunction)==="unknown"){for(var j in g){try{if(typeof(g[j])==="function"){g[j]=null;}}catch(h){}}try{g.parentNode.removeChild(g);}catch(f){}}window[this.movieName]=null;SWFUpload.instances[this.movieName]=null;delete SWFUpload.instances[this.movieName];this.movieElement=null;this.settings=null;this.customSettings=null;this.eventQueue=null;this.movieName=null;return true;}catch(i){return false;}};SWFUpload.prototype.displayDebugInfo=function(){this.debug(["---SWFUpload Instance Info---\n","Version: ",SWFUpload.version,"\n","Movie Name: ",this.movieName,"\n","Settings:\n","\t","upload_url: ",this.settings.upload_url,"\n","\t","flash_url: ",this.settings.flash_url,"\n","\t","use_query_string: ",this.settings.use_query_string.toString(),"\n","\t","requeue_on_error: ",this.settings.requeue_on_error.toString(),"\n","\t","http_success: ",this.settings.http_success.join(", "),"\n","\t","assume_success_timeout: ",this.settings.assume_success_timeout,"\n","\t","file_post_name: ",this.settings.file_post_name,"\n","\t","post_params: ",this.settings.post_params.toString(),"\n","\t","file_types: ",this.settings.file_types,"\n","\t","file_types_description: ",this.settings.file_types_description,"\n","\t","file_size_limit: ",this.settings.file_size_limit,"\n","\t","file_upload_limit: ",this.settings.file_upload_limit,"\n","\t","file_queue_limit: ",this.settings.file_queue_limit,"\n","\t","debug: ",this.settings.debug.toString(),"\n","\t","prevent_swf_caching: ",this.settings.prevent_swf_caching.toString(),"\n","\t","button_placeholder_id: ",this.settings.button_placeholder_id.toString(),"\n","\t","button_placeholder: ",(this.settings.button_placeholder?"Set":"Not Set"),"\n","\t","button_image_url: ",this.settings.button_image_url.toString(),"\n","\t","button_width: ",this.settings.button_width.toString(),"\n","\t","button_height: ",this.settings.button_height.toString(),"\n","\t","button_text: ",this.settings.button_text.toString(),"\n","\t","button_text_style: ",this.settings.button_text_style.toString(),"\n","\t","button_text_top_padding: ",this.settings.button_text_top_padding.toString(),"\n","\t","button_text_left_padding: ",this.settings.button_text_left_padding.toString(),"\n","\t","button_action: ",this.settings.button_action.toString(),"\n","\t","button_disabled: ",this.settings.button_disabled.toString(),"\n","\t","custom_settings: ",this.settings.custom_settings.toString(),"\n","Event Handlers:\n","\t","swfupload_loaded_handler assigned: ",(typeof this.settings.swfupload_loaded_handler==="function").toString(),"\n","\t","file_dialog_start_handler assigned: ",(typeof this.settings.file_dialog_start_handler==="function").toString(),"\n","\t","file_queued_handler assigned: ",(typeof this.settings.file_queued_handler==="function").toString(),"\n","\t","file_queue_error_handler assigned: ",(typeof this.settings.file_queue_error_handler==="function").toString(),"\n","\t","upload_start_handler assigned: ",(typeof this.settings.upload_start_handler==="function").toString(),"\n","\t","upload_progress_handler assigned: ",(typeof this.settings.upload_progress_handler==="function").toString(),"\n","\t","upload_error_handler assigned: ",(typeof this.settings.upload_error_handler==="function").toString(),"\n","\t","upload_success_handler assigned: ",(typeof this.settings.upload_success_handler==="function").toString(),"\n","\t","upload_complete_handler assigned: ",(typeof this.settings.upload_complete_handler==="function").toString(),"\n","\t","debug_handler assigned: ",(typeof this.settings.debug_handler==="function").toString(),"\n"].join(""));};SWFUpload.prototype.addSetting=function(d,f,e){if(f==undefined){return(this.settings[d]=e);}else{return(this.settings[d]=f);}};SWFUpload.prototype.getSetting=function(b){if(this.settings[b]!=undefined){return this.settings[b];}return"";};SWFUpload.prototype.callFlash=function(functionName,argumentArray){argumentArray=argumentArray||[];var movieElement=this.getMovieElement();var returnValue,returnString;try{returnString=movieElement.CallFunction(''+__flash__argumentsToXML(argumentArray,0)+"");returnValue=eval(returnString);}catch(ex){throw"Call to "+functionName+" failed";}if(returnValue!=undefined&&typeof returnValue.post==="object"){returnValue=this.unescapeFilePostParams(returnValue);}return returnValue;};SWFUpload.prototype.selectFile=function(){this.callFlash("SelectFile");};SWFUpload.prototype.selectFiles=function(){this.callFlash("SelectFiles");};SWFUpload.prototype.startUpload=function(b){this.callFlash("StartUpload",[b]);};SWFUpload.prototype.cancelUpload=function(d,c){if(c!==false){c=true;}this.callFlash("CancelUpload",[d,c]);};SWFUpload.prototype.stopUpload=function(){this.callFlash("StopUpload");};SWFUpload.prototype.getStats=function(){return this.callFlash("GetStats");};SWFUpload.prototype.setStats=function(b){this.callFlash("SetStats",[b]);};SWFUpload.prototype.getFile=function(b){if(typeof(b)==="number"){return this.callFlash("GetFileByIndex",[b]);}else{return this.callFlash("GetFile",[b]);}};SWFUpload.prototype.addFileParam=function(e,d,f){return this.callFlash("AddFileParam",[e,d,f]);};SWFUpload.prototype.removeFileParam=function(d,c){this.callFlash("RemoveFileParam",[d,c]);};SWFUpload.prototype.setUploadURL=function(b){this.settings.upload_url=b.toString();this.callFlash("SetUploadURL",[b]);};SWFUpload.prototype.setPostParams=function(b){this.settings.post_params=b;this.callFlash("SetPostParams",[b]);};SWFUpload.prototype.addPostParam=function(d,c){this.settings.post_params[d]=c;this.callFlash("SetPostParams",[this.settings.post_params]);};SWFUpload.prototype.removePostParam=function(b){delete this.settings.post_params[b];this.callFlash("SetPostParams",[this.settings.post_params]);};SWFUpload.prototype.setFileTypes=function(d,c){this.settings.file_types=d;this.settings.file_types_description=c;this.callFlash("SetFileTypes",[d,c]);};SWFUpload.prototype.setFileSizeLimit=function(b){this.settings.file_size_limit=b;this.callFlash("SetFileSizeLimit",[b]);};SWFUpload.prototype.setFileUploadLimit=function(b){this.settings.file_upload_limit=b;this.callFlash("SetFileUploadLimit",[b]);};SWFUpload.prototype.setFileQueueLimit=function(b){this.settings.file_queue_limit=b;this.callFlash("SetFileQueueLimit",[b]);};SWFUpload.prototype.setFilePostName=function(b){this.settings.file_post_name=b;this.callFlash("SetFilePostName",[b]);};SWFUpload.prototype.setUseQueryString=function(b){this.settings.use_query_string=b;this.callFlash("SetUseQueryString",[b]);};SWFUpload.prototype.setRequeueOnError=function(b){this.settings.requeue_on_error=b;this.callFlash("SetRequeueOnError",[b]);};SWFUpload.prototype.setHTTPSuccess=function(b){if(typeof b==="string"){b=b.replace(" ","").split(",");}this.settings.http_success=b;this.callFlash("SetHTTPSuccess",[b]);};SWFUpload.prototype.setAssumeSuccessTimeout=function(b){this.settings.assume_success_timeout=b;this.callFlash("SetAssumeSuccessTimeout",[b]);};SWFUpload.prototype.setDebugEnabled=function(b){this.settings.debug_enabled=b;this.callFlash("SetDebugEnabled",[b]);};SWFUpload.prototype.setButtonImageURL=function(b){if(b==undefined){b="";}this.settings.button_image_url=b;this.callFlash("SetButtonImageURL",[b]);};SWFUpload.prototype.setButtonDimensions=function(f,e){this.settings.button_width=f;this.settings.button_height=e;var d=this.getMovieElement();if(d!=undefined){d.style.width=f+"px";d.style.height=e+"px";}this.callFlash("SetButtonDimensions",[f,e]);};SWFUpload.prototype.setButtonText=function(b){this.settings.button_text=b;this.callFlash("SetButtonText",[b]);};SWFUpload.prototype.setButtonTextPadding=function(c,d){this.settings.button_text_top_padding=d;this.settings.button_text_left_padding=c;this.callFlash("SetButtonTextPadding",[c,d]);};SWFUpload.prototype.setButtonTextStyle=function(b){this.settings.button_text_style=b;this.callFlash("SetButtonTextStyle",[b]);};SWFUpload.prototype.setButtonDisabled=function(b){this.settings.button_disabled=b;this.callFlash("SetButtonDisabled",[b]);};SWFUpload.prototype.setButtonAction=function(b){this.settings.button_action=b;this.callFlash("SetButtonAction",[b]);};SWFUpload.prototype.setButtonCursor=function(b){this.settings.button_cursor=b;this.callFlash("SetButtonCursor",[b]);};SWFUpload.prototype.queueEvent=function(d,f){if(f==undefined){f=[];}else{if(!(f instanceof Array)){f=[f];}}var e=this;if(typeof this.settings[d]==="function"){this.eventQueue.push(function(){this.settings[d].apply(this,f);});setTimeout(function(){e.executeNextEvent();},0);}else{if(this.settings[d]!==null){throw"Event handler "+d+" is unknown or is not a function";}}};SWFUpload.prototype.executeNextEvent=function(){var b=this.eventQueue?this.eventQueue.shift():null;if(typeof(b)==="function"){b.apply(this);}};SWFUpload.prototype.unescapeFilePostParams=function(l){var j=/[$]([0-9a-f]{4})/i;var i={};var k;if(l!=undefined){for(var h in l.post){if(l.post.hasOwnProperty(h)){k=h;var g;while((g=j.exec(k))!==null){k=k.replace(g[0],String.fromCharCode(parseInt("0x"+g[1],16)));}i[k]=l.post[h];}}l.post=i;}return l;};SWFUpload.prototype.testExternalInterface=function(){try{return this.callFlash("TestExternalInterface");}catch(b){return false;}};SWFUpload.prototype.flashReady=function(){var b=this.getMovieElement();if(!b){this.debug("Flash called back ready but the flash movie can't be found.");return;}this.cleanUp(b);this.queueEvent("swfupload_loaded_handler");};SWFUpload.prototype.cleanUp=function(f){try{if(this.movieElement&&typeof(f.CallFunction)==="unknown"){this.debug("Removing Flash functions hooks (this should only run in IE and should prevent memory leaks)");for(var h in f){try{if(typeof(f[h])==="function"){f[h]=null;}}catch(e){}}}}catch(g){}window.__flash__removeCallback=function(c,b){try{if(c){c[b]=null;}}catch(a){}};};SWFUpload.prototype.fileDialogStart=function(){this.queueEvent("file_dialog_start_handler");};SWFUpload.prototype.fileQueued=function(b){b=this.unescapeFilePostParams(b);this.queueEvent("file_queued_handler",b);};SWFUpload.prototype.fileQueueError=function(e,f,d){e=this.unescapeFilePostParams(e);this.queueEvent("file_queue_error_handler",[e,f,d]);};SWFUpload.prototype.fileDialogComplete=function(d,f,e){this.queueEvent("file_dialog_complete_handler",[d,f,e]);};SWFUpload.prototype.uploadStart=function(b){b=this.unescapeFilePostParams(b);this.queueEvent("return_upload_start_handler",b);};SWFUpload.prototype.returnUploadStart=function(d){var c;if(typeof this.settings.upload_start_handler==="function"){d=this.unescapeFilePostParams(d);c=this.settings.upload_start_handler.call(this,d);}else{if(this.settings.upload_start_handler!=undefined){throw"upload_start_handler must be a function";}}if(c===undefined){c=true;}c=!!c;this.callFlash("ReturnUploadStart",[c]);};SWFUpload.prototype.uploadProgress=function(e,f,d){e=this.unescapeFilePostParams(e);this.queueEvent("upload_progress_handler",[e,f,d]);};SWFUpload.prototype.uploadError=function(e,f,d){e=this.unescapeFilePostParams(e);this.queueEvent("upload_error_handler",[e,f,d]);};SWFUpload.prototype.uploadSuccess=function(d,e,f){d=this.unescapeFilePostParams(d);this.queueEvent("upload_success_handler",[d,e,f]);};SWFUpload.prototype.uploadComplete=function(b){b=this.unescapeFilePostParams(b);this.queueEvent("upload_complete_handler",b);};SWFUpload.prototype.debug=function(b){this.queueEvent("debug_handler",b);};SWFUpload.prototype.debugMessage=function(h){if(this.settings.debug){var f,g=[];if(typeof h==="object"&&typeof h.name==="string"&&typeof h.message==="string"){for(var e in h){if(h.hasOwnProperty(e)){g.push(e+": "+h[e]);}}f=g.join("\n")||"";g=f.split("\n");f="EXCEPTION: "+g.join("\nEXCEPTION: ");SWFUpload.Console.writeLine(f);}else{SWFUpload.Console.writeLine(h);}}};SWFUpload.Console={};SWFUpload.Console.writeLine=function(g){var e,f;try{e=document.getElementById("SWFUpload_Console");if(!e){f=document.createElement("form");document.getElementsByTagName("body")[0].appendChild(f);e=document.createElement("textarea");e.id="SWFUpload_Console";e.style.fontFamily="monospace";e.setAttribute("wrap","off");e.wrap="off";e.style.overflow="auto";e.style.width="700px";e.style.height="350px";e.style.margin="5px";f.appendChild(e);}e.value+=g+"\n";e.scrollTop=e.scrollHeight-e.clientHeight;}catch(h){alert("Exception: "+h.name+" Message: "+h.message);}};(function(c){var b={init:function(d,e){return this.each(function(){var n=c(this);var m=n.clone();var j=c.extend({id:n.attr("id"),swf:"uploadify.swf",uploader:"uploadify.php",auto:true,buttonClass:"",buttonCursor:"hand",buttonImage:null,buttonText:"SELECT FILES",checkExisting:false,debug:false,fileObjName:"Filedata",fileSizeLimit:0,fileTypeDesc:"All Files",fileTypeExts:"*.*",height:30,method:"post",multi:true,formData:{},preventCaching:true,progressData:"percentage",queueID:false,queueSizeLimit:999,removeCompleted:true,removeTimeout:3,requeueErrors:false,successTimeout:30,uploadLimit:0,width:120,overrideEvents:[]},d);var g={assume_success_timeout:j.successTimeout,button_placeholder_id:j.id,button_width:j.width,button_height:j.height,button_text:null,button_text_style:null,button_text_top_padding:0,button_text_left_padding:0,button_action:(j.multi?SWFUpload.BUTTON_ACTION.SELECT_FILES:SWFUpload.BUTTON_ACTION.SELECT_FILE),button_disabled:false,button_cursor:(j.buttonCursor=="arrow"?SWFUpload.CURSOR.ARROW:SWFUpload.CURSOR.HAND),button_window_mode:SWFUpload.WINDOW_MODE.TRANSPARENT,debug:j.debug,requeue_on_error:j.requeueErrors,file_post_name:j.fileObjName,file_size_limit:j.fileSizeLimit,file_types:j.fileTypeExts,file_types_description:j.fileTypeDesc,file_queue_limit:j.queueSizeLimit,file_upload_limit:j.uploadLimit,flash_url:j.swf,prevent_swf_caching:j.preventCaching,post_params:j.formData,upload_url:j.uploader,use_query_string:(j.method=="get"),file_dialog_complete_handler:a.onDialogClose,file_dialog_start_handler:a.onDialogOpen,file_queued_handler:a.onSelect,file_queue_error_handler:a.onSelectError,swfupload_loaded_handler:j.onSWFReady,upload_complete_handler:a.onUploadComplete,upload_error_handler:a.onUploadError,upload_progress_handler:a.onUploadProgress,upload_start_handler:a.onUploadStart,upload_success_handler:a.onUploadSuccess};if(e){g=c.extend(g,e);}g=c.extend(g,j);var o=swfobject.getFlashPlayerVersion();var h=(o.major>=9);if(h){window["uploadify_"+j.id]=new SWFUpload(g);var i=window["uploadify_"+j.id];n.data("uploadify",i);var l=c("",{id:j.id,"class":"uploadify",css:{height:j.height+"px",width:j.width+"px"}});c("#"+i.movieName).wrap(l);l=c("#"+j.id);l.data("uploadify",i);var f=c("",{id:j.id+"-button","class":"uploadify-button "+j.buttonClass});if(j.buttonImage){f.css({"background-image":"url('"+j.buttonImage+"')","text-indent":"-9999px"});}f.html(''+j.buttonText+"").css({height:j.height+"px","line-height":j.height+"px",width:j.width+"px"});l.append(f);c("#"+i.movieName).css({position:"absolute","z-index":1});if(!j.queueID){var k=c("",{id:j.id+"-queue","class":"uploadify-queue"});l.after(k);i.settings.queueID=j.id+"-queue";i.settings.defaultQueue=true;}i.queueData={files:{},filesSelected:0,filesQueued:0,filesReplaced:0,filesCancelled:0,filesErrored:0,uploadsSuccessful:0,uploadsErrored:0,averageSpeed:0,queueLength:0,queueSize:0,uploadSize:0,queueBytesUploaded:0,uploadQueue:[],errorMsg:"Some files were not added to the queue:"};i.original=m;i.wrapper=l;i.button=f;i.queue=k;if(j.onInit){j.onInit.call(n,i);}}else{if(j.onFallback){j.onFallback.call(n);}}});},cancel:function(d,f){var e=arguments;this.each(function(){var l=c(this),i=l.data("uploadify"),j=i.settings,h=-1;if(e[0]){if(e[0]=="*"){var g=i.queueData.queueLength;c("#"+j.queueID).find(".uploadify-queue-item").each(function(){h++;if(e[1]===true){i.cancelUpload(c(this).attr("id"),false);}else{i.cancelUpload(c(this).attr("id"));}c(this).find(".data").removeClass("data").html(" - Cancelled");c(this).find(".uploadify-progress-bar").remove();c(this).delay(1000+100*h).fadeOut(500,function(){c(this).remove();});});i.queueData.queueSize=0;i.queueData.queueLength=0;if(j.onClearQueue){j.onClearQueue.call(l,g);}}else{for(var m=0;m0){alert(this.queueData.errorMsg);}}if(e.onDialogClose){e.onDialogClose.call(this,this.queueData);}if(e.auto){c("#"+e.id).uploadify("upload","*");}},onSelect:function(g){var h=this.settings;var e={};for(var f in this.queueData.files){e=this.queueData.files[f];if(e.uploaded!=true&&e.name==g.name){var d=confirm('The file named "'+g.name+'" is already in the queue.\nDo you want to replace the existing item in the queue?');if(!d){this.cancelUpload(g.id);this.queueData.filesCancelled++;return false;}else{c("#"+e.id).remove();this.cancelUpload(e.id);this.queueData.filesReplaced++;}}}var i=Math.round(g.size/1024);var l="KB";if(i>1000){i=Math.round(i/1000);l="MB";}var k=i.toString().split(".");i=k[0];if(k.length>1){i+="."+k[1].substr(0,2);}i+=l;var j=g.name;if(j.length>25){j=j.substr(0,25)+"...";}if(c.inArray("onSelect",h.overrideEvents)<0){c("#"+h.queueID).append('');}this.queueData.queueSize+=g.size;this.queueData.files[g.id]=g;if(h.onSelect){h.onSelect.apply(this,arguments);}},onSelectError:function(d,g,f){var e=this.settings;if(c.inArray("onSelectError",e.overrideEvents)<0){switch(g){case SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED:if(e.queueSizeLimit>f){this.queueData.errorMsg+="\nThe number of files selected exceeds the remaining upload limit ("+f+").";}else{this.queueData.errorMsg+="\nThe number of files selected exceeds the queue size limit ("+e.queueSizeLimit+").";}break;case SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT:this.queueData.errorMsg+='\nThe file "'+d.name+'" exceeds the size limit ('+e.fileSizeLimit+").";break;case SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE:this.queueData.errorMsg+='\nThe file "'+d.name+'" is empty.';break;case SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT:this.queueData.errorMsg+='\nThe file "'+d.name+'" is not an accepted file type ('+e.fileTypeDesc+").";break;}}if(g!=SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED){delete this.queueData.files[d.id];}if(e.onSelectError){e.onSelectError.apply(this,arguments);}},onQueueComplete:function(){if(this.settings.onQueueComplete){this.settings.onQueueComplete.call(this,this.settings.queueData);}},onUploadComplete:function(f){var g=this.settings,d=this;var e=this.getStats();this.queueData.queueLength=e.files_queued;if(this.queueData.uploadQueue[0]=="*"){if(this.queueData.queueLength>0){this.startUpload();}else{this.queueData.uploadQueue=[];if(g.onQueueComplete){g.onQueueComplete.call(this,this.queueData);}}}else{if(this.queueData.uploadQueue.length>0){this.startUpload(this.queueData.uploadQueue.shift());}else{this.queueData.uploadQueue=[];if(g.onQueueComplete){g.onQueueComplete.call(this,this.queueData);}}}if(c.inArray("onUploadComplete",g.overrideEvents)<0){if(g.removeCompleted){switch(f.filestatus){case SWFUpload.FILE_STATUS.COMPLETE:setTimeout(function(){if(c("#"+f.id)){d.queueData.queueSize-=f.size;d.queueData.queueLength-=1;delete d.queueData.files[f.id];c("#"+f.id).fadeOut(500,function(){c(this).remove();});}},g.removeTimeout*1000);break;case SWFUpload.FILE_STATUS.ERROR:if(!g.requeueErrors){setTimeout(function(){if(c("#"+f.id)){d.queueData.queueSize-=f.size;d.queueData.queueLength-=1;delete d.queueData.files[f.id];c("#"+f.id).fadeOut(500,function(){c(this).remove();});}},g.removeTimeout*1000);}break;}}else{f.uploaded=true;}}if(g.onUploadComplete){g.onUploadComplete.call(this,f);}},onUploadError:function(e,i,h){var f=this.settings;var g="Error";switch(i){case SWFUpload.UPLOAD_ERROR.HTTP_ERROR:g="HTTP Error ("+h+")";break;case SWFUpload.UPLOAD_ERROR.MISSING_UPLOAD_URL:g="Missing Upload URL";break;case SWFUpload.UPLOAD_ERROR.IO_ERROR:g="IO Error";break;case SWFUpload.UPLOAD_ERROR.SECURITY_ERROR:g="Security Error";break;case SWFUpload.UPLOAD_ERROR.UPLOAD_LIMIT_EXCEEDED:alert("The upload limit has been reached ("+h+").");g="Exceeds Upload Limit";break;case SWFUpload.UPLOAD_ERROR.UPLOAD_FAILED:g="Failed";break;case SWFUpload.UPLOAD_ERROR.SPECIFIED_FILE_ID_NOT_FOUND:break;case SWFUpload.UPLOAD_ERROR.FILE_VALIDATION_FAILED:g="Validation Error";break;case SWFUpload.UPLOAD_ERROR.FILE_CANCELLED:g="Cancelled";this.queueData.queueSize-=e.size;this.queueData.queueLength-=1;if(e.status==SWFUpload.FILE_STATUS.IN_PROGRESS||c.inArray(e.id,this.queueData.uploadQueue)>=0){this.queueData.uploadSize-=e.size;}if(f.onCancel){f.onCancel.call(this,e);}delete this.queueData.files[e.id];break;case SWFUpload.UPLOAD_ERROR.UPLOAD_STOPPED:g="Stopped";break;}if(c.inArray("onUploadError",f.overrideEvents)<0){if(i!=SWFUpload.UPLOAD_ERROR.FILE_CANCELLED&&i!=SWFUpload.UPLOAD_ERROR.UPLOAD_STOPPED){c("#"+e.id).addClass("uploadify-error");}c("#"+e.id).find(".uploadify-progress-bar").css("width","1px");if(i!=SWFUpload.UPLOAD_ERROR.SPECIFIED_FILE_ID_NOT_FOUND&&e.status!=SWFUpload.FILE_STATUS.COMPLETE){c("#"+e.id).find(".data").html(" - "+g);}}var d=this.getStats();this.queueData.uploadsErrored=d.upload_errors;if(f.onUploadError){f.onUploadError.call(this,e,i,h,g);}},onUploadProgress:function(g,m,j){var h=this.settings;var e=new Date();var n=e.getTime();var k=n-this.timer;if(k>500){this.timer=n;}var i=m-this.bytesLoaded;this.bytesLoaded=m;var d=this.queueData.queueBytesUploaded+m;var p=Math.round(m/j*100);var o="KB/s";var l=0;var f=(i/1024)/(k/1000);f=Math.floor(f*10)/10;if(this.queueData.averageSpeed>0){this.queueData.averageSpeed=Math.floor((this.queueData.averageSpeed+f)/2);}else{this.queueData.averageSpeed=Math.floor(f);}if(f>1000){l=(f*0.001);this.queueData.averageSpeed=Math.floor(l);o="MB/s";}if(c.inArray("onUploadProgress",h.overrideEvents)<0){if(h.progressData=="percentage"){c("#"+g.id).find(".data").html(" - "+p+"%");}else{if(h.progressData=="speed"&&k>500){c("#"+g.id).find(".data").html(" - "+this.queueData.averageSpeed+o);}}c("#"+g.id).find(".uploadify-progress-bar").css("width",p+"%");}if(h.onUploadProgress){h.onUploadProgress.call(this,g,m,j,d,this.queueData.uploadSize);}},onUploadStart:function(d){var e=this.settings;var f=new Date();this.timer=f.getTime();this.bytesLoaded=0;if(this.queueData.uploadQueue.length==0){this.queueData.uploadSize=d.size;}if(e.checkExisting){c.ajax({type:"POST",async:false,url:e.checkExisting,data:{filename:d.name},success:function(h){if(h==1){var g=confirm('A file with the name "'+d.name+'" already exists on the server.\nWould you like to replace the existing file?');if(!g){this.cancelUpload(d.id);c("#"+d.id).remove();if(this.queueData.uploadQueue.length>0&&this.queueData.queueLength>0){if(this.queueData.uploadQueue[0]=="*"){this.startUpload();}else{this.startUpload(this.queueData.uploadQueue.shift());}}}}}});}if(e.onUploadStart){e.onUploadStart.call(this,d);}},onUploadSuccess:function(f,h,d){var g=this.settings;var e=this.getStats();this.queueData.uploadsSuccessful=e.successful_uploads;this.queueData.queueBytesUploaded+=f.size;if(c.inArray("onUploadSuccess",g.overrideEvents)<0){c("#"+f.id).find(".data").html(" - Complete");}if(g.onUploadSuccess){g.onUploadSuccess.call(this,f,h,d);}}};c.fn.uploadify=function(d){if(b[d]){return b[d].apply(this,Array.prototype.slice.call(arguments,1));}else{if(typeof d==="object"||!d){return b.init.apply(this,arguments);}else{c.error("The method "+d+" does not exist in $.uploadify");}}};})($);
\ No newline at end of file
diff --git a/web/public_php/ams/js/masonry.pkgd.min.js b/web/public_php/ams/js/masonry.pkgd.min.js
index 45642b6be6..f0da3709b1 100644
--- a/web/public_php/ams/js/masonry.pkgd.min.js
+++ b/web/public_php/ams/js/masonry.pkgd.min.js
@@ -1,9 +1,9 @@
-/*!
- * Masonry PACKAGED v3.1.5
- * Cascading grid layout library
- * http://masonry.desandro.com
- * MIT License
- * by David DeSandro
- */
-
+/*!
+ * Masonry PACKAGED v3.1.5
+ * Cascading grid layout library
+ * http://masonry.desandro.com
+ * MIT License
+ * by David DeSandro
+ */
+
!function(a){function b(){}function c(a){function c(b){b.prototype.option||(b.prototype.option=function(b){a.isPlainObject(b)&&(this.options=a.extend(!0,this.options,b))})}function e(b,c){a.fn[b]=function(e){if("string"==typeof e){for(var g=d.call(arguments,1),h=0,i=this.length;i>h;h++){var j=this[h],k=a.data(j,b);if(k)if(a.isFunction(k[e])&&"_"!==e.charAt(0)){var l=k[e].apply(k,g);if(void 0!==l)return l}else f("no such method '"+e+"' for "+b+" instance");else f("cannot call methods on "+b+" prior to initialization; attempted to call '"+e+"'")}return this}return this.each(function(){var d=a.data(this,b);d?(d.option(e),d._init()):(d=new c(this,e),a.data(this,b,d))})}}if(a){var f="undefined"==typeof console?b:function(a){console.error(a)};return a.bridget=function(a,b){c(b),e(a,b)},a.bridget}}var d=Array.prototype.slice;"function"==typeof define&&define.amd?define("jquery-bridget/jquery.bridget",["jquery"],c):c(a.jQuery)}(window),function(a){function b(b){var c=a.event;return c.target=c.target||c.srcElement||b,c}var c=document.documentElement,d=function(){};c.addEventListener?d=function(a,b,c){a.addEventListener(b,c,!1)}:c.attachEvent&&(d=function(a,c,d){a[c+d]=d.handleEvent?function(){var c=b(a);d.handleEvent.call(d,c)}:function(){var c=b(a);d.call(a,c)},a.attachEvent("on"+c,a[c+d])});var e=function(){};c.removeEventListener?e=function(a,b,c){a.removeEventListener(b,c,!1)}:c.detachEvent&&(e=function(a,b,c){a.detachEvent("on"+b,a[b+c]);try{delete a[b+c]}catch(d){a[b+c]=void 0}});var f={bind:d,unbind:e};"function"==typeof define&&define.amd?define("eventie/eventie",f):"object"==typeof exports?module.exports=f:a.eventie=f}(this),function(a){function b(a){"function"==typeof a&&(b.isReady?a():f.push(a))}function c(a){var c="readystatechange"===a.type&&"complete"!==e.readyState;if(!b.isReady&&!c){b.isReady=!0;for(var d=0,g=f.length;g>d;d++){var h=f[d];h()}}}function d(d){return d.bind(e,"DOMContentLoaded",c),d.bind(e,"readystatechange",c),d.bind(a,"load",c),b}var e=a.document,f=[];b.isReady=!1,"function"==typeof define&&define.amd?(b.isReady="function"==typeof requirejs,define("doc-ready/doc-ready",["eventie/eventie"],d)):a.docReady=d(a.eventie)}(this),function(){function a(){}function b(a,b){for(var c=a.length;c--;)if(a[c].listener===b)return c;return-1}function c(a){return function(){return this[a].apply(this,arguments)}}var d=a.prototype,e=this,f=e.EventEmitter;d.getListeners=function(a){var b,c,d=this._getEvents();if(a instanceof RegExp){b={};for(c in d)d.hasOwnProperty(c)&&a.test(c)&&(b[c]=d[c])}else b=d[a]||(d[a]=[]);return b},d.flattenListeners=function(a){var b,c=[];for(b=0;be;e++)if(b=c[e]+a,"string"==typeof d[b])return b}}var c="Webkit Moz ms Ms O".split(" "),d=document.documentElement.style;"function"==typeof define&&define.amd?define("get-style-property/get-style-property",[],function(){return b}):"object"==typeof exports?module.exports=b:a.getStyleProperty=b}(window),function(a){function b(a){var b=parseFloat(a),c=-1===a.indexOf("%")&&!isNaN(b);return c&&b}function c(){for(var a={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},b=0,c=g.length;c>b;b++){var d=g[b];a[d]=0}return a}function d(a){function d(a){if("string"==typeof a&&(a=document.querySelector(a)),a&&"object"==typeof a&&a.nodeType){var d=f(a);if("none"===d.display)return c();var e={};e.width=a.offsetWidth,e.height=a.offsetHeight;for(var k=e.isBorderBox=!(!j||!d[j]||"border-box"!==d[j]),l=0,m=g.length;m>l;l++){var n=g[l],o=d[n];o=h(a,o);var p=parseFloat(o);e[n]=isNaN(p)?0:p}var q=e.paddingLeft+e.paddingRight,r=e.paddingTop+e.paddingBottom,s=e.marginLeft+e.marginRight,t=e.marginTop+e.marginBottom,u=e.borderLeftWidth+e.borderRightWidth,v=e.borderTopWidth+e.borderBottomWidth,w=k&&i,x=b(d.width);x!==!1&&(e.width=x+(w?0:q+u));var y=b(d.height);return y!==!1&&(e.height=y+(w?0:r+v)),e.innerWidth=e.width-(q+u),e.innerHeight=e.height-(r+v),e.outerWidth=e.width+s,e.outerHeight=e.height+t,e}}function h(a,b){if(e||-1===b.indexOf("%"))return b;var c=a.style,d=c.left,f=a.runtimeStyle,g=f&&f.left;return g&&(f.left=a.currentStyle.left),c.left=b,b=c.pixelLeft,c.left=d,g&&(f.left=g),b}var i,j=a("boxSizing");return function(){if(j){var a=document.createElement("div");a.style.width="200px",a.style.padding="1px 2px 3px 4px",a.style.borderStyle="solid",a.style.borderWidth="1px 2px 3px 4px",a.style[j]="border-box";var c=document.body||document.documentElement;c.appendChild(a);var d=f(a);i=200===b(d.width),c.removeChild(a)}}(),d}var e=a.getComputedStyle,f=e?function(a){return e(a,null)}:function(a){return a.currentStyle},g=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];"function"==typeof define&&define.amd?define("get-size/get-size",["get-style-property/get-style-property"],d):"object"==typeof exports?module.exports=d(require("get-style-property")):a.getSize=d(a.getStyleProperty)}(window),function(a,b){function c(a,b){return a[h](b)}function d(a){if(!a.parentNode){var b=document.createDocumentFragment();b.appendChild(a)}}function e(a,b){d(a);for(var c=a.parentNode.querySelectorAll(b),e=0,f=c.length;f>e;e++)if(c[e]===a)return!0;return!1}function f(a,b){return d(a),c(a,b)}var g,h=function(){if(b.matchesSelector)return"matchesSelector";for(var a=["webkit","moz","ms","o"],c=0,d=a.length;d>c;c++){var e=a[c],f=e+"MatchesSelector";if(b[f])return f}}();if(h){var i=document.createElement("div"),j=c(i,"div");g=j?c:f}else g=e;"function"==typeof define&&define.amd?define("matches-selector/matches-selector",[],function(){return g}):window.matchesSelector=g}(this,Element.prototype),function(a){function b(a,b){for(var c in b)a[c]=b[c];return a}function c(a){for(var b in a)return!1;return b=null,!0}function d(a){return a.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()})}function e(a,e,f){function h(a,b){a&&(this.element=a,this.layout=b,this.position={x:0,y:0},this._create())}var i=f("transition"),j=f("transform"),k=i&&j,l=!!f("perspective"),m={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend",transition:"transitionend"}[i],n=["transform","transition","transitionDuration","transitionProperty"],o=function(){for(var a={},b=0,c=n.length;c>b;b++){var d=n[b],e=f(d);e&&e!==d&&(a[d]=e)}return a}();b(h.prototype,a.prototype),h.prototype._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},h.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},h.prototype.getSize=function(){this.size=e(this.element)},h.prototype.css=function(a){var b=this.element.style;for(var c in a){var d=o[c]||c;b[d]=a[c]}},h.prototype.getPosition=function(){var a=g(this.element),b=this.layout.options,c=b.isOriginLeft,d=b.isOriginTop,e=parseInt(a[c?"left":"right"],10),f=parseInt(a[d?"top":"bottom"],10);e=isNaN(e)?0:e,f=isNaN(f)?0:f;var h=this.layout.size;e-=c?h.paddingLeft:h.paddingRight,f-=d?h.paddingTop:h.paddingBottom,this.position.x=e,this.position.y=f},h.prototype.layoutPosition=function(){var a=this.layout.size,b=this.layout.options,c={};b.isOriginLeft?(c.left=this.position.x+a.paddingLeft+"px",c.right=""):(c.right=this.position.x+a.paddingRight+"px",c.left=""),b.isOriginTop?(c.top=this.position.y+a.paddingTop+"px",c.bottom=""):(c.bottom=this.position.y+a.paddingBottom+"px",c.top=""),this.css(c),this.emitEvent("layout",[this])};var p=l?function(a,b){return"translate3d("+a+"px, "+b+"px, 0)"}:function(a,b){return"translate("+a+"px, "+b+"px)"};h.prototype._transitionTo=function(a,b){this.getPosition();var c=this.position.x,d=this.position.y,e=parseInt(a,10),f=parseInt(b,10),g=e===this.position.x&&f===this.position.y;if(this.setPosition(a,b),g&&!this.isTransitioning)return void this.layoutPosition();var h=a-c,i=b-d,j={},k=this.layout.options;h=k.isOriginLeft?h:-h,i=k.isOriginTop?i:-i,j.transform=p(h,i),this.transition({to:j,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},h.prototype.goTo=function(a,b){this.setPosition(a,b),this.layoutPosition()},h.prototype.moveTo=k?h.prototype._transitionTo:h.prototype.goTo,h.prototype.setPosition=function(a,b){this.position.x=parseInt(a,10),this.position.y=parseInt(b,10)},h.prototype._nonTransition=function(a){this.css(a.to),a.isCleaning&&this._removeStyles(a.to);for(var b in a.onTransitionEnd)a.onTransitionEnd[b].call(this)},h.prototype._transition=function(a){if(!parseFloat(this.layout.options.transitionDuration))return void this._nonTransition(a);var b=this._transn;for(var c in a.onTransitionEnd)b.onEnd[c]=a.onTransitionEnd[c];for(c in a.to)b.ingProperties[c]=!0,a.isCleaning&&(b.clean[c]=!0);if(a.from){this.css(a.from);var d=this.element.offsetHeight;d=null}this.enableTransition(a.to),this.css(a.to),this.isTransitioning=!0};var q=j&&d(j)+",opacity";h.prototype.enableTransition=function(){this.isTransitioning||(this.css({transitionProperty:q,transitionDuration:this.layout.options.transitionDuration}),this.element.addEventListener(m,this,!1))},h.prototype.transition=h.prototype[i?"_transition":"_nonTransition"],h.prototype.onwebkitTransitionEnd=function(a){this.ontransitionend(a)},h.prototype.onotransitionend=function(a){this.ontransitionend(a)};var r={"-webkit-transform":"transform","-moz-transform":"transform","-o-transform":"transform"};h.prototype.ontransitionend=function(a){if(a.target===this.element){var b=this._transn,d=r[a.propertyName]||a.propertyName;if(delete b.ingProperties[d],c(b.ingProperties)&&this.disableTransition(),d in b.clean&&(this.element.style[a.propertyName]="",delete b.clean[d]),d in b.onEnd){var e=b.onEnd[d];e.call(this),delete b.onEnd[d]}this.emitEvent("transitionEnd",[this])}},h.prototype.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(m,this,!1),this.isTransitioning=!1},h.prototype._removeStyles=function(a){var b={};for(var c in a)b[c]="";this.css(b)};var s={transitionProperty:"",transitionDuration:""};return h.prototype.removeTransitionStyles=function(){this.css(s)},h.prototype.removeElem=function(){this.element.parentNode.removeChild(this.element),this.emitEvent("remove",[this])},h.prototype.remove=function(){if(!i||!parseFloat(this.layout.options.transitionDuration))return void this.removeElem();var a=this;this.on("transitionEnd",function(){return a.removeElem(),!0}),this.hide()},h.prototype.reveal=function(){delete this.isHidden,this.css({display:""});var a=this.layout.options;this.transition({from:a.hiddenStyle,to:a.visibleStyle,isCleaning:!0})},h.prototype.hide=function(){this.isHidden=!0,this.css({display:""});var a=this.layout.options;this.transition({from:a.visibleStyle,to:a.hiddenStyle,isCleaning:!0,onTransitionEnd:{opacity:function(){this.isHidden&&this.css({display:"none"})}}})},h.prototype.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},h}var f=a.getComputedStyle,g=f?function(a){return f(a,null)}:function(a){return a.currentStyle};"function"==typeof define&&define.amd?define("outlayer/item",["eventEmitter/EventEmitter","get-size/get-size","get-style-property/get-style-property"],e):(a.Outlayer={},a.Outlayer.Item=e(a.EventEmitter,a.getSize,a.getStyleProperty))}(window),function(a){function b(a,b){for(var c in b)a[c]=b[c];return a}function c(a){return"[object Array]"===l.call(a)}function d(a){var b=[];if(c(a))b=a;else if(a&&"number"==typeof a.length)for(var d=0,e=a.length;e>d;d++)b.push(a[d]);else b.push(a);return b}function e(a,b){var c=n(b,a);-1!==c&&b.splice(c,1)}function f(a){return a.replace(/(.)([A-Z])/g,function(a,b,c){return b+"-"+c}).toLowerCase()}function g(c,g,l,n,o,p){function q(a,c){if("string"==typeof a&&(a=h.querySelector(a)),!a||!m(a))return void(i&&i.error("Bad "+this.constructor.namespace+" element: "+a));this.element=a,this.options=b({},this.constructor.defaults),this.option(c);var d=++r;this.element.outlayerGUID=d,s[d]=this,this._create(),this.options.isInitLayout&&this.layout()}var r=0,s={};return q.namespace="outlayer",q.Item=p,q.defaults={containerStyle:{position:"relative"},isInitLayout:!0,isOriginLeft:!0,isOriginTop:!0,isResizeBound:!0,isResizingContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}},b(q.prototype,l.prototype),q.prototype.option=function(a){b(this.options,a)},q.prototype._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),b(this.element.style,this.options.containerStyle),this.options.isResizeBound&&this.bindResize()},q.prototype.reloadItems=function(){this.items=this._itemize(this.element.children)},q.prototype._itemize=function(a){for(var b=this._filterFindItemElements(a),c=this.constructor.Item,d=[],e=0,f=b.length;f>e;e++){var g=b[e],h=new c(g,this);d.push(h)}return d},q.prototype._filterFindItemElements=function(a){a=d(a);for(var b=this.options.itemSelector,c=[],e=0,f=a.length;f>e;e++){var g=a[e];if(m(g))if(b){o(g,b)&&c.push(g);for(var h=g.querySelectorAll(b),i=0,j=h.length;j>i;i++)c.push(h[i])}else c.push(g)}return c},q.prototype.getItemElements=function(){for(var a=[],b=0,c=this.items.length;c>b;b++)a.push(this.items[b].element);return a},q.prototype.layout=function(){this._resetLayout(),this._manageStamps();var a=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;this.layoutItems(this.items,a),this._isLayoutInited=!0},q.prototype._init=q.prototype.layout,q.prototype._resetLayout=function(){this.getSize()},q.prototype.getSize=function(){this.size=n(this.element)},q.prototype._getMeasurement=function(a,b){var c,d=this.options[a];d?("string"==typeof d?c=this.element.querySelector(d):m(d)&&(c=d),this[a]=c?n(c)[b]:d):this[a]=0},q.prototype.layoutItems=function(a,b){a=this._getItemsForLayout(a),this._layoutItems(a,b),this._postLayout()},q.prototype._getItemsForLayout=function(a){for(var b=[],c=0,d=a.length;d>c;c++){var e=a[c];e.isIgnored||b.push(e)}return b},q.prototype._layoutItems=function(a,b){function c(){d.emitEvent("layoutComplete",[d,a])}var d=this;if(!a||!a.length)return void c();this._itemsOn(a,"layout",c);for(var e=[],f=0,g=a.length;g>f;f++){var h=a[f],i=this._getItemLayoutPosition(h);i.item=h,i.isInstant=b||h.isLayoutInstant,e.push(i)}this._processLayoutQueue(e)},q.prototype._getItemLayoutPosition=function(){return{x:0,y:0}},q.prototype._processLayoutQueue=function(a){for(var b=0,c=a.length;c>b;b++){var d=a[b];this._positionItem(d.item,d.x,d.y,d.isInstant)}},q.prototype._positionItem=function(a,b,c,d){d?a.goTo(b,c):a.moveTo(b,c)},q.prototype._postLayout=function(){this.resizeContainer()},q.prototype.resizeContainer=function(){if(this.options.isResizingContainer){var a=this._getContainerSize();a&&(this._setContainerMeasure(a.width,!0),this._setContainerMeasure(a.height,!1))}},q.prototype._getContainerSize=k,q.prototype._setContainerMeasure=function(a,b){if(void 0!==a){var c=this.size;c.isBorderBox&&(a+=b?c.paddingLeft+c.paddingRight+c.borderLeftWidth+c.borderRightWidth:c.paddingBottom+c.paddingTop+c.borderTopWidth+c.borderBottomWidth),a=Math.max(a,0),this.element.style[b?"width":"height"]=a+"px"}},q.prototype._itemsOn=function(a,b,c){function d(){return e++,e===f&&c.call(g),!0}for(var e=0,f=a.length,g=this,h=0,i=a.length;i>h;h++){var j=a[h];j.on(b,d)}},q.prototype.ignore=function(a){var b=this.getItem(a);b&&(b.isIgnored=!0)},q.prototype.unignore=function(a){var b=this.getItem(a);b&&delete b.isIgnored},q.prototype.stamp=function(a){if(a=this._find(a)){this.stamps=this.stamps.concat(a);for(var b=0,c=a.length;c>b;b++){var d=a[b];this.ignore(d)}}},q.prototype.unstamp=function(a){if(a=this._find(a))for(var b=0,c=a.length;c>b;b++){var d=a[b];e(d,this.stamps),this.unignore(d)}},q.prototype._find=function(a){return a?("string"==typeof a&&(a=this.element.querySelectorAll(a)),a=d(a)):void 0},q.prototype._manageStamps=function(){if(this.stamps&&this.stamps.length){this._getBoundingRect();for(var a=0,b=this.stamps.length;b>a;a++){var c=this.stamps[a];this._manageStamp(c)}}},q.prototype._getBoundingRect=function(){var a=this.element.getBoundingClientRect(),b=this.size;this._boundingRect={left:a.left+b.paddingLeft+b.borderLeftWidth,top:a.top+b.paddingTop+b.borderTopWidth,right:a.right-(b.paddingRight+b.borderRightWidth),bottom:a.bottom-(b.paddingBottom+b.borderBottomWidth)}},q.prototype._manageStamp=k,q.prototype._getElementOffset=function(a){var b=a.getBoundingClientRect(),c=this._boundingRect,d=n(a),e={left:b.left-c.left-d.marginLeft,top:b.top-c.top-d.marginTop,right:c.right-b.right-d.marginRight,bottom:c.bottom-b.bottom-d.marginBottom};return e},q.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},q.prototype.bindResize=function(){this.isResizeBound||(c.bind(a,"resize",this),this.isResizeBound=!0)},q.prototype.unbindResize=function(){this.isResizeBound&&c.unbind(a,"resize",this),this.isResizeBound=!1},q.prototype.onresize=function(){function a(){b.resize(),delete b.resizeTimeout}this.resizeTimeout&&clearTimeout(this.resizeTimeout);var b=this;this.resizeTimeout=setTimeout(a,100)},q.prototype.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},q.prototype.needsResizeLayout=function(){var a=n(this.element),b=this.size&&a;return b&&a.innerWidth!==this.size.innerWidth},q.prototype.addItems=function(a){var b=this._itemize(a);return b.length&&(this.items=this.items.concat(b)),b},q.prototype.appended=function(a){var b=this.addItems(a);b.length&&(this.layoutItems(b,!0),this.reveal(b))},q.prototype.prepended=function(a){var b=this._itemize(a);if(b.length){var c=this.items.slice(0);this.items=b.concat(c),this._resetLayout(),this._manageStamps(),this.layoutItems(b,!0),this.reveal(b),this.layoutItems(c)}},q.prototype.reveal=function(a){var b=a&&a.length;if(b)for(var c=0;b>c;c++){var d=a[c];d.reveal()}},q.prototype.hide=function(a){var b=a&&a.length;if(b)for(var c=0;b>c;c++){var d=a[c];d.hide()}},q.prototype.getItem=function(a){for(var b=0,c=this.items.length;c>b;b++){var d=this.items[b];if(d.element===a)return d}},q.prototype.getItems=function(a){if(a&&a.length){for(var b=[],c=0,d=a.length;d>c;c++){var e=a[c],f=this.getItem(e);f&&b.push(f)}return b}},q.prototype.remove=function(a){a=d(a);var b=this.getItems(a);if(b&&b.length){this._itemsOn(b,"remove",function(){this.emitEvent("removeComplete",[this,b])});for(var c=0,f=b.length;f>c;c++){var g=b[c];g.remove(),e(g,this.items)}}},q.prototype.destroy=function(){var a=this.element.style;a.height="",a.position="",a.width="";for(var b=0,c=this.items.length;c>b;b++){var d=this.items[b];d.destroy()}this.unbindResize(),delete this.element.outlayerGUID,j&&j.removeData(this.element,this.constructor.namespace)},q.data=function(a){var b=a&&a.outlayerGUID;return b&&s[b]},q.create=function(a,c){function d(){q.apply(this,arguments)}return Object.create?d.prototype=Object.create(q.prototype):b(d.prototype,q.prototype),d.prototype.constructor=d,d.defaults=b({},q.defaults),b(d.defaults,c),d.prototype.settings={},d.namespace=a,d.data=q.data,d.Item=function(){p.apply(this,arguments)},d.Item.prototype=new p,g(function(){for(var b=f(a),c=h.querySelectorAll(".js-"+b),e="data-"+b+"-options",g=0,k=c.length;k>g;g++){var l,m=c[g],n=m.getAttribute(e);try{l=n&&JSON.parse(n)}catch(o){i&&i.error("Error parsing "+e+" on "+m.nodeName.toLowerCase()+(m.id?"#"+m.id:"")+": "+o);continue}var p=new d(m,l);j&&j.data(m,a,p)}}),j&&j.bridget&&j.bridget(a,d),d},q.Item=p,q}var h=a.document,i=a.console,j=a.jQuery,k=function(){},l=Object.prototype.toString,m="object"==typeof HTMLElement?function(a){return a instanceof HTMLElement}:function(a){return a&&"object"==typeof a&&1===a.nodeType&&"string"==typeof a.nodeName},n=Array.prototype.indexOf?function(a,b){return a.indexOf(b)}:function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1};"function"==typeof define&&define.amd?define("outlayer/outlayer",["eventie/eventie","doc-ready/doc-ready","eventEmitter/EventEmitter","get-size/get-size","matches-selector/matches-selector","./item"],g):a.Outlayer=g(a.eventie,a.docReady,a.EventEmitter,a.getSize,a.matchesSelector,a.Outlayer.Item)}(window),function(a){function b(a,b){var d=a.create("masonry");return d.prototype._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns();var a=this.cols;for(this.colYs=[];a--;)this.colYs.push(0);this.maxY=0},d.prototype.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var a=this.items[0],c=a&&a.element;this.columnWidth=c&&b(c).outerWidth||this.containerWidth}this.columnWidth+=this.gutter,this.cols=Math.floor((this.containerWidth+this.gutter)/this.columnWidth),this.cols=Math.max(this.cols,1)},d.prototype.getContainerWidth=function(){var a=this.options.isFitWidth?this.element.parentNode:this.element,c=b(a);this.containerWidth=c&&c.innerWidth},d.prototype._getItemLayoutPosition=function(a){a.getSize();var b=a.size.outerWidth%this.columnWidth,d=b&&1>b?"round":"ceil",e=Math[d](a.size.outerWidth/this.columnWidth);e=Math.min(e,this.cols);for(var f=this._getColGroup(e),g=Math.min.apply(Math,f),h=c(f,g),i={x:this.columnWidth*h,y:g},j=g+a.size.outerHeight,k=this.cols+1-f.length,l=0;k>l;l++)this.colYs[h+l]=j;return i},d.prototype._getColGroup=function(a){if(2>a)return this.colYs;for(var b=[],c=this.cols+1-a,d=0;c>d;d++){var e=this.colYs.slice(d,d+a);b[d]=Math.max.apply(Math,e)}return b},d.prototype._manageStamp=function(a){var c=b(a),d=this._getElementOffset(a),e=this.options.isOriginLeft?d.left:d.right,f=e+c.outerWidth,g=Math.floor(e/this.columnWidth);g=Math.max(0,g);var h=Math.floor(f/this.columnWidth);h-=f%this.columnWidth?0:1,h=Math.min(this.cols-1,h);for(var i=(this.options.isOriginTop?d.top:d.bottom)+c.outerHeight,j=g;h>=j;j++)this.colYs[j]=Math.max(i,this.colYs[j])},d.prototype._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var a={height:this.maxY};return this.options.isFitWidth&&(a.width=this._getContainerFitWidth()),a},d.prototype._getContainerFitWidth=function(){for(var a=0,b=this.cols;--b&&0===this.colYs[b];)a++;return(this.cols-a)*this.columnWidth-this.gutter},d.prototype.needsResizeLayout=function(){var a=this.containerWidth;return this.getContainerWidth(),a!==this.containerWidth},d}var c=Array.prototype.indexOf?function(a,b){return a.indexOf(b)}:function(a,b){for(var c=0,d=a.length;d>c;c++){var e=a[c];if(e===b)return c}return-1};"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size"],b):a.Masonry=b(a.Outlayer,a.getSize)}(window);
\ No newline at end of file