
var mtrx,mtx1,vwrN,O,DOC,DOCELM;bowOK=1;segmentSequActive=0;var RepositL,Gh=0,Gi=0,Gj=0,Gk=0;var tmout_0,tmout_1,tmout_2,tmout_3,tmout_4,tmoupRbgt_5,timr_0,timeDormant=0,pulseDormant=10,timeSpent=0,mseJokOpacUp=0,rdy;var chceMoveMark,movedMark,moveMarkHooked=-1;var nOfItm=0,preLdPtr=-1,preLdDecPtr,preLdTmSpot,preLdOK=1;preLdTmGap=ffx?1600:100;loadListID=new Array();loadListFile=new Array();loadListTile=new Array();
subplateRLpos=0;
function init(){
	DOC=document;
	DOCELM=DOC.documentElement;
	noSelect(DOC.body);
	if(useTask)timr_0=setInterval("task()",2000);
}
function init2(sct){
	if(useMseJok){mseJok=getEl("mouseJokey");if(noMouseJokey)offMseJok();}
	if(showIndicators){getEl("INDTBL").style.display="inline";indMse=getEl("INDIC_MOUSE");indDist=getEl("INDIC_DIST");}

	Gi=1;Gj=0;hdNNrW=sct; //alert("init2  "+sct);
	if(preloadON)setPreload(sct);
	if(startWithAnim){rdy=1;strtAni(sct,0,0,0.5);setTimeout("sctW=-1;",50);}
}
function isIN(arr,v){
	var L=eval(arr+".length");
	for(var i=0;i<L;i++){if(eval(arr+"["+i+"]")==v)return 1;}
	return 0;
}
function getAt(o,a){return DOC.getElementById(o).getAttribute(a)}
function setAt(o,a,v){DOC.getElementById(o).setAttribute(a,v)}
function getAtInt(o,a){return parseInt(DOC.getElementById(o).getAttribute(a))}
function getAtFlt(o,a){return parseFloat(DOC.getElementById(o).getAttribute(a))}
function getChNodesNO(O){return O.childNodes.length}
function getEl(o){return DOC.getElementById(o)}
function actRegul(cmd,param){eval("if("+cmd+"ON){clearInterval("+cmd+"TMO);"+cmd+"ON=0;}");eval(cmd+"("+param+");");}
function Sho(o){DOC.getElementById(o).style.display="inline";}
function Hid(o){DOC.getElementById(o).style.display="none";}
function getOpac(ob){var r,p;o=getEl(ob);if(o){if(ie){return o.style.visibility=="hidden"?0:1;}else return parseFloat(o.style.opacity);}}

function varyOpac(o,stl,ndl,v){
	if(objTransLst.indexOf(o)>-1){
		stl+=v;
		if((v>0&&stl>ndl)||(v<0&&stl<ndl))stl=ndl;
		setOpac(o,stl);
		if(stl==ndl){
			objTransLstRemov(o);
			return;
		}
		setTimeout("varyOpac('"+o+"',"+stl+","+ndl+","+v+")",Mpulse);
	}else{
		if(sctW<0||Prsrvd[sctW].indexOf(o)<0)setOpac(o,0);
	}
}

function setOpac(ob,v){
	o=getEl(ob);
	if(o){
		if(ie){
			if(!o.style.filter){
				o.style.filter='alpha(opacity='+(v*100)+')';
			}
			else{
				if(o.style.filter.indexOf("blendTrans")!=-1){
					if(v==1||v==0)o.style.visibility=v?"visible":"hidden"; else alert("style.filter applied to "+ob+" is reserved for blendTrans on IE.\nDo not apply opacity to a blendTransed object (animations)");
				}
				else{
					o.style.filter='alpha(opacity='+(v*100)+')';
				}
			}
		}else{
			o.style.opacity=""+v;
			o.style.visibility=(v==0)?"hidden":"visible";
		}
	}
}

function IEshow(o,d){
	stopTrans0(o);
	var oo=getEl(o);
	oo.style.filter="blendTrans(duration="+d+")";
	oo.filters.item(0).apply();
	oo.style.visibility="visible";
	oo.filters.item(0).play();
}
function show(o,d){
	if(d){
		objTransLstAppend(o);
		if(ie)IEshow(o,d); else varyOpac(o,getOpac(o),1,Mpulse/d*1000);
	}else setOpac(o,1);
}
function IEhide(o,d){stopTrans0(o);var oo=getEl(o);if(oo){oo.style.filter="blendTrans(duration="+d+")";oo.filters.item(0).apply();oo.style.visibility="hidden";oo.filters.item(0).play();}}

function hide(o,d){
	if(d){
		objTransLstAppend(o);
		if(ie)IEhide(o,d); else varyOpac(o,getOpac(o),0,Mpulse/d*1000);
	}else setOpac(o,0);
}

function stopTrans0(o){var ob=getEl(o);if(ob&&ob.style.filter)ob.filters.item(0).stop();}
function toTop(o){var nd=getEl(o);nd.parentNode.appendChild(nd);nd=getEl("moveMarksAll");nd.parentNode.appendChild(nd);}
function sgn(n){return(n!=0)?n/Math.abs(n):1;}
function rndSgn(){return Math.round(Math.random())*2-1}
function inArrayAt(s,ar,ptr){if(!ptr)ptr=0;var fnd=0;while(ptr<ar.length&&!fnd){if(ar[ptr]==s)fnd=1;else ptr++;}
if(!fnd)ptr=-1;return ptr;}
function G(o){document.getElementById(o).style.visibility="hidden";}
function H(o){var ob=document.getElementById(o);ob.style.visibility="hidden";if(ie)ob.style.filter='alpha(opacity=0)';else ob.style.opacity=0;}
function noSelect(o){if(typeof o.onselectstart!="undefined")o.onselectstart=function(){return false};else o.onmousedown=function(){return false};}
function task(){if(!ie && window.getSelection().getRangeAt!="undefined") window.getSelection().removeAllRanges();}
pulse=40;distBowedFactor=.3333;var distX,distY,segmentSequActive,sSeq_cntr,sSeqMid;var msex,msey,MOUSEx=500,MOUSEy=350,MOUSExMem=MOUSEx,MOUSEyMem=MOUSEy,KeyUsed,keyMarkON=0,mseMarkON=0;var distBowed=0,bowed="!";var profiles=[];profiles[0]=[0.1,0.2,0.4,0.8,1.6,3.2,3.2,3.2,3.2,3.2,3.2,3.2,3.2,3.2,3.2,2.16,1.6,1.08,0.8,0.54,0.4,0.27,0.2,0.14,0.1];profiles[10]=profiles[0];for(i=1;i<profiles[0].length;i++)profiles[0][i]+=profiles[0][i-1];profiles[1]=[0.1,0.2,0.4,0.8,1.6,3.2,3.2,3.2,3.2,3.2,2.16,1.6,1.08,0.8,0.54,0.4,0.27,0.2,0.14,0.1];profiles[11]=profiles[1];for(i=1;i<profiles[1].length;i++)profiles[1][i]+=profiles[1][i-1];profiles[2]=[0.1,0.2,0.4,0.8,1.6,2.16,1.6,1.08,0.8,0.54,0.4,0.27,0.2,0.14,0.1];profiles[12]=profiles[2];for(i=1;i<profiles[2].length;i++)profiles[2][i]+=profiles[2][i-1];profiles[3]=[0.1,0.4,1.6,3.2,1.6,0.4,0.1];profiles[13]=profiles[3];for(i=1;i<profiles[3].length;i++)profiles[3][i]+=profiles[3][i-1];profiles[4]=[0.4,1.6,3.2,1.6,0.4,0.1];profiles[14]=profiles[4];for(i=1;i<profiles[4].length;i++)profiles[4][i]+=profiles[4][i-1];profiles[5]=[0.1,0.4,1.6,3.2,1.6,0.4,0.1,0];profiles[6]=[0.1,0.2,0.4,0.8,1.6,3.2,3.2,1.6,0.8,0.4,0.2,0.1,0];profiles[7]=[0.1,0.2,0.4,0.8,1.6,2.4,2.8,3.0,3.0,3.0,3.0,3.0,2.8,2.4,1.6,0.8,0.4,0.2,0.1,0];profiles[8]=[0.1,0.2,0.4,0.8,1.6,3.2,4.8,6.4,7.2,7.6,7.8,7.8,7.8,7.8,7.6,7.2,6.4,4.8,3.2,1.6,0.8,0.4,0.2,0.1,0];profiles[9]=[0.2,0.8,1.6,2.0,2.2,2.2,2.2,2.0,1.6,0.8,0.2,0];profiles[20]=[0.4,0];profiles[21]=[0];var aos,MovON,ShftBgON,BgDH,BgDV,BgTH,BgTV,BgX,BgY,mxd,myd,dact,clck,mom,nOfAT,nOfAO,nOfEAObj,reconst,reintAt,reintReq,prevmom,objOff="",objOn="",vdoCurs="",objTransLst="",objonLst="",endLp=0;var scrllMemX,scrllMemY,imgFreeScrll=0,strtFreeScrll,strtAdjTop,strtAdjLeft,scrllRef,scrllByCSS,scrllXlim,scrllYlim,DX,DY,NX,NY;var scrllClipW,scrllClipH,scrllImgpW,scrllImgpH,scrllOfL,scrllOfR,scrllOfT,scrllOfB,scrllXbak,scrllYbak,pRlit=-1;var flashTm=700,pauseF,flashR=0;var XbuttClkd=0,slidRpos,pRballR,useSlidR,progrL,progrT,slidRra,slidRtml,memoTml,injumped=0,scrllMagn=40;SMD=[0,0,0,0];lpON=0
vdoRun=0;
var sctrON,animON,prevSctrON;
showSpd=.5;
hideSpd=.5;
Mpulse=25;
Mpulsx8=25*8;
spdup=1;
if(ie)spdup=.77;
if(mac)spdup=.90;
sctW=-1;
AO=new Array();
EA=new Array();
objPopul=new Array();
MOref=new Array();
OST=new Array();
function setPreload(sct){
	var i,j,k,s,a,ni,ti,o,oim=null,lq,p;
	ldo[0]=sct;
	j=1;
	for(i=0;i<LdOrdr.length;i++){
		k=LdOrdr[i];
		if(k!=sct)ldo[i+j]=k; else j=0;
	}

	for(i=0;i<LdOrdr.length;i++){
		s=ldo[i];
		for(j=0;j<TL[s].length;j++){
			ni=parseInt(getData(TL[s][j],"|")/13);
			TLpreld[s][j]=nOfItm;
			for(k=0;k<ni-1;k++){
				a=aos[k*13+1];
				if(a&&inArrayAt(a,loadListID,0)<0){
					o=getEl(a);
					if(o==null)alert("null object : "+a+"   at line"+k);
								//if(o.id.substr(0,2)=="rC")alert(o.id);
					if(o.className.substr(0,4)=="clip"){
						oim=divContRef(o);
						if(oim.tagName!="IMG")oim=divContRef(oim);								
										//if(oim.id.substr(0,2)=="rC")alert(oim.id);
						ti=-1;
						while(oim&&oim.tagName=="IMG"){
							ti++;
							if(oim.title!=""&&inArrayAt(oim.title,loadQ00,0)<0){
								loadListID[nOfItm]=o.id;
								loadListFile[nOfItm]=oim.title;	
								loadListTile[nOfItm]=ti;
								if(oim.alt){
									p=oim.alt.lastIndexOf(" */");
									if(p>-1)oim.alt=oim.alt.substr(p+3);
									oim.title=oim.alt;
								}else oim.title="";
								oim.onload=sendPreload;
								nOfItm++;
							}
							if(oim.nextSibling.nextSibling){
								oim=oim.nextSibling.nextSibling;
							}else oim=null;
						}
					}
				}
			}
		}
	}
	preLdDecPtr=nOfItm;
	if(!startWithAnim)preload();
	var imgs=DOC.getElementsByTagName('img');
	for(i=0;i<imgs.length;i++){
		if(imgs[i].alt&&(p=imgs[i].alt.lastIndexOf(" */"))>-1)imgs[i].alt=imgs[i].alt.substr(p+3);
	}
}
function sendPreload(){
	CLOCK=new Date();
	var tm=CLOCK.getTime();
	var tms=tm-preLdTmSpot;
	if(tms>preLdTmGap){
		preLdTmSpot=tm;
		preload();
	}else setTimeout("preLdTmSpot+=preLdTmGap;preload();",preLdTmGap-tms);
}
function preload(){if(preLdDecPtr>0){var i,o,oim;preLdPtr++;if(preLdPtr<nOfItm){if(loadListID[preLdPtr]!=""){o=getEl(loadListID[preLdPtr]);oim=divContRef(o);if(oim.tagName!="IMG")oim=divContRef(oim);if(loadListTile[preLdPtr])for(i=0;i<loadListTile[preLdPtr];i++)oim=oim.nextSibling.nextSibling;

//alert(loadListFile[preLdPtr]);

oim.src=loadListFile[preLdPtr];

		if(oim.id.substr(0,4)=="deco")alert(oim.id+"  "+oim.src);

loadListID[preLdPtr]="";
preLdDecPtr--;
}else{preload();}}else preLdPtr=-1;}}
function setAttrOST(toSct,anim){
	var s,a,b,j,k,f,oNr,o,oim;
	var list=new Array();
	if(XbuttClkd&&dimrOblig[toSct]<1){
		var adLi="pRbgK||0|0|0|1||||||0|0|";
		var pRbgKPos=TL[toSct][anim].indexOf('pRbgK');
		if(pRbgKPos>-1){
			for(var i=1;i<13;i++)pRbgKPos=TL[toSct][anim].indexOf('|',pRbgKPos+1);
			pRbgKPos++;
			var s1=TL[toSct][anim].substr(0,pRbgKPos);
			var s2=TL[toSct][anim].substr(pRbgKPos);
			TL[toSct][anim]=s1+adLi+s2;
		}
	}
nOfAO=parseInt(getData(TL[toSct][anim],"|")/13);for(k=0;k<nOfAO-1;k++){f=0;a=aos[k*13+1];if(list.length==0){if(a){list[0]=a;aos[k*13+2]=0;}else alert("The ON object name is absent on the layout's first line of animation "+anim+" of section "+toSct);}else{if(a){for(j=0;j<list.length;j++){if(a==list[j]){f=1;aos[k*13+2]=j;break;}}
if(!f){aos[k*13+2]=list.length;list[list.length]=a;}}else aos[k*13+2]=-1;}}
f=0;for(k=0;k<nOfAO-1;k++){if(a=aos[k*13]){if(a&&a.charAt(0)!="@"){if(!getEl(a))alert("setAttrOST : OFF object "+a+" of line "+k+" is absent in the layout of animation "+anim+" of section "+toSct);}}
if(a=aos[k*13+1]){b=aos[k*13+2];if(b>=0){if(!OST[b])OST[b]=new Array();oNr=parseInt(b);}
if(getEl(a))o=getEl(a);else{alert("setAttrOST : ON object "+a+" of line "+k+" is absent in the layout");return;}
if(Prsrvd[toSct].indexOf(a)<0||sctrON==0)o.setAttribute('isON',0);OST[oNr][0]=0;o.setAttribute('X',o.style.left);OST[oNr][1]=parseInt(o.style.left);o.setAttribute('Y',o.style.top);OST[oNr][2]=parseInt(o.style.top);if(o.style.width){o.setAttribute('W',o.style.width);OST[oNr][3]=parseInt(o.style.width);}
if(o.style.height){o.setAttribute('H',o.style.height);OST[oNr][4]=parseInt(o.style.height);}
if(o.className.substr(0,4)=="clip"){oim=divContRef(o);s=oim.style.left+" "+oim.style.top;oim.style.cursor="default";o.setAttribute('BGpos',s);OST[oNr][5]=parseInt(oim.style.left);OST[oNr][6]=parseInt(oim.style.top);}
OST[oNr][7]=a;if(ie)o.style.filter="blendTrans(duration=0.5)";}}}
function reinitOST(){var s,oNr,o;for(oNr=0;oNr<OST.length;oNr++){o=getEl(OST[oNr][7]);if(ie&&o.filters.item("blendTrans").status>0)o.filters.blendTrans.stop();if(Prsrvd[sctrON].indexOf(OST[oNr][7])<0||prevSctrON==0)OST[oNr][0]=0;else OST[oNr][0]=1;OST[oNr][1]=parseInt(o.getAttribute('X'));OST[oNr][2]=parseInt(o.getAttribute('Y'));if(o.tagName=="IMG"){OST[oNr][3]=parseInt(o.getAttribute('W'));OST[oNr][4]=parseInt(o.getAttribute('H'));}
if(o.style.width)OST[oNr][3]=parseInt(o.getAttribute('W'));if(o.style.height)OST[oNr][4]=parseInt(o.getAttribute('H'));if(o.className.substr(0,4)=="clip"){s=o.getAttribute('BGpos');OST[oNr][5]=parseInt(s);OST[oNr][6]=parseInt(s.substr(s.lastIndexOf(' ')));}}}
function toOST(){var s,oNr,o,oim;for(oNr=0;oNr<OST.length;oNr++){o=getEl(OST[oNr][7]);o.style.left=o.getAttribute('X');o.style.top=o.getAttribute('Y');if(o.style.width)o.style.width=o.getAttribute('W');if(o.style.height)o.style.height=o.getAttribute('H');if(o.className.substr(0,4)=="clip"){oim=divContRef(o);s=o.getAttribute('BGpos');if(o.style.overflow=="auto"||o.style.overflowX=="auto"||o.style.overflowY=="auto"||o.style.overflow=="scroll"){o.scrollLeft=-(parseInt(s));o.scrollTop=-(parseInt(s.substr(s.lastIndexOf(' '))));}else{oim.style.left=parseInt(s)+"px";oim.style.top=parseInt(s.substr(s.lastIndexOf(' ')))+"px";}
oim.style.cursor="default";}}}
function getData(z,s){aos=null;aos=z.split(s);return(aos.length);}
function objTransLstRemov(o){var a,b,c=objTransLst.indexOf(o);if(c<0)return 0;a=objTransLst.substr(0,c);b=objTransLst.substr(c+o.length+1);objTransLst=a+b;return 1;}
function objTransLstAppend(o){if(objTransLst.indexOf(o)>=0)return 0;else{objTransLst+=o+",";return 1;}}
function isObjTrans(o){return objTransLst.indexOf(o)<0?0:1;}
function clrAllTrans(sct){var a=objTransLst.split(",");for(var i=0;i<a.length-1;i++)if(Prsrvd[sct].indexOf(a[i])<0)setOpac(a[i],0);objTransLst="";}
function swapVDO(toSct,n,tln,d){
	objTransLst="";
	if(toSct==0)menuON=0;
	if(lpON){
		lpON=0;
		clearInterval(dact);
	}
	clearTimeout(tmout_0);
	shohidSlidR(0);
	vdoRun=0;
	toOST();
	var o,inh;
	for(i=0;i<nOfAO;i++){
		if(AO[i][2]){
			o=getEl(AO[i][2]);
			if(Prsrvd[toSct].indexOf(AO[i][2])<0||sctrON==0){
						//if(o.id=="cV696")alert("isON : "+o.getAttribute("isON"));
				if(o.getAttribute('isON')==1){
					hide(AO[i][2],d-0.2);
					o.setAttribute('isON',0);
				}
				objonLstRemov(AO[i][2]);
			}
		}
	}
	if(toSct==0)retTo0srvc();
	//inh=(sctrON==sctN-1&&toSct>0&&toSct<sctN-1);
	inh=(toSct>0&&toSct<sctN-1&&sctrON!=6);
	setTimeout('if('+(!inh)+')Hid("Anim'+sctrON+'_'+animON+'");menuON='+(toSct!=0?1:0)+';strtAni2('+toSct+','+n+','+tln+','+d+');',d*1000+0);
}
function strtAni(sct,n,tln,d){//alert("strtAni "+sct+"  "+sctrON+"  "+rdy);
	if(sct!=sctrON&&rdy){
		//if(!lpON)toggleLoop(getEl('advPause'),-10);
		if(d<.5)d=.5;
		earlysrvc(sct);
		rdy=0;
		sctW=sct;
		endFreeScrll();
		preLdPtr=TLpreld[sct][n]-1;
		preload();
		if(ffx&&sct>0)preLdTmGap=100;
		if(vdoRun&&sctrON>=0)swapVDO(sct,n,tln,d);
		else strtAni2(sct,n,tln,d);
	}
}
function strtAni2(sct,n,tln,d){//alert(sct+" "+n);
	setAttrOST(sct,n);
	generalsrvc(sct);
	prevSctrON=sctrON;
	sctrON=sct;
	animON=n;
	if(prevSctrON==0)from0srvc();
	setTimeout('Sho("Anim'+sct+'_'+n+'");'+showStr,d+200);
	if(sct>0){
		menuON=1;
		getEl("logo").style.cursor="pointer";
	}
	if(tln=="undefined")tln=0;
	var a,b,f,bg,sum=0,aniObjNr=-1,la=nOfAO-1,p1=0,p2=0,elim="";
	for(var i=0;i<nOfAO;i++){
		AO[i]=new Array();
		sum+=parseFloat(aos[i*13+12])*1000*spdup;
		AO[i][0]=sum;
		a=aos[i*13];
		AO[i][1]=a;
		if(a!="&"&&a.charAt(0)!="@"){
			if(a){
				elim+=a+" ";
			}
			a=aos[i*13+1];
			AO[i][2]=a;
			if(coachMoveMarks>-1){
				b=aos[i*13+6];
				if(b){
					markdObjAll[0][p1]=a;
					markdObjAll[1][p1]=b;
					p1++;
				}
				if(i>0){
					if(a!=AO[i-1][2]){
						b=aos[(i-1)*13+6];
						if(b){
							markdObj[0][p2]=AO[i-1][2];
							markdObj[1][p2]=b;p2++;
						}
					}
				}
			}
			a=aos[i*13+3];
			AO[i][3]=a?parseFloat(a)*1000*spdup:"";
			a=aos[i*13+4];
			AO[i][4]=a?parseFloat(a)*1000*spdup:"";
			a=aos[i*13+11];
			AO[i][7]=a?parseFloat(a)*1000*spdup:0;
			a=aos[i*13+5];
			AO[i][8]=a?parseFloat(a):1;AO[i][14]=0;
			AO[i][15]=0;
			AO[i][16]=0;AO[i][17]=0;
			a=aos[i*13+6];
			AO[i][15]=(a&&(a!="@")&&(a!="$"))?1:0;
			AO[i][15]=0;
			if(AO[i][15]){
				AO[i][14]=0;AO[i][16]=0;
				AO[i][5]=a?parseInt(getEl(a).style.left)-parseInt(getEl(AO[i][2]).style.left):0;
				AO[i][6]=a?parseInt(getEl(a).style.top)-parseInt(getEl(AO[i][2]).style.top):0;
			}else{
				if((a=="@")||(a=="$")){
					if((a=aos[i*13+7])&&(b=aos[i*13+8])){
						AO[i][5]=a;
						AO[i][6]=b;
						a=aos[i*13+9];
						AO[i][11]=a?a:0;a=aos[i*13+10];
						AO[i][12]=a?a:0;
						AO[i][14]=1;
						AO[i][17]=0;
						if(aos[i*13+6]=="@"){
							AO[i][16]=1;
						}
					}else alert("At least left (x) and top (y) coordinates are required for a coord shift ($ or @) at line "+i);
				}
			}
			if((a=aos[i*13+7])&&!AO[i][14]){
				AO[i][5]=a;
				a=aos[i*13+8];
				AO[i][6]=a?a:0;AO[i][17]=1;
			}
			a=parseInt(aos[i*13+2]);
			AO[i][13]=a;
			if(a>=0){
				if(a>aniObjNr){
					aniObjNr=a;
					objPopul[a]=1;
				}else objPopul[a]++;
			}
			if(AO[i][7]!=0&&!(AO[i][14]||AO[i][15]||AO[i][17]||AO[i][8]!=1)){
				alert('Transform duration but no translation marker nor coord shift nor bckgr shift nor scale (==1) at line '+i+'. Abandonned.');
				return;
			}
		}
	}
	if(coachMoveMarks>-1){
		for(var i=markdObj[0].length-1;i>0;i--){
			for(var j=i-1;j>=0;j--){
				if(markdObj[0][i]==markdObj[0][j]||elim.indexOf(markdObj[0][j])!=-1)markdObj[0][j]="";
			}
		}
		MoveMarksON(postf);
	}
	MO=new Array(objPopul.length);
	for(var i=0;i<objPopul.length;i++){
		MO[i]=new Array(objPopul[i]+1);
		for(var j=0;j<objPopul[i];j++){
			MO[i][j]=new Array(9);MO[i][j][8]="";
		}
		MO[i][objPopul[i]]=0;
	}
	setTimeout("startVDO("+tln+");",d+300);
}

function slidRhdle(){
	endFreeScrll();
	if(!lpON)toggleLoop(advPseR,-1);
	reintReq=slidRtml;
				//alert("reintReq = "+reintReq);
	clipImgCursFix(0);
}
function slidRmse(ev){
	ev=ev||window.event;
	msex=ev.clientX;
	slidRinfo();
}

function slidRinfo(){
	var offCorr=8;
	progrL=parseInt(prgR.style.left)+parseInt(pRbgKR.style.left);
	scrllOfL=parseInt(sldR.style.left)+progrL+(ie?2:0);
	var j,dL=msex-scrllOfL-(plateR.offsetLeft<0?0:plateR.offsetLeft)-subplateRLpos;
	slidRra=(dL+1)/parseInt(sldR.style.width);
	slidRtml=parseInt(slidRra*AO[nOfAO-1][0]);
	offCorr=parseInt(slidRra*offCorr);
	var i=0;
	while(pRspot[sctrON][i]*spdup<slidRtml)i++;
	i--;
	slidRinfoCur(i);
}

function slidRinfoCur(i){
	if(!endLp){
		pRballR.style.visibility="hidden";
		var cond;
		pRlit=-1;
		for(var j=0;j<pRspot[sctrON].length;j++){
			if( cond=( clck>=pRspot[sctrON][j]*spdup && clck<(pRspot[sctrON][j+1]*spdup || AO[nOfAO-1][0]) ) ){
				pRlit=j;
				pRballR.style.left=slidRpos[j]+"px";
				pRballR.style.visibility="visible";
			}
			getEl('pR_'+j).src=cond?pRbut_off:j!=i?pRbut_off:pRbut_hov;
		}
	}
	if(i>=0&&i!=pRlit){
		prCmtR.style.color=txtRed;
	}else{
		prCmtR.style.color=txtGold;
		i=pRlit;
	}
	prCmtR.innerHTML=i>-1?eval('pR_'+Lng+'['+sctrON+']['+i+']'):" ";
}

function shohidSlidR(f){
	if(vdoRun){
		if(f==0){
			pRbgKR.style.visibility="hidden";
			pRballR.style.visibility="hidden";
			pRbgKR.style.opacity=0;
			pRballR.style.opacity=0;
		}else{
			pRbgKR.style.visibility="visible";
			if(pRlit!=-1)pRballR.style.visibility="visible";
			pRbgKR.style.opacity=1;
			if(pRlit!=-1)pRballR.style.opacity=1;
		}
	}
}
function getImgMouse(ev){
	if(imgFreeScrll){
		ev=ev||window.event;
		msex=ev.clientX;
		msey=ev.clientY;
		DX=msex-MOUSEx;
		DY=msey-MOUSEy;
		MOUSEx=msex;
		MOUSEy=msey;
		if(strtFreeScrll){strtFreeScrll=0;return;}
		var o=scrllRef.parentNode;
		var Lgap=plateR.offsetLeft<0?0:plateR.offsetLeft;
		var dL=Lgap+scrllOfL;
		var dR=Lgap+scrllOfR;
		dL=msex-dL;
		dR=dR-msex;
		dT=msey-scrllOfT;
		dB=scrllOfB-msey;
		if(scrllByCSS){
			if(imgFreeScrll>=2){
				NX=o.scrollLeft;
				NX=NX+Math.round((DX<0?NX/dL:(scrllImgW-NX-scrllClipW)/dR)*DX);
				if(NX==NX)o.scrollLeft=NX;
			}
			if(imgFreeScrll==1||imgFreeScrll==3){
				NY=o.scrollTop;
				NY=NY+Math.round((DY<0?NY/dT:(scrllImgH-NY-scrllClipH)/dB)*DY);
				if(NY==NY)o.scrollTop=NY;
			}
		}else{
			if(imgFreeScrll>=2){
				NX=parseInt(scrllRef.style.left);
				NX=NX-Math.round((DX<0?-NX/dL:(scrllImgW+NX-scrllClipW)/dR)*DX);
				NX=(NX>0?0:NX<scrllXlim?scrllXlim:NX);
				if(NX==NX)scrllRef.style.left=NX+"px";
			}
			if(imgFreeScrll==1||imgFreeScrll==3){
				NY=parseInt(scrllRef.style.top);
				NY=NY-Math.round((DY<0?-NY/dT:(scrllImgH+NY-scrllClipH)/dB)*DY);
				NY=(NY>0?0:NY<scrllYlim?scrllYlim:NY);
				if(NY==NY)scrllRef.style.top=NY+"px";
			}
		}
	}
}
function gotoTml(tml){
	endFreeScrll();
	if(!lpON)toggleLoop(advPseR,-2);
	memoTml=clck;
	reintReq=tml;
	clipImgCursFix(0);
}
function inJump(tOp,tCl,dHld){
	if(tmout_3)clearTimeout(tmout_3);
	if(injumped){
		gotoTml(tCl==-1?memoTml:tCl);
	}else if(lpON){
		gotoTml(tOp+Mpulse);
		tmout_3=setTimeout('if(lpON)toggleLoop(advPseR,-3);injumped=1;',dHld);
	}
}

function endFreeScrll(){
	if(imgFreeScrll){
		scrllRef.style.cursor="url(illus/click_here-gold_ripples.cur),default";
		scrllRef.onmousemove=null;
		scrllRef.onmouseout=null;
		scrllRef.onmousedown=null;
		if(scrllByCSS){
			scrllRef.parentNode.scrollLeft=scrllXbak;
			scrllRef.parentNode.scrollTop=scrllYbak;
		}else{
			scrllRef.style.left=scrllXbak+"px";
			scrllRef.style.top=scrllYbak+"px";
		}
	imgFreeScrll=0;
	}
}
function freeScrll(o,dir){
	if(!imgFreeScrll){
		if(tmout_3)clearTimeout(tmout_3);
		scrllByCSS=(o.style.overflow=="auto"||o.style.overflowX=="auto"||o.style.overflowY=="auto"||o.style.overflow=="scroll");
		scrllRef=divContRef(o);
		scrllXbak=scrllByCSS?o.scrollLeft:parseInt(scrllRef.style.left);
		scrllYbak=scrllByCSS?o.scrollTop:parseInt(scrllRef.style.top);
		imgFreeScrll=dir;
		if(lpON)toggleLoop(advPseR,-4);
		scrllClipW=parseInt(o.style.width);
		scrllClipH=parseInt(o.style.height);
		scrllImgW=scrllRef.tagName=="IMG"?scrllRef.width:parseInt(scrllRef.style.width);
		scrllImgH=scrllRef.tagName=="IMG"?scrllRef.height:parseInt(scrllRef.style.height);
		scrllOfL=parseInt(o.style.left)+animL+(ie?2:0);
		scrllOfR=scrllClipW+scrllOfL;
		scrllOfT=parseInt(o.style.top)+animT+(ie?2:0);
		scrllOfB=scrllClipH+scrllOfT;
		scrllRef.style.cursor="url(illus/"+(dir==3?"quad-arrow-":dir==2?"double-arrow-H-":"double-arrow-V-")+"gold-W32.cur),move";
		strtFreeScrll=1;
		strtAdjTop=parseInt((scrllByCSS?o.scrollTop:-parseInt(scrllRef.style.top))+parseInt(o.style.height)/2);
		strtAdjLeft=parseInt((scrllByCSS?o.scrollLeft:-parseInt(scrllRef.style.left))+parseInt(o.style.width)/2);
		scrllRef.onmousemove=getImgMouse;
		scrllRef.onmouseout=outScrll;
		scrllRef.onmousedown=toggleLp;
		//scrllXlim=parseInt(o.style.width)-scrllRef.width;
		//scrllYlim=parseInt(o.style.height)-scrllRef.height;
		scrllXlim=parseInt(o.style.width)-scrllImgW;
		scrllYlim=parseInt(o.style.height)-scrllImgH;

		clrSMD(0,0);
	}
}
function outScrll(){
	var i,d,frst=-1,o=scrllRef.parentNode;
	var Hori=(imgFreeScrll==2);
	var Verti=(imgFreeScrll==1);
	var Both=(imgFreeScrll==3);
	if(scrllByCSS){
		if(Hori){
			if(NX>-scrllXlim-scrllMagn){
				o.scrollLeft=(NX=-scrllXlim);
				return;
			}
		if(NX<scrllMagn){
			o.scrollLeft=(NX=0);
			return;
		}
	}
if(Verti){if(NY<scrllMagn){o.scrollTop=(NY=0);return;}
if(NY>-scrllYlim-scrllMagn){o.scrollTop=(NY=-scrllYlim);return;}}}else{if(Both){var beyondLeft=(NX>-scrllMagn);var beyondTop=(NY>-scrllMagn);var beyondRight=(NX<scrllXlim+scrllMagn);var beyondBott=(NY<scrllYlim+scrllMagn);var cornerWNW=(beyondTop&&beyondLeft&&NX>NY);var cornerNNW=(beyondTop&&beyondLeft&&NY>=NX);var cornerNNE=(beyondTop&&beyondRight&&NY>=scrllXlim-NX);var cornerENE=(beyondTop&&beyondRight&&scrllXlim-NX>NY);var cornerESE=(beyondBott&&beyondRight&&scrllXlim-NX>scrllYlim-NY);var cornerSSE=(beyondBott&&beyondRight&&scrllYlim-NY>=scrllXlim-NX);var cornerSSW=(beyondBott&&beyondLeft&&scrllYlim-NY>=NX);var cornerWSW=(beyondBott&&beyondLeft&&NX>scrllYlim-NY);var sideN=(beyondTop&&!beyondLeft&&!beyondRight);var sideE=(beyondRight&&!beyondTop&&!beyondBott);var sideS=(beyondBott&&!beyondLeft&&!beyondRight);var sideW=(beyondLeft&&!beyondTop&&!beyondBott);if(sideW){fixLeft();clrSMD(0,0);return;}
if(sideN){fixTop();clrSMD(0,0);return;}
if(sideE){fixRight();clrSMD(0,0);return;}
if(sideS){fixBott();clrSMD(0,0);return;}
if(cornerWNW&&!SMD[0]){fixLeft();fixTop();clrSMD(0,1);return;}
if(cornerNNW&&!SMD[1]){fixTop();fixLeft();clrSMD(1,1);return;}
if(cornerNNE&&!SMD[2]){fixTop();fixRight();clrSMD(2,1);return;}
if(cornerENE&&!SMD[3]){fixRight();fixTop();clrSMD(3,1);return;}
if(cornerESE&&!SMD[4]){fixRight();fixBott();clrSMD(4,1);return;}
if(cornerSSE&&!SMD[5]){fixBott();fixRight();clrSMD(5,1);return;}
if(cornerSSW&&!SMD[6]){fixBott();fixLeft();clrSMD(6,1);return;}
if(cornerWSW&&!SMD[7]){fixLeft();fixBott();clrSMD(7,1);}}}}
function fixLeft(){scrllRef.style.left=(NX=0)+"px";}
function fixTop(){scrllRef.style.top=(NY=0)+"px";}
function fixRight(){scrllRef.style.left=(NX=scrllXlim)+"px";}
function fixBott(){scrllRef.style.top=(NY=scrllYlim)+"px";}
function clrSMD(n,f){for(var i=0;i<8;i++)SMD[i]=0;if(f)SMD[n]=1;}
function toggleLp(ev){ev=ev||window.event;if(ev.srcElement)ev.cancelBubble=true;else ev.stopPropagation();if(!lpON)toggleLoop(advPseR,-5);}

function toggleLoop(o,orig,tln){//alert(o.id+"  "+orig+"  "+tln);
	if(tmout_3)clearTimeout(tmout_3);
	//if(sctrON!=sctN-1||sctN<=2){
		if(lpON){
			lpON=0;
			clearInterval(dact);
			o.src="illus/advanceButtGold+outl.png";
			flashR++;
			pauseF=setInterval('flash("'+o.id+'");',flashTm);
		}else{	
			if(injumped)injumped=0;
			lpON=1;
			endFreeScrll();
			stopFlasher(o.id);
			dact=setInterval('if(lpON && !reconst)loop();',Mpulse);
			o.src=orig==1?"illus/pauseButtGold+outl.png":"illus/pauseButtGrey+outl.png";
			if(tln=="undefined")tln=0;  //alert("here");
			//reintReq=!tln?-1:tln*spdup;
			//setTimeout("reintReq="+(!tln?-1:tln*spdup),1000);
		}
				//alert("toggleLoop, lpON=" +lpON+ " orig= " +orig);
		o.title=eval("advPause_"+Lng+"["+lpON+"]");
	//}
}

function setPauseBut(o,f){if(sctrON!=sctN-1||sctN<=2){if(f)o.src=lpON?"illus/pauseButtRed+outl.png":"illus/advanceButtGold+outl.png";else o.src=lpON?"illus/pauseButtGrey+outl.png":"illus/advanceButtGold+outl.png";}}
function restendHover(o,f){if(sctrON!=sctN-1||sctN<=2)o.src=f?"illus/"+o.id+"ButtRed+outl.png":"illus/"+o.id+"ButtGrey+outl.png";}
function flash(o){setOpac(o,(flashR++)%2?0.1:1);}
function stopFlasher(o){if(flashR){clearInterval(pauseF);flashR=0;var ob=getEl(o);if(ie)ob.style.filter='alpha(opacity=100)';else ob.style.opacity='1';ob.style.visibility="";}}
function gointoLoop(ob,n){
	//if(sctrON!=sctN-1||sctN<=2){
		if(vdoRun){		//alert( "gointoLoop from n= "+n+" lpON= "+lpON );
			objOn="";
			if(!lpON)toggleLoop(advPseR,-6); 
			reintReq=n>-1?pRspot[sctrON][n]*spdup:ob=="end"?AO[nOfAO-1][0]-500:n==-1?0:-n*spdup;
					//reintReq=n==-1?0:pRentr[sctrON][n]*spdup; (earlier version)
			if(ob=="end")restendHover(getEl(ob),0);
			getEl("plate").style.cursor="wait";
			clipImgCursFix(0);
		}
	//}
}
function clrHrGlass(){getEl("plate").style.cursor="default";clipImgCursFix(1);}
function clipImgCursFix(f){var s,ob,oim,a=0,i=0;while(objonLst!=""&&i<objonLst.length-1){i=objonLst.indexOf(",",a);s=objonLst.substr(a,i-a);if(s!=""){ob=getEl(s);if(ob.className.substr(0,4)=="clip"){O=divContRef(ob);var p;O.style.cursor=!f?"wait":(ob.onmousedown&&ob.onmousedown.toString().indexOf("freeScrll"))?"url(illus/click_here-gold_ripples.cur),default":"default";}}
i++;a=i;}}
function startVDO(tln){		
	if(!vdoRun){
		stVDOsrvc();
		clck=0;
		mom=0;
		reintReq=!tln?-1:tln*spdup;
		reconst=0;
		lpON=1;
		vdoRun=1;
		rdy=1;
		endLp=0;
		if(transLg)transLang(Lng,sctrON);
		chgepR(0);
		objOn="";
				//alert("startVDO  "+lpON+"  "+reconst);
		dact=setInterval('if(lpON && !reconst)loop();',Mpulse);
		//if(tln)setTimeout('reintReq='+(tln*spdup)+';',4500);
	}
}
function objonLstRemov(o){var a,b,c=objonLst.indexOf(o);if(c<0)return 0;a=objonLst.substr(0,c);b=objonLst.substr(c+o.length+1);objonLst=a+b;return 1;}
function objonLstAppend(o){if(objonLst.indexOf(o)>=0)return 0;else{objonLst+=o+",";return 1;}}
function isObjOn(o){return objonLst.indexOf(o)<0?0:1;}
function loop(){
	var hS,sS,o,oim,sc,tx,ty,tbgx,tbgy,s,tw,th,fnd,a,p,q,strnd,mx,my,adv;
	if(!reconst){
		if(mom<nOfAO&&(clck>=AO[mom][0]||reintReq>-1)){
			objOff=AO[mom][1];
			if(objOff.charAt(0)=="@"||reintReq>-1){
				if(reintReq<0&&objOff.charAt(1)=="s"){strtAni(parseInt(objOff.substr(2)),0,0,1);return;}
reintAt=reintReq>-1?reintReq:parseInt(spdup*objOff.substr(1));reconst=1;endFreeScrll();reinitOST();for(p=0;p<MO.length;p++){for(q=0;q<MO[p].length-1;q++){MO[p][q][0]="";MO[p][q][8]="";}
MO[p][MO[p].length-1]=0;}
mom=0;objonLst="";clck=AO[0][0];}else{objOn=AO[mom][2];if(AO[mom][3]!="")hS=AO[mom][3];else hS=0;if(AO[mom][4]!="")sS=AO[mom][4];else sS=0;hideSpd=hS;showSpd=sS;if(objOff!=""&&mom<nOfAO-1){objonLstRemov(objOff);o=getEl(objOff);o.setAttribute('isON',0);if(o.className.substr(0,4)=="clip"){oim=divContRef(o);imgFreeScrll=0;if(oim.onmousemove)oim.onmousemove=null;oim.style.cursor="default";}
if(hS==0)setOpac(objOff,0);else{objTransLstAppend(objOff);if(ie){o.filters.item("blendTrans").duration=(objOff.charAt(0)!="#"?hS:0)/1000;o.filters.blendTrans.apply();o.style.visibility="hidden";o.filters.blendTrans.play();}else{var opac;if((opac=getOpac(objOff))>0)varyOpac(objOff,opac,0,-Mpulse/hS);}}}
if(objOn){
	
		//if(sctrON==1 && clck>=3000)alert(objOn+"   off: "+objOff+"   at "+clck); // BIZARRE BUG : IT STOPS HERE !
		
	objonLstAppend(objOn);
	o=getEl(objOn);
	objONsrvc(o);
	if(o.className.substr(0,4)=="clip"){
		oim=divContRef(o);
		if(o.onmousedown&&o.onmousedown.toString().indexOf("freeScrll")){
			oim.style.cursor="url(illus/click_here-gold_ripples.cur),default";}else oim.style.cursor="default";
		}
		if(o.getAttribute('isON')==0){
			o.setAttribute('isON',1);
			if(sS==0&&!ie)setOpac(objOn,1);else{
				objTransLstAppend(objOn);
				if(ie){
					o.filters.item("blendTrans").duration=(objOn.charAt(0)!="#"?sS:0)/1000;o.filters.blendTrans.apply();
					o.style.visibility="visible";
					o.filters.blendTrans.play();
				}else{
					var opac;
					if((opac=getOpac(objOn))<1)varyOpac(objOn,opac,plotOpac,Mpulse/sS);
				}
			}
		}
a=AO[mom][13];if(AO[mom][14]||AO[mom][15]||AO[mom][17]||AO[mom][8]!=1){strnd=MO[a][MO[a].length-1];MO[a][strnd][0]=Math.round(AO[mom][7]/Mpulse,0);MO[a][strnd][1]=parseInt(o.style.left);MO[a][strnd][2]=parseInt(o.style.top);MO[a][strnd][3]=AO[mom][5];MO[a][strnd][4]=AO[mom][6];MO[a][strnd][5]=(strnd==0)?1:MO[a][strnd-1][6];MO[a][strnd][6]=AO[mom][8];MO[a][strnd][7]=0;MO[a][strnd][8]=objOn;if(AO[mom][14]){s=o.style.width;MO[a][strnd][9]=s?parseInt(s):"!";MO[a][strnd][11]=s?AO[mom][11]:"!";s=o.style.height;MO[a][strnd][10]=s?parseInt(s):"!";MO[a][strnd][12]=s?AO[mom][12]:"!";}
MO[a][strnd][13]=AO[mom][16];MO[a][strnd][14]=AO[mom][14];MO[a][strnd][15]=AO[mom][17];if(MO[a][strnd][13]||MO[a][strnd][15]){oim=divContRef(o);if(o.style.overflow=="auto"||o.style.overflowX=="auto"||o.style.overflowY=="auto"||o.style.overflow=="scroll"){MO[a][strnd][16]=-(o.scrollLeft);MO[a][strnd][17]=-(o.scrollTop);}else{MO[a][strnd][16]=parseInt(oim.style.left);MO[a][strnd][17]=parseInt(oim.style.top);}}
MO[a][MO[a].length-1]++;}}
if(mom<nOfAO-1)mom++;}}
for(p=0;p<MO.length;p++){for(q=0;q<MO[p].length-1;q++){if(MO[p][q][8]!=""){var o=getEl(MO[p][q][8]);if(MO[p][q][0]>-1){if(MO[p][q][0]==0){tx=MO[p][q][1]+MO[p][q][3];ty=MO[p][q][2]+MO[p][q][4];tbgx=-MO[p][q][3];tbgy=-MO[p][q][4];}else{MO[p][q][7]++;tbgx=(MO[p][q][3]*MO[p][q][7])/MO[p][q][0];tbgy=(MO[p][q][4]*MO[p][q][7])/MO[p][q][0];if(MO[p][q][15]){tx=Math.round(MO[p][q][16]+tbgx);ty=Math.round(MO[p][q][17]+tbgy);}else{tx=parseInt(MO[p][q][1]+tbgx);ty=parseInt(MO[p][q][2]+tbgy);}
tbgx=-tbgx;tbgy=-tbgy;if(MO[p][q][14]){if(MO[p][q][9]!="!")tw=Math.round(MO[p][q][9]+(MO[p][q][11]*MO[p][q][7])/MO[p][q][0]);if(MO[p][q][10]!="!")th=Math.round(MO[p][q][10]+(MO[p][q][12]*MO[p][q][7])/MO[p][q][0]);}}
if(MO[p][q][13]&&!MO[p][q][15]){oim=divContRef(o);oim.style.left=(MO[p][q][16]+tbgx)+"px";oim.style.top=(MO[p][q][17]+tbgy)+"px";}
if(!MO[p][q][15]){o.style.left=tx+"px";o.style.top=ty+"px";}else{oim=divContRef(o);if(o.style.overflow=="auto"||o.style.overflowX=="auto"||o.style.overflowY=="auto"||o.style.overflow=="scroll"){o.scrollLeft=-tx;o.scrollTop=-ty;}else{oim.style.left=tx+"px";oim.style.top=ty+"px";}}
if(MO[p][q][14]&&!MO[p][q][15]){if(MO[p][q][9]!="!"&&o.style.width)o.style.width=tw+"px";if(MO[p][q][10]!="!"&&o.style.height)o.style.height=th+"px";}
if(MO[p][q][7]==MO[p][q][0])MO[p][q][0]=-1;}}}}
fnd=0;for(var p=0;p<MO.length;p++){for(var q=0;q<MO[p].length-1;q++){if(MO[p][q][0]>-1)fnd++;}}
if(!fnd&&AO[mom][1]=="&"){lpON=0;clearInterval(dact);endLp=1;}

if(objOn&&objOn.charAt(0)=="$")toggleLoop(advPseR,-7);

clck+=Mpulse;if(pRbgKR.style.visibility=="visible"){
	if(clck>=pRspot[sctrON][pRlit+1]*spdup){
		pRlit++;pRballR.style.left=slidRpos[pRlit]+"px";pRballR.style.visibility="visible";prCmtR.innerHTML=eval('pR_'+Lng+'['+sctrON+']['+pRlit+']');slidRinfo();
	}
if(clck%Mpulsx8==0){
	adv=clck/AO[nOfAO-1][0];
	adv=(adv>1?1:adv)*100;
	sldRf.style.width=adv+"%";
}}}
if(reconst){
	var hS,sS,o,oim,sc,tx,ty,tbgx,tbgy,s,tw,th,a,strnd;
	for(clck;clck<reintAt;clck+=Mpulse){
		if(mom<nOfAO&&clck>=AO[mom][0]){
			objOff=AO[mom][1];
							//if(objOff.charAt(0)=="@")alert("Loop request trapped inside another");
			objOn=AO[mom][2];
			if(AO[mom][3]!="")hS=AO[mom][3]; else hS=0;
			if(AO[mom][4]!="")sS=AO[mom][4]; else sS=0;
			hideSpd=hS;
			showSpd=sS;
			if(objOff!=""&&objOff!="$"&&mom<nOfAO-1){
				objonLstRemov(objOff);
				o=getEl(objOff);
				//if(o.className!="undefined" && o.className.substr(0,4)=="clip"){
				if(o && o.className.substr(0,4)=="clip"){
					oim=divContRef(o);
					oim.style.cursor="default";
				}
				for(var i=0;i<OST.length-1;i++){if(OST[i][7]==objOff)break;}
				OST[i][0]=0;
			}
			if(objOn){
				objonLstAppend(objOn);
				o=getEl(objOn);
				if(o.className.substr(0,4)=="clip"){
					oim=divContRef(o);
					if(o.onmousedown&&o.onmousedown.toString().indexOf("freeScrll")){oim.style.cursor="url(illus/click_here-gold_ripples.cur),default";}else oim.style.cursor="default";}
a=AO[mom][13];OST[a][0]=1;if(AO[mom][14]||AO[mom][15]||AO[mom][17]||AO[mom][8]!=1){strnd=MO[a][MO[a].length-1];MO[a][strnd][0]=Math.round(AO[mom][7]/Mpulse,0);MO[a][strnd][1]=OST[a][1];MO[a][strnd][2]=OST[a][2];MO[a][strnd][3]=AO[mom][5];MO[a][strnd][4]=AO[mom][6];MO[a][strnd][5]=(strnd==0)?1:MO[a][strnd-1][6];MO[a][strnd][6]=AO[mom][8];MO[a][strnd][7]=0;MO[a][strnd][8]=objOn;if(AO[mom][14]){s=OST[a][3];MO[a][strnd][9]=s?s:"!";MO[a][strnd][11]=s?AO[mom][11]:"!";s=OST[a][4];MO[a][strnd][10]=s?s:"!";MO[a][strnd][12]=s?AO[mom][12]:"!";}
MO[a][strnd][13]=AO[mom][16];MO[a][strnd][14]=AO[mom][14];MO[a][strnd][15]=AO[mom][17];if(MO[a][strnd][13]||MO[a][strnd][15]){MO[a][strnd][16]=OST[a][5];MO[a][strnd][17]=OST[a][6];}
MO[a][MO[a].length-1]++;}}
if(mom<nOfAO-1)mom++;}
for(var p=0;p<MO.length;p++){for(var q=0;q<MO[p].length-1;q++){if(MO[p][q][8]!=""&&MO[p][q][0]>-1){if(MO[p][q][0]==0){tx=MO[p][q][1]+MO[p][q][3];ty=MO[p][q][2]+MO[p][q][4];tbgx=-MO[p][q][3];tbgy=-MO[p][q][4];}else{MO[p][q][7]++;tbgx=(MO[p][q][3]*MO[p][q][7])/MO[p][q][0];tbgy=(MO[p][q][4]*MO[p][q][7])/MO[p][q][0];if(MO[p][q][15]){tx=Math.round(MO[p][q][16]+tbgx);ty=Math.round(MO[p][q][17]+tbgy);}else{tx=parseInt(MO[p][q][1]+tbgx);ty=parseInt(MO[p][q][2]+tbgy);}
tbgx=-tbgx;tbgy=-tbgy;if(MO[p][q][14]){if(MO[p][q][9]!="!")tw=Math.round(MO[p][q][9]+(MO[p][q][11]*MO[p][q][7])/MO[p][q][0]);if(MO[p][q][10]!="!")th=Math.round(MO[p][q][10]+(MO[p][q][12]*MO[p][q][7])/MO[p][q][0]);}}
if(MO[p][q][13]&&!MO[p][q][15]){OST[p][5]=MO[p][q][16]+tbgx;OST[p][6]=MO[p][q][17]+tbgy;}
if(!MO[p][q][15]){OST[p][1]=tx;OST[p][2]=ty;}else{OST[p][5]=tx;OST[p][6]=ty;}
if(MO[p][q][14]&&!MO[p][q][15]){if(MO[p][q][9]!="!")OST[p][3]=tw;if(MO[p][q][10]!="!")OST[p][4]=th;}
if(MO[p][q][7]==MO[p][q][0])MO[p][q][0]=-1;}}}}
graphize();reintReq=-1;p=0;if(reintAt<pRspot[sctrON][p]*spdup)p=1;else while(reintAt>=pRspot[sctrON][p]*spdup)p++;chgepR(p-1);clrHrGlass();reconstSrvc();endLp=0;reconst=0;}}
function graphize(){
	var o,oim;
	for(var i=0;i<OST.length;i++){o=getEl(OST[i][7]);
	if(o.id!="pRbgK"){
		o.style.visibility=OST[i][0]?"visible":"hidden";
		if(!ie)o.style.opacity=OST[i][0]?1:0;
	}
o.setAttribute('isON',OST[i][0]);o.style.left=OST[i][1]+"px";o.style.top=OST[i][2]+"px";if(o.style.width)o.style.width=OST[i][3]+"px";if(o.style.height)o.style.height=OST[i][4]+"px";if(o.className.substr(0,4)=="clip"){oim=divContRef(o);if(o.style.overflow=="auto"||o.style.overflowX=="auto"||o.style.overflowY=="auto"||o.style.overflow=="scroll"){o.scrollLeft=-OST[i][5];o.scrollTop=-OST[i][6];}else{oim.style.left=OST[i][5]+"px";oim.style.top=OST[i][6]+"px";}}}}
function divContRef(o){
	var oi=o.firstChild;
	if(!oi.tagName)oi=oi.nextSibling;
	return oi;
}
function onErr(m,u,l){alert("error! m= "+m+"   u="+u+"   l="+l);}//alert("error! : "+NX+"   "+NY);
CLOCK=new Date();preLdTmSpot=CLOCK.getTime();

