/** 
* @fileoverview JavaScript core API
*
* @author fu.xiang
* @version 0.1
*/

/** JavaScript core *********************************************************************************/
Object.extend(String.prototype, {
	trim: function() {
		return this.replace(/(^[\s]*)|([\s]*$)/g, "");
	},
	
	inc: function(s1, s2) {
		if(s2==null){s2=","};
		return (s2+this+s2).indexOf(s2+s1+s2)>-1?true:false;
	},
	
	lenB: function() {
		return this.replace(/[^\x00-\xff]/g,"**").length;
	},
	
	leftB: function(len, isOmit) {
		var s;
		s=this.replace(/\*/g," ").replace(/[^\x00-\xff]/g,"**");
		if(s.length>len&&isOmit)len-=3;
		return this.slice(0,s.slice(0,len).replace(/\*\*/g," ").replace(/\*/g,"").length)+(s.length>len&&isOmit?"...":"");
	},
	
	slice2: function(n1, n2) {
		var v, b1=typeof(n1)=="number", b2=typeof(n2)=="number";
		if(!b1||typeof(n2)=="string"){
			v=eval("this.slice("+(b1?n1:this.indexOf(n1)+(n2==null?1:0)+(this.indexOf(n1)==-1?this.length:0))+(n2==null?"":(b2?n2:(this.indexOf(n2)==-1?"":","+this.indexOf(n2))))+")");
		}else{
			v=eval("this.slice(n1"+(n2==null?"":","+n2)+")");
		}
		return v;
	},
	
	getVar: function(str, def) {
		if(this.inc(str,";"))return 1;
		var a=this.match(new RegExp("(^|;)"+str+":[^;]*"));
		return a==null||str==""?(def==null?"":def):a[0].replace(";","").slice(str.length+1);
	},
	
	replaceAll: function(str1, str2) {
		if(typeof(str1)=="string") {
			return this.split(str1).join(str2);
		} else {
			return this.replace(str1,str2);
		}
	},
	
	getBytes: function() {
		if(this.bytes != null)
			return this.bytes;
			
		var count = 0;
		for(var i=0, l=this.length; i<l; i++) {
			if(this.charCodeAt(i) > 127) {
				count += 2;
			} else {
				count +=1;
			}
		}
		this.bytes = count;
		return count;
	},
	
	byteString: function(bytes) {
		var count = 0, sb = [], str;
		for(var i=0, l=this.length; i<l; i++) {
			var ch = this.charCodeAt(i);
			if((ch > 127 && count+2 <= bytes) || (ch <= 127 && count+1 <= bytes)) {
				if(ch > 127) {
					count += 2;
				} else {
					count +=1;
				}
				sb[i] = this.charAt(i);
			} else {
				break;
			}
		}
		str = new String(sb.join(''));
		str.bytes = count;
		return str;
	}
});

/*******************************************************/
Array.prototype.remove = function(i) {
	this.splice(i, 1);
};

/*******************************************************/
var __window_onload = false;
Event.observe(window, 'load', function() {
	__window_onload = true;
});

function addOnloadListener(handler) {
	if(__window_onload) {
		handler();
	} else {
		Event.observe(window, 'load', handler);
	}
};

/*******************************************************/
var __body = null;
addOnloadListener(function() {
	__body = document.getElementsByTagName('body')[0];
});

/*******************************************************/
function getBody() {
	if(!__body) {
		__body = document.getElementsByTagName('BODY')[0];
	}
	return __body;
}

/*******************************************************/
var __debug = document.createElement('div');
__debug.setAttribute('id', '__debug');

addOnloadListener(function() {
	getBody().appendChild(__debug);
});

function debug(st) {
	__debug.innerHTML += st + '<br>';
};

/*******************************************************/
var __uniqueId = 0;
function UniqueId(name) {
	this.seq = 0;
	this.name = name + '_' + (__uniqueId++);
};

UniqueId.prototype.getId = function() {
	return this.name + '_' + (this.seq++);
};

/**** DOM ****************************************************************************************/
if (!window.Node) {
    window.Node = {};
    Node.ELEMENT_NODE = 1;
    Node.ATTRIBUTE_NODE = 2;
    Node.TEXT_NODE = 3;
    Node.CDATA_SECTION_NODE = 4;
    Node.ENTITY_REFERENCE_NODE = 5;
    Node.ENTITY_NODE = 6;
    Node.PROCESSING_INSTRUCTION_NODE = 7;
    Node.COMMENT_NODE = 8;
    Node.DOCUMENT_NODE = 9;
    Node.DOCUMENT_TYPE_NODE = 10;
    Node.DOCUMENT_FRAGMENT_NODE = 11;
    Node.NOTATION_NODE = 12;
};

$.__isNode = function(n) {
	if(!n) {return false;}
	return typeof n.nodeType != "undefined" && typeof n.nodeName != "undefined";
};

$.LEFT_TOP = 0;

$.LEFT_BOTTOM = 1;

$.RIGHT_TOP = 2;

$.RIGHT_BOTTOM = 3;

$.MIDDLE_TOP = 4;

$.MIDDLE_BOTTOM = 5;

$.MIDDLE_LEFT = 6;

$.MIDDLE_RIGHT = 7;

$.CENTER = 8;

$.FORWARD_DEFAULT = 0;

$.FORWARD_RIGHT = 1;

$.FORWARD_LEFT = 2;

$.FORWARD_UP = 3;

$.FORWARD_DOWN = 4;
// dawei  2008-7-8 日
$.BOTTOM_RIGHT_TOP = 9;
$.BOTTOM_LEFT = 10;
$.BOTTOM_LEFT_TOP = 11;


var $id = function(element) {
	if($.__isNode(element) && element.nodeType == Node.TEXT_NODE) {
		return element;
	} else {
		return document.getElementById(element);
	}
};

var $tags = function(tagName) {
	return document.getElementsByTagName(tagName);
};

var $del = function(id) {
	if(typeof id == 'string') {
		var n = document.getElementById(id);
		if(n && n.parentNode) {
			return n.parentNode.removeChild(n);
		}
	}
	else if($.__isNode(id) && id.parentNode) {
		return id.parentNode.removeChild(id);
	}
};


var $text = function(txt) {
	if(typeof txt == 'string') {
		return document.createTextNode(txt);
	} else if($.__isNode(txt) && txt.nodeType == Node.TEXT_NODE) {
		return txt;
	}
};

var $element = function(element, attrsObj) {
	if(typeof element == 'string') {
		element = document.createElement(element);
	} else if($.__isNode(element) && element.nodeType == Node.ELEMENT_NODE) {
		element = element;
	} else {
		throw new Error('ArgumentsException! $element(tagName/Node)');
	}
	
	Element.extend(element);
	if(attrsObj) {
		for (var attr in attrsObj) {
			element.setAttribute(attr, attrsObj[attr]);
		}
	}
	return element;
};

var $intoBody = function (el) {
	var body = getBody();
	if(body.childNodes.length > 0){
		body.insertBefore(el, body.firstChild);
	}else{
		body.appendChild(el);
	}
};

/**** Prototype Element.addMethods ***************************************************************/
Element.addMethods({
	removeAll: function(element) {
		var tagName = element.tagName.toUpperCase();
		if (Prototype.Browser.IE && ['TABLE','THEAD','TBODY','TFOOT','TR'].include(tagName)) {
			while(element.childNodes.length > 0) {
				element.removeChild(element.childNodes[0]);
			}
		}
		else {
			element.innerHTML = '';
		}
		return element;
	},

	appendTo: function(element, element2) {
		$(element2).appendChild(element);
		return element;
	},
	
	getPos: function (element) {
		var n = $(element);
		var posX = n.offsetLeft;
		var posY = n.offsetTop;
		if (n.offsetParent) {
			while (n.offsetParent) {
				n = n.offsetParent;
				posX += n.offsetLeft;    
				posY += n.offsetTop;
			}
		}
		return {x:posX, y:posY};
	},
	
	toText: function(element) {
		element = $(element);
		var s = '';
		for (var i=0, len = element.childNodes.length; i<len; i++) {
			var n = element.childNodes[i];
			if(n.nodeType == Node.TEXT_NODE) {
				s += n.data.trim();
			} else {
				try{
					s += $(n).toText();
				}catch(e){
					s += n.data.trim();
				}
			}
		}
		return s;
	},
	
	appear: function(element) {
		element = $(element);
		element.style.display = '';
		element.style.visibility = 'visible';
		
		Element.prepareUnderwear(element);
	},
	
	prepareUnderwear: function(element) {
		element = $(element);
		if(Prototype.Browser.IE) {
			if(!element.__underwear) {
				element.__underwear = getUnderwear();
			}
			element.__underwear.style.display = 'block';
			element.__underwear.style.visibility = 'visible';
			Element.takeUnderwear(element);
		}
	},
	
	disappear: function(element) {
		element = $(element);
		element.style.display = 'none';
		element.style.visibility = 'hidden';
		
		Element.takeoffUnderwear(element);
	},
	
	takeUnderwear:  function (element) {
		element = $(element);
		if(Prototype.Browser.IE && element.__underwear) {
			element.__underwear.style.left = element.style.left;
			element.__underwear.style.top = element.style.top;
			element.__underwear.style.width = element.offsetWidth + 'px';
			element.__underwear.style.height = element.offsetHeight + 'px';
		}
	},
	
	takeoffUnderwear: function(element) {
		element = $(element);
		if(Prototype.Browser.IE && element.__underwear) {
			element.__underwear.style.display = 'none';
			element.__underwear.style.visibility = 'hidden';
			__underwearPool.push(element.__underwear);
			element.__underwear = null;
		}
	},
	
	bind: function (element, element2, align, x, y, moveonresize, fixed) {
		var el = $(element2);
		var pointer = element;
		
		if(!moveonresize) {
			moveonresize = false;
		}
		if(!el.parentNode || typeof el.parentNode.tagName == 'undefined') {
			$intoBody(el);
		}
		if(!align) {
				align = $.LEFT_BOTTOM;
		}
		if(!element2.bindPoint) {
			element2.bindPoint = $.LEFT_TOP;
		}
		if(el) {
			if(Prototype.Browser.IE) {
				if(!el.__underwear) {
					el.__underwear = getUnderwear();
				} 
				else {
					el.__underwear.style.display = 'none';
					el.__underwear.style.visibility = 'hidden';
				}
			}
			$element.__bind(el, pointer, align, x, y, fixed);

			if(moveonresize) {
				if(el.resizeListener) {
					Event.stopObserving(window, 'resize', el.resizeListener);
				}
				
				el.resizeListener = function () {
					if (el.style.display != 'none') {
						el.style.position = '';
						$element.__bind(el, pointer, align, x, y, fixed);
						el.appear();
					}
				};
				Event.observe(window, 'resize', el.resizeListener);
			}
		}
		return element;
	},
	
	bindTo: function (element, element2, align, x, y, moveonresize, fixed) {
		var el = $(element2);
		el.bind(element, align, x, y, moveonresize, fixed);
		return element;
	},
	
	fixWidth: function (element, x) {
		x = (x) ? x : 0;
		element = $(element);
		if(element.bindParent) {
			element.style.display = '';
			element.style.visibility = 'hidden';
			element.style.width = ($(element.bindParent).offsetWidth + x) + 'px';
			if(Prototype.Browser.IE && element.__underwear) {
				element.__underwear.style.display = 'block';
				element.__underwear.style.visibility = 'hidden';
				element.__underwear.style.width = (element.offsetWidth) + 'px';
			}
		}
	},
	
	fixHeight: function (element, y) {
		y = (y) ? y : 0;
		element = $(element);
		if(Prototype.Browser.IE && element.bindParent) {
			element.style.display = '';
			element.style.visibility = 'hidden';
			element.style.height = ($(element.bindParent).offsetHeight + y) + 'px';
			if(element.__underwear) {
				element.__underwear.style.display = 'block';
				element.__underwear.style.visibility = 'hidden';
				element.__underwear.style.height = (element.offsetHeight) + 'px';
			}
		}
	},
	
	setWidth: function (element, x) {
		element = $(element);
		if(element.bindParent) {
			element.style.display = '';
			element.style.visibility = 'hidden';
			element.style.width = x + 'px';
			if(Prototype.Browser.IE && element.__underwear)
				element.__underwear.style.width = (x) + 'px';
		}
	},
	
	setHeight: function (element, y) {
		element = $(element);
		if(element.bindParent) {
			element.style.display = '';
			element.style.visibility = 'hidden';
			element.style.height = y + 'px';
			if(Prototype.Browser.IE && element.__underwear) {
				element.__underwear.style.height = (y) + 'px';
			}
		}
	},
	
	setZIndex: function(element, zIndex){
		element = $(element);
		element.style.zIndex = zIndex;
		if(element.bindParent) {
			if(Prototype.Browser.IE && element.__underwear)
				element.__underwear.style.zIndex = zIndex - 1;
		}
	},
	
	behindTo: function (element, element2) {
		var el = $(element2);
		if(el) {
			el.parentNode.insertBefore(element, el);
			element.parentNode.insertBefore(el, element);
		}
		return element;
	}
});


$element.__reposSpace = function (n, n2, bp, align, x, y) {
	var lWidth, tPos, 
	cWidth = document.documentElement.clientWidth,
	sLeft = document.documentElement.scrollLeft,
	cHeight = document.documentElement.clientHeight,
	sTop = document.documentElement.scrollTop,
	cPos = sLeft + cWidth,
	vPos = sTop + cHeight, barpos = 0;
	limit = (document.documentElement.clientHeight) - 30,
	bindPoint = n.bindPoint,
	vp = bp.top, hp = bp.left;
	
	//forward right
	if((bindPoint == $.LEFT_TOP || bindPoint == $.MIDDLE_LEFT || bindPoint == $.LEFT_BOTTOM)
		&& (align == $.RIGHT_TOP || align == $.MIDDLE_RIGHT || align == $.RIGHT_BOTTOM)) {
	
		n.hForward = $.FORWARD_RIGHT;
		if(n2.wrapper && $(n2.wrapper).offsetHeight > limit) {
			barpos = (document.all)?18:20;
		}
		
		tPos = bp.left + n.offsetWidth + barpos;
		lWidth = cPos - (bp.left + barpos);
				
		if(tPos > cPos && (lWidth < ((cWidth - lWidth) - n2.offsetWidth) - x)) {
			hp = hp - n.offsetWidth - n2.offsetWidth - x*2;
			n.hForward = $.FORWARD_LEFT;
		}
	}
	//forward left
	else if ((bindPoint == $.RIGHT_TOP || bindPoint == $.MIDDLE_RIGHT || bindPoint == $.RIGHT_BOTTOM)
		&& (align == $.LEFT_TOP || align == $.MIDDLE_LEFT || align == $.LEFT_BOTTOM)) {
		lWidth = n.offsetWidth - (sLeft - bp.left);
		n.forward = $.FORWARD_LEFT;
		if(sLeft > bp.left && (lWidth < ((cWidth - lWidth) - (n2.offsetWidth - x*2)))) {
			n.hForward = $.FORWARD_RIGHT;
			hp = hp + n.offsetWidth + n2.offsetWidth - x*2;
		}
	}
	
	//bottom
	else if (bindPoint == $.LEFT_TOP && align == $.LEFT_BOTTOM) {
		tPos = bp.left + n.offsetWidth;
		lWidth = cPos - bp.left;
		if(tPos > cPos) {
			hp = hp - (tPos - cPos);
			if(hp < sLeft) {
				hp = sLeft;
				n.hForward = $.FORWARD_LEFT;
			}
		}
	}
			
	if(n2.wrapper) { //up and down
		vp -= $(n2.wrapper).scrollTop;
	}
			
	if(vp < sTop) { //n.hForward = $.FORWARD_UP;
		 vp = sTop;
	}
			
	tPos = vp + n.offsetHeight;
	if(tPos > vPos) { //n.hForward = $.FORWARD_DOWN;
		vp = vp - (tPos - vPos);
	}			

	if(n2.wrapper && n.hForward == $.FORWARD_RIGHT && 
				$(n2.wrapper).offsetHeight > limit) {
		barpos = (document.all)?18:20;
		if ($(n2.wrapper).offsetHeight > limit){
			hp = (hp + barpos);
		}
	}
	return {'left':hp, 'top':vp};
};

$element.__bind = function (id, id2, align, x, y, fixed) {
	var n = $(id);
	var n2 = $(id2);
	if(!x) {x = 0;}
	if(!y) {y = 0;}
	var vp, hp;
	if(n) {
		n.style.position='absolute';
		n.style.display = '';
		n.style.visibility='hidden';
		
		n.bindParent = n2.id;
		
		n.hForward = $.FORWARD_DEFAULT;
		n.vForward = $.FORWARD_DEFAULT;
		if(n2._parent && $(n2._parent).style.zIndex) {
			n.style.zIndex = eval($(n2._parent).style.zIndex) + 10;
		} else {
			var zi = eval(n2.style.zIndex);
			n.style.zIndex = zi == null ? 10 : zi + 10;
			//alert('b ' + n.style.zIndex);
		}
		var underwearWidth = (n.offsetWidth) + 'px',
		underwearHeight =(n.offsetHeight) + 'px';
		
		var pos = n2.getPos();
		var bp = $element.__getBindedPos(n.bindPoint, n.offsetWidth, n.offsetHeight
						, n2.offsetWidth, n2.offsetHeight, align, pos, x, y);
							
		if(!fixed) {
			bp = $element.__reposSpace(n, n2, bp, align, x, y);
		}
			
		n.style.left = bp.left + 'px';
		n.style.top = bp.top + 'px';
		
		if(n.__underwear) {
			var underwear = n.__underwear;
			underwear.style.left = bp.left + 'px';
			underwear.style.top = bp.top + 'px';
			underwear.style.width = underwearWidth;
			underwear.style.height = underwearHeight;
			underwear.style.position='absolute';
			underwear.style.zIndex = n.style.zIndex - 1;
			underwear.style.visibility = 'visible';
			underwear.style.display = 'none';
		}
		
		n.style.visibility = 'visible';
		n.style.display = 'none';
	}
};

$element.__getBindedPos = function(bindPoint, width, height, width2, height2, align, pos, x, y) {
	
	var pointY=0; pointX=0;
	if(bindPoint == $.LEFT_BOTTOM) {
		pointY = -height;
	}else if(bindPoint==$.BOTTOM_LEFT){

	}else if(bindPoint==$.BOTTOM_LEFT_TOP){

	}else if(bindPoint==$.BOTTOM_RIGHT_TOP){	// 新加入的
		pointX = -width;
	}else if(bindPoint == $.RIGHT_TOP) {
		pointX = -width;
	} else if(bindPoint == $.RIGHT_BOTTOM) {
		pointX = -width; 
		pointY = -height;
	} else if(bindPoint == $.MIDDLE_TOP) {
		pointX = -(width/2);
	} else if(bindPoint == $.MIDDLE_BOTTOM) {
		pointX = -(width/2);
		pointY = -height;
	} else if(bindPoint == $.MIDDLE_LEFT) {
		pointY = -(height/2);
	} else if(bindPoint == $.MIDDLE_RIGHT) {
		pointX = -width;
		pointY = -(height/2);
	} else if(bindPoint == $.CENTER) {
		pointX = -(width/2);
		pointY = -(height/2);
	} else if(bindPoint == $.LEFT_TOP) {
		//do nothing here...
	} else
		throw new Error('ArgumentsException! error $element\'s bindPoint');
	
	var bp = {};
	if(align == $.LEFT_BOTTOM) {
		bp.left = (pos.x + x + pointX);
		bp.top = (pos.y + height2 + y + pointY);
	}else if(align == $.RIGHT_TOP) {
		bp.left = (pos.x + width2 + x + pointX);
		bp.top = (pos.y + y + pointY);
	}else if(align==$.BOTTOM_RIGHT_TOP){					// 新加入的 开始
		bp.left = (pos.x + width2 + x + pointX);
		bp.top = (pos.y + y + pointY-(height+height2)*2);
	}else if(align==$.BOTTOM_LEFT){
		bp.left = (pos.x -width - x);
		bp.top = (pos.y + y + pointY);
	}else if(align==$.BOTTOM_LEFT_TOP){					    
		bp.left = (pos.x -width - x);
		bp.top = (pos.y + y + pointY-(height+height2)*2);
	}else if(align == $.LEFT_TOP) {							// 结束
		bp.left = (pos.x + x + pointX);
		bp.top = (pos.y + y + pointY);
	}else if(align == $.RIGHT_BOTTOM) {
		bp.left = (pos.x + width2 + x + pointX);
		bp.top = (pos.y + height2 + y + pointY);
	}else if(align == $.MIDDLE_TOP) {
		bp.left = (pos.x + (width2/2) + x + pointX);
		bp.top = (pos.y + y + pointY);
	}else if(align == $.MIDDLE_BOTTOM) {
		bp.left = (pos.x + (width2/2) + x + pointX);
		bp.top = (pos.y + height2 + y + pointY);
	}else if(align == $.MIDDLE_LEFT) {
		bp.left = (pos.x + x + pointX);
		bp.top = (pos.y + (height2/2) + y + pointY);
	}else if(align == $.MIDDLE_RIGHT) {
		bp.left = (pos.x + width2 + x + pointX);
		bp.top = (pos.y + (height2/2) + y + pointY);
	}else if(align == $.CENTER) {
		bp.left = (pos.x + (width2/2) + x + pointX);
		bp.top = (pos.y + (height2/2) + y + pointY);
	}else
		throw new Error('ArgumentsException! missing e104.lang.$element\'s position');
	
	return bp;
};

if(Prototype.Browser.IE) {
	var __underwear = document.createElement('IFRAME');
	__underwear.setAttribute('src', 'about:blank');
	__underwear.setAttribute('frameBorder', '0');
	__underwear.style.cssText = 'border:0px;';
	__underwear.scrolling = 'no';
	__underwear.style.filter='alpha(opacity=0)';
	__underwear.style.display = 'none';
	__underwear.style.visibility = 'hidden';
};

var __underwearPool = [];

var getUnderwear = function() {
	var u;
	if(__underwearPool.length == 0) {
		u = __underwear.cloneNode(false);
		$intoBody(u);
		return u;
	}
	else {
		return __underwearPool.pop();
	}
};

if(Prototype.Browser.IE) {
	addOnloadListener(function() {
		var u;
		for(var i=0;i<4;i++){
			u = __underwear.cloneNode(false);
			$intoBody(u);
			__underwearPool.push(u);
		}
	});
};

/********************************************************************************************/
/*parset html script*/
function setInnerHTML(el, htmlCode) { 
	var ua = navigator.userAgent.toLowerCase();
    if (ua.indexOf('msie') >= 0 && ua.indexOf('opera') < 0) {
        htmlCode = '<div style="display:none">for IE</div>' + htmlCode;
        htmlCode = htmlCode.replace(/<script([^>]*)>/gi, '<script $1 defer="true">');
	       
        el.innerHTML = htmlCode;	
        el.removeChild(el.firstChild);
    } else {
        var el_next = el.nextSibling;
        var el_parent = el.parentNode;

        el_parent.removeChild(el);
        el.innerHTML = htmlCode;

        if (el_next) {
            el_parent.insertBefore(el, el_next)
        } else {
            el_parent.appendChild(el);
        }
    }
};

var TimerRange = Class.create();
TimerRange.prototype = {
	list: null,
	seq: null,
	initialize: function() {
		this.list = new Hash();
		this.seq = new UniqueId('__timer');
	},
	
	put: function(date1, date2) {
		if(date1 >= date2) {
			throw new RangeError();
		}
		var bean = {
			id: this.seq.getId(),
			t1: date1.getTime(),
			t2: date2.getTime()
		};
		this.list[bean.id] = bean;
		return bean.id;
	},
	
	update: function(id, date1, date2) {
		if(date1 >= date2) {
			throw new RangeError();
		}
		var bean = this.list[id];
		bean.t1 = date1.getTime();
		bean.t2 = date2.getTime();
	},
	
	remove: function(id) {
		return this.list.remove(id);
	},
	
	isIntersecting: function() {
		var arr = this.list.values();
		var a, b, len=arr.length;
		for(var i=0; i<len; i++) {
			for(var j=0; j<len; j++) {
				if(i != j) {
					a = arr[i];
					b = arr[j];
					if(a.t1 >= b.t1 && a.t1 < b.t2) {
						return true;
					}
					else if(a.t2 <= b.t2 && a.t2 > b.t1) {
						return true;
					}
				}
			}
		}
		return false;
	}
};

TimerRange.cDate = function(y, m, d) {
	var date = new Date(y, parseInt(m, 10)-1, d);
	return date;
};

TimerRange.cYear = function(year) {
	return Prototype.Browser.IE && year > 99 ? year : year+1900;
};


/* for ie
 * This will stop image flickering in IE6 when elements with images are moved
 * release memory
 */
if(Prototype.Browser.IE) {
	try {
		Event.observe(window, 'unload', CollectGarbage);
		document.execCommand("BackgroundImageCache", false, true);
	} catch(e) {};
}