// Consolidated JS file assembled at Mon Nov 07 19:21:01 PST 2011
// includes the following resources (ILRN-30440):

// /home/bca/ilrn/root/build/processed-media/js/classes/org/hypher/Core.js (Fri Jul 27 21:35:54 PDT 2007)
// /home/bca/ilrn/root/build/processed-media/js/classes/org/hypher/ui/util/ImageRolloverHelper.js (Fri Jul 27 21:35:53 PDT 2007)
// /home/bca/ilrn/root/build/processed-media/js/classes/com/thomson/ui/util/ElemBuilder.js (Fri Jul 27 21:35:51 PDT 2007)
// /home/bca/ilrn/root/build/processed-media/js/util/ieEmbedFixer.js (Fri Jul 27 21:35:54 PDT 2007)
// /home/bca/ilrn/root/build/processed-media/js/classes/com/thomson/OldEventsHelper.js (Fri Jul 27 21:35:53 PDT 2007)

var _PACKAGE="org.hypher";

// ----- Start Consolidation: /home/bca/ilrn/root/build/processed-media/js/classes/org/hypher/Core.js







//#extends org.hypher.core.Callbacks
//#extends org.hypher.core.Globals
//#extends org.hypher.core.Class
//#extends org.hypher.core.JSObject
//#extends org.hypher.core.OOP
//#extends org.hypher.core.Exception
//#extends org.hypher.core.Reference
//#extends org.hypher.core.extensions.Object
//#extends org.hypher.core.extensions.Function
//#extends org.hypher.core.extensions.String
//#extends org.hypher.core.JSOL


//#extends org.hypher.util.WindowUtil
//#extends org.hypher.core.Cookie
//#extends org.hypher.core.Session
//#extends org.hypher.util.CallbackList
//#extends org.hypher.debug.Debug



//#import dwr JSOLService

Callbacks.hookEvent(window, "onunload", new Function(""));

function Core() {}
OOP.defineClass(Core);

Core.VERSION = 0.1;
Core.getVersionInfo = function()
{
return "Hypher.net Javascript Object Library (JSOL) Version: " + Core.VERSION;
}


// ----- End Consolidation: /home/bca/ilrn/root/build/processed-media/js/classes/org/hypher/Core.js

var _PACKAGE="org.hypher.ui.util";

// ----- Start Consolidation: /home/bca/ilrn/root/build/processed-media/js/classes/org/hypher/ui/util/ImageRolloverHelper.js

//#extends org.hypher.util.CustomTagger

function ImageRolloverHelper(tagNames)
{
this.$super(tagNames);
}

OOP.defineClass(ImageRolloverHelper, CustomTagger);

ImageRolloverHelper.prototype.setupElement = function(element)
{
ImageRolloverHelper.setupElement(element);
}


ImageRolloverHelper.setupElements = function(elements)
{
for (var i=0; i<elements.length; i++)
ImageRolloverHelper.setupElement(elements[i]);
}

ImageRolloverHelper.setupElement = function(element)
{
var oversrc = element.getAttribute("oversrc");

if (oversrc && oversrc.length > 0)
new ImageRolloverHelper.RolloverHandler(element);
}


ImageRolloverHelper.RolloverHandler = function RolloverHandler(img)
{
this.oImage = img;

this.overImage = null;
this.normalImage = null;

this.hook();
}
ImageRolloverHelper.RolloverHandler.NAME = "RolloverHandler";
ImageRolloverHelper.defineClass(ImageRolloverHelper.RolloverHandler);


ImageRolloverHelper.RolloverHandler.prototype.hook = function()
{
this.normalImage = new Image();

this.normalImage.src = this.oImage.src + "";
this.update();

Callbacks.hookEvent(this.oImage, "onmouseover", this.callback("handleMouseOver"));
Callbacks.hookEvent(this.oImage, "onmouseout", this.callback("handleMouseOut"));
}


ImageRolloverHelper.RolloverHandler.prototype.update = function()
{
var oversrc = this.oImage.getAttribute("oversrc");
if (!oversrc || oversrc.length < 1)
{
this.overImage = null;
}
else
{
if (this.overImage == null)
this.overImage = new Image();

if (this.overImage.src != oversrc)
this.overImage.src = oversrc;
}
}


ImageRolloverHelper.RolloverHandler.prototype.unhook = function()
{
Callbacks.unhookEvent(this.oImage, "onmouseover", this.callback("handleMouseOver"));
Callbacks.unhookEvent(this.oImage, "onmouseout", this.callback("handleMouseOut"));

if (this.normalImage.src)
this.oImage.src = this.normalImage.src;
}


ImageRolloverHelper.RolloverHandler.prototype.handleMouseOver = function()
{
this.update();

if (this.overImage)
this.oImage.src = this.overImage.src;
}


ImageRolloverHelper.RolloverHandler.prototype.handleMouseOut = function()
{
if (this.normalImage.src)
this.oImage.src = this.normalImage.src;
}

// ----- End Consolidation: /home/bca/ilrn/root/build/processed-media/js/classes/org/hypher/ui/util/ImageRolloverHelper.js

var _PACKAGE="com.thomson.ui.util";

// ----- Start Consolidation: /home/bca/ilrn/root/build/processed-media/js/classes/com/thomson/ui/util/ElemBuilder.js




//#uses org.hypher.ui.util.DOMUtil
//#uses org.hypher.ui.util.ImageRolloverHelper

function ElemTemplate()
{
this.__elemTemplate = true;
this.rootNode = DOMUtil.newElement("div");
this.insertionPoints = new Array;
this.markPoints = new Array;
}


function ElemBuilder(parent)
{
if (typeof(parent) == "undefined")
parent = document.body;

this.parent = parent;
this.curElem = parent;
this.template = null;

if (parent && parent.__elemTemplate && parent.__elemTemplate != window.undefined && parent.__elemTemplate==true)
{
this.template = parent;
this.parent = this.template.rootNode;

this.mark = ElemBuilder.mark;
this.insertion = ElemBuilder.insertion;
}
}

ElemBuilder.mark = function(name)
{
this.template.markPoints[name] = curElem;
}
ElemBuilder.insertion = function(name)
{
this.template.insertionPoints[name] = curElem;
}




function px(val)
{
if (typeof val == "string" && val.substring(val.length-2) == "px")
return val;

return val + "px";
}


ElemBuilder.prototype.elem = function(type)
{
this.curElem = DOMUtil.newElement(type, this.curElem);
}


ElemBuilder.prototype.end = function()
{
while (this.curElem != this.parent && this.curElem._ebSkip)
this.curElem = this.curElem.parentNode;

if (this.curElem != this.parent)
this.curElem = this.curElem.parentNode;
}


ElemBuilder.prototype.attr = ElemBuilder.prototype.attribute = function(name, value)
{
this.curElem.setAttribute(name, value);
}


ElemBuilder.prototype.style = function(name, value)
{
if (typeof(name) != "string")
name = "" + name;

var i = name.indexOf('-');
while (i > 0)
{
name = name.substring(0, i) + name.substring(i+1, i+2).toUpperCase() + name.substring(i+2, name.length);
i = name.indexOf('-');
}

this.curElem.style[name] = value;
}


ElemBuilder.prototype.text = ElemBuilder.prototype.content = function(value1, value2)
{
if (this.curElem.customButton)
this.curElem.customButton.setText(value1, value2);
else
this.curElem.innerHTML = value1;
}

var g_shortcutElems = ["table", "tbody", "td", "th", "strong", "em", "big", "small", "a", "div", "span", "hr", "img", "form",
"select", "option", "textarea", "button", "iframe", "button"];
var g_shortcutAttributes = ["href", "value", "type", "name", "id", "src", "align", "valign", "alt"];
var g_shortcutStyles = ["border", "width", "height", "left", "right", "top", "bottom", "position", "display", "visibility", "zIndex", "margin", "borderLeft", "borderRight", "borderTop", "borderBottom"];
var g_shortcutEvents = ["onclick", "onmouseover", "onmouseout", "onkeyup", "onkeydown", "onkeypress", "onload", "onerror", "onchange"];

for (var i in g_shortcutElems)
ElemBuilder.prototype[g_shortcutElems[i]] = new Function("this.elem(\""+g_shortcutElems[i]+"\")");

for (var i in g_shortcutAttributes)
ElemBuilder.prototype[g_shortcutAttributes[i]] = new Function("value", "this.attr(\""+g_shortcutAttributes[i]+"\", value);");

for (var i in g_shortcutStyles)
ElemBuilder.prototype[g_shortcutStyles[i]] = new Function("value", "this.style(\""+g_shortcutStyles[i]+"\", value);");

for (var i in g_shortcutEvents)
ElemBuilder.prototype[g_shortcutEvents[i]] = new Function("handler", "hookEventUnattached(this.curElem, \""+g_shortcutEvents[i]+"\", handler);");

ElemBuilder.prototype.cursor = function(value)
{
if (value == "default")
this.style("cursor", value);
else
{
this.style("cursor", "pointer");
this.style("cursor", value);
}
}
ElemBuilder.prototype.italic = function()
{
this.elem("i");
}
ElemBuilder.prototype.bold = function()
{
this.elem("b");
}
ElemBuilder.prototype.underline = function()
{
this.elem("u");
}

ElemBuilder.prototype.tr = function()
{
if (this.curElem.nodeName.toLowerCase() != "tbody")
{
this.elem("tbody");
this.curElem._ebSkip = true;
}

this.elem("tr");
}

ElemBuilder.prototype.input = function(type)
{
this.curElem = DOMUtil.newInput(type, this.curElem);
}

ElemBuilder.prototype.ilrnButton = function(style, text, overText, labelCssStyle)
{
if (typeof style == "undefined")
style = "white";

var cb = new CustomButton(style, this.curElem, text, overText);
if (labelCssStyle && typeof labelCssStyle != "undefined") {
cb.labelCssStyle = labelCssStyle;
}
cb.render();
cb.table.customButton = cb;

this.curElem = cb.table;

return cb;
}

ElemBuilder.prototype.colspan = function(val)
{
this.attr("colspan", val);
this.curElem.colSpan = val;
}

ElemBuilder.prototype.rowspan = function(val)
{
this.attr("rowspan", val);
this.curElem.rowSpan = val;
}

ElemBuilder.prototype.cellpadding = function(val)
{
this.attr("cellpadding", val);
this.curElem.cellPadding = val;
}

ElemBuilder.prototype.cellspacing = function(val)
{
this.attr("cellspacing", val);
this.curElem.cellSpacing = val;
}

ElemBuilder.prototype.pos = function(x, y)
{
if (!isNaN(x))
x = x + "px";

if (!isNaN(y))
y = y + "px";

this.left(x);
this.top(y);
}

ElemBuilder.prototype.size = function(width, height)
{
this.width(width);
this.height(height);
}

ElemBuilder.prototype.oversrc = function(value)
{
this.attr("oversrc", value);

ImageRolloverHelper.setupElement(this.curElem);
}

ElemBuilder.prototype.background = ElemBuilder.prototype.bg = function(value)
{
this.style("background", value);
}

ElemBuilder.prototype.cssClass = ElemBuilder.prototype.className = ElemBuilder.prototype.css = function(value)
{
this.attribute("class", value);
this.curElem.className = value;
}

// ----- End Consolidation: /home/bca/ilrn/root/build/processed-media/js/classes/com/thomson/ui/util/ElemBuilder.js

var _PACKAGE="util/ieEmbedFixer";

// ----- Start Consolidation: /home/bca/ilrn/root/build/processed-media/js/util/ieEmbedFixer.js

function writeAppletCode(data){document.write(data);}

function EmbedWriter(tag)
{
this.tag = tag;
this.attributeMap = new Object;
this.paramMap = new Object();
this.bodyHTML = "";
}

EmbedWriter.prototype.attribute = function(name, value)
{
this.attributeMap[name] = value;
}

EmbedWriter.prototype.param = function(name, value)
{
this.paramMap[name] = value;
}

EmbedWriter.prototype.attributes = function(map)
{
for (var i in map)
this.attributeMap[i] = map[i];
}

EmbedWriter.prototype.params = function(map)
{
for (var i in map)
this.paramMap[i] = map[i];
}

EmbedWriter.prototype.body = function(text)
{
this.bodyHTML = text;
}

EmbedWriter.prototype.end = function()
{
var out = "";

out += "<" + this.tag;
for (var i in this.attributeMap)
{
out += " " + i + "=\"";
var value = this.attributeMap[i]+"";
value = value.split('"').join("&quot;");
value = value.split('>').join("&gt;");
value = value.split('<').join("&lt;");
out += value + '"';
}
out += ">";

out += this.bodyHTML;

for (var i in this.paramMap)
{
out += "<param name=\"" + i + "\" value=\"";
var value = this.paramMap[i]+"";
value = value.split('"').join("&quot;");
value = value.split('>').join("&gt;");
value = value.split('<').join("&lt;");
out += value + '" \>';
}

out += "</" + this.tag + ">";

document.write(out);
}

function AppletWriter()
{
this.$super("applet");
}
AppletWriter.prototype = new EmbedWriter();
AppletWriter.prototype.$super = EmbedWriter;

// ----- End Consolidation: /home/bca/ilrn/root/build/processed-media/js/util/ieEmbedFixer.js

var _PACKAGE="com.thomson";

// ----- Start Consolidation: /home/bca/ilrn/root/build/processed-media/js/classes/com/thomson/OldEventsHelper.js







//#uses org.hypher.util.StringUtil
//#uses org.hypher.ui.util.DOMUtil
//#uses org.hypher.util.MouseUtil
//#uses com.thomson.ui.util.ElemBuilder
//#uses org.hypher.util.WindowUtil
//#uses org.hypher.ui.util.ImageRolloverHelper
//#uses com.thomson.DWRHelper
//#import js:util/ieEmbedFixer.js


var g_jsFile_events_js = true;

var Stack = Array;

function debugMessage() {}
var extendClass = OOP.defineClass;
var defineClass = OOP.defineClass;

new ImageRolloverHelper(["img", "input"]);


function runOnce(code)
{
code();
}


var allowExit = true;


function exitOK(form)
{
return !OOP.getClass("com.thomson.form.EditSession") || EditSession.isExitOk(form);
}


function setAllowExitMessage(message)
{
if (OOP.getClass("com.thomson.form.EditSession"))
EditSession.exitMessage = message;
}




function isSafari()
{
return isSafari.checkValue;
}
isSafari.checkValue = navigator.userAgent.match(/Safari/i);


function isIE()
{
return (navigator.userAgent.indexOf('MSIE')!=-1);
}


function isPageLoaded()
{
return WindowUtil.isLoaded();
}


function isDebugMode()
{
return typeof(DEBUG) != "undefined" && DEBUG;
}


function getTime()
{
return (new Date).getTime();
}


function trim(str, chars)
{
return str.trim(chars);
}


function translateDateYear(year)
{
return TimeUtil.translateDateYear(year);
}



function trimLeft(str, chars)
{
return str.trimLeft(chars);
}


function trimRight(str, chars)
{
return str.trimRight(chars);
}


var getElementsByTagNames = DOMUtil.getElementsByTagNames;


var stripHTML = StringUtil.stripHTML;


var setSelectionRange = DOMUtil.setSelectionRange;


function getEvent(ev)
{
var e = ev;
try
{
if (event && typeof(ev) == "undefined")
{
e = event;
e.target = e.srcElement;
}
}
catch (x)
{
}

return e;
}


var isChildElem = DOMUtil.isChildElem;


var getTBody = DOMUtil.getTBody;


function createElem(name, attributes, parent)
{
var attrMap = new Object;

if (attributes && attributes.length)
{
for (var i=0; i<attributes.length; i++)
{
var attr = attributes[i];
attrMap[attr[0]] = attr[1];
}
}
else
attrMap = attributes;

return DOMUtil.newElement(name, parent, attrMap);
}


function createInput(type, name, parent)
{
return createElem("input", [["type", type], ["name", name]], parent);
}


function createTd(parent)
{
return createElem("td", null, parent);
}


function insertAfter(nodeToInsert, afterNode)
{
afterNode.insertAfter(nodeToInsert);
}


var getInputTextBeforeSelection = DOMUtil.getInputTextBeforeSelection;


var getInputSelectionInfo = DOMUtil.getInputSelectionInfo;


var replaceInputSelection = DOMUtil.replaceInputSelection;


var addCSSClass = DOMUtil.addCSSClass;


var removeCSSClass = DOMUtil.removeCSSClass;


var getElementPosition = Point.fromElementPosition;


function createTh(parent)
{
return createElem("th", null, parent);
}


function createDiv(parent)
{
return createElem("div", null, parent);
}


function createSpan(parent)
{
return createElem("span", null, parent);
}


function createTable(parent)
{
return createElem("table", null, parent);
}


function createTBody(parent)
{
return createElem("tbody", null, parent);
}


function createTr(parent)
{
return createElem("tr", null, parent);
}


function createImg(src, parent)
{
return createElem("img", [["src", src], ["border", 0]], parent);
}


var elem = $;



function alertObj(o, substr)
{
alert(StringUtil.dumpObject(o, null, null, substr));
}


var storeObject = Callbacks.storeObject;


var retriveObject = Callbacks.getObject;


var unstoreObject = Callbacks.unstoreObject;



var parsePx = StringUtil.parsePx;



function getIframeDocument(ID)
{
var iFrame = document.getElementById(ID);
var data = null;

if (iFrame.contentDocument)
{
data = iFrame.contentDocument;
}
else if (iFrame.contentWindow)
{
data = iFrame.contentWindow.document;
}
else if (document.all)
{

if (document.frames[ID])
data = document.frames[ID].document;
}
return data;
}


function getIframeWindow(ID)
{
if (typeof(ID) != "string" && ID)
{
var id2 = "__tmpIframe_" + (Math.random() * 10000);
ID.id = id2;
ID = id2;
}
else
{
return null;
}

var iFrame = document.getElementById(ID);
var data = null;

if (iFrame.contentWindow)
{
data = iFrame.contentWindow;
}
if (document.all)
{
data = document.frames[ID];
}
return data;
}


function showIFrame(iframe, show)
{
if (!iframe)
return;

if (isSafari())
{
iframe.style.visibility = show ? "visible" : "hidden";
}
else
{
iframe.style.display = show ? "" : "none";
iframe.style.visibility = "visible";
}
}


function isIFrameShown(iframe)
{

return iframe.style.display != "none" && iframe.style.visibility != "hidden";
}




var hookEventReturn = Callbacks.hookEvent;


var hookEvent = Callbacks.hookEvent;

hookEvent(window, "onload", new Function());


var hookEventUnattached = Callbacks.hookEvent;;


var unhookEvent = Callbacks.unhookEvent;


function hookEnterPressEvent(target, handlerFunction, allowReturn)
{
if (!handlerFunction)
return;

if (!allowReturn && (allowReturn != false))
allowReturn = true;


Callbacks.hookEvent(target, "onkeypress", function(ev, t)
{
if (ev.keyCode == 13)
{
var ret = handlerFunction(ev, t);
if (allowReturn)
return ret;
}
});
}




var g_futureEvents = [null];

function _dumpFutureEvents()
{
var report = "<b>" + g_futureEvents.length + " Future Events</b><br/><ul>";
for (var i=0; i<g_futureEvents.length; i++)
{
var fe = g_futureEvents[i];
if (fe == null)
continue;

report += "<li><b>"+i+"</b>: " + fe.action + "</li>";
}

report += "</ul>";

dm(report);
}


function FutureEvent(action)
{
this.action = action;
this.id = g_futureEvents.length;

this.scheduled = false;
this.timeoutId = null;


g_futureEvents[this.id] = this;
}


FutureEvent.prototype.execute = function()
{
this.scheduled = false;
this.action();

if (!this.scheduled)
this.cancel();
}

FutureEvent.prototype.toString = function()
{
return this.id ? this.id.toString() : "&lt;unscheduled&gt;";
}


FutureEvent.prototype.schedule = function(timeout)
{
if (this.scheduled)
clearTimeout(this.timeoutId);
else
this.scheduled = true;

this.timeoutId = setTimeout(callback(this, "execute"), timeout);
}


FutureEvent.prototype.cancel = function()
{
if (this.scheduled)
clearTimeout(this.timeoutId);

g_futureEvents[this.id] = null;

this.scheduled = false;
this.action = null;
this.id = null;
}


FutureEvent.fromId = function(obj)
{
if (obj && obj.prototype == FutureEvent.prototype)
return obj;

return obj ? g_futureEvents[obj.toString()] : null;
}


function scheduleEventUnattached(action, timeout)
{
return scheduleEvent(action, timeout);
}


function scheduleEvent()
{
var timeout, func;

if (arguments.length == 3)
{
func = callback(arguments[0], arguments[1]);
timeout = arguments[2];
}
else if (arguments.length == 2)
{
func = arguments[0];
timeout = arguments[1];
}

var futureEvent = new FutureEvent(func);
futureEvent.schedule(timeout);

return futureEvent;
}


function rescheduleEvent(id, timeout)
{
var futureEvent = FutureEvent.fromId(id);

if (futureEvent != null)
{
futureEvent.schedule(timeout);
return futureEvent.id;
}

return null;
}


function unscheduleEvent(id)
{
var futureEvent = FutureEvent.fromId(id);

if (futureEvent != null)
futureEvent.cancel();
}




function hookOnloadUnattached(action)
{
doOnload(action);
}
function doOnload(action)
{
if (isPageLoaded())
{
action();
}
else
{
Callbacks.hookEvent(window, "onload", action);
}
}
function doOnunload(action)
{
hookEventUnattached(window, "onunload", action);
}


function getDocumentScroll()
{
var pos = new Point();
pos.x = document.body.scrollLeft;
pos.y = document.body.scrollTop;

return pos;
}


function setDocumentScroll(pos)
{
if (document.documentElement)
{
document.documentElement.scrollLeft = pos.x;
document.documentElement.scrollTop = pos.y;
}

document.body.scrollLeft = pos.x;
document.body.scrollTop = pos.y;


return pos;
}


function realEscape(string)
{
return escape(string).split("+").join("%2B");
}


function realUnescape(string)
{
return unescape(string.split("+").join(" "));
}


function convertObjectToQueryString(args)
{
var argString = "";
if (typeof(args) == "string" || typeof(args) == "number")
{
argString = args;
}
else
{
for (var i in args)
{
var arg = args[i];

if (typeof(arg) == "array" || typeof(arg) == "object")
{
for (var j in arg)
argString += realEscape(i) + "=" + realEscape(arg[j]) + "&";
}
else
argString += realEscape(i) + "=" + realEscape(arg) + "&";
}
}

if (argString.substring(argString.length-1, argString.length) == "&")
argString = argString.substring(0, argString.length-1);

return argString;
}


function appendQueryStringToURL(url, queryString)
{
if (url.indexOf('?') > 0)
url += "&" + queryString;
else
url += "?" + queryString;

return url;
}




function newHTTPXMLRequestHandler()
{
var handler = null;

if (window.XMLHttpRequest)
handler = new XMLHttpRequest();
else if (window.ActiveXObject)
handler = new ActiveXObject("Microsoft.XMLHTTP");

return handler;
}


function deleteHTTPXMLRequestHandler(handler)
{
}


function HTTPRequest(url, async)
{
url = "" + url;

this.url = url;
this.params = null;

var paramIndex = url.indexOf('?');
if (paramIndex >= 0)
{
this.params = url.substring(paramIndex + 1);
this.url = url.substring(0, paramIndex);
}

this.async = async;
this.request = null;
this.onerror = null;
this.onload = null;
this.objId = -1;

this.contentText = null;
this.contentDocument = null;

this.status = 0;
this.message = "";
}


HTTPRequest.prototype.onStateChange = function()
{
if (this.request.readyState == 4)
{
delete this.request.onreadystatechange;
this.handleLoad();
}
}


HTTPRequest.prototype.handleLoad = function()
{
if (this.request == null)
return;

this.status = this.request.status;
this.message = this.request.statusText;

this.contentDocument = this.request.responseXML;
this.contentText = this.request.responseText;

if (this.status == 200)
{
if (this.onload)
this.onload(this);
}
else
{
if (this.onerror)
this.onerror(this);
}

delete this.request;
this.request = null;
}

HTTPRequest.prototype.send = function()
{
this.request = newHTTPXMLRequestHandler();

if (this.request == null)
return false;

this.objId = storeObject(this);


var requestRef = this;
this.request.onreadystatechange = function()
{
requestRef.onStateChange();
}

this.request.open("POST", this.url, this.async);
this.request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");

if (typeof this.request.overrideMimeType == "function")
this.request.overrideMimeType('text/xml');


this.request.send(this.params);

if (!this.async)
{
this.handleLoad();
return this.request.responseText;
}
else
return true;
}


function sendHTTPRequest(url, onload, onerror)
{
var request = new HTTPRequest(url, true);

if (typeof(onload) != "undefined")
{
hookEventUnattached(request, "onload", onload);

if (typeof(onerror) != "undefined")
{
hookEventUnattached(request, "onerror", onerror);
}
}

request.send();
}


function setLocation(location)
{
if (exitOK())
self.location = location;
}


function getLocation()
{
return window.location;
}


var scrollToElement = DOMUtil.scrollToElement;

function _doCall(func, args)
{
func.apply(null, args);
}

function _doCallback(obj, method, args)
{
obj[method].apply(obj, args);
}

var callback = Callbacks.instanceCallback;


var getViewportSize = DOMUtil.getViewportSize;

var removeElem = DOMUtil.deleteElement;

function formatPercent(value, dots)
{
if (dots == window.undefined)
dots = 2;

return formatFloat(value, 2) + "%";
}


function escapeHTML(html, convertLineBreaks)
{
html = html.split("&").join("&amp;");
html = html.split("<").join("&lt;");
html = html.split(">").join("&gt;");
html = html.split("\n").join("<br/>");

return html;
}

function formatFloat(number, places)
{
return StringUtil.formatFloat(number, 0, places);
}

function padNumber(number, len)
{
number = number + "";
while (number.length < len)
number = "0" + number;

return number;
}


function formatFileSize(size)
{
var unitsList = ["B", "KB", "MB", "GB", "TB"];

var unitsIndex = 0;
while (size >= 1024 && unitsIndex < unitsList.length)
{
size /= 1024;
unitsIndex++;
}

return formatFloat(size, 2) + " " + unitsList[unitsIndex];
}


var parseBool = StringUtil.parseBool;

// ----- End Consolidation: /home/bca/ilrn/root/build/processed-media/js/classes/com/thomson/OldEventsHelper.js


