var I=0,nav={agent:navigator.userAgent.toLowerCase()},bot={tub:'cup',after:[],stak:[],
	mob:nav.agent.indexOf('dows ce')!=-1},W=window,ex=W.encodeURIComponent,WD=W.document,plugs={};
var T=true,F=false,rE=RegExp,loadf=fzz();
W.kile=fzz("b=typeof a=='string'?dge(a):a;return b?b.parentNode.removeChild(b):F");
W.dce=fzz("WD.createElement(a)",1);

function fzz(f,r){return new Function('a','b','c','d','e','f','g',(r==1?'return ':'')+(f||'F').toString())}

W.dge=fzz("WD.getElementById(a)",1);W.dr=fzz("dge(b).innerHTML=a",1);
W.cl0k=new Date();W.qw=fzz("a.split('\\t')",1);
W.clok=fzz("W.cl0k=new Date();return cl0k.getTime()/1000");

W.tof=function(a,b,c,d,e,f){
	if(a===null)return (c||b)=='z'&&'z';d=typeof a;
	if(typeof c!='undefined'){d=typeof a[b];if(d===null)return c=='z'&&'z';b=c}
	switch(d){case'number':d='n';break;case'boolean':d='b';break;case'string':d='s';break;case'object':d='o';if(typeof a.length=='number')d='a';else if(typeof a.readyState=='number')d='x';break;case'undefined':d='u';break;case'function':d='f';break}if(d=='f'||d=='o')if(typeof a.test=='function')d='r';return b?d==b:(d=='u'?false:d)
};

W.mat=fzz("if(tof(a,'s')){b=((b||'')+'').indexOf(a||'');return b?(b==-1?false:b):'^'}a=tof(a,'a')?a:[a.toString()];if(!tof(b||0,'s'))return false;for(var i in a)if(tof(a[0],'n')||a[i].length){var x=b.indexOf(a[i]);if((tof(a[0],'s')||x!=-1))a[0]=x}a=a[0];return a?(a==-1?false:a):'^'")
	
nav.OP=mat('opera',nav.agent);nav.op=nav.OP&&bot.mob;nav.IE=!(nav.OP)&&mat('msie',nav.agent);nav.SF=mat(['safari','konqueror'],nav.agent);nav.FF=!(nav.OP||nav.SF)&&mat('gecko',nav.agent)?1:0;
if(mat('firefox/3',nav.agent))nav.FF=3;nav.iP=mat('iphone',nav.agent);if(nav.iP)bot.mob=true;
if(nav.IE){if(/msie (\d)/.test(nav.agent))nav.IE=RegExp.$1}

W.sfx={frame:fzz()};

W.WD=W.document;
W.clone=fzz("b=tof(a,'o')?{}:[];for(c in a)b[c]=tof(a[c],'o')||tof(a[c],'a')?clone(a[c]):a[c];return b");
W.bios={mpress:0,fastwalker:true,maction:0,mover:0,mx:0,my:0,x1:0,y1:0,col:'D3CAB9',colin:fzz(),keydown:fzz(),keyup:fzz()};
W.lapz={a:[],delay:bot.mob?15:(nav.IE?38:15),time:1,last:clok(),scrolto:null}
W.eD='</div>';W.getIt=fzz([0],1);
W.dge=fzz("WD.getElementById(a)",1);
W.dgt=fzz("WD.getElementsByTagName(a)",1);
W.dgih=fzz("dge(a)?dge(a).innerHTML:''",1);
W.bcol=fzz("a=tof(a,'s')?dge(a):a;c=a.style.backgroundColor;if(tof(b,'s')&&c!=b){a.style.backgroundColor=b;c=b}return c;");
W.dr=function(c,e,after){
	if(!dge(e))return false;
	if(tof(after,'n'))switch(after){
		case 0:c=c+dgih(e);break;
		case 1:c=dgih(e)+c;break;
		case 2:c=c[0]+dgih(e)+c[1];break;
	}
	return dge(e).innerHTML=c
};
W.cthru=nav.SF?'rgba(0,0,0,0)':'transparent';
W.far=fzz("if(tof(a,'s')||!a)return far([a],b);else{if(!tof(a,'a'))a=[];do{a.push(c?0:'')}while(a.length<b)}return a");

if(nav.IE){bios.x1=WD.body.offsetWidth;bios.y1=WD.body.offsetHeight}
else{bios.x1=W.innerWidth;bios.y1=W.innerHeight}

W.xtend=fzz("if(typeof a=='string'){d=a.split('.');a=d.pop();if(typeof W[a]=='undefined')W[a]={};a=W[a];for(c in d)if(d.hasOwnProperty(c))a=a[d[c]]}if(tof(b,'a')||tof(b,'o'))for(c in b)if(b.hasOwnProperty(c))a[c]=b[c]");
// morg: infect a with object b, c flag stops overwrites
W.morg=fzz("for(e in b)if(tof(b[e],'o')){if(!a[e])a[e]={};morg(a[e],b[e],c)}else if(tof(b[e],'a')){if(!a[e])a[e]=[];morg(a[e],b[e],c)}else if(!c||tof(a,e,'u'))a[e]=b[e];");
W.obj=fzz("function F(){};F.prototype=clone(a);d=new F();if(b){for(c in b)d[c]=b[c]}return d");

xtend('mice',{x:0,y:0,but:0});

// move bgim
if(!bot.mob)lapz.a.push([7,function(){
	var i=dimz(dge('bgim'),'c');if(i===false)return;
	var p4=1.5,x=Math.tan((p4*2*mice.x/bios.x1)-p4);x=i-Math.floor(-(x+14)*0.4);
	if(x)dimz(dge('bgim'),'c',x<0?i+1:i-1);
}]);

W.WiN={
	mx:0,my:0,loaded:false,initjs:'',bsiz:3,sized:[], // onresize activated functions
	// table-layout:fixed
	css:"body{margin:0;border:0}table{border:0;border-collapse:collapse;border-style:none;border-width:0}td{vertical-align:top;padding:0}br{clear:both}.arv{cursor:n-resize}.nw{white-space:nowrap}.nwo{white-space:normal}.vh{visibility:hidden}\
		.bUt{cursor:"+(nav.IE?'hand':'pointer')+'}.tac{text-align:center}.tal{text-align:left}\
	.tar{text-align:right}.fr{float:right}.fl{float:left}.vm{vertical-align:middle}.vb{vertical-align:bottom}.vt{vertical-align:top}\
		.wide{width:100%}.high{height:100%}.oh{overflow:hidden}.oa{overflow:auto}.ov{overflow:visible}\
		.p2{padding:2px}.p20{padding:2px 0 0 2px}.p3{border:3px solid transparent}.p12{padding:12px}\
		.input{display:'+(nav.FF==1?'-moz-inline-box':'inline-block')+'}\
		.dib{display:'+(nav.FF==1?'-moz-inline-box':'inline-block')+'}\
		.prl{position:relative}.pab{position:absolute}.hid{display:none}.cb{clear:both}\
		.w{background-color:white}.l5{line-height:5px}.b{font-weight:bold}.ma{margin:auto}\
		.mah{margin:0px auto}.mav{margin:auto 0px}.cansel{font-weight:normal}\
		.o{background-color:orange}.sq{width:2px;height:2px}.z1{z-index:1}.z2{z-index:2}.z3{z-index:3}\
		.db{display:block}.arrow{cursor:default}.xh{cursor:crosshair}',

	resize:fzz("var w=0,h=0;if(nav.IE){if(window.innerHeight)h=window.innerHeight;else h=WD.documentElement.clientHeight;if(window.innerWidth)w=window.innerWidth;var w2=WD.documentElement.clientWidth;if(!w||w2&&w2<w){w=w2}kl.x1=w;kl.y1=h}"
		+"else{kl.x1=W.innerWidth;kl.y1=W.innerHeight};"
		+"bios.x1=kl.x1;bios.y1=kl.y1;for(i in kl.sized)kl.sized[i]();return [kl.x1,kl.y1]"
	),
	gotcss:false,
	addcss:function(sty){
		if(sty)return this.css+=sty;
		if(this.gotcss){
			if(nav.IE)dgt('HEAD')[0].lastChild.cssText=this.css;
			else dgt('HEAD')[0].lastChild.href='data:text/css;charset=utf-8,'+escape(this.css);
		}else{
			this.gotcss=true;
			if(nav.IE)WD.createStyleSheet().cssText=this.css;
			else{
				var ss=dce('link');
				ss.rel='stylesheet';ss.type='text/css';
				ss.href='data:text/css;charset=utf-8,'+escape(this.css);
				if(dgt('HEAD')[0])dgt('HEAD')[0].appendChild(ss); 
			}
		}
		return this.gotcss=true;
	}
};
W.small={reset:fzz()};
W.noscrypt=dgih('noscrypt');
W.kl=WiN;
// heidi: block/none an element
W.heidi=fzz("e=tof(a,'s')?dge(a):a;if(!e)return false;c='block';d='none';f=e.style.display;if(b==3)return f==d;return (e.style.display=b==2?(f==d?c:d):(b?c:d))==c");
// vize: visibility of an element
// (element,num):1=visible,2=hidden,3=switch
W.vize=fzz("e=tof(a,'s')?dge(a):a;if(!e)return false;c='visible';d='hidden';g=e.style.visibility;f=g==d?0:1;if(b==3)return f;return e.style.visibility=b==2?(g==d?c:d):(b?c:d)");
// ovre: visibility of overflow
// (element,num):1=visible,2=hidden,3=switch
W.ovre=fzz("e=tof(a,'s')?dge(a):a;if(!e)return false;c='visible';d='hidden';g=e.style.overflow;f=g==d?0:1;if(b==3)return f;return e.style.overflow=b==2?(g==d?c:d):(b?c:d)");
W.pad=fzz("a=a.toString();if(!c)c=c===0?0:' ';if(b>a.length)while(a.length<b){a=c+a}return a"); // pad a to length b with c

// sine/cosine lookups. Apparently Pi is in fact 3.144605512
W.s1ne=[];W.c0s=[];
fzz("a=256;while(a){a-"+"-;s1ne[a]=Math.sin(a*Math.PI/128);c0s[a]=Math.cos(a*Math.PI/128)}")();
// XXX need logs too!


W.opcss=fzz("a=nav.IE?'alpha(Opacity='+a+')':(a/100);if(!b)return bot.mob?'':(nav.IE?'filter:':'opacity:')+a+';';"
	+"if(bot.mob)return a;if(nav.IE)b.style.filter=a;else b.style.opacity=a;return a");

W.wylob={
	wiles:{},halt:fzz("if(wylob.wiles[a])wylob.wiles[a].halt=true;"),
	kill:fzz("if(wylob.wiles[a])wylob.wiles[a].endnow(true);"),
	defob:{
		id:'wyleto',to:0,inter:500,count:0,lifetime:10,halt:false,
		startf:'',testf:"return true;",endf:'',
		trytry:function(start,b){var me=wylob.wiles[this.id];
			if(start===true)me.count=0;if(me.halt)return;
			if(!me.count)fzz(me.startf)(me,start,b);fzz(me.trytrytxt)(me)
		},
		endnow:function(a){var me=wylob.wiles[this.id],ca=me.count;clearTimeout(me.to);if(!a)fzz(me.endf)(me,1);me.count=0;return ca},
		trytrytxt:"clearTimeout(a.to);a.count++;"
			+"if(a.lifetime)if(a.count>a.lifetime)return fzz(a.endf+'\\na.count=0;')(a,1);"
			+"if(fzz(a.testf+'\\nreturn false;')(a))return fzz(a.endf+'\\na.count=0;')(a,1);"
			+"a.to=setTimeout('wylob.wiles.'+a.id+'.trytry()',a.inter);return false;"
	},
	make:function(a,b,c,d){
		if(!tof(a,'o'))return;for(var o in a)this[o]=a[o];
		for(b in wylob.defob)if(typeof a[b]=='undefined'&&typeof this[b]=='undefined')this[b]=wylob.defob[b];
		this.go=fzz("d=wylob.wiles['"+this.id+"'];d.halt=false;d.trytry(!b,typeof a=='object'?a:null);");
		this.inter=Math.round(this.inter);
	}
};
W.wyle=fzz("b=new wylob.make(a);return wylob.wiles[a.id]=b");


W.onunload=fzz("for(a in wylob.wiles)clearTimeout(wylob.wiles[a].to);clearTimeout(lapz.scrolto)");
W.onresize=kl.resize;

W.dimz=function(e,t,s){
	// get+set DIV properties related to position, size and scroll
	if(!e)return false;switch(t){
		case 'p':s=s||s===0?(s=e.scrollLeft  =parseInt(s)):e.scrollLeft;  break;	// scroll Pixels-x
		case 'P':s=s||s===0?(s=e.scrollTop   =parseInt(s)):e.scrollTop;   break;	// scroll Pixels-y
		case 'd':s=s&&(s!=parseInt(e.style.width))?(s=e.style.width=parseInt(s)+'px'):(e.style.width.indexOf('px')!=-1?e.style.width:e.offsetWidth);break; // width Dimension of DIV
		case 'D':s=s&&s!=parseInt(e.style.height)?(s=e.style.height=parseInt(s)+'px'):(e.style.height.indexOf('px')!=-1?e.style.height:e.offsetHeight);break; // height Dimension of DIV
		case 'c':s=s||s===0?(s=e.style.left	=parseInt(s)+'px'):getIt(e);break;				// left Co-ord
		case 'C':s=s||s===0?(s=e.style.top	=parseInt(s)+'px'):getIt(e,1);break;			// top  Co-ord
		case 'S':s=e.scrollHeight;break;														// Scrollarea-height - getter only
		case 's':s=e.scrollWidth; break;														// Scrollarea-width  - getter only
		case 'o':s=e.offsetWidth; break;														// Offset-width  - getter only
		case 'O':s=e.offsetHeight;break;														// Offset-height - getter only
		//case 'z':s=s||s===0?(s=e.style.opacity=s):e.style.opacity;break;					// opacity
		//case 'Z':s=s||s===0?(s=e.style.zIndex=s):e.style.zIndex;break;						// Zindex
		
		case 'r':s=s||s===0?(s=e.style.left  =parseInt(s)):e.offsetLeft;  break;	// left relative Co-ord
		case 'R':s=s||s===0?(s=e.style.top   =parseInt(s)):e.offsetTop;   break;	// top  relative Co-ord
		
		case 'b':s=s||s===0?(s=e.style.backgroundPosition=s):e.style.backgroundPosition;return s;break; // backgroundOffset
	}
	return parseInt(s)||0
};

W.getIt=function(a,b,c,d,e,f,g){
	if(tof(a,'s'))a=dge(a);if(tof(b,'s')){if(b.length==1)return [dimz(a,b,c)];
	d=b.split('');e=b.length;c=far(c,e);while(e){e--;c[e]=dimz(a,d[e],c[e])}}
	else{g=0;d=0;
		f=a;while(f){g+=f.offsetLeft;d+=f.offsetTop;f=f.offsetParent};
		f=a;while(f.offsetParent){f=f.parentNode;g-=f.scrollLeft;d-=f.scrollTop};
		if(a)c=b?(d||parseInt(a.style.top)):(g||parseInt(a.style.left));
	}return c
};

W.jareas={};
xtend('jarea',{
	// create scrollarea
	hov:0,barz:bot.mob,
	draw:function(a,b,c){
		if(!jarea.hov)jarea.hov=a.id;
		b=a.olay||'';b=b?'<div class="pab" style="z-index:3">'+b+eD:'';
		var myh=a.h=='see'?bios.y1+'px':a.h;
		if(/^\d+$/.test(''+a.h))a.h+='px';
		c=b+'<div id="scr_h_'+a.id+'" class="'+(a.h=='see'?'seehi ':'')
			+'prl o'+(jarea.barz?'a':'h')+(a.al?' r':'')+'"'
			+(a.w||a.h
				?(' style="'+(a.mh?'min-height:'+a.mh+'px;':'')+(a.w?'width:'+(a.w==1?'100%':a.w)+';':'')+(a.h?'height:'+myh+';':'')+'"')
				:'')
			+'>'+'<div style="'+(a.mh?'min-height:'+a.mh+'px;':'')
			+'" class="tac vm" id="scr_c_'+a.id+'"'+(a.x||'')+'>'+a.html+eD+eD
		return c // b||1?'<div id="scrAG_'+a.id+'" class="prl" style="overflow:visible">'+c+eD:c
	},
	dr:function(a,b,c){
		if(dr(a,'scr_c_'+b)){jarea.move(b,1,0,0);return false}
		else return a;
	},
	// see if we are hovering over a particular area
	miced:function(a,b,c,d){
		var pO=dge('scr_h_'+a.id),pI=dge('scr_c_'+a.id);
		if(pO&&pI){
			var dimO=getIt(pO,'cCoO'),dimI=getIt(pI,'cCsS');
			var pc=[(mice.x-dimO[0])/dimO[2]-0.5,(mice.y-dimO[1])/dimO[3]-0.5];
			if(!(pc[0]>=-0.5&&pc[0]<0.5&&pc[1]>=-0.5&&pc[1]<0.5))
				return 0;
			d=pc[0]*1.1;pc[0]=pc[0]>0?Math.min(0.499,d):Math.max(-0.499,d);
			d=pc[1]*1.1;pc[1]=pc[1]>0?Math.min(0.499,d):Math.max(-0.499,d);
			pc[0]+=0.5;pc[1]+=0.5;
			a.mx=pc[0];a.my=pc[1];
			return true
		}return false
	},
	// move around a scrollarea
	move:function(a,t,x,y,gf){
		if(tof(a,'s'))if(jareas[a])a=jareas[a];else return false;
		if(gf)jarea.getfresh(a);
		if(tof(x,'n'))a.mx=x;if(tof(y,'n'))a.my=y;		
		var pO=dge('scr_h_'+a.id),pI=dge('scr_c_'+a.id);
		switch(t){
			// velocity delta
			case 0:a.sx+=a.vx;a.sy+=a.vy;
				jarea.getfresh(a,'pP',[parseInt(a.sx),parseInt(a.sy)],1);break;	
			// % jumpto
			case 1:
				a.sx=parseInt(a.sw*a.mx);
				a.sy=parseInt(a.sh*a.my);
				jarea.getfresh(a,'pP',[a.sx,a.sy],4);break;
			// % jumpto - Y only
			case 5:
				a.sy=parseInt(a.sh*a.my);
				jarea.getfresh(a,'P',[a.sy],1);break;
			// px jumpto
			case 4:jarea.getfresh(a,'pP',[x,y],1);break;
			// speed linked to mouse
			case 2:a.sx+=8*c0s[parseInt(127-127*a.mx)];a.sy+=8*c0s[parseInt(127-127*a.my)];
				jarea.getfresh(a,'pP',[a.sx,a.sy],1);break;
			// velocity set
			case 3:a.vx=x;a.vy=y;jarea.getfresh(a,'pP',[parseInt(a.sx+a.vx),parseInt(a.sy+a.vy)],1);break;	
		}
		return true
	},
	// MOVE WITHIN A SCROLLAREA
	getfresh:function(a,from,to,update){
		var pO=dge('scr_h_'+a.id),pI=dge('scr_c_'+a.id);
		if(!pO)return false;
		if(to){getIt(pO,from,to);a.sx=pO.scrollLeft;a.sy=pO.scrollTop}
		else update=true
		if(update){
			var dimO=getIt(pO,'cCoOsS');
			a.l=dimO[0];a.t=dimO[1];
			a.sw=dimO[4]-dimO[2];a.sh=dimO[5]-dimO[3];
			a.px=a.sx/a.sw;a.px?1:a.px=0;a.py=a.sy/a.sh;a.py?1:a.py=0;
			if(Math.abs(a.vx)<0.1)a.vx=0;if(Math.abs(a.vy)<0.1)a.vy=0;
		}return true
	},
	protostar:function(a){ // outer, inner dims, x, y scroll, scroll w,h, velocity x,y,
		var b={
			on:false,c:'',x:'',html:'',sx:0,sy:0,sw:0,sh:0,vx:0,vy:0,
			mice:false,px:0,py:0,lock:1,w:0,h:0,olay:'',cutoff:[0.15,0.15],
			friction:0.9,accel:1.2,transport:2,mx:0,my:0,mh:0
		};
		morg(b,a);
		if(a.cutoff)if(tof(a.cutoff,'n'))b.cutoff=[a.cutoff,a.cutoff];
		return b
	},
	frame:function(aa,bb){
		var cc=aa.id||'area_';
		if(!jareas[cc]){aa.id=cc;jareas[cc]=jarea.protostar(aa)}
		else if(tof(aa,'html','s'))jareas[cc].html=aa.html;
		return jarea.draw(jareas[cc])
	}
});

bios.onesec=lapz.delay*0.36;
// scrolling happens every frame
bios.lapframe=function(force,b,c){
	var notyet=true;if(!jarea.barz)for(var sil in jareas){
		var ms=jareas[sil];
		// do not check every time - this is CPU hungry	
		if(ms.lock!=-1){ // not locked
			if(!(c%ms.lock))ms.mice=jarea.miced(ms);
			if(ms.mice||force){ // within this area
				if(notyet){bios.sarea=sil;notyet=false}
				if(!ms.transport){
					var co=Math.abs(ms.mx-0.5);
					if(co>ms.cutoff[0])ms.vx+=ms.accel*(c0s[parseInt(127-127*(ms.mx||0))]);
					else if(ms.cutoff[0]!=1)ms.vx*=ms.friction;
					co=Math.abs(ms.my-0.5);
					if(co>ms.cutoff[1])ms.vy+=ms.accel*(c0s[parseInt(127-127*(ms.my||0))]);
					else ms.vy*=ms.friction;
				}
				jarea.move(ms,ms.transport||0);
				ms.lock=1;
				// 										make sure each area is scrolled to where it should be
				if(!(c%7)){ //				but only now and then
					var pO=dge('scr_h_'+ms.id),pI=dge('scr_c_'+ms.id),x=parseInt(ms.sx),y=parseInt(ms.sy);
					if(pO)if((x!=pO.scrollLeft||y!=pO.scrollTop))jarea.getfresh(ms,'pP',[x,y]);
					if(ms.mice)jarea.getfresh(ms);
					if(ms.vx<0&&ms.sx<1)ms.vx=0;else if(ms.vx>0&&ms.sx>ms.sw-1)ms.vx=0;
					if(ms.vy<0&&ms.sy<1)ms.vy=0;else if(ms.vy>0&&ms.sy>ms.sh-1)ms.vy=0;
				}
			}else{ms.on=false;if(ms.lock<9)ms.lock++}
		}
		if(notyet&&(ms.vx||ms.vy)){ // area has scroll velocity
			// jarea.move(ms,0);ms.vx*=ms.friction^(Math.abs(ms.vx));ms.vy*=ms.friction^(Math.abs(ms.vy))
			jarea.move(ms,0);ms.vx*=ms.friction;ms.vy*=ms.friction;
		}
	}
};


var zend="return(a.zv=e.vx=e.vy=0)||true;";
xtend('imyg',{
	viewing:0,zFact:0,zLev:2,w:0,h:0,name:'imyg',iname:'',
	place:function(){
		var a=dge('maini1')||{};
		if(a.height&&a.complete){
			imyg.w=a.width;imyg.h=a.height;var porty=imyg.h>imyg.w;imyg.phito(porty?2:1);
			vize(a,1);kile('lodin');
		}else setTimeout("imyg.place()",99)
	},
	see:function(a,b){
		if(!imyg.viewing)return 'no hologram loaded.';		
		imyg.zLev=0;imyg.resizeok=0;imyg.iname=imyg.viewing;
		imyg.iname=imyg.iname.replace(/^.+\/([^\/]+)$/,'$1').replace(/\.\w+$/,'');
		dr('loading '+(imyg.iname.substr(0,43))+'...','iname');
		//if(dge('maini1')){imyg.load();return false}
		//return '<img id="maini1" class="ma high" src="'+imyg.viewing+'" />';
		setTimeout("imyg.place();",99);
		return jarea.frame({id:'screen_',html:'<div id="lodin" class="pab">loading...</div><img style="visibility:hidden" id="maini1" src="'+imyg.viewing+'" />',
			cutoff:0.3,w:'100%',h:b||'500px'
		})
	},
	zoomer:wyle({id:'imygzm',inter:60,lifetime:60,zv:0,zf:0,zc:0,
		startf:"e=jareas.screen_;if(e){e.friction=1;e.lock=-1}",
		testf:"e=jareas.screen_;if(!e||!dge('maini1'))return true;"
			+"a.zv+=imyg.zFact;imyg.zFact=0;a.zv+=a.zc;if(Math.abs(a.zv)<1)"+zend
			+"e=getIt('maini1','dD',true);c=(e[1]/e[0]);b=a.zv*c;f=getIt('scr_h_screen_','oOpP',true);"
			+"if((e[0]<f[0]&&e[1]<f[1])&&a.zv<0){"+zend+"}"
			+"e[0]+=a.zv;e[1]+=b;e[2]=(e[1]<bios.y1)?(bios.y1-e[1])/2:0;e[3]=(e[0]<f[0])?(f[0]-e[0])/2:0;"
			+"d=jareas['screen_'];d.sx=f[2]+a.zv/2;d.sy=f[3]+b/2;"
			+"getIt('maini1','dDCc',e);getIt('scr_h_screen_','pP',[d.sx,d.sy]);"
			+"a.zv*=0.55;",
		endf:"e=jareas['screen_'];e.friction=0.7;e.lock=0;"
	}),
	zoom:fzz("if(!dge('maini1'))return false;imyg.zFact=a;imyg.zoomer.go(0,true);return false"),
	phito:function(newzoom,dest){ // re-fit photo to new dimensions
		if(!imyg.viewing)return;
		if(!dest)dest=dge('maini1');
		var prix=imyg.w,priy=imyg.h;
		if(tof(newzoom,'n'))imyg.zLev=newzoom;else if(newzoom)imyg.zLev=priy>prix?2:1;
		
		jareas['screen_'].sx=jareas['screen_'].sy=0;
		if(!prix||!priy){prix=getIt('scr_h_screen_','dD',true);var priy=prix[1];prix=prix[0]}
		var sprite=500 // priy; // dimz(dge('sEA-imyg_image'),'D');
	//	var sprite=see.hite;if(dge('sEA'))sprite=dge('sEA').firstChild.offsetHeight;
		switch(imyg.zLev){
			case 1:				// fix width to x1
				var xof=0,w=dimz(dge('scr_h_screen_'),'o'),h=priy*(w/prix);
				if(h>sprite){xof=(w-(w*sprite/h))/2;w*=sprite/h;h*=sprite/h;}
				var offs=(h<sprite)?(sprite-h)/2:0;
				getIt(dest,'dDcC',[w,h,xof,offs]);
				getIt('scr_h_screen_','pP',[0,0]);
				break;
			case 2:				// fix height to y1
				var w=prix*(sprite/priy);
				offs=dimz(dge('scr_h_screen_'),'o');offs=(w<offs)?(offs-w)/2:0;
				getIt(dest,'DdCc',[sprite,w,0,offs]);
				getIt('scr_h_screen_','pPD',[0,0,sprite]);
				break;
			case 0:					// 100% 
				if((dimz(dest,'d')!=prix || dimz(dest,'D')!=priy)){
					getIt(dest,'dDcC',[prix,priy,prix/2,priy/2])
					getIt('scr_h_screen_','pPD',[0,0,sprite])
				}
		}
	}
});


if(!bot.mob)WD.onmousemove=function(e){e=e?e:window.event;var from=e.target||e.srcElement;
	mice.x=nav.IE?e.clientX+WD.body.scrollLeft:e.pageX;
	mice.y=nav.IE?e.clientY+WD.body.scrollTop:e.pageY;};

// all repeated page updates should be stuck in the laps array - and will execute at specified intervals
// set larger intervals for less time-critical and more complex updates

lapz.trig=function(){
	clearTimeout(lapz.scrolto);
	if(++lapz.time==361){lapz.time=1;bios.onesec=clok()-lapz.last;lapz.last=clok();
		var pa=parseInt(lapz.delay*36)/bios.onesec;
		if(pa>50&&lapz.delay>11)lapz.delay-=3;else if(pa<27&&lapz.delay<99)lapz.delay+=3;
	}
	if(lapz.time%2)bios.lapframe();
	var la=lapz.a.length;while(la--)if(!(lapz.time%lapz.a[la][0]))lapz.a[la][1](la-0,lapz.a[la][0]-0,lapz.time-0);
	lapz.scrolto=setTimeout('lapz.trig()',lapz.delay)
};
// now we have a lap!
lapz.trig();





