function Group(ob){
	if(!ob || typeof ob!= 'object') ob= {};
	for(var p in ob){	 	
		if(ob.hasOwnProperty(p)) this[p]= ob[p];
	}
}

/*@cc_on 
@if(@_jscript_version> 5.5) navigator.IE= true;
@end
@*/

if(Object.hasOwnProperty){
	var Run= new Group(window.Run), Memry= new Group(window.Memry),
	Yankee= new Group(window.Yankee);

	if(window.addEventListener && !navigator.IE){
		Run.handler= function(who, what, fun){
			who.addEventListener(what, fun, false);
		}
	}
	else if(navigator.IE){
		Memry.IE= navigator.IE= document.documentMode? document.documentMode:
		window.XMLHttpRequest? 7: 6; 
		Run.handler= function(who, what, fun){
			who.attachEvent('on'+what, fun);
		}
	}
	
	Group.prototype.merge= function(ob, force){
		var tem, p, force= force!== false;
		if(ob && ob.hasOwnProperty){
			for(p in ob){
				if(ob.hasOwnProperty(p)){
					tem= this[p];
					if(tem=== undefined || force) this[p]= ob[p];
				}
			}
		}
		return this;
	}
	Group.prototype.assignTo= function(ob, ob2, force){
		return this.merge.call(ob, ob2, force);
	}
	Run.assignTo(Array.prototype,{
		indexAt: function(what){
			var L= this.length;
			while(L){
				if(this[--L]=== what) return L;
			}
			return -1;
		},
		testEach: function(fun){
			var A= [], i= 0, itm, L= this.length;
			if(typeof fun== 'function'){
				while(i<L){
					itm= this[i];					
					if(fun(itm, i++)) A[A.length]= itm;
				}
			}
			return A;
		},
		unique: function(){
			var L= this.length, i= 0, A= [], tem;
			while(i<L){
				tem= this[i++];
				if((tem || tem===0) && A.indexAt(tem)== -1) A[A.length]= tem;
			}
			return A;
		}
	});
	Run.assignTo(String.prototype,{
		filename: function(ext){
			var f, s= this.replace(/\\/g,'/');
			s= s.substring(s.lastIndexOf('/')+ 1);
			f=  /^(([^\.#\? ]+)(\.\w+)?)/.exec(s);
			if(f){
				return ext? f[1]: f[2];
			}
			return '';
		},
		reSplit: function(d1, d2){
			d1= d1 ||  /;\s*/;
			d2= d2 ||  /\s*[=:]\s*/;
			var S= this.split(d1), M, ax, tem, O= {};
			while(S.length){
				tem= S.shift();
				M= tem.match(d2);
				if(M){
					ax= M.index;
					O[tem.substring(0, ax)]= tem.substring(ax+M[0].length);
				}
			}
			return O;
		},
		reval: function(){
			var M, N, O, Rx=/^(([a-zA-Z_$][\w\$]*\.?)+)/,
			s= this.replace(/(^['\s"]+|["\s']+$)/g,''),
			M= Rx.exec(s);
			if(M){
				N= M[1].split('.');				
				O= window[N.shift()];
				while(O && N.length) O= O[N.shift()];
			}
			if(!O){
				if(parseFloat(s)+''=== s) return parseFloat(s);
				if(/^(true|false)$/.test(s)) return !!(s=== 'true');
			}
			return O || s;
		},
		trim: function(){
			return this.replace(/^\s+|\s+$/g,'');
		},
		unique: function(del){
			if(del==undefined)del=  /;|, */;
			return (this.split(del)).unique();
		}
	}, false);

	Memry.merge({
		aka: new Group({
			hooWin: window, hooDoc: document,
			hooRoot: document.documentElement,
			hooHead: document.getElementsByTagName('head')[0]
		}),
		dob: +(new Date), dowhat: [],
		Edit: !location.host || location.host== 'localhost',
		errorLog: [], buildLog: [], idtag: 1, root: '/webworks/',
		savecook: ['LP','addSrc'], Shadow: {},
		trackevents: true
	},
	false);
	Memry.Rte= Memry.Rte || (function(){
		var s= Memry.root,
		L= location.href.replace(/\\/g,'/'),
		p= location.pathname.replace(/\\/g,'/'),
		ax= s? L.indexOf(s): -1;
		ax= (ax== -1)? L.indexOf(p)+1: ax+s.length;
		return L.substring(0, ax);
	})();
	
	Run.merge({
		addLink: function(url, atts){
			var hoo= 'link_'+url.filename(), def, el= Memry.aka[hoo];
			if(!el){
				url= Run.pathTrack(url);
				def={
					rel: 'stylesheet', type: 'text/css', media: 'screen', href: url
				}
				if(atts) Run.assignTo(def, atts);
				el= Run.newEl('link', def);
				if(Memry.buildLog) Memry.buildLog.push(hoo+'.css', true);
			}
			return Run.addtoHead(el, hoo);
		},
		addScript: function(url){
			var tem, atts, el, hoo= url.filename();
			if(Memry.update) url+= '?update'+Memry.dob;
			if(Memry.aka[hoo]) return Memry.aka[hoo];
			el= Run.newEl('script',{
				type: 'text/javascript', src: url
			});
			if(Memry.buildLog) Memry.buildLog.push(hoo+'.js', true);
			return Run.addtoHead(el, hoo);
		},
		addStyle: function(str, hoo){
			if(!hoo) hoo= 'style_'+(Memry.idtag++);
			str= str || '';
			if(str.indexOf('url(')!= -1) str= Run.pathCss(str);
			var el= Memry.aka[hoo] || Run.newEl('style',{
				type: 'text/css', media: 'screen'
			});
			if(el.styleSheet){
				if(el.styleSheet.cssText) str= el.styleSheet.cssText+'\n'+str;
				el.styleSheet.cssText= str;
			}
			else el.appendChild(document.createTextNode(str));
			return Run.addtoHead(el, hoo);
		},
		addtoHead: function(who, hoo){
			Memry.aka.hooHead.appendChild(who);
			if(typeof hoo== 'string') Memry.aka[hoo]= who;
			return who;
		},
		Engage: function(){
			if(Memry.loadfiles){
				Memry.loadlite= Memry.loadlite || true;
				//if(Memry.buildLog) Memry.buildLog.push('verify scripts');
				Run.loadLater();
			}
			else if(Memry.dowhat){
				setTimeout(function(){
					Run.fifo(Memry.dowhat);
				}, 0);
			}
		},
		getCooked: function(wch){
			var C= document.cookie, x, ck, p, tem, CO= {};
			if(!C) return '';
			if(!wch) wch= 'uPrefs';
			C= C.reSplit('',/\s*\=\s*/);
			for(x in C){
				if(wch=== true || wch=== x){
					ck= decodeURIComponent(C[x]);
					tem= ck.reSplit(/ *& */,/ *: */);
					for(p in tem){
						CO[p]= tem[p];
					}
				}
			}
			return CO;
		},
		fifo: function(what, time){
			time= time || 0;
			if(what && what.shift){
				var a= '', fx, f= what.shift() || '';
				if(f.constructor== Array){
					a= f[1] || '';
					f= f[0];
				}
				fx= Run.isFun(f);
				if(fx){
					if(typeof f!='string')f=fx.named();
					if(a.constructor== Array) fx.apply(this, a);
					else a? fx(a): fx();
					if(f && Memry.buildLog) Memry.buildLog.push(f); 
				}
				if(what.length){
					setTimeout(function(){
						Run.fifo(what);
					},
					time);
				}
			}
		},
		forgetit: {},
		isEmpty: function(obj){
			for(var p in obj){
				if(obj.hasOwnProperty(p)) return false;
			}
			return true;
		},
		isFun: function(fun){
			if(typeof fun== 'string') fun= fun.reval();
			return typeof fun== 'function'? fun: false;
		},
		isReady: {},
		loadLater: function(){
			if(Memry.loadtime==undefined) Run.first.pageload(1);
			if(Memry.loadfiles){
				var fun, tem= Memry.loadfiles.shift();
				if(Memry.loadfiles.length){
					Run.loadSrc(tem,'', Run.loadLater);
				}
				else{
					delete Memry.loadfiles;
					delete Memry.loadlite;
					Run.loadSrc(tem,'', Run.Engage);
				}
			}
		},
		loadSrc: function(url, init, cb){
			url= Run.pathJS(url);
			if(!url) return;
			var tem, state, atts, el, fn= url.filename(), fun;
			init= init || 'Run.isReady.'+fn;
			if(Memry.aka[fn]){
				fun= Run.isFun(init);
				if(fun){
					if(cb && fun()) fun= Run.isFun(cb);
					if(fun) return fun();
				}
			}
			if(Run.hotMsg) Run.hotMsg('loading... '+fn+'.js');
			el= Run.addScript(url);
			Memry.loadQ= Memry.loadQ || [];
			Memry.loadQ.push(init);
			if(cb) Memry.loadQ.push(cb);
			if(Memry.loadtime && !Memry.Qtimer) Run.readyQ();
			return el;
		},
		locate: function(url){
			url= url || document.URL;
			url= url.replace(/(\?|\#).*$/,'').replace(/\\/g,'/');
			return url.substring(Memry.Rte.length-1);
		},
		newEl: function(what, atts){
			what= document.createElement(what);
			var p;
			if(atts){
				for(p in atts){
					what[p]= atts[p];
				}
			}
			return what;
		},
		pathCss: function(s){
			var rx= /url *\((['"]?)(\.*\/)+/gi;
			return s.replace(rx,'url($1'+ Memry.Rte);
		},
		pathJS: function(url){
			var t= '';
			if(url.search(/^http\:/i)== 0) return url;
			if(url.indexOf('$$')== 0) url= '_scripts/'+url.substring(2);
			else if(url.indexOf('$')== 0) url= '_mr/confun/'+url.substring(1);
			else if(url.indexOf('/')== -1) url= '_mr/'+url;
			if(!/\.js$/.test(url)) url+= '.js';
			return Memry.Rte+ url+t;
		},
		pathTrack: function(url){
			if(url== undefined) return location.href;
			if(typeof url!= 'string') return '';
			url= url.replace(/\\/g,'/');
			if(url.indexOf('#')== 0 || (url.indexOf(location.protocol)== 0 || 
			/^(mailto|http)\: /i.test(url))) return url;
			if(url.indexOf('/')== 0) return Memry.Rte+url.substring(1);
			var L= Memry.Rte.length-1,
			Loc= location.href.replace(/\\/g,'/').replace(/\/[^\/]+$/,'');
			while(url.indexOf('../')== 0){
				Loc= Loc.replace(/\/[^\/]+$/,'');
				if(Loc.length<L) return '';
				url= url.substring(3);
			}
			return Loc+'/'+url;
		},
		quitPage: function(){
			var str= '', C, p;
			Memry.LP= Run.locate();
			C= new Group(Run.reCook());
			if(navigator.IE && Run.hot){
				for(p in Memry.Shadow){
					Run.hot.erase(p, true);
				}
			}
			Memry.savecook.testEach(function(tem){
				if(C[tem]!== Memry[tem]){
					str+= ';'+tem+'='+Memry[tem];
				}
			});
			if(str) Run.reCook(str,'uPrefs');
			return true;
		},
		readyQ: function(){
			var A, tem, temp= true, s, Q= Memry.loadQ || [];
			if(Memry.counter==undefined)Memry.counter=100;
   			--Memry.counter;
			while(Q.length && temp){
				tem= Q[0];
				temp= Run.isFun(tem);
				if(temp){
					if(typeof tem !='string')tem=temp.named();
					Q.shift();
					Memry.counter=100;
					temp();
					if(!/^Run\.(loadLater|isReady)/.test(tem) && Memry.buildLog){
						Memry.buildLog.push(tem);
					}
				}
			}
			if(Memry.counter==0)Q.shift();
			if(Q.length== 0){
				delete Memry.loadQ;
				delete Memry.Qtimer;
				if(Memry.scripts && Run.getScripts) Run.getScripts();
				if(Run.hotMsg) Memry.hotMsgTimer= setTimeout(Run.hotMsg, 300);
			}
			
			else Memry.Qtimer= setTimeout(function(){
				Run.readyQ();
			},
			100);
		},
		reCook: function(what, wch){
			if(!wch) wch= 'uPrefs';
			var str= '', rte= '/', exp, tem, cnt, p, d, C= Run.getCooked(wch);
			if(!what) return C;
			if(!C) C= {};
			if(/(\=)/.test(what) && self== top){
				what= what.reSplit();
				Run.assignTo(C, what);
			}
			else return C[what];
			for(p in C){
				if(C.hasOwnProperty(p)){
					var tem= C[p];
					if(p== 'rte') rte= tem;
					else if(p== 'exp') exp= parseInt(tem);
					else if(tem) str+= '&'+p+':'+tem;
				}
			}
			str= wch+'='+encodeURIComponent(str)+'; path='+rte;
			if(exp){
				d= new Date();
				d.setDate(d.getDate()+ exp);
				str+= '; expires='+d.toUTCString();
			}
			document.cookie= str;
			return str;
		},
		retrue: function(){
			return true;
		},
		sourceAka: function(what, prop){
			var srcA= [], who, hoo, i= 0;
			var A= document.getElementsByTagName(what);
			while(A[i]){
				who= A[i++];
				hoo= who.getAttribute(prop);
				if(!hoo) hoo= what+'_'+(i);
				else{
					if(/^script$/i.test(what)) hoo= hoo.filename();
					else hoo= what+'_'+ hoo.filename();
				}
				Memry.aka[hoo]= who;
				srcA.push(hoo);
			}
			return srcA;
		},
		toolbar: function(){
			if(Run.colorabra) Run.colorabra();
			else Run.loadSrc('mrhoobar.js','','Run.colorabra');
		}
	});
	
	Yankee.AJ= function(boo){
		var ob= window.XMLHttpRequest;
		if(ob) return boo=== true? /^http/i.test(location.protocol): new ob;
		return false;
	}
	Yankee.Timelog= function(str, lim){
		this.startT= +(new Date);
		this.timeline= [];
		this.num= 0;
		if(lim!== true) this.limit= lim || 8;
		str= str || 'Begin Timeline';
		this.timeline[0]= [this.startT, str];
		this.timeshow= false;
	}
	Yankee.Timelog.prototype.push= function(str, once){
		if(!str) return;
		var T= this.timeline, d= new Date().getTime(), tem, L= T.length, L2;
		if(once){
			L2= L;
			while(L2){
				tem= T[--L2];
				if(tem[1]== str) return true;
			}
			if(once=== 1){
				T.splice(1, 0, [0, str]);
			}
		}
		T[L]= [d, str];
		if(this.limit && T.length> this.limit){
			var x= T.length- this.limit;
			T.splice(1, x);
			this.num+= x;
		}
	}
	if(Run.handler){
		Run.first= new Group({
			config: function(env){
				var fun, s, css, str= Memry.IE? 'mrhoo_ie;': 'mrhoo;';
				if(env.reqJS) str+= env.reqJS;
				Memry.loadfiles= str.unique();
				if(env.startfun) Memry.dowhat= env.startfun.unique();
				Memry.merge(env);
				Memry.merge(Run.getCooked());
				Memry.addSrc= parseFloat(Memry.addSrc) || 0;
				if(Memry.addSrc){
					Memry.trackevents= true;
					if(Memry.addSrc> 1){
						if(Memry.LP && Memry.LP!= Run.locate()) Memry.addSrc= 1;
					}
				}
				Memry.errorLog= new Yankee.Timelog('Begin Error Logging');
				window.onerror= function(er){
					Memry.errorLog.push(er.message);
					return true;
				}
				if(Memry.trackevents){
					Memry.buildLog= new Yankee.Timelog(Run.locate(), true);
					s= Run.sourceAka('link','href');
					if(s.length) Memry.buildLog.push(s.join('.css; ')+'.css');
					s= Run.sourceAka('script','src');
					if(s.length) Memry.buildLog.push(s.join('.js; ')+'.js');
				}
				css= Memry.reqCss || (screen.width>900? 
				'/css/holidays.css': '/css/holiday.css');
				Run.addLink(css);
				if(Memry.sty) Run.addStyle(Memry.sty,'style_live');
				delete Memry.env;
				fun= (Memry.loadlite)? Run.loadLater: Run.Engage;
				Run.handler(window,'load', fun);
				
			},
			inf: function(env){
				var temp= location.search, exp, css,
				Rx=  /\b(nocode|runAny|update|track)\b/i,
				OK= Memry.IE!==6 && (window== top || !document.getElementsByName('requiretop').length);
				if(temp) temp= temp.match(Rx);
				if(!temp && document.cookie){
					temp= Run.reCook('loadx','xPrefs');
					if(temp && temp.match) temp= temp.match(Rx);
				}
				if(temp){
					temp= temp[0];
					if(/runAny/.test(temp)) OK= 'maybe';
					else if(/nocode/i.test(temp)) OK= false;
					if(/update/.test(temp)) Memry.update= true;
					if(/track/.test(temp)) Memry.trackEvents= true;
					exp= (OK)? -90: 90;
					Run.reCook('loadx= '+temp+';exp= '+exp,'xPrefs');
				}
				if(!OK){
					if(Memry.loadtime) Run.first.mrOff();
					else Run.handler(window,'load', Run.first.mrOff);
				}
				else if(env){
					Run.first.config(env);
				}
				return true;
			},
			mrOff: function(){
				var el, sp, atts={
					id: 'link_activate',
					href: location.href.replace(/\?.+$/,'')+'?runAny',
					title: 'Try the script?'
				}
				el= Run.newEl('a', atts);
				el.appendChild(document.createTextNode('Activate Page?'));
				document.body.appendChild(el);
				Run.handler(el,'click', function(){
					Run.reCook('loadx=runAny;exp=90','xPrefs');
				});
			},
			pageload: function(n){
				if(!Memry.loadtime){
					document.close();
					Memry.loadtime= +(new Date)-Memry.dob;
					Memry.buildLog.push('document loaded');
				}
				Memry.aka.hooBody= document.body;
			}
		});
		window.onunload= Run.quitPage;
		window.onload= Run.first.pageload;
		if(Memry.env) Run.first.inf(Memry.env);
	}
}