String.prototype.trim=function(){return this.replace(/^s+|s+$/g,"")};
String.prototype.ltrim=function(){return this.replace(/^s+/,"")};
String.prototype.rtrim=function(){return this.replace(/s+$/,"")};
function is_array(a){ return a.constructor==Array }
function en(a,b){
	var c=a+b;
	var d=0;
	for(var i=0;i<c.length;i++){
		d+=c.charCodeAt(i)
	}
	return d<<a.length
}

function wrapper_offset(el) {
	var cur_left = 0;
	var cur_top  = 0;
	do {
		cur_left += el.offsetLeft;
		cur_top += el.offsetTop;
	} while (el = el.offsetParent);
	return [cur_left, cur_top];
}

function OUI_cleanup(s) {
	var a="__VCDELIMIT__";
	return s.substring((s.indexOf(a)+a.length),s.lastIndexOf(a)).trim()
}