window.Soprex = 
{
	Ver$Soprex: 3, 
	uniqueID: 0, 
	Base: 
	{
		Init: function(){for(o in this)if(isDef$(this[o].Init))this[o].Init();(function(){var _=Soprex.Base;window.Error.prototype.toString=function(){return this.message;};window.Hash=CClass(_.Enumerable,_.Hash);window.Range=CClass(_.Enumerable,_.Range);window.$p=CClass(_._point);window.$s=CClass(_._size);window.$r=CClass(_._rect)}).delay(1)}, 
		Function: 
		{
			Init: function(){copy$(Function.prototype,this._Methods)}, 
			_Methods: 
			{
				argNames: function(){var an=this.toString().match(/^[\s\(]*function[^(]*\((.*?)\)/)[1].split(",").invoke("strip");return an.length==1 &&!an[0]?[]:an;}, 
				bind: function(){var _a=arguments;if(_a.length<2 && isUndef$(_a[0]))return this;var __=this,args=$A(_a),o=args.shift();return function(){return __.apply(o,args.concat($A(_a)));}}, 
				bindAsObserver: function(){var __=this,args=$A(arguments),o=args.shift();return function(e){return __.apply(o,[$ev(e)].concat(args));}}, 
				curry: function(){var _a=arguments;if(!_a.length)return this;var __=this,args=$A(_a);return function(){return __.apply(this,args.concat($A(_a)));}}, 
				delay: function(){var __=this,args=$A(arguments),timeout=args.shift();return window.setTimeout(function(){return __.apply(__,args);},timeout);}, 
				defer: function(){var args=[10].concat($A(arguments));return this.delay.apply(this,args);}, 
				wrap: function(wrapper){var __=this;return function(){return wrapper.apply(this,[__.bind(this)].concat($A(arguments)));}}, 
				methodize: function(){if(!isFn$(this._methodized)){var __=this;this._methodized=function(){return __.apply(null,[this].concat($A(arguments)));};}return this._methodized;}, 
				getCaller: function(args){return args.caller?args.caller.callee:args.callee.caller;}
			}
		}, 
		String: 
		{
			Init: function(){copy$(String,this._Static);copy$(String.prototype,this._Methods)}, 
			_Static: 
			{
				safe: function(value){return value==null?'':String(value);}, 
				specialChar: 
				{
					'\b': '\\b', 
					'\t': '\\t', 
					'\n': '\\n', 
					'\f': '\\f', 
					'\r': '\\r', 
					'\\': '\\\\'
				}
			}, 
			_Methods: 
			{
				gsub: function(pattern, replacement){var result='',source=this,match;if(!isFn$(replacement)){var r=replacement.toString();replacement=function(match){return r.format(match)};}while(source.length>0){if(match=source.match(pattern)){result+=source.slice(0,match.index);result+=String.safe(replacement(match));source=source.slice(match.index+match[0].length);}else {result+=source,source='';}}return result;}, 
				sub: function(pattern, replacement, count){if(!isFn$(replacement)){var r=replacement.toString();replacement=function(match){return r.format(match)};}count=count===undefined?1:count;return this.gsub(pattern,function(match){if(--count<0)return match[0];return replacement(match);});}, 
				scan: function(pattern, iterator){this.gsub(pattern,iterator);return String(this);}, 
				truncate: function(length, truncation){length=length||30;truncation=isUndef$(truncation)?'...':truncation;return this.length>length?this.slice(0,length-truncation.length)+truncation:String(this);}, 
				strip: function(){return this.replace(/^\s+/,'').replace(/\s+$/,'');}, 
				stripTags: function(){return this.replace(/<\/?[^>]+>/gi,'');}, 
				stripScripts: function(){return this.replace(new RegExp(scrRX,'img'),'');}, 
				extractScripts: function(){var matchAll=new RegExp(scrRX,'img');var matchOne=new RegExp(scrRX,'im');return(this.match(matchAll)||[]).map(function(scriptTag){return(scriptTag.match(matchOne)||['',''])[1];});}, 
				evalScripts: function(){return this.extractScripts().map(function(script){return eval(script)});}, 
				escape: function(){return this.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/"/g,'\\"')}, 
				escapeHTML: function(){return this.replace(/&/g,'&amp;').replace(/"/g,'&quot;').replace(/'/g,'&#039;').replace(/</g,'&lt;').replace(/>/g,'&gt;');}, 
				unescapeHTML: function(){return this.replace(/&amp;/g,'&').replace(/&quot;/g,'"').replace(/&#039;/g,"'").replace(/&lt;/g,'<').replace(/&gt;/g,'>');}, 
				nl2br: function(){return this.replace(/\n/g,'<br />');}, 
				br2nl: function(){return this.replace(/<br \/>/g,'\n');}, 
				escapeJS: function(){return this.replace(/\\/g,'\\\\').replace(/\n/g,'\\n').replace(/\r/g,'\\r').replace(/"/g,'\\x22').replace(/'/g,'\\\'').replace(/</g,'\\x3c').replace(/>/g,'\\x3e').replace(/&/g,'\\x26');}, 
				htmlize: function(){return this.escapeHTML().nl2br();}, 
				toQueryParams: function(separator){var match=this.strip().match(/([^?#]*)(#.*)?$/);if(!match)return{};return match[1].split(separator||'&').inject({},function(hash,pair){if((pair=pair.split('='))[0]){var key=decodeURIComponent(pair.shift());var value=pair.length>1?pair.join('='):pair[0];if(value!=undefined)value=decodeURIComponent(value);if(key in hash){if(isArray$(hash[key]))hash[key]=[hash[key]];hash[key].push(value);}else hash[key]=value;}return hash;});}, 
				camelize: function(){var lStrList=this.split('-');if(lStrList.length==1)return lStrList[0];var camelizedString=this.indexOf('-')==0?lStrList[0].charAt(0).toUpperCase()+lStrList[0].substring(1):lStrList[0];for(var i=1,len=lStrList.length; i<len; i++){var s=lStrList[i];camelizedString+=s.charAt(0).toUpperCase()+s.substring(1);}return camelizedString;}, 
				succ: function(){return this.slice(0,this.length-1)+String.fromCharCode(this.charCodeAt(this.length-1)+1);}, 
				times: function(count){return count<1?'':new Array(count+1).join(this);}, 
				inspect: function(useDoubleQuotes){var escaped=this.gsub(/[\x00-\x1f\\]/,function(match){var c=String.specialChar[match[0]];return c?c:'\\u00'+match[0].charCodeAt().toPadStr(2,16);});if(useDoubleQuotes)return '"'+escaped.replace(/"/g,'\\"')+'"';return "'"+escaped.replace(/'/g,'\\\'')+"'";}, 
				toJSON: function(){return this.inspect(true);}, 
				unfilterJSON: function(filter){return this.sub(filter||jsonRX,'#{1}');}, 
				isJSON: function(){var str=this.replace(/\\./g,'@').replace(/"[^"\\\n\r]*"/g,'');return(/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(str);}, 
				evalJSON: function(sanitize){var json=this.unfilterJSON();try{if(!sanitize||json.isJSON())return eval('('+json+')');}catch(e){}throw new SyntaxError('Badly formed JSON string:'+this.inspect());}, 
				include: function(pattern){return this.indexOf(pattern)>-1;}, 
				startsWith: function(pattern){return this.indexOf(pattern)===0;}, 
				endsWith: function(pattern){var d=this.length-pattern.length;return d>=0 && this.lastIndexOf(pattern)===d;}, 
				empty: function(){return this=='';}, 
				blank: function(){return /^\s*$/.test(this);}, 
				interpolate: function(object, pattern){return this.format(object,pattern);}, 
				getChars: function(start, end){var c=[];for(var i=start; i<end; i++)c.push(this.charAt(i));return c}, 
				initCaps: function(){return this.charAt(0).toUpperCase()+this.slice(1)}, 
				initLow: function(){return this.charAt(0).toLowerCase()+this.slice(1)}, 
				ltrim: function(){for(var c=0; this.charCodeAt(c)<33; c++);return this.slice(c)}, 
				rtrim: function(){for(var c=this.length; c && this.charCodeAt(c-1)<33; c--);return this.slice(0,c)}, 
				trim: function(){return this.ltrim().rtrim()}, 
				mtrim: function(){return this.replace(/[\s]/g,'')}, 
				killCRLF: function(){return this.replace(/[\n\r]/g,' ')}, 
				tokenize: function(){return this.replace(/[\W]/g,' ')}, 
				toChrArray: function(){return this.split('');}, 
				toIntArray: function(){var r=[];for(var i=0; i<this.length; i++)r.push(this.charCodeAt(i));return r;}, 
				format: function(object, pattern){pattern=pattern||/(^|.|\r|\n)(#\{(.*?)\})/;if(isFn$(object.toObject))object=object.toObject();return this.gsub(pattern,function(match){if(object==null)return '';var before=match[1]||'';if(before=='\\')return match[2];var ctx=object,expr=match[3];var pattern=/^([^.[]+|\[((?:.*?[^\\])?)\])(\.|\[|$)/;match=pattern.exec(expr);if(match==null)return before;while(match!=null){var comp=match[1].startsWith('[')?match[2].gsub('\\\\]',']'):match[1];ctx=ctx[comp];if(null==ctx||''==match[3])break;expr=expr.substring('['==match[3]?match[1].length:match[0].length);match=pattern.exec(expr);}return before+String.safe(ctx);});}, 
				tryParseFloat: function(def){def=(def||false);if(this=='')return def;var s1=this.lastIndexOf(','),s2=this.lastIndexOf('.'),lArr=s1>s2?this.split(','):this.split('.');return((!isArray$(lArr))?def:((lArr.length<2)?lArr[0]:(parseInt(lArr[0].replace(/(\,|\.)/g,''),10)+(lArr[1]/ Math.pow(10,lArr[1].length)))));}
			}
		}, 
		Enumerable: 
		{
			each: function(it, con){var i=0;it=it.bind(con);try{this._each(function(v){it(v,i++);});}catch(e){if(e!=$o$)throw e;}return this;}, 
			eachSlice: function(num, it, con){it=it?it.bind(con):$xFn$;var i=-num,slices=[],a=this.toArray();if(num<1)return a;while((i+=num)<a.length)slices.push(a.slice(i,i+num));return slices.map(it,con);}, 
			all: function(it, con){it=it?it.bind(con):$xFn$;var r=true;this.each(function(v,i){r=r &&!!it(v,i);if(!r)throw $o$;});return r;}, 
			any: function(it, con){it=it?it.bind(con):$xFn$;var r=false;this.each(function(v,i){if(r=!!it(v,i))throw $o$;});return r;}, 
			map: function(it, con){it=it?it.bind(con):$xFn$;var rs=[];this.each(function(v,i){rs.push(it(v,i));});return rs;}, 
			find: function(it, con){it=it.bind(con);var r;this.each(function(v,i){if(it(v,i)){r=v;throw $o$;}});return r;}, 
			findAll: function(it, con){it=it.bind(con);var rs=[];this.each(function(v,i){if(it(v,i))rs.push(v);});return rs;}, 
			grep: function(filter, it, con){it=it?it.bind(con):$xFn$;var rs=[];if(isStr$(filter))filter=new RegExp(filter);this.each(function(v,i){if(filter.test(v))rs.push(it(v,i));});return rs;}, 
			contains: function(o){if(isFn$(this.indexOf))if(this.indexOf(o)!=-1)return true;var found=false;this.each(function(v){if(v==o){found=true;throw $o$;}});return found;}, 
			inGroupsOf: function(num, fillWith){fillWith=isUndef$(fillWith)?null:fillWith;return this.eachSlice(num,function(slice){while(slice.length<num)slice.push(fillWith);return slice;});}, 
			inject: function(memo, it, con){it=it.bind(con);this.each(function(v,i){memo=it(memo,v,i);});return memo;}, 
			invoke: function(method){var args=$A(arguments).slice(1);return this.map(function(v){return v[method].apply(v,args);});}, 
			max: function(it, con){it=it?it.bind(con):$xFn$;var r;this.each(function(v,i){v=it(v,i);if(r==null||v>=r)r=v;});return r;}, 
			min: function(it, con){it=it?it.bind(con):$xFn$;var r;this.each(function(v,i){v=it(v,i);if(r==null||v<r)r=v;});return r;}, 
			partition: function(it, con){it=it?it.bind(con):$xFn$;var T=[],F=[];this.each(function(v,i){(it(v,i)?T:F).push(v);});return[T,F];}, 
			pluck: function(property){var rs=[];this.each(function(v){rs.push(v[property]);});return rs;}, 
			reject: function(it, con){it=it.bind(con);var rs=[];this.each(function(v,i){if(!it(v,i))rs.push(v);});return rs;}, 
			sortBy: function(it, con){it=it.bind(con);return this.map(function(v,i){return{value:v,criteria:it(v,i)};}).sort(function(left,right){var a=left.criteria,b=right.criteria;return a<b?-1:a>b?1:0;}).pluck('value');}, 
			toArray: function(){return this.map();}, 
			zip: function(){var it=$xFn$,args=$A(arguments);if(isFn$(args.last()))it=args.pop();var collections=[this].concat(args).map($A);return this.map(function(v,i){return it(collections.pluck(i));});}, 
			size: function(){return this.toArray().length;}, 
			inspect: function(){return '#<Enumerable:'+this.toArray().inspect()+'>';}
		}, 
		Array: 
		{
			Init: function(){copy$(Array.prototype,Soprex.Base.Enumerable);copy$(Array.prototype,this._Methods)}, 
			_Methods: 
			{
				_each: function(it){for(var i=0,l=this.length; i<l; i++)it(this[i]);}, 
				clear: function(){this.length=0;return this;}, 
				first: function(){return this[0];}, 
				last: function(){return this[this.length-1];}, 
				compact: function(){return this.findAll(function(v){return v!=null;});}, 
				flatten: function(){return this.inject([],function(a,v){return a.concat(isArray$(v)?v.flatten():[v]);});}, 
				without: function(){var a=$A(arguments);return this.findAll(function(v){return!a.contains(v);});}, 
				reverseClone: function(){return this.toArray().reverse();}, 
				reduce: function(){return this.length>1?this:this[0];}, 
				uniq: function(sorted){return this.inject([],function(a,v,i){if(0==i||(sorted?a.last()!=v:!a.contains(v)))a.push(v);return a;});}, 
				intersect: function(a){return this.uniq().findAll(function(item){return a.find(function(v){return item===v});});}, 
				size: function(){return this.length;}, 
				inspect: function(){return '['+this.map(Object.inspect).join(',')+']';}, 
				toJSON: function(){var r=[];this.each(function(o){var v=toJSON$(o);if(!isUndef$(v))r.push(v);});return '['+r.join(',')+']';}, 
				equals: function(arr){if(arr.length!=this.length)return false;for(i=0; i<this.length; i++)if(!this[i].equals(arr[i]))return false;return true}, 
				insertAt: function(el, i){this.splice(i,0,el);}, 
				insertBefore: function(el, el2){var i=this.indexOf(el2);if(i==-1)this.push(el);else this.splice(i,0,el)}, 
				move: function(el, i){var ci=this.indexOf(el);if(ci>-1)this.removeAt(ci);this.insertAt(O,i)}, 
				removeAt: function(i){this.splice(i,1);}, 
				remove: function(el){var i=this.indexOf(el);if(i>-1)this.splice(i,1)}, 
				sortNum: function(){return this.sort(function(a,b){return a-b;});}, 
				indexOf: function(item, i){i||(i=0);var l=this.length;if(i<0)i=l+i;for(; i<l; i++)if(this[i]===item)return i;return-1;}, 
				lastIndexOf: function(item, i){i=isNaN(i)?this.length:(i<0?this.length+i:i)+1;var n=this.slice(0,i).reverse().indexOf(item);return(n<0)?n:i-n-1;}, 
				clone: function(){return[].concat(this);}, 
				toArray: function(){return[].concat(this);}
			}
		}, 
		Number: 
		{
			Init: function(){copy$(Number.prototype,this._Methods);['abs','round','ceil','floor'].each(function(method){Number.prototype[method]=Math[method].methodize();});}, 
			_Methods: 
			{
				toColorPart: function(){return this.toPadStr(2,16);}, 
				succ: function(){return this+1;}, 
				times: function(it){$R(0,this,true).each(it);return this;}, 
				toPadStr: function(length, radix){var s=this.toString(radix||10);return '0'.times(length-s.length)+s;}, 
				toJSON: function(){return isFinite(this)?this.toString():'null';}
			}
		}, 
		Hash: 
		{
			_ctor: function(o){this._object=isHash$(o)?o.toObject():clone$(o);}, 
			_each: function(it){for(var key in this._object){var value=this._object[key],pair=[key,value];pair.key=key;pair.value=value;it(pair);}}, 
			set: function(key, value){return this._object[key]=value;}, 
			get: function(key){return this._object[key];}, 
			unset: function(key){var value=this._object[key];delete this._object[key];return value;}, 
			toObject: function(){return clone$(this._object);}, 
			keys: function(){return this.pluck('key');}, 
			values: function(){return this.pluck('value');}, 
			index: function(value){var match=this.find(function(pair){return pair.value===value;});return match && match.key;}, 
			merge: function(object){return this.clone().update(object);}, 
			update: function(object){return new Hash(object).inject(this,function(result,pair){result.set(pair.key,pair.value);return result;});}, 
			toQueryString: function(){return this.map(function(pair){var key=encodeURIComponent(pair.key),values=pair.value;if(isArray$(values))return values.map(toQPair$.curry(key)).join('&');return toQPair$(key,values);}).join('&');}, 
			inspect: function(){return '#<Hash:{'+this.map(function(pair){return pair.map(Object.inspect).join(':');}).join(',')+'}>';}, 
			toJSON: function(){return toJSON$(this.toObject());}, 
			clone: function(){return new Hash(this);}
		}, 
		_point: 
		{
			_ctor: function(aX, aY){this.x=aX;this.y=aY}
		}, 
		_size: 
		{
			_ctor: function(aW, aH){this.w=aW;this.h=aH}
		}, 
		_rect: 
		{
			_ctor: function(aX, aY, aW, aH){this.x=aX;this.y=aY;this.w=aW;this.h=aH;}, 
			getPos: function(){return new $p(this.x,this.y)}, 
			getSize: function(){return new $s(this.w,this.h)}
		}, 
		Range: 
		{
			_ctor: function(start, end, exclusive){this.start=start;this.end=end;this.exclusive=exclusive;}, 
			_each: function(iterator){var value=this.start;while(this.include(value)){iterator(value);value=value.succ();}}, 
			include: function(value){if(value<this.start)return false;if(this.exclusive)return value<this.end;return value<=this.end;}
		}, 
		Date: 
		{
			Init: function(){copy$(Date.prototype,this._Methods);Date.__PC={}}, 
			_Methods: 
			{
				getDayOfYear: function(){return parseInt((this.getTime()-new Date(this.getFullYear(),0,1).getTime())/ 86400000+1,10)}, 
				getWeek: function(){return parseInt((this.getTime()-new Date(this.getFullYear(),0,1).getTime())/ 604800000+1,10)}, 
				getUeDay: function(){return parseInt(Math.floor((this.getTime()-this.getTimezoneOffset()* 60000)/ 86400000),10)}, 
				getDayName: function(){return this.DayNames[this.getDay()]}, 
				getMonthName: function(){return this.MonthNames[this.getMonth()]}, 
				Initialize: function(aCulture){this.Culture=aCulture;this.MonthNames=aCulture.Months.split(",");this.DayNames=aCulture.Days.split(",");this.DateFormat=aCulture.Format}, 
				CompareDate: function(aDate){return(this.getFullYear()==aDate.getFullYear()&& this.getMonth()==aDate.getMonth()&& this.getDate()==aDate.getDate())}, 
				LeapYear: function(aYear){if(!aYear)aYear=this.getFullYear();return(aYear % 4==0 &&(aYear % 100!=0||aYear % 400==0))}, 
				Pad0: function(aV){return(aV<10?'0'+aV:aV)}, 
				Format: function(){if(!this.valueOf()||!this.Culture)return 'Error-initialize first.';var __=this;var lFormat=this.DateFormat;return lFormat.replace(/(yyyy|MMMM|MMM|MM|M|DD|D|dd|d)/g,function($1){switch($1){case 'yyyy':return __.getFullYear();case 'yy':return __.getFullYear().substring(3,4);case 'MMMM':return __.getMonthName();case 'MMM':return __.getMonthName().substring(0,3);case 'MM':return __.Pad0(__.getMonth()+1);case 'M':return __.getMonth()+1;case 'DD':return __.getDayName();case 'D':return __.getDayName().substr(0,3);case 'dd':return __.Pad0(__.getDate());case 'd':return __.getDate()}return ''})}, 
				DatePS: function(){var ltmp=this.getFullYear()+'|'+(this.getMonth()+1)+'|'+this.getDate();return ltmp;}, 
				Parse: function(aDate){if(aDate==''||!this.Culture)return 'Error-initialize first.';if(isDef$(Date.__PC['$'+aDate])){var lR=Date.__PC['$'+aDate];if(lR===false)return false;else {this.setFullYear(lR.Y,lR.M-1,lR.D);return true;}}else Date.__PC['$'+aDate]=false;var lFormat=this.DateFormat;var lExpr=lFormat.replace(/([$^.*+?=!:|\/\\\(\)\[\]\{\}])/g,"\\$1");lExpr=lExpr.replace(/(yyyy|yy|MM|M|dd|d)/g,function($1){switch($1){case 'yyyy':return "([0-9]{4})";case 'yy':return "([0-9]{2})";case 'MM':return "(0[1-9]|10|11|12)";case 'M':return "([1-9]|10|11|12)";case 'dd':return "(0[1-9]|[12][0-9]|30|31)";case 'd':return "([1-9]|[12][0-9]|30|31)"}return ''});var lRE=new RegExp('^'+lExpr+'$');if(!lRE.test(aDate))return false;var lD={Y:0,M:1,D:1};var lParts=lFormat.match(/(yyyy|MM|M|dd|d)/g);var lValues=lRE.exec(aDate);for(var lIter=0; lIter<lParts.length; lIter++){switch(lParts[lIter]){case "yyyy":lD.Y=Number(lValues[lIter+1]); break;case "yy":lD.Y=Number(lValues[lIter+1]);lD.Y=(lD.Y>70?1900+lD.Y:2000+lD.Y);break;case "M":case "MM":lD.M=Number(lValues[lIter+1]); break;case "dd":case "d":lD.D=Number(lValues[lIter+1]); break;}}if(lD.D==31 &&(lD.M==4||lD.M==6||lD.M==9||lD.M==11))return false;if((lD.D>=30 && lD.M==2)||(lD.D==29 && lD.M==2 &&!this.LeapYear(lD.Y)))return false;Date.__PC['$'+aDate]=lD;this.setFullYear(lD.Y,lD.M-1,lD.D);return true}, 
				toJSON: function(){return '"'+this.getUTCFullYear()+'-'+(this.getUTCMonth()+1).toPadStr(2)+'-'+this.getUTCDate().toPadStr(2)+'T'+this.getUTCHours().toPadStr(2)+':'+this.getUTCMinutes().toPadStr(2)+':'+this.getUTCSeconds().toPadStr(2)+'Z"';}, 
				clone: function(){var cd=new Date(this.getTime());cd.Culture=this.Culture;cd.MonthNames=this.MonthNames;cd.DayNames=this.DayNames;cd.DateFormat=this.DateFormat;return cd}
			}
		}
	}, 
	Utils: 
	{
		Init: function(){window.Timer=CClass(Soprex.Utils._Timer);}, 
		_Timer: 
		{
			_ctor: function(aParent, aDuration, aInterval, aOnTick, aOnTickEnd){this.__=aParent;this.Duration=aDuration;this.Interval=(aInterval!=null?aInterval:aDuration);this.__P=0;if(isDef$(aOnTick))this.OnTick=aOnTick;if(isDef$(aOnTickEnd))this.OnTickEnd=aOnTickEnd;}, 
			_Static: 
			{
				Ver$Timer: 2
			}, 
			Start: function(){if(this.__P!=0)return;this.Clear();this.Elapsed=0;var __=this;var lFN=function(){__.Tick();};this.__P=setInterval(lFN,this.Interval)}, 
			Tick: function(){this.Elapsed+=this.Interval;if(this.OnTick)this.OnTick(this.__,this.Elapsed);if(this.Elapsed>=this.Duration)this.Stop()}, 
			Clear: function(){if(this.__P>0){clearInterval(this.__P);this.__P=0}}, 
			Stop: function(){this.Clear();if(this.OnTickEnd)this.OnTickEnd(this.__)}
		}
	}, 
	MS: 
	{
		Init: function(){copy$(window,Soprex.MS._g);copy$(window,Soprex.MS.V);cpwpw$(Soprex.MS.WF,'WebForm_');window.WebPart=Soprex.MS.WP.WebPart;cpwpw$(Soprex.MS.WP,'WebPart_');window.Zone=Soprex.MS.Z.Zone;cpwpw$(Soprex.MS.Z,'Zone_');window.WebPartMenu=Soprex.MS.M.WebPartMenu;cpwpw$(Soprex.MS.M,'WebPartMenu_');window.WebPartManager=Soprex.MS.WPM.WebPartManager;cpwpw$(Soprex.MS.WPM,'WebPartManager_');cpwpw$(Soprex.MS.TreeView,'TreeView_');}, 
		_g: 
		{
			__pendingCallbacks: [], 
			__synchronousCallBackIndex: -1, 
			__nonMSDOMBrowser: true, 
			__theFormPostData: '', 
			__theFormPostCollection: [], 
			__disabledControlArray: [], 
			__wpm: null, 
			Point: function(x, y){this.x=x;this.y=y;}, 
			__wpTranslateOffset: function(x, y, offsetElement, relativeToElement, includeScroll){while((typeof(offsetElement)!="undefined")&&(offsetElement!=null)&&(offsetElement!=relativeToElement)){x+=offsetElement.offsetLeft;y+=offsetElement.offsetTop;var tagName=offsetElement.tagName;if((tagName!="TABLE")&&(tagName!="BODY")){x+=offsetElement.clientLeft;y+=offsetElement.clientTop;}if(includeScroll &&(tagName!="BODY")){x-=offsetElement.scrollLeft;y-=offsetElement.scrollTop;}offsetElement=offsetElement.offsetParent;}return new Point(x,y);}, 
			__wpGetPageEventLocation: function(event, includeScroll){event=$ev(event);return __wpTranslateOffset(event.offsetX,event.offsetY,event.srcElement,null,includeScroll);}, 
			__wpClearSelection: function(){document.selection.empty();}, 
			WebPartDragState: function(webPartElement, effect){this.webPartElement=webPartElement;this.dropZoneElement=null;this.dropIndex=-1;this.effect=effect;this.dropped=false;}
		}, 
		WF: 
		{
			PostBackOptions: function(eventTarget, eventArgument, validation, validationGroup, actionUrl, trackFocus, clientSubmit){this.eventTarget=eventTarget;this.eventArgument=eventArgument;this.validation=validation;this.validationGroup=validationGroup;this.actionUrl=actionUrl;this.trackFocus=trackFocus;this.clientSubmit=clientSubmit;}, 
			DoPostBackWithOptions: function(options){var validationResult=true;if(options.validation){if(typeof(Page_ClientValidate)=='function'){validationResult=Page_ClientValidate(options.validationGroup);}}if(validationResult){if((typeof(options.actionUrl)!="undefined")&&(options.actionUrl!=null)&&(options.actionUrl.length>0)){theForm.action=options.actionUrl;}if(options.trackFocus){var lastFocus=theForm.elements["__LASTFOCUS"];if((typeof(lastFocus)!="undefined")&&(lastFocus!=null)){if(typeof(document.activeElement)=="undefined"){lastFocus.value=options.eventTarget;}else {var active=document.activeElement;if((typeof(active)!="undefined")&&(active!=null)){if((typeof(active.id)!="undefined")&&(active.id!=null)&&(active.id.length>0)){lastFocus.value=active.id;}else if(typeof(active.name)!="undefined"){lastFocus.value=active.name;}}}}}}if(options.clientSubmit){__doPostBack(options.eventTarget,options.eventArgument);}}, 
			DoCallback: function(eventTarget, eventArgument, eventCallback, context, errorCallback, useAsync){var postData=__theFormPostData+"__CALLBACKID="+WebForm_EncodeCallback(eventTarget)+"&__CALLBACKPARAM="+WebForm_EncodeCallback(eventArgument);if(theForm["__EVENTVALIDATION"]){postData+="&__EVENTVALIDATION="+WebForm_EncodeCallback(theForm["__EVENTVALIDATION"].value);}var xmlRequest,e;try{xmlRequest=new XMLHttpRequest();}catch(e){try{xmlRequest=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){}}var setRequestHeaderMethodExists=true;try{setRequestHeaderMethodExists=(xmlRequest && xmlRequest.setRequestHeader);}catch(e){}var callback={};callback.eventCallback=eventCallback;callback.context=context;callback.errorCallback=errorCallback;callback.async=useAsync;var callbackIndex=WebForm_FillFirstAvailableSlot(__pendingCallbacks,callback);if(!useAsync){if(__synchronousCallBackIndex!=-1){__pendingCallbacks[__synchronousCallBackIndex]=null;}__synchronousCallBackIndex=callbackIndex;}if(setRequestHeaderMethodExists){xmlRequest.onreadystatechange=WebForm_CallbackComplete;callback.xmlRequest=xmlRequest;xmlRequest.open("POST",theForm.action,true);xmlRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");xmlRequest.send(postData);return;}callback.xmlRequest={};var callbackFrameID="__CALLBACKFRAME"+callbackIndex;var xmlRequestFrame=document.frames[callbackFrameID];if(!xmlRequestFrame){xmlRequestFrame=document.createElement("IFRAME");xmlRequestFrame.width="1";xmlRequestFrame.height="1";xmlRequestFrame.frameBorder="0";xmlRequestFrame.id=callbackFrameID;xmlRequestFrame.name=callbackFrameID;xmlRequestFrame.style.position="absolute";xmlRequestFrame.style.top="-100px";xmlRequestFrame.style.left="-100px";try{if(callBackFrameUrl){xmlRequestFrame.src=callBackFrameUrl;}}catch(e){}document.body.appendChild(xmlRequestFrame);}var interval=window.setInterval(function(){xmlRequestFrame=document.frames[callbackFrameID];if(xmlRequestFrame && xmlRequestFrame.document){window.clearInterval(interval);xmlRequestFrame.document.write("");xmlRequestFrame.document.close();xmlRequestFrame.document.write('<html><body><form method="post"><input type="hidden" name="__CALLBACKLOADSCRIPT" value="t"></form></body></html>');xmlRequestFrame.document.close();xmlRequestFrame.document.forms[0].action=theForm.action;var count=__theFormPostCollection.length;var element;for(var i=0; i<count; i++){element=__theFormPostCollection[i];if(element){var fieldElement=xmlRequestFrame.document.createElement("INPUT");fieldElement.type="hidden";fieldElement.name=element.name;fieldElement.value=element.value;xmlRequestFrame.document.forms[0].appendChild(fieldElement);}}var callbackIdFieldElement=xmlRequestFrame.document.createElement("INPUT");callbackIdFieldElement.type="hidden";callbackIdFieldElement.name="__CALLBACKID";callbackIdFieldElement.value=eventTarget;xmlRequestFrame.document.forms[0].appendChild(callbackIdFieldElement);var callbackParamFieldElement=xmlRequestFrame.document.createElement("INPUT");callbackParamFieldElement.type="hidden";callbackParamFieldElement.name="__CALLBACKPARAM";callbackParamFieldElement.value=eventArgument;xmlRequestFrame.document.forms[0].appendChild(callbackParamFieldElement);if(theForm["__EVENTVALIDATION"]){var callbackValidationFieldElement=xmlRequestFrame.document.createElement("INPUT");callbackValidationFieldElement.type="hidden";callbackValidationFieldElement.name="__EVENTVALIDATION";callbackValidationFieldElement.value=theForm["__EVENTVALIDATION"].value;xmlRequestFrame.document.forms[0].appendChild(callbackValidationFieldElement);}var callbackIndexFieldElement=xmlRequestFrame.document.createElement("INPUT");callbackIndexFieldElement.type="hidden";callbackIndexFieldElement.name="__CALLBACKINDEX";callbackIndexFieldElement.value=callbackIndex;xmlRequestFrame.document.forms[0].appendChild(callbackIndexFieldElement);xmlRequestFrame.document.forms[0].submit();}},10);}, 
			CallbackComplete: function(){for(i=0; i<__pendingCallbacks.length; i++){callbackObject=__pendingCallbacks[i];if(callbackObject && callbackObject.xmlRequest &&(callbackObject.xmlRequest.readyState==4)){WebForm_ExecuteCallback(callbackObject);if(!__pendingCallbacks[i].async){__synchronousCallBackIndex=-1;}__pendingCallbacks[i]=null;var callbackFrameID="__CALLBACKFRAME"+i;var xmlRequestFrame=document.getElementById(callbackFrameID);if(xmlRequestFrame){xmlRequestFrame.parentNode.removeChild(xmlRequestFrame);}}}}, 
			ExecuteCallback: function(callbackObject){var response=callbackObject.xmlRequest.responseText;if(response.charAt(0)=="s"){if((typeof(callbackObject.eventCallback)!="undefined")&&(callbackObject.eventCallback!=null)){callbackObject.eventCallback(response.substring(1),callbackObject.context);}}else if(response.charAt(0)=="e"){if((typeof(callbackObject.errorCallback)!="undefined")&&(callbackObject.errorCallback!=null)){callbackObject.errorCallback(response.substring(1),callbackObject.context);}}else {var separatorIndex=response.indexOf("|");if(separatorIndex!=-1){var validationFieldLength=parseInt(response.substring(0,separatorIndex));if(!isNaN(validationFieldLength)){var validationField=response.substring(separatorIndex+1,separatorIndex+validationFieldLength+1);if(validationField!=""){var validationFieldElement=theForm["__EVENTVALIDATION"];if(!validationFieldElement){validationFieldElement=document.createElement("INPUT");validationFieldElement.type="hidden";validationFieldElement.name="__EVENTVALIDATION";theForm.appendChild(validationFieldElement);}validationFieldElement.value=validationField;}if((typeof(callbackObject.eventCallback)!="undefined")&&(callbackObject.eventCallback!=null)){callbackObject.eventCallback(response.substring(separatorIndex+validationFieldLength+1),callbackObject.context);}}}}}, 
			FillFirstAvailableSlot: function(array, element){var i;for(i=0; i<array.length; i++){if(!array[i])break;}array[i]=element;return i;}, 
			InitCallback: function(){var count=theForm.elements.length;var element;for(var i=0; i<count; i++){element=theForm.elements[i];var tagName=element.tagName.toLowerCase();if(tagName=="input"){var type=element.type;if((type=="text"||type=="hidden"||type=="password"||((type=="checkbox"||type=="radio")&& element.checked))&&(element.id!="__EVENTVALIDATION")){WebForm_InitCallbackAddField(element.name,element.value);}}else if(tagName=="select"){var selectCount=element.options.length;for(var j=0; j<selectCount; j++){var selectChild=element.options[j];if(selectChild.selected==true){WebForm_InitCallbackAddField(element.name,element.value);}}}else if(tagName=="textarea"){WebForm_InitCallbackAddField(element.name,element.value);}}}, 
			InitCallbackAddField: function(name, value){var nameValue={};nameValue.name=name;nameValue.value=value;__theFormPostCollection[__theFormPostCollection.length]=nameValue;__theFormPostData+=name+"="+WebForm_EncodeCallback(value)+"&";}, 
			EncodeCallback: function(parameter){if(encodeURIComponent){return encodeURIComponent(parameter);}else {return escape(parameter);}}, 
			ReEnableControls: function(){if(typeof(__enabledControlArray)=='undefined'){return false;}var disabledIndex=0;for(var i=0; i<__enabledControlArray.length; i++){var c;if(__nonMSDOMBrowser){c=document.getElementById(__enabledControlArray[i]);}else {c=document.all[__enabledControlArray[i]];}if((typeof(c)!="undefined")&&(c!=null)&&(c.disabled==true)){c.disabled=false;__disabledControlArray[disabledIndex++]=c;}}setTimeout("WebForm_ReDisableControls()",0);return true;}, 
			ReDisableControls: function(){for(var i=0; i<__disabledControlArray.length; i++){__disabledControlArray[i].disabled=true;}}, 
			FireDefaultButton: function(event, target){if(event.keyCode==13 &&!(event.srcElement &&(event.srcElement.tagName.toLowerCase()=="textarea"))){var defaultButton;if(__nonMSDOMBrowser){defaultButton=document.getElementById(target);}else {defaultButton=document.all[target];}if(defaultButton && typeof(defaultButton.click)!="undefined"){defaultButton.click();event.cancelBubble=true;if(event.stopPropagation)event.stopPropagation();return false;}}return true;}, 
			GetScrollX: function(){if(__nonMSDOMBrowser){return window.pageXOffset;}else {if(document.documentElement && document.documentElement.scrollLeft){return document.documentElement.scrollLeft;}else if(document.body){return document.body.scrollLeft;}}return 0;}, 
			GetScrollY: function(){if(__nonMSDOMBrowser){return window.pageYOffset;}else {if(document.documentElement && document.documentElement.scrollTop){return document.documentElement.scrollTop;}else if(document.body){return document.body.scrollTop;}}return 0;}, 
			SaveScrollPositionSubmit: function(){if(__nonMSDOMBrowser){theForm.elements['__SCROLLPOSITIONY'].value=window.pageYOffset;theForm.elements['__SCROLLPOSITIONX'].value=window.pageXOffset;}else {theForm.__SCROLLPOSITIONX.value=WebForm_GetScrollX();theForm.__SCROLLPOSITIONY.value=WebForm_GetScrollY();}if((typeof(this.oldSubmit)!="undefined")&&(this.oldSubmit!=null)){return this.oldSubmit();}return true;}, 
			SaveScrollPositionOnSubmit: function(){theForm.__SCROLLPOSITIONX.value=WebForm_GetScrollX();theForm.__SCROLLPOSITIONY.value=WebForm_GetScrollY();if((typeof(this.oldOnSubmit)!="undefined")&&(this.oldOnSubmit!=null)){return this.oldOnSubmit();}return true;}, 
			RestoreScrollPosition: function(){if(__nonMSDOMBrowser){window.scrollTo(theForm.elements['__SCROLLPOSITIONX'].value,theForm.elements['__SCROLLPOSITIONY'].value);}else {window.scrollTo(theForm.__SCROLLPOSITIONX.value,theForm.__SCROLLPOSITIONY.value);}if((typeof(theForm.oldOnLoad)!="undefined")&&(theForm.oldOnLoad!=null)){return theForm.oldOnLoad();}return true;}, 
			TextBoxKeyHandler: function(event){if(event.keyCode==13){var target;if(__nonMSDOMBrowser){target=event.target;}else {target=event.srcElement;}if((typeof(target)!="undefined")&&(target!=null)){if(typeof(target.onchange)!="undefined"){target.onchange();event.cancelBubble=true;if(event.stopPropagation)event.stopPropagation();return false;}}}return true;}, 
			AppendToClassName: function(element, className){var current=element.className;if(current){if(current.charAt(current.length-1)!=' '){current+=' ';}current+=className;}else {current=className;}element.className=current;}, 
			RemoveClassName: function(element, className){var current=element.className;if(current){if(current.substring(current.length-className.length-1,current.length)==' '+className){element.className=current.substring(0,current.length-className.length-1);return;}if(current==className){element.className="";return;}var index=current.indexOf(' '+className+' ');if(index!=-1){element.className=current.substring(0,index)+current.substring(index+className.length+2,current.length);return;}if(current.substring(0,className.length)==className+' '){element.className=current.substring(className.length+1,current.length);}}}, 
			GetElementById: function(elementId){if(document.getElementById){return document.getElementById(elementId);}else if(document.all){return document.all[elementId];}else return null;}, 
			GetElementByTagName: function(element, tagName){var elements=WebForm_GetElementsByTagName(element,tagName);if(elements && elements.length>0){return elements[0];}else return null;}, 
			GetElementsByTagName: function(element, tagName){if(element && tagName){if(element.getElementsByTagName){return element.getElementsByTagName(tagName);}if(element.all && element.all.tags){return element.all.tags(tagName);}}return null;}, 
			GetElementDir: function(element){if(element){if(element.dir){return element.dir;}return WebForm_GetElementDir(element.parentNode);}return "ltr";}, 
			GetElementPosition: function(element){var result={};result.x=0;result.y=0;result.width=0;result.height=0;if(element.offsetParent){result.x=element.offsetLeft;result.y=element.offsetTop;var parent=element.offsetParent;while(parent){result.x+=parent.offsetLeft;result.y+=parent.offsetTop;var parentTagName=parent.tagName.toLowerCase();if(parentTagName!="table" &&parentTagName!="body" &&parentTagName!="html" &&parentTagName!="div" &&parent.clientTop &&parent.clientLeft){result.x+=parent.clientLeft;result.y+=parent.clientTop;}parent=parent.offsetParent;}}else if(element.left && element.top){result.x=element.left;result.y=element.top;}else {if(element.x){result.x=element.x;}if(element.y){result.y=element.y;}}if(element.offsetWidth && element.offsetHeight){result.width=element.offsetWidth;result.height=element.offsetHeight;}else if(element.style && element.style.pixelWidth && element.style.pixelHeight){result.width=element.style.pixelWidth;result.height=element.style.pixelHeight;}return result;}, 
			GetParentByTagName: function(element, tagName){var parent=element.parentNode;var upperTagName=tagName.toUpperCase();while(parent &&(parent.tagName.toUpperCase()!=upperTagName)){parent=parent.parentNode?parent.parentNode:parent.parentElement;}return parent;}, 
			SetElementHeight: function(element, height){if(element && element.style){element.style.height=height+"px";}}, 
			SetElementWidth: function(element, width){if(element && element.style){element.style.width=width+"px";}}, 
			SetElementX: function(element, x){if(element && element.style){element.style.left=x+"px";}}, 
			SetElementY: function(element, y){if(element && element.style){element.style.top=y+"px";}}, 
			FindFirstFocusableChild: function(control){if(!control||!(control.tagName)){return null;}var tagName=control.tagName.toLowerCase();if(tagName=="undefined"){return null;}var children=control.childNodes;if(children){for(var i=0; i<children.length; i++){try{if(WebForm_CanFocus(children[i])){return children[i];}else {var focused=WebForm_FindFirstFocusableChild(children[i]);if(WebForm_CanFocus(focused)){return focused;}}}catch(e){}}}return null;}, 
			AutoFocus: function(focusId){var targetControl;if(__nonMSDOMBrowser){targetControl=document.getElementById(focusId);}else {targetControl=document.all[focusId];}var focused=targetControl;if(targetControl &&(!WebForm_CanFocus(targetControl))){focused=WebForm_FindFirstFocusableChild(targetControl);}if(focused){try{focused.focus();if(__nonMSDOMBrowser){focused.scrollIntoView(false);}if(window.__smartNav){window.__smartNav.ae=focused.id;}}catch(e){}}}, 
			CanFocus: function(element){if(!element||!(element.tagName))return false;var tagName=element.tagName.toLowerCase();return(!(element.disabled)&&(!(element.type)||element.type.toLowerCase()!="hidden")&& WebForm_IsFocusableTag(tagName)&& WebForm_IsInVisibleContainer(element));}, 
			IsFocusableTag: function(tagName){return(tagName=="input"||tagName=="textarea"||tagName=="select"||tagName=="button"||tagName=="a");}, 
			IsInVisibleContainer: function(ctrl){var current=ctrl;while((typeof(current)!="undefined")&&(current!=null)){if(current.disabled||(typeof(current.style)!="undefined" &&((typeof(current.style.display)!="undefined" &&current.style.display=="none")||(typeof(current.style.visibility)!="undefined" &&current.style.visibility=="hidden")))){return false;}if(typeof(current.parentNode)!="undefined" &&current.parentNode!=null &&current.parentNode!=current &&current.parentNode.tagName.toLowerCase()!="body"){current=current.parentNode;}else {return true;}}return true;}
		}, 
		WP: 
		{
			WebPart: function(webPartElement, webPartTitleElement, zone, zoneIndex, allowZoneChange){this.webPartElement=webPartElement;this.allowZoneChange=allowZoneChange;this.zone=zone;this.zoneIndex=zoneIndex;this.title=((typeof(webPartTitleElement)!="undefined")&&(webPartTitleElement!=null))?webPartTitleElement.innerText:"";webPartElement.__webPart=this;if((typeof(webPartTitleElement)!="undefined")&&(webPartTitleElement!=null)){webPartTitleElement.style.cursor="move";if(window.attachEvent){webPartTitleElement.attachEvent("onmousedown",WebPart_OnMouseDown);webPartElement.attachEvent("ondragstart",WebPart_OnDragStart);webPartElement.attachEvent("ondrag",WebPart_OnDrag);webPartElement.attachEvent("ondragend",WebPart_OnDragEnd);}else {webPartTitleElement.addEventListener("onmousedown",WebPart_OnMouseDown,false);webPartElement.addEventListener("ondragstart",WebPart_OnDragStart,false);webPartElement.addEventListener("ondrag",WebPart_OnDrag,false);webPartElement.addEventListener("ondragend",WebPart_OnDragEnd,false);}}this.UpdatePosition=WebPart_UpdatePosition;this.Dispose=WebPart_Dispose;}, 
			Dispose: function(){this.webPartElement.__webPart=null}, 
			OnMouseDown: function(){var currentEvent=window.event;var draggedWebPart=WebPart_GetParentWebPartElement(currentEvent.srcElement);if((typeof(draggedWebPart)=="undefined")||(draggedWebPart==null)){return;}document.selection.empty();try{__wpm.draggedWebPart=draggedWebPart;__wpm.DragDrop();}catch(e){__wpm.draggedWebPart=draggedWebPart;window.setTimeout("__wpm.DragDrop()",0);}currentEvent.returnValue=false;currentEvent.cancelBubble=true;}, 
			OnDragStart: function(){var currentEvent=window.event;var webPartElement=currentEvent.srcElement;if((typeof(webPartElement.__webPart)=="undefined")||(webPartElement.__webPart==null)){currentEvent.returnValue=false;currentEvent.cancelBubble=true;return;}var dataObject=currentEvent.dataTransfer;dataObject.effectAllowed=__wpm.InitiateWebPartDragDrop(webPartElement);}, 
			OnDrag: function(){__wpm.ContinueWebPartDragDrop();}, 
			OnDragEnd: function(){__wpm.CompleteWebPartDragDrop();}, 
			GetParentWebPartElement: function(containedElement){var elem=containedElement;while((typeof(elem.__webPart)=="undefined")||(elem.__webPart==null)){elem=elem.parentElement;if((typeof(elem)=="undefined")||(elem==null)){break;}}return elem;}, 
			UpdatePosition: function(){var location=__wpTranslateOffset(0,0,this.webPartElement,null,false);this.middleX=location.x+this.webPartElement.offsetWidth / 2;this.middleY=location.y+this.webPartElement.offsetHeight / 2;}
		}, 
		Z: 
		{
			Zone: function(zoneElement, zoneIndex, uniqueID, isVertical, allowLayoutChange, highlightColor){var webPartTable=null;if(zoneElement.rows.length==1){webPartTableContainer=zoneElement.rows[0].cells[0];}else {webPartTableContainer=zoneElement.rows[1].cells[0];}var i;for(i=0; i<webPartTableContainer.childNodes.length; i++){var node=webPartTableContainer.childNodes[i];if(node.tagName=="TABLE"){webPartTable=node;break;}}this.zoneElement=zoneElement;this.zoneIndex=zoneIndex;this.webParts=[];this.uniqueID=uniqueID;this.isVertical=isVertical;this.allowLayoutChange=allowLayoutChange;this.allowDrop=false;this.webPartTable=webPartTable;this.highlightColor=highlightColor;this.savedBorderColor=(webPartTable!=null)?webPartTable.style.borderColor:null;this.dropCueElements=[];if(webPartTable!=null){if(isVertical){for(i=0; i<webPartTable.rows.length; i+=2){this.dropCueElements[i / 2]=webPartTable.rows[i].cells[0].childNodes[0];}}else {for(i=0; i<webPartTable.rows[0].cells.length; i+=2){this.dropCueElements[i / 2]=webPartTable.rows[0].cells[i].childNodes[0];}}}this.AddWebPart=Zone_AddWebPart;this.GetWebPartIndex=Zone_GetWebPartIndex;this.ToggleDropCues=Zone_ToggleDropCues;this.UpdatePosition=Zone_UpdatePosition;this.Dispose=Zone_Dispose;webPartTable.__zone=this;if(window.attachEvent){webPartTable.attachEvent("ondragenter",Zone_OnDragEnter);webPartTable.attachEvent("ondrop",Zone_OnDrop);}else {webPartTable.addEventListener("ondragenter",Zone_OnDragEnter,false);webPartTable.addEventListener("ondrop",Zone_OnDrop,false);}}, 
			Dispose: function(){for(var i=0; i<this.webParts.length; i++){this.webParts[i].Dispose();}this.webPartTable.__zone=null;}, 
			OnDragEnter: function(){var handled=__wpm.ProcessWebPartDragEnter();var currentEvent=window.event;if(handled){currentEvent.returnValue=false;currentEvent.cancelBubble=true;}}, 
			OnDragOver: function(){var handled=__wpm.ProcessWebPartDragOver();var currentEvent=window.event;if(handled){currentEvent.returnValue=false;currentEvent.cancelBubble=true;}}, 
			OnDrop: function(){var handled=__wpm.ProcessWebPartDrop();var currentEvent=window.event;if(handled){currentEvent.returnValue=false;currentEvent.cancelBubble=true;}}, 
			GetParentZoneElement: function(containedElement){var elem=containedElement;while((typeof(elem.__zone)=="undefined")||(elem.__zone==null)){elem=elem.parentElement;if((typeof(elem)=="undefined")||(elem==null)){break;}}return elem;}, 
			AddWebPart: function(webPartElement, webPartTitleElement, allowZoneChange){var webPart=null;var zoneIndex=this.webParts.length;if(this.allowLayoutChange && __wpm.IsDragDropEnabled()){webPart=new WebPart(webPartElement,webPartTitleElement,this,zoneIndex,allowZoneChange);}else {webPart=new WebPart(webPartElement,null,this,zoneIndex,allowZoneChange);}this.webParts[zoneIndex]=webPart;return webPart;}, 
			ToggleDropCues: function(show, index, ignoreOutline){if(ignoreOutline==false){this.webPartTable.style.borderColor=(show?this.highlightColor:this.savedBorderColor);}if(index==-1){return;}var dropCue=this.dropCueElements[index];if(dropCue && dropCue.style){if(dropCue.style.height=="100%" &&!dropCue.webPartZoneHorizontalCueResized){var oldParentHeight=dropCue.parentElement.clientHeight;var realHeight=oldParentHeight-10;dropCue.style.height=realHeight+"px";var dropCueVerticalBar=dropCue.getElementsByTagName("DIV")[0];if(dropCueVerticalBar && dropCueVerticalBar.style){dropCueVerticalBar.style.height=dropCue.style.height;var heightDiff=(dropCue.parentElement.clientHeight-oldParentHeight);if(heightDiff){dropCue.style.height=(realHeight-heightDiff)+"px";dropCueVerticalBar.style.height=dropCue.style.height;}}dropCue.webPartZoneHorizontalCueResized=true;}dropCue.style.visibility=(show?"visible":"hidden");}}, 
			GetWebPartIndex: function(location){var x=location.x;var y=location.y;if((x<this.webPartTableLeft)||(x>this.webPartTableRight)||(y<this.webPartTableTop)||(y>this.webPartTableBottom)){return-1;}var vertical=this.isVertical;var webParts=this.webParts;var webPartsCount=webParts.length;for(var i=0; i<webPartsCount; i++){var webPart=webParts[i];if(vertical){if(y<webPart.middleY){return i;}}else {if(x<webPart.middleX){return i;}}}return webPartsCount;}, 
			UpdatePosition: function(){var topLeft=__wpTranslateOffset(0,0,this.webPartTable,null,false);this.webPartTableLeft=topLeft.x;this.webPartTableTop=topLeft.y;this.webPartTableRight=(this.webPartTable!=null)?topLeft.x+this.webPartTable.offsetWidth:topLeft.x;this.webPartTableBottom=(this.webPartTable!=null)?topLeft.y+this.webPartTable.offsetHeight:topLeft.y;for(var i=0; i<this.webParts.length; i++){this.webParts[i].UpdatePosition();}}
		}, 
		M: 
		{
			WebPartMenu: function(menuLabelElement, menuDropDownElement, menuElement){this.menuLabelElement=menuLabelElement;this.menuDropDownElement=menuDropDownElement;this.menuElement=menuElement;this.menuLabelElement.__menu=this;if(window.attachEvent){this.menuLabelElement.attachEvent('onclick',WebPartMenu_OnClick);this.menuLabelElement.attachEvent('onkeypress',WebPartMenu_OnKeyPress);this.menuLabelElement.attachEvent('onmouseenter',WebPartMenu_OnMouseEnter);this.menuLabelElement.attachEvent('onmouseleave',WebPartMenu_OnMouseLeave);}else {this.menuLabelElement.addEventListener('onclick',WebPartMenu_OnClick,false);this.menuLabelElement.addEventListener('onkeypress',WebPartMenu_OnKeyPress,false);this.menuLabelElement.addEventListener('onmouseenter',WebPartMenu_OnMouseEnter,false);this.menuLabelElement.addEventListener('onmouseleave',WebPartMenu_OnMouseLeave,false);};if((typeof(this.menuDropDownElement)!="undefined")&&(this.menuDropDownElement!=null)){this.menuDropDownElement.__menu=this;}this.menuItemStyle="";this.menuItemHoverStyle="";this.popup=null;this.hoverClassName="";this.hoverColor="";this.oldColor=this.menuLabelElement.style.color;this.oldTextDecoration=this.menuLabelElement.style.textDecoration;this.oldClassName=this.menuLabelElement.className;this.Show=WebPartMenu_Show;this.Hide=WebPartMenu_Hide;this.Hover=WebPartMenu_Hover;this.Unhover=WebPartMenu_Unhover;this.Dispose=WebPartMenu_Dispose;var menu=this;if(window.attachEvent){window.attachEvent('onunload',function(){menu.Dispose();});}else {window.addEventListener('onunload',function(){menu.Dispose();},false);}}, 
			Dispose: function(){this.menuLabelElement.__menu=null;this.menuDropDownElement.__menu=null;}, 
			Show: function(){if((typeof(__wpm.menu)!="undefined")&&(__wpm.menu!=null)){__wpm.menu.Hide();}var menuHTML="<html><head><style>"+"a.menuItem,a.menuItem:Link{display:block; padding:1px; text-decoration:none; "+this.itemStyle+"}"+"a.menuItem:Hover{"+this.itemHoverStyle+"}"+"</style><body scroll=\"no\" style=\"border:none; margin:0; padding:0;\" ondragstart=\"window.event.returnValue=false;\" onclick=\"popup.hide()\">"+this.menuElement.innerHTML+"<body></html>";var width=16;var height=16;this.popup=window.createPopup();__wpm.menu=this;var popupDocument=this.popup.document;popupDocument.write(menuHTML);this.popup.show(0,0,width,height);var popupBody=popupDocument.body;width=popupBody.scrollWidth;height=popupBody.scrollHeight;if(width<this.menuLabelElement.offsetWidth){width=this.menuLabelElement.offsetWidth+16;}if(this.menuElement.innerHTML.indexOf("progid:DXImageTransform.Microsoft.Shadow")!=-1){popupBody.style.paddingRight="4px";}popupBody.__wpm=__wpm;popupBody.__wpmDeleteWarning=__wpmDeleteWarning;popupBody.__wpmCloseProviderWarning=__wpmCloseProviderWarning;popupBody.popup=this.popup;this.popup.hide();this.popup.show(0,this.menuLabelElement.offsetHeight,width,height,this.menuLabelElement);}, 
			Hide: function(){if(__wpm.menu==this){__wpm.menu=null;if((typeof(this.popup)!="undefined")&&(this.popup!=null)){this.popup.hide();this.popup=null;}}}, 
			Hover: function(){if(this.labelHoverClassName!=""){this.menuLabelElement.className=this.menuLabelElement.className+" "+this.labelHoverClassName;}if(this.labelHoverColor!=""){this.menuLabelElement.style.color=this.labelHoverColor;}}, 
			Unhover: function(){if(this.labelHoverClassName!=""){this.menuLabelElement.style.textDecoration=this.oldTextDecoration;this.menuLabelElement.className=this.oldClassName;}if(this.labelHoverColor!=""){this.menuLabelElement.style.color=this.oldColor;}}, 
			OnClick: function(){var menu=window.event.srcElement.__menu;if((typeof(menu)!="undefined")&&(menu!=null)){window.event.returnValue=false;window.event.cancelBubble=true;menu.Show();}}, 
			OnKeyPress: function(){if(window.event.keyCode==13){var menu=window.event.srcElement.__menu;if((typeof(menu)!="undefined")&&(menu!=null)){window.event.returnValue=false;window.event.cancelBubble=true;menu.Show();}}}, 
			OnMouseEnter: function(){var menu=window.event.srcElement.__menu;if((typeof(menu)!="undefined")&&(menu!=null)){menu.Hover();}}, 
			OnMouseLeave: function(){var menu=window.event.srcElement.__menu;if((typeof(menu)!="undefined")&&(menu!=null)){menu.Unhover();}}
		}, 
		WPM: 
		{
			WebPartManager: function(){this.overlayContainerElement=null;this.zones=[];this.dragState=null;this.menu=null;this.draggedWebPart=null;this.AddZone=WebPartManager_AddZone;this.IsDragDropEnabled=WebPartManager_IsDragDropEnabled;this.DragDrop=WebPartManager_DragDrop;this.InitiateWebPartDragDrop=WebPartManager_InitiateWebPartDragDrop;this.CompleteWebPartDragDrop=WebPartManager_CompleteWebPartDragDrop;this.ContinueWebPartDragDrop=WebPartManager_ContinueWebPartDragDrop;this.ProcessWebPartDragEnter=WebPartManager_ProcessWebPartDragEnter;this.ProcessWebPartDragOver=WebPartManager_ProcessWebPartDragOver;this.ProcessWebPartDrop=WebPartManager_ProcessWebPartDrop;this.ShowHelp=WebPartManager_ShowHelp;this.ExportWebPart=WebPartManager_ExportWebPart;this.Execute=WebPartManager_Execute;this.SubmitPage=WebPartManager_SubmitPage;this.UpdatePositions=WebPartManager_UpdatePositions;if(window.attachEvent)window.attachEvent("onunload",WebPartManager_Dispose);else window.addEventListener("unload",WebPartManager_Dispose,false);}, 
			Dispose: function(){for(var i=0; i<__wpm.zones.length; i++){__wpm.zones[i].Dispose();}}, 
			AddZone: function(zoneElement, uniqueID, isVertical, allowLayoutChange, highlightColor){var zoneIndex=this.zones.length;var zone=new Zone(zoneElement,zoneIndex,uniqueID,isVertical,allowLayoutChange,highlightColor);this.zones[zoneIndex]=zone;return zone;}, 
			IsDragDropEnabled: function(){return((typeof(this.overlayContainerElement)!="undefined")&&(this.overlayContainerElement!=null));}, 
			DragDrop: function(){if((typeof(this.draggedWebPart)!="undefined")&&(this.draggedWebPart!=null)){var tempWebPart=this.draggedWebPart;this.draggedWebPart=null;tempWebPart.dragDrop();window.setTimeout("__wpClearSelection()",0);}}, 
			InitiateWebPartDragDrop: function(webPartElement){var webPart=webPartElement.__webPart;this.UpdatePositions();this.dragState=new WebPartDragState(webPartElement,"move");var location=__wpGetPageEventLocation(window.event,true);var overlayContainerElement=this.overlayContainerElement;overlayContainerElement.style.left=location.x-webPartElement.offsetWidth / 2;overlayContainerElement.style.top=location.y+4+(webPartElement.clientTop?webPartElement.clientTop:0);overlayContainerElement.style.display="block";overlayContainerElement.style.width=webPartElement.offsetWidth;overlayContainerElement.style.height=webPartElement.offsetHeight;overlayContainerElement.appendChild(webPartElement.cloneNode(true));if(webPart.allowZoneChange==false){webPart.zone.allowDrop=true;}else {for(var i=0; i<__wpm.zones.length; i++){var zone=__wpm.zones[i];if(zone.allowLayoutChange){zone.allowDrop=true;}}};if(window.attachEvent)document.body.attachEvent("ondragover",Zone_OnDragOver);else document.body.addEventListener("ondragover",Zone_OnDragOver,false);return "move";}, 
			CompleteWebPartDragDrop: function(){var dragState=this.dragState;this.dragState=null;if((typeof(dragState.dropZoneElement)!="undefined")&&(dragState.dropZoneElement!=null)){dragState.dropZoneElement.__zone.ToggleDropCues(false,dragState.dropIndex,false);}document.body.detachEvent("ondragover",Zone_OnDragOver);for(var i=0; i<__wpm.zones.length; i++){__wpm.zones[i].allowDrop=false;}this.overlayContainerElement.removeChild(this.overlayContainerElement.firstChild);this.overlayContainerElement.style.display="none";if((typeof(dragState)!="undefined")&&(dragState!=null)&&(dragState.dropped==true)){var currentZone=dragState.webPartElement.__webPart.zone;var currentZoneIndex=dragState.webPartElement.__webPart.zoneIndex;if((currentZone!=dragState.dropZoneElement.__zone)||((currentZoneIndex!=dragState.dropIndex)&&(currentZoneIndex!=(dragState.dropIndex-1)))){var eventTarget=dragState.dropZoneElement.__zone.uniqueID;var eventArgument="Drag:"+dragState.webPartElement.id+":"+dragState.dropIndex;this.SubmitPage(eventTarget,eventArgument);}}}, 
			ContinueWebPartDragDrop: function(){var dragState=this.dragState;if((typeof(dragState)!="undefined")&&(dragState!=null)){var style=this.overlayContainerElement.style;var location=__wpGetPageEventLocation(window.event,true);style.left=location.x-dragState.webPartElement.offsetWidth / 2;style.top=location.y+4+(dragState.webPartElement.clientTop?dragState.webPartElement.clientTop:0);}}, 
			Execute: function(script){if(this.menu){this.menu.Hide();}var scriptReference=new Function(script);return(scriptReference()!=false);}, 
			ProcessWebPartDragEnter: function(){var dragState=__wpm.dragState;if((typeof(dragState)!="undefined")&&(dragState!=null)){var currentEvent=window.event;var newDropZoneElement=Zone_GetParentZoneElement(currentEvent.srcElement);if((typeof(newDropZoneElement.__zone)=="undefined")||(newDropZoneElement.__zone==null)||(newDropZoneElement.__zone.allowDrop==false)){newDropZoneElement=null;}var newDropIndex=-1;if((typeof(newDropZoneElement)!="undefined")&&(newDropZoneElement!=null)){newDropIndex=newDropZoneElement.__zone.GetWebPartIndex(__wpGetPageEventLocation(currentEvent,false));if(newDropIndex==-1){newDropZoneElement=null;}}if(dragState.dropZoneElement!=newDropZoneElement){if((typeof(dragState.dropZoneElement)!="undefined")&&(dragState.dropZoneElement!=null)){dragState.dropZoneElement.__zone.ToggleDropCues(false,dragState.dropIndex,false);}dragState.dropZoneElement=newDropZoneElement;dragState.dropIndex=newDropIndex;if((typeof(newDropZoneElement)!="undefined")&&(newDropZoneElement!=null)){newDropZoneElement.__zone.ToggleDropCues(true,newDropIndex,false);}}else if(dragState.dropIndex!=newDropIndex){if(dragState.dropIndex!=-1){dragState.dropZoneElement.__zone.ToggleDropCues(false,dragState.dropIndex,false);}dragState.dropIndex=newDropIndex;if((typeof(newDropZoneElement)!="undefined")&&(newDropZoneElement!=null)){newDropZoneElement.__zone.ToggleDropCues(true,newDropIndex,false);}}if((typeof(dragState.dropZoneElement)!="undefined")&&(dragState.dropZoneElement!=null)){currentEvent.dataTransfer.effectAllowed=dragState.effect;}return true;}return false;}, 
			ProcessWebPartDragOver: function(){var dragState=__wpm.dragState;var currentEvent=window.event;var handled=false;if((typeof(dragState)!="undefined")&&(dragState!=null)&&(typeof(dragState.dropZoneElement)!="undefined")&&(dragState.dropZoneElement!=null)){var dropZoneElement=Zone_GetParentZoneElement(currentEvent.srcElement);if((typeof(dropZoneElement)!="undefined")&&(dropZoneElement!=null)&&(dropZoneElement.__zone.allowDrop==false)){dropZoneElement=null;}if(((typeof(dropZoneElement)=="undefined")||(dropZoneElement==null))&&(typeof(dragState.dropZoneElement)!="undefined")&&(dragState.dropZoneElement!=null)){dragState.dropZoneElement.__zone.ToggleDropCues(false,__wpm.dragState.dropIndex,false);dragState.dropZoneElement=null;dragState.dropIndex=-1;}else if((typeof(dropZoneElement)!="undefined")&&(dropZoneElement!=null)){var location=__wpGetPageEventLocation(currentEvent,false);var newDropIndex=dropZoneElement.__zone.GetWebPartIndex(location);if(newDropIndex==-1){dropZoneElement=null;}if(dragState.dropZoneElement!=dropZoneElement){if((dragState.dropIndex!=-1)||(typeof(dropZoneElement)=="undefined")||(dropZoneElement==null)){dragState.dropZoneElement.__zone.ToggleDropCues(false,__wpm.dragState.dropIndex,false);}dragState.dropZoneElement=dropZoneElement;}else {dragState.dropZoneElement.__zone.ToggleDropCues(false,dragState.dropIndex,true);}dragState.dropIndex=newDropIndex;if((typeof(dropZoneElement)!="undefined")&&(dropZoneElement!=null)){dropZoneElement.__zone.ToggleDropCues(true,newDropIndex,false);}}handled=true;}if((typeof(dragState)=="undefined")||(dragState==null)||(typeof(dragState.dropZoneElement)=="undefined")||(dragState.dropZoneElement==null)){currentEvent.dataTransfer.effectAllowed="none";}return handled;}, 
			ProcessWebPartDrop: function(){var dragState=this.dragState;if((typeof(dragState)!="undefined")&&(dragState!=null)){var currentEvent=window.event;var dropZoneElement=Zone_GetParentZoneElement(currentEvent.srcElement);if((typeof(dropZoneElement)!="undefined")&&(dropZoneElement!=null)&&(dropZoneElement.__zone.allowDrop==false)){dropZoneElement=null;}if((typeof(dropZoneElement)!="undefined")&&(dropZoneElement!=null)&&(dragState.dropZoneElement==dropZoneElement)){dragState.dropped=true;}return true;}return false;}, 
			ShowHelp: function(helpUrl, helpMode){if((typeof(this.menu)!="undefined")&&(this.menu!=null)){this.menu.Hide();}if(helpMode==0||helpMode==1){if(helpMode==0){var dialogInfo="edge:Sunken; center:yes; help:no; resizable:yes; status:no";window.showModalDialog(helpUrl,null,dialogInfo);}else {window.open(helpUrl,null,"scrollbars=yes,resizable=yes,status=no,toolbar=no,menubar=no,location=no");}}else if(helpMode==2){window.location=helpUrl;}}, 
			ExportWebPart: function(exportUrl, warn, confirmOnly){if(warn==true && __wpmExportWarning.length>0 && this.personalizationScopeShared!=true){if(confirm(__wpmExportWarning)==false){return false;}}if(confirmOnly==false){window.location=exportUrl;}return true;}, 
			UpdatePositions: function(){for(var i=0; i<this.zones.length; i++){this.zones[i].UpdatePosition();}}, 
			SubmitPage: function(eventTarget, eventArgument){if((typeof(this.menu)!="undefined")&&(this.menu!=null)){this.menu.Hide();}__doPostBack(eventTarget,eventArgument);}
		}, 
		V: 
		{
			Page_ValidationVer: '125', 
			Page_IsValid: true, 
			Page_BlockSubmit: false, 
			Page_InvalidControlToBeFocused: null, 
			ValidatorUpdateDisplay: function(val){if(typeof(val.display)=="string"){if(val.display=="None")return;if(val.display=="Dynamic"){val.style.display=val.isvalid?"none":"inline";return;}}val.style.visibility=val.isvalid?"hidden":"visible";}, 
			ValidatorUpdateIsValid: function(){Page_IsValid=AllValidatorsValid(Page_Validators);}, 
			ValidatorHookupControlID: function(controlID, val){if(typeof(controlID)!="string")return;var ctrl=document.getElementById(controlID);if((typeof(ctrl)!="undefined")&&(ctrl!=null))ValidatorHookupControl(ctrl,val);else {val.isvalid=true;val.enabled=false;}}, 
			ValidatorHookupControl: function(control, val){if(typeof(control.tagName)!="string")return;if(control.tagName!="INPUT" && control.tagName!="TEXTAREA" && control.tagName!="SELECT"){for(var i=0; i<control.childNodes.length; i++)ValidatorHookupControl(control.childNodes[i],val);return;}else {if(typeof(control.Validators)=="undefined"){control.Validators=new Array;var eventType;if(control.type=="radio")eventType="onclick";else {eventType="onchange";if(typeof(val.focusOnError)=="string" && val.focusOnError=="t")ValidatorHookupEvent(control,"onblur","ValidatedControlOnBlur(event); ");}ValidatorHookupEvent(control,eventType,"ValidatorOnChange(event); ");if(control.type=="text"||control.type=="password"||control.type=="file")ValidatorHookupEvent(control,"onkeypress","if(!ValidatedTextBoxOnKeyPress(event)){event.cancelBubble=true; if(event.stopPropagation)event.stopPropagation(); return false;}");}control.Validators[control.Validators.length]=val;}}, 
			ValidatorHookupEvent: function(control, eventType, functionPrefix){var ev;eval("ev=control."+eventType+";");if(typeof(ev)=="function"){ev=ev.toString();ev=ev.substring(ev.indexOf("{")+1,ev.lastIndexOf("}"));}else ev="";var func;if(navigator.appName.toLowerCase().indexOf('explorer')>-1)func=new Function(functionPrefix+" "+ev);else func=new Function("event",functionPrefix+" "+ev);eval("control."+eventType+"=func;");}, 
			ValidatorGetValue: function(id){var control;control=document.getElementById(id);if(typeof(control.value)=="string")return control.value;return ValidatorGetValueRecursive(control);}, 
			ValidatorGetValueRecursive: function(control){if(typeof(control.value)=="string" &&(control.type!="radio"||control.checked==true))return control.value;var i,val;for(i=0; i<control.childNodes.length; i++){val=ValidatorGetValueRecursive(control.childNodes[i]);if(val!="")return val;}return "";}, 
			ValidatorCommonOnSubmit: function(){Page_InvalidControlToBeFocused=null;var result=!Page_BlockSubmit;if((typeof(window.event)!="undefined")&&(window.event!=null))window.event.returnValue=result;Page_BlockSubmit=false;return result;}, 
			ValidatorEnable: function(val, enable){val.enabled=(enable!=false);ValidatorValidate(val);ValidatorUpdateIsValid();}, 
			ValidatorOnChange: function(event){if(!event)event=window.event;Page_InvalidControlToBeFocused=null;var targetedControl;if((typeof(event.srcElement)!="undefined")&&(event.srcElement!=null))targetedControl=event.srcElement;else targetedControl=event.target;var vals;if(typeof(targetedControl.Validators)!="undefined")vals=targetedControl.Validators;else if(targetedControl.tagName.toLowerCase()=="label"){targetedControl=document.getElementById(targetedControl.htmlFor);vals=targetedControl.Validators;}for(var i=0; i<vals.length; i++)ValidatorValidate(vals[i],null,event);ValidatorUpdateIsValid();}, 
			ValidatorValidate: function(val, validationGroup, event){val.isvalid=true;if((typeof(val.enabled)=="undefined"||val.enabled!=false)&& IsValidationGroupMatch(val,validationGroup))if(typeof(val.evaluationfunction)=="function"){val.isvalid=val.evaluationfunction(val);if(!val.isvalid && Page_InvalidControlToBeFocused==null && typeof(val.focusOnError)=="string" && val.focusOnError=="t")ValidatorSetFocus(val,event);}ValidatorUpdateDisplay(val);}, 
			ValidatorSetFocus: function(val, event){var ctrl;if(typeof(val.controlhookup)=="string"){var eventCtrl;if((typeof(event)!="undefined")&&(event!=null)){if((typeof(event.srcElement)!="undefined")&&(event.srcElement!=null))eventCtrl=event.srcElement;else eventCtrl=event.target;}if((typeof(eventCtrl)!="undefined")&&(eventCtrl!=null)&&(typeof(eventCtrl.id)=="string")&&(eventCtrl.id==val.controlhookup))ctrl=eventCtrl;}if((typeof(ctrl)=="undefined")||(ctrl==null))ctrl=document.getElementById(val.controltovalidate);if((typeof(ctrl)!="undefined")&&(ctrl!=null)&&(ctrl.tagName.toLowerCase()!="table"||(typeof(event)=="undefined")||(event==null))&&((ctrl.tagName.toLowerCase()!="input")||(ctrl.type.toLowerCase()!="hidden"))&&(typeof(ctrl.disabled)=="undefined"||ctrl.disabled==null||ctrl.disabled==false)&&(typeof(ctrl.visible)=="undefined"||ctrl.visible==null||ctrl.visible!=false)&&(IsInVisibleContainer(ctrl))){if((ctrl.tagName.toLowerCase()=="table" &&(typeof(__nonMSDOMBrowser)=="undefined"||__nonMSDOMBrowser))||(ctrl.tagName.toLowerCase()=="span")){var inputElements=ctrl.getElementsByTagName("input");var lastInputElement=inputElements[inputElements.length-1];if(lastInputElement!=null)ctrl=lastInputElement;}if(typeof(ctrl.focus)!="undefined" && ctrl.focus!=null){ctrl.focus();Page_InvalidControlToBeFocused=ctrl;}}}, 
			ValidatorOnLoad: function(){if(typeof(Page_Validators)=="undefined")return;for(var i=0; i<Page_Validators.length; i++){var val=Page_Validators[i];if(typeof(val.evaluationfunction)=="string")eval("val.evaluationfunction="+val.evaluationfunction+";");if(typeof(val.isvalid)=="string"){if(val.isvalid=="False"){val.isvalid=false;Page_IsValid=false;}else val.isvalid=true;}else val.isvalid=true;if(typeof(val.enabled)=="string")val.enabled=(val.enabled!="False");if(typeof(val.controltovalidate)=="string")ValidatorHookupControlID(val.controltovalidate,val);if(typeof(val.controlhookup)=="string")ValidatorHookupControlID(val.controlhookup,val);}Page_ValidationActive=true;}, 
			ValidatorConvert: function(op, dataType, val){function GetFullYear(year){var twoDigitCutoffYear=val.cutoffyear % 100;var cutoffYearCentury=val.cutoffyear-twoDigitCutoffYear;return((year>twoDigitCutoffYear)?(cutoffYearCentury-100+year):(cutoffYearCentury+year));}var num,cleanInput,m,exp;if(dataType=="Integer"){exp=/^\s*[-\+]?\d+\s*$/;if(op.match(exp)==null)return null;num=parseInt(op,10);return(isNaN(num)?null:num);}else if(dataType=="Double"){exp=new RegExp("^\\s*([-\\+])?(\\d*)\\"+val.decimalchar+"?(\\d*)\\s*$");m=op.match(exp);if(m==null)return null;if(m[2].length==0 && m[3].length==0)return null;cleanInput=(m[1]!=null?m[1]:"")+(m[2].length>0?m[2]:"0")+(m[3].length>0?"."+m[3]:"");num=parseFloat(cleanInput);return(isNaN(num)?null:num);}else if(dataType=="Currency"){var hasDigits=(val.digits>0);var beginGroupSize,subsequentGroupSize;var groupSizeNum=parseInt(val.groupsize,10);if(!isNaN(groupSizeNum)&& groupSizeNum>0){beginGroupSize="{1,"+groupSizeNum+"}";subsequentGroupSize="{"+groupSizeNum+"}";}else {beginGroupSize=subsequentGroupSize="+";}exp=new RegExp("^\\s*([-\\+])?((\\d"+beginGroupSize+"(\\"+val.groupchar+"\\d"+subsequentGroupSize+")+)|\\d*)"+(hasDigits?"\\"+val.decimalchar+"?(\\d{0,"+val.digits+"})":"")+"\\s*$");m=op.match(exp);if(m==null)return null;if(m[2].length==0 && hasDigits && m[5].length==0)return null;cleanInput=(m[1]!=null?m[1]:"")+m[2].replace(new RegExp("(\\"+val.groupchar+")","g"),"")+((hasDigits && m[5].length>0)?"."+m[5]:"");num=parseFloat(cleanInput);return(isNaN(num)?null:num);}else if(dataType=="Date"){var yearFirstExp=new RegExp("^\\s*((\\d{4})|(\\d{2}))([-/]|\\.?)(\\d{1,2})\\4(\\d{1,2})\\s*$");m=op.match(yearFirstExp);var day,month,year;if(m!=null &&(m[2].length==4||val.dateorder=="ymd")){day=m[6];month=m[5];year=(m[2].length==4)?m[2]:GetFullYear(parseInt(m[3],10))}else {if(val.dateorder=="ymd")return null;var yearLastExp=new RegExp("^\\s*(\\d{1,2})([-/]|\\.?)(\\d{1,2})\\2((\\d{4})|(\\d{2}))\\s*$");m=op.match(yearLastExp);if(m==null)return null;if(val.dateorder=="mdy"){day=m[3];month=m[1];}else {day=m[1];month=m[3];}year=(m[5].length==4)?m[5]:GetFullYear(parseInt(m[6],10))}month-=1;var date=new Date(year,month,day);if(year<100)date.setFullYear(year);return(typeof(date)=="object" && year==date.getFullYear()&& month==date.getMonth()&& day==date.getDate())?date.valueOf():null;}else return op.toString();}, 
			ValidatorCompare: function(operand1, operand2, operator, val){var dataType=val.type;var op1,op2;if((op1=ValidatorConvert(operand1,dataType,val))==null)return false;if(operator=="DataTypeCheck")return true;if((op2=ValidatorConvert(operand2,dataType,val))==null)return true;switch(operator){case "NotEqual":return(op1!=op2);case "GreaterThan":return(op1>op2);case "GreaterThanEqual":return(op1>=op2);case "LessThan":return(op1<op2);case "LessThanEqual":return(op1<=op2);default:return(op1==op2);}}, 
			ValidatorTrim: function(s){var m=s.match(/^\s*(\S+(\s+\S+)*)\s*$/);return(m==null)?"":m[1];}, 
			AllValidatorsValid: function(validators){if((typeof(validators)!="undefined")&&(validators!=null))for(var i=0; i<validators.length; i++)if(!validators[i].isvalid)return false;return true;}, 
			Page_ClientValidate: function(validationGroup){Page_InvalidControlToBeFocused=null;if(typeof(Page_Validators)=="undefined")return true;var i;for(i=0; i<Page_Validators.length; i++)ValidatorValidate(Page_Validators[i],validationGroup,null);ValidatorUpdateIsValid();ValidationSummaryOnSubmit(validationGroup);Page_BlockSubmit=!Page_IsValid;return Page_IsValid;}, 
			ValidatedTextBoxOnKeyPress: function(event){if(event.keyCode==13){ValidatorOnChange(event);var vals;if((typeof(event.srcElement)!="undefined")&&(event.srcElement!=null))vals=event.srcElement.Validators;else vals=event.target.Validators;return AllValidatorsValid(vals);}return true;}, 
			ValidatedControlOnBlur: function(event){var control;if((typeof(event.srcElement)!="undefined")&&(event.srcElement!=null))control=event.srcElement;else control=event.target;if((typeof(control)!="undefined")&&(control!=null)&&(Page_InvalidControlToBeFocused==control)){control.focus();Page_InvalidControlToBeFocused=null;}}, 
			IsInVisibleContainer: function(ctrl){if(typeof(ctrl.style)!="undefined" &&((typeof(ctrl.style.display)!="undefined" && ctrl.style.display=="none")||(typeof(ctrl.style.visibility)!="undefined" && ctrl.style.visibility=="hidden")))return false;else if(typeof(ctrl.parentNode)!="undefined" && ctrl.parentNode!=null && ctrl.parentNode!=ctrl)return IsInVisibleContainer(ctrl.parentNode);return true;}, 
			IsValidationGroupMatch: function(control, validationGroup){if((typeof(validationGroup)=="undefined")||(validationGroup==null))return true;var controlGroup="";if(typeof(control.validationGroup)=="string")controlGroup=control.validationGroup;return(controlGroup==validationGroup);}, 
			CompareValidatorEvaluateIsValid: function(val){var value=ValidatorGetValue(val.controltovalidate);if(ValidatorTrim(value).length==0)return true;var compareTo="";if((typeof(val.controltocompare)!="string")||(typeof(document.getElementById(val.controltocompare))=="undefined")||(null==document.getElementById(val.controltocompare))){if(typeof(val.valuetocompare)=="string")compareTo=val.valuetocompare;}else compareTo=ValidatorGetValue(val.controltocompare);var operator="Equal";if(typeof(val.operator)=="string")operator=val.operator;return ValidatorCompare(value,compareTo,operator,val);}, 
			CustomValidatorEvaluateIsValid: function(val){var value="";if(typeof(val.controltovalidate)=="string"){value=ValidatorGetValue(val.controltovalidate);if((ValidatorTrim(value).length==0)&&((typeof(val.validateemptytext)!="string")||(val.validateemptytext!="true")))return true;}var args={Value:value,IsValid:true};if(typeof(val.clientvalidationfunction)=="string")eval(val.clientvalidationfunction+"(val,args);");return args.IsValid;}, 
			RegularExpressionValidatorEvaluateIsValid: function(val){var value=ValidatorGetValue(val.controltovalidate);if(ValidatorTrim(value).length==0)return true;var rx=new RegExp(val.validationexpression);var matches=rx.exec(value);return(matches!=null && value==matches[0]);}, 
			RequiredFieldValidatorEvaluateIsValid: function(val){return(ValidatorTrim(ValidatorGetValue(val.controltovalidate))!=ValidatorTrim(val.initialvalue))}, 
			RangeValidatorEvaluateIsValid: function(val){var value=ValidatorGetValue(val.controltovalidate);if(ValidatorTrim(value).length==0)return true;return(ValidatorCompare(value,val.minimumvalue,"GreaterThanEqual",val)&&ValidatorCompare(value,val.maximumvalue,"LessThanEqual",val));}, 
			ValidationSummaryOnSubmit: function(validationGroup){if(typeof(Page_ValidationSummaries)=="undefined")return;var summary,sums,s;for(sums=0; sums<Page_ValidationSummaries.length; sums++){summary=Page_ValidationSummaries[sums];summary.style.display="none";if(!Page_IsValid && IsValidationGroupMatch(summary,validationGroup)){var i;if(summary.showsummary!="False"){summary.style.display="";if(typeof(summary.displaymode)!="string")summary.displaymode="BulletList";switch(summary.displaymode){case "List":headerSep="<br>";first="";pre="";post="<br>";end="";break;case "BulletList":default:headerSep="";first="<ul>";pre="<li>";post="</li>";end="</ul>";break;case "SingleParagraph":headerSep=" ";first="";pre="";post=" ";end="<br>";break;}s="";if(typeof(summary.headertext)=="string")s+=summary.headertext+headerSep;s+=first;for(i=0; i<Page_Validators.length; i++)if(!Page_Validators[i].isvalid && typeof(Page_Validators[i].errormessage)=="string")s+=pre+Page_Validators[i].errormessage+post;s+=end;summary.innerHTML=s;window.scrollTo(0,0);}if(summary.showmessagebox=="True"){s="";if(typeof(summary.headertext)=="string")s+=summary.headertext+"\r\n";var lastValIndex=Page_Validators.length-1;for(i=0; i<=lastValIndex; i++){if(!Page_Validators[i].isvalid && typeof(Page_Validators[i].errormessage)=="string"){switch(summary.displaymode){case "List":s+=Page_Validators[i].errormessage;if(i<lastValIndex)s+="\r\n";break;case "BulletList":default:s+="-"+Page_Validators[i].errormessage;if(i<lastValIndex)s+="\r\n";break;case "SingleParagraph":s+=Page_Validators[i].errormessage+" ";break;}}}alert(s);}}}}
		}, 
		TreeView: 
		{
			HoverNode: function(data, node){node.hoverClass=data.hoverClass;WebForm_AppendToClassName(node,data.hoverClass);if(__nonMSDOMBrowser)node=node.childNodes[node.childNodes.length-1];else node=node.children[node.children.length-1];node.hoverHyperLinkClass=data.hoverHyperLinkClass;WebForm_AppendToClassName(node,data.hoverHyperLinkClass);}, 
			GetNodeText: function(node){var trNode=WebForm_GetParentByTagName(node,"TR");var outerNodes;if(trNode.childNodes[trNode.childNodes.length-1].getElementsByTagName){outerNodes=trNode.childNodes[trNode.childNodes.length-1].getElementsByTagName("A");if(!outerNodes||outerNodes.length==0)outerNodes=trNode.childNodes[trNode.childNodes.length-1].getElementsByTagName("SPAN");}var textNode=(outerNodes && outerNodes.length>0)?outerNodes[0].childNodes[0]:trNode.childNodes[trNode.childNodes.length-1].childNodes[0];return(textNode && textNode.nodeValue)?textNode.nodeValue:"";}, 
			PopulateNode: function(data, index, node, selectNode, selectImageNode, lineType, text, path, databound, datapath, parentIsLast){var context=new Object();context.data=data;context.node=node;context.selectNode=selectNode;context.selectImageNode=selectImageNode;context.lineType=lineType;context.index=index;context.isChecked="f";var tr=WebForm_GetParentByTagName(node,"TR");if(tr){var checkbox=tr.getElementsByTagName("INPUT");if(checkbox &&(checkbox.length>0)){for(var i=0; i<checkbox.length; i++){if(checkbox[i].type.toLowerCase()=="checkbox"){if(checkbox[i].checked)context.isChecked="t";break;}}}}var param=index+"|"+data.lastIndex+"|"+databound+context.isChecked+parentIsLast+"|"+text.length+"|"+text+datapath.length+"|"+datapath+path;WebForm_DoCallback(context.data.treeViewID,param,TreeView_ProcessNodeData,context,TreeView_ProcessNodeData,false);}, 
			ProcessNodeData: function(result, context){var treeNode=context.node;if(result.length>0){var ci=result.indexOf("|",0);context.data.lastIndex=result.substring(0,ci);ci=result.indexOf("|",ci+1);var newExpandState=result.substring(context.data.lastIndex.length+1,ci);context.data.expandState.value+=newExpandState;var chunk=result.substr(ci+1);var newChildren,table;if(__nonMSDOMBrowser){var newDiv=document.createElement("div");newDiv.innerHTML=chunk;table=WebForm_GetParentByTagName(treeNode,"TABLE");newChildren=null;if((typeof(table.nextSibling)=="undefined")||(table.nextSibling==null)){table.parentNode.insertBefore(newDiv.firstChild,table.nextSibling);newChildren=table.previousSibling;}else {table=table.nextSibling;table.parentNode.insertBefore(newDiv.firstChild,table);newChildren=table.previousSibling;}newChildren=document.getElementById(treeNode.id+"Nodes");}else {table=WebForm_GetParentByTagName(treeNode,"TABLE");table.insertAdjacentHTML("afterEnd",chunk);newChildren=document.all[treeNode.id+"Nodes"];}if((typeof(newChildren)!="undefined")&&(newChildren!=null)){TreeView_ToggleNode(context.data,context.index,treeNode,context.lineType,newChildren);treeNode.href=document.getElementById?"javascript:TreeView_ToggleNode("+context.data.name+","+context.index+",document.getElementById('"+treeNode.id+"'),'"+context.lineType+"',document.getElementById('"+newChildren.id+"'))":"javascript:TreeView_ToggleNode("+context.data.name+","+context.index+","+treeNode.id+",'"+context.lineType+"',"+newChildren.id+")";if((typeof(context.selectNode)!="undefined")&&(context.selectNode!=null)&& context.selectNode.href &&(context.selectNode.href.indexOf("javascript:TreeView_PopulateNode",0)==0)){context.selectNode.href=treeNode.href;}if((typeof(context.selectImageNode)!="undefined")&&(context.selectImageNode!=null)&& context.selectNode.href &&(context.selectImageNode.href.indexOf("javascript:TreeView_PopulateNode",0)==0)){context.selectImageNode.href=treeNode.href;}}context.data.populateLog.value+=context.index+",";}else {var img=treeNode.childNodes?treeNode.childNodes[0]:treeNode.children[0];if((typeof(img)!="undefined")&&(img!=null)){var lineType=context.lineType;if(lineType=="l")img.src=context.data.images[13];else if(lineType=="t")img.src=context.data.images[10];else if(lineType=="-")img.src=context.data.images[16];else img.src=context.data.images[3];var pe;if(__nonMSDOMBrowser){pe=treeNode.parentNode;pe.insertBefore(img,treeNode);pe.removeChild(treeNode);}else {pe=treeNode.parentElement;treeNode.style.visibility="hidden";treeNode.style.display="none";pe.insertAdjacentElement("afterBegin",img);}}}}, 
			SelectNode: function(data, node, nodeId){if((typeof(data.selectedClass)!="undefined")&&(data.selectedClass!=null)){var id=data.selectedNodeID.value;if(id.length>0){var selectedNode=document.getElementById(id);if((typeof(selectedNode)!="undefined")&&(selectedNode!=null)){WebForm_RemoveClassName(selectedNode,data.selectedHyperLinkClass);selectedNode=WebForm_GetParentByTagName(selectedNode,"TD");WebForm_RemoveClassName(selectedNode,data.selectedClass);}}WebForm_AppendToClassName(node,data.selectedHyperLinkClass);node=WebForm_GetParentByTagName(node,"TD");WebForm_AppendToClassName(node,data.selectedClass)}data.selectedNodeID.value=nodeId;}, 
			ToggleNode: function(data, index, node, lineType, children){var img=node.childNodes[0];var newExpandState;try{if(children.style.display=="none"){children.style.display="block";newExpandState="e";if((typeof(img)!="undefined")&&(img!=null)){if(lineType=="l")img.src=data.images[15];else if(lineType=="t")img.src=data.images[12];else if(lineType=="-")img.src=data.images[18];else img.src=data.images[5];img.alt=data.collapseToolTip.replace(/\{0\}/,TreeView_GetNodeText(node));}}else {children.style.display="none";newExpandState="c";if((typeof(img)!="undefined")&&(img!=null)){if(lineType=="l")img.src=data.images[14];else if(lineType=="t")img.src=data.images[11];else if(lineType=="-")img.src=data.images[17];else img.src=data.images[4];img.alt=data.expandToolTip.replace(/\{0\}/,TreeView_GetNodeText(node));}}}catch(e){}data.expandState.value=data.expandState.value.substring(0,index)+newExpandState+data.expandState.value.slice(index+1);}, 
			UnhoverNode: function(node){WebForm_RemoveClassName(node,node.hoverClass);if(__nonMSDOMBrowser)node=node.childNodes[node.childNodes.length-1];else node=node.children[node.children.length-1];WebForm_RemoveClassName(node,node.hoverHyperLinkClass);}
		}
	}, 
	UI: 
	{
		Init: function(){window.Element=CClass(this._Element);Element.addMethods();this._Event.Init();['Page','CheckBox','TextBox','NumericTextBox','Overlay','ExpandablePanel','Dialog','SmartHolder','MsgBox','StaticMenu','StaticMenuItem','DynamicMenu','DynamicMenuItem','Calendar','CalendarCell','Menu','MenuItem','GridView'].each(function(c){Soprex.UI[c]=CClass(Soprex.UI['_'+c]);});}, 
		_Element: 
		{
			_ctor: function(tagName, attrs){attrs=attrs||{};tagName=tagName.toLowerCase();var cache=Element.cache;if(attrs.name){tagName='<'+tagName+' name="'+attrs.name+'">';delete attrs.name;return Element.writeAttribute(document.createElement(tagName),attrs);}if(!cache[tagName]){cache[tagName]=Element.extend(document.createElement(tagName));}return Element.writeAttribute(cache[tagName].cloneNode(false),attrs);}, 
			_Static: 
			{
				cache: 
				{
				}, 
				_ITTags: 
				{
					TABLE: ['<table>','</table>',1], 
					TBODY: ['<table><tbody>','</tbody></table>',2], 
					TR: ['<table><tbody><tr>','</tr></tbody></table>',3], 
					TD: ['<table><tbody><tr><td>','</td></tr></tbody></table>',4], 
					SELECT: ['<select>','</select>',1], 
					THEAD: ['<table><tbody>','</tbody></table>',2], 
					TFOOT: ['<table><tbody>','</tbody></table>',2], 
					TH: ['<table><tbody><tr><td>','</td></tr></tbody></table>',4]
				}, 
				_getContent: function(tagName, html){var div=new Element('div'),t=Element._ITTags[tagName];if(t){div.innerHTML=t[0]+html+t[1];t[2].times(function(){div=div.firstChild});}else {div.innerHTML=html;}return $A(div.childNodes);}, 
				extend: function(el){if(!el||el._exFlag||el.nodeType!=1||el==window)return el;var methods={},tagName=el.tagName.toUpperCase(),p,v;copy$(methods,Element.Methods);if(Element.Methods.ByTag[tagName]){copy$(methods,Element.Methods.ByTag[tagName]);}for(p in methods){if(isFn$(methods[p])&&!(p in el)){el[p]=methods[p].methodize();}}el._exFlag=$_Fn$;return el;}, 
				hasAttribute: function(el, attr){return(el.hasAttribute?el.hasAttribute(attr):Element.Methods.hasAttribute(el,attr));}, 
				addMethods: function(methods){if(!methods){copy$(Soprex.UI._Form,Soprex.UI._Form.Methods);copy$(Soprex.UI._Form.Element,Soprex.UI._Form.Element.Methods);copy$(Element.Methods.ByTag,{"FORM":copy$(Soprex.UI._Form.Methods),"INPUT":copy$(Soprex.UI._Form.Element.Methods),"SELECT":copy$(Soprex.UI._Form.Element.Methods),"TEXTAREA":copy$(Soprex.UI._Form.Element.Methods)});}if(arguments.length==2){var tagName=methods;methods=arguments[1];}if(!tagName){copy$(Element.Methods,methods||{});}else if(isArray$(tagName)){tagName.each(extend);}else {extend(tagName);}function extend(tagName){tagName=tagName.toUpperCase();if(!Element.Methods.ByTag[tagName]){Element.Methods.ByTag[tagName]={};}copy$(Element.Methods.ByTag[tagName],methods);}copy$(Element,Element.Methods);delete Element.ByTag;Element.cache={};}, 
				Methods: 
				{
					setText: function(el, text){el.textContent=text;}, 
					getText: function(el){return el.textContent;}, 
					update: function(el, content){el=$el(el);if(content && content.toElement){content=content.toElement();}if(isEl$(content)){return el.update().insert(content);}content=toHTML$(content);var tagName=el.tagName.toUpperCase();if(tagName in Element._ITTags){$A(el.childNodes).each(function(node){el.removeChild(node)});Element._getContent(tagName,content.stripScripts()).each(function(node){el.appendChild(node)});}else {el.innerHTML=content.stripScripts();}content.evalScripts.bind(content).defer();return el;}, 
					replace: function(el, content){el=$el(el);if(content && content.toElement)content=content.toElement();if(isEl$(content)){el.parentNode.replaceChild(content,el);return el;}content=toHTML$(content);var parent=el.parentNode,tagName=parent.tagName.toUpperCase();if(Element._ITTags[tagName]){var nextSibling=el.next(),fragments=Element._getContent(tagName,content.stripScripts());parent.removeChild(el);if(nextSibling){fragments.each(function(node){parent.insertBefore(node,nextSibling)});}else {fragments.each(function(node){parent.appendChild(node)});}}else {el.outerHTML=content.stripScripts();}content.evalScripts.bind(content).defer();return el;}, 
					insert: function(el, insertions){el=$el(el);if(isStr$(insertions)||isNum$(insertions)||isEl$(insertions)||(insertions &&(insertions.toElement||insertions.toHTML))){insertions={bottom:insertions};}var content,insert,tagName,childNodes,insertionFns={before:function(el,node){el.parentNode.insertBefore(node,el);},top:function(el,node){el.insertBefore(node,el.firstChild);},bottom:function(el,node){el.appendChild(node);},after:function(el,node){el.parentNode.insertBefore(node,el.nextSibling);}};for(var position in insertions){content=insertions[position];position=position.toLowerCase();insert=insertionFns[position];if(content && content.toElement){content=content.toElement();}if(isEl$(content)){insert(el,content);continue;}content=toHTML$(content);tagName=((position=='before'||position=='after')?el.parentNode:el).tagName.toUpperCase();childNodes=Element._getContent(tagName,content.stripScripts());if(position=='top'||position=='after'){childNodes.reverse();}childNodes.each(insert.curry(el));content.evalScripts.bind(content).defer();}return el;}, 
					wrap: function(el, wrapper, attrs){el=$el(el);if(isEl$(wrapper)){$el(wrapper).writeAttribute(attrs||{});}else if(isStr$(wrapper)){wrapper=new Element(wrapper,attrs);}else {wrapper=new Element('div',wrapper);}if(el.parentNode){el.parentNode.replaceChild(wrapper,el);}wrapper.appendChild(el);return wrapper;}, 
					inspect: function(el){el=$el(el);var r='<'+el.tagName.toLowerCase();$H({'id':'id','className':'class'}).each(function(pair){var p=pair.first(),attr=pair.last();var v=(el[p]||'').toString();if(v){r+=' '+attr+'='+v.inspect(true);}});return r+'>';}, 
					collect: function(el, p){el=$el(el);var els=[];while(el=el[p]){if(el.nodeType==1){els.push(Element.extend(el));}}return els;}, 
					parentByTag: function(aEl, aTagName){while(aEl.tagName!=aTagName.toUpperCase())aEl=aEl.parentNode;return $el(aEl);}, 
					ancestors: function(el){return $el(el).collect('parentNode');}, 
					descendants: function(el){}, 
					firstDescendant: function(el){el=$el(el).firstChild;while(el && el.nodeType!=1)el=el.nextSibling;return $el(el);}, 
					childElements: function(el){if(!(el=$el(el).firstChild)){return[];}while(el && el.nodeType!=1){el=el.nextSibling;}return(el?[el].concat($el(el).nextSiblings()):[]);}, 
					previousSiblings: function(el){return $el(el).collect('previousSibling');}, 
					nextSiblings: function(el){return $el(el).collect('nextSibling');}, 
					siblings: function(el){return $el(el).previousSiblings().reverse().concat(el.nextSiblings());}, 
					descendantOf: function(el, ancestor){el=$el(el);ancestor=$el(ancestor);var tAncestor=ancestor;if(el.compareDocumentPosition){return(el.compareDocumentPosition(ancestor)& 8)===8;}if(el.sourceIndex){var e=el.sourceIndex,a=ancestor.sourceIndex,nextAncestor=ancestor.nextSibling;if(!nextAncestor){do{ancestor=ancestor.parentNode;}while(!(nextAncestor=ancestor.nextSibling)&& ancestor.parentNode);}if(nextAncestor && nextAncestor.sourceIndex){return(e>a && e<nextAncestor.sourceIndex);}}while(el=el.parentNode){if(el==tAncestor)return true;}return false;}, 
					identify: function(el){el=$el(el);var id=el.readAttribute('id'),self=arguments.callee;if(id)return id;do{id='anonymous_el_'+self.counter++}while($el(id));el.writeAttribute('id',id);return id;}, 
					readAttribute: function(el, name){var _={_getAttr:function(el,attr){return el.getAttribute(attr,2);},_getAttrNode:function(el,attr){var node=el.getAttributeNode(attr); return node?node.value:"";},_getEv:function(el,attr){attr=el.getAttribute(attr); return attr?attr.toString():null;},_getFlag:function(el,attr){return $el(el).hasAttribute(attr)?attr:null;},_getStyle:function(el){return el.style.cssText.toLowerCase();},_getTitle:function(el){return el.title;}},_read={names:{'class':'className','for':'htmlFor'},values:{style:_._getStyle,title:_._getTitle,href:_._getAttr,src:_._getAttr,type:_._getAttr,action:_._getAttrNode,disabled:_._getFlag,checked:_._getFlag,readonly:_._getFlag,multiple:_._getFlag,onload:_._getEv,onunload:_._getEv,onclick:_._getEv,ondblclick:_._getEv,onmousedown:_._getEv,onmouseup:_._getEv,onmouseover:_._getEv,onmousemove:_._getEv,onmouseout:_._getEv,onfocus:_._getEv,onblur:_._getEv,onkeypress:_._getEv,onkeydown:_._getEv,onkeyup:_._getEv,onsubmit:_._getEv,onreset:_._getEv,onselect:_._getEv,onchange:_._getEv}};el=$el(el);if(_read.values[name])return _read.values[name](el,name);if(_read.names[name])name=_read.names[name];if(name.include(':')){return(!el.attrs||!el.attrs[name])?null:el.attrs[name].value;}return el.getAttribute(name);}, 
					writeAttribute: function(el, name, v){var attrs={},_={_setChecked:function(el,v){el.checked=!!v;},_setStyle:function(el,v){el.style.cssText=v?v:'';}},_write={names:{cellpadding:'cellPadding',cellspacing:'cellSpacing','class':'className','for':'htmlFor',colspan:'colSpan',rowspan:'rowSpan',valign:'vAlign',datetime:'dateTime',accesskey:'accessKey',tabindex:'tabIndex',enctype:'encType',maxlength:'maxLength',readonly:'readOnly',longdesc:'longDesc'},values:{checked:_._setChecked,style:_._setStyle}};el=$el(el);if(typeof name=='object')attrs=name;else attrs[name]=isUndef$(v)?true:v;for(var attr in attrs){name=_write.names[attr]||attr;v=attrs[attr];if(_write.values[attr])name=_write.values[attr](el,v);if(v===false||v===null)el.removeAttribute(name);else if(v===true)el.setAttribute(name,name);else el.setAttribute(name,v);}return el;}, 
					hasAttribute: function(el, attr){var lHas={colspan:'colSpan',rowspan:'rowSpan',valign:'vAlign',datetime:'dateTime',accesskey:'accessKey',tabindex:'tabIndex',enctype:'encType',maxlength:'maxLength',readonly:'readOnly',longdesc:'longDesc'};attr=lHas[attr]||attr;var node=$el(el).getAttributeNode(attr);return node && node.specified;}, 
					observe: function(){Event.observe.apply(Event,arguments);return $A(arguments).first();}, 
					stopObserving: function(){Event.stopObserving.apply(Event,arguments);return $A(arguments).first();}, 
					visible: function(el){if(!isDef$(el))return false;return $el(el).style.display!='none';}, 
					toggle: function(el){if(!isDef$(el))return;el=$el(el);Element[Element.visible(el)?'hide':'show'](el);return el;}, 
					hide: function(el){if(!isDef$(el))return;$el(el).style.display='none';return el;}, 
					show: function(aEl, aForceBlock){if(!isDef$(aEl))return;$el(aEl).style.display=(aForceBlock?'block':'');return aEl;}, 
					classNames: function(el){return new Element.ClassNames(el);}, 
					hasClassName: function(aEl, aClassName){var lCN=aEl.className;return(lCN.length>0 &&(lCN==aClassName||new RegExp("(^|\\s)"+aClassName+"(\\s|$)").test(lCN)));}, 
					addClassName: function(aEl, aClassName){if(!aEl.hasClassName(aClassName)){aEl.className+=(aEl.className?' ':'')+aClassName;}return aEl;}, 
					removeClassName: function(aEl, aClassName){aEl.className=aEl.className.replace(new RegExp("(^|\\s+)"+aClassName+"(\\s+|$)"),' ').strip();return aEl;}, 
					toggleClassName: function(aEl, aClassName){return aEl[aEl.hasClassName(aClassName)?'removeClassName':'addClassName'](aClassName);}, 
					getStyleNameCorrection: function(aEl, aV){switch(aV){case 'float':case 'cssFloat':case 'styleFloat':return 'cssFloat';case 'appearance':case 'MozAppearance':return 'MozAppearance';case 'userSelect':case 'MozUserSelect':return 'MozUserSelect';}return aV.camelize()}, 
					getCss: function(aEl){return aEl.getAttribute("style");}, 
					setCss: function(aEl, aV){aEl.setAttribute("style",aV);}, 
					getStyle: function(aEl, aName, aL){aEl=$el(aEl);aName=aEl.getStyleNameCorrection(aName);var v;if(aL)v=aEl.style[aName]||'';else {var doc=aEl.getDoc();var computed=doc.defaultView.getComputedStyle(aEl,null);v=computed[aName]||aEl.style[aName]||'';if(aName=='opacity'){if(v)return parseFloat(v)* 100;return 100.0;}return v;}}, 
					setStyle: function(aEl, aS){var lS=aEl.style;if(isStr$(aS)){aEl.setCss(aEl.getCss()+';'+aS);return aS.include('opacity')?aEl.setOpacity(aS.match(/opacity:\s*(\d?\.?\d*)/)[1]):aEl;}for(var p in aS){p=aEl.getStyleNameCorrection(p);if(p=='opacity'){aEl.setOpacity(aS[p]);}else {lS[p]=aS[p];}}return aEl;}, 
					getStyleVal: function(aEl, aStyleName){var lS=Element.getStyle(aEl,aStyleName);var lV=parseUnit$(lS);if(lV.type=='%'||lV.value==0){return 0;}return lV.value}, 
					getOpacity: function(el){return $el(el).getStyle('opacity');}, 
					setOpacity: function(aEl, aV){aEl.style.opacity=(aV==100||aV==='')?'':(aV<0.001)?0:(parseFloat(aV)/ 100);return aEl;}, 
					setClipping: function(aEl, aV){$el(aEl).overflow=(aV?'auto':'hidden')}, 
					makeClipping: function(el){el=$el(el);if(el._overflow)return el;el._overflow=Element.getStyle(el,'overflow')||'auto';if(el._overflow!=='hidden'){el.style.overflow='hidden';}return el;}, 
					undoClipping: function(el){el=$el(el);if(!el._overflow){return el;}el.style.overflow=el._overflow=='auto'?'':el._overflow;el._overflow=null;return el;}, 
					makePositioned: function(el){el=$el(el);var pos=Element.getStyle(el,'position');if(pos=='static'||!pos){el._madePositioned=true;el.style.position='relative';}return el;}, 
					undoPositioned: function(el){el=$el(el);if(el._madePositioned){el._madePositioned=undefined;el.style.position=el.style.top=el.style.left=el.style.bottom=el.style.right='';}return el;}, 
					absolutize: function(el){el=$el(el);if(el.getStyle('position')=='absolute')return el;var offsets=el.positionedOffset(),top=offsets[1],left=offsets[0],width=el.clientWidth,height=el.clientHeight;el._tLeft=left-parseFloat(el.style.left||0);el._tTop=top-parseFloat(el.style.top||0);el._tWidth=el.style.width;el._tHeight=el.style.height;el.style.position='absolute';el.style.top=top+'px';el.style.left=left+'px';el.style.width=width+'px';el.style.height=height+'px';return el;}, 
					relativize: function(el){el=$el(el);if(el.getStyle('position')=='relative'){return el;}el.style.position='relative';var top=parseFloat(el.style.top||0)-(el._tTop||0),left=parseFloat(el.style.left||0)-(el._tLeft||0);el.style.top=top+'px';el.style.left=left+'px';el.style.height=el._tHeight;el.style.width=el._tWidth;return el;}, 
					setTop: function(aEl, aV){aEl.style.top=aV+'px';}, 
					setLeft: function(aEl, aV){aEl.style.left=aV+'px';}, 
					getTop: function(aEl, aMode){return Element.getLocation(aEl,aMode).y;}, 
					getLeft: function(aEl, aMode){return Element.getLocation(aEl,aMode).x;}, 
					__computeBody: function(aEl){var lBody=$el(aEl.getBody());var lX=lBody.offsetLeft,lY=lBody.offsetTop;if(!page$$.isQM()){lX+=parseUnit$(lBody.getStyle('borderLeftWidth')).value;lY+=parseUnit$(lBody.getStyle('borderTopWidth')).value;if(aEl &&!aEl.getBoundingClientRect){var hasAbs;while(aEl){var lPos=aEl.getStyle('position');if(lPos==="absolute"||lPos==="fixed"){hasAbs=true;break;}aEl=$el(aEl.offsetParent);}if(!hasAbs){lX+=parseUnit$(lBody.getStyle('borderLeftWidth')).value;lY+=parseUnit$(lBody.getStyle('borderTopWidth')).value;}}}return new $p(lX,lY);}, 
					__computeScroll: function(aEl){var lX=0,lY=0;if(aEl.getBoundingClientRect){lX-=page$$.getScrollLeft();lY-=page$$.getScrollTop();}else {var lBody=(aEl.isQM()?aEl.getBody():aEl.getDocElement());aEl=aEl.parentNode;while(aEl && aEl!=lBody){lX+=aEl.scrollLeft;lY+=aEl.scrollTop;aEl=aEl.parentNode;}}return new $p(lX,lY);}, 
					__computeOffset: function(aEl){var lX=0,lY=0;if(aEl.getBoundingClientRect){var rect=aEl.getBoundingClientRect();lX=Math.round(rect.left);lY=Math.round(rect.top);}else {var lBody=aEl.getBody(),lBox=aEl.getStyle('boxSizing')||aEl.getStyle('MozBoxSizing');if(lBox!=="border-box"){lX-=parseUnit$(aEl.getStyle('borderLeftWidth')).value;lY-=parseUnit$(aEl.getStyle('borderTopWidth')).value;}while(aEl && aEl!==lBody){lX+=aEl.offsetLeft;lY+=aEl.offsetTop;lBox=aEl.getStyle('boxSizing')||aEl.getStyle('MozBoxSizing');if(lBox!=="border-box"){lX+=parseUnit$(aEl.getStyle('borderLeftWidth')).value;lY+=parseUnit$(aEl.getStyle('borderTopWidth')).value;}if(aEl.parentNode && $el(aEl.parentNode).getStyle('overflow')!="visible"){lX+=parseUnit$(aEl.getStyle('borderLeftWidth')).value;lY+=parseUnit$(aEl.getStyle('borderTopWidth')).value;}aEl=$el(aEl.offsetParent);}}return new $p(lX,lY)}, 
					getLocation: function(aEl, aMode){var lX=0,lY=0,lX2=0,lY2=0,lBodyPos=aEl.__computeBody();if(aEl.tagName=="BODY"){lX=lBodyPos.x;lY=lBodyPos.y;}else {var lOffset=aEl.__computeOffset(),lScroll=aEl.__computeScroll();lX=lOffset.x+lBodyPos.x-lScroll.x;lY=lOffset.y+lBodyPos.y-lScroll.y;}lX2=lX+aEl.offsetWidth;lY2=lY+aEl.offsetHeight;if(aMode){if(aMode=="padding"||aMode=="scroll"){var overX=aEl.getStyle('overflowX');if(overX=="scroll"||overX=="auto"){lX2+=aEl.scrollWidth-aEl.offsetWidth+parseUnit$(aEl.getStyle('borderLeftWidth')).value+parseUnit$(aEl.getStyle('borderRightWidth')).value;}var overY=aEl.getStyle('overflowY');if(overY=="scroll"||overY=="auto"){lY2+=aEl.scrollHeight-aEl.offsetHeight+parseUnit$(aEl.getStyle('borderTopWidth')).value+parseUnit$(aEl.getStyle('borderBottomWidth')).value;}}switch(aMode){case "padding":lX+=parseUnit$(aEl.getStyle('paddingLeft')).value;lY+=parseUnit$(aEl.getStyle('paddingTop')).value;lX2-=parseUnit$(aEl.getStyle('paddingRight')).value;lY2-=parseUnit$(aEl.getStyle('paddingBottom')).value;case "scroll":lX-=aEl.scrollLeft;lY-=aEl.scrollTop;lX2-=aEl.scrollLeft;lY2-=aEl.scrollTop;case "border":lX+=parseUnit$(aEl.getStyle('borderLeftWidth')).value;lY+=parseUnit$(aEl.getStyle('borderTopWidth')).value;lX2-=parseUnit$(aEl.getStyle('borderRightWidth')).value;lY2-=parseUnit$(aEl.getStyle('borderBottomWidth')).value;break;case "margin":lX-=parseUnit$(aEl.getStyle('marginLeft')).value;lY-=parseUnit$(aEl.getStyle('marginTop')).value;lX2+=parseUnit$(aEl.getStyle('marginRight')).value;lY2+=parseUnit$(aEl.getStyle('marginBottom')).value;break;}}return{x:lX,y:lY,x2:lX2,y2:lY2};}, 
					getOffsetParent: function(aEl){aEl=$el(aEl);try{aEl.offsetParent}catch(e){return $el(document.body)}var v,lPos=aEl.getStyle('position');if(lPos==='static'){aEl.setStyle({position:'relative'});}if(aEl.offsetParent){v=$el(aEl.offsetParent);}while((aEl=aEl.parentNode)&& aEl!=document.body){if(Element.getStyle(aEl,'position')!='static'){v=$el(aEl);break;}}if(lPos==='static'){aEl.setStyle({position:lPos});}return v;}, 
					positionedOffset: function(el){try{el.offsetParent}catch(e){return new $p(0,0)}var position=el.getStyle('position'),vT=0,vL=0;if(position==='static'){var offsetParent=el.getOffsetParent();if(offsetParent && offsetParent.getStyle('position')==='fixed'){offsetParent.setStyle({zoom:1});}el.setStyle({position:'relative'});}do{vT+=el.offsetTop||0;vL+=el.offsetLeft||0;el=el.offsetParent;if(el){if(el.tagName.toUpperCase()=='BODY'){break;}if(Element.getStyle(el,'position')!=='static'){break;}}}while(el);if(position==='static')el.setStyle({position:position});return new $p(vL,vT);}, 
					setWidth: function(aEl, aW, aCorrect){aCorrect=(isNull$(aCorrect)?true:false);if(aW<=0||aW=="")aEl.style.width="";else {aEl.style.width=aW+"px";if(aCorrect){var lDiff=aEl.offsetWidth-aW;var lWidth=aW-lDiff;aEl.style.width=((lWidth>0)?(lWidth+"px"):"")}}}, 
					setHeight: function(aEl, aH, aCorrect){aCorrect=(isNull$(aCorrect)?true:false);if(aH<=0||aH==""){aEl.style.height="";}else {aEl.style.height=aH+"px";if(aCorrect){var lDiff=aEl.offsetHeight-aH;var lHeight=aH-lDiff;aEl.style.height=((lHeight>0)?(lHeight+"px"):"")}}}, 
					getWidth: function(aEl){return $el(aEl).getDimensions().W;}, 
					getMaxWidth: function(aEl){var lW=0,lP=aEl.parentNode||document.body;if(lP){lP.removeChild(aEl);var lTBL=createTableStrecher$(lP);lW=$el(lTBL).getWidth();lP.removeChild(lTBL);lP.appendChild(aEl);}return lW}, 
					getHeight: function(aEl){return $el(aEl).getDimensions().H;}, 
					getDimensions: function(aEl, aForce){var lDis=Element.getStyle(aEl,'display'),lDim={W:aEl.offsetWidth,H:aEl.offsetHeight};if(lDis==="none"||lDis===null||lDim.W===0||lDim.H===0){var lSW=Element.getStyleVal(aEl,'width'),lSH=Element.getStyleVal(aEl,'height');var lWidth=0,lHeight=0,lS=aEl.style;var tVisibility=lS.visibility,tPosition=lS.position,tDisplay=lS.display;lS.visibility='hidden';lS.position='absolute';lS.display='block';lWidth=aEl.clientWidth==0?lSW:aEl.clientWidth,lHeight=aEl.clientHeight==0?lSH:aEl.clientHeight,lS.display=tDisplay;lS.position=tPosition;lS.visibility=tVisibility;return{W:lWidth,H:lHeight};}return lDim;}, 
					$eldim: function(aEl){aEl=$el(aEl);var lElPos=aEl.getLocation(),lElDim=aEl.getDimensions();return{x1:lElPos.X,y1:lElPos.Y,x2:(lElPos.X+lElDim.W),y2:(lElPos.Y+lElDim.H)};}, 
					$elIntersect: function(aEl1, aEl2){var l1d=aEl1.$eldim(),l2d=$el(aEl2).$eldim(),lXt=(((l1d.x1<l2d.x1)&&(l1d.x2>l2d.x1))||((l2d.x1<l1d.x1)&&(l2d.x2>l1d.x1))),lYt=(((l1d.y1<l2d.y1)&&(l1d.y2>l2d.y1))||((l2d.y1<l1d.y1)&&(l2d.y2>l1d.y1)));return(lXt && lYt)}, 
					ByTag: 
					{
					}, 
					getDoc: function(aEl){return aEl.ownerDocument||aEl.document||null}, 
					getBody: function(aEl){return aEl.getDoc().body}, 
					getDocElement: function(aEl){return aEl.getDoc().documentElement;}, 
					isQM: function(aEl){return(aEl.getDoc().compatMode!=="CSS1Compat")}, 
					remove: function(el){el=$el(el);el.parentNode.removeChild(el);return el;}, 
					$Dis: function(aEl, aV){aEl.disabled=aV;}, 
					$Update: function(aEl, aV){$el(aEl).innerHTML=aV}, 
					empty: function(el){return $el(el).innerHTML.blank();}, 
					scrollTo: function(el){el=$el(el);var pos=el.__computeOffset();window.scrollTo(pos.x,pos.y);return el;}, 
					isChild: function(aP, aC){while(aC.tagName!='BODY'){if(aC==aP)return true;aC=aC.parentNode;};return false;}, 
					TryFocus: function(aEl){try{aEl.focus();}catch(e){return false;}return true;}, 
					isFocusable: function(aEl){var lTN='',lVis=true,lEl=$el(aEl);if(isDef$(lEl)){lTN=lEl.tagName;lVis=lEl.visible();}else {lTN=aEl;}return(['input','textarea','select','button','a'].contains(lTN.toLowerCase())&& lVis)}, 
					TryFocusNext: function(aEl){var inputs=document.getElementsByTagName('input'),nextInputs=[],btns=[],found=false,nI=null;for(var i=0,l=inputs.length; i<l; i++){if(aEl.tabIndex<inputs[i].tabIndex && Element.isFocusable(inputs[i])){nextInputs.push(inputs[i]);}};if(nextInputs.length>0){nI=nextInputs[0];for(var ii=0,ll=nextInputs.length; ii<ll; ii++){if(nI.tabIndex>nextInputs[ii].tabIndex){nI=nextInputs[ii];}}};if(nI!=null){Element.TryFocus(nI);}}, 
					$OverflowTooltip: function(aEl){if(aEl.clientWidth<aEl.scrollWidth){aEl.title=$el(aEl).getText();}}, 
					setBGImg: function(aEl, aImg){aEl.style.backgroundImage='url('+aImg+')';aEl.style.backgroundRepeat='no-repeat';aEl.style.backgroundPosition='center';}, 
					setHand: function(aEl){aEl.style.cursor='pointer';}
				}
			}
		}, 
		_Overlay: 
		{
			_ctor: function(aEl){this.IF=$$el("IFRAME");this.IF.src="javascript:'';";this.IF.frameBorder=0;this.IF.disabled="disabled";this.IF.style.position="absolute";this.IF.style.border="0px";this.IF.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)";if(aEl.style.zIndex>0)this.IF.style.zIndex=aEl.style.zIndex-1;this.__=aEl;this.__.parentNode.insertBefore(this.IF,aEl)}, 
			update: function(){var lIFS=this.IF.style;if(Element.visible(this.__)&& Element.getLeft(this.__)>0){this.IF.show();lIFS.top=this.ToUnit(this.__.style.top);lIFS.left=this.ToUnit(this.__.style.left);lIFS.width=this.__.offsetWidth+"px";lIFS.height=this.__.offsetHeight+"px"}else {this.IF.hide()}}, 
			ToUnit: function(aValue){return(!aValue?"0px":(parseInt(aValue,10)+"px"))}, 
			_dtor: function(){if(this.IF.parentNode)this.IF.parentNode.removeChild(this.IFrame);this.__=null;this.IF=null}
		}, 
		_Form: 
		{
			reset: function(form){$el(form).reset();return form;}, 
			serializeElements: function(els, options){if(typeof options!='object')options={hash:!!options};else if(isUndef$(options.hash))options.hash=true;var key,value,submitted=false,submit=options.submit;var data=els.inject({},function(r,el){if(!el.disabled && el.name){key=el.name;value=$el(el).getValue();if(value!=null &&(el.type!='submit'||(!submitted &&submit!==false &&(!submit||key==submit)&&(submitted=true)))){if(key in r){if(isArray$(r[key]))r[key]=[r[key]];r[key].push(value);}else r[key]=value;}}return r;});return options.hash?data:toQueryString$(data);}, 
			Methods: 
			{
				serialize: function(form, options){return Soprex.UI._Form.serializeElements(Soprex.UI._Form.getElements(form),options);}, 
				getElements: function(form){return $A($el(form).getElementsByTagName('*')).inject([],function(els,child){if(Soprex.UI._Form.Element.Serializers[child.tagName.toLowerCase()])els.push(Element.extend(child));return els;});}, 
				getInputs: function(form, typeName, name){form=$el(form);var inputs=form.getElementsByTagName('input');if(!typeName &&!name)return $A(inputs).map(Element.extend);for(var i=0,matchingInputs=[],length=inputs.length; i<length; i++){var input=inputs[i];if((typeName && input.type!=typeName)||(name && input.name!=name))continue;matchingInputs.push(Element.extend(input));}return matchingInputs;}, 
				disable: function(form){form=$el(form);Soprex.UI._Form.getElements(form).invoke('disable');return form;}, 
				enable: function(form){form=$el(form);Soprex.UI._Form.getElements(form).invoke('enable');return form;}, 
				findFirstElement: function(form){var els=$el(form).getElements().findAll(function(el){return 'hidden'!=el.type &&!el.disabled;});var firstByIndex=els.findAll(function(el){return el.hasAttribute('tabIndex')&& el.tabIndex>=0;}).sortBy(function(el){return el.tabIndex}).first();return firstByIndex?firstByIndex:els.find(function(el){return['input','select','textarea'].include(el.tagName.toLowerCase());});}, 
				focusFirstElement: function(form){form=$(form);form.findFirstElement().activate();return form;}, 
				request: function(form, options){form=$el(form),options=clone$(options||{});var params=options.parameters,action=form.readAttribute('action')||'';if(action.blank())action=window.location.href;options.parameters=form.serialize(true);if(params){if(isStr$(params))params=params.toQueryParams();copy$(options.parameters,params);}if(form.hasAttribute('method')&&!options.method)options.method=form.method;return new Ajax.Request(action,options);}
			}, 
			Element: 
			{
				focus: function(el){$el(el).focus();return el;}, 
				select: function(el){$el(el).select();return el;}, 
				Methods: 
				{
					serialize: function(el){el=$el(el);if(!el.disabled && el.name){var value=el.getValue();if(value!=undefined){var pair={};pair[el.name]=value;return toQueryString$(pair);}}return '';}, 
					getValue: function(el){el=$el(el);var method=el.tagName.toLowerCase();return Soprex.UI._Form.Element.Serializers[method](el);}, 
					setValue: function(el, value){el=$el(el);var method=el.tagName.toLowerCase();Soprex.UI._Form.Element.Serializers[method](el,value);return el;}, 
					clear: function(el){$el(el).value='';return el;}, 
					present: function(el){return $el(el).value!='';}, 
					activate: function(el){el=$el(el);try{el.focus();if(el.select &&(el.tagName.toLowerCase()!='input'||!['button','reset','submit'].include(el.type)))el.select();}catch(e){}return el;}, 
					disable: function(el){el=$el(el);el.blur();el.disabled=true;return el;}, 
					enable: function(el){el=$el(el);el.disabled=false;return el;}
				}, 
				Serializers: 
				{
					input: function(el, value){switch(el.type.toLowerCase()){case 'checkbox':case 'radio':return Soprex.UI._Form.Element.Serializers.inputSelector(el,value);default:return Soprex.UI._Form.Element.Serializers.textarea(el,value);}}, 
					inputSelector: function(el, value){if(isUndef$(value))return el.checked?el.value:null;else el.checked=!!value;}, 
					textarea: function(el, value){if(isUndef$(value))return el.value;else el.value=value;}, 
					select: function(el, index){if(isUndef$(index))return this[el.type=='select-one'?'selectOne':'selectMany'](el);else {var opt,value,single=!isArray$(index);for(var i=0,length=el.length; i<length; i++){opt=el.options[i];value=this.optionValue(opt);if(single){if(value==index){opt.selected=true;return;}}else opt.selected=index.include(value);}}}, 
					selectOne: function(el){var index=el.selectedIndex;return index>=0?this.optionValue(el.options[index]):null;}, 
					selectMany: function(el){var values,length=el.length;if(!length)return null;for(var i=0,values=[]; i<length; i++){var opt=el.options[i];if(opt.selected)values.push(this.optionValue(opt));}return values;}, 
					optionValue: function(opt){return Element.extend(opt).hasAttribute('value')?opt.value:opt.text;}
				}
			}
		}, 
		_Event: 
		{
			Ver$_Event: 3, 
			Init: function(){if(!window.Event)window.Event={};copy$(window.Event,Soprex.UI._Event._Static);copy$(window.Event,Soprex.UI._Event._Static.Methods);window['$ev']=function(e){return Event.extend(e);};Event.observe(window,'unload',Event.unloadCache,'Event');}, 
			_Static: 
			{
				Key: 
				{
					BKSP: 8, 
					SPC: 32, 
					TAB: 9, 
					ENT: 13, 
					SHF: 16, 
					CTRL: 17, 
					ALT: 18, 
					PAUSE: 19, 
					CPSL: 20, 
					ESC: 27, 
					PGUP: 33, 
					PGDW: 34, 
					END: 35, 
					HOME: 36, 
					LARR: 37, 
					RARR: 39, 
					UARR: 38, 
					DARR: 40, 
					INS: 45, 
					DEL: 46, 
					F1: 112, 
					F2: 113, 
					F3: 114, 
					F4: 115, 
					F5: 116, 
					F6: 117, 
					F7: 118, 
					F8: 119, 
					F9: 120, 
					F10: 121, 
					F11: 122, 
					F12: 123, 
					LWND: 91, 
					RWND: 92, 
					SEL: 93, 
					NUMLK: 144, 
					SCRLK: 145
				}, 
				observers: [], 
				getEvent: function(e){return e||window.event}, 
				extend: function(e){e=Event.getEvent(e);if(!e||e._exFlag)return e;var methods={},p;copy$(methods,Event.Methods);for(p in methods){if(isFn$(methods[p])&&!(p in e))e[p]=methods[p].methodize();}e._exFlag=$_Fn$;return e;}, 
				unloadCache: function(){if(!Event.observers)return;for(var i=0; i<Event.observers.length; i++){var el=Event.observers[i];for(var ii=0,l=el.AttachedEvents.length; ii<l; ii++){Event.stopObserving(el,el.AttachedEvents[ii],'','');}}delete Event.observers;}, 
				observe: function(el, name, observer, id){if(!isDef$(el))return;var fnName=name+'-'+observer+id;if(isDef$(el[fnName]))return observer;if(!isDef$(el.AttachedEvents)){Event.observers.push(el);el.AttachedEvents=[];};el['$'+fnName]=observer;el[fnName]=function(e){try{el['$'+fnName](e||window.event);}catch(ex){}};if(el.addEventListener)el.addEventListener(name,el[fnName],false);else if(el.attachEvent)el.attachEvent('on'+name,el[fnName]);el.AttachedEvents.push(fnName);return observer;}, 
				stopObserving: function(el, name, observer, id){if(!isDef$(el))return;var fnName=name+'-'+observer+id;if(observer==''){fnName=name+'';name=fnName.split('-')[0];};if(el[fnName]){if(el.removeEventListener)el.removeEventListener(name,el[fnName],false);else if(el.detachEvent)el.detachEvent("on"+name,el[fnName]);el[fnName]=null;el['$'+fnName]=null;}if(isDef$(el.AttachedEvents)){el.AttachedEvents.remove(fnName);if(el.AttachedEvents.length==0)Event.observers.remove(el);}else Event.observers.remove(el);}, 
				SetEvents: function(aObj, aEl, aEventList, aRemove, aId){if(!isDef$(aEl))return;for(var i=0,l=aEventList.length; i<l; i++){var lEv=aEventList[i],lOb=aObj[lEv[1]];if(aRemove)Event.stopObserving(aEl,lEv[0],lOb.bindAsObserver(aObj),aId);else Event.observe(aEl,lEv[0],lOb.bindAsObserver(aObj),aId);}}, 
				EnterToClick: function(e){e=$ev(e);if(e.getKeyCode()==Event.Key.ENT){if(e.src().onclick!=null)__doPostBack(e.src().name,"");e.noBubble();return false}return true}, 
				EnterToMouseOver: function(e){e=$ev(e);if(e.getKeyCode()==Event.Key.ENT){if(e.src().onmouseover!=null)e.src().onmouseover();e.noBubble();return false}return true}, 
				EnterToTab: function(e){e=$ev(e);if(e.getKeyCode()==Event.Key.ENT){if(e.type=="keypress"){e.preventDefault();e.stopPropagation();e.returnValue=false;Element.TryFocusNext(e.src());}return false;}}, 
				EnterSubmit: function(e){e=$ev(e);if(e.getKeyCode()==Event.Key.ENT){var el=$el(e.src()).parentByTag('FORM');if(isDef$(el)&& isDef$(el.submit))theForm.submit();}}, 
				Methods: 
				{
					getKeyCode: function(e){e=$ev(e);if(!e)return false;var lKey=e.keyCode;switch(lKey){case 63232:return 38;case 63233:return 40;case 63234:return 37;case 63235:return 39;case 63272:case 63273:case 63275:return null;case 63276:return 33;case 63277:return 34;}if(lKey==0)lKey=e.charCode;return lKey;}, 
					isNavigationKey: function(e){e=$ev(e);if(!e)return false;switch(e.getKeyCode()){case 8:case 9:return true;}return false;}, 
					src: function(e){return e.target||e.srcElement;}, 
					rel: function(e){return e.relatedTarget;}, 
					isLeftClick: function(e){return(((e.which)&&(e.which==1))||((e.button)&&(e.button==1)));}, 
					pX: function(e){return e.pageX||(e.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft));}, 
					pY: function(e){return e.pageY||(e.clientY+(document.documentElement.scrollTop||document.body.scrollTop));}, 
					getPosition: function(e){return{x:e.pX(),y:e.pY()}}, 
					stop: function(e){e=$ev(e);if(!e)return false;e.noRet();e.noBubble();}, 
					noRet: function(e){e.returnValue=false;if(e.preventDefault)e.preventDefault();else e.returnValue=false;}, 
					noBubble: function(e){e.cancelBubble=true;if(e.preventDefault)e.stopPropagation();else e.cancelBubble=true;}, 
					findElement: function(e, tagName){var el=$el(e).src();while(el.parentNode &&(!el.tagName||(el.tagName.toUpperCase()!=tagName.toUpperCase())))el=el.parentNode;return el;}
				}
			}
		}, 
		_Page: 
		{
			_ctor: function(aWin){this._wnd=(aWin||window);this._doc=this._wnd.document;this._body=$el(this._doc.body);this._isQM=(this._doc.compatMode!=="CSS1Compat");this._doce=this._isQM?this._body:this._doc.documentElement;}, 
			getPageSize: function(){return new $s(this.getWidth(),this.getHeight())}, 
			getViewRect: function(){return new $r(this.getScrollLeft(),this.getScrollTop(),this.getViewWidth(),this.getViewHeight())}, 
			getScrollPosition: function(){return new $p(this.getScrollLeft(),this.getScrollTop())}, 
			getWidth: function(){return Math.max(this._doce.scrollWidth,this.getViewWidth());}, 
			getHeight: function(){return Math.max(this._doce.scrollHeight,this.getViewHeight());}, 
			getViewWidth: function(){return this._doce.clientWidth;}, 
			getViewHeight: function(){return this._doce.clientHeight;}, 
			getScrollLeft: function(){return this._wnd.pageXOffset;}, 
			getScrollTop: function(){return this._wnd.pageYOffset;}, 
			isQM: function(){return this._isQM;}
		}, 
		_CheckBox: 
		{
			_ctor: function(aData){if(!aData)return;copy$(this,aData);this.__=$el(this.UID);if(!isDef$(this.__))return;this.Parent=$el(this.__.parentNode);this.Checked=this.__.checked;this.Initialize()}, 
			Initialize: function(){var lTbl=['table',{'cellpadding':'0'},{'cellspacing':'0'},{'border':'0'},{'style':'border-collapse:collapse;'},['tbody',['tr',['td',{'valign':'middle'}],['td',{'valign':'middle'}]]]];this._T=$el($build(null,lTbl));this.Label=$$el('span');this.__=this.__.replace(this._T);this._T.rows[0].cells[0].appendChild(this.__);this._T.rows[0].cells[1].appendChild(this.Label);this.Checked=!this.Checked;this._onClick();if(!this.__.disabled){this._T.setHand();this._T.observe('click',this._onClick.bindAsObserver(this),'CheckBox');}else {this.Label.disabled="disabled";}}, 
			_set: function(aIsChecked){this.__.checked=this.Checked=(aIsChecked||false);}, 
			_onClick: function(){this.Label.setText(this.Checked?this.InactiveText:this.ActiveText);this._set(!this.Checked)}
		}, 
		_TextBox: 
		{
			_ctor: function(aElement, aData){if(!aElement)return;var lId=isStr$(aElement)?aElement:aElement.id;if(isDef$(Soprex.UI.TextBox._TBs[lId]))return Soprex.UI.TextBox._TBs[lId];this.__=$El(aElement);if(!isDef$(this.__))return false;if(Element.getStyle(this.__,'Display')=='none')return false;if(aData)copy$(this,aData);this._CP={current:0,old:0};this._TR={};this.Initialize();Soprex.UI.TextBox._TBs[lId]=this;}, 
			_Static: 
			{
				Ver$TextBox: 2, 
				_TBs: 
				{
				}, 
				InitTBs: function(){var lTBs=$A(document.getElementsByTagName('input')).concat($A(document.getElementsByTagName('textarea')));for(var i=0,l=lTBs.length; i<l; i++){if(lTBs[i].type=='text'||lTBs[i].type=='password'||lTBs[i].tagName=='TEXTAREA'){var tb=new Soprex.UI.TextBox(lTBs[i]);}}var lSP=document.getElementsByTagName('span');for(var i=0,l=lSP.length; i<l; i++){if(lSP[i].innerHTML=='')lSP[i].style.display='none';}Event.observe(window,'unload',Soprex.UI.TextBox.unloadCache,'TextBox');}, 
				unloadCache: function(){var c=Soprex.UI.TextBox._TBs;if(!c)return;for(var i=0,l=c.length; l<c; i++)delete Soprex.UI.TextBox._TBs[i];delete Soprex.UI.TextBox._TBs;}
			}, 
			isNumeric: false, 
			Initialize: function(){this.Type=(this.__.tagName=='TEXTAREA'?'TA':'TB');this.fixWidth();this.setInitValue();this.checkMaxLength()}, 
			setInitValue: function(){if(!isDef$(this.InitValue)){var lV=$Attr(this.__,'IV');if(!isDef$(lV))lV=$Attr(this.__,'InitValue');if(lV!=null){this.__.value=lV;this.InitValue=lV}}}, 
			fixWidth: function(){var lNOWC=$Attr(this.__,'NOWC');if(this.Type=='TB' && lNOWC!='true'){if(this.__.offsetWidth>0)Element.setWidth(this.__,this.__.offsetWidth-4);}else {var lWC=$Attr(this.__,'WC');if(!isDef$(lWC))lWC=$Attr(this.__,'WidthCorrection');if(isDef$(lWC)&&(lNOWC!='true')){var lPN=this.__.parentNode;if(lPN.id.indexOf('UpdatePanel')!=-1){lPN=this.__.parentNode.parentNode;};var lPW=lPN.offsetWidth,lWidth=parseInt((lPW / 100)* lWC.tryParseFloat(100),10);Element.setWidth(this.__,lWidth-3);Element.show(this.__);}if(isDef$(lNOWC))Element.show(this.__);}}, 
			checkMaxLength: function(){this.isNumeric=$Attr(this.__,'isNumeric')||false;if(this.isNumeric)return;var lMax=$Attr(this.__,'maxchars');if(!isDef$(lMax))lMax=$Attr(this.__,'maxlength');if(isDef$(lMax)&&(lMax>0 && lMax<10000)){this.MaxLength=lMax;var lEL=[['paste','fixMaxLength'],['keyup','fixMaxLength'],['keydown','fixMaxLengthkp'],['change','fixMaxLength']];Event.SetEvents(this,this.__,lEL,false,this.__.id);}}, 
			fixMaxLength: function(){if(this.MaxLength<this.len()){this.set(this.get().substring(0,this.MaxLength));return false;}return true;}, 
			fixMaxLengthkp: function(){if(this.MaxLength<this.len()){this.set(this.get().substring(0,this.MaxLength));return(this.__.onkeydown!=null?this.__.onkeydown():false);}return(this.__.onkeydown!=null?this.__.onkeydown():true);}, 
			get: function(){return this.__.value}, 
			set: function(aV){this.__.value=aV}, 
			len: function(){return this.get().length}, 
			find: function(aV, aP){return this.get().indexOf(aV,aP)}, 
			pos: function(aV){if(!(aV==null||!isNaN(aV))){this.posOld(this._CP.current);this._CP.current=aV;}return this._CP.current;}, 
			posI: function(){return this.posOld(this._CP.current++)}, 
			posD: function(){return this.posOld(this._CP.current--)}, 
			posOld: function(aV){var lOld=this._CP.old;if(aV==null)return lOld;this._CP.old=aV;return lOld}, 
			select: function(aB, aE){if(aB==undefined){aB=this.curPos();}if(document.selection){if(this.__.tagName=='TEXTAREA'){var i=this.get().indexOf("\r",0);while(i!=-1 && i<aE){aE--;if(i<aB){aB--;}i=this.get().indexOf("\r",i+1);}}this._TR=this.__.createTextRange();this._TR.moveStart('character',aB);if(aE!=undefined){this._TR.moveEnd('character',aE-this.len());}this._TR.select();this.pos(aB);return this._TR;}else {this.__.selectionStart=aB;this.__.selectionEnd=Math.min((aE==undefined?aB:aE),this.len());$el(this.__).TryFocus();this.pos(aB);return this.get().substring(aB,this.__.selectionEnd);}}, 
			getSel: function(){if(this.__.createTextRange){var cp=this.getCaretPosition();return this.get().substring(cp.start,cp.end);}else {return this.get().substring(this.__.selectionStart,this.__.selectionEnd);}}, 
			setSel: function(aValue){var lV=this.get();if(this.__.createTextRange){var cp=this.getCaretPosition();this.__.value=lV.substring(0,cp.start)+aValue+lV.substring(cp.end);this.__.select(cp.start,cp.start+aValue.length);}else {this.__.value=lV.substring(0,this.__.selectionStart)+aValue+lV.substring(this.__.selectionEnd);this.__.selectionEnd=this.__.selectionStart+aValue.length;}}, 
			curPos: function(){var lLoc;if(document.selection){var lSel=document.selection;if(lSel){lSr=lSel.createRange();var lTbr=this.__.createTextRange();lTbr.setEndPoint("EndToStart",lSr);lLoc=lTbr.text.length;}}else {lLoc=this.__.selectionStart;}return lLoc;}, 
			getCaretPosition: function(element){if(!document.selection)return{start:this.__.selectionStart,end:this.__.selectionEnd};if(this.Type=='TA'){var r=document.selection.createRange(),l=-this.len();return{start:-r.moveStart('character',l),end:-r.moveEnd('character',l)};}else {var r=document.selection.createRange(),r2=this.__.createTextRange();r2.setEndPoint('StartToEnd',r);var end=this.len()-r2.text.length;r2.setEndPoint('StartToStart',r);return{start:this.len()-r2.text.length,end:end};}}
		}, 
		_NumericTextBox: 
		{
			_ctor: function(aData){if(!aData)return;copy$(this,aData);this._ctrl=new Soprex.UI.TextBox(this.UID);this._ctrl.isNumeric=true;this.SecSeparator=(this.Separator=='.'?',':'.');this.EventList=[["keypress","_onKeyPress"],['keyup','_onKeyUp'],["focus","_onFocus"]];Event.SetEvents(this,this._ctrl.__,this.EventList,false,this.UID);}, 
			_onKeyPress: function(e){e=$ev(e);if(e.isNavigationKey())return true;var lKey=e.getKeyCode(),lChr=String.fromCharCode(lKey),lV=this._ctrl.get();if(lKey>=48 && lKey<=57){if((lV.indexOf(this.Separator)==-1)||((lV.split(this.Separator)[1]).length<this.DecimalPlaces))return true;}if((lChr=='.'||lChr==',')&&(lV.indexOf(this.Separator)==-1)&&(lV.indexOf(this.SecSeparator)==-1))return true;e.stop();return false;}, 
			_onKeyUp: function(e){var lV=this._ctrl.get(),lV2=lV.replace(this.SecSeparator,this.Separator);if(lV!=lV2)this._ctrl.set(lV2);var lMax=$Attr(this.__,'maxchars');if(!isDef$(lMax))lMax=$Attr(this.__,'maxlength');if(isNum$(lMax)&&(this._ctrl.len()>lMax))this._ctrl.set(this._ctrl.get().substring(0,lMax));}, 
			_onFocus: function(e){this._ctrl.select();}
		}, 
		_MsgBox: 
		{
			_ctor: function(aData){if(aData==null)return;copy$(this,aData);this.createMB();this.proc=true;this.el=$el(this.UID);if(this.el!=null)this.el.hide();this._BTNS=[];this._HF=$el("__MSGBOX"+this.name);this.btnEvents=[['click','_onButtonClick'],['keydown','_onButtonKeyDown']];if(this.Visible){this.Show();}}, 
			_Static: 
			{
				Ver$MsgBox: 2
			}, 
			getBtnIdx: function(aBtn){if(aBtn==null)return 0;for(var i=0; i<this.btnCfg.Labels.length; i++){if(this.btnCfg.Labels[i]==aBtn)return i;}return 0;}, 
			createBtn: function(aTxt){var i=$$el('img');i.tabIndex=0;i.title=aTxt;i.alt=aTxt;i.EA=this.$ID;i.idx=this._BTNS.length;i.setHand();if(this._BTNS.length>0){var s=this._BP.rows[0].insertCell(-1);s.style.width=this.btnCfg.Spacing;}var c=this._BP.rows[0].insertCell(-1);c.appendChild(i);this._BTNS.push(i);}, 
			createMB: function(){this._TB=$$el('table','mbTB'+this.name);var trTB=this._TB.insertRow(-1);this.TitleText=$el(trTB.insertCell(-1));this.CloseImg=$el(trTB.insertCell(-1));this._IP=$$el('table','mbIP'+this.name);var trIP=this._IP.insertRow(-1);this.InfoImg=$el(trIP.insertCell(-1));trIP.insertCell(-1).innerHTML='&nbsp;';this.InfoText=$el(trIP.insertCell(-1));this._BP=$$el('table','mbBP'+this.name);this._BP.insertRow(-1);var trMain=[],tdMain=[];this._MB=$$el('table','mb'+this.name);trMain[0]=this._MB.insertRow(-1);tdMain[0]=trMain[0].insertCell(-1); tdMain[0].valign='top';tdMain[0].appendChild(this._TB);trMain[1]=this._MB.insertRow(-1);tdMain[1]=trMain[1].insertCell(-1);tdMain[1].appendChild(this._IP);trMain[2]=this._MB.insertRow(-1);tdMain[2]=trMain[2].insertCell(-1); tdMain[2].align='center';tdMain[2].appendChild(this._BP);this._MB.owner=this;$$add(this._MB)}, 
			_onButtonClick: function(e){e=$ev(e);var el=e.src(),fn=this.btnCfg.fntype[el.idx],trg=el.EA,val=el.idx;if(fn.indexOf('|')==-1){fnType=fn;}else {var ar=fn.split('|');fnType=ar[0];trg=ar[1];if(ar.length>2){val=ar[2];}}if(fnType=='pb'){this.Hide();__doPostBack(trg,val);}else if(fnType=='fn'){var $f=eval(trg+'.'+val);if(typeof($f)=='function')$f();}else if(fnType=='href')window.location=trg;if(fnType=='Close'||fnType=='Hide'){this.Hide();}}, 
			_onButtonKeyDown: function(e){e=$ev(e);var el=e.src();switch(e.getKeyCode()){case 27:this.Hide();break;case 9:case 37:case 39:if(e.shiftKey||e.keyCode==37)this.setFocus(el.idx-1);else this.setFocus(el.idx+1);break;case 13:case 32:el.click();break;default:return e;};e.stop()}, 
			_onKeyDown: function(e){e=$ev(e);var el=e.src();if(el.idx=='undefined')this.setFocus(0);else this._onButtonKeyDown(e);e.stop()}, 
			Show: function(){this.el.show();this._MB.show(true);if(this.proc){this.proc=false;for(var i=0,l=this.btnCfg.Labels.length; i<l; i++)this.createBtn(this.btnCfg.Labels[i]);this.TitleText.innerHTML='&nbsp;'+this.Title+'&nbsp;';this.TitleText.setHeight(this.TitleText.getHeight()+2);this.InfoText.innerHTML=this.Message;if(this.ImgClose!=null && this.ImgClose.URL!=''){this.CloseImg.setBGImg(this.ImgClose.URL);this.CloseImg.setWidth(this.TitleText.getHeight());this.CloseImg.setHand();}if(this.ImgInfo!=null && this.ImgInfo.URL!=''){this.InfoImg.setBGImg(this.ImgInfo.URL);this.InfoImg.setHeight(this.ImgInfo.H);this.InfoImg.setWidth(this.ImgInfo.W);this.InfoText.setWidth(((this._TB.getWidth()+this.InfoText.getWidth())-this._IP.getWidth()));}for(var i=0; i<this._BTNS.length; i++)this._BTNS[i].src='sbh.axd?f='+this.btnCfg.FontName+'&s='+this.btnCfg.FontSize+'&t='+this.btnCfg.Labels[i];this.ModalWnd=$$el('div','modalWnd'+this.name);$$add(this.ModalWnd);}for(var i=0; i<this._BTNS.length; i++)Event.SetEvents(this,this._BTNS[i],this.btnEvents,false,'msgbox');this.ModalWnd.show();this.updatePosition();this.setFocus(this.btnCfg.Focus1st);this.CloseImg.observe('click',this.Hide.bindAsObserver(this),'msgbox');Event.observe(document,'keydown',this._onKeyDown.bindAsObserver(this),'msgbox');Event.observe(window,'resize',this.updatePosition.bindAsObserver(this),'msgbox');this._HF.value="1";}, 
			Hide: function(){Event.stopObserving(document,'keydown',this._onKeyDown.bindAsObserver(this),'msgbox');Event.stopObserving(window,'resize',this.updatePosition.bindAsObserver(this),'msgbox');this.CloseImg.stopObserving('click',this.Hide.bindAsObserver(this),'msgbox');for(var i=0; i<this._BTNS.length; i++)Event.SetEvents(this,this._BTNS[i],this.btnEvents,true,'msgbox');this._MB.hide();this.ModalWnd.hide();this.el.hide();this._HF.value="0";}, 
			updatePosition: function(){var lPS=page$$.getPageSize(),lVR=page$$.getViewRect(),l__=this._MB.getDimensions();this.ModalWnd.setHeight(lPS.h-10);this.ModalWnd.setWidth(lPS.w-10);this._MB.setTop(parseInt(lVR.y+(lVR.h-l__.H)/ 2,10));this._MB.setLeft(parseInt(lVR.x+(lVR.w-l__.W)/ 2,10));}, 
			setFocus: function(idx){var l=this._BTNS.length;if(idx<0)this._BTNS[l-1].focus();else if(idx==l)this._BTNS[0].focus();else this._BTNS[idx].focus();}
		}, 
		_Menu: 
		{
			_ctor: function(aData, aParent){if(!aData||!aParent)return;copy$(this,aData);if(this.ItemStyle==null)this.ItemStyle={font:'10px verdana',textAlign:'left',padding:'4px 12px 4px 4px'};this.Parent=$El(aParent);this.ItemData=aData.Items;this.Items=[];Event.observe(this.Parent,'mouseover',this.Show.bindAsObserver(this),'Menu');Event.observe(this.Parent,'keydown',this.OnRootKeyDown.bindAsObserver(this),'Menu');}, 
			_Static: 
			{
				Ver$Menu: 3
			}, 
			Initialize: function(){if(this.Control!=null)return;this.Control=$$el('table');this.Control.cellPadding='0';var lCS=this.Control.style;lCS.backgroundColor=this.TextColumnBackColor;lCS.border='outset #969696 1px';lCS.borderCollapse='collapse';lCS.zIndex=998;lCS.position='absolute';lCS.display='none';if(this.Width)lCS.width=this.Width;this.Items=this.CreateItems(this.ItemData);$$add(this.Control);if(this.SelectedImageUrl!=null && this.SelectedImageUrl!=''){var lImg=this.$$el('img');lImg.src=this.SelectedImageUrl;lImg.src=this.NotSelectedImageUrl}}, 
			Dispose: function(){Event.stopObserving(this.Parent,'mouseover',this.Show.bindAsObserver(this),'Menu');Event.stopObserving(this.Parent,'keydown',this.OnRootKeyDown.bindAsObserver(this),'Menu');this.DisposeItems();$$sub(this.Control);this.ItemData=null;this.Parent=null;this.Control=null;this._clearTimer()}, 
			CreateItems: function(aItems){var lItems=[];var lL=aItems.length;for(var i=0; i<lL; i++){var lMI=new Soprex.UI.MenuItem(aItems[i],this);lMI.idx=i; lMI.idxl=lL;lItems.push(lMI)};return lItems}, 
			DisposeItems: function(){for(var i=0; i<this.Items.length; i++)this.Items[i].Dispose();this.Items=null}, 
			HideItem: function(aValue){for(var i=0; i<this.Items.length; i++)if(this.Items[i].Value==aValue)this.Items[i].Control.hide()}, 
			ShowItem: function(aValue){for(var i=0; i<this.Items.length; i++)if(this.Items[i].Value==aValue)this.Items[i].Control.show()}, 
			SelectItem: function(aValue){for(var i=0; i<this.Items.length; i++){this.Items[i].Selected=(this.Items[i].Value==aValue);if(this.Items[i].Value!='-' && this.SelectedImageUrl!=null && this.SelectedImageUrl!='')this.Items[i].SelectImage.src=(this.Items[i].Value==aValue?this.SelectedImageUrl:this.NotSelectedImageUrl)};this.OnItemSelect(aValue)}, 
			OnItemSelect: function(aValue){}, 
			OnRootKeyDown: function(e){e=$ev(e);var el=e.src();switch(e.getKeyCode()){case 27:case 37:case 39:this.Hide();break;case 13:case 32:case 40:this.Show();this.FocusItem();break;default:return e;};e.stop();}, 
			FocusItem: function(aI){if(aI==null)aI=0;else if(aI==-1)aI=this.Items.length-1;this.Items[aI].setFocus();}, 
			AddItemOnClick: function(aValue, aFN){for(var i=0; i<this.Items.length; i++)if(this.Items[i].Value==aValue)this.Items[i].OnClick=aFN()}, 
			Show: function(options, e){$doo(this.OnShowing);this.Initialize();var lLoc=$el(this.Parent.parentNode).getLocation();this.Control.show();this.Control.setTop(lLoc.y+this.TopOffset);this.Control.setLeft(lLoc.x+this.LeftOffset);this._OnShow();$doo(this.OnShow);this.AttachHideEvents()}, 
			_OnShow: function(){if(this.Control!=null){this.Control.observe('mouseout',this.OnMouseOut.bindAsObserver(this),'Menu');this.Control.observe('mouseover',this.OnMouseOver.bindAsObserver(this),'Menu');}Event.observe(this.Parent,'mouseout',this.OnMouseOut.bindAsObserver(this),'Menu');}, 
			_OnHide: function(){this._clearTimer();if(this.Control!=null){this.Control.stopObserving('mouseout',this.OnMouseOut.bindAsObserver(this),'Menu');this.Control.stopObserving('mouseover',this.OnMouseOver.bindAsObserver(this),'Menu');}Event.stopObserving(this.Parent,'mouseout',this.OnMouseOut.bindAsObserver(this),'Menu');}, 
			OnMouseOut: function(e){this._clearTimer();var __=this;var lFN=function(){__.Hide();};var lTime=(this.DisappearAfter?this.DisappearAfter:1000);this._timerID=setTimeout(lFN,lTime)}, 
			OnMouseOver: function(e){this._clearTimer()}, 
			OnKeyPress: function(e){if(e.keyCode==27){this.DetachHideEvents();this.Hide()}}, 
			OnClick: function(e){this.DetachHideEvents();this.Hide()}, 
			AttachHideEvents: function(){Event.observe(document,'keypress',this.OnKeyPress.bindAsObserver(this),'Menu');Event.observe(document,'click',this.OnClick.bindAsObserver(this),'Menu')}, 
			DetachHideEvents: function(){Event.stopObserving(document,'keypress',this.OnKeyPress.bindAsObserver(this),'Menu');Event.stopObserving(document,'click',this.OnClick.bindAsObserver(this),'Menu')}, 
			Hide: function(){$doo(this.OnHiding);if(this.Control && this.Control.style.display=='')this.Control.style.display='none';this._OnHide();$doo(this.OnHide);}, 
			_timerID: 0, 
			_clearTimer: function(){if(this._timerID>0)clearTimeout(this._timerID);this._timerID=0}
		}, 
		_MenuItem: 
		{
			_ctor: function(aData, aParent){if(!aData||!aParent)return;copy$(this,aData);this.Parent=aParent;this.Control=$el(this.Parent.Control.insertRow(-1));this.Control.insertCell(-1);if(this.Value=='-'){this.Control.style.height='1px';this.Control.style.backgroundColor=this.Parent.SelectColumnBackColor;return};var lT=$$el('table');lT.style.width='100%';lT.cellPadding='0';lT.cellSpacing='0';lT.tabIndex=0;lT.insertRow(-1);var td1=lT.rows[0].insertCell(-1);var td2=lT.rows[0].insertCell(-1);td1.style.width='3px';if(this.Parent.SelectedImageUrl!=null && this.Parent.SelectedImageUrl!=''){var lImg=$$el('img');lImg.src=this.Parent.NotSelectedImageUrl;if(this.Parent.NotSelectedImageUrl==''){lImg.width=0;lImg.height=0;lImg.border=0};td1.appendChild(lImg);this.SelectImage=td1.childNodes[0];}td2.style.color=this.Parent.ForeColor;td2.style.font=this.Parent.ItemStyle.font;td2.style.textAlign=this.Parent.ItemStyle.textAlign;td2.style.padding=this.Parent.ItemStyle.padding;td2.style.backgroundColor=this.Parent.TextColumnBackColor;td2.style.cursor=getHandCursor$();td2.innerHTML=this.Text.split('|')[0];td2.title=this.Text.split('|')[1];this.Control.cells[0].appendChild(lT);this.Control.Tbl=lT;var __=this;this.Control.onclick=function(e){if(__.OnClick!=null)__.OnClick(e);else __.Parent.SelectItem(__.Value);};this.Control.onmouseover=function(e){with(this.cells[0].childNodes[0].rows[0]){cells[0].style.backgroundColor=__.Parent.HoverColor;cells[1].style.backgroundColor=__.Parent.HoverColor;cells[1].style.color=__.Parent.TextColumnBackColor}};this.Control.onmouseout=function(e){with(this.cells[0].childNodes[0].rows[0]){cells[0].style.backgroundColor=__.Parent.TextColumnBackColor;cells[1].style.backgroundColor=__.Parent.TextColumnBackColor;cells[1].style.color=__.Parent.ForeColor}};lT.onfocus=function(e){__.Control.onmouseover(e)};lT.onblur=function(e){__.Control.onmouseout(e)};lT.onkeydown=function(e){e=$ev(e);switch(e.getKeyCode()){case 9:if(__.idx==0 && e.shiftKey){$el(__.Parent.Parent).TryFocus();__.Parent.Hide();e.stop()};if(__.idx==__.idxl-1 &&!e.shiftKey){$el(__.Parent.Parent).TryFocus();__.Parent.Hide()};return e;break;case 27:case 37:case 39:$el(__.Parent.Parent).TryFocus();__.Parent.Hide();break;case 13:case 32:if(__.OnClick!=null)__.OnClick(e);else __.Parent.SelectItem(__.Value);break;case 38:if(__.idx>0 && __.idx<__.idxl){if(__.Parent.Items[__.idx-1].Text=='-')__.Parent.FocusItem(__.idx-2);else __.Parent.FocusItem(__.idx-1);}break;case 40:if(__.idx>=0 && __.idx+1<__.idxl){if(__.Parent.Items[__.idx+1].Text=='-')__.Parent.FocusItem(__.idx+2);else __.Parent.FocusItem(__.idx+1);}break;default:return e};e.stop()};if(!this.Visible)this.Control.hide();else this.Control.show()}, 
			Dispose: function(){this.Control.onclick=null;this.Control.onmouseover=null;this.Control.onmouseout=null;var lTables=this.Control.getElementsByTagName('table');while(lTables.length>0){var lTable=$el(lTables[0]);if(lTable.parentNode!=null)lTable.remove();};this.Control=null;this.Parent=null}, 
			setFocus: function(){this.Control.Tbl.focus()}, 
			Toggle: function(){this.Selected=!this.Selected;if(this.Selected)this.Parent.SelectItem(this.Value);else this.Parent.SelectItem('')}
		}, 
		_StaticMenu: 
		{
			_ctor: function(aData){if(!aData||aData.Items.length==0)return;copy$(this,aData);this.Parent=$el(this.UID);this._clickOccure=false;this.Init()}, 
			_Static: 
			{
				Ver$MsgBox: 2
			}, 
			Init: function(){if(this._M!=null)return;var lMnu=['table',{'cellpadding':'0'},{'cellspacing':'0'},{'style':'border-collapse:collapse'},['tbody',['tr']]];this._M=$el($build(this.Parent,lMnu));copy$(this._M.style,this.MStyle);this._MI=this.CreateItems();if(this.Visible)this.Parent.show();this.checkWidth();this.AddEvents(false)}, 
			Dispose: function(){}, 
			CreateItems: function(){var _mis=[],_ms,_mi,_mtd,_it=0,_tc=0,f=true;for(var i in this.Items){if(!f){_ms=this._M.rows[0].insertCell(-1);_ms.style.width=this.MISpacing+'px';var lSp=['div',{'style':'width:'+this.MISpacing+'px;height:1px'}];$build(_ms,lSp);_ms.style.padding=0;f=false;};_mtd=$El(this._M.rows[0].insertCell(-1));_mtd._$=this;var tmpMi=new Soprex.UI.StaticMenuItem(this.Items[i],_mtd);_mi=tmpMi.Control;_mi.Obj=this.Items[i];_mtd.style.padding=0;_mtd.vAlign='middle';copy$(_mtd.style,this.MIStyle);if((this.Items[i].Selected||this.Items[i].AUX==this.SValue)&& this.MSelected){copy$(_mtd.style,this.MIHover);_mi.selected=true;if(this.MIHover.font.indexOf('bold')>-1){for(var _i=0; _i<_mi.rows[0].cells.length; _i++)_mi.rows[0].cells[_i].style.fontWeight='bold'}}_mtd.oColor=_mtd.style.color;_mtd.obgColor=_mtd.style.backgroundColor;_mtd.oBorder=_mtd.style.border;if(this.Items[i].Label!=null && this.Items[i].Label!='-'){_mi.tabIndex=0;if(!this.Hover)_mi.hideFocus=false;Element.setHand(_mi);_mi._no=_it++;_mis.push(_mi)}_tc++}this._M.rows[0].insertCell(-1);return _mis}, 
			createSubMenu: function(aMI){var _smObj={};copy$(_smObj,aMI.Obj.AUX);_smObj.MStyle=this.MDStyle;_smObj.MSStyle=this.MStyle;_smObj.MIHover=this.MIHover;_smObj.MIStyle=this.MIStyle;_smObj.MSelected=this.MSelected;_smObj.UID=this.UID;_smObj.$ID=this.$ID;_smObj._$=this;_smObj._P=aMI;_smObj._PN=aMI._no;_smObj.minW=aMI.parentNode.clientWidth;_smObj.DisappearAfter=this.DisappearAfter;_smObj.FadeAfter=this.FadeAfter;aMI.smenu=new Soprex.UI.DynamicMenu(_smObj);}, 
			checkWidth: function(){var lLImg=this.Imgs.left,lRImg=this.Imgs.right,lH=this._M.getHeight();var lCLimg=$$Img(lLImg),lRLimg=$$Img(lRImg),lE=this.Parent.removeChild(this._M);this.scrollable=false;this.MaxWwImgs=this.MaxWidth+(lLImg[1]+3)+(lRImg[1]+3);var lScr="['table',{'cellpadding':'0'},{'cellspacing':'0'},{'style':'border-collapse:collapse;height:"+lH+"px'},['tbody',['tr',['td',{'style':'padding:0'},"+"['div',{'style':'position:relative;overflow:hidden;text-align:left;width:"+(lLImg[1]+3)+"px;height:"+lLImg[2]+"px'},['img',"+"{'src':'"+lLImg[0]+"'},{'id':'LImg"+this.UID+"'},{'tabIndex':'0'},{'width':'"+lLImg[1]+"px'},{'height':'"+lLImg[2]+"px'}]]],['td',{'style':'padding:0'},['div',"+"{'style':'position:relative;overflow:hidden;top:0px;width:"+this.MaxWidth+"px;height:"+lH+"px'},['div',"+"{'id':'"+this.UID+"_SC'},{'style':'position:absolute;left:0;top:0'}]]],['td',{'style':'padding:0'},"+"['div',{'style':'position:relative;overflow:hidden;text-align:right;width:"+(lRImg[1]+3)+"px;height:"+lRImg[2]+"px'},['img',"+"{'src':'"+lRImg[0]+"'},{'id':'RImg"+this.UID+"'},{'tabIndex':'0'},{'width':'"+lRImg[1]+"px'},{'height':'"+lRImg[2]+"px'}]]]]]]";this._ScrTbl=$build(this.Parent,eval(lScr));this._newP=$el(this.UID+'_SC');this._PP=$el(this._newP.parentNode);this._newP.appendChild(this._M);var __=this; this.ScrollTimer=new Timer(__,10000,20);this.scrdir=0;this.ScrollTimer.OnTick=function(_){_.scrollMenu(_.scrdir);};this.LScr=$el('LImg'+this.UID);this.LScr.P=this.LScr.parentByTag('td');this.LScr.Pw=this.LScr.P.getWidth();this.onoff(this.LScr,false);this.RScr=$el('RImg'+this.UID);this.RScr.P=this.RScr.parentByTag('td');this.RScr.Pw=this.RScr.P.getWidth();if(this._M.getWidth()<this.MaxWwImgs)this.onoff(this.RScr,false);else {this.scrollable=true;this.AddScrollEvents(false);for(var i=0,l=this._MI.length; i<l; i++){if(this._MI[i].selected){var lMIL=parseInt($el(this._MI[i]).getLeft(),10),lMIW=parseInt($el(this._MI[i]).getWidth(),10),lMI=parseInt($el(this._newP).getLeft(),10);var lP=(lMIW+lMIL)-lMI;if(lP>this.MaxWidth){lL=parseInt(this._newP.style.left,10);this._newP.setLeft(lL+(this.MaxWidth-(lP+20)));this._newP.parentNode.style.top='0px';this.onoff(this.LScr,true);}}}}(function(){__._newP.parentNode.style.top='0px'}).delay(10);}, 
			onoff: function(aImg, aVisible){var lPPw=this._PP.getWidth();if(aVisible &&!aImg.visible()){aImg.P.show();aImg.show();this._PP.setWidth(lPPw-aImg.Pw);}if(!aVisible && aImg.visible()){aImg.P.hide();aImg.hide();this._PP.setWidth(lPPw+aImg.Pw);}}, 
			scrollActive: false, 
			scrollMenu: function(aDir){if(!this.scroolActive){this.scrollActive=true;var lL=parseInt(this._newP.style.left,10),lW=this._newP.getWidth();if(aDir>0){if(lL<0){this.onoff(this.RScr,true);this.onoff(this.LScr,true);lL=parseInt(this._newP.style.left,10)||0;this._newP.style.left=lL+aDir+'px';}else {this._newP.style.left='0px';this.onoff(this.LScr,false);this.onoff(this.RScr,true);}}else if(aDir<0){if(Math.abs(lL)<Math.abs(this.MaxWidth-lW)){this.onoff(this.LScr,true);this.onoff(this.RScr,true);var lL=parseInt(this._newP.style.left,10)||0;this._newP.style.left=lL+aDir+'px';}else {this._newP.style.left=(this.MaxWidth-lW)+'px';this.onoff(this.RScr,false);this.onoff(this.LScr,true);}}this.scrollActive=false;}}, 
			AddScrollEvents: function(aDetach){var _LScrEventList=[['click','_OnLIClick'],['mouseout','_OnMIScrollStop'],['mouseover','_OnLIMouseOver'],['keydown','_OnLIKeyDown'],['keyup','_OnMIScrollStop']],_RScrEventList=[['click','_OnRIClick'],['mouseout','_OnMIScrollStop'],['mouseover','_OnRIMouseOver'],['keydown','_OnRIKeyDown'],['keyup','_OnMIScrollStop']],__=this._ScrTbl.rows[0].cells;Event.SetEvents(this,__[0],_LScrEventList,aDetach);Event.SetEvents(this,__[2],_RScrEventList,aDetach);}, 
			_mouseIn: false, 
			_OnMIScrollStop: function(e){if(this._mouseIn){this.ScrollTimer.Stop(); this._mouseIn=false;}}, 
			_OnLIMouseOver: function(e){if(!this._mouseIn){this._mouseIn=true; this.scrdir=1; this.ScrollTimer.Start()}}, 
			_OnLIClick: function(e){this.scrdir+=2; if(this.scrdir==9)this.scrdir=1;}, 
			_OnLIKeyDown: function(e){if(e.keyCode==32||e.keyCode==13)this._OnLIMouseOver()}, 
			_OnRIMouseOver: function(e){if(!this._mouseIn){this._mouseIn=true; this.scrdir=-1; this.ScrollTimer.Start()}}, 
			_OnRIClick: function(e){this.scrdir-=2; if(this.scrdir==-9)this.scrdir=-1;}, 
			_OnRIKeyDown: function(e){if(e.keyCode==32||e.keyCode==13)this._OnRIMouseOver()}, 
			AddEvents: function(aDetach){var _MIEventList=[['click','_OnMIClick'],['mouseout','_OnMIMouseOut'],['mousewheel','_OnMIMouseWheel'],['mouseover','_OnMIMouseOver'],['keydown','_OnMIKeyDown'],['focus','_OnMIFocus'],['blur','_OnMIBlur']];for(var i=0; i<this._MI.length; i++)Event.SetEvents(this,this._MI[i],_MIEventList,aDetach);}, 
			getMITD: function(el){el=this.getMI(el);return el.parentNode}, 
			getMI: function(el){while(el.tagName!='TABLE')el=el.parentNode;return el}, 
			_setHover: function(el){var _=el.style,$=this.MIHover;_.color=$.color;_.backgroundColor=$.backgroundColor;if($.border!=null)_.border=$.border}, 
			_setNormal: function(el){var _=el.style;_.color=el.oColor;_.backgroundColor=el.obgColor;_.border=el.oBorder}, 
			_OnMIMouseOut: function(e){if(this._MIO &&(!this._clickOccure)){this._MIO=false;e=$ev(e);var _mi=this.getMI(e.src());this._setNormal(_mi.parentNode);if(typeof(_mi.Obj.AUX)=='object'){if(_mi.smenu!=null && _mi.smenu.Visible)_mi.smenu.HideTimer.Start()}}}, 
			_OnMIMouseOver: function(e){if(!this._MIO &&(!this._clickOccure)){this._MIO=true;e=$ev(e);for(var i=0; i<this._MI.length; i++){if(!this._MI[i].selected)this._setNormal(this._MI[i].parentNode);}var _mi=this.getMI(e.src());if(this.Hover)this._setHover(_mi.parentNode);var _status='';if(typeof(_mi.Obj.AUX)=='object'){if(_mi.smenu==null)this.createSubMenu(_mi);_mi.smenu.show();_status=_mi.Obj.AUX.Action;}else if(typeof(_mi.Obj.AUX)=='string'){_status=_mi.Obj.AUX;}if(_status.indexOf('href')==-1)window.status='Operation ID:'+_status;else window.status='URL:'+_status.split('|')[1];}}, 
			_OnMIClick: function(e){if(!this._clickOccure){this._clickOccure=true;e=$ev(e);var _mi=this.getMI(e.src());var _mtd=_mi.parentNode;for(var i=0; i<this._MI.length; i++){var item=this._MI[i];if(item.selected){var _=item.parentNode.style;_.color=_mtd.oColor;_.backgroundColor=_mtd.obgColor;_.border=_mtd.oBorder;for(var _i=0; _i<item.rows[0].cells.length; _i++)item.rows[0].cells[_i].style.fontWeight='normal';_.oColor=_mtd.oColor;_.obgColor=_mtd.obgColor;_.oBorder=_mtd.oBorder}else this._setNormal(item.parentNode);}_mi.selected=true;this._setHover(_mtd);for(var _i=0; _i<_mi.rows[0].cells.length; _i++)_mi.rows[0].cells[_i].style.fontWeight='bold';_mtd.oColor=_mtd.style.color;_mtd.obgColor=_mtd.style.backgroundColor;_mtd.oBorder=_mtd.style.border;this._doMenuItem(_mi);}}, 
			_doMenuItem: function(aMI){var _action='';if(typeof(aMI.Obj.AUX)=='object')_action=aMI.Obj.AUX.Action;else _action=aMI.Obj.AUX;if(_action!=''){var _hf=$el('__SPXMNU'+this.UID);if(_hf!=null)_hf.value=_action;if(_action.indexOf('href')==-1)__doPostBack(this.$ID,_action);else window.location.href=_action.split('|')[1];}}, 
			_OnMIMouseWheel: function(e){if(!this.scrollable)return e;var _=this;if(e.wheelDelta>=120){for(var i=0; i<20; i++){(function(){_.scrollMenu(3)}).delay(10);}}else if(e.wheelDelta<=-120){for(var i=0; i<20; i++){(function(){_.scrollMenu(-3)}).delay(10);}}}, 
			_OnMIKeyDown: function(e){e=$ev(e);var el=this.getMI(e.src());switch(e.getKeyCode()){case 9:if(typeof(el.Obj.AUX)=='object' && el.smenu!=null && el.smenu.Visible &&!e.shiftKey)el.smenu._MI[0].focus();else return e;break;case 27:el.blur();break;case 32:case 13:this._doMenuItem(el);break;case 37:if(el._no>0)this._MI[el._no-1].focus();break;case 39:if(el._no+1<this._MI.length)this._MI[el._no+1].focus();break;case 40:if(typeof(el.Obj.AUX)=='object'){if(el.smenu==null)this.createSubMenu(el);if(!el.smenu.Visible)el.smenu.show();el.smenu._MI[0].focus();el.smenu.HideTimer.Clear()}else return e;break;default:return e}e.stop()}, 
			_OnMIFocus: function(e){e=$ev(e);var _mi=this.getMI(e.src());this._setHover(_mi.parentNode);}, 
			_OnMIBlur: function(e){e=$ev(e);var _mi=this.getMI(e.src());this._setNormal(_mi.parentNode);if(typeof(_mi.Obj.AUX)=='object'){if(_mi.smenu!=null && _mi.smenu.Visible)_mi.smenu.HideTimer.Start()}}
		}, 
		_StaticMenuItem: 
		{
			_ctor: function(aItemObj, aParent){if(!aItemObj||!aParent)return;this.Parent=aParent;this.ItemObj=aItemObj;var lLabel='',lTooltip,lTAlign,lAcc,lL,lI,lImg,lIS,lAUX=this.ItemObj.AUX;if(this.ItemObj.Label!=null){lL=this.ItemObj.Label.split('|');if(lL.length==1)lL.push(lL[0]);if(lL.length==2)lL.push('center');lLabel=this.setLabel(lL[0]);lLabel=lLabel.replace(/#amp#/g,'&#39;');lTooltip=lL[1].replace(/#amp#/g,'&#39;');lTAlign=lL[2];}lIS="['table',{'width':'100%'},{'hideFocus':'"+aParent.Hover+"'},{'cellspacing':'0'},{'cellpadding':'0'},{'style':'border-collapse:collapse'},{'title':'"+lTooltip+"'}";if(this.ItemObj.width!=null)lIS+=",{'width':'"+this.ItemObj.width+"px'}";lIS+=",['tbody',['tr'";if(this.ItemObj.Label=='-'){lImg=aParent._$.Imgs.separator;lIS+=",['td',{'align':'center'},{'style':'padding:0; width:"+lImg[1]+"px'}";lIS+=",['img',{'src':'"+lImg[0]+"'},{'width':'"+lImg[1]+"px'},{'height':'"+lImg[2]+"px'}]";lIS+="]";}else {lI=this.ItemObj.Image;if(lI!=null){if(!lI.Align)lI.Align='center';lIS+=",['td',{'align':'"+lI.Align+"'},{'style':'padding:0'}";lIS+=",['img',{'src':'"+lI.Url+"'},{'width':'"+lI.W+"px'},{'height':'"+lI.H+"px'}]";lIS+="]";}if(lLabel!=''){var lFont=aParent._$.MStyle.font,lStyle='padding:0 4px 0 4px;';lStyle+=((lFont.indexOf('bold')>-1)?'font-weight:bold;font:':'font:');lStyle+=lFont;lIS+=",['td',{'align':'"+lTAlign+"'},{'noWrap':'-1'},{'style':'"+lStyle+"'}";lIS+=","+lLabel;lIS+="]";}if(lAUX!=null &&(typeof(lAUX)=='object')){lImg=aParent._$.Imgs.down;lIS+=",['td',{'align':'left'},{'style':'padding:0'}";lIS+=",['img',{'src':'"+lImg[0]+"'},{'width':'"+lImg[1]+"px'},{'height':'"+lImg[2]+"px'}]";lIS+="]";}};lIS+="]]]";this.Control=$build(this.Parent,eval(lIS));this.Control.accessKey=this.AccKey;return this;}, 
			setLabel: function(aLbl){var a=aLbl.indexOf('&'),l="'"+aLbl.replace(/ /g,'&nbsp;')+"'";if(a!=-1){l='';this.AccKey=aLbl.substring(a+1,a+2);if(aLbl.substring(0,a).replace(/ /g,'&nbsp;')!='')l+="'"+aLbl.substring(0,a).replace(/ /g,'&nbsp;')+"',";l+="['u',"+"'"+this.AccKey+"'],"+"'"+aLbl.substring(a+2,aLbl.length).replace(/ /g,'&nbsp;')+"'";}return l}, 
			Dispose: function(){}
		}, 
		_DynamicMenu: 
		{
			_ctor: function(aData){if(!aData||aData.Items.length==0)return;copy$(this,aData);this.Parent=$el(this.UID);this._MO=false;this._MIO=false;this.Init()}, 
			_Static: 
			{
				Ver$DynamicMenu: 2
			}, 
			Visible: false, 
			Init: function(){if(this._M!=null)return;this.ddlFix={};var lMnu=['div',{'style':'position:absolute; z-index:998'},['table',{'cellpadding':'2'},{'cellspacing':'0'},{'style':'border-collapse:collapse'},['tbody']]];this._MD=$el($build(this.Parent,lMnu));copy$(this._MD.style,this.MStyle);this._M=this._MD.firstChild;this._MI=this.CreateItems();var __=this;this.AddEvents(false);this.HideTimer=new Timer(__,this.DisappearAfter?this.DisappearAfter:500,null,(function(_){_.FadeTimer.Start()}));this.FadeTimer=new Timer(__,500,this.FadeAfter?this.FadeAfter / 10:50,(function(_){if(_._getOpacity()<15){_.FadeTimer.Clear(); _.hide();}else _._setOpacity(_._getOpacity()-10)}),(function(_){_._setOpacity(100)}));}, 
			Dispose: function(){}, 
			CreateItems: function(){var _mis=[],_mr,_mtd,_mi,_it=0,_hasImg=false,_imgW=0;for(var it in this.Items){_imgW=(this.Items[it].Image!=null?(this.Items[it].Image.W>_imgW?this.Items[it].Image.W:_imgW):0);}for(var ii in this.Items)this.Items[ii]._imgW=_imgW;for(var i in this.Items){_mr=this._M.insertRow(-1);_mtd=_mr.insertCell(-1);_mtd._$=this;copy$(_mtd.style,this.MIStyle);_mtd.oColor=_mtd.style.color;_mtd.obgColor=_mtd.style.backgroundColor;_mtd.oBorder=_mtd.style.border;_mtd.style.padding=0;var tmpMi=new Soprex.UI.DynamicMenuItem(this.Items[i],_mtd);_mi=tmpMi.Control;_mi.Obj=this.Items[i];if((this.Items[i].Selected||this.Items[i].AUX==this.SValue)&& this.MSelected){copy$(_mtd.style,this.MIHover);_mi.selected=true;if(this.MIHover.font.indexOf('bold')>-1){for(var _i=0; _i<_mi.rows[0].cells.length; _i++)_mi.rows[0].cells[_i].style.fontWeight='bold'}}if(this.Items[i].Label!=null){if(this.Items[i].Label!='-'){_mi.tabIndex=0;_mi._no=_it++;Element.setHand(_mi);_mis.push(_mi)}else _mi.width='100%';}}return _mis}, 
			AddEvents: function(aDetach){var _MIEventList=[['click','_OnMIClick'],['mouseout','_OnMIMouseOut'],['mouseover','_OnMIMouseOver'],['keydown','_OnMIKeyDown'],['focus','_OnMIFocus'],['blur','_OnMIBlur']],_MEventList=[['mouseout','_OnMMouseOut'],['mouseover','_OnMMouseOver']];for(var i=0; i<this._MI.length; i++)Event.SetEvents(this,this._MI[i],_MIEventList,aDetach,this.UID);Event.SetEvents(this,this._MD,_MEventList,aDetach,this.UID);}, 
			show: function(){if(this.Visible)return;var __=this;if(typeof(window._ActivePopupMenu)!='undefined'){try{if(window._ActivePopupMenu!=__){window._ActivePopupMenu.FadeTimer.Stop();window._ActivePopupMenu.HideTimer.Stop();window._ActivePopupMenu.hide()}}catch(e){};};(function(){__.Visible=true;__._MD.show();__.update();window._ActivePopupMenu=__;}).delay(10);}, 
			hide: function(){this._MD.hide();this.Visible=false;this._setOpacity(100);}, 
			update: function(){this.setPosition();var tW=0,_i;for(_i=0; _i<this._MI.length; _i++){if(Element.getWidth(this._MI[_i])>tW)tW=Element.getWidth(this._MI[_i]);}if(tW<this.minW)tW=this.minW;for(_i=0; _i<this._MI.length; _i++)Element.setWidth(this._MI[_i],tW)}, 
			setPosition: function(){var el=$el(this._P.parentNode);this.POS=el.getLocation();this.POS.y+=el.getHeight();if(this._MD.getWidth()<el.getWidth())this._MD.setWidth(el.getWidth());this._MD.setTop(this.POS.y);this._MD.setLeft(this.POS.x)}, 
			getMITD: function(el){el=this.getMI(el);return el.parentNode}, 
			getMI: function(el){while(el.tagName!='TABLE')el=el.parentNode;return el}, 
			_setHover: function(el){var _=el.style,$=this.MIHover;_.color=$.color;_.backgroundColor=$.backgroundColor;if($.border!=null)_.border=$.border}, 
			_setNormal: function(el){var _=el.style;_.color=el.oColor;_.backgroundColor=el.obgColor;_.border=el.oBorder}, 
			_OnMMouseOut: function(e){if(this._MO){this._MO=false;this.HideTimer.Start()}}, 
			_OnMMouseOver: function(e){if(!this._MO){this._MO=true;this._setOpacity(100);this.HideTimer.Clear();this.FadeTimer.Clear()}}, 
			_OnMIMouseOut: function(e){if(this._MIO){this._MIO=false;e=$ev(e);var _mitd=this.getMITD(e.src());this._setNormal(_mitd)}}, 
			_OnMIMouseOver: function(e){if(!this._MIO){this._MIO=true;e=$ev(e);for(var i=0; i<this._MI.length; i++)this._setNormal(this._MI[i].parentNode);var _mi=this.getMI(e.src());this._setHover(_mi.parentNode);if(typeof(_mi.Obj.AUX)=='string'){if(_mi.Obj.AUX.indexOf('href')==-1)window.status='Operation ID:'+_mi.Obj.AUX;else window.status='URL:'+_mi.Obj.AUX.split('|')[1];}}}, 
			_OnMIClick: function(e){e=$ev(e);if(this.Visible)this.HideTimer.Start();else {this.HideTimer.Stop();this.FadeTimer.Stop()}var _mi=this.getMI(e.src());if(typeof(_mi.Obj.AUX)=='string'){if(_mi.Obj.AUX.indexOf('href')==-1)__doPostBack(this.$ID,_mi.Obj.AUX);else window.location.href=_mi.Obj.AUX.split('|')[1];}}, 
			_OnMIKeyDown: function(e){e=$ev(e);this.HideTimer.Stop();this.FadeTimer.Stop();var el=this.getMI(e.src());switch(e.getKeyCode()){case 9:if(el._no==this._MI.length-1 &&!e.shiftKey){var tt=el.parentNode._$;if(tt._PN+1<tt._$._MI.length){tt._$._MI[tt._PN+1].focus();this.hide()}}else if(el._no==0 && e.shiftKey){var tt=el.parentNode._$;tt._$._MI[tt._PN].focus();this.hide()}else return e;break;case 27:this._P.focus();this.hide();break;case 32:case 13:this._OnMIClick(e);break;case 38:if(el._no>0)this._MI[el._no-1].focus();break;case 37:var tt=el.parentNode._$;if(tt._PN>0){tt._$._MI[tt._PN-1].focus();this.hide()}break;case 40:if(el._no+1<this._MI.length)this._MI[el._no+1].focus();break;case 39:var tt=el.parentNode._$;if(tt._PN+1<tt._$._MI.length){tt._$._MI[tt._PN+1].focus();this.hide()}break;default:return e}e.stop()}, 
			_OnMIFocus: function(e){e=$ev(e);var _mitd=this.getMITD(e.src());this._setHover(_mitd)}, 
			_OnMIBlur: function(e){e=$ev(e);var _mitd=this.getMITD(e.src());this._setNormal(_mitd)}, 
			_setOpacity: function(aOpacity){this._MD.setOpacity(aOpacity);}, 
			_getOpacity: function(){return this._MD.getOpacity();}
		}, 
		_DynamicMenuItem: 
		{
			_ctor: function(aItemObj, aParent){if(!aItemObj||!aParent)return;this.Parent=aParent;this.ItemObj=aItemObj;var lLabel,lTooltip,lTAlign,lAcc,lL,lI,lImg;if(this.ItemObj.Label!=null){lL=this.ItemObj.Label.split('|');if(lL.length==1)lL.push(lL[0]);if(lL.length==2)lL.push('left');lLabel=this.setLabel(lL[0]);lLabel=lLabel.replace(/#amp#/g,'&#39;');lTooltip=lL[1].replace(/#amp#/g,'&#39;');lTAlign=lL[2]}var lIS="['table',{'hideFocus':'true'},{'cellspacing':'0'},{'cellpadding':'2'}";if(this.ItemObj.Label!=null && this.ItemObj.Label=='-')lIS+=",{'style':'height:3px'}";else lIS+=",{'title':'"+lTooltip+"'}";if(this.ItemObj.width!=null)lIS+=",{'width':'"+this.ItemObj.width+"px'}";lIS+=",['tbody',['tr'";if(this.ItemObj.Label!=null && this.ItemObj.Label=='-'){lIS+=",{'style':'height:3px'},['td',{'align':'center'}";if(this.ItemObj._imgW>0)lIS+=",{'colspan':'2'}";lIS+=",['hr',{'style':'height:1px;'},{'width':'70%'}]";lIS+="]";}else {if((this.ItemObj.Image!=null)||(this.ItemObj._imgW>0)){if(!this.ItemObj.Image){lIS+=",['td',{'width':'"+this.ItemObj._imgW+"'},' '";}else {lI=this.ItemObj.Image;if(!lI.Align)lI.Align='center';lIS+=",['td',{'align':'"+lI.Align+"'}";lIS+=",['img',{'src':'"+lI.Url+"'},{'width':'"+lI.W+"px'},{'height':'"+lI.H+"px'}]";}lIS+="]";}if(this.ItemObj.Label!=null){lIS+=",['td',{'align':'"+lTAlign+"'},{'style':'font:"+aParent._$.MSStyle.font;lIS+="; padding:2px'}";lIS+=","+lLabel;lIS+="]";}if(this.ItemObj.AUX!=null &&(typeof(this.ItemObj.AUX)=='object')){lImg=aParent._$.Imgs.down;lIS+=",['td',{'align':'left'}";lIS+=",['img',{'src':'"+lImg[0]+"'},{'width':'"+lImg[1]+"px'},{'height':'"+lImg[2]+"px'}]";lIS+="]";}}lIS+="]]]";this.Control=$build(this.Parent,eval(lIS));this.Control.accessKey=this.AccKey;return this}, 
			setLabel: function(aLbl){var a=aLbl.indexOf('&'),l="'"+aLbl.replace(/ /g,'&nbsp;')+"'";if(a!=-1){l='';this.AccKey=aLbl.substring(a+1,a+2);if(aLbl.substring(0,a).replace(/ /g,'&nbsp;')!='')l+="'"+aLbl.substring(0,a).replace(/ /g,'&nbsp;')+"',";l+="['u',"+"'"+this.AccKey+"'],"+"'"+aLbl.substring(a+2,aLbl.length).replace(/ /g,'&nbsp;')+"'";}return l}, 
			Dispose: function(){}
		}, 
		_Calendar: 
		{
			_ctor: function(aTarget, aData){if(!aTarget||!aData)return;this.Config(aData);this.name=aTarget;this.Initialize()}, 
			_Static: 
			{
				Ver$Calendar: 4
			}, 
			Initialize: function(){this.ImgButton=$el(this.name+'_imgbtn');this.TB=new Soprex.UI.TextBox($el(this.name+'_main'));if(!isDef$(this.TB.__))return false;if(Element.getStyle(this.TB.__,'Display')=='none')return false;this.TB.selected=$el(this.name+'_selecteddate');this.CurrentDate=SoprexDate(this.Culture);this.FirstValue=this.SelectedDate;this.BadDate=this.CreateMask();this.focus=true;this.calMouseIn=false;this.btnMouseIn=false;var __=this;this.HideTimer=new Timer(__,this.DisappearAfter?this.DisappearAfter:3000,null,(function(_){_.FadeTimer.Start()}));this.FadeTimer=new Timer(__,3000,this.FadeAfter?this.FadeAfter / 10:100,(function(_){if(_._getOpacity()<15){_.FadeTimer.Clear();_.hide();_.TB.__.focus()}else {_._setOpacity(_._getOpacity()-10)}}),(function(_){_._setOpacity(100)}));this.SetDate(this.SelectedDate,true);this.createCalendar();this.AttachEvents();this.AttachShowEvents();this.TB.__.Calendar=this;var lTbl=this.TB.__.parentByTag('table'),lItd=this.ImgButton.parentByTag('td'),lTtd=this.TB.__.parentByTag('td'),lIDim=this.ImgButton.getDimensions(false),lTDim=lTbl.getDimensions(false);lItd.setWidth(lIDim.W);lTbl.setWidth(lTDim.W+4);lTtd.setWidth(lTDim.W-lIDim.W+2);(function(){var lD=$el(__.TB.__.parentNode).getDimensions(false);__.TB.__.setWidth(lD.W-4)}).delay(100);this.IsVisible?this.show():this.hide();return true;}, 
			Dispose: function(){this.DetachShowEvents();this.DetachEvents();this.Calendar=this.Cells=null}, 
			Config: function(aData){copy$(this,aData);this._DayNames=(this.Culture.Days+","+this.Culture.Days).split(",");this._MonthNames=this.Culture.Months.split(",")}, 
			SetRes: function(){var lDate=SoprexDate(this.Culture),tbval=this.TB.get();if(lDate.Parse(tbval)){this._Date=lDate;this.SelectedDate=tbval;if(this.IsVisible){this.goToMonth(this._Date.getFullYear(),this._Date.getMonth());}if(tbval!=''){this.TB.selected.value=lDate.DatePS();}return true;}else {return false;}}, 
			SetDate: function(aDate, aF, aP){if(aDate!=this.SelectedDate||!isDef$(this._Date)||aP){var lDate=SoprexDate(this.Culture),lDV=lDate.Parse(aDate);if(lDV||aF){this._Date=(lDV?lDate:this.CurrentDate);this.SelectedDate=(lDV?aDate:'');this.displayMonth=this._Date.getMonth();this.displayYear=this._Date.getFullYear();};this.SetDateTB(aDate,true);}}, 
			SetDateTB: function(aDate, aClear){var lI=this.DateParts(aDate),lTmp=0,lDP=aDate.split(this.DateSeparator()),lClr=aClear,lC=lDP[lI.P],lCT=!(lC=='_'||lC=='__'||lC==undefined||lC=='NaN'||lC=='0_');if(lC=='__' && lI.FP[lI.P].length==1){lDP[lI.P]='_';}for(var ii=0; ii<3; ii++){if(lCT||lI.P!=ii){lC=lDP[ii];lClr=(aClear||lI.P!=ii);switch(lI.FP[ii]){case "M":switch(lI.V.M){case-1:break;case 0:lDP[ii]=(lClr?'1':'_');break;case 1:lDP[ii]=(lClr?'1':'1_');break;default:lDP[ii]=lI.V.M};break;case "MM":switch(lI.V.M){case-1:break;case 0:lDP[ii]=(lClr?'01':'__');break;case 1:lDP[ii]=(lClr?'01':'1_');break;default:if(lI.V.M<10)lDP[ii]='0'+lI.V.M;else lDP[ii]=lI.V.M};break;case "dd":switch(lI.V.D){case-1:break;case 0:lDP[ii]=(lClr?'1':'__');break;case 1:case 2:lDP[ii]=(lClr?('0'+lI.V.D):(lI.V.D+'_'));break;case 3:lDP[ii]=((lClr||lI.V.M==2)?'03':'3_');break;default:if(lI.V.D<10)lDP[ii]='0'+lI.V.D;else lDP[ii]=lI.V.D;};break;case "d":switch(lI.V.D){case-1:break;case 0:lDP[ii]=(lClr?'1':'_');break;case 1:case 2:lDP[ii]=(lClr?lI.V.D:(lI.V.D+'_'));break;case 3:lDP[ii]=((lClr||lI.V.M==2)?'3':'3_');break;default:lDP[ii]=lI.V.D};break;};lI=this.DateParts(lDP.join(this.DateSeparator()))}};if((lI.V.Y>this.MaxYear||lI.V.Y<this.MinYear)&& aClear && lI.V.Y!=-1){alert(this.MaxRangeText);this.SelectPart()}else {this.TB.set(lI.D);if(!this.SetRes()&& lI.P!=lI.DPA[this.TB.pos()]){this.TB.set(aDate);}}}, 
			_OnTBContextMenu: function(e){return false;}, 
			_setOpacity: function(aOpacity){this.Calendar.setOpacity(parseInt(aOpacity,10));}, 
			_getOpacity: function(){return parseInt(this.Calendar.getOpacity(),10);}, 
			EventLists: 
			{
				Calendar: [["mouseover","_OnCalendarMouseOver"],["mouseout","_OnCalendarMouseOut"],["selectstart","_OnCalendarSelect"],["drag","_OnCalendarDrag"]], 
				TextBox: [["mouseup","_OnTBMouseUp"],["mousedown","_OnTBClick"],["DOMMouseScroll","_OnTBWheel"],["focus","_OnTBFocus"],["blur","_OnTBBlurIn"],["contextmenu","_OnTBContextMenu"],["keydown","_OnTBKeyDown"]], 
				ImgButton: [["click","_OnButtonClick"],["mouseout","_OnButtonMouseOut"],["mouseover","_OnButtonMouseOver"],["keydown","_OnButtonKeyDown"],["focus","_OnButtonFocus"],["blur","_OnButtonBlur"]], 
				MonthUp: [["click","_OnMonthUp"],["keydown","_OnMonthUpKP"]], 
				MonthDown: [["click","_OnMonthDown"],["keydown","_OnMonthDownKP"]], 
				YearUp: [["click","_OnYearUp"],["keydown","_OnYearUpKP"]], 
				YearDown: [["click","_OnYearDown"],["keydown","_OnYearDownKP"]], 
				Doc: [["click","_OnClick"],["keypress","_OnKeyPress"]]
			}, 
			AttachEvents: function(){Event.SetEvents(this,this.TB.__,this.EventLists.TextBox,false,this.name);Event.SetEvents(this,this.ImgButton,this.EventLists.ImgButton,false,this.name);}, 
			DetachEvents: function(){Event.SetEvents(this,this.TB.__,this.EventLists.TextBox,true,this.name);Event.SetEvents(this,this.ImgButton,this.EventLists.ImgButton,true,this.name);}, 
			AttachShowEvents: function(){Event.SetEvents(this,this.Calendar,this.EventLists.Calendar,false,this.name);Event.SetEvents(this,this.MonthUp,this.EventLists.MonthUp,false,this.name);Event.SetEvents(this,this.MonthDown,this.EventLists.MonthDown,false,this.name);Event.SetEvents(this,this.YearUp,this.EventLists.YearUp,false,this.name);Event.SetEvents(this,this.YearDown,this.EventLists.YearDown,false,this.name);Event.SetEvents(this,document,this.EventLists.Doc,false,this.name);}, 
			DetachShowEvents: function(){Event.SetEvents(this,this.Calendar,this.EventLists.Calendar,true,this.name);Event.SetEvents(this,this.MonthUp,this.EventLists.MonthUp,true,this.name);Event.SetEvents(this,this.MonthDown,this.EventLists.MonthDown,true,this.name);Event.SetEvents(this,this.YearUp,this.EventLists.YearUp,true,this.name);Event.SetEvents(this,this.YearDown,this.EventLists.YearDown,true,this.name);Event.SetEvents(this,document,this.EventLists.Doc,true,this.name);}, 
			_OnKeyPress: function(e){if($ev(e).getKeyCode()==27)this.hide(); return false}, 
			_OnClick: function(e){if(!e.cancelBubble)this.hide(); return false}, 
			_OnCalendarMouseOver: function(e){if(!this.calMouseIn){this.calMouseIn=true; this.HideTimer.Clear(); this.FadeTimer.Clear();}; return false}, 
			_OnCalendarMouseOut: function(e){if(this.calMouseIn){this.calMouseIn=false; this.HideTimer.Start();}; return false}, 
			_OnCalendarSelect: function(e){return false}, 
			_OnCalendarDrag: function(e){return false}, 
			_OnMonthUp: function(e){$ev(e).stop(); this.nextMonth(); return false}, 
			_OnMonthUpKP: function(e){var no=0;e=$ev(e);if(e.keyCode==9 && e.shiftKey){for(i=0; i<this.cells.length; i++){if(this.cells[i]._Date.CompareDate(this._Date)){no=i;}}this.cells[no].tableCell.focus();e.stop()};return false}, 
			_OnMonthDown: function(e){$ev(e).stop(); this.prevMonth(); return false}, 
			_OnMonthDownKP: function(e){var no=0;e=$ev(e);if(e.keyCode==9 &&!e.shiftKey){for(i=0; i<this.cells.length; i++){if(this.cells[i]._Date.CompareDate(this._Date)){no=i;}}this.cells[no].tableCell.focus();e.stop()};return false}, 
			_OnYearUp: function(e){$ev(e).stop(); this.nextYear(); return false}, 
			_OnYearUpKP: function(e){e=$ev(e); if(e.keyCode==9 &&!e.shiftKey){e.stop(); this.hide(); this.ImgButton.focus()}; return false}, 
			_OnYearDown: function(e){$ev(e).stop(); this.prevYear(); return false}, 
			_OnYearDownKP: function(e){e=$ev(e); if(e.keyCode==9 && e.shiftKey){e.stop(); this.ImgButton.focus()}this.HideTimer.Stop(); this.FadeTimer.Stop(); return false}, 
			_OnButtonMouseOver: function(e){if(!this.btnMouseIn){this.btnMouseIn=true; this.ImgButton.src=(this.IsVisible?this.ButtonImageURL:this.ButtonImageOverURL);}; return false}, 
			_OnButtonMouseOut: function(e){if(this.btnMouseIn){this.btnMouseIn=false; this.ImgButton.src=(this.IsVisible?this.ButtonImageOverURL:this.ButtonImageURL);}; return false}, 
			_OnButtonClick: function(e){this.HideTimer.Stop(); this.FadeTimer.Stop(); this.toggle(); $ev(e).stop(); return false}, 
			_OnButtonKeyDown: function(e){e=$ev(e); if(e.keyCode==13||e.keyCode==40){this._OnButtonClick(); if(this.IsVisible){e.noRet(); this.YearDown.focus()}}; return false}, 
			_OnButtonFocus: function(e){this._OnButtonMouseOver(); return false}, 
			_OnButtonBlur: function(e){this._OnButtonMouseOut(); return false}, 
			_OnTBFocus: function(e){if(this.TB.get()=='')this.TB.set(this.BadDate);else this.TB.pos();if(this.TB.getSel()=='')this.TB.select(0,this.TB.len());$ev(e).stop();return false}, 
			_OnTBMouseUp: function(e){if(this.TB.get()=='')this.TB.set(this.BadDate);else this.TB.pos();var lLoc=this.TB.curPos();this.TB._CP.current=lLoc;this.SelectPart();return false}, 
			_OnTBClick: function(e){if((e.which && e.which>1)||(e.button && e.button>1)){e.stop();return false;}}, 
			_OnTBWheel: function(e){var lI=this.DateParts();if(e.detail==3)this._OnTBDateUpDown(lI,1);else if(e.detail==-3)this._OnTBDateUpDown(lI,-1);var lPos=0;switch(lI.P){case 1:lPos=lI.S1+1; break;case 2:lPos=lI.S2+1; break;};this.SelectPart(lPos);e.stop();return false;}, 
			_OnTBBlurIn: function(e){this.SetDate(this.TB.get(),false,true);if(this.TB.find('_')!=-1){this.BadDate=this.TB.get();this.TB.set('')};return false}, 
			_OnTBBlur: function(e){this.SetDateTB(this.TB.get(),true);this.TB.pos(this.TB.len());this.SelectPart();this.TB.pos(0);this.SetRes();return false}, 
			_OnTBKeyDown: function(e){e=$ev(e);var lKey=e.getKeyCode(),lI=this.DateParts(),lEvnB=true;switch(lKey){case 8:if(this.TB.pos()>0){this.TB.posD();if((this.TB.pos()==lI.S1)||(this.TB.pos()==lI.S2)){this.TB.posD();}this._RemoveAtPos(this.TB.pos());this.SelectPart()};break;case 9:this._OnTBBlur();return true;break;case 46:var lTRText=this.TB.getSel();lTRText=lTRText.replace(/[0-9]/g,'_');if(lTRText=="__" &&(lI.FP[lI.P]=='M'||lI.FP[lI.P]=='d')){lTRText="_"}if(lTRText.length>5){lTRText=this.CreateMask();this.TB._CP.current=0;this.TB._CP.old=1;}this.TB.setSel(lTRText);this.TB.selected.value=this.FirstValue;this.SelectPart();break;case 27:this.SetDate(this.FirstValue,false,true);lEvnB=false;break;case 37:if(this.TB.pos()>0){this.TB.posD();if((this.TB.pos()==lI.S1)||(this.TB.pos()==lI.S2))this.TB.posD();this.SelectPart()}else {this._OnTBBlur();lEvnB=false};break;case 39:if(this.TB.pos()<lI.D.length){this.TB.posI();if((this.TB.pos()==lI.S1)||(this.TB.pos()==lI.S2)){this.TB.posI();}this.SelectPart();}else {this._OnTBBlur();lEvnB=false};break;case 38:this._OnTBDateUpDown(lI,-1);switch(lI.P){case 0:this.SelectPart(0); break;case 1:this.SelectPart(lI.S1+1); break;case 2:this.SelectPart(lI.S2+1); break;};break;case 40:this._OnTBDateUpDown(lI,1);switch(lI.P){case 0:this.SelectPart(0); break;case 1:this.SelectPart(lI.S1+1); break;case 2:this.SelectPart(lI.S2+1); break;};break;};if((lKey>=48 && lKey<=57)||(lKey>=96 && lKey<=105)){if(lKey>58)lKey=(lKey-48);var lPos=this.TB.pos(),lNo=String.fromCharCode(lKey),lDate=lI.D.substring(0,lPos);if(lPos<lI.D.length){lDate+=lNo;}if(lPos+1<lI.D.length){lDate+=lI.D.substr(lPos+1,lI.D.length-1);}var lTmpDate=lDate.split(this.DateSeparator());if(lTmpDate[lI.P]=='0'){lTmpDate[lI.P]='0_';}var lTmpPart=1;if(!isNaN(parseInt(lTmpDate[lI.P],10))){lTmpPart=parseInt(lTmpDate[lI.P],10);}var lRes=this._TestPart(lI,lTmpPart);if(lRes==lTmpPart||lTmpDate[lI.P]=='0_'){if(this.TB.pos()<lDate.length){this.SetDateTB(lTmpDate.join(this.DateSeparator()),false);var lC=this.DateParts();if(((this.TB.pos()+1)==lC.S1)||((this.TB.pos()+1)==lC.S2)){this.TB.posI();}this.TB.posI();this.SelectPart()}else {var ___=this;(function(){___._OnTBBlur();}).delay(50);lEvnB=false}}};if(lEvnB)e.noBubble();e.noRet();return e}, 
			_OnTBDateUpDown: function(aObj, aV){var x=parseInt(aObj.DP[aObj.P],10);if(!isNaN(x)){var lTest=x+parseInt(aV,10);aObj.DP[aObj.P]=this._TestPart(aObj,lTest);this.SetDateTB(aObj.DP.join(this.DateSeparator()),false)}}, 
			_TestPart: function(aObj, aV){var lTmp=parseInt(aV,10),lOrg=aObj.DP[aObj.P],lProcessing=true,count=30;for(var i=0; i<3; i++){if(isNaN(parseInt(aObj.DP[i],10))){aObj.DP[i]=aObj.TDP[i];}}while(lProcessing){aObj.DP[aObj.P]=lTmp;var lDate=SoprexDate(this.Culture);if(!lDate.Parse((aObj.DP.join(this.DateSeparator())))){switch(aObj.FP[aObj.P]){case "M":if(lTmp>12 && count!=30)lTmp=12;else if(lTmp>11 && count!=30)lTmp--;else if(lTmp>12)lTmp=1;else if(lTmp<1)lTmp=12;else lTmp++;break;case "MM":if(lTmp>12 && count!=30)lTmp=12;else if(lTmp>11 && count!=30)lTmp--;else if(lTmp>12)lTmp='0'+1;else if(lTmp<1)lTmp=12;else if(lTmp<10 && aV.toString().length==1)lTmp='0'+lTmp;else lTmp++;break;case "dd":if(lTmp>31 && count!=30)lTmp='0'+1;else if(lTmp>30 && count!=30)lTmp--;else if(lTmp>31)lTmp='0'+1;else if(lTmp<1)lTmp=31;else if(lTmp<10 && aV.toString().length==1)lTmp='0'+lTmp;else lTmp++;break;case "d":if(lTmp>31 && count!=30)lTmp='0'+1;else if(lTmp>30 && count!=30)lTmp--;else if(lTmp>31)lTmp=1;else if(lTmp<1)lTmp=31;else lTmp++;break;case "yy":case "yyyy":var lPos=lOrg.indexOf('_');if(lPos==(lOrg.length-1)||lPos==-1){if(lTmp>this.MaxYear)lTmp=this.MaxYear;else if(lTmp<this.MinYear)lTmp=this.MinYear;else if(lTmp==this.MaxYear)lTmp--;else lTmp++;}else lProcessing=false;break;}}else lProcessing=false;if(count<10)lProcessing=false;count--};lTmp=lTmp.toString();return lTmp}, 
			_RemoveAtPos: function(aPos){var lI=this.DateParts(),lDate=lI.D.substring(0,aPos);if(aPos<lI.D.length)lDate+='_';if(aPos+1<lI.D.length)lDate+=lI.D.substr(aPos+1,lI.D.length-1);this.SetDateTB(lDate,false)}, 
			DateSeparator: function(){var lDF=this.Culture.Format,lS=['/','.','-','_'];for(var i=0; i<lS.length; i++){if(lDF.indexOf(lS[i])!=-1)return lS[i];}return ' '}, 
			SelectPart: function(aPos){var lOldPos=this.TB.posOld(),lPos=this.TB.pos(aPos),l0=this.TB.len(),lI=this.DateParts();this.TB.posOld(lOldPos);if(lI.DPA[lPos]==0)l0=lI.S1;if(lI.DPA[lPos]==1)l0=lI.S2;Element.TryFocus(this.TB.__);return this.TB.select(lPos,l0)}, 
			DateParts: function(aDate){var lD=(aDate!=null?aDate:this.TB.get()),lTDD=SoprexDate(this.Culture,'',2000,0,1),lTD=lTDD.Format(),lTDP=lTD.split(this.DateSeparator()),lFP=this.Culture.Format.split(this.DateSeparator()),lDP=lD.split(this.DateSeparator()),lS1=lD.indexOf(this.DateSeparator()),lS2=lD.indexOf(this.DateSeparator(),lS1+1),ldp=0,lDPA=[];for(var it=0; it<lD.length; it++){lDPA[it]=ldp;if(lD.charAt(it)==this.DateSeparator())ldp++};var lP=lDPA[this.TB.pos()],lV={D:-1,M:-1,Y:-1};for(var it=0; it<3; it++){if(lDP[it]!=undefined){var ll=lDP[it].replace(/_/g,'');if(ll.length>0)switch(lFP[it]){case "M":case "MM":lV.M=Number(ll);break;case "d":case "dd":lV.D=Number(ll);break;case "yy":case "yyyy":lV.Y=Number(ll);break;}}};return{P:lP,S1:lS1,S2:lS2,FP:lFP,D:lD,DP:lDP,TD:lTD,TDP:lTDP,DPA:lDPA,V:lV};}, 
			CreateMask: function(){return this.Culture.Format.replace(/(d|M|y)/g,'_')}, 
			show: function(){if(typeof(window._ActiveCalendar)!='undefined'){try{window._ActiveCalendar.hide()}catch(e){};};this.goToMonth(this._Date.getFullYear(),this._Date.getMonth());this.updatePos();this.Calendar.show();this.IsVisible=true;window._ActiveCalendar=this;}, 
			hide: function(){this.HideTimer.Stop();this.FadeTimer.Stop();this.Calendar.hide();this.IsVisible=false;this._OnButtonMouseOut();}, 
			toggle: function(){if(this.IsVisible)this.hide();else this.show()}, 
			setDays: function(){this.daynames=[];var j=0;for(var i=this.StartDay; i<this.StartDay+7; i++)this.daynames[j++]=this._DayNames[i].substring(0,2);this.monthDayCount=[31,((this._Date.getFullYear()-2000)% 4?28:29),31,30,31,30,31,31,30,31,30,31]}, 
			createCalendar: function(){var tbody,tr,td;this.setDays();this.Calendar=$$el('table',this.CSS.CalendarTable,this.name+'_Calendar');tbody=$$El('tbody');tr=$$El('tr');td=$$El('td',this.CSS.CalendarCell);td.appendChild(this.createMainHeading());tr.appendChild(td);tbody.appendChild(tr);tr=$$El('tr');td=$$El('td',this.CSS.CalendarCell);td.appendChild(this.createDayHeading());tr.appendChild(td);tbody.appendChild(tr);tr=$$El('tr');td=$$El('td',this.CSS.CalendarCell,this.name+'_cell_td');this.CalendarCells=td;td.appendChild(this.createCells());tr.appendChild(td);tbody.appendChild(tr);tr=$$El('tr');td=$$El('td',this.CSS.CalendarCell);td.appendChild(this.createFooter());tr.appendChild(td);tbody.appendChild(tr);this.Calendar.appendChild(tbody);this.Calendar.owner=this;$$add(this.Calendar)}, 
			createMainHeading: function(){var lDiv=$$El('div',this.CSS.Heading,this.name+'_mainheading');this.MonthCtrl=$$El('span',this.CSS.MonthLabel);this.MonthCtrl.appendChild($$txt(this._MonthNames[this.displayMonth].substring(0,3)));this.YearCtrl=$$El('span',this.CSS.YearLabel);this.YearCtrl.appendChild($$txt(this.displayYear));this.MonthDown=$$El('input',this.CSS.MonthButton,this.name+'_MD',['type','button'],['value','<'],['title',this.MonthDownButtonText]);this.MonthUp=$$El('input',this.CSS.MonthButton,this.name+'_MU',['type','button'],['value','>'],['title',this.MonthUpButtonText]);this.YearDown=$$El('input',this.CSS.YearButton,this.name+'_MU',['type','button'],['value','<<'],['title',this.YearDownButtonText]);this.YearUp=$$El('input',this.CSS.YearButton,this.name+'_MU',['type','button'],['value','>>'],['title',this.YearUpButtonText]);this.MonthDown.owner=this.MonthUp.owner=this.YearDown.owner=this.YearUp.owner=this;lDiv.appendChild(this.YearDown);lDiv.appendChild(this.MonthDown);lDiv.appendChild(this.MonthCtrl);lDiv.appendChild(this.YearCtrl);lDiv.appendChild(this.MonthUp);lDiv.appendChild(this.YearUp);return lDiv}, 
			createFooter: function(){var div=$$El('div');return div}, 
			createDayHeading: function(){this.Heading=$$El('table',this.CSS.DayHeading,this.name+'_dayHeading');var td,tbody=$$El('tbody'),tr=$$El('tr',this.CSS.DayHeadingRow);if(this.ShowWeeks){td=$$El('td',this.CSS.WeekHeading);tr.appendChild(td)};for(var dow=0; dow<7; dow++){td=$$El('td',this.CSS.DayHeadingCell);td.appendChild($$txt(this.daynames[dow]));tr.appendChild(td)};tbody.appendChild(tr);this.Heading.appendChild(tbody);return this.Heading}, 
			createCells: function(){this.cells=[];var lY=this.displayYear,lM=this.displayMonth,row=-1,sdt=SoprexDate(this.Culture,'',lY,lM,1),lSD=this.StartDay,lD=sdt.getDate(),lDW=sdt.getDay();sdt.setDate(lD+(lSD-lDW)-(lSD-lDW>0?7:0));this.Cells=$$el('table',this.CSS.Cells,this.name+'_cells');var tr,td,tbody=document.createElement('tbody'),cellno=this.ShowWeeks?48:42;for(var i=0; i<cellno; i++){if((this.ShowWeeks &&(i % 8==0))||(!this.ShowWeeks &&(i % 7==0))){row++;tr=document.createElement('tr');if(this.ShowWeeks){tr.innerHTML="<td class='"+this.CSS.WeekNumber+"'>"+sdt.getWeek()+"</td>";i++}tbody.appendChild(tr);}lD=sdt.getDate();td=document.createElement('td');td.tabIndex=0;td.className=this.CSS.CellsCell;td.appendChild(document.createTextNode(lD));td.cellObj=new Soprex.UI.CalendarCell(this,td,sdt,row);this.cells.push(td.cellObj);sdt.setDate(lD+1);tr.appendChild(td);};this.Cells.appendChild(tbody);this.reDraw();return this.Cells}, 
			reDraw: function(){this.state=1;var i,j;for(i=0; i<this.cells.length; i++){var lC=this.cells[i];lC.selected=lC._Date.CompareDate(this._Date);lC.SetClass()};this.state=2}, 
			deleteCells: function(){this.CalendarCells.removeChild(this.CalendarCells.firstChild);for(var i=0,l=this.cells.length; i<l; i++)this.cells[i].Dispose();delete this.cells;}, 
			goToMonth: function(aYear, aMonth){if(aYear!=null && aMonth!=null){this.displayMonth=aMonth;this.displayYear=aYear};if(this.CalendarCells && this.CalendarCells.firstChild){this.deleteCells();this.CalendarCells.appendChild(this.createCells());this.MonthCtrl.innerHTML=this._MonthNames[this.displayMonth].substring(0,3);this.YearCtrl.innerHTML=this.displayYear}}, 
			nextMonth: function(){if(this.displayMonth<11 && this.displayYear<=this.MaxYear)this.displayMonth++;else if(this.displayYear<this.MaxYear){this.displayMonth=0;this.displayYear++}else alert(this.MaxRangeText);this.goToMonth()}, 
			prevMonth: function(){if(this.displayMonth>0 && this.displayYear>=this.MinYear)this.displayMonth--;else if(this.displayYear>this.MinYear){this.displayMonth=11;this.displayYear--}else alert(this.MaxRangeText);this.goToMonth()}, 
			nextYear: function(){if(this.displayYear<this.MaxYear)this.displayYear++;else alert(this.MaxRangeText);this.goToMonth()}, 
			prevYear: function(){if(this.displayYear>this.MinYear){this.displayMonth=11;this.displayYear--}else alert(this.MaxRangeText);this.goToMonth()}, 
			updatePos: function(target){this.topOffset=this.TB.__.getHeight()+3;this.leftOffset=0;var lOff=this.TB.__.getLocation();this.Calendar.style.position='absolute';this.Calendar.setTop(lOff.y+this.topOffset);this.Calendar.setLeft(lOff.x+this.leftOffset);}
		}, 
		_CalendarCell: 
		{
			_ctor: function(aOwner, aTableCell, aDateObj, aRow){this.EventList=[['mouseover','_OnMouseOver'],['mouseout','_OnMouseOut'],['click','_OnClick'],['focus','_OnFocus'],['blur','_OnBlur'],['keydown','_OnKeyDown']];this.owner=aOwner;this.tableCell=aTableCell;this.selected=false;this._Date=aDateObj.clone();this.tableRow=aRow;this.SetClass();Event.SetEvents(this,this.tableCell,this.EventList,false,'cells');}, 
			_OnMouseOver: function(e){if(!this.__MO){this.__MO=true;var lSrc=$ev(e).src();lSrc.className=lSrc.cellObj.cellClass+' '+lSrc.cellObj.owner.CSS.Hover;}}, 
			_OnMouseOut: function(e){if(this.__MO){this.__MO=false;$ev(e).src().cellObj.SetClass()}}, 
			_OnClick: function(e){var lCell=$ev(e).src().cellObj,_=lCell.owner;this.__MO=false;if(!_.SelCurMonthOnly||lCell._Date.getMonth()==_.displayMonth && lCell._Date.getFullYear()==_.displayYear){_._Date=lCell._Date;if(_.TB.__){var ad=_._Date.Format();_.SelectedDate=ad;_.TB.set(ad);_.TB.selected.value=_._Date.DatePS();_.hide();_.TB.__.focus()};_.reDraw()}}, 
			_OnFocus: function(e){var lSrc=$ev(e).src();lSrc.className=lSrc.cellObj.cellClass+' '+lSrc.cellObj.owner.CSS.Hover;}, 
			_OnBlur: function(e){e.src().cellObj.SetClass()}, 
			_OnKeyDown: function(e){e=$ev(e);var lC=e.src(),lP=lC.parentNode?lC.parentNode:lC.parentElement;switch(e.getKeyCode()){case 27:lC.owner.hide();break;case 9:if(e.shiftKey)lC.cellObj.owner.MonthDown.focus();else lC.cellObj.owner.MonthUp.focus();break;case 13:case 32:lC.click();break;case 37:if(lC.cellIndex>1)lC.previousSibling.focus();else if(lP.previousSibling)lP.previousSibling.cells[7].focus();break;case 38:if(lP.previousSibling)lP.previousSibling.cells[lC.cellIndex].focus();break;case 39:if(lC.nextSibling)lC.nextSibling.focus();else if(lP.nextSibling)lP.nextSibling.cells[1].focus();break;case 40:if(lP.nextSibling)lP.nextSibling.cells[lC.cellIndex].focus();break;default:return e;};e.stop();return false;}, 
			SetClass: function(){var lCSS=this.owner.CSS,lDay=this._Date.getDay();if(this.selected)this.cellClass=lCSS.SelectedCell;else if(this.owner.displayMonth!=this._Date.getMonth())this.cellClass=lCSS.NotInMonth;else if(lDay>0 && lDay<6)this.cellClass=lCSS.WorkingDay;else this.cellClass=lCSS.Weekend;if(this._Date.CompareDate(this.owner._Date))this.cellClass=this.cellClass+' '+lCSS.CurrentDate;this.tableCell.className=this.cellClass;}, 
			Dispose: function(){Event.SetEvents(this,this.tableCell,this.EventList,true,'cells');this.tableCell=null}
		}, 
		_GridView: 
		{
			_ctor: function(aData){copy$(this,aData);this.$ID=this.UID.replace(/_/g,'$');this.el=$el(this.UID);if(!isDef$(this.el))this.el=$el(this.UID+'_'+this.UID);this.Init();}, 
			InitE: function(){var btn=$El(this.UID+"_ButtonFilterCancel");if(isDef$(btn)){btn._$=this;btn.V="ButtonFilterCancel";Event.observe(btn,'click',this.HideFilter.bindAsObserver(this),this.UID);Event.observe(btn,'keypress',this.OnBKeyDown.bindAsObserver(this),this.UID);}}, 
			Init: function(){this.OO={btn:['ButtonSearch','ButtonFind','ButtonFindNext','ButtonSearchCancel','ButtonFilter','ButtonFilterCancel','ButtonSave','ButtonRefresh'],mnu:['FilterMenuRoot','SearchMenuRoot','ExportMenuRoot','PagerMenuRoot'],txt:['SearchInput','FindInput','FilterInput'],ddl:['FilterList','SearchColumnsList','FilterColumnsList'],pnl:['SearchPanel','ActionInfoPanel','FilterPanelLeft','FilterPanelRight'],hf:['TB01','TB02']};for(var lI in this.OO){for(var i=0,l=this.OO[lI].length; i<l; i++){eval('this.'+this.OO[lI][i]+'=$El(this.UID+"_'+this.OO[lI][i]+'");');eval('if(this.'+this.OO[lI][i]+'){this.'+this.OO[lI][i]+'._$=this; this.'+this.OO[lI][i]+'.V="'+this.OO[lI][i]+'"}')}};this._page=this.Pager.i;this.CreateMenus();for(var bI=0,l=this.OO.btn.length; bI<l; bI++){var btn=eval('this.'+this.OO.btn[bI]);var fn=(bI==3?'Hide':(bI==5?'HideFilter':'OnBClick'));if(isDef$(btn)){Event.observe(btn,'click',this[fn].bindAsObserver(this),this.UID);Event.observe(btn,'keydown',this.OnBKeyDown.bindAsObserver(this),this.UID);}};Event.observe(this.SearchInput,'keydown',this.OnIKeyDown.bindAsObserver(this),this.UID);Event.observe(this.FindInput,'keydown',this.OnIKeyDown.bindAsObserver(this),this.UID);Event.observe(this.FilterInput,'keydown',this.OnIKeyDown.bindAsObserver(this),this.UID);Event.observe(this.FilterList,'change',this.OnFilterChange.bindAsObserver(this),this.UID);if(isDef$(this.SearchMenuRoot))Event.observe(this.SearchMenuRoot,'keydown',this._onKeyDown.bindAsObserver(this),this.UID);if(isDef$(this.ExportMenuRoot))Event.observe(this.ExportMenuRoot,'keydown',this._onKeyDown.bindAsObserver(this),this.UID);if(this.el){this.FixTable();this._Pager=$El(this.UID+'_Pager');if(isDef$(this._Pager))this.CreatePager();this.FixEmptyRows();this.FocusPB()}if(this.SearchMenuObj.Active=='None'){Element.hide(this.SearchPanel);Element.hide(this.FilterPanelLeft);Element.hide(this.ActionInfoPanel);}else if(this.SearchMenuObj.Active=='Search'){Element.hide(this.FilterPanelLeft);Element.show(this.SearchPanel);this.ShowSearch(true);}else if(this.SearchMenuObj.Active=='Find'){Element.hide(this.FilterPanelLeft);Element.show(this.SearchPanel);this.ShowFind(true);}else if(this.SearchMenuObj.Active=='Filter'){Element.hide(this.SearchPanel);Element.show(this.FilterPanelLeft);}}, 
			KillHandlers: function(){for(var bI=0,l=this.OO.btn.length; bI<l; bI++){var btn=eval('this.'+this.OO.btn[bI]),fn=(bI==3?'Hide':(bI==5?'HideFilter':'OnBClick'));if(isDef$(btn)){Event.stopObserving(btn,'click',this[fn].bindAsObserver(this),this.UID);Event.stopObserving(btn,'keydown',this.OnBKeyDown.bindAsObserver(this),this.UID)}};}, 
			FocusPB: function(){if(this.el!=null){for(var lIt=0; lIt<this.el.rows.length; lIt++){if(this.el.rows[lIt].ctrls!=null){var lC=this.el.rows[lIt];if(lC.ctrls.length>0){if(lC.ctrls[lC.selctrl].type=='checkbox' && lC.selctrl>0)$el(lC.ctrls[lC.selctrl]).TryFocus();else if(lC.ctrls[lC.selctrl].type!='checkbox')$el(lC.ctrls[lC.selctrl]).TryFocus()}}}}var lF=this.TB01.value;switch(lF){case 'C':this.FocusCol();break;case 'R':this.FocusRow();break;case 'Rc':var lC=this.el.rows;if(lC.length>1)if(lC[1].ctrls.length>0)$el(lC[1].ctrls[lC[1].selctrl]).TryFocus();else $el(lC[1]).TryFocus();break;case '':break;default:var lFno=parseInt(lF,10),li=0;for(var lI in this.OO){for(var lII=0,l=this.OO[lI].length; lII<l; lII++){if(li==lFno){try{eval('this.'+this.OO[lI][lII]+'.focus();');}catch(e){};}li++}};break}this.TB01.value='';this.FilterInput.disabled=false;this.SearchInput.disabled=false;this.FindInput.disabled=false;this.SearchColumnsList.disabled=false;this.FilterColumnsList.disabled=false;if(this.FilterList!=null)this.FilterList.disabled=false}, 
			OnFilterChange: function(e){var si=this.FilterList.selectedIndex;this.__dpb('Action$FilterList|'+si+'|'+this.FilterList.options[si].value);this.KillHandlers()}, 
			OnBClick: function(e){var el=$ev(e).src();this.__dpb('Action$'+el.V);this.KillHandlers()}, 
			OnBKeyDown: function(e){var el=$ev(e).src();this.doPageNav(e);switch(e.getKeyCode()){case 9:if(!e.shiftKey && el.V=='ButtonRefresh')this.FocusCol();else return e;break;case 13:case 32:this.__dpb('Action$'+el.V);this.KillHandlers();break;default:return e;};e.stop()}, 
			_onKeyDown: function(e){e=$ev(e);if(this.doPageNav(e))e.stop()}, 
			doPageNav: function(e){e=$ev(e);var ldp='';switch(e.getKeyCode()){case 33:ldp='D';break;case 34:ldp='U';break;case 35:ldp='L';break;case 36:ldp='F';break;};if(ldp!=''){this.doPager(ldp);return true;}return false}, 
			OnIKeyDown: function(e){var el=$ev(e).src();this.doPageNav(e);if(e.keyCode==13){this.TB02.value=el.V;this.__dpb('Action$'+el.V);this.SearchInput.stopObserving('keydown',this.OnIKeyDown.bindAsObserver(this),this.UID);this.FindInput.stopObserving('keydown',this.OnIKeyDown.bindAsObserver(this),this.UID);this.FilterInput.stopObserving('keydown',this.OnIKeyDown.bindAsObserver(this),this.UID);e.stop()}}, 
			__dpb: function(aV){__doPostBack(this.$ID,aV)}, 
			OnFilterMenuSelect: function(aV){this._$.__dpb(aV)}, 
			OnSearchMenuSelect: function(aV){switch(aV){case 'GridSearch':this._$.ShowSearch();break;case 'GridFind':this._$.ShowFind();break;case 'QuickFilter':this._$.ShowFilter();break;}this.Hide()}, 
			OnExportMenuSelect: function(aV){this._$.__dpb(aV)}, 
			ADFilterMenu: function(){var lC=this.TB02.value;if(lC!="")this.FilterMenu.ShowItem(lC)}, 
			Hide: function(){Element.hide(this.SearchPanel);Element.hide(this.FilterPanelLeft);Element.hide(this.ActionInfoPanel);this.TB01.value="None"}, 
			HideFilter: function(){Element.hide(this.FilterPanelLeft);if(this.FilterInput.value!=""||this.TB01.value=="Filter"){this.TB01.value="None";this.FilterInput.value="";this.__dpb('Action$ButtonFilterCancel')}}, 
			ShowFilter: function(){Element.hide(this.SearchPanel);Element.hide(this.ActionInfoPanel);Element.show(this.FilterPanelLeft);Element.TryFocus(this.FilterInput);this.TB01.value="Filter"}, 
			ShowSearch: function(bOut){bOut=(!!bOut);var lTable=Element.show(this.SearchPanel),lC=lTable.rows[0].cells;if(!bOut){Element.hide(this.FilterPanelLeft);Element.hide(this.ActionInfoPanel);this.TB01.value="Search"}$el(lC[0]).show(); $el(lC[1]).hide(); $el(lC[2]).show(); $el(lC[3]).show();$el(lC[4]).hide(); $el(lC[5]).show(); $el(lC[6]).hide(); $el(lC[7]).hide(); $el(lC[8]).show();Element.TryFocus(this.SearchInput);}, 
			ShowFind: function(bOut){bOut=(!!bOut);var lTable=Element.show(this.SearchPanel),lC=lTable.rows[0].cells;if(!bOut){Element.hide(this.FilterPanelLeft);Element.hide(this.ActionInfoPanel);this.TB01.value="Find"}if(this.TB01.value=="Find"||Element.visible(lC[1])){$el(lC[6]).hide();$el(lC[7]).show();}else {$el(lC[6]).show();$el(lC[7]).hide();}$el(lC[0]).hide(); $el(lC[1]).show(); $el(lC[2]).hide(); $el(lC[3]).hide(); $el(lC[4]).show(); $el(lC[5]).hide(); $el(lC[8]).show();Element.TryFocus(this.FindInput);}, 
			SetNewRowColor: function(aSrc, aColor){this._oldRowColor=aSrc.style.backgroundColor;aSrc.style.backgroundColor=aColor}, 
			SetOldRowColor: function(aSrc){aSrc.style.backgroundColor=this._oldRowColor}, 
			setFocusColor: function(){this.setAttribute("bgc",this.style.backgroundColor);this.style.backgroundColor='#4988FF'}, 
			getBlurColor: function(e){e=$ev(e);window._lrfocus=e.src();this.style.backgroundColor=this.getAttribute("bgc")}, 
			_TClick: 0, 
			RowClick: function(e){clearTimeout(this._TClick);e=$ev(e);var el=e.src();if(el.tagName=='A'){e.noBubble();return true;}if(el.tagName=='INPUT'||el.tagName=='SELECT'){for(var lCtrl=0; lCtrl<this.ctrls.length; lCtrl++){if(el==this.ctrls[lCtrl])this.selctrl=lCtrl;}return true;}var __=this,fn=function(){__._$.__dpb('Select$'+__.idx)};this._TClick=setTimeout(fn,300)}, 
			RowDblClick: function(e){clearTimeout(this._TClick);e=$ev(e);var el=e.src();if(el.tagName=='INPUT'||el.tagName=='SELECT')return;this._$.__dpb('DSelect$'+this.idx)}, 
			RowKeyDown: function(e){e=$ev(e);var el=e.src();if(el.tagName=='INPUT'||el.tagName=='SELECT'){if(e.keyCode==13){if(this.selctrl==this.ctrls.length-1){var lNext=this._$.getGridRow(el,'down');if(lNext!=this){if(isDef$(lNext.ctrls)){if(lNext.ctrls.length>0)$el(lNext.ctrls[lNext.selctrl]).TryFocus();else $el(lNext).TryFocus();}}else {this._$.TB01.value='Rc';this._$.doPager('U');}}else {this.selctrl++;$el(this.ctrls[this.selctrl]).TryFocus();}}else if(e.keyCode==9){if(!e.shiftKey){if(this.selctrl==this.ctrls.length-1){var lNext=this._$.getGridRow(el,'down');if(isDef$(lNext)){if(lNext!=this && isDef$(lNext.ctrls)&& lNext.ctrls.length>0)$el(lNext.ctrls[lNext.selctrl]).TryFocus();else if(this._$.PagerMenuRoot)$el(this._$.PagerMenuRoot).TryFocus();else return e;}}else {this.selctrl++;$el(this.ctrls[this.selctrl]).TryFocus();}}else {if(this.selctrl==0){var lPrev=this._$.getGridRow(el,'up');if(isDef$(lPrev)){if(lPrev!=this && isDef$(lPrev.ctrls)&& lPrev.ctrls.length>0){lPrev.selctrl=lPrev.ctrls.length-1;$el(lPrev.ctrls[lPrev.selctrl]).TryFocus();}else if(lPrev.rowIndex==0)this._$.FocusCol();else $el(lPrev).TryFocus();}}else {this.selctrl--;$el(this.ctrls[this.selctrl]).TryFocus();}}}else if(e.keyCode==27)$el(this).TryFocus();else return e;e.stop()}else {switch(e.getKeyCode()){case 9:if(e.shiftKey)this._$.FocusCol();else if(this._$.PagerMenuRoot!=null)$el(this._$.PagerMenuRoot).TryFocus();else return e;break;case 27:this.blur();break;case 32:this._$.__dpb('Select$'+this.idx);break;case 13:if(this.ctrls.length>0)$el(this.ctrls[this.selctrl]).TryFocus();else this._$.__dpb('Select$'+this.idx);break;case 38:$el(this._$.getGridRow(el,'up')).TryFocus();break;case 40:$el(this._$.getGridRow(el,'down')).TryFocus();break;default:if(this._$!=null)this._$.doPageNav(e);return e}};e.stop();return false}, 
			getGridRow: function(aFrom, aIdx){var lEl=$el(aFrom),lCRow=(lEl.tagName!='TR'?lEl.parentByTag('tr'):lEl),lTbl=lEl.parentByTag('table'),lNumOfRows=lTbl.rows.length;switch(aIdx){case 'up':return(lCRow.rowIndex>0?lTbl.rows[lCRow.rowIndex-1]:lCRow);case 'down':return(lCRow.rowIndex+1<lNumOfRows?lTbl.rows[lCRow.rowIndex+1]:lCRow);case 'first':return lTbl.rows[0];case 'last':return lTbl.rows[lNumOfRows-1];}if(aIdx>=0 && aIdx<lNumOfRows)return lTbl.rows[aIdx];}, 
			getGridCol: function(aFrom, aIdx){var lEl=$el(aFrom),lCCol=(lEl.tagName!='TH'?lEl.parentByTag('th'):lEl),lTbl=lEl.parentByTag('table'),lNumOfCols=lTbl.rows[0].cells.length;switch(aIdx){case 'left':if(lCCol.cellIndex>0){var lTC=$el(lTbl.rows[0].cells[lCCol.cellIndex-1]),lTCDim=lTC.getDimensions(false);if(lTCDim.W>0)return lTC;var lTC2=lTC._$.getGridCol(lTC,'left');if(lTC!=lTC2)return lTC2;}return lCCol;case 'right':if(lCCol.cellIndex+1<lNumOfCols){var lTC=$el(lTbl.rows[0].cells[lCCol.cellIndex+1]),lTCDim=lTC.getDimensions(false);if(lTCDim.W>0)return lTC;var lTC2=lTC._$.getGridCol(lTC,'right');if(lTC!=lTC2)return lTC2;}return lCCol;case 'first':return lTbl.rows[0].cells[0];case 'last':return lTbl.rows[0].cells[lNumOfCols-1];}if(aIdx>=0 && aIdx<lNumOfRows)return lTbl.rows[0].cells[aIdx];}, 
			ColKeyDown: function(e){e=$ev(e);var el=e.src();el._$.doPageNav(e);switch(e.getKeyCode()){case 9:if(e.shiftKey){if(!$el(el._$.ButtonRefresh).TryFocus())return e;else el._$.FocusRow();}break;case 27:el.blur();break;case 13:case 32:eval(el.readAttribute('onclick'));break;case 37:$el(this._$.getGridCol(el,'left')).TryFocus();break;case 39:$el(this._$.getGridCol(el,'right')).TryFocus();break;default:return e};e.stop();return false}, 
			FocusRow: function(aIdx){if(aIdx==null)aIdx=this.SelRow+1;if(this.el!=null && this.el.rows.length>aIdx)$el(this.el.rows[aIdx]).TryFocus()}, 
			FocusCol: function(aIdx){if(aIdx==null)aIdx=this.SortCol;if(this.el!=null)$el(this.el.rows[0].cells[aIdx]).TryFocus()}, 
			FixEmptyRows: function(){var lTopTbl=$el(this.UID+'_top');if(lTopTbl!=null){for(var lRow=0; lRow<lTopTbl.rows.length; lRow++){if(lTopTbl.rows[lRow].offsetHeight<3)lTopTbl.rows[lRow].style.display='none';}}}, 
			FixTable: function(){var lRowsW=[],lCellsW=[],__=this;this.el.onfocus=function(){$el(__.el.rows[0]).TryFocus()};for(var lRow=0; lRow<this.el.rows.length; lRow++){var _row=this.el.rows[lRow];for(var lCell=0; lCell<_row.cells.length; lCell++)lCellsW.push((_row.cells[lCell].clientWidth-2));lRowsW.push(lCellsW);if(lRow>0){_row._$=this;if(this.Selectable){_row.onfocus=this.setFocusColor;_row.onblur=this.getBlurColor;_row.onkeydown=this.RowKeyDown;_row.onclick=this.RowClick;_row.ondblclick=this.RowDblClick;_row.tabIndex=0;_row.hideFocus=false;Element.setHand(_row)}_row.idx=lRow-1;_row.ctrls=[]};lCellsW=[]};for(var lRow=0; lRow<this.el.rows.length; lRow++){for(var lCell=0; lCell<this.el.rows[lRow].cells.length; lCell++){var _cell=this.el.rows[lRow].cells[lCell],lCV=_cell.getAttribute('iv');if(lCV=='spxHasCtrl'){var c=_cell.getElementsByTagName('INPUT');if(c.length==0)c=_cell.getElementsByTagName('SELECT');if(c.length>0){this.el.rows[lRow].ctrls.push(c[0]);this.el.rows[lRow].selctrl=0}}else if(lCV!=null){lCV=lCV.replace(/\r\n/g,'<br />');var lTF='';_cell.innerHTML='<div onmouseover=\"$el(this).$OverflowTooltip()\" style=\"width:'+lRowsW[lRow][lCell]+'px; overflow:hidden; '+lTF+'\">'+lCV+'</div>'}}};if(this.el.rows.length>0){for(var lC=0; lC<this.el.rows[0].cells.length; lC++){lH=this.el.rows[0].cells[lC];if(lH.style.cursor==getHandCursor$()){if(this.Selectable){lH.tabIndex=0;lH.hideFocus=false;lH.onfocus=this.setFocusColor;lH.onblur=this.getBlurColor;lH.onkeydown=this.ColKeyDown}lH._$=this}else lH.tabIndex=-1}}}, 
			createPMItem: function(aP, aL){var lT,lItem={};lItem.Selected=false;lItem.Visible=true;if(aL==null)lT=(aP=='-'?'-':aP+'|'+this.Pager.Label+' '+aP);else {lT=aL+'|'+aL;lItem.Jump=aP;lItem.__=this;lItem.OnClick=function(e){e=$ev(e);this.__.PagerMenu.Hide();this.__.Pager.i=this.__.Pager.i+this.Jump;this.__.createPM();if(e.getKeyCode()!=0){if(this.Jump<0)this.__.PagerMenu.FocusItem();else this.__.PagerMenu.FocusItem(-1)}};};lItem.Text=lT;lItem.Value=aP;return lItem}, 
			createPM: function(){if(this.PagerMenu!=null)this.PagerMenu.Dispose();var lNoMI=8,lPages=[],lTotal=0,lC=this.Pager.i-5,lPM={},lSC=0,lT=this.Pager.t-this.Pager.i;if(this.Pager.t-lC<lNoMI && lC>lNoMI)lC=this.Pager.t-lNoMI;this.PagerMenuObj.Items=[];copy$(lPM,this.PagerMenuObj);if(lC>100)lPM.Items.push(this.createPMItem(-100,'-100'));if(lC>0){lPM.Items.push(this.createPMItem(-10,'--')); lSC++;lPM.Items.push(this.createPMItem('-'))};while(lTotal<lNoMI && lC<this.Pager.t){if(++lC>0 && lC!=this._page){lTotal++;lPM.Items.push(this.createPMItem(lC))}};if(lC<this.Pager.t){lPM.Items.push(this.createPMItem('-')); lSC++;lPM.Items.push(this.createPMItem(10,'++'))};if(this.Pager.i+99<this.Pager.t)lPM.Items.push(this.createPMItem(100,'+100'));lPM.TopOffset=((lPM.Items.length-lSC)*(-18))-(lSC-13);_$=this;this.PagerMenu=new Soprex.UI.Menu(lPM,_$.PagerMenuRoot);this.PagerMenu.OnItemSelect=this.OnPagerMenuSelect;this.PagerMenu._$=this;this.PagerMenu.Show()}, 
			OnPagerMenuSelect: function(aItem){this._$.__dpb('Page$'+aItem)}, 
			OnPagerClick: function(e){this.doPager(Event.src(e).CMD)}, 
			OnPagerKeyDown: function(e){e=$ev(e);var el=e.src();this.doPageNav(e);switch(e.getKeyCode()){case 13:case 32:case 40:this.doPager(el.CMD);break;default:return e};e.stop()}, 
			OnPMKeyDown: function(e){e=$ev(e);this.doPageNav(e);switch(e.getKeyCode()){case 9:if(e.shiftKey)this.FocusRow();else return e;break;case 13:case 32:case 40:this.createPM();this.PagerMenu.FocusItem();break;default:return e};e.stop()}, 
			getPagerButton: function(aSrc, aTxt, aCmd){var btn=$$El('img');btn.border=0;btn.src=this.ImageHandler+'gv/'+aSrc+(aCmd!=''?'':'D')+'.png';btn.tabIndex=(aCmd!=''?0:-1);btn.title=aTxt;btn.style.width='17px';btn.style.height=(aSrc=='DownSingle'?'17px':'16px');if(aCmd!=''){btn.CMD=aCmd;Element.setHand(btn);if(aCmd!='M'){Event.observe(btn,'click',this.OnPagerClick.bindAsObserver(this),this.UID);Event.observe(btn,'keydown',this.OnPagerKeyDown.bindAsObserver(this),this.UID);}else {Event.observe(btn,'mouseover',this.OnPagerClick.bindAsObserver(this),this.UID);Event.observe(btn,'keydown',this.OnPMKeyDown.bindAsObserver(this),this.UID);}};return btn}, 
			CreatePager: function(){var lTT=this.Pager.ToolTips;this.PagerMenuRoot=this.getPagerButton('DownSingle',lTT[0],(this.Pager.t==1?'':'M'));this.PageFirst=this.getPagerButton('LeftDouble',lTT[1],(this.Pager.i==1?'':'F'));this.PageDown=this.getPagerButton('LeftSingle',lTT[2],(this.Pager.i==1?'':'D'));this.PageUp=this.getPagerButton('RightSingle',lTT[3],(this.Pager.i==this.Pager.t?'':'U'));this.PageLast=this.getPagerButton('RightDouble',lTT[4],(this.Pager.i==this.Pager.t?'':'L'));var lTbl=this._Pager;Element.setHeight(lTbl,17);lTbl.style.marginTop="1px";var lTD=lTbl.rows[0].cells;Element.setWidth(lTD[0],15);lTD[1].innerHTML=this.Pager.Label;Element.setWidth(lTD[2],3);Element.setText(lTD[3],' '+this.Pager.i+' / '+this.Pager.t+' ');$el(lTD[3]).setStyle({width:'73px',color:'black',backgroundColor:"#ffffff",fontWeight:'bold',border:'1px solid #969696 ',borderRightWidth:0,wrap:'off',fontSize:'10px'});lTD[4].appendChild(this.PagerMenuRoot);Element.setWidth(lTD[5],this.el.offsetWidth-218);lTD[6].appendChild(this.PageFirst);Element.setWidth(lTD[7],3);lTD[8].appendChild(this.PageDown);Element.setWidth(lTD[9],3);lTD[10].appendChild(this.PageUp);Element.setWidth(lTD[11],3);lTD[12].appendChild(this.PageLast);Element.setWidth(lTD[13],15);this.PageDown.owner=this.PageUp.owner=this.PageFirst.owner=this.PageLast.owner=this}, 
			doPager: function(aCMD){var lP=0;switch(aCMD){case 'M':this.createPM();break;case 'F':lP=1;break;case 'L':lP=this.Pager.t;break;case 'D':lP=this.Pager.i-1;break;case 'U':lP=this.Pager.i+1;break;}if(lP>0 && lP<=this.Pager.t && lP!=this._page)this.setPage(lP)}, 
			setPage: function(aPage){this.__dpb('Page$'+aPage)}, 
			CreateMenus: function(){this.Menus=['FilterMenu','SearchMenu','ExportMenu'];var _$=this;for(var lMNU=0,l=this.Menus.length; lMNU<l; lMNU++){var lM=this.Menus[lMNU];eval('this.'+lM+'=new Soprex.UI.Menu(_$.'+lM+'Obj,_$.'+lM+'Root);');eval('this.'+lM+'.OnItemSelect=this.On'+lM+'Select;');eval('this.'+lM+'._$=this;')}}
		}, 
		_SmartHolder: 
		{
			_ctor: function(aData){if(!aData)return;copy$(this,aData);if(!isDef$(this.FillHeight))this.FillHeight=true;this._Sizer=$el(this.UID);this._Holder=$el(this.UID+'_holder');this.ScrollBarW=getScrollBarWidth$();this.Recalc();}, 
			Dispose: function(){this._Holder=this._Sizer=null}, 
			EventLists: 
			{
				Doc: [["load","_OnLoad"],["unload","_OnUnload"],["resizeend","_OnResize"]], 
				Sizer: [["resize","_OnResize"],["propertychange","_OnResize"]]
			}, 
			_SetEvents: function(aDetach){Event.SetEvents(this,this._Sizer,this.EventLists.Sizer,aDetach);Event.SetEvents(this,this._Holder,this.EventLists.Sizer,aDetach);}, 
			_OnResize: function(){this.Recalc()}, 
			_OnUnload: function(){this.Dispose()}, 
			_OnLoad: function(){this.Recalc()}, 
			Recalc: function(){this._Holder.hide();var ss=this._Sizer.style,hs=this._Holder.style,oX=(this.OverflowX?this.OverflowX:'auto'),oY=(this.OverflowY?this.OverflowY:'auto'),__=this;ss.overflow='';this._SDim=this._Sizer.getDimensions(false);if(this._SDim.W>0)this._Sizer.setWidth(this._SDim.W);if(this._SDim.H>0)this._Sizer.setHeight(this._SDim.H);hs.width="auto";hs.height="auto";hs.overflow='';this._HDim=this._Holder.getDimensions(false);this.ScrollH=this._SDim.W<=this._HDim.W;this.ScrollV=this._SDim.H<=this._HDim.H;ss.overflowX=(this.ScrollH?oX:'');ss.overflowY=(this.ScroolV?oY:'');this._Holder.show();if(this.FillHeight){(function(){var _sd=__._Sizer.getDimensions(false),_sp=$el(__._Sizer.parentNode).getDimensions(false),lH=_sd.H;if(lH<_sp.H){lH=_sp.H;}__._Sizer.setHeight(lH);}).delay(1);}}
		}, 
		_Dialog: 
		{
			_ctor: function(aData){if(aData==null)return;copy$(this,aData);this.Init();}, 
			Init: function(aData){this.proc=true;this.DLG=$el(this.UID);if(!isDef$(this.DLG))return;this.btn=$El('dlgClose'+this.UID);this.TB=$El('dlgTB'+this.UID);this.HF=$El('__HF'+this.UID);this.mouseD=false;if(this.IsModal){this.ModalWnd=$$el('div','','mdlWnd'+this.UID);$$add(this.ModalWnd);}if(this.Visible)this.Show(); else this.Hide();}, 
			Dispose: function(){this.DLG=null;this.btn=null}, 
			Show: function(){if(this.IsModal)this.ModalWnd.show();this.DLG.show();if(this.btn!=null)Event.observe(this.btn,'click',this.Close.bindAsObserver(this),this.UID);Event.observe(this.TB,'mousedown',this._onMouseDown.bindAsObserver(this),this.UID);Event.observe(this.TB,'mouseup',this._onMouseUp.bindAsObserver(this),this.UID);Event.observe(window,'resize',this.updatePos.bindAsObserver(this),this.UID);Event.observe(document,'mouseup',this._onMouseUp.bindAsObserver(this),this.UID);Event.observe(document,'mousemove',this._onMouseMove.bindAsObserver(this),this.UID);this.Visible=true;this.DLG.disabled=false;this.updatePos(true);var lFocusCtrl=$el(this.WndPos.focusCtrl);(function(){if(lFocusCtrl!=null)lFocusCtrl.TryFocus();}).delay(100);}, 
			Hide: function(){if(this.btn!=null)Event.stopObserving(this.btn,'click',this.Close.bindAsObserver(this),this.UID);Event.stopObserving(this.TB,'mousedown',this._onMouseDown.bindAsObserver(this),this.UID);Event.stopObserving(this.TB,'mouseup',this._onMouseUp.bindAsObserver(this),this.UID);Event.stopObserving(window,'resize',this.updatePos.bindAsObserver(this),this.UID);Event.stopObserving(document,'mouseup',this._onMouseUp.bindAsObserver(this),this.UID);Event.stopObserving(document,'mousemove',this._onMouseMove.bindAsObserver(this),this.UID);if(this.IsModal)this.ModalWnd.hide();this.Visible=false;var __=this;(function(){__.DLG.style.left='-1000px';}).delay(10);(function(){__.DLG.disabled=true;}).delay(10);}, 
			Close: function(){this.HF.value='0';this.Hide();}, 
			_onMouseDown: function(e){this.mouseOff=$ev(e).getPosition();this.TB.rows[0].cells[0].style.cursor='move';this.mouseD=true}, 
			_onMouseUp: function(){this.mouseD=false;this.TB.rows[0].cells[0].style.cursor='default'}, 
			_onMouseMove: function(e){if(this.mouseD){e=$ev(e);var lS=this.DLG.style;this.WndPos.top+=(e.pY()-this.mouseOff.y);this.WndPos.left+=(e.pX()-this.mouseOff.x);this.updatePos();this.mouseOff=e.getPosition();}}, 
			updatePos: function(){var _=this.WndPos;if(this.IsCentered){this.CenterWnd();}else {if(_.fromCtrl!=''){var fp=_.fromCtrl.split('|'),fpe=$el(fp[0]),fpep={left:fpe.getLeft(),top:fpe.getTop()},dlg=this.DLG.getDimensions(),t,l;switch(fp[1]){case '0':t=fpep.top-(dlg.H+2);l=fpep.left;break;case '1':t=fpep.top;l=fpep.left+fpe.getWidth()+2;break;case '2':t=fpep.top+fpe.getHeight();l=(fpep.left+fpe.getWidth())-dlg.W;break;case '3':t=fpep.top;l=fpep.left-(dlg.W+2);break;}_.fromCtrl='';_.top=t; _.left=l;}this.setWndPosition(_.left,_.top);}}, 
			CenterWnd: function(){var lVR=page$$.getViewRect(),l__=this.DLG.getDimensions();if(this.IsModal){var lPS=page$$.getPageSize();this.ModalWnd.setHeight(lPS.h-10);this.ModalWnd.setWidth(lPS.w-10);}this.DLG.setTop(lVR.y+(lVR.h-l__.H)/ 2);this.DLG.setLeft(lVR.x+(lVR.w-l__.W)/ 2)}, 
			setWndPosition: function(x, y){if(this.IsModal){var lPS=page$$.getPageSize();this.ModalWnd.setHeight(lPS.h-10);this.ModalWnd.setWidth(lPS.w-10);}this.DLG.setTop(y);this.DLG.setLeft(x)}
		}, 
		_ExpandablePanel: 
		{
			_ctor: function(aData){if(aData==null)return;this.Init(aData);this._setExpandImage();if(!this.Expanded){this.Expanded=true;var __=this;(function(){var d=__.ETimer.Interval;__.ETimer.Interval=1;__.OnTitleClick();__.ETimer.Interval=d;}).delay(10);};if(!this.Visible)Element.hide(this.FPNL);}, 
			Init: function(aData){copy$(this,aData);this.Step=9;this.FPNL=$el(this.UID);this.TB=$El(this.UID+'Title');this.DivIn=$El(this.UID+'In');if(this.titleH==null)this.titleH=Element.getHeight(this.TB);if(this.panelW==null)this.panelW=Element.getWidth(this.DivIn);if(this.panelH==null)this.panelH=Element.getHeight(this.DivIn)+this.titleH;this.PImg=$el(this.UID+'TitleImg');Event.observe(this.TB,'click',this.OnTitleClick.bindAsObserver(this),this.UID);var __=this;this.ETimer=new Timer(__,this.ExpandTime,this._calcInterval(),(function(_){var lH=_._getH()+2;if(lH<(_.titleH+(_.Step+2))&& _.Expanded){_.Expanded=false; _.ETimer.Stop(); lH=_.titleH;}else if(lH>_.panelH &&!_.Expanded){_.Expanded=true; _.ETimer.Stop(); lH=_.panelH;}else if(_.Expanded){lH-=(_.Step+2);}else {lH+=_.Step;}_._setH(lH);}),(function(_){_.DivIn.style.top=(_.Expanded?'1px':'0px');_._setExpandImage();}));}, 
			Dispose: function(){this.FPNL=null;this.TB=null}, 
			OnTitleClick: function(){if(this.ETimer.__P==0)this.ETimer.Start()}, 
			_setExpandImage: function(){this.PImg.style.backgroundImage='url('+(this.Expanded?this.CollapseImgUrl:this.ExpandImgUrl)+')';this.PImg.style.backgroundPosition='center 2px';}, 
			_getH: function(){return Element.getHeight(this.FPNL);}, 
			_setH: function(aH){return Element.setHeight(this.FPNL,aH);}, 
			_calcInterval: function(){var i=this.ExpandTime /(this.panelH / 9);if(i<1){i=this.ExpandTime /(this.panelH / 18);this.Step=18;}return i;}
		}
	}, 
	_windowEx: 
	{
		__checkForm: function(){window.theForm=(document.forms['aspnetForm']||document.aspnetForm);}, 
		scrRX: '<script[^>]*>([\\S\\s]*?)<\/script>', 
		jsonRX: /^\/\*-secure-([\s\S]*)\*\/\s*$/, 
		$a$: [], 
		$o$: 
		{
		}, 
		$_Fn$: function(){}, 
		$xFn$: function(x){return x}, 
		guid$: function(){return++Soprex.uniqueID;}, 
		isUndef$: function(o){return typeof o=='undefined';}, 
		isNull$: function(o){return o===null;}, 
		isDef$: function(o){return!isUndef$(o)&&!isNull$(o);}, 
		isEl$: function(o){return isDef$(o)&& o.nodeType==1;}, 
		isNode$: function(o){return isDef$(o)&& o && o.nodeType;}, 
		isStr$: function(o){return isDef$(o)&& typeof o=="string";}, 
		isArray$: function(o){return isDef$(o)&& typeof o=="object" && 'splice' in o && 'join' in o;}, 
		isRegX$: function(o){return isDef$(o)&& o.constructor==RegExp;}, 
		isDate$: function(o){return isDef$(o)&& typeof o=="date";}, 
		isNum$: function(o){return isDef$(o)&& typeof o=="number";}, 
		isBool$: function(o){return isDef$(o)&& typeof o=="boolean";}, 
		isFn$: function(o){return isDef$(o)&& typeof o=="function";}, 
		isHash$: function(o){return isDef$(o)&& o instanceof Hash;}, 
		isNullEx$: function(n, con){con=(con||window);return(typeof(con[n])=="undefined")}, 
		obj$: function(aName, aObject, aNew){return(aObject &&!isNullEx$(aName,aObject)?aObject[aName]:(aNew?(aObject[aName]={}):undefined))}, 
		pObj$: function(aPath, aContext, aNew){var lObject=(aContext!=null?aContext:window);var lNames=aPath.split('.');var lProperty=lNames.pop();for(var i=0; i<lNames.length && lObject; i++)lObject=obj$(lNames[i],lObject,aNew);return{object:lObject,property:lProperty}}, 
		eObj$: function(aPath, aNew){if(!isStr$(aPath))return window;if(aPath.include('.'))return obj$(aPath,window,aNew);var lRef=pObj$(aPath,window,aNew);return(lRef?obj$(lRef.Property,lRef.Object,aNew):null)}, 
		clone$: function(o){return copy$({},o);}, 
		$el: function(el){var a=arguments,l=a.length;if(l>1){for(var i=0,r=[]; i<l; i++)r.push($el(a[i]));return r;}if(isStr$(el))el=document.getElementById(el);return Element.extend(el);}, 
		$El: function(el){var a=arguments,l=a.length;if(l>1){for(var i=0,r=[]; i<l; i++)r.push($El(a[i]));return r;}if(isStr$(el))el=document.getElementById(el);return el;}, 
		$$el: function(){var a=arguments,l=a.length,lEl=document.createElement(a[0]);for(var i=1; i<l; i++){var lArg=a[i];if(i==1)lEl.className=lArg;else if(i==2)lEl=$$Attr(lEl,'id',lArg);else lEl=$$Attr(lEl,lArg[0],lArg[1])}return $el(lEl)}, 
		$$El: function(){var a=arguments,l=a.length,lEl=document.createElement(a[0]);for(var i=1; i<l; i++){var lArg=a[i];if(i==1)lEl.className=lArg;else if(i==2)lEl=$$Attr(lEl,'id',lArg);else lEl=$$Attr(lEl,lArg[0],lArg[1])}return lEl}, 
		$$txt: function(aTxt){return document.createTextNode(aTxt)}, 
		$Attr: function(aEl, aA){return $el(aEl).getAttribute(aA)}, 
		$$Attr: function(aEl, aName, aValue){if(aName=='style')aEl.style.cssText+=aValue;aEl.setAttribute(aName,aValue);return aEl}, 
		$$add: function(aControl){document.body.appendChild(aControl)}, 
		$$sub: function(aControl){document.body.removeChild(aControl)}, 
		$$css: function(aEl, aClass){return $$Attr($$Attr(aEl,'class',aClass),'className',aClass)}, 
		$build: function(aP, aO){if(isNull$(aO))return;var _E;if(isStr$(aO)){if(isDef$(aP))aP.innerHTML+=aO;return;};if(aO.length==0)_E=$$El('span');else {for(var i=0; i<aO.length; i++){if(i==0 && isStr$(aO[i])){var _EO=aO[i].match(/^([a-z][a-z0-9]*)\.([^\s\.]+)$/i);if(_EO){_E=$$El(_EO[1],_EO[2]);continue;}_EO=aO[i].match(/^([a-z][a-z0-9]*)$/i);if(_EO){_E=$$El(_EO[1]);continue;}_E=$$El('span');}if(aO[i]==undefined)return;if(isStr$(aO[i])||isArray$(aO[i]))this.$build(_E,aO[i]);else if(isNum$(aO[i]))this.$build(_E,aO[i].toString());else if(aO[i].constructor==Object)for(var p in aO[i])$$Attr(_E,p,aO[i][p].replace(/&#39;/g,"'"));else return}}if(isDef$(aP))aP.appendChild(_E);return $El(_E)}, 
		$ver: function(){var lV='';var __=this;for(var i in __)if(i.toString().indexOf('Ver')!=-1)lV=lV+i+':'+this[i]+'\n';return lV}, 
		$A: function(it){if(!it)return[];if(it.toArray)return it.toArray();var l=it.length||0,r=new Array(l);while(l--)r[l]=it[l];return r;}, 
		$w: function(str){if(!isStr$(str))return[];str=str.strip();return str?str.split(/\s+/):[];}, 
		$H: function(o){return new Hash(o);}, 
		$R: function(s, e, ex){return new Range(s,e,ex);}, 
		keys$: function(o){var keys=[];for(var k in o)keys.push(k);return keys;}, 
		values$: function(o){var values=[];for(var k in o)values.push(o[k]);return values;}, 
		inspect$: function(o){try{if(isUndef$(o))return 'undefined';if(isNull$(o))return 'null';return o.inspect?o.inspect():String(o);}catch(e){return 'error';}}, 
		toJSON$: function(o){switch(typeof(o)){case 'undefined':case 'function':case 'unknown':return;case 'boolean':return o.toString();}if(isNull$(o))return 'null';if(o.toJSON)return o.toJSON();if(isEl$(o))return;var r=[];for(var p in o){var v=toJSON$(o[p]);if(!isUndef$(v))r.push(p.toJSON()+':'+v);}return '{'+r.join(',')+'}';}, 
		toHTML$: function(o){return o && o.toHTML?o.toHTML():String.safe(o);}, 
		toQPair$: function(key, value){if(isUndef$(value))return key;return key+'='+encodeURIComponent(String.safe(value));}, 
		toQueryString$: function(object){return $H(object).toQueryString();}, 
		getElementsByClass: function(aClass, aTag){var r=[];aTag=aTag||'*';var e=document.getElementsByTagName(tag);var rx=new RegExp('(^|\\s)'+aClass+'(\\s|$)');for(var i=0; i<e.length; i++)if(rx.test(e[i].className))r.push(e[i]);return r;}, 
		Try$: function(){var r;for(var i=0,l=arguments.length; i<l; i++){var fn=arguments[i];try{r=fn(); break;}catch(e){}}return r;}, 
		$doo: function(aFN){if(isFn$(aFN))aFN()}, 
		$fnCache$: function(aName, aObj){aObj=(aObj||window);if(!(aName in aObj))return;var f=aObj[aName],n="$cache$"+aName;aObj[n]={};aObj[aName]=function(){var k=[];for(var i=0; i<arguments.length; i++){k.push(arguments[i])}k=k.toSource();if(!(k in this[n]))this[n][k]=f.apply(this,arguments);return this[n][k]};return n}, 
		inherits$: function(aSub, aSuper){if(typeof(aSuper)=='function'){aSub.prototype=new aSuper();aSub.prototype.constructor=aSub;aSub.Super=aSuper.prototype}}, 
		copy$: function(aD, aS, aMethodize){if(!aMethodize)for(lP in aS)aD[lP]=aS[lP];else for(lP in aS)if(isFn$(aS[lP])&&!(lP in aD))aD[lP]=aS[lP].methodize();return aD}, 
		cpwpw$: function(aS, aPrefix){aPrefix=aPrefix||'';for(lP in aS){var lN=aPrefix+lP;window[lN]=aS[lP];}}, 
		CClass: function(){var parent=null,properties=$A(arguments);if(isFn$(properties[0]))parent=properties.shift();function _T_(){return this._ctor.apply(this,arguments);}_T_['addMethods']=function(source){var ancestor=this.superclass && this.superclass.prototype;var properties=keys$(source);if(!keys$({toString:true}).length)properties.push("toString","valueOf");for(var i=0,length=properties.length; i<length; i++){var property=properties[i],value=source[property];if(ancestor && isFn$(value)&& value.argNames().first()=="$super"){var method=value,value=copy$((function(m){return function(){return ancestor[m].apply(this,arguments)};})(property).wrap(method),{valueOf:function(){return method},toString:function(){return method.toString()}});}if(property=='_Static')copy$(this,value);else if(property=='_Methods')copy$(this.prototype,value);else this.prototype[property]=value;}return this;};_T_.superclass=parent;_T_.subclasses=[];if(parent){var subclass=function(){};subclass.prototype=parent.prototype;_T_.prototype=new subclass;parent.subclasses.push(_T_);}for(var i=0; i<properties.length; i++)_T_.addMethods(properties[i]);if(!_T_.prototype._ctor)_T_.prototype._ctor=$_fn$;_T_.prototype.constructor=_T_;return _T_;}, 
		parseUnit$: function(aUnit){if(isNum$(aUnit))return{value:aUnit,type:'px'};var lUnit={value:0,type:''};if(isStr$(aUnit)){if(aUnit.indexOf('%')!=-1)lUnit.type="%";else if(aUnit.indexOf("px")!=-1)lUnit.type="px";lUnit.value=parseInt(aUnit,10);}if(isNaN(lUnit.value))lUnit.value=0;return lUnit}, 
		createTableStrecher$: function(aP){var lTbl=this.$build(aP,['div',{'style':'width:100%;height:100%;display:block;'},['table',{'width':'100%'},{'height':'100%'},{'style':'display:block;'},['tbody',['tr',['td','&nbsp;']]]]]);return lTbl}, 
		$$Img: function(aData){var lImg=this.$$el('img');lImg.src=aData[0]||aData.Url;lImg.width=aData[1]||aData.W;lImg.height=aData[2]||aData.H;lImg.border=0;return lImg}, 
		getScrollBarWidth$: function(){var outer=this.$build(document.body,['div',{'style':'position:absolute; visibility:hidden; width:200px; height:150px; overflow:hidden'}]);var inner=this.$build(outer,['p',{'width':'100%'},{'height':'200px;'}]);var w1=inner.offsetWidth;outer.style.overflow='scroll';var w2=inner.offsetWidth;if(w1==w2)w2=outer.clientWidth;this.$$sub(outer);return(w1-w2);}, 
		SoprexDate: function(aCulture, aDate, aY, aM, aD){var lDate;if(aY!=null && aM!=null && aD!=null)lDate=new Date(aY,aM,aD);else lDate=new Date();if(aDate!=null && aDate!='')lDate.Parse(aDate);lDate.Initialize(aCulture);return lDate}, 
		getImgBGStr$: function(aImg){return 'url('+aImg+')center no-repeat';}, 
		getHandCursor$: function(){return 'pointer';}
	}, 
	Init: function(){this._windowEx.copy$(window,this._windowEx);Soprex.Base.Init();Soprex.Utils.Init();Soprex.MS.Init();Soprex.UI.Init();(function(){window.page$$=new Soprex.UI.Page()}).delay(10);}
}
