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('