/*********************************************
Name: browser.js
Version: 2.47
Author: Jerry Bucci
Copyright © 1997-2008 Property2000 Corporation
*********************************************/
// Global Namespaces
if ("undefined" == typeof($P2K))
	var $P2K	= {};	// Main Namespace
if ("undefined" == typeof($G))
	var $G		= {};	// Global Namespace
$G.hasPDFReader		= null;
$G.jsCrLf			= "\r\n";
$G.sScriptFragment	= "(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)";

// Browser Sniffer Object
var is	= new TBrowser();
function TBrowser()
{
	var $	= this;
	var ua	= navigator.userAgent.toLowerCase()+" ";
	var fox	= (ua.indexOf("firefox") != -1);
	var gec	= (ua.indexOf("gecko/") != -1);
	var kde	= (ua.indexOf("konqueror") != -1);
	var moz	= (gec && /gecko\/\d{8}\s*$/.test(ua));
	var nsG	= (gec && ua.indexOf("netscape") != -1);
	var op	= (ua.indexOf("opera") != -1);
	var sa	= (ua.indexOf("safari") != -1);
	var ie	= (ua.indexOf("msie") != -1 && !op);
	var $r	= navigator.appVersion;
	$.khtml	= (ua.indexOf("khtml") != -1) || kde || sa;
	$.compat= (ua.indexOf("compatible") != -1);
	$.spoof	= (ua.indexOf("spoofer") != -1);
	$.webtv	= (ua.indexOf("webtv") != -1);
	var ns	= (ua.indexOf("mozilla") != -1 && !$.compat && !gec && !op && !sa && !kde && !$.spoof && !$.webtv);
	$.geckoVer	= (gec) ? ua.replace(/(^.*gecko\/| .*$)/g, "") : "";
	$.mozRev	= (gec) ? ua.replace(/(^.*rv\:|\).*$)/g, "") : "";
	if (ie)
		$r	= ua.substring(ua.indexOf("msie")+5);
	else if (moz)
		$r	= $.mozRev;
	else if (fox)
		$r	= ua.substring(ua.indexOf("firefox/")+8);
	else if (nsG)
		$r	= ua.substring(ua.indexOf("/", ua.indexOf("netscape"))+1);
	else if (op)
		$r	= ua.substring(ua.indexOf("opera")+6);
	else if (sa)
		$r	= ua.substring(ua.indexOf("safari/")+7);
	else if (kde)
		$r	= ua.substring(ua.indexOf("konqueror/")+10);
	$r		= parseFloat($r);
	var $v	= parseInt($r, 10);
	$.ieDOM	= (ie && $v >= 4);
	$.ie3	= (ie && $v  < 4);
	$.ie4	= (ie && $v == 4);
	$.ie4up	= (ie && $v >= 4);
	$.ie5	= (ie && $v == 5);
	$.ie5up	= (ie && $v >= 5);
	$.ie55	= (ie && $r >= 5.5 && $r < 6);
	$.ie55up= (ie && $r >= 5.5);
	$.ie6	= (ie && $v == 6);
	$.ie6up	= (ie && $v >= 6);
	$.ie7	= (ie && $v == 7);
	$.ie7up	= (ie && $v >= 7);
	$.moz1		= (moz && $r >= 1 && $r < 1.1);
	$.moz11		= (moz && $r >= 1.1 && $r < 1.2);
	$.moz11up	= (moz && $r >= 1.1);
	$.moz12		= (moz && $r >= 1.2 && $r < 1.3);
	$.moz13		= (moz && $r >= 1.3 && $r < 1.4);
	$.moz14		= (moz && $r >= 1.4 && $r < 1.5);
	$.moz15		= (moz && $r >= 1.5 && $r < 1.6);
	$.moz16		= (moz && $r >= 1.6 && $r < 1.7);
	$.moz17		= (moz && $r >= 1.7 && $r < 1.8);
	$.moz17up	= (moz && $r >= 1.7);
	$.moz18		= (moz && $r >= 1.8 && $r < 1.9);
	$.moz18up	= (moz && $r >= 1.8);
	$.ffox1		= (fox && $v == 1);
	$.ffox1up	= (fox && $r >= 1);
	$.ns2	= (ns && $v == 2);
	$.ns3	= (ns && $v == 3);
	$.ns4	= (ns && $v == 4);
	$.ns6	= (nsG && $v == 6);
	$.ns6up	= (nsG && $v >= 6);
	$.ns7	= (nsG && $v == 7);
	$.ns7up	= (nsG && $v >= 7);
	$.ns71	= (nsG && $r == 7.1);
	$.ns72	= (nsG && $r == 7.2);
	$.ns8	= (nsG && $v == 8);
	$.ns8up	= (nsG && $v >= 8);
	$.op3	= (op && $v == 3);
	$.op4	= (op && $v == 4);
	$.op5	= (op && $v == 5);
	$.op6	= (op && $v == 6);
	$.op7	= (op && $v == 7);
	$.op7up	= (op && $v >= 7);
	$.op72	= (op && $r == 7.2);
	$.op72up= (op && $r >= 7.2);
	$.op8	= (op && $v == 8);
	$.op8up	= (op && $v >= 8);
	$.sa1	= (sa && $v == 85);
	$.sa1up	= (sa && $v >= 85);
	$.sa11	= (sa && $v == 100);
	$.sa11up= (sa && $v >= 100);
	$.sa12	= (sa && $v == 125);
	$.sa12up= (sa && $v >= 125);
	$.sa13	= (sa && $v == 312);
	$.sa13up= (sa && $v >= 312);
	$.sa20	= (sa && $v == 412);
	$.sa20up= (sa && $v >= 412);
	$.kde2up	= (kde && $v >= 2);
	$.kde3		= (kde && $v == 3);
	$.kde3up	= (kde && $v >= 3);
	$.kde32		= (kde && $r == 3.2);
	$.kde32up	= (kde && $r >= 3.2);
	$.kde33		= (kde && $r == 3.3);
	$.kde33up	= (kde && $r >= 3.3);
	$.win	= (ua.indexOf("win") != -1);
	$.xpsp2	= ($.win && ua.indexOf("sv1") != -1);
	$.mac	= (ua.indexOf("mac") != -1);
	$.linux	= (ua.indexOf("linux") != -1);
	$.unix	= (ua.indexOf("x11") != -1);
	$.stdmode	= (document.compatMode) ? (document.compatMode == "CSS1Compat") : (sa) ? true : false;
	$.w3c	= (document.getElementById) ? true : false;
	$.DOM1	= ($.ieDOM || gec || $.op7up || sa || $.kde33up);
	$.agent	= ua;
	$.major	= $v;
	$.minor	= $r;
	$.ffox	= fox;
	$.gecko	= gec;
	$.ie	= ie;
	$.iemac	= (ie && $.mac);
	$.kde	= kde;
	$.moz	= moz;
	$.ns	= ns;
	$.nsG	= nsG;
	$.op	= op;
	$.safari= sa;
}

// ========================================================
// JavaScript Extensions (Expando)

// [Add IE 4+ DOM features to Netscape 6+ or equivalent]
if ("undefined" == typeof(document.all))
document.all = function()
{
	if ("string" != typeof(arguments[0])) return null;
	var	oElms	= (document.getElementsByName) ? document.getElementsByName(arguments[0]) : null;
	if (!oElms || oElms.length == 0)
		oElms	= (document.getElementById) ? document.getElementById(arguments[0]) : null;
	if (oElms && !oElms.tagName && "number" == typeof(oElms.length) && oElms.length < 2)
		return oElms[0];
	return oElms;
};
// [$() = doucment.all with element extensions]
function $()
{
	var aResult = [], oElm;
	for (var idx = 0, nLen = arguments.length; idx < nLen; idx++)
	{
		oElm	= arguments[idx];
		if ("string" == typeof(oElm))
			oElm	= document.all(oElm);
		if (oElm && !oElm.tagName && "number" == typeof(oElm.length))
			aResult	= aResult.concat(Array.toArray(oElm));
		else
			aResult.push($Element.extend(oElm));
	}
	return aResult.length < 2 ? aResult[0] : aResult;
}

// [Window Extensions]
if ("undefined" == typeof(window.navigate))
	window.navigate = TNavigate;
if ("undefined" == typeof(parent.navigate))
	parent.navigate = TNavigate;
if ("undefined" == typeof(top.navigate))
	top.navigate = TNavigate;
function TNavigate()
{
	if (arguments.get(0, "string", null))
		self.location.href	= arguments[0];
}
// Emulate XMLHttpRequest constructor
if (!window.XMLHttpRequest)
XMLHttpRequest = function()
{
	if (!window.ActiveXObject) return null;
	var aProgId	= ['MSXML2.XMLHTTP.5.0','MSXML2.XMLHTTP.4.0','MSXML2.XMLHTTP.3.0','MSXML2.XMLHTTP','Microsoft.XMLHTTP'];
	for (var idx = 0, nLen = aProgId.length; idx < nLen; idx++)
		try { return new ActiveXObject(aProgId[idx]); } catch (oError) {};
	return null;
};

// [Object Extensions; affects all objects]
if ("undefined" == typeof(Object.prototype.hasOwnProperty))
	Object.prototype.hasOwnProperty = function(sName)
	{
		try
		{
			if ("undefined" == typeof(this[sName])) return false;
			var $p	= this.constructor ? this.constructor.prototype : null;
			while ($p && $p !== this)
			{
				if ($p[sName] === this[sName])
					return false;
				$p	= $p.prototype;
			}
		}
		catch (oError) {};
		return true;
	};
if ("undefined" == typeof(Object.prototype.extend))
	Object.prototype.extend = function(oDest, oProp)
	{
		if (!oProp) { oProp = oDest; oDest = this.prototype ? this.prototype : this.constructor ? this.constructor.prototype : null; }
		for (var sKey in oProp)
			if (oProp.hasOwnProperty(sKey) && !oDest.hasOwnProperty(sKey))
				oDest[sKey]	= oProp[sKey];
		return oDest;
	};

Object.extend(
{
	addProperty: function(sName, oPropObj)
	{
		//oPropObj = { value: var [, validator: func()] [, visibility: "private|public=default"] [, throwerror: true|false=default] }
		if (oPropObj.visibility == "private")
			var value	= undefined;
		else
			this[sName]	= undefined;
		var sFuncName	= sName.charAt(0).toUpperCase() + sName.substring(1, sName.length);

		this["get" + sFuncName]	= (oPropObj.visibility == "private") ? function() { return value; } : function() { return this[sName]; };
		this["set" + sFuncName]	= function(vValue)
		{
			if (oPropObj.validator && !oPropObj.validator(vValue))
			{
				if (!!oPropObj.throwerror)
					throw new Error("set" + sFuncName + "() Error: Invalid value (" + vValue + ").");
				return false;
			}
			var vOldVal	= this["get" + sFuncName]();
			var oEvent	= { propertyName: sName, propertyOldValue: vOldVal, propertyNewValue: vValue, returnValue: true };
			this.onpropertychange(oEvent);
			if (!oEvent.returnValue)
				return false;
			if (oPropObj.visibility == "private")
				value		= oEvent.propertyNewValue;
			else
				this[sName]	= oEvent.propertyNewValue;
			return true;
		};
		this["set" + sFuncName](oPropObj.value);
	},
	alert: function()
	{
		var sLabel	= arguments.get(0, "string", "").trim();
		alert(sLabel + ((sLabel) ? ": " : "") + this);
	},
	clone: function()
	{
		if (is.safari && this.typeName() != "object")
			switch (this.typeName())
			{
				case "array":
					return this.concat();
				case "string":
					return new String(this);
				case "number":
					return new Number(this);
				case "date":
					return new Date(this.valueOf());
			}
		return this.extend({}, this);
	},
	cloneDeep: function()
	{
		var oObj	= new this.constructor();
		for (var sKey in this)
			if (this.hasOwnProperty(sKey) && !oObj.hasOwnProperty(sKey))
			{
				if (typeof(this[sKey]) == "object")
					oObj[sKey]	= this[sKey].cloneDeep();
				else
					oObj[sKey]	= this[sKey];
			}
		return oObj;
	},
	forEach: function(fnCallback, oThis)
	{
		for (var sName in this)
			if (this.hasOwnProperty(sName))
				fnCallback.call(oThis, this[sName], sName, this);
	},
	get: function(index, sType, vDefault, bFindObj)
	{
		// If valid element, returns the requested element else the default value.
		if ("number" != typeof(this.length) || "number" != typeof(index) || index < 0 || index >= this.length || "string" != typeof(sType)) return vDefault;
		var oElm	= this[index];
		if (bFindObj == true && "object" == sType && "string" == typeof(oElm) && is.DOM1) oElm = $(oElm);
		if (oElm==null || sType.indexOf(typeof(oElm)) == -1 && sType.indexOf(oElm.typeName()) == -1 && !(is.op && "object" == sType && "function" == typeof(oElm))) return vDefault;
		return oElm;
	},
	typeName: function()
	{
		var $t	= typeof(this);
		if ("object" != $t || !this.constructor) return $t;
		var $c	= this.constructor;
		if (Array	&& $c == Array)		return "array";
		if (Date	&& $c == Date)		return "date";
		if (RegExp	&& $c == RegExp)	return "regexp";
		if (Error	&& $c == Error)		return "error";
		if (Object	&& $c == Object)	return "object";
		if (Boolean	&& $c == Boolean)	return "boolean";
		if (Function&& $c == Function)	return "function";
		if (Number	&& $c == Number)	return "number";
		if (String	&& $c == String)	return "string";
		return $t;
	},
	//default onpropertychange() method – does nothing - used by addProperty()
	onpropertychange: function(oEvent){},
	toArray: function()
	{
		var aResult	= [];
		if ("number" == typeof(this.length))
			for (var idx = 0, nLen = this.length; idx < nLen; idx++)
				aResult.push($Element.extend(this[idx]));
		else
			for (var sName in this)
				if (this.hasOwnProperty(sName))
					aResult.push({ name: sName, value: this[sName] });
		return aResult;
	},
	toJSONString: function()
	{
		var $r	= [];
		this.forEach(function(oObj, sKey)
		{
			if (oObj && !oObj.toJSONString) return;
			var $v	= (oObj) ? oObj.toJSONString() : "null";
			$r.push(sKey.toJSONString() + ":" + $v);
		});
		return "{" + $r.join(",") + "}";
	},
	write: function()
	{
		var sLabel	= arguments.get(0, "string", "").trim();
		document.write(sLabel + ((sLabel) ? ": " : "") + this);
	},
	writeln: function()
	{
		var sLabel	= arguments.get(0, "string", "").trim();
		var sBreak	= arguments.get(1, "boolean", false) ? "<br />" : "";
		document.writeln(sLabel + ((sLabel) ? ": " : "") + this + sBreak);
	}
});

// [Function Extensions]
Function.extend(
{
	bind: function(object)
	{
		var __method = this, $a = arguments.toArray(), object = $a.shift();
		return function()
		{
			return __method.apply(object, $a.concat(arguments.toArray()));
		}
	},
	bindAsEventListener: function(object)
	{
		var __method = this, $a = arguments.toArray(), object = $a.shift();
		return function(event)
		{
			return __method.apply(object, [event || window.event].concat($a));
		}
	},
	toArray: function()
	{
		return this.toString().toArray();
	},
	toJSONString: function()
	{
		return this.toString();
	},
	// [Function Methods for old browser compatibility]
	apply: function()
	{
		var $o	= arguments[0] ? arguments[0] : window, $a = arguments[1];
		if ($a && $a.typeName() != "array" && $a.typeName() != "object" && typeof($a.length) != "number")
			throw new Error("Array or arguments object expected");
		$a		= ($a) ? $a.toArray() : [];
		$o.__$t	= this;
		var $r	= eval("$o.__$t(" + $a.join(",") + ")");
		$o.__$t	= null;
		return $r;
	},
	call: function()
	{
		var $a = arguments.toArray(), $o = $a.shift();
		return this.apply($o, $a);
	}
});

// [Array Extensions]
Array.getCheckBoxes = function(sIdMask, oForm)
{
	return Array.getElements("input", "checkbox", sIdMask, oForm);
}
Array.getElements = function()
{
	// [Array of elements of type, that share a common subString (sIdMask) in the ID or NAME properties.]
	// Set sIdMask to "*", to get all elements that match the TagName/Type.
	// sType does not occupy an argument position when sTagName != "INPUT".
	var idx = nLen	= 0;
	var sTagName	= arguments.get(idx++, "string", "*").trim().toUpperCase();
	var sType		= sTagName == "INPUT" ? arguments.get(idx++, "string", "").trim().toLowerCase() : "";
	var sIdMask		= arguments.get(idx++, "string", "*").trim();
	var oParent		= arguments.get(idx++, "object", document);
	var isDoc		= "undefined" != typeof(oParent.body);
	var isForm		= "undefined" != typeof(oParent.action);
	var isDOM1		= "undefined" != typeof(oParent.getElementsByTagName);
	if (!isDoc && !isForm && !isDOM1) return [];
	if (isDoc && !isDOM1)
	{
		if (oParent.forms.length == 0) return [];
		oParent	= oParent.forms[0];
		isDoc	= false;
		isForm	= true;
	}
	if (!sIdMask || !sTagName || sTagName == "INPUT" && !/^(button|checkbox|file|hidden|image|password|radio|reset|submit|text)$/i.test(sType))
		return [];
	var oElms	= (isDOM1) ? oParent.getElementsByTagName(sTagName) : oParent.elements;
	if (!oElms || oElms.length == 0)
		return [];
	var oArray	= [];
	var oElm	= null;
	for (idx = 0, nLen = oElms.length; idx < nLen; idx++)
	{
		oElm	= oElms[idx];
		if (!oElm || "string" != typeof(oElm.tagName) || sTagName != "*" && (oElm.tagName != sTagName || sTagName == "INPUT" && ("string" != typeof(oElm.type) || oElm.type != sType)))
			continue;
		if (sIdMask == "*" || "string" == typeof(oElm.id) && oElm.id.indexOf(sIdMask) != -1 || "string" == typeof(oElm.name) && oElm.name.indexOf(sIdMask) != -1)
			oArray[oArray.length]	= $Element.extend(oElm);
	}
	return oArray;
}
Array.getRadioButtons = function(sIdMask, oForm)
{
	return Array.getElements("input", "radio", sIdMask, oForm);
}
Array.toArray = function(object)
{
	if (!object) return [];
	if (object.toArray) return object.toArray();
	var aResult	= [];
	for (var idx = 0, nLen = object.length; nLen && idx < nLen; idx++)
		aResult.push($Element.extend(object[idx]));
	return aResult;
}
Array.extend(
{
	append: function()
	{
		for (var idx = 0; idx < arguments.length; idx++)
			this[this.length]	= arguments[idx];
	},
	clear: function()
	{
		this.length	= 0;
	},
	clone: function()
	{
		return this.concat();
	},
	contains: function(vItem)
	{
		return this.indexOf(vItem) > -1;
	},
	every: function(fnCallback, oThis)
	{
		for (var idx = 0, nLen = this.length; idx < nLen; idx++)
			if (!fnCallback.call(oThis, this[idx], idx, this))
				return false;
		return true;
	},
	filter: function(fnCallback, oThis)
	{
		var aResult	= [];
		for (var idx = 0, nLen = this.length; idx < nLen; idx++)
			if (fnCallback.call(oThis, this[idx], idx, this))
				aResult.push(this[idx]);
		return aResult;
	},
	forEach: function(fnCallback, oThis)
	{
		for (var idx = 0, nLen = this.length; idx < nLen; idx++)
			fnCallback.call(oThis, this[idx], idx, this);
	},
	getCheckBoxes: Array.getCheckBoxes,
	getElements: Array.getElements,
	getRadioButtons: Array.getRadioButtons,
	indexOf: function(vItem, nStart)
	{
		nStart	= (isNaN(nStart)) ? 0 : (nStart < 0) ? Math.max(0, this.length + nStart) : nStart;
		for (var idx = nStart, nLen = this.length; idx < nLen; idx++)
			if (this[idx] === vItem)
				return idx;
		return -1;
	},
	indexOfNoCase: function(vItem, nStart)
	{
		vItem	= ("string" == typeof(vItem)) ? vItem.toUpperCase() : vItem;
		nStart	= (isNaN(nStart)) ? 0 : (nStart < 0) ? Math.max(0, this.length + nStart) : nStart;
		for (var idx = nStart, nLen = this.length; idx < nLen; idx++)
			if ("string" == typeof(this[idx]))
			{
				if (this[idx].toUpperCase() === vItem)
					return idx;
			}
			else if (this[idx] === vItem)
				return idx;
		return -1;
	},
	insertAt: function(vItem, nIndex)
	{
		this.splice(nIndex, 0, vItem);
	},
	insertBefore: function(vItem, vBeforeItem)
	{
		this.insertAt(vItem, this.indexOf(vBeforeItem));
	},
	lastIndexOf: function(vItem, nStart)
	{
		nStart	= (isNaN(nStart) || nStart >= this.length) ? this.length - 1 : (nStart < 0) ? Math.max(0, this.length + nStart) : nStart;
		for (var idx = nStart; idx >= 0; idx--)
			if (this[idx] === vItem)
				return idx;
		return -1;
	},
	lastIndexOfNoCase: function(vItem, nStart)
	{
		vItem	= ("string" == typeof(vItem)) ? vItem.toUpperCase() : vItem;
		nStart	= (isNaN(nStart) || nStart >= this.length) ? this.length - 1 : (nStart < 0) ? Math.max(0, this.length + nStart) : nStart;
		for (var idx = nStart; idx >= 0; idx--)
			if ("string" == typeof(this[idx]))
			{
				if (this[idx].toUpperCase() === vItem)
					return idx;
			}
			else if (this[idx] === vItem)
				return idx;
		return -1;
	},
	map: function(fnCallback, oThis)
	{
		var aResult	= [];
		for (var idx = 0, nLen = this.length; idx < nLen; idx++)
			aResult.push(fnCallback.call(oThis, this[idx], idx, this));
		return aResult;
	},
	remove: function(vItem)
	{
		var idx	= this.indexOf(vItem);
		return (idx >= 0) ? this.removeAt(idx) : undefined;
	},
	removeAt: function(nIndex)
	{
		return this.splice(nIndex, 1)[0];
	},
	some: function(fnCallback, oThis)
	{
		for (var idx = 0, nLen = this.length; idx < nLen; idx++)
			if (fnCallback.call(oThis, this[idx], idx, this))
				return true;
		return false;
	},
	sum: function(fnCallback, oThis)
	{
		if (this.length == 0) return null;
		fnCallback	= fnCallback || function(vVal) { return vVal ? vVal : 0; };
		var vResult	= fnCallback.call(oThis, this[0], 0, this);
		for (var idx = 1, nLen = this.length; idx < nLen; idx++)
			vResult	+= fnCallback.call(oThis, this[idx], idx, this);
		return vResult;
	},
	toArray: function()
	{
		return this;
	},
	toJSONString: function()
	{
		var $r	= [];
		this.forEach(function(oObj)
		{
			if (oObj && !oObj.toJSONString) return;
			var $v	= (oObj) ? oObj.toJSONString() : "null";
			$r.push($v);
		});
		return "[" + $r.join(",") + "]";
	},
	// [Array Methods for old browser compatibility]
	pop: function()
	{
		var oElm	= this[this.length-1];
		this.length	= Math.max(this.length-1, 0);
		return oElm;
	},
	push: function()
	{
		for (var idx = 0; idx < arguments.length; idx++)
			this[this.length]	= arguments[idx];
		return this.length;
	},
	shift: function()
	{
		return this.removeAt(0);
	},
	unshift: function()
	{
		var idx;
		for (idx = this.length-1; idx >= 0; idx--)
			this[idx + arguments.length]	= this[idx];
		for (idx = 0; idx < arguments.length; idx++)
			this[idx]	= arguments[idx];
		return this.length;
	},
	splice: function(nStart, nDelCnt)
	{
		if (arguments.length < 2 || isNaN(nStart) || isNaN(nDelCnt)) return [];
		nStart	= (nStart < 0) ? Math.max(0, this.length + nStart) : nStart;
		var nEnd		= nStart + nDelCnt;
		var oDelArray	= this.slice(nStart, nEnd);
		var oEndArray	= this.slice(nEnd);
		this.length		= nStart;
		var idx;
		for (idx = 2; idx < arguments.length; idx++)
			this[this.length]	= arguments[idx];
		for (idx = 0; idx < oEndArray.length; idx++)
			this[this.length]	= oEndArray[idx];
		return oDelArray;
	}
});

// [String Extensions]
String.specialChar =
{
	'\b': '\\b',
	'\t': '\\t',
	'\n': '\\n',
	'\f': '\\f',
	'\r': '\\r',
	'"' : '\\"',
	'\\': '\\\\'
}
String.extend(
{
	addClassName: function(sClass)
	{
		sClass	= arguments.get(0, "string", "");
		return (this.removeClassName(sClass).trimRight()+" "+sClass).trim();
	},
	camelize: function()
	{
		var $t	= this.trim().split("-");
		var $n	= $t.length;
		if ($n == 1) return $t[0];
		var $r	= this.charAt(0) == "-" ? $t[0].charAt(0).toUpperCase() + $t[0].substr(1) : $t[0];
		for (var idx = 1; idx < $n; idx++)
			$r	+= $t[idx].charAt(0).toUpperCase() + $t[idx].substr(1);
		return $r;
	},
	capitalize: function()
	{
		return this.toProperCase();
	},
	clone: function()
	{
		return new String(this);
	},
	decodeURI: function()
	{
		try { return decodeURI(this); } catch (oError) { return this.unescape(); }
	},
	decodeURIComponent: function()
	{
		try { return decodeURIComponent(this); } catch (oError) { return this.unescape(); }
	},
	encodeURI: function()
	{
		try { return encodeURI(this); } catch (oError) { return this.escape(); }
	},
	encodeURIComponent: function()
	{
		try { return encodeURIComponent(this); } catch (oError) { return this.escape(); }
	},
	escape: function()
	{
		return escape(this);
	},
	evalScripts: function()
	{
		return this.extractScripts().map(eval);
	},
	extractScripts: function()
	{
		var matchAll	= new RegExp($G.sScriptFragment, "img");
		var matchOne	= new RegExp($G.sScriptFragment, "im");
		return (this.match(matchAll) || []).map(function(scriptTag)
		{
			return (scriptTag.match(matchOne) || ["", ""])[1];
		});
	},
	forEach: function(fnCallback, oThis)
	{
		this.toArray().forEach(function(sChar, nIndex) { fnCallback.call(oThis, sChar, nIndex, this); }, oThis);
	},
	get: function(index)
	{
		return this.charAt(index);
	},
	getDelimitedValue: function()
	{
		var $t	= this.trim();
		if ($t == "" || arguments.length < 1 || isNaN(arguments[0])) return $t;
		var idx			= parseInt(arguments[0], 10);
		var sDelimiter	= arguments.get(1, "string", "|");
		var aValues		= $t.split(sDelimiter);
		if (idx < 0 || idx >= aValues.length)
			return "";
		return aValues[idx];
	},
	getURLSearchValue: function()
	{
		var $t	= this.unescape().trim();
		if ($t == "" || arguments.length < 1 || "string" != typeof(arguments[0])) return $t;
		var sName	= arguments[0].trim().toLowerCase();
		var idx		= $t.indexOf("?");
		$t			= (idx != -1) ? $t.slice(idx+1) : $t;
		var aPairs	= $t.split("&");
		if (sName == "" || aPairs.length == 0)
			return "";
		for (idx = 0; idx < aPairs.length; idx++)
		{
			if (!aPairs[idx] || aPairs[idx].trim() == "")
				continue;
			var aValues	= aPairs[idx].split("=");
			if (aValues.length == 2 && aValues[0].trim().toLowerCase() == sName)
				return aValues[1].trim();
		}
		return "";
	},
	hasClassName: function(sClass)
	{
		sClass	= arguments.get(0, "string", "").trim();
		return (sClass) ? (new RegExp("\\b"+sClass+"\\b")).test(this) : false;
	},
	HtmlDecode: function()
	{
		if (this.length == 0) return "";
		var $t	= this.replace(/&amp;/g, "&");
		$t	= $t.replace(/&#38;/g, "&");
		$t	= $t.replace(/&quot;/g, '"');
		$t	= $t.replace(/&#34;/g, '"');
		$t	= $t.replace(/&lt;/g, "<");
		$t	= $t.replace(/&#60;/g, "<");
		$t	= $t.replace(/&gt;/g, ">");
		$t	= $t.replace(/&#62;/g, ">");
		$t	= $t.replace(/&#39;/g, "'");
		$t	= $t.replace(/&#92;/g, "\\");
		$t	= $t.replace(/&#09;/g, "\t");
		$t	= $t.replace(/&#13;/g, "\r");
		$t	= $t.replace(/&#10;/g, "\n");
		return $t;
	},
	HtmlEncode: function()
	{
		if (this.length == 0) return "";
	//	var $t	= this.JScriptDecode();
		var $t	= this.replace(/\&/g, "&amp;");
		$t	= $t.replace(/\"/g, "&quot;");
		$t	= $t.replace(/\</g, "&lt;");
		$t	= $t.replace(/\>/g, "&gt;");
		$t	= $t.replace(/\'/g, "&#39;");
		$t	= $t.replace(/\\/g, "&#92;");
		$t	= $t.replace(/\t/g, "&#09;");
		$t	= $t.replace(/\r/g, "&#13;");
		$t	= $t.replace(/\n/g, "&#10;");
		return $t;
	},
	indexOfNoCase: function()
	{
		var $v	= arguments.get(0, "string", "").toUpperCase();
		var idx	= arguments.get(1, "number", 0);
		return ($v) ? this.toUpperCase().indexOf($v, idx) : -1;
	},
	isAlphabetic: function()
	{
		return /^[a-z]+$/i.test(this);
	},
	isAlphanumeric: function()
	{
		return /^[a-z0-9]+$/i.test(this);
	},
	isDate: function()
	{
		var $r	= /^(\d{1,2})[\/\.-](\d{1,2})[\/\.-](\d{4})$/.test(this.trim());
		var $m	= RegExp.$1, $d = RegExp.$2, $y = RegExp.$3;
		$r	= $r && $m >= 1 && $m <= 12 && $d >= 1 && $d <= 31 && $y >= 1000;
		if (!$r) return $r;
		var $d1	= newDate(), $d2 = $d1.clone();
		$d1.setActualFullYear($y, $m, $d);
		$d2.setActualFullDate($y, $m, $d);
		return $d1.equalToDate($d2);
	},
	isEmailAddress: function()
	{
		return /^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,7}$/.test(this);
//		return /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(this);
	},
	isEmpty: function()
	{
		return !/.+/.test(this);
	},
	isFEIN: function()
	{
		return /^(\d{2})(\d{7})$|^(\d{2})[- ](\d{7})$/.test(this.trim()) && RegExp.$1 != "00" && RegExp.$2 != "0000000" && RegExp.$3 != "00" && RegExp.$4 != "0000000";
	},
	isFloat: function()
	{
		return /^-?(\d+\.\d*|\d*\.\d+|\d+)$/.test(this.trim());
	},
	isFtpURL: function()
	{
		return this.isURL() && /^ftp:/.test(this);
	},
	isFtpsURL: function()
	{
		return this.isURL() && /^ftps/.test(this);
	},
	isHttpURL: function()
	{
		return this.isURL() && /^http:/.test(this);
	},
	isHttpsURL: function()
	{
		return this.isURL() && /^https/.test(this);
	},
	isInt32: function()
	{
		var bAllowNeg	= arguments.get(0, "boolean", false);
		var bAllowZero	= arguments.get(1, "boolean", false);
		var nLowRange	= (bAllowNeg) ? -2147483648 : (bAllowZero) ? 0 : 1;
		return (!this.isInteger() || this.toInteger() > 2147483647 || this.toInteger() < nLowRange) ? false : true;
	},
	isInteger: function()
	{
		return /^-?\d+$/.test(this.trim());
	},
	isLowerCase: function()
	{
		return /^[a-z]+$/.test(this);
	},
	isNumber: function()
	{
		return /^\d+$/.test(this);
	},
	isNumeric: function()
	{
		return /^-?(\d+(\.\d*)?|\.\d+)$/.test(this);
	},
	isNumericFormatted: function()
	{
		return /^-?((\d(,?))+(\.\d*)?|\.\d+)$/.test(this);
	},
	isPassword: function()
	{
		var nMinLen		= arguments.get(0, "number", 0);
		var nMaxLen		= arguments.get(1, "number", 0);
		var isAlphaReq	= arguments.get(2, "boolean", false);
		var isDigitReq	= arguments.get(3, "boolean", false);
		var isUpLowReq	= arguments.get(4, "boolean", false);
		var bWhiteSpace	= arguments.get(5, "boolean", false);
		var sRE	= "^";
		sRE	+= (!nMinLen && !nMaxLen) ? "(?=.*)" : "(?=.{" + nMinLen + "," + ((nMaxLen) ? nMaxLen : "") + "})";
		if (isDigitReq)
			sRE	+= "(?=.*\\d)";
		sRE	+= (isUpLowReq) ? "(?=.*[a-z])(?=.*[A-Z])" : (isAlphaReq) ? "(?=.*[a-zA-Z])" : "";
		if (!bWhiteSpace)
			sRE	+= "(?!.*\\s)";
		return this.search(sRE) != -1;
	},
	isPhone: function()
	{
		return /^((\(\d{3}\)|(\d{3}))[-.\/ ]?)(\d{3})[-.\/ ]?(\d{4})$/.test(this.trim());
	},
	isSSN: function()
	{
		return /^(\d{3})(\d{2})(\d{4})$|^(\d{3})[- ](\d{2})[- ](\d{4})$/.test(this.trim()) && RegExp.$1 <= "779" && RegExp.$1 != "000" && RegExp.$2 != "00" && RegExp.$3 != "0000" && RegExp.$4 <= "779" && RegExp.$4 != "000" && RegExp.$5 != "00" && RegExp.$6 != "0000";
	},
	isUpperCase: function()
	{
		return /^[A-Z]+$/.test(this);
	},
	isURL: function()
	{
		return /^(ht|f)tps?\:\/\/(([\w_-]+):([\w_-]+)@)?([a-z0-9-]+\.)+[a-z0-9]+(:\d+)?(\/?[^#]*)?(#.*)?$/i.test(this.trim());
	},
	isWordChar: function()
	{
		return /^[a-z0-9!$%&_. +-]+$/i.test(this);
	},
	isZipCode: function()
	{
		return /^[0-9]{5}([- \/]?[0-9]{4})?$/.test(this.trim());
	},
	JScriptDecode: function()
	{
		if (this.length == 0) return "";
		var $t	= this.replace(/\\\\/g, "\\");
		$t	= $t.replace(/\\n/g, "\n");
		$t	= $t.replace(/\\r/g, "\r");
		$t	= $t.replace(/\\t/g, "\t");
		$t	= $t.replace(/\\'/g, "'");
		$t	= $t.replace(/\\"/g, '"');
		return $t;
	},
	JScriptEncode: function()
	{
		if (this.length == 0) return "";
		var $t	= this.HtmlDecode();
		$t	= $t.replace(/\\/g, "\\\\");
		$t	= $t.replace(/\"/g, '\\"');
		$t	= $t.replace(/\'/g, "\\'");
		$t	= $t.replace(/\t/g, "\\t");
		$t	= $t.replace(/\r/g, "\\r");
		$t	= $t.replace(/\n/g, "\\n");
		return $t;
	},
	lastIndexOfNoCase: function()
	{
		var $v	= arguments.get(0, "string", "").toUpperCase();
		var idx	= arguments.get(1, "number", this.length-1);
		return ($v) ? this.toUpperCase().lastIndexOf($v, idx) : -1;
	},
	normalizePath: function()
	{
		var $t	= this.decodeURI().trim().replace(/\/{3,}/g, "/").replace("://", ":~~");
		if ($t == "") return "";
		var sSlashB	= ($t.substr(0, 2) == "//") ? "//" : ($t.charAt(0) == "/") ? "/" : "";
		var sSlashE	= ($t.length > 1 && $t.charAt($t.length-1) == "/") ? "/" : "";
		var aPath	= $t.split("/").reverse();
		for (var idx = aPath.length; idx >= 0; idx--)
			if (aPath[idx] == "" || aPath[idx] == ".")
				aPath.removeAt(idx);
		return sSlashB + aPath.reverse().join("/").replace(":~~", "://") + sSlashE;
	},
	normalizeURL: function()
	{
		var $t		= this.normalizePath();
		var aURL	= $t.parseURL();
		if (!aURL) return $t;
		var sBase	= aURL.schemeAll + aURL.hostAll;
		return $t.replace(sBase, sBase.toLowerCase());
	},
	parseJSON: function(fnFilter)
	{
		try
		{
			if (/^("(\\.|[^"\\\n\r])*?"|[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t])+?$/.test(this))
			{
				var $j	= eval("(" + this + ")");
				if ("function" === typeof(fnFilter))
				{
					function walk($v, $k)
					{
						if ($v && "object" === typeof($v))
							for (var sKey in $v)
								if ($v.hasOwnProperty(sKey))
									$v[sKey]	= walk($v[sKey], sKey);
						return fnFilter($v, $k);
					}
					$j	= walk($j, "");
				}
				return $j;
			}
		}
		catch (oError) {};
		return null;
//		throw new SyntaxError("parseJSON");
	},
	parseURL: function()
	{
		var a=0,b=1,c=2,d=3,e=4,f=5,g=6,h=7,i=8,j=9,k=10,l=11,m=12,n=13,o=14,p=15,q=16,r=17,s=18,t=19,u=20,v=21,w=22;
		var sRE	= "^((((?:ht|f)tps?):)(\\/\\/(([\\w_-]+):([\\w_-]+)@)?((?:((?:[a-z0-9-]+\\.)*[a-z0-9-]+)\\.)*(([a-z0-9-]+)\\.([a-z0-9]+))|localhost)?(:(\\d+))?)([^?#]*\\/)?(([^?#]*)\\.([^?#]*)|[^?#]*)?)(\\?([^#]*))?(#(.*))?";
		if (is.gecko && is.mozRev < "1.6")
			sRE	= sRE.replace(/\*/, "*?");
		if (is.iemac)
		{
			sRE	= sRE.replace(/\?\:/g, "");
			e=5,f=6,g=7,h=8,i=9,j=11,k=13,l=14,m=15,n=16,o=17,p=18,q=19,r=20,s=21,t=22,u=23,v=24,w=25;
		}
		var aR	= this.match(new RegExp(sRE, "i"));
		if (!aR) return aR;
		for (var idx = 0, nLen = aR.length; idx < nLen; idx++)
			if ("string" != typeof(aR[idx]))
				aR[idx]	= "";
		return {url:aR[a],fullPath:aR[b],schemeAll:aR[c],scheme:aR[d],hostAll:aR[e],userNamePwd:aR[f],userName:aR[g],userPwd:aR[h],host:aR[i],subDomain:aR[j],domain:aR[k],secondLevelDomain:aR[l],topLevelDomain:aR[m],portAll:aR[n],port:aR[o],path:aR[p],file:aR[q],fileName:aR[r],fileExt:aR[s],queryStrAll:aR[t],queryStr:aR[u],bookmarkAll:aR[v],bookmark:aR[w]};
	},
	parseWords: function()
	{
		var bNormalize	= arguments.get(0, "boolean", false);
		var $v	= "", sChar = "", sLastChar = "";
		var $t	= this.replace(/[^A-Za-z0-9]/g, " ").trim();
		for (var idx = 0; idx < $t.length; idx++)
		{
			sChar		= $t.charAt(idx);
			sLastChar	= $t.charAt(idx - 1);
			if (sChar != " ")
			{
				if (sChar.isUpperCase() && sLastChar.isLowerCase() ||
					sChar.isNumber() && sLastChar.isAlphabetic() ||
					sChar.isAlphabetic() && sLastChar.isNumber())
					if ($v != "" && sLastChar != " ")
						$v	+= " ";
				$v	+= (sChar.isUpperCase() && sLastChar.isUpperCase()) ? sChar : sChar.toLowerCase();
			}
			else if (! bNormalize || bNormalize && sLastChar != " ")
				$v	+= sChar;
		}
		return $v;
	},
	removeClassName: function(sClass)
	{
		return this.replaceClassName(sClass, "");
	},
	repeat: function(nCnt)
	{
		nCnt	= arguments.get(0, "number|string", 0).toInteger();
		return new Array(nCnt+1).join(this);
	},
	replaceClassName: function(sOldClass, sNewClass)
	{
		sOldClass	= arguments.get(0, "string", "").trim();
		sNewClass	= arguments.get(1, "string", "").trim();
		return (sOldClass) ? this.replace(new RegExp("\\b"+sOldClass+"\\b", "g"), sNewClass).replace(/ {2,}/g, " ").trim() : this;
	},
	stripDateFormating: function()
	{
		var $t	= this.trim();
		if (!$t) return "";
		aTemp	= $t.replace(/(\\|\.|-)/g, "/").replace(/[^0-9\/]/g, "").split("/");
		for (var idx = 0; idx < aTemp.length; idx++)
			if ("string" != typeof(aTemp[idx]))
				aTemp[idx]	= "";
			else if (aTemp[idx].length == 1)
				aTemp[idx]	= "0" + aTemp[idx];
		$t	= aTemp.join("");
		return ($t.length >= 8) ? $t.substr(0, 8) : "";
	},
	stripNonDigits: function()
	{
		return this.replace(/\D/gi, "");
	},
	stripScripts: function()
	{
		return this.replace(new RegExp($G.sScriptFragment, "img"), "");
	},
	stripTags: function()
	{
		return this.replace(/<[^>]+>/g, "");
	},
	stripWhiteSpace: function()
	{
		return this.replace(/\s/g, "");
	},
	toAbsoluteURL: function()
	{
		var sBase	= arguments.get(0, "string", window.location.href).normalizeURL();
		var $t		= this.normalizeURL();
		if ($t.isURL()) return $t;
		var aBase	= sBase.parseURL();
		sBase		= aBase.schemeAll + aBase.hostAll;
		var sPath	= (aBase.path && $t.charAt(0) != "/") ? aBase.path : "/";
		if ($t == "") return sBase + sPath;
		if ($t == "/") return sBase + "/";
		if ($t.substr(0, 2) == "//") return aBase.schemeAll + $t;
		sPath		+= ($t.charAt(0) == "/") ? $t.substr(1) : $t;
		var aPath	= sPath.substr(1).split("/").reverse();
		for (var idx = aPath.length; idx >= 0; idx--)
			if (aPath[idx] == "..")
			{
				aPath.removeAt(idx+1);
				aPath.removeAt(idx);
			}
		return sBase + "/" + aPath.reverse().join("/");
	},
	toArray: function()
	{
		return this.split("");
	},
	toBinary: function()
	{
		return this.stripNonDigits().toInteger().toBinary();
	},
	toChar: function()
	{
		return String.fromCharCode(this);
	},
	toDateString: function(sDelimiter)
	{
		var sDelimiter	= arguments.get(0, "string", "/");
		var $t			= this.stripNonDigits();
		if ($t.length < 8) return "";
		$t	= $t.substr(0, 2) + sDelimiter + $t.substr(2, 2) + sDelimiter + $t.substr(4, 4);
		return ($t.isDate()) ? $t : "";
	},
	toDecimal: function()
	{
		var radix	= arguments.get(0, "number", 10);
		return parseInt(this, radix);
	},
	toDequotedString: function()
	{
		var $q	= (($q = arguments.get(0, "string", '"').charAt(0)) && "\"'".indexOf($q) != -1) ? $q : '"';
		if (this.length < 2 || this.charAt(0) != $q || this.charAt(this.length-1) != $q) return this;
		return this.slice(1, this.length-1).JScriptDecode();
	},
	toEventType: function()
	{
		return /(click|mouse)/i.test(this) ? "MouseEvents" : /^(load|unload|abort|error|select|change|submit|reset|focus|blur|resize|scroll)$/i.test(this) ? "HTMLEvents" : "Events";
	},
	toFEIN: function()
	{
		var $t	= this.stripNonDigits();
		return ($t.length < 9) ? "" : $t.substr(0, 2) + "-" + $t.substr(2, 7);
	},
	toFloat: function()
	{
		return (this.isNumeric()) ? parseFloat(this) : 0;
	},
	toFloatString: function()
	{
		var $t	= this.toFloat();
		return ($t == 0) ? "" : $t+"";
	},
	toFormattedString: function(nDecimalDigits, bGroupDigits, bParenNegNumber)
	{
		if (!this.isFloat()) return this;
		return this.toFloat().toFormattedString(nDecimalDigits, bGroupDigits, bParenNegNumber);
	},
	toHex: function()
	{
		return this.stripNonDigits().toInteger().toHex();
	},
	toIdDisplayName: function()
	{
		var $t	= this.trim().replace(/^(btn|chk|cmb|cb|div|hdn|hl|int|id|i|pwd|rdo|rb|smtp|sel|str|tbl|txt|td|th|tr)/i, "");
		return $t.parseWords(true).toProperCase();
	},
	toInteger: function()
	{
		return (this.isNumeric()) ? parseInt(this, 10) : 0;
	},
	toIntegerString: function()
	{
		var $t	= this.toInteger();
		return ($t == 0) ? "" : $t+"";
	},
	toJSONString: function()
	{
		var $r	= this.replace(/[\x00-\x1f\\"]/g, function($0)
		{
			var $c	= String.specialChar[$0];
			return $c ? $c : '\\u00' + $0.charCodeAt().toPaddedString(2, 16);
		});
		return '"' + $r + '"';
	},
	toLink: function(sHref, sStatusMsg, sTarget, sClass, sStyle, sTitle, sOnClick, sOnMouseOver, sOnMouseOut)
	{
		sHref			= arguments.get(0, "string", "").trim();
		sStatusMsg		= arguments.get(1, "string", "").trim();
		sTarget			= arguments.get(2, "string", "").trim();
		sClass			= arguments.get(3, "string", "").trim();
		sStyle			= arguments.get(4, "string", "").trim();
		sTitle			= arguments.get(5, "string", "").trim();
		sOnClick		= arguments.get(6, "string", "").trim();
		sOnMouseOver	= arguments.get(7, "string", "return ('function'==typeof(doStatus)) ? doStatus('<#SWAPMSG#>',0) : true;").trim();
		sOnMouseOut		= arguments.get(8, "string", "return ('function'==typeof(doStatus)) ? doStatus('') : true;").trim();
		if (!sHref) return this;
		sStatusMsg	= (sStatusMsg == "_this") ? this.replace(/<br>/gi, " ").toProperCase() : sStatusMsg;
		var sLink	= '<a href="' + sHref + '"';
		sLink	+= (sOnClick) ? ' onclick="' + sOnClick + '"' : "";
		sLink	+= (sStatusMsg) ? ' onmouseover="' + sOnMouseOver.replace(/<#SWAPMSG#>/g, sStatusMsg.JScriptEncode()) + '" onmouseout="' + sOnMouseOut + '"' : "";
		sLink	+= (sTarget) ? ' target="' + sTarget + '"' : "";
		sLink	+= (sClass) ? ' class="' + sClass + '"' : "";
		sLink	+= (sStyle) ? ' style="' + sStyle + '"' : "";
		sLink	+= (sTitle) ? ' title="' + sTitle + '"' : "";
		sLink	+= '>' + this + '</a>';
		return sLink;
	},
	toMaskedString: function(sMask, nNoMaskLen)
	{
		sMask		= arguments.get(0, "string", "*").charAt(0);
		nNoMaskLen	= arguments.get(1, "number", 4);
		var nLen	= this.length - nNoMaskLen;
		return (nLen > 0) ? sMask.repeat(nLen) + this.slice(nLen) : this;
	},
	toNameValue: function()
	{
		var sSep	= arguments.get(0, "string", "=");
		var aStr	= this.split(sSep);
		if (aStr.length > 2)
			aStr[1]	= aStr.slice(1).join(sSep);
		else if (aStr.length == 1)
			aStr[1]	= "";
		return { name: aStr[0].trim(), value: aStr[1].trim() };
	},
	toNumeric: function()
	{
		return (this.isNumericFormatted()) ? this.replace(/,/g, "") : "0";
	},
	toPDFLink: function(sHref, sStatusMsg, sTarget, sClass, sStyle, sTitle, sOnClick, sOnMouseOver, sOnMouseOut)
	{
		function getFeatures()
		{
			var nW	= Math.floor(screen.availWidth*.90);
			var nH	= Math.floor(screen.availHeight*.88);
			var nL	= Math.floor((screen.availWidth - nW) / 2);
			var nT	= Math.floor((screen.availHeight - (nH+screen.availHeight*.05)) / 2);
			return "height="+nH+",left="+nL+",top="+nT+",width="+nW+",directories=0,location=0,menubar=0,toolbar=0";
		}
		sHref	= arguments.get(0, "string", "").trim();
		chkPDFReader();
		sHref	= (sHref.indexOf("xxx") != -1) ? "JavaScript:void(0);" : (!$G.hasPDFReader || sTarget == "_blank") ? sHref : ("function" == typeof(openWindow)) ? "JavaScript:openWindow('" + sHref + "', 'PDFWindowPopUp', TwAutoClose|TwAutoSize|TwResizable|TwScrollbars);" : "JavaScript:window.open('" + sHref + "', 'PDFWindowPopUp', '" + getFeatures() + "');void(0);";
		return this.toLink(sHref, sStatusMsg, sTarget, sClass, sStyle, sTitle, sOnClick, sOnMouseOver, sOnMouseOut);
	},
	toPercentString: function(nDecimalDigits, bGroupDigits, bParenNegNumber, bShiftDecimal)
	{
		if (!this.isFloat()) return this;
		return this.toFloat().toPercentString(nDecimalDigits, bGroupDigits, bParenNegNumber, bShiftDecimal);
	},
	toPhone: function()
	{
		var $t	= this.stripNonDigits();
		if ($t.length < 10) return "";
		return $t.substr(0, 3) + "-" + $t.substr(3, 3) + "-" + $t.substr(6, 4);
	},
	toProperCase: function()
	{
		return this.trim().toLowerCase().replace(/\b(\w)/g, function($0) { return $0.toUpperCase(); });
	},
	toQuotedString: function()
	{
		var $q	= (($q = arguments.get(0, "string", '"').charAt(0)) && "\"'".indexOf($q) != -1) ? $q : '"';
		return $q + this.JScriptEncode() + $q;
	},
	toSSN: function(sMask)
	{
		sMask	= arguments.get(0, "string", "").charAt(0);
		var $t	= this.stripNonDigits();
		if (sMask) $t = $t.substr(0, 5).replace(/\d/g, sMask) + $t.substr(5, 4);
		return ($t.length < 9) ? "" : $t.substr(0, 3) + "-" + $t.substr(3, 2) + "-" + $t.substr(5, 4);
	},
	toZipCode: function()
	{
		var $t	= this.stripNonDigits();
		if ($t.length < 5 || $t.length > 5 && $t.length < 9) return "";
		return ($t.length < 9) ? $t.substr(0, 5) : $t.substr(0, 5) + "-" + $t.substr(5, 4);
	},
	trim: function()
	{
		return this.replace(/^\s+|\s+$/g, "");
	},
	trimLeft: function()
	{
		return this.replace(/^\s+/g, "");
	},
	trimRight: function()
	{
		return this.replace(/\s+$/g, "");
	},
	unescape: function()
	{
		return unescape(this);
	},
	// [Cookie Methods]
	deleteCookie: function(sPath, sDomain)
	{
		var sName	= this.getCookieName();
		if (sName)
			sName.setCookie("-", (new Date(1970, 0, 1, 0, 0, 0, 0)), sPath, sDomain, false);
	},
	getCookie: function()
	{
		var sCookie	= " " + document.cookie + ";";
		var sSearch	= " " + this + "=";
		var idx		= this.getCookieIndex();
		if (idx == -1) return "";
		idx	+= sSearch.length;
		return sCookie.substring(idx, sCookie.indexOf(";", idx)).unescape();
	},
	getCookieArray: function()
	{
		var aCookie	= [];
		var sCookie	= this.getCookie();
		if (!sCookie) return aCookie;
		sCookie	= this + "=" + sCookie + "&";
		var aCrumb;
		for (var idx = sCookie.indexOf("&"); idx != -1; idx = sCookie.indexOf("&"))
		{
			aCrumb	= sCookie.substr(0, idx).split("=");
			aCookie[aCookie.length]	= { name: aCrumb[0], value: aCrumb[1] };
			sCookie	= sCookie.slice(idx + 1);
		}
		return aCookie;
	},
	getCookieIndex: function()
	{
		var sCookie	= " " + document.cookie + ";";
		var sSearch	= " " + this + "=";
		var idx		= sCookie.indexOf(sSearch);
		return (idx != -1) ? idx : sCookie.indexOfNoCase(sSearch);
	},
	getCookieName: function()
	{
		var sCookie	= " " + document.cookie + ";";
		var sSearch	= " " + this + "=";
		var idx		= this.getCookieIndex();
		if (idx == -1) return "";
		return sCookie.substr(++idx, this.length);
	},
	setCookie: function(sValue, oExpires, sPath, sDomain, sSecure)
	{
		document.cookie = this + "=" + sValue.escape() +
			((oExpires) ? "; expires=" + oExpires.toGMTString() : "") +
			((sPath) ? "; path=" + sPath : "") +
			((sDomain) ? "; domain=" + sDomain : "") +
			((sSecure) ? "; secure" : "");
	},
	// [String Methods for old browser compatibility]
	charCodeAt: function()
	{
		var sChar	= this.charAt(arguments.get(0, "number", 0));
		if (sChar == "") return NaN;
		for (var idx = 0; idx < 256; idx++)
		{
			var sHex	= idx.toString(16);
			while (sHex.length < 2)
				sHex	= "0" + sHex;
			if (("%"+sHex).unescape() == sChar)
				return idx;
		}
		return NaN;
	}
});

// [Number Extensions]
Number.extend(
{
	clone: function()
	{
		return new Number(this);
	},
	get: function(index)
	{
		var $d	= this.toString().get(index);
		return ($d) ? parseInt($d, 10) : undefined;
	},
	isInt32: function()
	{
		var bAllowNeg	= (arguments.length > 0) ? arguments[0] : null;
		var bAllowZero	= (arguments.length > 1) ? arguments[1] : null;
		var $t			= this + "";
		return $t.isInt32(bAllowNeg, bAllowZero);
	},
	round: function()
	{
		var nDecimalDigits	= arguments.get(0, "number", 0);
		if (nDecimalDigits < 1)
			return Math.round(this);
		var aValue	= (this+"").split(".");
		if (aValue.length < 2 || aValue[1].length <= nDecimalDigits)
			return this;
		var nFactor	= Math.pow(10, nDecimalDigits);
		return Math.round(this * nFactor) / nFactor;
	},
	toArray: function()
	{
		return this.toString().toArray();
	},
	toBinary: function()
	{
		return this.toString(2);
	},
	toChar: function()
	{
		return String.fromCharCode(this);
	},
	toFloat: function()
	{
		return parseFloat(this);
	},
	toFloatString: function()
	{
		var $t	= this.toFloat();
		return ($t == 0) ? "" : $t+"";
	},
	toFormattedString: function()
	{
		var nDecimalDigits	= arguments.get(0, "number", 2);
		var bGroupDigits	= arguments.get(1, "boolean", true);
		var bParenNegNumber	= arguments.get(2, "boolean", false);
		var $t		= this.round(nDecimalDigits) + "";
		var aValue	= $t.split(".");
		if (aValue.length == 0) return $t;
		$t	= "";
		if (nDecimalDigits > 0)
		{
			if (aValue.length > 1)
				$t	= aValue[1];
			for (; $t.length < nDecimalDigits; )
				$t	+= "0";
			$t	= "." + $t;
		}
		if (bGroupDigits)
			for (var idx = 0; idx < Math.floor((aValue[0].length - (1 + idx)) / 3); idx++)
				aValue[0]	= aValue[0].substring(0, aValue[0].length - (4 * idx + 3)) + ',' + aValue[0].substring(aValue[0].length - (4 * idx + 3));
		$t	= aValue[0] + $t;
		if (bParenNegNumber && $t.charAt(0) == "-")
			$t	= "(" + $t.slice(1) + ")";
		return $t;
	},
	toHex: function()
	{
		return this.toString(16);
	},
	toInteger: function()
	{
		return parseInt(this, 10);
	},
	toIntegerString: function()
	{
		var $t	= this.toInteger();
		return ($t == 0) ? "" : $t+"";
	},
	toJSONString: function()
	{
		return isFinite(this) ? this.toString() : "null";
	},
	toPaddedString: function(nLen, radix)
	{
		nLen	= arguments.get(0, "number", 0);
		radix	= arguments.get(1, "number", 10);
		var $t	= this.toString(radix);
		while ($t.length < nLen)
			$t	= "0" + $t;
		return $t;
	},
	toPercentString: function(nDecimalDigits, bGroupDigits, bParenNegNumber)
	{
		var bShiftDecimal	= arguments.get(3, "boolean", true);
		var $t				= (bShiftDecimal) ? (this * 100) : this;
		return $t.toFormattedString(nDecimalDigits, bGroupDigits, bParenNegNumber) + "%";
	}
});

// [Date Extensions]
Date.extend(
{
	adjustDateTime: function()
	{
		var skew = (new Date(0)).getTime(); // dawn of (Unix) time - should be 0
		if (skew > 0) // Except on the Mac - ahead of its time
			this.setTime(this.getTime() - skew);
		return this;
	},
	clone: function()
	{
		return new Date(this.valueOf());
	},
	compare: function()
	{
		var $d	= arguments.get(0, "date", newDate());
		if (this.valueOf() < $d.valueOf())
			return -1;
		if (this.valueOf() > $d.valueOf())
			return 1;
		return 0;
	},
	compareDate: function()
	{
		var $d	= arguments.get(0, "date", newDate()).clone();
		var $t	= this.clone();
		$d.setHours(0, 0, 0, 0);
		$t.setHours(0, 0, 0, 0);
		return $t.compare($d);
	},
	compareDateTime: function()
	{
		var $d	= arguments.get(0, "date", newDate()).clone();
		var $t	= this.clone();
		$d.setSeconds(0, 0);
		$t.setSeconds(0, 0);
		return $t.compare($d);
	},
	dateDiff: function()
	{
		var oDate		= arguments.get(0, "object", null);
		var sInterval	= arguments.get(1, "string", "d").trim().toLowerCase();
		var bSigned		= arguments.get(2, "boolean", false);
		if (!oDate || "undefined" == typeof(oDate.getTime)) return null;
		var nElapse	= oDate.getTime() - this.getTime();
		if (!bSigned && nElapse < 0)
			nElapse	*= -1;
		switch (sInterval)
		{
			case "d":
				nElapse	= Math.floor(nElapse / 86400000);
				break;
			case "h":
				nElapse	= Math.floor(nElapse / 3600000);
				break;
			case "m":
				nElapse	= Math.floor(nElapse / 60000);
				break;
			case "s":
				nElapse	= Math.floor(nElapse / 1000);
				break;
			default:
				nElapse	= null;
				break;
		}
		return nElapse;
	},
	equalTo: function()
	{
		var $d	= arguments.get(0, "date", null);
		return ($d && this.valueOf() === $d.valueOf());
	},
	equalToDate: function()
	{
		var $d	= arguments.get(0, "date", newDate()).clone();
		var $t	= this.clone();
		$d.setHours(0, 0, 0, 0);
		$t.setHours(0, 0, 0, 0);
		return $t.equalTo($d);
	},
	equalToDateTime: function()
	{
		var $d	= arguments.get(0, "date", newDate()).clone();
		var $t	= this.clone();
		$d.setSeconds(0, 0);
		$t.setSeconds(0, 0);
		return $t.equalTo($d);
	},
	getActualDayOfWeek: function()
	{
		return this.getDay() + 1;
	},
	getActualMonth: function()
	{
		return this.getMonth() + 1;
	},
	getCalendarDate: function()
	{
		return this.getDayName() + ", " + this.getMonthName() + " " + this.getDate() + ", " + this.getFullYear();
	},
	getDayName: function()
	{
		var $d	= arguments.get(0, "number", this.getDay());
		var $n	= ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
		return $n[$d];
	},
	getDayOfYear: function()
	{
		var $y	= this.getFullYear(), $m = this.getMonth(), $d = this.getDate();
		return (Date.UTC($y, $m, $d) - Date.UTC($y, 0, 0)) / 864e5;
	},
	getDaysInMonth: function()
	{
		var $m	= arguments.get(0, "number", this.getMonth());
		if ($m == 1 && this.isLeapYear())
			return 29;
		var aDays	= [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
		return aDays[$m];
	},
	getFullYear: function()
	{
		var $y	= this.getYear();
		if ($y.toString().length < 4)
			$y	+= ($y >= 90) ? 1900 : 2000;
		return $y;
	},
	getMonthName: function()
	{
		var $m	= arguments.get(0, "number", this.getMonth());
		var $n	= ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
		return $n[$m];
	},
	getWeekNumber: function()
	{
		var $d	= new Date(this.getFullYear(), this.getMonth(), this.getDate(), 0, 0, 0);
		$d.setDate($d.getDate() - ($d.getDay() + 6) % 7 + 3); // Nearest Thu
		var nMS = $d.valueOf(); // GMT
		$d.setMonth(0, 4); // Jan 4 is in Week 1
		return Math.round((nMS - $d.valueOf()) / (7 * 864e5)) + 1;
	},
	getYMD: function()
	{
		return parseInt(this.getFullYear() + this.toMonthString() + this.toDayString(), 10);
	},
	isLeapYear: function()
	{
		var $y	= this.getFullYear();
		return (0 == ($y % 4) && (0 != ($y % 100) || 0 == ($y % 400)));
	},
	isWeekend: function()
	{
		var $d	= this.getDay();
		return ($d == 0 || $d == 6);
	},
	setActualFullDate: function($v, $m, $d)
	{
		if (!isNull($m) && !isNaN($m)) $m--;
		this.setFullDate($v, $m, $d);
	},
	setActualFullYear: function($v, $m, $d)
	{
		if (!isNull($m) && !isNaN($m)) $m--;
		this.setFullYear($v, $m, $d);
	},
	setActualMonth: function($m)
	{
		if (isNull($m) || isNaN($m)) return;
		this.setMonthOnly(--$m);
	},
	setDateOnly: function($d)
	{
		if (isNull($d) || isNaN($d)) return;
		var $x	= this.getDaysInMonth();
		if ($d < 1)
			$d	= 1;
		else if ($d > $x)
			$d	= $x;
		this.setDate($d);
	},
	setFullDate: function()
	{
		var $o	= $y = arguments.get(0, "date|number|string", null);
		if (!$o) return;
		var	$m	= arguments.get(1, "number|string", null);
		var	$d	= arguments.get(2, "number|string", null);
		if ($o.typeName() === "date" || isNull($m) || isNull($d))
		{
			$o	= new Date($o);
			$y	= $o.getFullYear();
			$m	= $o.getMonth();
			$d	= $o.getDate();
			this.setFullYear($y, $m, $d);
			return;
		}
		this.setFullYearOnly($y);
		this.setMonthOnly($m);
		this.setDateOnly($d);
	},
	setFullYear: function($y, $m, $d)
	{
		if (isNull($y) || isNaN($y)) return;
		this.setYear(parseInt($y, 10));
		if (isNull($m) || isNaN($m)) return;
		this.setMonth(parseInt($m, 10));
		if (isNull($d) || isNaN($d)) return;
		this.setDate(parseInt($d, 10));
	},
	setFullYearOnly: function($y)
	{
		if (isNull($y) || isNaN($y)) return;
		var $d	= new Date(this);
		$d.setFullYear($y);
		if ($d.getMonth() != this.getMonth())
			this.setDate(28);
		this.setFullYear($y);
	},
	setMDY: function()
	{
		var $v	= arguments.get(0, "string|number", "").toString().stripDateFormating();
		if (!$v) return;
		var sMonth	= $v.substr(0, 2);
		var sDay	= $v.substr(2, 2);
		var sYear	= $v.substr(4, 4);
		if (isNaN(sMonth) || isNaN(sDay) || isNaN(sYear)) return;
		this.setFullYear(sYear.toInteger(), sMonth.toInteger() - 1, sDay.toInteger());
	},
	setMonthOnly: function($m)
	{
		if (isNull($m) || isNaN($m)) return;
		if ($m < 0)
			$m = 0;
		else if ($m > 11)
			$m = 11;
		var $x	= this.getDaysInMonth($m);
		if (this.getDate() > $x)
			this.setDate($x);
		this.setMonth($m);
	},
	setYMD: function()
	{
		var $v	= arguments.get(0, "string|number", "").toString().stripDateFormating();
		if (!$v) return;
		var sYear	= $v.substr(0, 4);
		var sMonth	= $v.substr(4, 2);
		var sDay	= $v.substr(6, 2);
		if (isNaN(sYear) || isNaN(sMonth) || isNaN(sDay)) return;
		this.setFullYear(sYear.toInteger(), sMonth.toInteger() - 1, sDay.toInteger());
	},
	toDayString: function()
	{
		var sDay	= this.getDate() + "";
		return (sDay.length < 2) ? "0" + sDay : sDay;
	},
	toJSONString: function()
	{
		return	'"' + this.getFullYear() + '-' +
				this.toMonthString() + '-' +
				this.toDayString() + 'T' +
				this.getHours().toPaddedString(2) + ':' +
				this.getMinutes().toPaddedString(2) + ':' +
				this.getSeconds().toPaddedString(2) + '"';
	},
	toMDYString: function()
	{
		var sDelimiter	= arguments.get(0, "string", "/");
		return this.toMonthString() + sDelimiter + this.toDayString() + sDelimiter + this.getFullYear();
	},
	toMonthString: function()
	{
		var sMonth	= this.getActualMonth() + "";
		return (sMonth.length < 2) ? "0" + sMonth : sMonth;
	},
	toYearString: function()
	{
		return this.getFullYear() + "";
	},
	toYMDString: function()
	{
		var sDelimiter	= arguments.get(0, "string", "/");
		return this.getFullYear() + sDelimiter + this.toMonthString() + sDelimiter + this.toDayString();
	}
});

// [Boolean Extensions]
Boolean.extend(
{
	toJSONString: function()
	{
		return this.toString();
	}
});

// [RegExp Extensions]
RegExp.extend(
{
	toJSONString: function()
	{
		return this.toString();
	}
});

//=============================================================
// [DOM Element Extensions]
if ("undefined" == typeof(window.$Element))
	var $Element = {};
$Element.extend = function(oElm)
{
	try
	{
		if (!oElm) return null;
		if (!oElm.__extended && oElm.tagName && oElm != window)
		{
			var oMethods	= $Element.Methods;
			for (var sKey in oMethods)
				if (oMethods.hasOwnProperty(sKey))
					oElm[sKey]	= oMethods[sKey];
		}
		oElm.__extended	= true;
	}
	catch (oError) {};
	return oElm;
}
$Element.Methods =
{
	addClassName: function(sClass)
	{
		if ("string" != typeof(this.className)) return;
		this.className	= this.className.addClassName(sClass);
	},
	hasClassName: function(sClass)
	{
		if ("string" != typeof(this.className)) return false;
		return this.className.hasClassName(sClass);
	},
	removeClassName: function(sClass)
	{
		if ("string" != typeof(this.className)) return;
		this.className	= this.className.removeClassName(sClass);
	},
	replaceClassName: function(sOldClass, sNewClass)
	{
		if ("string" != typeof(this.className)) return;
		this.className	= this.className.replaceClassName(sOldClass, sNewClass);
	},
	setClassName: function(sClass)
	{
		if ("string" != typeof(this.className) || "string" != typeof(sClass)) return;
		this.className	= sClass.trim();
	},
	getCurrentStyle: function(sStyle)
	{
		if (is.op && /^(left|top|right|bottom)$/.test(sStyle) && this.getCurrentStyle("position") == "static")
			return null;
		sStyle	= /^(float|styleFloat|cssFloat)$/.test(sStyle) ? (is.ie ? "styleFloat" : "cssFloat") : sStyle.camelize();
		var $v	= this.style[sStyle];
		if (!$v && this.currentStyle)
			$v	= this.currentStyle[sStyle];
		if (sStyle == "opacity")
		{
			if (is.ie)
			{
				$v	= (this.getCurrentStyle("filter") || "").match(/alpha\(opacity=(.*)\)/);
				return $v && $v[1] ? parseFloat($v[1]) / 100 : 1.0;
			}
			return $v ? parseFloat($v) : 1.0;
		}
		if ($v == "auto")
		{
			if (is.ie && (sStyle == "width" || sStyle == "height") && (this.getCurrentStyle("display") != "none"))
				return this["offset" + sStyle.capitalize()] + "px";
			return null;
		}
		return $v;
	}
}

//=============================================================
// [HTMLDocument (Mozilla) Extensions]
if ("undefined" != typeof(HTMLDocument))
{
	if (HTMLDocument.prototype.extend && !HTMLDocument.extend)
		HTMLDocument.extend	= HTMLDocument.prototype.extend;
	// mimic the "createEventObject" method
	HTMLDocument.extend(
	{
		createEventObject: function(sEventType)
		{
			if ("string" != typeof(sEventType)) sEventType = "Events";
			return document.createEvent(sEventType);
		}
	});
}

// [HTMLElement (Mozilla) Extensions]
if ("undefined" != typeof(HTMLElement))
{
	if (HTMLElement.prototype.extend && !HTMLElement.extend)
		HTMLElement.extend	= HTMLElement.prototype.extend;
	// "fireEvent" equalizer
	HTMLElement.extend(
	{
		fireEvent: function(sType, oEvent)
		{
			sType	= ("string" == typeof(sType)) ? sType.trim().slice(2) : sType.toString();
			oEvent	= (!oEvent) ? this.ownerDocument.createEventObject(sType.toEventType()) : oEvent;
			oEvent.initEvent(sType, false, false);
			this.dispatchEvent(oEvent);
		}
	});
	var oProto	= HTMLElement.prototype;
	if ("undefined" != typeof(oProto.__defineGetter__))
	{
		// "currentStyle" equalizer
		if ("undefined" == typeof(oProto.currentStyle))
		{
			oProto.__defineGetter__("currentStyle", function()
			{
				return document.defaultView.getComputedStyle(this, "");
			});
		}
		// "innerText" equalizer
		if ("undefined" == typeof(oProto.innerText))
		{
			oProto.__defineGetter__("innerText", function()
			{
				var oRg	= document.createRange();
				oRg.selectNode(this);
				return oRg.toString();
			});
			oProto.__defineSetter__("innerText", function(sTxt)
			{
				var oRg	= document.createRange();
				oRg.selectNodeContents(this);
				oRg.deleteContents();
				var oNode	= document.createTextNode(sTxt);
				this.appendChild(oNode);
				return sTxt;
			});
		}
		// "outerHTML" equalizer
		if ("undefined" == typeof(oProto.outerHTML))
		{
			oProto.__defineGetter__("outerHTML", function()
			{
				return "";
			});
			oProto.__defineSetter__("outerHTML", function(sHtml)
			{
				var oRg	= document.createRange();
				oRg.selectNode(this);
				var oNode	= oRg.createContextualFragment(sHtml);
				this.parentNode.replaceChild(oNode, this);
				return sHtml;
			});
		}
	}
}

//=============================================================
// Miscellaneous functions
$P2K.namespace = function()
{
    var $a = arguments, $o = null, $n, idx, idx2;
    for (idx = 0; idx < $a.length; idx++)
	{
        $n	= $a[idx].split(".");
        $o	= $P2K;
        for (idx2 = ($n[0] == "$P2K") ? 1 : 0; idx2 < $n.length; idx2++)
		{
            $o[$n[idx2]]	= $o[$n[idx2]] || {};
            $o				= $o[$n[idx2]];
        }
    }
    return $o;
}
$P2K.Lang =
{
	hasValue: function($o)
	{
		return !this.isNull($o) && !this.isUndefined($o);
	},
	isArray: function($o)
	{
		return this.isObject($o) && $o.typeName() == "array";
	},
	isBoolean: function($o)
	{
		return "boolean" == typeof($o);
	},
	isDate: function($o)
	{
		return this.isObject($o) && $o.typeName() == "date";
	},
	isFunction: function($o)
	{
		return "function" == typeof($o);
	},
	isNull: function($o)
	{
		return $o === null;
	},
	isNumber: function($o)
	{
		return "number" == typeof($o) && isFinite($o);
	},
	isObject: function($o)
	{
		return $o != null && ("object" == typeof($o) || is.op && this.isFunction($o));
	},
	isString: function($o)
	{
		return "string" == typeof($o);
	},
	isUndefined: function($o)
	{
		return $o === undefined;
	}
}
function hasValue($o)
{
	return $P2K.Lang.hasValue($o);
}
function isNull($o)
{
	return $P2K.Lang.isNull($o);
}
function isUndefined($o)
{
	return $P2K.Lang.isUndefined($o);
}

// Set Browser's status line.
var sDefaultPrefix	= "Go to ";
var sDefaultStatus	= "";
function doStatus()	// Pass 0 as second argument to disable Prefix.
{
	var sStatus	= arguments.get(0, "string", "").trim();
	var bPrefix	= (arguments.get(1, "number", 1) > 0);
	window.defaultStatus	= sDefaultStatus;
	if (sStatus != "" && bPrefix)
		sStatus	= sDefaultPrefix + sStatus;
	window.status	= sStatus;
	return true;
}

function getArgument(oArgs, index, sType, vDefault, bFindObj)
{
	return oArgs.get(index, sType, vDefault, bFindObj);
}

// Event management functions
$P2K.Event =
{
	__registry__: [],
	addListener: function(oElm, sEvent, fnHandler, useCapture)
	{
		oElm	= arguments.get(0, "object", null, true);
		if (!oElm) return;
		useCapture	= (useCapture === true);
		if (oElm.addEventListener)
			oElm.addEventListener(sEvent, fnHandler, useCapture);
		else if (oElm.attachEvent)
		{
			oElm.detachEvent("on" + sEvent, fnHandler);
			oElm.attachEvent("on" + sEvent, fnHandler);
		}
		else
			oElm["on" + sEvent]	= fnHandler;
		var oReg;
		for (var idx = $P2K.Event.__registry__.length - 1; idx >= 0; idx--)
		{
			oReg	= $P2K.Event.__registry__[idx];
			if (oReg && oReg.element === oElm && oReg.event === sEvent && oReg.listener === fnHandler && oReg.capture === useCapture)
				return;
		}
		this.__registry__.push({ "element": oElm, "event": sEvent, "listener": fnHandler, "capture": useCapture });
	},
	formatEvent: function(oEvent)
	{
		if (!is.ie || !is.win) return oEvent;
		oEvent.charCode			= oEvent.type == "keypress" ? oEvent.keyCode : 0;
//		oEvent.currentTarget	= this.resolveTextNode(oEvent.srcElement);
		oEvent.eventPhase		= 2;
		oEvent.isChar			= oEvent.charCode > 0;
		oEvent.pageX			= oEvent.clientX + getPageScrollX();
		oEvent.pageY			= oEvent.clientY + getPageScrollY();
		oEvent.preventDefault	= function() { this.returnValue = false; };
		oEvent.relatedTarget	= oEvent.type == "mouseout" ? oEvent.toElement : oEvent.type == "mouseover" ? oEvent.fromElement : null;
		oEvent.stopPropagation	= function() { this.cancelBubble = true; };
		oEvent.target			= oEvent.srcElement;
		oEvent.timeStamp		= newDate().getTime();
		return oEvent;
	},
	getEvent: function()
	{
		return window.event ? this.formatEvent(window.event) : this.getEvent.caller.arguments[0];
	},
	isRelated: function(oElm, oEvent)
	{
		var oRelated	= oEvent.relatedTarget;
		try
		{
			while (oRelated)
			{
				if (oRelated === oElm)
					return true;
				oRelated	= oRelated.parentNode;
			}
		}
		catch (oError) {};
		return false;
	},
	removeListener: function(oElm, sEvent, fnHandler, useCapture)
	{
		oElm	= arguments.get(0, "object", null, true);
		if (!oElm) return;
		if (oElm.removeEventListener)
			oElm.removeEventListener(sEvent, fnHandler, (useCapture === true));
		else if (oElm.detachEvent)
			oElm.detachEvent("on" + sEvent, fnHandler);
		else
			oElm["on" + sEvent]	= null;
		var oReg;
		for (var idx = this.__registry__.length - 1; idx >= 0; idx--)
		{
			oReg	= this.__registry__[idx];
			if (oReg && oReg.element === oElm && oReg.event === sEvent && oReg.listener === fnHandler && oReg.capture === useCapture)
			{
				delete oReg.listener;
				this.__registry__.removeAt(idx);
				break;
			}
		}
	},
	removeListenerAll: function()
	{
		var oReg;
		for (var idx = this.__registry__.length - 1; idx >= 0; idx--)
		{
			oReg	= this.__registry__[idx];
			this.removeListener(oReg.element, oReg.event, oReg.listener, oReg.capture);
		}
		this.__registry__.clear();
	},
	resolveTextNode: function(oNode)
	{
		if (oNode && oNode.nodeType == 3)
			return oNode.parentNode;
		return oNode;
	}
}
// Remove circular references to prevent memory leaks in IE6 or older
$P2K.Event.addListener(window, "unload", function()
{
	$P2K.Event.removeListenerAll();
});

// Dimension functions
function getElementRect(oElm)
{
	oElm	= arguments.get(0, "object", null, true);
	var nLeft = nTop = nWidth = nHeight = 0;
	if (oElm)
	{
		if (oElm.getBoundingClientRect)
		{	// IE
			var oBox	= oElm.getBoundingClientRect();
			nLeft		= oBox.left;
			nTop		= oBox.top;
			nWidth		= oBox.right - nLeft;
			nHeight		= oBox.bottom - nTop;
			// getBoundingClientRect returns coordinates relative to the window
			nLeft		+= getPageScrollX() - 2;
			nTop		+= getPageScrollY() - 2;
		}
		else if (document.getBoxObjectFor)
		{	// Mozilla
			var oBox	= document.getBoxObjectFor(oElm);
			nLeft		= oBox.x;
			nTop		= oBox.y;
			nWidth		= oBox.width;
			nHeight		= oBox.height;
		}
		else
		{	// Others
			nWidth	= oElm.offsetWidth;
			nHeight	= oElm.offsetHeight;
			while (oElm.offsetParent)
			{
				nLeft	+= oElm.offsetLeft;
				nTop	+= oElm.offsetTop;
				oElm	= oElm.offsetParent;
			}
		}
	}
	return { left: nLeft, top: nTop, width: nWidth, height: nHeight, x: nLeft, y: nTop, x2: nWidth, y2: nHeight };
}
function getInnerWindowHeight(nDefault, oWindow)
{
	oWindow	= arguments.get(1, "object", self);
	return !isNaN(oWindow.innerHeight) ? oWindow.innerHeight : (!is.op && is.stdmode) ? oWindow.document.body.parentNode.clientHeight : !isNaN(oWindow.document.body.clientHeight) ? oWindow.document.body.clientHeight : arguments.get(0, "number", 480);
}
function getInnerWindowWidth(nDefault, oWindow)
{
	oWindow	= arguments.get(1, "object", self);
	return !isNaN(oWindow.innerWidth) ? oWindow.innerWidth : (!is.op && is.stdmode) ? oWindow.document.body.parentNode.clientWidth : !isNaN(oWindow.document.body.clientWidth) ? oWindow.document.body.clientWidth : arguments.get(0, "number", 640);
}
function getPageScrollX()
{
	var $d	= document;
	return !isNaN(window.pageXOffset) ? window.pageXOffset : $d.documentElement && !isNaN($d.documentElement.scrollLeft) ? $d.documentElement.scrollLeft : $d.body && !isNaN($d.body.scrollLeft) ? $d.body.scrollLeft : 0;
}
function getPageScrollY()
{
	var $d	= document;
	return !isNaN(window.pageYOffset) ? window.pageYOffset : $d.documentElement && !isNaN($d.documentElement.scrollTop) ? $d.documentElement.scrollTop : $d.body && !isNaN($d.body.scrollTop) ? $d.body.scrollTop : 0;
}
function getScreenSize()
{
	if (self.screen) return screen.width+"x"+screen.height;
	if (self.java && "undefined" != typeof(navigator.javaEnabled) && navigator.javaEnabled())
	{
		var oScreen	= java.awt.Toolkit.getDefaultToolkit().getScreenSize();
		return oScreen.width+"x"+oScreen.height;
	}
	return "640x480";
}

// Location functions
function getBaseURL()
{
	var oURL	= arguments.get(0, "string", window.location.href).toLowerCase().parseURL();
	return (oURL) ? oURL.schemeAll + oURL.hostAll : "";
}
function getDomainName()
{
	var sDomain	= arguments.get(0, "string", window.location.hostname).toLowerCase();
	var idx		= sDomain.indexOf(".");
	if (idx == -1) return "";
	var idx2	= sDomain.indexOf("/");
	//remove protocol
	for (; idx2 != -1 && idx2 < idx; idx2 = sDomain.indexOf("/"))
	{
		sDomain	= sDomain.slice(idx2+1);
		idx		= sDomain.indexOf(".");
	}
	// remove path
	if (idx2 != -1)
		sDomain	= sDomain.slice(0, idx2);
	// remove host if exists
	return (sDomain.lastIndexOf(".") == idx) ? sDomain : sDomain.slice(idx+1);
}
function getHostName()
{
	var sHost	= arguments.get(0, "string", window.location.hostname).toLowerCase();
	var idx		= sHost.indexOf(".");
	return (idx != -1) ? sHost.slice(0, idx) : sHost;
}
function getPageName()
{
	var sPage	= arguments.get(0, "string", window.location.pathname).toLowerCase();
	var idx		= sPage.lastIndexOf("/");
	return (idx != -1) ? sPage.slice(idx+1) : sPage;
}
function getPathName()
{
	var sPath	= arguments.get(0, "string", window.location.pathname).toLowerCase();
	var idx		= -1;
	if (sPath.indexOf(".") != -1)
		idx		= sPath.lastIndexOf("/");
	else
		sPath	+= (sPath.charAt(sPath.length-1) != "/") ? "/" : "";
	return (idx != -1) ? sPath.slice(0, idx+1) : sPath;
}
function getPathNameFull()
{
	return getPathName(arguments.get(0, "string", window.location.href));
}
function getPathNameSegment(sFolderName, bPrefixOnly)
{
	sFolderName		= arguments.get(0, "string", "").trim().toLowerCase();
	bPrefixOnly		= arguments.get(1, "boolean", false);
	var sPathName	= getPathName();
	if (sFolderName == "")
		return sPathName;
	var idx	= sPathName.indexOf("/"+sFolderName+"/");
	return (idx != -1) ? sPathName.slice(0, idx+1) + ((bPrefixOnly) ? "" : sFolderName+"/") : "";
}
function getServerName()
{
	var sServer	= arguments.get(0, "string", window.location.hostname).toLowerCase().replace(/^(ht|f)tp(s?)\:\/\//, "");
	return sServer.replace(/(\:\d+)?((\/|\?|\&)[\w .\/?%&=_+-]*)?(\#.*)?$/, "");
}

// Get Todays Date; Format: DayOfWeek, Month Day, Year
function getTodaysDate()
{
	return newDate().getCalendarDate();
}
function getTodaysMDY()
{
	return newDate().toMDYString();
}
function newDate()
{
	var $a	= arguments;
	var $ln	= $a.length;
	if ($ln == 0) return (new Date()).adjustDateTime();
	var $x	= $a.get(0, "date|number|string", null);
	if ($ln == 1) return (new Date($x)).adjustDateTime();
	var $t	= "number|string";
	var	$m	= $a.get(1, $t, 0).toInteger();
	var	$d	= $a.get(2, $t, 1).toInteger();
	var	$h	= $a.get(3, $t, 0).toInteger();
	var	$mn	= $a.get(4, $t, 0).toInteger();
	var	$s	= $a.get(5, $t, 0).toInteger();
	var	$ms	= $a.get(6, $t, 0).toInteger();
	return (new Date($x, $m, $d, $h, $mn, $s, $ms)).adjustDateTime();
}

// CSS functions
function setCSSProperty(aSheetHref, aSelector, sName, sValue, sFromValue)
{
	aSheetHref	= arguments.get(0, "array", null);
	aSelector	= arguments.get(1, "array", null);
	sName		= arguments.get(2, "string", "").toLowerCase();
	sValue		= arguments.get(3, "string", "").toLowerCase();
	sFromValue	= arguments.get(4, "string", null);	// optional
	if (!document.styleSheets || !aSheetHref || !aSelector || !sName) return;
	if (sFromValue)
		sFromValue	= sFromValue.toLowerCase();
	var oSheets	= document.styleSheets;
	var oSheet, oRules, oRule, sPropValue;
	var idx1, idx2, idx3;
	for (idx1 = 0; idx1 < oSheets.length; idx1++)
	{
		oSheet	= null;
		for (idx3 = 0; idx3 < aSheetHref.length; idx3++)
			if (aSheetHref[0] == "*" || oSheets[idx1].href.toLowerCase().indexOf(aSheetHref[idx3].toLowerCase()) != -1)
			{
				oSheet	= oSheets[idx1];
				break;
			}
		if (!oSheet)
			continue;
		oRules	= ("undefined" != typeof(oSheet.cssRules)) ? oSheet.cssRules : ("undefined" != typeof(oSheet.rules)) ? oSheet.rules : null;
		if (!oRules)
			return;
		for (idx2 = 0; idx2 < oRules.length; idx2++)
		{
			oRule	= null;
			for (idx3 = 0; idx3 < aSelector.length; idx3++)
				if (aSelector[0] == "*" || oRules[idx2].selectorText.toLowerCase() == aSelector[idx3].toLowerCase())
				{
					oRule	= oRules[idx2];
					break;
				}
			if (!oRule)
				continue;
			eval("sPropValue = oRule.style." + sName + ";");
			if (sPropValue != null && sPropValue == sValue || sFromValue != null && sFromValue != sPropValue)
				continue;
			eval("oRule.style." + sName + " = sValue;");
		}
	}
}

// Browser Plugin detector
function chkPDFReader()
{
	$G.hasPDFReader	= ($G.hasPDFReader==null) ? hasPlugin("application/pdf") : $G.hasPDFReader;
	"hasPDFReader".setCookie($G.hasPDFReader.toString(), (new Date(newDate().getTime() + (1000 * 60 * 60 * 24 * 365))), "/");
	return $G.hasPDFReader;
}
function hasPlugin(sContentType)
{
	if ("string" != typeof(sContentType)) return false;
	var oMimeType	= navigator.mimeTypes[sContentType];
	if (oMimeType && "undefined" != oMimeType)
	{
		if (!oMimeType.enabledPlugin || "string" != typeof(oMimeType.enabledPlugin.name) || oMimeType.enabledPlugin.name.toLowerCase().indexOf("default plug") != -1)
			return false;
		return true;
	}
	if (is.ie && is.win)
		switch (sContentType.trim().toLowerCase())
		{
			case "application/pdf":
				return (activeXDetect("AcroPDF.PDF.1") || activeXDetect("AcroPDF.PDF") || activeXDetect("PDF.PdfCtrl.5") || activeXDetect("PDF.PdfCtrl.1"));
		}
	return false;
}
// this is where we write out the VBScript for MSIE Windows, otherwise MSIE MAC causes an error.
var $Tmp = "";
if (is.ie && is.win)
{
	$Tmp	= '<script language="VBScript">\r\n';
	$Tmp	+= '\'This will scan for plugins for all versions of Internet Explorer that have a VBscript engine version 2 or greater.\r\n';
	$Tmp	+= '\'This includes all versions of IE4 and beyond and some versions of IE 3.\r\n';
	$Tmp	+= 'Function activeXDetect(activeXname)\r\n';
	$Tmp	+= '	activeXDetect = False\r\n';
	$Tmp	+= '	On Error Resume Next\r\n';
	$Tmp	+= '	If ScriptEngineMajorVersion >= 2 Then\r\n';
	$Tmp	+= '		activeXDetect = IsObject(CreateObject(activeXname))\r\n';
	$Tmp	+= '		If (Err) Then\r\n';
	$Tmp	+= '			activeXDetect = False\r\n';
	$Tmp	+= '		End If\r\n';
	$Tmp	+= '	End If\r\n';
	$Tmp	+= 'End Function\r\n';
	$Tmp	+= '</script>';
	document.writeln($Tmp);
}

// Cookie detector
function isCookieEnabled()
{
	if ("boolean" == typeof(navigator.cookieEnabled)) return navigator.cookieEnabled;
	"CookiesOn".setCookie("Y", (new Date(newDate().getTime() + (1000 * 60 * 60 * 24 * 90))), "/", null, false);
	navigator.cookieEnabled	= ("CookiesOn".getCookie() == "Y");
	return navigator.cookieEnabled;
}

// Java detector
function isJavaEnabled()
{
	return ("undefined" != typeof(navigator) && "undefined" != typeof(navigator.javaEnabled) && navigator.javaEnabled());
}

// Selection functions
function setCaretToBegin(oElm)
{
	setSelectionRange(oElm, 0, 0);
}
function setCaretToEnd(oElm)
{
	setSelectionRange(oElm, oElm.value.length, oElm.value.length);
}
function setCaretToPos(oElm, nPos)
{
	setSelectionRange(oElm, nPos, nPos);
}
function getSelectionRange(oElm)
{
	$r	= { text: "", start: 0, end: 0, length: 0 };
	if (document.selection)
	{	// IE
		var $oR	= document.selection.createRange();
		$r.text	= $oR.text;
		for (; $oR.moveStart("character", -1) != 0; $r.start++);
		$r.end	= $r.text.length + $r.start;
	}
	else if (oElm.setSelectionRange)
	{	// Gecko
		$r.start= oElm.selectionStart;
		$r.end	= oElm.selectionEnd;
		$r.text	= ($r.start != $r.end) ? oElm.value.substring($r.start, $r.end): "";
	}
	else if (document.getSelection)
	{	// Netscape 4
		$r.text	= document.getSelection();
		$r.end	= $r.text.length;
	}
	$r.length	= $r.text.length;
	return $r;
}
function setSelectionRange(oElm, nStart, nEnd)
{
	if (oElm.createTextRange)
	{	// IE
		var $oR	= oElm.createTextRange();
		$oR.move("character", nStart);
		$oR.moveEnd("character", nEnd-nStart);
		$oR.select();
	}
	else if (oElm.setSelectionRange)
	{	// Gecko
		oElm.focus();
		oElm.setSelectionRange(nStart, nEnd);
	}
}

// Misc.
function addSelectOption(oSelect, sText, sValue, bSelected)
{
	oSelect		= arguments.get(0, "object", null, true);
	if (!oSelect) return;
	sText		= arguments.get(1, "string|number", "--");
	sValue		= arguments.get(2, "string|number", sText);
	bSelected	= arguments.get(3, "boolean", false);
	var oElm	= document.createElement("OPTION");
	oElm.text	= sText;
	oElm.value	= sValue;
	oSelect.options.add(oElm);
	if (bSelected)
		oElm.selected	= true;
}
function getElementValue(oElm, sDefault, bThrowError, bGetText)
{
	oElm		= arguments.get(0, "object", null, true);
	sDefault	= arguments.get(1, "string", "");
	bThrowError	= arguments.get(2, "boolean", false);
	if (isNull(oElm))
	{
		if (bThrowError)
			throw new Error("getElementValue() Error: oElm is invalid or does not exist.");
		return sDefault;
	}
	var sType	= oElm.type ? oElm.type : oElm.length && oElm[0] ? oElm[0].type : "undefined";
	switch (sType)
	{
		case "undefined":
			if (bThrowError)
				throw new Error("getElementValue() Error: oElm is invalid or does not exist.");
			return sDefault;
		case "checkbox":
			return (oElm.checked) ? oElm.value : sDefault;
		case "radio":
			if ("number" != typeof(oElm.length)) oElm = [oElm];
			for (var idx = 0, nLen = oElm.length; idx < nLen; idx++)
				if (oElm[idx].checked)
					return oElm[idx].value;
			return sDefault;
		case "select-one":
			bGetText	= arguments.get(3, "boolean", false);
			var idx		= oElm.selectedIndex;
			if (idx < 0 || oElm.length == 0) return sDefault;
			var sValue	= oElm.options[idx].value;
			if (sValue.toLowerCase() == "null" || idx == 0 && sValue == "")
				return sDefault;
			return (sValue == "" || bGetText) ? oElm.options[idx].text : sValue;
		case "select-multiple":
			bGetText	= arguments.get(3, "boolean", false);
			var $a		= [];
			var sValue	= "";
			for (var idx = 0, nLen = oElm.length; idx < nLen; idx++)
			{
				sValue	= oElm.options[idx].value;
				if (oElm[idx].selected && sValue.toLowerCase() != "null")
					$a.push((bGetText) ? oElm.options[idx].text : sValue);
			}
			return $a;
		default:
			return oElm.value;
	}
}
function setElementValue(oElm, vValue, bFireEvent, sMatchType)
{
	oElm		= arguments.get(0, "object", null, true);
	if (isNull(oElm)) return false;
	var sType	= oElm.type ? oElm.type : oElm.length && oElm[0] ? oElm[0].type : "undefined";
	if ("select-multiple" == sType)
		vValue		= arguments.get(1, "array", []);
	else
		vValue		= arguments.get(1, "string|number", "").toString().trim();
	bFireEvent	= arguments.get(2, "boolean", true);
	switch (sType)
	{
		case "undefined":
			return false;
		case "checkbox":
			vValue	= oElm.value.trim().toLowerCase() == vValue.toLowerCase();
			if (oElm.checked != vValue)
			{
				if (bFireEvent)
					oElm.click();
				else
					oElm.checked	= vValue;
			}
			return true;
		case "radio":
			vValue	= vValue.toLowerCase();
			if ("number" != typeof(oElm.length)) oElm = [oElm];
			for (var idx = 0, nLen = oElm.length; idx < nLen; idx++)
			{
				if (oElm[idx].value.trim().toLowerCase() == vValue || vValue == "null")
				{
					if (bFireEvent)
						oElm[idx].click();
					else
						oElm[idx].checked	= true;
					return true;
				}
				oElm[idx].checked	= false;
			}
			return false;
		case "select-one":
			vValue		= vValue.toLowerCase();
			sMatchType	= arguments.get(3, "string", "full").toLowerCase();
			var nLenT = nLenV	= ((sMatchType == "partial") ? vValue.length : 0);
			var sText = sValue	= "";
			for (var idx = 0, nLen = oElm.length; idx < nLen; idx++)
			{
				sText	= ( (nLenT) ? oElm.options[idx].text.slice(0, nLenT) : oElm.options[idx].text ).trim().toLowerCase();
				sValue	= ( (nLenV) ? oElm.options[idx].value.slice(0, nLenV) : oElm.options[idx].value ).trim().toLowerCase();
				if (sValue != "" && sValue == vValue || sText != "" && sText == vValue || vValue == "" || vValue == "null")
				{
					oElm.options[idx].selected	= true;
					if (bFireEvent)
						doFireEvent(oElm, "onchange");
					return true;
				}
			}
			return false;
		case "select-multiple":
			var aValue	= vValue;
			sMatchType	= arguments.get(3, "string", "full").toLowerCase();
			var nLenT = nLenV	= 0;
			var sText = sValue	= "";
			oElm.selectedIndex	= -1;
			for (var idx2 = 0, nLen2 = aValue.length; idx2 < nLen2; idx2++)
			{
				vValue	= aValue[idx2];
				if ("string" != typeof(vValue)) continue;
				vValue	= vValue.trim().toLowerCase();
				nLenT = nLenV	= ((sMatchType == "partial") ? vValue.length : 0);
				for (var idx = 0, nLen = oElm.length; idx < nLen; idx++)
				{
					sText	= ( (nLenT) ? oElm.options[idx].text.slice(0, nLenT) : oElm.options[idx].text ).trim().toLowerCase();
					sValue	= ( (nLenV) ? oElm.options[idx].value.slice(0, nLenV) : oElm.options[idx].value ).trim().toLowerCase();
					if (sValue != "" && sValue == vValue || sText != "" && sText == vValue || idx == 0 && vValue == "null")
						oElm.options[idx].selected	= true;
				}
			}
			if (oElm.selectedIndex != -1)
			{
				if (bFireEvent)
					doFireEvent(oElm, "onchange");
				return true;
			}
			return false;
		default:
			oElm.value	= vValue;
			if (bFireEvent)
				doFireEvent(oElm, "onchange");
			return true;
	}
}
var oSetFocusElm	= null;
function setFocus()
{
	var oElm	= arguments.get(0, "object", null, true);
	var doSelect= arguments.get(1, "boolean", true);
	if (!oElm) return;
	if ("undefined" == typeof(oElm.name) && "number" == typeof(oElm.length))
		oElm	= oElm[0];
	if ("string" == typeof(oElm.type) && oElm.type == "hidden" ||
		"boolean" == typeof(oElm.disabled) && oElm.disabled ||
		"boolean" == typeof(oElm.readOnly) && oElm.readOnly)
		return;
	oSetFocusElm	= oElm;
	var sTimeout	= "if (oSetFocusElm){";
	if ("undefined" != typeof(oElm.focus))
		sTimeout	+= "oSetFocusElm.focus();";
	if (doSelect && "undefined" != typeof(oElm.select))
		sTimeout	+= "oSetFocusElm.select();";
	sTimeout	+= "oSetFocusElm=null;}";
	setTimeout(sTimeout, 20);
}
function setOpacity(oElm, nOpacity)
{
	oElm	= arguments.get(0, "object", null, true);
	nOpacity= arguments.get(1, "number", 100);
	if (!oElm) return false;
	if ("undefined" != typeof(oElm.style.filter))
		{oElm.style.filter	= "alpha(opacity=" + nOpacity + ")"; return true;}
	if ("undefined" != typeof(oElm.style.opacity))
		{oElm.style.opacity	= nOpacity * .01; return true;}
	if ("undefined" != typeof(oElm.style.MozOpacity))
		{oElm.style.MozOpacity	= nOpacity * .01; return true;}
	if ("undefined" != typeof(oElm.style.KhtmlOpacity))
		{oElm.style.KhtmlOpacity	= nOpacity * .01; return true;}
	return false;
}
function setSelectable(oElm, bSelectable)
{
	oElm		= arguments.get(0, "object", null, true);
	bSelectable	= arguments.get(1, "boolean", true);
	if (!oElm) return false;
	if (is.ie4up)
		{oElm.unselectable	= bSelectable ? "off" : "on"; return true;}
	if ("undefined" != typeof(oElm.style.MozUserSelect))
		{oElm.style.MozUserSelect	= bSelectable ? "" : "none"; return true;}
	if ("undefined" != typeof(oElm.style.KhtmlUserSelect))
		{oElm.style.KhtmlUserSelect	= bSelectable ? "" : "none"; return true;}
	return false;
}
function shiftTo(oElm, x, y)
{
	oElm	= arguments.get(0, "object", null, true);
	if (!oElm) return;
	if (document.body && document.body.style)
	{
		var vUnits	= ("string" == typeof(oElm.style.left)) ? "px" : 0;
		oElm.style.left	= x + vUnits;
		oElm.style.top	= y + vUnits;
	}
	else if (is.ns4)
		oElm.moveTo(x, y);
}
function doFireEvent(oElm, sType)
{
	oElm	= arguments.get(0, "object", null, true);
	sType	= arguments.get(1, "string", "").toLowerCase();
	if (!oElm || sType == "") return;
	if ("undefined" != typeof(oElm.fireEvent))
		oElm.fireEvent(sType);
	else
	if ("undefined" != typeof(oElm.dispatchEvent))
	{
		sType		= sType.trim().slice(2);
		var oEvent	= document.createEvent(sType.toEventType());
		oEvent.initEvent(sType, false, false);
		oElm.dispatchEvent(oEvent);
	}
}
// End of file
