function IBrowser(_1){ var _2="1.1.8"; var _3=this; var _4=null; var _5=new Array(); var _6=null; var _7=new Array(); var _8=""; var _9=0; var _a=1; var _b=0,curY=0; var _c=-1; var _d=-1; var _e=true; var _f,zoomOldLevel,zoomOldRatio,zoomTargetRatio,zoomCenterX,zoomCenterY,zoomOldX,zoomOldY,zoomTimer=0,zoomTimer2=0; var _10=false; var _11={enabled:false,left:0,top:0,right:1,bottom:1}; var _12={enabled:false,pagewidth:0,pageheight:0,mainLevel:0,pagesPerRow:1,currentPage:0,totalPages:0,bookmarks:false}; var _13=null; var _14=[5,10,20,25,30,40,45,50,60,65,70,75,80,85,85,90,90,115,188,197,161,139,105,80,60,40,30,20,10]; var _15=new Array(); var _16=null; var _17=new Array(); do{ _16="ib"+Math.floor(Math.random()*1000000); }while(window[_16]!=undefined); window[_16]=this; var _1=_1; _1.onselectstart=function(){ return false; }; var _18=document.createElement("div"); _18.id="viewport"; _18.style.width=_18.style.height="100%"; _18.style.left=0; _18.style.top=0; _18.style.position="absolute"; _18.style.overflow="hidden"; var _19=document.createElement("div"); _19.id="basemap"; _19.style.position="absolute"; _19.style.left=0; _19.style.top=0; _19.style.width="100%"; _19.style.height="100%"; _19.style.backgroundColor="white"; var _1a=document.createElement("div"); _1a.id="screen"; _1a.style.position="absolute"; _1a.style.left=_1a.style.top=0; var _1b=null; var _1c=1; _1.appendChild(_18); _18.appendChild(_19); _18.appendChild(_1a); var _1d=new ComponentMinimap(_1,_3,_1a); _1d.setVisible(true); var _1e=new Array(); var _1f=new Array(); var _20=new Array(); var _21=new Array(); var _22=null; var _23={x:0,y:0}; function parseXML(xml){ var _25=null; if(document.implementation&&document.implementation.createDocument){ var _26=new DOMParser(); _25=_26.parseFromString(xml,"text/xml"); }else{ if(window.ActiveXObject){ _25=new ActiveXObject("Microsoft.XMLDOM"); _25.async=false; _25.loadXML(xml); } } return _25; } function getMousePos(_27,e){ if((!window.opera)&&(e.x!=null)&&(e.y!=null)){ return {x:e.x,y:e.y}; } var lx=0,ly=0; do{ lx+=_27.offsetLeft; ly+=_27.offsetTop; }while((_27=_27.offsetParent)!=document.body); return {x:(e.clientX-lx),y:(e.clientY-ly)}; } function isRightClick(e){ return ((e.which)&&(e.which==2))||((e.button)&&(e.button==2))||(e.ctrlKey)||(e.shiftKey); } function getTransition(_2b,end,_2d){ return (end-_2b)*_2d+_2b; } var _2e=function(val){ var str="00000"+val; return str.substr(str.length-5); }; var _31=0; var _32=function(_33,row,_35,_36){ if(_1e[_33]!=null){ var id="br"+_2e(row)+_2e(_35)+_2e(_33); var _38=_1f[id]; if(_38==undefined){ if(_36){ return; } _38=new Image(); _38.id=id; _38.setAttribute("row",row); _38.setAttribute("col",_35); _38.style.position="absolute"; if(!window.opera){ _38.style.display="none"; } _38.onload=function(){ this.style.display=""; }; _38.onerror=function(){ }; _38.src=_8+id; _1f[id]=_38; } var low,high,tsize; var r=_a/_4.levels[_33].ratio; tsize=_4.levels[_33].tilewidth*r; low=Math.round(tsize*_35); high=Math.round(tsize*(_35+1)); _38.style.left=low-_b; _38.style.width=high-low; tsize=_4.levels[_33].tileheight*r; low=Math.round(tsize*row); high=Math.round(tsize*(row+1)); _38.style.top=low-curY; _38.style.height=high-low; if(_38.parentNode!=_1e[_33]){ _1e[_33].appendChild(_38); } } }; var _3b=function(_3c,x1,y1,x2,y2,_41){ var _42=_4.levels[_3c]; var xl=Math.floor(x1/_42.tilewidth); var xh=Math.floor((x2-1)/_42.tilewidth); var yl=Math.floor(y1/_42.tileheight); var yh=Math.floor((y2-1)/_42.tileheight); if(xl<0){ xl=0; } if(xh>=_42.cols){ xh=_42.cols-1; } if(yl<0){ yl=0; } if(yh>=_42.rows){ yh=_42.rows-1; } var lt=_1e[_3c].childNodes; for(var i=lt.length-1;i>=0;--i){ var t=lt[i]; var r,c; r=t.getAttribute("row"); c=t.getAttribute("col"); if((c<xl)||(c>xh)||(r<yl)||(r>yh)){ _1e[_3c].removeChild(t); } } for(i=yl;i<=yh;++i){ for(j=xl;j<=xh;++j){ _32(_3c,i,j,_41); } } }; var _4b=function(ev,_4d,_4e){ for(var i in _17){ if(_17[i].onBrowserEvent(ev,_4d,_4e)){ return; } } if(typeof (_3.onbrowserevent)=="function"){ _3.onbrowserevent(ev,_4d,_4e); } }; var _50=function(){ if(_4==null){ return; } for(var l=_9+1;l<_4.level;++l){ var lev=_1e[l]; var lt=lev.childNodes; for(var i=lt.length-1;i>=0;--i){ lev.removeChild(lt[i]); } } var _55=_b,cright=_b+_1.offsetWidth; var _56=curY,cbottom=curY+_1.offsetHeight; var r=_4.levels[0].ratio/_a; _3b(0,_b*r,curY*r,cright*r,cbottom*r,false); for(var l=_9;l>=1;--l){ r=_4.levels[l].ratio/_a; _3b(l,_b*r,curY*r,cright*r,cbottom*r,l!=_9); } }; var _58=function(x){ if(!_4){ return x; } var _5a=0,bRight=_4.width*_a; if(_11.enabled){ _5a=Math.round(bRight*_11.left); bRight=Math.round(bRight*_11.right); _11.leftPixel=_5a; _11.rightPixel=bRight; }else{ bRight=Math.round(bRight); } if((zoomTimer!=0)&&(zoomTimer2!=0)){ return x; }else{ bRight-=_1.offsetWidth; if(bRight<=_5a){ return (bRight+_5a)/2; }else{ if(x<_5a){ return _5a; }else{ if(x>bRight){ return bRight; } } } return x; } }; var _5b=function(y){ if(!_4){ return y; } var _5d=0,bBottom=_4.height*_a; if(_11.enabled){ _5d=Math.round(bBottom*_11.top); bBottom=Math.round(bBottom*_11.bottom); _11.topPixel=_5d; _11.bottomPixel=bBottom; }else{ bBottom=Math.round(bBottom); } if((zoomTimer!=0)&&(zoomTimer2!=0)){ return y; }else{ bBottom-=_1.offsetHeight; if(bBottom<=_5d){ return (bBottom+_5d)/2; }else{ if(y<_5d){ return _5d; }else{ if(y>bBottom){ return bBottom; } } } return y; } }; var _5e=function(x,y){ var _61=_b; _b=_58(Math.round(x)); curY=_5b(Math.round(y)); if(_b>=_61){ _50(); } if(!_4){ return; } if(_11.enabled){ var lw=_11.rightPixel-_11.leftPixel,lh=_11.bottomPixel-_11.topPixel; var cl=(_b-_11.leftPixel)/lw,ct=(curY-_11.topPixel)/lh; var cr=cl+_1.offsetWidth/lw,cb=ct+_1.offsetHeight/lh; _1d.setCurrent(cl,ct,cr,cb); _19.style.clip="rect("+(_11.topPixel-curY)+" "+(_11.rightPixel-_b)+" "+(_11.bottomPixel-curY)+" "+(_11.leftPixel-_b)+")"; _19.style.padding="1px"; }else{ if((_b<0)||(curY<0)){ var mw=0,mh=0; if(_b<0){ mw=-_b; } if(curY<0){ mh=-curY; } _19.style.clip="rect("+mh+" "+(_1.offsetWidth-mw)+" "+(_1.offsetHeight-mh)+" "+mw+")"; _19.style.padding="1px"; }else{ try{ _19.style.clip="inherit"; } catch(e){ _19.style.clip="rect(auto auto auto auto)"; } } var lw=_4.width*_a,lh=_4.height*_a; var cl=_b/lw,ct=curY/lh; var cr=cl+_1.offsetWidth/lw,cb=ct+_1.offsetHeight/lh; _1d.setCurrent(cl,ct,cr,cb); } if(_b<_61){ _50(); } if(_e||(zoomTimer==0&&zoomTimer2==0)){ for(var i in _20){ if(_20[i]){ _20[i].setViewport(_9,_a,_b,curY,_11); } } } if(zoomTimer==0&&zoomTimer2==0){ var _67=_c; if(_12.enabled){ _c=Math.floor(Math.max(_b,_11.enabled?_11.leftPixel:0)/((_12.pagewidth/2)*_a))+Math.floor(Math.max(curY,_11.enabled?_11.topPixel:0)/(_12.pageheight*_a))*_12.pagesPerRow*2; _12.currentPage=Math.floor(_c/2); }else{ _c=Math.floor(Math.max(_b,_11.enabled?_11.leftPixel:0)/((_12.pagewidth)*_a))+Math.floor(Math.max(curY,_11.enabled?_11.topPixel:0)/(_12.pageheight*_a))*_12.pagesPerRow; _12.currentPage=Math.floor(_c); } if(_c!=_67){ _4b("pagechanged",_c+1,_67+1); } if(_13){ if(_9==_12.mainLevel){ _13.style.display=""; }else{ _13.style.display="none"; } } } }; var _68=function(){ var _69=((new Date()).getTime()-_f)/500; if(_69>=1){ _69=1; _a=zoomTargetRatio; var _6a=_4.level-1; for(var l=0;l<_4.level;++l){ if(_4.levels[l].ratio>=_a){ _6a=l; break; } } _9=_6a; }else{ _a=getTransition(zoomOldRatio,zoomTargetRatio,_69); } var r=_69/(_a/zoomTargetRatio); if(!_4){ return; } _5e(_4.width*_a*getTransition(zoomOldX,zoomCenterX,r)-_1.offsetWidth/2,_4.height*_a*getTransition(zoomOldY,zoomCenterY,r)-_1.offsetHeight/2,false); if(_69>=1){ _10=false; if((zoomTimer!=0)&&(zoomTimer2!=0)){ clearInterval(zoomTimer); clearInterval(zoomTimer2); zoomTimer=0; zoomTimer2=0; if((_15!=null)&&(_15.length>0)){ var _6d=_15.shift(); if(_6d!=null){ _3.Execute(_6d.action,_6d.param); } } } clearInterval(zoomTimer); clearInterval(zoomTimer2); zoomTimer=0; zoomTimer2=0; _5e(_b,curY,_a); if(_e){ for(var i in _20){ if(_20[i]&&(_20[i].type>=2)){ var _6f=document.getElementById(_20[i].id+"_img"); if(_6f){ _6f.style.display=""; } } } }else{ _1b.style.display=""; _1d.setVisible(_3.GetBrowserProperty("showthumbnail")!="no"); } _4b("levelchanged",1+zoomOldLevel,1+_9); } }; var _70=function(_71,cx,cy){ if(!_4){ return; } if((_71<0)||(_71>=_4.level)){ return false; } if((_12.enabled)&&(_71<_12.mainLevel)){ return false; } if(_71<_d){ return false; } _4b("levelchanging",1+_9,1+_71); if(_10){ return; } _10=true; zoomOldLevel=_9; _9=Math.min(_71,_9); _f=(new Date()).getTime(); zoomOldRatio=_a; zoomTargetRatio=_4.levels[_71].ratio; zoomOldX=(_b+_1.offsetWidth/2)/_4.width/_a; zoomOldY=(curY+_1.offsetHeight/2)/_4.height/_a; if(cx==null){ cx=zoomOldX; } var vw=_1.offsetWidth/(_4.width*zoomTargetRatio)/2; var l=0,h=1; if(_11.enabled){ l=_11.left; h=_11.right; } if(vw>=(h-l)/2){ zoomCenterX=l+(h-l)/2; }else{ if(cx<=l+vw){ zoomCenterX=l+vw; }else{ if(cx>=(h-vw)){ zoomCenterX=h-vw; }else{ zoomCenterX=cx; } } } if(cy==null){ cy=zoomOldY; } var vh=_1.offsetHeight/(_4.height*zoomTargetRatio)/2; var l=0,h=1; if(_11.enabled){ l=_11.top; h=_11.bottom; } if(vh>=(h-l)/2){ zoomCenterY=(h-l)/2; }else{ if(cy<=l+vh){ zoomCenterY=l+vh; }else{ if(cy>=(h-vh)){ zoomCenterY=h-vh; }else{ zoomCenterY=cy; } } } if(_e){ for(var i in _20){ if(_20[i]&&(_20[i].type>=2)){ var _78=document.getElementById(_20[i].id+"_img"); if(_78){ _78.style.display="none"; } } } }else{ _1b.style.display="none"; _1d.setVisible(false); } if(_13){ _13.style.display="none"; } if(zoomTimer!=0){ clearInterval(zoomTimer); } if(zoomTimer2!=0){ clearInterval(zoomTimer2); } zoomTimer=setInterval(_68,10); zoomTimer2=setInterval(_68,10); _50(); }; var _79=function(cx,cy,_7c,_7d){ if((_b==cx)&&(curY==cy)){ return; } var _7e=_b,oldY=curY; cx=_58(cx); cy=_5b(cy); if(_7c==undefined){ _7c=_9; } if(_7d==undefined){ _7d=500; } if(_7c!=_9){ _4b("levelchanging",1+_9,1+_7c); } if(_13){ _13.style.visibility="hidden"; } if(_10){ return; } _10=true; var _7f=_4.levels[_7c].ratio; var _80=_a; var _81=(new Date()).getTime(); var _82=setInterval(function(){ var p=Math.min(1,((new Date()).getTime()-_81)/_7d); if(p>=1){ if(_13){ _13.style.visibility=""; } var _84=_9; _9=_7c; _a=_7f; _5e(cx,cy); _10=false; clearInterval(_82); if(_84!=_9){ _4b("levelchanging",1+_84,1+_9); } }else{ _a=getTransition(_a,_7f,p); _5e(getTransition(_7e,cx,p),getTransition(oldY,cy,p)); } },10); }; var _85=function(id){ var _87=null; for(var i=0;i<_21.length;i++){ if(_21[i].id==id){ _87=_21[i]; break; } } if(_87==null||_87.menu==null){ return; } if(_87.menu.isShow){ _87.menu.show(false,true); }else{ if(_87.menu.isCreated){ _87.menu.show(true,false); }else{ _87.menu.update(); } } _87.menu.changePosition(_23.x,_23.y); }; var _89=function(){ for(var i=0;i<_21.length;i++){ var _8b=_21[i]; if(_8b!=null){ _8b.menu.show(false,true); } } }; var _8c=function(bx,by,_8f,_90){ var pw=parseInt(_3.GetBrowserProperty("printpagewidth")),ph=parseInt(_3.GetBrowserProperty("printpageheight")); if(isNaN(pw)||pw<0){ pw=570; } if(isNaN(ph)||ph<0){ ph=817; } var lev=_4.level-1; while((lev>0)&&(_8f*_4.levels[lev-1].ratio>=pw)&&(_90*_4.levels[lev-1].ratio>=ph)){ --lev; } var _93=_4.levels[lev]; var x1=bx*_93.ratio; var y1=by*_93.ratio; var x2=(bx+_8f)*_93.ratio; var y2=(by+_90)*_93.ratio; var iw=x2-x1; var ih=y2-y1; var xl=Math.floor(x1/_93.tilewidth); var xh=Math.floor((x2-1)/_93.tilewidth); var yl=Math.floor(y1/_93.tileheight); var yh=Math.floor((y2-1)/_93.tileheight); if(xl<0){ xl=0; } if(xh>=_93.cols){ xh=_93.cols-1; } if(yl<0){ yl=0; } if(yh>=_93.rows){ yh=_93.rows-1; } var r=Math.min(pw/iw,ph/ih); var tw=_93.tilewidth*r,th=_93.tileheight*r; var tl=-(x1%_93.tilewidth)*r,tt=-(y1%_93.tileheight)*r; var no=(xh-xl+1)*(yh-yl+1); var ix=Math.round((pw-iw*r)/2),iy=Math.round((ph-ih*r)/2); var _a3="<html><head><title></title></head>"; _a3+="<script> var loaded = 0, total = "+no+"; "; _a3+="function load(elm) { ++loaded; document.getElementById(\"prg\").style.width = loaded / total * 300; "; _a3+="if (loaded >= total) { document.getElementById(\"p\").style.display = \"none\";"; _a3+="document.getElementById(\"c\").style.display = \"\"; window.print(); window.close(); } }"; _a3+="function err(elm) { elm.style.display=\"none\"; load(elm); }</script>"; _a3+="<body leftmargin=\"0\" topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\">"; _a3+="<div style=\"position:absolute; left: 0; top: 0; width: 300; height: 100;\" id=\"p\">"; _a3+="<div style=\"position:absolute; left: 10; top: 10;\">Downloading data to print...</div>"; _a3+="<div style=\"position:absolute; left: 10; top: 50; width: 300; height: 30; border: 1px solid black;\">"; _a3+="<div id=\"prg\" style=\"background-color: #000066; border: 1px while solid; height: 100%; width: 0;\"></div>"; _a3+="</div>"; _a3+="</div>"; _a3+="<div style=\"position:absolute; left:"+ix+" ; top:"+iy+" ; clip: rect(0 "+Math.round(iw)+" "+Math.round(ih)+" 0); display: none;\" id=\"c\">"; for(column=xl;column<=xh;++column){ var y=tt; for(row=yl;row<=yh;++row){ var id="br"+_2e(row)+_2e(column)+_2e(lev); _a3+="<img src=\""+_8+id+"\" style=\"position: absolute; left: "; _a3+=Math.round(tl)+"; top: "+Math.round(y); _a3+="; width: "+(Math.round(tl+tw)-Math.round(tl))+"; height: "; _a3+=Math.round(y+th)-Math.round(y)+";\" onerror=\"err(this);\" onload=\"load(this);\">"; y+=th; } tl+=tw; } _a3+="</div></body></html>"; var _a6=window.open("","","scrollbars=no, menubar=no, toolbar=no, resizable=no, width=320, height=100"); _a6.document.open(); _a6.document.writeln(_a3); _a6.document.close(); }; var _a7=function(x1,y1,x2,y2,_ac,_ad){ var _ae=_19.cloneNode(false); _ae.style.visibility=""; var _af=_4.levels[_ad]; x1=x1*_af.ratio; x2=x2*_af.ratio; y1=y1*_af.ratio; y2=y2*_af.ratio; var xl=Math.floor(x1/_af.tilewidth); var xh=Math.floor((x2-1)/_af.tilewidth); var yl=Math.floor(y1/_af.tileheight); var yh=Math.floor((y2-1)/_af.tileheight); if(xl<0){ xl=0; } if(xh>=_af.cols){ xh=_af.cols-1; } if(yl<0){ yl=0; } if(yh>=_af.rows){ yh=_af.rows-1; } var r=_ac/_af.ratio; var tw=_af.tilewidth*r,th=_af.tileheight*r; var tl=-(x1%_af.tilewidth)*r,tt=-(y1%_af.tileheight)*r; _ae.leftmost=tl; _ae.tilewidth=tw; _ae.totaltiles=0; _ae.currenttiles=0; for(column=xl;column<=xh;++column){ var y=tt; for(row=yl;row<=yh;++row){ _ae.totaltiles++; var id="br"+_2e(row)+_2e(column)+_2e(_ad); var _b9; _b9=new Image(); _b9.checked=false; _b9.onload=function(){ this.style.display=""; if(!this.checked){ _ae.currenttiles++; this.checked=true; } }; _b9.onerror=function(){ this.style.display="none"; if(!this.checked){ _ae.currenttiles++; this.checked=true; } }; _b9.style.position="absolute"; _b9.src=_8+id; _b9.oleft=tl; _b9.style.left=Math.round(tl); _b9.style.top=Math.round(y); _b9.style.width=Math.round(tl+tw)-Math.round(tl); _b9.style.height=Math.round(y+th)-Math.round(y); _b9.style.display=""; _ae.appendChild(_b9); y+=th; } tl+=tw; } var _ba=(x2-x1)*r,clipheight=(y2-y1)*r; _ae.style.clip="rect(0 "+Math.round(_ba)+" "+Math.round(clipheight)+" 0)"; _ae.style.position="absolute"; _ae.setWidth=function(_bb){ var _bc=_ae.childNodes; var tw=parseFloat(_ae.tilewidth); var t,l; for(var i=0;i<_bc.length;++i){ t=_bc[i]; l=Math.round(parseFloat(t.oleft)*_bb); t.style.left=l; t.style.width=Math.round(l+tw*_bb)-l; } _ae.style.clip="rect(0 "+Math.round(_ba*_bb)+" "+Math.round(clipheight)+" 0)"; }; return _ae; }; var _c0=function(_c1){ if(!_4){ return; } var _c2=_12.pagewidth*(_c1%_12.pagesPerRow); var _c3=_12.pageheight*Math.floor(_c1/_12.pagesPerRow); _11.enabled=true; _11.left=_c2/_4.width; _11.top=_c3/_4.height; _11.right=(_c2+_12.pagewidth)/_4.width; _11.bottom=(_c3+_12.pageheight)/_4.height; _5e(_c2*_a,_c3*_a); var _c4=_1d.getThumbSize(); var _c5=_a7(_c2,_c3,_c2+_12.pagewidth,_c3+_12.pageheight,Math.min(_c4.width/_12.pagewidth,_c4.height/_12.pageheight),0); _1d.setThumbnail(_c5); }; var _c6=function(_c7,_c8){ if((_c7<0)||(_c7==_12.currentPage)||(_c7>=_12.totalPages)){ return; } if(_10){ return; } if(_12.enabled){ if(_9!=_12.mainLevel){ _15.push({action:"gotopage",param:_c7+1}); _70(_12.mainLevel); return; } var _c9=(_3.GetBrowserProperty("onepageflip").toLowerCase()=="yes"); var _ca=_c7<_12.currentPage; switch(_3.GetBrowserProperty("DragDirection").toLowerCase()){ case "forward": _ca=false; break; case "backward": _ca=true; break; } var _cb=parseInt(_3.GetBrowserProperty("transitionduration")); if(isNaN(_cb)){ _cb=300; } var cx=_12.pagewidth*(_12.currentPage%_12.pagesPerRow); var cy=_12.pageheight*Math.floor(_12.currentPage/_12.pagesPerRow); var nx=_12.pagewidth*(_c7%_12.pagesPerRow); var ny=_12.pageheight*Math.floor(_c7/_12.pagesPerRow); var p1,p2,np; var _d1=cx*_a-_b,top=cy*_a-curY,pw=_12.pagewidth*_a/2; if(_c9){ p1=_a7(cx,cy,cx+_12.pagewidth,cy+_12.pageheight,_a,0); p2=_a7(nx,ny,nx+_12.pagewidth,ny+_12.pageheight,_a,0); p1.style.top=p2.style.top=top; p1.style.left=p2.style.left=_d1; p1.style.display=p2.style.display="none"; if(_ca){ p2.setWidth(0); _18.appendChild(p1); _18.appendChild(p2); }else{ _18.appendChild(p2); _18.appendChild(p1); } }else{ p1=_a7(cx,cy,cx+_12.pagewidth/2,cy+_12.pageheight,_a,0); p2=_a7(cx+_12.pagewidth/2,cy,cx+_12.pagewidth,cy+_12.pageheight,_a,0); if(_ca){ np=_a7(nx+_12.pagewidth/2,ny,nx+_12.pagewidth,ny+_12.pageheight,_a,0); }else{ np=_a7(nx,ny,nx+_12.pagewidth/2,ny+_12.pageheight,_a,0); } np.style.top=p1.style.top=p2.style.top=top; p1.style.left=_d1; p2.style.left=_d1+pw; np.style.left=_ca?(_d1+pw):_d1; np.setWidth(0); p1.style.display=p2.style.display="none"; if(np){ np.style.display="none"; } _18.appendChild(p1); _18.appendChild(p2); _18.appendChild(np); } _10=true; var _d2=(new Date()).getTime(); var _d3=true; var _d4=setInterval(function(){ if(_d3){ if(((p1.currenttiles>=p1.totaltiles)&&(p2.currenttiles>=p2.totaltiles)&&((np==null)||(np.currenttiles>=np.totaltiles)))){ _4b("pageflipping",_c7,null); _d3=false; p1.style.display=p2.style.display=""; if(np){ np.style.display=""; } _1a.style.display="none"; _1b.style.display="none"; _c0(_c7); _d2=(new Date()).getTime(); }else{ if(((new Date()).getTime()-_d2)>1500){ _4b("pageflipping",_c7,null); _d3=false; _c0(_c7); }else{ return; } } } var _d5=Math.min(1,((new Date()).getTime()-_d2)/_cb); if(_c9){ if(_ca){ p2.setWidth(_d5); }else{ p1.setWidth(1-_d5); } }else{ if(_ca){ var rr=1-_d5*2; p1.setWidth(Math.max(0,rr)); p1.style.left=_d1+Math.round(pw*(1-rr)); np.setWidth(Math.max(0,_d5*2-1)); }else{ p2.setWidth(Math.max(0,1-_d5*2)); var rr=Math.max(0,_d5*2-1); np.setWidth(rr); np.style.left=_d1+Math.round(pw*(1-rr)); } } if(_d5>=1){ clearInterval(_d4); _10=false; _18.removeChild(p2); _18.removeChild(p1); if(np){ _18.removeChild(np); } if((_15!=null)&&(_15.length>0)){ var _d7=_15.shift(); if(_d7!=null){ _3.Execute(_d7.action,_d7.param); } } _1b.style.display=""; _1a.style.display=""; } },10); }else{ var nx,ny; nx=_58(_12.pagewidth*(_c7%_12.pagesPerRow)*_a); ny=_5b(_12.pageheight*Math.floor(_c7/_12.pagesPerRow)*_a); while((_c8)&&(nx==_b)&&(ny==curY)){ if(++_c7>=_12.totalPages){ return; } nx=_58(_12.pagewidth*(_c7%_12.pagesPerRow)*_a); ny=_5b(_12.pageheight*Math.floor(_c7/_12.pagesPerRow)*_a); } _79(nx,ny); } }; var _d8=0,dragX,dragY,oldX,oldY,dragInterval; var _d9=0; var _da=function(){ _d9=0; if(_4==null){ return; } var _db=null; if(_22!=null){ _db=_22.getProperty("href"); } if((_db!=null)&&(_db.length>0)&&(_db.toLowerCase()!="null")){ _3.FollowLink(_db,_22.no); }else{ var pos=_23; _70(_9+1,(pos.x+_b)/_4.width/_a,(pos.y+curY)/_4.height/_a); } }; var _dd=function(e){ if(_4==null){ return; } if((_12.enabled)&&(_12.mainLevel==_9)){ if((_1.offsetWidth/2)>(window.opera?(e.clientX-_1.offsetLeft):(e.x?e.x:e.clientX-_1.offsetLeft))){ _3.Execute("prevpage",""); }else{ _3.Execute("nextpage",""); } }else{ var pos=getMousePos(_1,e); _70(_9-1,(pos.x+_b)/_4.width/_a,(pos.y+curY)/_4.height/_a); } }; var _e0=function(e){ _89(); if(!e){ var e=window.event; } if(typeof (_3.onmouseevent)=="function"){ var pos=getMousePos(_1,e); var _e3=0; if(e.ctrlKey){ _e3+=8; } if(e.shiftKey){ _e3+=4; } if(((e.which)&&(e.which==2))||((e.button)&&(e.button==2))){ _e3+=2; }else{ _e3+=1; } _3.onmouseevent((_e3&1>0)?"ldown":"rdown",pos.x,pos.y,_e3); } if((zoomTimer!=0)||(zoomTimer2!=0)){ return; } if(!isRightClick(e)){ if(typeof e.preventDefault!="undefined"){ e.preventDefault(); } if(_d9!=0){ clearInterval(_d9); _d9=0; _d8=4; }else{ _d8=1; dragX=e.clientX; dragY=e.clientY; oldX=_b; oldY=curY; } }else{ _d8=3; } return false; }; var _e4=function(e){ if(!e){ var e=window.event; } if(typeof (_3.onmouseevent)=="function"){ var pos=getMousePos(_1,e); var _e7=0; if(e.ctrlKey){ _e7+=8; } if(e.shiftKey){ _e7+=4; } if(((e.which)&&(e.which==2))||((e.button)&&(e.button==2))){ _e7+=2; }else{ _e7+=1; } _3.onmouseevent((_e7&1>0)?"lup":"rup",pos.x,pos.y,_e7); } var str=""; var _e9=isRightClick(e); if((_d9!=0)||(_d8==4)){ clearInterval(_d9); _d9=0; _dd(e); }else{ if((_d8==1)||(_d8==3)||(e.type=="contextmenu")){ if(_e9){ _dd(e); }else{ if(document.all){ _da(e); }else{ _d9=setTimeout(_da,200,e); } } } } }; var _ea=function(e){ if(!e){ var e=window.event; } if((_d8!=0)&&(!isRightClick(e))){ _d8=0; } }; var _ec=function(e){ if(!e){ var e=window.event; } _23=getMousePos(_1,e); if(typeof (_3.onmouseevent)=="function"){ var _ee=0; if(e.ctrlKey){ _ee+=8; } if(e.shiftKey){ _ee+=4; } if(((e.which)&&(e.which==2))||((e.button)&&(e.button==2))){ _ee+=2; }else{ _ee+=1; } _3.onmouseevent("move",_23.x,_23.y,_ee); } switch(_d8){ case 1: if((Math.abs(e.clientX-dragX)>4)||(Math.abs(e.clientY-dragY)>4)){ _d8=2; } break; case 2: _5e(oldX-e.clientX+dragX,oldY-e.clientY+dragY,true); break; } }; var _ef=function(e){ if(!e){ var e=window.event; } var _f1=(e.detail)?e.detail*40:-e.wheelDelta; switch(_7["wheelaction"]){ case "pan": if((_12.enabled)&&(_12.mainLevel==_9)){ _3.Execute((_f1<0)?"prevpage":"nextpage",0); }else{ _5e(_b,curY+_f1/2); } break; case "zoom": if((_f1>0)&&(_12.enabled)&&(_12.mainLevel==_9)){ _3.Execute("nextpage",0); }else{ _3.Execute((_f1<0)?"zoomin":"zoomout",0); } break; case "news": default: if((_12.enabled)&&(_12.mainLevel<_9)){ _5e(_b,curY+_f1/2); }else{ _3.Execute((_f1<0)?"prevpage":"nextpage",0); } break; } }; var _f2=function(e){ if(!e){ var e=window.event; } var _f4=(e.keyCode)?e.keyCode:e.which; var _f5=0; if(e.ctrlKey){ _f5+=8; } if(e.shiftKey){ _f5+=4; } _3.ProcessEvent("key",_f4,_f5,0,0); }; var _f6=function(e){ _3.viewportWidth=_1.offsetWidth; _3.viewportHeight=_1.offsetHeight; if(_12.enabled){ var _f8=_12.mainLevel; _12.mainLevel=0; for(var i=_4.level-1;i>=0;--i){ if((_4.levels[i].ratio*_12.pagewidth<=_1.offsetWidth)&&(_4.levels[i].ratio*_12.pageheight<=_1.offsetHeight)){ _12.mainLevel=i; break; } } if(_9<_12.mainLevel){ _9=_12.mainLevel; _a=_4.levels[_9].ratio; }else{ if(_9==_f8){ _9=_12.mainLevel; _a=_4.levels[_9].ratio; } } _d=_12.mainLevel; } _5e(_b,curY); if(_13){ _13.style.left=Math.floor((_1.offsetWidth/2)-18); _13.style.top=_11.topPixel-curY; _13.style.height=(_11.bottomPixel-_11.topPixel); } _1d.setSize(150); _4b("resize",null,null); }; var _fa=function(){ _18.onmousemove=_ec; _18.onmousedown=_e0; _18.onmouseup=_e4; document.onkeydown=_f2; if(document.addEventListener){ document.addEventListener("mouseup",_ea,false); window.onresize=_f6; if(window.opera){ _18.onmousewheel=_ef; }else{ _18.addEventListener("DOMMouseScroll",_ef,false); } }else{ document.attachEvent("onmouseup",_ea); window.attachEvent("onresize",_f6); _18.onmousewheel=_ef; } if(_1.getAttribute("url")){ _3.SetContent(_1.getAttribute("url")); } }; this.SetContent=function(url){ if(_1b!=null){ for(var i in _20){ if(_20[i]){ var _fd=document.getElementById(_20[i].id+"_img"); if(_20[i].type==3&&_fd&&_fd.controls){ _fd.controls.stop(); } } } _19.removeChild(_1b); _1b=null; } for(k in _1e){ _19.removeChild(_1e[k]); } if(_13!=null){ _13.parentNode.removeChild(_13); _13=null; } _c=-1; _9=0; _a=1; _b=0,curY=0; _d=-1; _4=null; _19.style.visibility="hidden"; _1e=new Array(); _1f=new Array(); _7=new Array(); _7["version"]=_2; _7["httpport"]="8080"; var _fe=["BackgroundColor","ShowThumbnail","HTTPPort","WheelAction","ImageUrl"]; for(var i=0;i<_fe.length;++i){ var _ff=_1.getAttribute(_fe[i]); if((_ff!=null)&&(_ff.length>0)){ _3.SetBrowserProperty(_fe[i],_ff); } } for(var i in _17){ _17[i].onUnload(); } var urlc=url.split(",",5); if(urlc.length>=4){ url=urlc[0]; urlc[1]=parseInt(urlc[1]); urlc[2]=parseInt(urlc[2]); urlc[3]=parseInt(urlc[3]); _3.initpos=urlc; }else{ _3.initpos=null; } _20=new Array(); _1c=1; _1.setAttribute("url",url); if((url=="")||(url=="#")){ return; } if(url.substr(0,6).toLowerCase()=="ipq://"){ var p=url.indexOf("/",6); if(p>=0){ var temp=url.substring(6,p); if(temp.indexOf(":")<0){ temp=temp.concat(":").concat(_7["httpport"]); } url="http://"+temp+url.substring(p); if(url.charAt(url.length-1)!="/"){ url=url.concat("/"); } } } _8=url; var _103=document.createElement("script"); _103.id="rs"; _103.setAttribute("type","text/javascript"); _103.setAttribute("src",url+"x0"+_16); _1.appendChild(_103); _5.push(_103); }; this.onHeaderLoaded=function(_104){ _9=0; _a=1; _b=0; curY=0; _4=_104; for(var i=0;i<_5.length;++i){ if(_5[i].parentNode){ _5[i].parentNode.removeChild(_5[i]); } } if(_4.xmml==null){ _4.xmml="<xmml></xmml>"; } _6=parseXML(_4.xmml); var _106; _4.width=_4.levels[_4.level-1].width; _4.height=_4.levels[_4.level-1].height; for(var i=0;i<_4.level;++i){ _106=document.createElement("div"); _106.id="l"+i; _19.appendChild(_106); _1e[i]=_106; _4.levels[i].ratio=_4.levels[i].width/_4.width; } _1b=document.createElement("div"); _1b.id="object"; _1b.browser=_3; _19.appendChild(_1b); _9=0; var _107=_6.getElementsByTagName("param"); for(var i=0;i<_107.length;++i){ _7[_107[i].getAttribute("name").toLowerCase()]=_107[i].getAttribute("value"); } _12.enabled=(_7["type"])&&(_7["type"].toLowerCase()=="news"); _12.pagewidth=parseInt(_7["pagewidth"]); _12.pageheight=parseInt(_7["pageheight"]); if(isNaN(_12.pagewidth)||(_12.pagewidth<=0)){ _12.pagewidth=_4.width; } if(isNaN(_12.pageheight)||(_12.pageheight<=0)){ _12.pageheight=_4.height; } _12.pagesPerRow=Math.ceil(_4.width/_12.pagewidth); _12.totalPages=_12.pagesPerRow*Math.floor(_4.height/_12.pageheight+0.5); _3.SetBrowserProperty("pagecount",_12.totalPages); _12.currentPage=0; _3.viewportWidth=_1.offsetWidth; _3.viewportHeight=_1.offsetHeight; if(_12.enabled){ _12.mainLevel=0; for(var i=_4.level-1;i>=0;--i){ if((_4.levels[i].ratio*_12.pagewidth<=_1.offsetWidth)&&(_4.levels[i].ratio*_12.pageheight<=_1.offsetHeight)){ _12.mainLevel=i; break; } } _9=_12.mainLevel; _11.enabled=true; _11.left=_11.top=0; _11.right=_12.pagewidth/_4.width; _11.bottom=_12.pageheight/_4.height; _1d.setMinimap(_12.pagewidth,_12.pageheight,null); _c0(0); if((_7["allowshadow"]!="no")&&(_7["onepageflip"]!="yes")){ _13=document.createElement("div"); _1a.appendChild(_13); _13.style.position="absolute"; _13.style.width=_14.length; var html=""; for(var i=0;i<_14.length;++i){ html+="<div style=\"float: left; background-color: #606060; overflow: hidden; width: 1px; height: 100%; opacity: "+(_14[i]/255)+"; filter: alpha(opacity="+Math.floor(_14[i]/255*100)+");\"></div>"; } _13.innerHTML=html; } }else{ _11.enabled=false; _1d.setMinimap(_4.width,_4.height,_8+"dr"); } var maps=_6.getElementsByTagName("map"); for(var i=0;i<maps.length;++i){ var _10a=maps[i].childNodes; for(var j=0;j<_10a.length;++j){ var attr=_10a[j].attributes; var _10d=new Array(); for(var t=0;t<attr.length;++t){ _10d[attr[t].name]=attr[t].value; } _3.AddObject(_10a[j].tagName,_10d); } } var _10f=_6.getElementsByTagName("menu"); var _110=new MenuCreator(_1,_3); for(var j=0;j<_10f.length;j++){ if(_10f[j].nodeName=="menu"){ var _111=_110.createMenu(_10f[j]); if(_111!=null){ _21.push(_111); } } } _a=_4.levels[_9].ratio; _5e(_b,curY,true); if(_13){ _13.style.left=Math.floor((_1.offsetWidth/2)-18); _13.style.top=_11.topPixel-curY; _13.style.height=(_11.bottomPixel-_11.topPixel); } if(window.opera){ _f6(); } _19.style.visibility=""; if(_3.initpos!=null){ _3.MoveTo(_3.initpos[1],_3.initpos[2],_3.initpos[3]); } for(var i in _17){ _17[i].onLoad(); } if(_3.created!=true){ _4b("created",_2,null); _3.created=true; } }; this.GetPageOffset=function(page){ var ret=new Object(); ret.offsetX=(_12.pagewidth/2)*(page%(_12.pagesPerRow*2)); ret.offsetY=_12.pageheight*Math.floor(page/(_12.pagesPerRow*2)); return ret; }; this.AddObject=function(type,_115){ var comp=null; switch(type.toLowerCase()){ case "rect": case "img": case "rectangle": comp=new IBrowserComponent(1,_1c++,_1b,_1a); break; case "flash": comp=new IBrowserComponent(2,_1c++,_1b,_1a); break; case "movie": case "video": comp=new IBrowserComponent(3,_1c++,_1b,_1a); break; } if(comp==null){ return -1; } comp.setViewport(_9,_a,_b,curY,_11); if(typeof (_115)=="object"){ for(var k in _115){ comp.setProperty(k,_115[k]); } }else{ comp.setAttributeString(_115); } comp.setViewport(_9,_a,_b,curY,_11); _20[comp.no]=comp; return comp.no; }; var _118=function(_119){ var str=""; for(var i=0;i<_119.length;++i){ var attr=_119[i].attributes; var _11d=new Array(); for(var t=0;t<attr.length;++t){ _11d[attr[t].name]=attr[t].value; } str=str+_3.AddObject(_119[i].tagName,_11d)+" "; } return str; }; this.AddXML=this.AddXMML=function(_11f){ var res=""; try{ var _121=parseXML(_11f); var _122=_121.getElementsByTagName("rect"); res=_118(_122); var imgs=_121.getElementsByTagName("img"); res=res+_118(imgs); } catch(e){ } return res; }; this.SetObjectProperty=function(id,prop,_126){ var obj=_20[id]; if(obj!=null){ obj.setProperty(prop,_126); } }; this.GetObjectProperty=function(id,prop){ var obj=_20[id]; if(obj!=null){ return obj.getProperty(prop); } return null; }; this.RemoveObject=function(id){ var obj=_20[id]; if(obj!=null){ obj.release(); _20[id]=null; } }; this.CommitObjectProperty=function(id){ var obj=_20[id]; if(obj!=null){ obj.setViewport(_9,_a,_b,curY,_11); } }; this.GetObjectIDList=function(){ var list=new Array(); for(var id in _20){ list[list.length]=id; } return list.join(" "); }; this.GetObjectIDByName=function(name){ for(var id in _20){ if(_20[id]&&_20[id].getProperty("name")==name){ return id; } } return -1; }; this.GetSelectedObjectID=function(){ return -1; }; this.QueryObject=function(x1,y1,x2,y2,_137){ return ""; }; this.Repaint=function(){ }; this.Execute=function(_138,_139){ _89(); if(_4==null){ return; } _138=_138.toLowerCase(); for(var i in _17){ if(_17[i].Execute(_138,_139)){ return; } } switch(_138){ case "nextpage": case "snapright": _c6(_12.currentPage+1,true); break; case "prevpage": case "snapleft": _c6(_12.currentPage-1); break; case "uppage": _c6(_12.currentPage-_12.pagesPerRow); break; case "downpage": _c6(_12.currentPage+_12.pagesPerRow); break; case "gotopage": _c6(parseInt(_139)-1); break; case "gotohpage": _c6(parseInt((parseInt(_139)-1)/2)); break; case "zoomto": _70(parseInt(_139)); break; case "zoomin": _70(_9+1); break; case "zoomout": _70(_9-1); break; case "zoomintocursor": var pos=_23; _70(_9+1,(pos.x+_b)/_4.width/_a,(pos.y+curY)/_4.height/_a); break; case "zoomouttocursor": var pos=_23; _70(_9-1,(pos.x+_b)/_4.width/_a,(pos.y+curY)/_4.height/_a); break; case "zoomtocursor": var pos=_23; _70(parseInt(_139),(pos.x+_b)/_4.width/_a,(pos.y+curY)/_4.height/_a); break; case "zoomleftpage": if(_12.enabled&&_12.mainLevel==_9){ _70(_9+1,_b/_a/_4.width,curY/_a/_4.height); } break; case "zoomrightpage": if(_12.enabled&&_12.mainLevel==_9){ _70(_9+1,(_b/_a+_12.pagewidth)/_4.width,curY/_a/_4.height); } break; case "panto": var p=_139.split(","); if(p.length==2){ _79(p[0],p[1]); }else{ if(p.length>2){ _79(p[0],p[1],Math.max(1,parseInt(p[2])-1)); } } break; case "menu": _85(_139); break; case "pantoratio": var p=_139.split(","); if(p.length>=2){ var nx=(_11.enabled)?(_11.leftPixel+(_11.rightPixel-_11.leftPixel)*p[0]):(_4.width*_a*p[0]); var ny=(_11.enabled)?(_11.topPixel+(_11.bottomPixel-_11.topPixel)*p[1]):(_4.height*_a*p[1]); _5e(nx,ny); } break; case "goto": var p=_139.split(","); if(p.length>=3){ _3.MoveTo(parseInt(p[0]),parseInt(p[1]),parseInt(p[2])+1); } case "keyboard": _3.ProcessEvent("key",parseInt(_139),0,0,0); break; case "printarea": var p=_139.split(","); if(p.length>=4){ _8c(parseInt(p[0]),parseInt(p[1]),parseInt(p[2]),parseInt(p[3])); } break; case "objectexec": var name=/name='([^\']+)'/i.exec(_139); var _138=/action='([^\']+)'/i.exec(_139); var par=/action='([^\']+)'/i.exec(_139); if(name!=null){ name=name[1]; } if(_138!=null){ _138=_138[1]; } if(par!=null){ par=par[1]; } if(name&&_138){ for(var id in _20){ if(_20[id]&&_20[id].getProperty("name")==name){ _20[id].Execute(_138,par); } } } break; case "refreshsize": _f6(); default: return false; } return true; }; this.SetBrowserProperty=function(name,_143){ name=name.toLowerCase(); switch(name){ case "backgroundcolor": _19.style.backgroundColor=_143; break; case "showthumbnail": _1d.setVisible(_143.toLowerCase()!="no"); break; case "version": return; case "minlevel": _d=parseInt(_143)-1; if(isNaN(_d)){ _d=-1; } if(_9<_d){ _70(_d); } break; case "objectsmoothzoom": _e=(_143.toLowerCase()!="no"); break; case "imageurl": if(_143[_143.length-1]!="/"){ _143=_143+"/"; } break; } _7[name]=_143; }; this.GetBrowserProperty=function(name){ name=name.toLowerCase(); switch(name){ case "topobjectid": if(_22==null){ return ""; }else{ return _22.no; } break; case "minlevel": return _d+1; break; case "mainlevel": return _12.mainLevel+1; break; case "currentpage": return _12.currentPage+1; break; default: var ret=_7[name]; if(ret==null){ ret=""; } return ret; } }; this.SetTopObject=function(obj,over){ if(over){ _22=obj; }else{ if(_22==obj){ _22=null; } } }; this.FollowLink=function(link,id){ var p; var _14b=null; if(link.charAt(0)=="("){ p=link.indexOf(")"); if(p>0){ _14b=link.substring(1,p); link=link.substr(p+1); } } p=link.indexOf(":"); var cmd="",param=link; if(p>0){ cmd=link.substr(0,p).toLowerCase(); param=link.substr(p+1); } if((_14b!=null)||(cmd=="http")||(cmd=="javascript")){ _4b("FollowLink",link,null); if(_14b==null){ window.open(link,"_blank"); }else{ window.open(link,_14b); } }else{ if(cmd=="exec"){ p=param.indexOf(","); var _14d=param,ap=""; if(p>0){ _14d=param.substr(0,p); ap=param.substr(p+1); } _3.Execute(_14d,ap); }else{ if(cmd.substr(0,3)=="ext"){ _4b("FollowLink",link,id); }else{ if(!(_3.Execute(cmd,param))){ var _14e; var _14f=_1.getAttribute("url"); if(link.charAt(0)=="/"){ p=_14f.indexOf("://")+3; _14e=_14f.substr(0,_14f.indexOf("/",p))+link; }else{ if(link.substr(0,7).toLowerCase()=="ipq://"){ _14e=link; }else{ _14e=_14f.substr(0,_14f.lastIndexOf("/")+1)+attributes.href; } } _4b("FollowLink",_14e,null); _3.SetContent(_14e); } } } } }; this.GetImageUrl=function(url){ if(url.substr(0,7).toLowerCase()=="http://"){ return url; } var ext=url.substring(url.length-4).toLowerCase(); var _152=((ext==".tif")||(ext==".ipq"))?"dr.jpg":"cr"; if(url.substr(0,6).toLowerCase()=="ipq://"){ var p=url.indexOf("/",6); if(p>=0){ var temp=url.substring(6,p); if(temp.indexOf(":")<0){ temp=temp.concat(":").concat(_7["httpport"]); } url="http://"+temp+url.substring(p); if(url.charAt(url.length-1)!="/"){ url=url.concat("/"); } return url+_152; } }else{ if(url.indexOf("://")>0){ return url; } } var _155=_8.substr(0,_8.length-1); if(url.charAt(0)=="/"){ while((url.length>2)&&(url.substring(0,2)=="//")){ url=url.substring(1); } var p=_155.indexOf("://")+3; return _155.substr(0,_155.indexOf("/",p))+url+"/"+_152; }else{ return _155.substr(0,_155.lastIndexOf("/")+1)+url+"/"+_152; } }; this.GetXMML=function(){ return _6; }; this.ProcessEvent=function(evt,_157,_158,_159,_15a){ if(evt.toLowerCase()=="key"){ _3.SetBrowserProperty("Process_Event","yes"); _4b("key",_157,_158); if(_3.GetBrowserProperty("Process_Event")!="yes"){ return false; } switch(_157){ case 37: if((_12.enabled)&&(_12.mainLevel==_9)){ _3.Execute("prevpage",0); }else{ if((!_12.enabled)&&(_12.totalPages>1)&&(_12.pagewidth*_a<_1.offsetWidth*2)){ _3.Execute("prevpage",0); }else{ _79(_b-(_1.offsetWidth/2),curY); } } break; case 38: if((!_12.enabled)&&(_12.totalPages>1)&&(_12.pagewidth*_a<_1.offsetWidth*2)){ _3.Execute("uppage",0); }else{ _79(_b,curY-(_1.offsetHeight/2)); } break; case 39: case 32: if((_12.enabled)&&(_12.mainLevel==_9)){ _3.Execute("nextpage",0); }else{ if((!_12.enabled)&&(_12.totalPages>1)&&(_12.pagewidth*_a<_1.offsetWidth*2)){ _3.Execute("nextpage",0); }else{ _79(_b+(_1.offsetWidth/2),curY); } } break; case 40: if((!_12.enabled)&&(_12.totalPages>1)&&(_12.pagewidth*_a<_1.offsetWidth*2)){ _3.Execute("downpage",0); }else{ _79(_b,curY+(_1.offsetHeight/2)); } break; case 107: case 187: _3.Execute("zoomin",0); break; case 109: case 189: _3.Execute("zoomout",0); break; case 33: _3.Execute("prevpage",0); break; case 34: _3.Execute("nextpage",0); break; case 36: _3.Execute("gotopage",1); break; case 35: _3.Execute("gotopage",_12.totalPages); break; case 72: if(_158==12){ alert("== Innotive iJax Browser "+_3.GetBrowserProperty("version")+" ==\n\n"+"http://www.innotive.com"); } break; default: return false; } return true; }else{ if(evt.toLowerCase()=="event"){ _4b(_157,_158,_159); } } }; this.GetCurrentLevel=function(){ return _9+1; }; this.GetLevelCount=function(){ return _4.level; }; this.GetMapWidth=function(_15b){ try{ return _4.levels[_15b-1].width; } catch(e){ return -1; } }; this.GetMapHeight=function(_15c){ try{ return _4.levels[_15c-1].height; } catch(e){ return -1; } }; this.GetLayer=function(){ return _1; }; this.GetViewportWidth=function(){ return _3.viewportWidth; }; this.GetViewportHeight=function(){ return _3.viewportHeight; }; this.GetViewportX=function(){ return _b; }; this.GetViewportY=function(){ return curY; }; this.MoveTo=function(x,y,_15f){ if((_15f>=1)&&(_15f<=_4.level)){ _9=_15f-1; _a=_4.levels[_9].ratio; if(_12.enabled){ var np=Math.floor(x/(_12.pagewidth*_a))+Math.floor(y/(_12.pageheight*_a))*_12.pagesPerRow; _c0(np); } _5e(x,y); } }; this.MoveTo2=function(x,y,_163){ if((_163>=1)&&(_163<=_4.level)){ var _164=_4.levels[_163-1].ratio; _3.MoveTo(x*_164,y*_164,_163); } }; this.AddExtension=function(ext){ _17.push(ext); ext.initialize(_3); if(_4!=null){ ext.onLoad(); } }; _fa(); return this; } IBrowserComponent=function(type,id,_168,_169){ var _16a="_aibrowser"; this.no=id; this.id=_16a+id; this.parent=_168; this.screenParent=_169; this.browser=_168.browser; var _16b=document.createElement("div"); _16b.id=this.id; _16b.style.position="absolute"; _16b.style.overflow="hidden"; if((document.all)&&(!window.opera)){ var _16c=new Image(); _16c.style.width=_16c.style.height="100%"; _16c.style.position="absolute"; _16c.style.left=_16c.style.top=0; _16c.src=_168.browser.GetBrowserProperty("imageurl")+"space.gif"; _16b.appendChild(_16c); } this.compLayer=_16b; this.parent.appendChild(_16b); _16b.style.zIndex=2; _16b.mappingComp=this; _16b.onmouseover=function(e){ this.mappingComp.OnMouseoverEvent(e); }; _16b.onmouseout=function(e){ this.mappingComp.OnMouseoutEvent(e); }; this.div=_16b; this.div_draw=_16b; this.type=type; this.src=null; this.curLevel=0; this.curRatio=1; this.curX=0; this.curY=0; this.minLevel=-1; this.maxLevel=-1; this.offsetX=0; this.offsetY=0; this.left=0; this.top=0; this.width=0; this.height=0; this.isScreen=false; this.inScreen=true; this.inLevel=false; this.compProperty=new Array(); this.mouseAction=new Array(false,false,false,false,false); this.soundonmouse=false; this.setProperty("width",10); this.setProperty("height",10); this.setProperty("x",0); this.setProperty("y",0); this.setProperty("fillcolor","transparent"); }; IBrowserComponent.prototype={Execute:function(name,_170){ if(this.type==3){ var _171=null; switch(name.toLowerCase()){ case "play": _171=document.getElementById(this.id+"_img"); if((_171)&&(_171.controls)){ _171.controls.play(); } break; case "stop": _171=document.getElementById(this.id+"_img"); if((_171)&&(_171.controls)){ _171.controls.stop(); } break; case "pause": _171=document.getElementById(this.id+"_img"); if((_171)&&(_171.controls)){ _171.controls.pause(); } break; } } },setViewport:function(_172,_173,x,y,_176){ if(_172!=undefined){ if(this.curLevel!=_172){ this.curLevel=_172; this.checkInLevel(); } } if(_173!=undefined){ this.curRatio=_173; } if(x!=undefined){ this.curX=x; } if(y!=undefined){ this.curY=y; } if(!(this.isScreen)){ var left=((this.offsetX+this.left)*this.curRatio-this.curX); var top=((this.offsetY+this.top)*this.curRatio-this.curY); var _179=(this.width*this.curRatio); var _17a=(this.height*this.curRatio); var _17b; if((!this.inLevel)||(!this.visible)){ _17b=false; }else{ if((_176.enabled)&&(_176.leftPixel)){ var curX=this.browser.GetViewportX(),curY=this.browser.GetViewportY(); _17b=((left<Math.min(this.browser.GetViewportWidth(),_176.rightPixel-curX))&&(top<Math.min(this.browser.GetViewportHeight(),_176.bottomPixel-curY))&&(left+_179>=Math.max(0,_176.leftPixel-curX))&&(top+_17a>=Math.max(0,_176.topPixel-curY))); }else{ _17b=((left<this.browser.GetViewportWidth())&&(top<this.browser.GetViewportHeight())&&(left+_179>=0)&&(top+_17a>=0)); } } if(_17b){ if(!this.inScreen){ if(this.type==3){ var _17d=document.getElementById(this.id+"_img"); if((_17d)&&(_17d.controls)){ _17d.controls.play(); } } } this.inScreen=true; var _17e=this.getEventElement(); if(_17e!=null){ _17e.style.left=left; _17e.style.top=top; _17e.style.width=_179; _17e.style.height=_17a; } if((this.thickness!=null)&&(this.thickness>0)){ this.div.style.borderWidth=Math.max(1,Math.round(this.curRatio*this.thickness))+"px"; } }else{ if((this.type==3)&&(this.inScreen==true)){ var _17d=document.getElementById(this.id+"_img"); if((_17d)&&(_17d.controls)){ if(_17d.playState!=9){ _17d.controls.pause(); }else{ _17d.controls.stop(); } } } this.inScreen=false; var _17e=this.getEventElement(); if(_17e!=null){ _17e.style.left=this.browser.GetViewportWidth()*2; } } } },checkInLevel:function(){ var min=this.minLevel; var max=this.maxLevel; if(min<0){ min=0; } if(max<0){ max=32767; } this.inLevel=((this.curLevel>=min)&&(this.curLevel<=max)); if(this.inLevel){ if(!this.visible){ this.absoluteShow(); } }else{ if(this.visible){ this.absoluteHide(); } } },setProperty:function(key,_182){ key=key.toLowerCase(); var run=""; try{ this["set_"+key](_182); } catch(ex){ } this.compProperty[key]=_182; if(key=="co-ordinate"){ this.isScreen=(_182.toLowerCase()=="screen"); if(this.isScreen){ var _184=this.getEventElement(); if(_184!=null){ this.screenParent.appendChild(_184); _184.style.left=this.left; _184.style.top=this.top; _184.style.width=this.width; _184.style.height=this.height; } }else{ this.parent.appendChild(_184); this.setViewport(); } } },getProperty:function(key){ var _186=null; try{ _186=this.compProperty[key.toLowerCase()]; if(undefined==_186){ throw ""; } } catch(ex){ _186=null; } return _186; },toString:function(){ return "id : "+this.id; },release:function(){ if(this.id!=null){ var _187=this.div; if(_187&&_187.parentNode){ _187.parentNode.removeChild(_187); } } },clear:function(){ this.compProperty=new Array(); this.mouseAction=new Array(false,false,false,false,false); var _188=this.div_draw; var _189=this.div; var _18a=document.getElementById(this.id+"_img"); var _18b=document.getElementById(this.id+"_img_over"); if(this.type==3&&_18a&&_18a.controls){ _18a.controls.stop(); } if(_18b){ _18b.parentNode.removeChild(_18b); } if(_18a){ _18a.parentNode.removeChild(_18a); } },getParseAttrData:function(_18c){ var _18d=new Array(); var reg=/([A-Za-z][A-Za-z0-9_-]*)="(.*?)"/; var temp=_18c; while(temp!=null&&temp.length!=0){ var _190=temp.match(reg); if(_190==null||_190.length==0){ break; } _18d.push({name:_190[1],value:_190[2]}); temp=temp.substring(temp.search(reg)+_190[0].length-1,temp.length); } return _18d; },setAttributeString:function(str){ this.clear(); var data=this.getParseAttrData(str); for(var i=0;i<data.length;i++){ this.setProperty(data[i].name,data[i].value); } },setXmlNode:function(node){ this.compProperty=new Array(); for(var i=0;node.getAttributes.length;i++){ this.setProperty(node.getAttributes(i).name,node.getAttributes(i).value); } },getEventElement:function(){ return this.div; },OnMouseoverEvent:function(e){ if((this.type==3)&&(this.soundonmouse)){ var _197=document.getElementById(this.id+"_img"); if((_197)&&(_197.settings)){ _197.settings.volume=60; } } if(this.mouseAction[0]){ var _198=document.getElementById(this.id+"_img"); var _199=document.getElementById(this.id+"_img_over"); if(_198!=null){ _198.style.display="none"; } if(_199!=null){ _199.style.display="block"; } } if(this.mouseAction[1]){ this.drawComponentBorder(true); } if(this.mouseAction[4]){ this.browser.SetTopObject(this,true); } if(this.mouseAction[2]){ if(this.div_draw!=null){ this.div_draw.style.backgroundColor=(this.mouseoverfillcolor==null)?this.fillcolor:this.mouseoverfillcolor; } } var _19a=this.getProperty("onmouseenter"); if((_19a!=null)&&(_19a.length>0)){ this.browser.FollowLink(_19a,this.no); } },OnMouseoutEvent:function(e){ if((this.type==3)&&(this.soundonmouse)){ var _19c=document.getElementById(this.id+"_img"); if((_19c)&&(_19c.settings)){ _19c.settings.volume=0; } } if(this.mouseAction[0]){ var _19d=document.getElementById(this.id+"_img"); var _19e=document.getElementById(this.id+"_img_over"); if(_19d!=null){ var src=this.getProperty("src"); if(src!=null&&src!=""){ _19d.style.display="block"; }else{ _19d.style.display="none"; } } if(_19e!=null){ _19e.style.display="none"; } } if(this.mouseAction[1]){ this.drawComponentBorder(false); } if(this.mouseAction[4]){ this.browser.SetTopObject(this,false); } if(this.mouseAction[2]){ var _19d=document.getElementById(this.id+"_img"); if(_19d!=null){ var src=this.getProperty("src"); if(src!=null&&src!=""){ _19d.style.display="block"; }else{ _19d.style.display="none"; } } if(this.div_draw!=null&&this.fillcolor!=null&&this.mouseoverfillcolor!=null){ this.div_draw.style.backgroundColor=this.fillcolor; } } var _1a0=this.getProperty("onmouseexit"); if((_1a0!=null)&&(_1a0.length>0)){ this.browser.FollowLink(_1a0,this.no); } },absoluteHide:function(){ this.div.style.display="none"; this.visible=false; },absoluteShow:function(){ this.div.style.display="block"; this.visible=true; },set_minlevel:function(_1a1){ this.minLevel=parseInt(_1a1)-1; if(isNaN(this.minLevel)){ this.minLevel=-1; } this.checkInLevel(); },set_maxlevel:function(_1a2){ this.maxLevel=parseInt(_1a2)-1; if(isNaN(this.maxLevel)){ this.maxLevel=-1; } this.checkInLevel(); },set_visible:function(_1a3){ if(_1a3.toLowerCase()=="no"){ this.div.style.display="none"; }else{ this.div.style.display=""; } },set_layer:function(_1a4){ this.div.style.zIndex=_1a4; },set_x:function(x){ this.left=parseFloat(x); var _1a6=this.getEventElement(); if(_1a6!=null){ _1a6.style.left=(this.isScreen?this.left:((this.offsetX+this.left)*this.curRatio-this.curX))+"px"; } if(this.compProperty["bx"]!=null){ this.setProperty("width",parseFloat(this.compProperty["bx"])-parseFloat(x)); } },set_y:function(y){ this.top=parseFloat(y); var _1a8=this.getEventElement(); if(_1a8!=null){ _1a8.style.top=(this.isScreen?this.top:((this.offsetY+this.top)*this.curRatio-this.curY))+"px"; } if(this.compProperty["by"]!=null){ this.setProperty("height",parseFloat(this.compProperty["by"])-parseFloat(y)); } },set_bx:function(bx){ this.setProperty("width",parseFloat(bx)-parseFloat(this.compProperty["x"])); },set_by:function(by){ this.setProperty("height",parseFloat(by)-parseFloat(this.compProperty["y"])); },set_cx:function(cx){ },set_cy:function(cy){ },set_width:function(_1ad){ this.width=parseFloat(_1ad); var _1ae=this.getEventElement(); if(_1ae!=null){ _1ae.style.width=(this.isScreen?this.width:(this.width*this.curRatio))+"px"; } },set_height:function(_1af){ this.height=parseFloat(_1af); var _1b0=this.getEventElement(); if(_1b0!=null){ _1b0.style.height=(this.isScreen?this.height:(this.height*this.curRatio))+"px"; } },set_tooltip:function(text){ var _1b2=this.getEventElement(); if(_1b2!=null){ _1b2.title=text; } var _1b3=this.div_draw; if(_1b3!=null){ _1b3.title=text; } var _1b4=document.getElementById(this.id+"_img"); if(_1b4!=null){ _1b4.title=text; } var _1b5=document.getElementById(this.id+"_img_over"); if(_1b5!=null){ _1b5.title=text; } },set_soundonmouse:function(_1b6){ if((_1b6!=null)&&(_1b6.toLowerCase()=="no")){ this.soundonmouse=false; if(this.type==3){ var _1b7=document.getElementById(this.id+"_img"); if((_1b7)&&(_1b7.settings)){ _1b7.settings.volume=60; } } }else{ this.soundonmouse=true; if(this.type==3){ var _1b7=document.getElementById(this.id+"_img"); if((_1b7)&&(_1b7.settings)){ _1b7.settings.volume=0; } } } },set_src:function(src){ var _1b9=this.div_draw; if(_1b9!=null){ var _1ba=document.getElementById(this.id+"_img"); if(src!=null&&src!=""&&src!="null"){ this.src=src; if(this.type==1){ if(_1ba==null){ _1b9.innerHTML+="<img id=\""+this.id+"_img"+"\" src=\""+this.browser.GetImageUrl(src)+"\" width=\"100%\" height=\"100%\" style=\"filter: alpha(opacity=100)\"/>"; }else{ _1ba.src=this.browser.GetImageUrl(src); _1ba.style.display="block"; } }else{ if(this.type==2){ if((_1ba!=null)&&(_1ba.parentNode)){ _1ba.parentNode.removeChild(_1ba); } _1b9.innerHTML+="<OBJECT classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" "+"codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0\" "+"width=\"100%\" height=\"100%\" id=\""+this.id+"_img\"><PARAM NAME=movie VALUE=\""+this.browser.GetImageUrl(src)+"\"><param name=\"quality\" value=\"high\"><param name=\"wmode\" value=\"transparent\">"+"<embed id=\""+this.id+"_img\" src=\""+this.browser.GetImageUrl(src)+"\" name=\""+this.id+"\" quality=\"high\" width=\"100%\" height=\"100%\" type=\"application/x-shockwave-flash\" "+"pluginspage=\"http://www.macromedia.com/go/getflashplayer\" wmode=\"transparent\"></embed>"+"</object>"; }else{ if(this.type==3){ if((_1ba!=null)&&(_1ba.parentNode)){ _1ba.parentNode.removeChild(_1ba); } var url=(src.indexOf("://")>0)?src:this.browser.GetImageUrl(src); var vol=this.soundonmouse?"0":"60"; _1b9.innerHTML+="<OBJECT id=\""+this.id+"_img\" width=\"100%\" height=\"100%\" CLASSID=\"CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6\" "+"type=\"application/x-oleobject\"><PARAM NAME=\"URL\" VALUE=\""+url+"\"><PARAM NAME=\"StretchToFit\" VALUE=\"True\">"+"<PARAM NAME=\"Volume\" VALUE=\""+vol+"\"><PARAM NAME=\"AutoStart\" VALUE=\"false\">"+"<PARAM NAME=\"enableContextMenu\" VALUE=\"False\"><PARAM name=\"uiMode\" value=\"none\"><PARAM name=\"PlayCount\" value=\"500000\">"+"</OBJECT>"; if(this.inScreen){ _1ba=document.getElementById(this.id+"_img"); if((_1ba)&&(_1ba.controls)){ _1ba.controls.play(); } } } } } }else{ this.src=null; if(_1ba!=null){ _1ba.style.display="none"; } } var text=this.getProperty("tooltip"); if(text!=null){ this.set_tooltip(text); } } },set_onmouseover:function(url){ if(this.type==1){ var _1bf=this.div_draw; var ex=null; ex=document.getElementById(this.id+"_img_over"); if(ex!=null){ _1bf.removeChild(ex); } if((url==null)||(url.length==0)){ this.mouseAction[0]=false; }else{ _1bf.innerHTML+="<img id=\""+this.id+"_img_over"+"\" src=\""+this.browser.GetImageUrl(url)+"\" width=\"100%\" height=\"100%\"  style=\"filter: alpha(opacity=100); display:none\" onerror=\"this.style.visibility='hidden'\"/>"; this.mouseAction[0]=true; ex=document.getElementById(this.id+"_img_over"); var text=this.getProperty("tooltip"); if(text!=null){ ex.title=text; } } } },set_basepage:function(page){ var _1c3=this.browser.GetPageOffset(page); this.offsetX=_1c3.offsetX; this.offsetY=_1c3.offsetY; setViewport(); },set_outline:function(_1c4){ this.outline=(_1c4.length>0)?_1c4:null; this.drawComponentBorder(false); },set_thickness:function(_1c5){ this.thickness=(parseInt(_1c5)>0)?parseInt(_1c5):0; this.drawComponentBorder(false); },set_color:function(_1c6){ this.color=(_1c6.length>0)?_1c6:null; this.drawComponentBorder(false); },set_style:function(_1c7){ this.style=(_1c7.length>0)?_1c7:null; this.drawComponentBorder(false); },drawComponentBorder:function(_1c8){ var _1c9=this.div; if(_1c9!=null){ if((this.outline==null)||(this.outline.toLowerCase()=="yes")){ var _1ca=(this.style==null)?"solid":this.style.toLowerCase(); if(_1ca.substr(0,4)=="dash"){ _1ca="dashed"; }else{ if(_1ca.substr(0,3)=="dot"){ _1ca="dotted"; } } var _1cb=(this.thickness==null)?0:this.thickness; var _1cc=(this.color==null)?"#0000ff":this.color; if((_1c8)&&(this.mouseovercolor!=null)){ _1cc=this.mouseovercolor; } _1c9.style.borderColor=_1cc; _1c9.style.borderStyle=_1ca; if(_1cb==0){ _1c9.style.borderWidth="1px"; }else{ if(this.isScreen){ _1c9.style.borderWidth=_1cb+"px"; }else{ _1c9.style.borderWidth=Math.max(1,Math.round(this.curRatio*_1cb))+"px"; } } }else{ _1c9.style.borderStyle="none"; } } },set_mouseovercolor:function(_1cd){ this.mouseovercolor=(_1cd.length>0)?_1cd:null; this.mouseAction[1]=true; this.drawComponentBorder(false); },set_onmouseenter:function(_1ce){ },set_onmouseexit:function(_1cf){ },set_href:function(link){ this.div.style.cursor=((link==null)||(link=="")||(link.toLowerCase()=="null"))?"auto":"pointer"; this.mouseAction[4]=true; },set_transparency:function(_1d1){ var _1d2=this.div_draw; if(_1d2!=null){ var data=parseInt(_1d1); if(isNaN(data)){ return; } if(data<1){ data=parseFloat(_1d1); } data=Math.round(data/255*100); if(data<100){ _1d2.style.filter="alpha(opacity="+data+");"; _1d2.style.opacity=data/100; } } },set_fillcolor:function(_1d4){ this.fillcolor=((_1d4!=null)&&(_1d4.length>0))?_1d4:"transparent"; var _1d5=this.div_draw; if(_1d5!=null){ _1d5.style.backgroundColor=this.fillcolor; } },set_mouseoverfillcolor:function(_1d6){ this.mouseoverfillcolor=_1d6; this.mouseAction[2]=true; }}; function ComponentMinimap(_1d7,_1d8){ var self=this; var _1da=8; self.browser=_1d8; self.screenParent=screen; var _1db=function(){ var t=document.createElement("table"); t.cellPadding=0; t.cellSpacing=0; t.style.border="3px solid white"; var b=document.createElement("tbody"); var r=document.createElement("tr"); var cell=document.createElement("td"); cell.style.border="1px solid #999999"; cell.align="left"; cell.vAlign="top"; cell.style.fontSize="1px"; cell.style.lineHeight="2px"; t.appendChild(b); b.appendChild(r); r.appendChild(cell); return t; }; var _1e0=false,isFull=true; var _1e1,height,cleft=0,ctop=0,cright=1,cbottom=1,ratio=1; var _1e2=_1db(); var _1e3=document.createElement("div"); var _1e4=document.createElement("div"); _1e2.style.position="absolute"; _1e2.style.display="none"; _1e4.style.position="absolute"; _1e2.style.cursor="move"; _1e4.style.cursor="pointer"; _1e3.style.position="absolute"; _1d7.appendChild(_1e2); var c=_1e2.rows[0].cells[0]; c.style.backgroundColor="#f0f0f0"; c.style.opacity="0.8"; c.style.filter="alpha(opacity=80)"; c.appendChild(_1e3); c.appendChild(document.createTextNode("\xa0")); _1e4.innerHTML="<div style='width: 100%; height: 100%; background-color: red; opacity: 0.15; filter: alpha(opacity=15)'></div>"; _1e4.style.border="1px solid #CC6666"; var _1e6=document.createElement("img"); _1e6.style.position="absolute"; _1e6.style.display="none"; _1e6.onload=function(){ var w=this.width,h=this.height; var tw=_1e1-_1da,th=height-_1da; if(tw/th<w/h){ this.style.width=tw; h=Math.round(tw*h/w); this.style.height=h; this.style.left=0; this.style.top=th-h; }else{ w=Math.round(th*w/h); this.style.width=w; this.style.height=th; this.style.left=tw-w; this.style.top=0; } this.style.display=""; }; _1e6.onerror=function(){ this.style.display="none"; }; var _1e9=null; _1e3.appendChild(_1e6); _1e3.appendChild(_1e4); this.getThumbSize=function(){ return {width:_1e1-_1da,height:height-_1da}; }; this.setThumbnail=function(ly){ if(_1e9!=null){ _1e3.removeChild(_1e9); } _1e9=ly; _1e3.insertBefore(_1e9,_1e4); }; this.setVisible=function(_1eb){ _1e0=_1eb; _1e2.style.display=(_1eb&&!isFull)?"":"none"; }; this.setCurrent=function(x1,y1,x2,y2){ cleft=Math.max(Math.min(Math.min(x1,x2),1),0); ctop=Math.max(Math.min(Math.min(y1,y2),1),0); cright=Math.max(Math.min(Math.max(x1,x2),1),0); cbottom=Math.max(Math.min(Math.max(y1,y2),1),0); var x=Math.round(cleft*(_1e1-_1da)),y=Math.round(ctop*(height-_1da)); _1e4.style.left=x; _1e4.style.top=y; _1e4.style.width=Math.round((cright-cleft)*(_1e1-_1da)); _1e4.style.height=Math.round((cbottom-ctop)*(height-_1da)); isFull=(cleft==0)&&(cright==1)&&(ctop==0)&&(cbottom==1); this.setVisible(_1e0); }; this.setPosition=function(x,y){ _1e2.style.left=x; _1e2.style.top=y; }; this.setSize=function(size){ if(ratio>=1){ _1e1=size; height=Math.round((size-_1da)/ratio)+_1da; }else{ height=size; _1e1=Math.round((size-_1da)*ratio)+_1da; } _1e2.style.width=_1e1; _1e2.style.height=height; self.setCurrent(cleft,ctop,cright,cbottom); self.setPosition(_1d7.offsetWidth-_1e1-10,_1d7.offsetHeight-height-10); }; this.setMinimap=function(w,h,url){ ratio=w/h; this.setSize(Math.max(_1e1,height)); _1e6.style.display="none"; if((url!=null)&&(url.length>0)){ _1e6.src=url; }else{ _1e6.src=""; } }; var _1f7=false; var _1f8=false; var _1f9=-1; var _1fa=-1; var _1fb=function(e){ if(!e){ var e=window.event; } if(_1f7){ var l=_1e3; var lx=0,ly=0; do{ lx+=l.offsetLeft; ly+=l.offsetTop; }while((l=l.offsetParent)!=document.body); var pos={x:(e.clientX-lx),y:(e.clientY-ly)}; if(pos.x<0){ pos.x=0; } if(pos.y<0){ pos.y=0; } self.browser.Execute("pantoratio",((pos.x-_1e4.offsetWidth/2)/(_1e1-_1da))+","+((pos.y-_1e4.offsetHeight/2)/(height-_1da))); }else{ if(_1f8){ if(_1f9==-1&&_1fa==-1){ _1f9=e.clientX; _1fa=e.clientY; } var pos={x:(_1e2.offsetLeft+(e.clientX-_1f9)),y:(_1e2.offsetTop+(e.clientY-_1fa))}; if(pos.x<0){ pos.x=0; } if(pos.y<0){ pos.y=0; } if(_1e2.offsetLeft+(e.clientX-_1f9)+_1e2.offsetWidth>_1d7.offsetWidth){ pos.x=_1d7.offsetWidth-_1e2.offsetWidth; } if(_1e2.offsetTop+(e.clientY-_1fa)+_1e2.offsetHeight>_1d7.offsetHeight){ pos.y=_1d7.offsetHeight-_1e2.offsetHeight; } self.setPosition(pos.x+"px",pos.y+"px"); _1f9=e.clientX; _1fa=e.clientY; } } }; var _200=function(e){ if((e.which&&e.which==1)||(e.button&&e.button==1)){ _1f8=false; _1f7=false; } }; if(document.addEventListener){ document.addEventListener("mousemove",_1fb,false); document.addEventListener("mouseup",_200,false); }else{ document.attachEvent("onmousemove",_1fb); document.attachEvent("onmouseup",_200,false); } _1e4.onmousedown=function(e){ if(!e){ var e=window.event; } if((e.which&&e.which==1)||(e.button&&e.button==1)){ if(typeof e.preventDefault!="undefined"){ e.preventDefault(); } _1f7=true; } }; _1e2.onmousedown=function(e){ if(!e){ var e=window.event; } if(((e.which&&e.which==1)||(e.button&&e.button==1))&&_1f7==false){ if(typeof e.preventDefault!="undefined"){ e.preventDefault(); } _1f8=true; _1f9=e.clientX; _1fa=e.clientY; } }; self.setSize(150); } MenuPoint=function(x,y){ this.x=x; this.y=y; }; MenuItem=function(text){ this.parent=null; this.text=text; this.href=null; this.id=null; this.eventObject=null; this.clickCallback=null; }; MenuItem.prototype={release:function(){ }}; MenuItemEvent=function(){ }; MenuItemEvent.prototype={OnMouseClick:function(e){ var _208=e||window.event; var _209=_208.target||_208.srcElement||_208.relatedTarget; _209=_209.parentNode; if(_209.menu_item==null){ if(_209.parentNode!=null&&_209.parentNode.menu_item!=null){ _209=_209.parentNode; }else{ return; } } _209.menu_item.parent.clickMenuItem(_209); },OnMouseOut:function(e){ var _20b=e||window.event; var _20c=_20b.target||_20b.srcElement||_20b.relatedTarget; _20c=_20c.parentNode; if(_20c.menu_item==null){ if(_20c.parentNode!=null&&_20c.menu_item!=null){ _20c=_20c.parentNode; }else{ return; } } _20c.menu_item.parent.unselectMenuItem(_20c); },OnMouseOver:function(e){ var _20e=e||window.event; var _20f=_20e.target||_20e.srcElement||_20e.relatedTarget; _20f=_20f.parentNode; if(_20f==null){ return; } if(_20f.menu_item==null){ if(_20f.parentNode!=null&&_20f.menu_item!=null){ _20f=_20f.parentNode; }else{ return; } } _20f.menu_item.parent.selectMenuItem(_20f); }}; Menu=function(id,_211,_212,_213){ this.prefix="ai_br"; this.browser=_212; this.parent=_211; this.linkMenuItem=null; this.childMenu=new Array(); this.items=new Array(); this.parentMenu=null; this.inputId=id; this.id=null; this.fontColor="black"; this.fontName="Arial"; this.fontSize="9pt"; this.selectFontColor="white"; this.selectCellColor="gray"; this.cellColor="white"; this.borderColor="#DBDFE2"; this.borderSize=1; this.isCreated=false; this.beforeSelected=null; this.beforeSelectedObject=null; this.x=0; this.y=0; this.isShow=false; this.left=0; this.top=0; this.width=0; this.height=0; this.sep_pad_left=5; this.sep_pad_right=5; this.sep_pad_top=0; this.sep_pad_bottom=0; this.nor_pad_left=15; this.nor_pad_right_sub=0; this.nor_pad_right=15; this.nor_pad_top=4; this.nor_pad_bottom=4; this.arrow_pad_left=0; this.arrow_pad_right=2; this.direction=0; this.menuItemEvent=new Array(); var _214=_213||false; this.mainDiv=_214?document.createElement("div"):null; }; var menu_beforeSelected=null; Menu.prototype={util_decideDirection:function(x,y,_217,_218,_219,_21a){ var _21b=1; if(_219<_217||_21a<_218){ return _21b; } if(x+_217>=_219){ _21b=2; } if(y+_218>=_21a){ _21b+=2; } return _21b; },util_decideDirection2:function(x,y,_21e,_21f,_220,_221,_222){ if(_222==0){ return this.util_decideDirection(x,y,_21e,_21f,_220,_221); } var _223=_222%2==0?2:1; if(_222%2==0&&x-_21e<0){ _223=1; }else{ if(_222%2!=0&&x+_21e>=_220){ _223=2; } } if(y+_21f>_221){ _223+=2; } return _223; },clickMenuItem:function(_224){ if(_224.menu_item.text!="-"){ if(this.browser!=null&&_224.menu_item!=null&&_224.menu_item.href!=null){ this.browser.FollowLink(_224.menu_item.href); this.show(false,true); } } },selectMenuItem:function(_225){ if(_225.menu_item.text!="-"){ var _226=this.beforeSelected; if(_226!=null){ var _227=_226.parent.getSubMenuById(_226.id); if(_227!=null){ _227.show(false,true); } } if(menu_beforeSelected!=null){ this.unselectParentMenuItem(menu_beforeSelected.parent); } _225.style.color=this.selectFontColor; _225.style.backgroundColor=this.selectCellColor; this.selectParentMenuItem(this); var _228=this.getSubMenuById(_225.menu_item.id); if(_228!=null){ if(_228.isCreated==false){ _228.update(); var _229=0; if(_228.parentMenu!=null){ _229=_228.parentMenu.direction; } var _22a=this.predictSubMenuPoint(this.direction,_225.menu_item.id); _228.x=_22a.x; _228.y=_22a.y; _229=this.util_decideDirection2(_228.x,_228.y,_228.width,_228.height,this.parent.offsetWidth,this.parent.offsetHeight,this.direction); if(_229!=this.direction){ _228.direction=_229; _22a=this.getStartSubMenuPoint(_228.direction,_225.menu_item.id); _228.x=_22a.x; _228.y=_22a.y; }else{ _228.direction=this.direction; } _228.private_changePosition(_228.x,_228.y); } _228.show(true,true); } } },unselectMenuItem:function(_22b){ if(_22b.menu_item.text!="-"){ _22b.style.color=this.fontColor; _22b.style.backgroundColor=this.cellColor; this.beforeSelected=_22b.menu_item; menu_beforeSelected=_22b.menu_item; this.beforeSelectedObject=_22b; } },selectParentMenuItem:function(_22c){ var _22d=_22c; if(_22d.parentMenu!=null){ if(_22d.linkMenuItem!=null){ var _22e=_22d.parentMenu.id+"_tr_"+_22d.linkMenuItem.id; var _22f=document.getElementById(_22e); if(_22f!=null){ _22f.style.color=this.selectFontColor; _22f.style.backgroundColor=this.selectCellColor; } } _22d.parentMenu.selectParentMenuItem(_22d.parentMenu); } },unselectParentMenuItem:function(_230){ var _231=_230; if(_231.parentMenu!=null){ if(_231.linkMenuItem!=null){ var _232=_231.parentMenu.id+"_tr_"+_231.linkMenuItem.id; var _233=document.getElementById(_232); if(_233!=null){ _233.style.color=this.fontColor; _233.style.backgroundColor=this.cellColor; } } _231.parentMenu.unselectParentMenuItem(_231.parentMenu); } },removeAllItem:function(){ this.items=new Array(); },getMyId:function(){ var _234=this.prefix; var _235=this.parentMenu; while(_235!=null){ _234+="_"+_235.inputId; _235=_235.parentMenu; } _234+="_"+this.inputId; return _234; },setEvent:function(_236,item){ var _238=document.getElementById(_236); if(_238==null){ return; } _238.menu_item=item; if(item.eventObject==null){ item.eventObject=new MenuItemEvent(); if(_238.addEventListener){ _238.addEventListener("click",item.eventObject.OnMouseClick,false); _238.addEventListener("mouseover",item.eventObject.OnMouseOver,false); _238.addEventListener("mouseout",item.eventObject.OnMouseOut,false); }else{ _238.attachEvent("onclick",item.eventObject.OnMouseClick); _238.attachEvent("onmouseover",item.eventObject.OnMouseOver); _238.attachEvent("onmouseout",item.eventObject.OnMouseOut); } } },removeEvent:function(_239){ _239.menu_item=null; if(object.removeEventListener){ _239.removeEventListener("click",item.eventObject.OnMouseClick,false); _239.removeEventListener("mouseover",item.eventObject.OnMouseOver,false); _239.removeEventListener("mouseout",item.eventObject.OnMouseOut,false); }else{ _239.detachEvent("onclick",item.eventObject.OnMouseClick); _239.detachEvent("onmouseover",item.eventObject.OnMouseOver); _239.detachEvent("onmouseout",item.eventObject.OnMouseOut); } },getParentInputId:function(){ if(this.parentMenu!=null){ return this.parentMenu.inputId; } },show:function(_23a,_23b){ var _23b=_23b||false; var div=document.getElementById(this.id+"_div"); if(div==null){ return; } if(_23a){ div.style.display="block"; this.isShow=true; }else{ div.style.display="none"; this.isShow=false; } if(_23b){ for(var i=0;i<this.childMenu.length;i++){ if(this.childMenu[i].isShow==true){ this.childMenu[i].show(_23a,_23b); } } } },getMenuHTML:function(){ var _23e=this.id+"_table_"; var _23f=_23e+"_div"; var _240=this.id+"_tbody_"; var _241=this.id+"_tr_"; var _242=this.id+"_td_"; var _243="<div id=\""+_23e+"_shadow"+"\" style=\"position:absolute ;left : "+"3px ; top : "+"2px; background-color : black ;filter: alpha(opacity=40); opacity : 0.40; -moz-opacity : 0.40;\" >\n"+"</div>\n"+"<div id=\""+_23f+"\" style=\"position:absolute;left:0px; top : 0px;\" >\n"+"<table id=\""+_23e+"\" cellspacing=\"0\" style=\"background-color:"+this.cellColor+";cursor:pointer;\">\n"+"<tbody id=\""+_240+"\">\n"; for(var i=0;i<this.items.length;i++){ var data=""; var _246=""; var _247=""; var _248=""; var _249=this.getSubMenu(i); var _24a=_249!=null?this.nor_pad_right_sub:this.nor_pad_right; if(this.items[i].text=="-"){ data="<hr noshade size=\"1\" style=\"color : "+this.borderColor+" ;height : 1px;\" />\n"; _246="style=\"padding-left : "+this.sep_pad_left+"px ; padding-right :  "+this.sep_pad_right+"px ; padding-top :  "+this.sep_pad_top+"px ; padding-bottom :  "+this.sep_pad_bottom+"px;\""; _247=" colspan=\"2\""; _248="<td id=\""+_242+this.items[i].id+"_sub_menu\" style=\"padding-left: "+this.arrow_pad_left+"px; padding-right: "+this.arrow_pad_right+"px;text-align:right;white-space:nowrap;\">"+"</td>\n"; }else{ data=this.items[i].text; _246="style=\"padding-left : "+this.nor_pad_left+"px ; padding-right : "+_24a+"px ; padding-top : "+this.nor_pad_top+"px ; padding-bottom : "+this.nor_pad_bottom+"px ;white-space:nowrap;\""; } _243+="<tr id=\""+_241+this.items[i].id+"\" >\n<td id=\""+_242+this.items[i].id+"\" "+_246+_247+"  >"+data+"</td>\n"; _243+="<td id=\""+_242+this.items[i].id+"_sub_menu\" style=\"padding-left: "+this.arrow_pad_left+"px; padding-right: "+this.arrow_pad_right+"px;text-align:right;white-space:nowrap;\">\n"+(_249!=null?"<img src=\""+this.browser.GetBrowserProperty("imageurl")+"arrow_right.gif\"/>":"")+"</td>"+_248+"</tr>\n"; } _243+="</tbody></table></div>\n"; return _243; },getTableElement:function(){ var _24b=this.id+"_table_"; var _24c=_24b+"_div"; var _24d=this.id+"_tbody_"; var _24e=this.id+"_tr_"; var _24f=this.id+"_td_"; var _250=document.createElement("div"); },update:function(){ if(this.isCreated==true){ this.releaseTable(); } if(this.id==null){ this.id=this.getMyId(); } if(this.parent==null){ return; } var _251=this.id+"_div"; var _252=this.id+"_table_"; var _253=_252+"_div"; var _254=this.id+"_tbody_"; var _255=this.id+"_tr_"; var _256=this.id+"_td_"; var _257=null; if(this.mainDiv==null||!this.earlymake){ this.mainDiv=document.createElement("div"); } _257=this.mainDiv; _257.id=_251; _257.style.display="none"; this.parent.appendChild(_257); var div=_257; if(div==null){ return; } div.innerHTML=this.getMenuHTML(); this.isCreated=true; this.updateStyle(); var _259=document.getElementById(_253); var _25a=document.getElementById(_252+"_shadow"); var _25b=_259.offsetWidth; this.width=_25b; var _25c=_259.offsetHeight; this.height=_25c; if(_25a!=null){ _25a.style.display="block"; } if(this.parentMenu==null){ this.setPosition(); div.style.display="block"; } this.setItemsEvent(); setTimeout(function(){ var _25d=document.getElementById(_252); _25a.style.width=_25d.offsetWidth+3; _25a.style.height=_25d.offsetHeight+3; div.style.display="block"; },40); },setItemsEvent:function(){ var _25e=this.id+"_tr_"; for(var i=0;i<this.items.length;i++){ this.setEvent(_25e+this.items[i].id,this.items[i]); } },getSubMenu:function(_260){ var _261=null; if(this.items.length<=_260){ return _261; } for(var i=0;i<this.childMenu.length;i++){ if(this.childMenu[i].linkMenuItem.id==this.items[_260].id){ _261=this.childMenu[i]; break; } } return _261; },getSubMenuById:function(id){ var _264=null; for(var i=0;i<this.childMenu.length;i++){ if(this.childMenu[i].linkMenuItem.id==id){ _264=this.childMenu[i]; break; } } return _264; },isLinkItem:function(item){ if(this.linkMenuItem!=null&&this.linkMenuItem.id==item.id){ return true; }else{ return false; } },release:function(){ this.releaseTable(); },getItemLeft:function(_267){ return this.left>5?this.left-5:0; },getItemRight:function(_268){ var _269=this.id+"_table_"+"_div"; var _26a=document.getElementById(_269); if(_26a==null){ return null; } return _26a.offsetWidth+this.left; },getItemBottom:function(_26b){ var _26c=this.id+"_tr_"; var _26d=this.top; for(var i=0;i<this.items.length;i++){ var row=document.getElementById(_26c+this.items[i].id); _26d+=row.offsetHeight; if(this.items[i].id==_26b){ break; } } return _26d; },getItemTop:function(_270){ var _271=this.id+"_tr_"; var _272=this.top; for(var i=0;i<this.items.length;i++){ var row=document.getElementById(_271+this.items[i].id); _272+=row.offsetHeight; if(this.items[i].id==_270){ _272-=row.offsetHeight; break; } } return _272; },updateStyle:function(){ var _275=this.id+"_table_"; var _276=document.getElementById(_275); if(_276==null){ return; } _276.style.borderWidth=this.borderSize+"px"; _276.style.borderColor=this.borderColor; _276.style.borderStyle="solid"; _276.style.fontFamily="\""+this.fontName+"\""; _276.style.fontSize=this.fontSize; for(var i=0;i<this.childMenu.length;i++){ this.childMenu[i].updateStyleByParent(this); } },updateStyleByParent:function(_278){ var _279=this.id+"_table_"; var _27a=document.getElementById(_279); if(_27a==null){ return; } _27a.style.borderWidth=_278.borderSize+"px"; _27a.style.borderColor=_278.borderColor; _27a.style.borderStyle="solid"; _27a.style.fontFamily="\""+_278.fontName+"\""; _27a.style.fontSize=_278.fontSize; },releaseTable:function(){ if(this.isCreated==false){ return; } this.isCreated=false; var div=document.getElementById(this.id+"_div"); var _27c=document.getElementById(this.id+"_table_"+"_div"); var _27d=document.getElementById(this.id+"_table_"); var _27e=document.getElementById(this.id+"_tbody_"); if(_27d==null||_27e==null){ return; } var _27f=this.id+"_tr_"; var _280=this.id+"_td_"; for(var i=0;i<this.items.length;i++){ var tr=document.getElementById(_27f+this.items[i].id); var td=document.getElementById(_280+this.items[i].id); if(td!=null&&tr!=null){ this.removeEvent(tr); tr.removeChild(td); _27e.removeChild(tr); } } _27d.removeChild(_27e); _27c.removeChild(_27d); div.removeChild(_27c); this.parent.removeChild(div); for(var i=0;i<this.childMenu.length;i++){ this.childMenu[i].releaseTable(); } },getPosX:function(){ return this.x; },getPosY:function(){ return this.y; },private_changePosition:function(in_x,in_y){ this.x=in_x; this.y=in_y; this.left=in_x-5; this.top=in_y; var div=document.getElementById(this.id+"_div"); if(div==null){ return; } var pos=this.util_decideDirection2(this.x,this.y,this.width,this.height,this.parent.offsetWidth,this.parent.offsetHeight,this.parentMenu==null?0:this.parentMenu.direction); this.direction=pos; var x=0; var y=0; switch(pos){ case 2: y=this.y; var _28a=this.parentMenu!=null?this.parentMenu.width:0; x=this.x-this.width+10; break; case 3: x=this.x; y=this.y-this.height; break; case 4: y=this.y-this.height; var _28a=this.parentMenu!=null?this.parentMenu.width:0; x=this.x-this.width+10; break; default: x=this.x; y=this.y; break; } this.left=x; this.top=y; if(div!=null){ div.style.position="absolute"; div.style.left=this.left+"px"; div.style.top=this.top+"px"; div.style.display="block"; } return; },changePosition:function(x,y){ this.private_changePosition(x,y); this.resetChildMenuPos(); this.private_hide(); },private_hide:function(){ for(var i=0;i<this.childMenu.length;i++){ this.childMenu[i].show(false); this.childMenu[i].private_hide(); } },resetChildMenuPos:function(){ var _28e=0; for(var i=0;i<this.childMenu.length;i++){ var _290=this.childMenu[i]; if(_290.isCreated==false){ continue; } if(_290.linkMenuItem!=null){ if(_290.linkMenuItem.id==null){ continue; } var _291=this.predictSubMenuPoint(this.direction,_290.linkMenuItem.id); _290.x=_291.x; _290.y=_291.y; _28e=this.util_decideDirection2(_290.x,_290.y,_290.width,_290.height,this.parent.offsetWidth,this.parent.offsetHeight,this.direction); if(_28e!=this.direction){ _290.direction=_28e; _291=this.getStartSubMenuPoint(_290.direction,_290.linkMenuItem.id); _290.x=_291.x; _290.y=_291.y; }else{ _290.direction=this.direction; } if(_291!=null){ _290.private_changePosition(_290.x,_290.y); _290.resetChildMenuPos(); } } } },getStartSubMenuPoint:function(_292,_293){ var _294=null; switch(_292){ case 2: _294=new MenuPoint(this.getItemLeft(_293),this.getItemTop(_293)); break; case 3: _294=new MenuPoint(this.getItemRight(_293),this.getItemBottom(_293)); break; case 4: _294=new MenuPoint(this.getItemLeft(_293),this.getItemBottom(_293)); break; default: _294=new MenuPoint(this.getItemRight(_293),this.getItemTop(_293)); } return _294; },predictSubMenuPoint:function(_295,_296){ var _297=null; if(_295%2!=0){ return new MenuPoint(this.getItemRight(_296),this.getItemTop(_296)); }else{ return new MenuPoint(this.getItemLeft(_296),this.getItemTop(_296)); } },setPosition:function(){ this.left=this.x; this.top=this.y; this.private_changePosition(this.x,this.y); },appendItem:function(item){ item.parent=this; item.id=this.items.length; this.items.push(item); },appendMenu:function(item,menu){ menu.linkMenuItem=item; menu.parentMenu=this; menu.id=menu.getMyId(); this.childMenu.push(menu); }}; MenuContainer=function(){ this.menu=null; this.id=null; }; MenuCreator=function(_29b,_29c){ this.parentLayer=_29b; this.counter=0; this.browser=_29c; }; MenuCreator.prototype={createMenu:function(Node){ var _29e=null; if(Node.nodeName.toLowerCase()=="menu"){ _29e=new MenuContainer(); var _29f=Node.attributes; for(var i=0;i<_29f.length;i++){ var _2a1=_29f.item(i); if(_2a1.nodeName=="id"){ _29e.id=_2a1.nodeValue; break; } } _29e.menu=this.createSubMenu(Node); } return _29e; },createSubMenu:function(node){ if(!node.hasChildNodes()){ return null; } var _2a3=node.childNodes; var sub=new Menu(this.counter++,this.parentLayer,this.browser); sub.fontColor=node.getAttribute("fontName")==null||node.getAttribute("fontName")==""?"Arial":node.getAttribute("fontName"); sub.fontColor=node.getAttribute("fontColor")==null||node.getAttribute("fontColor")==""?"black":node.getAttribute("fontColor"); sub.cellColor=node.getAttribute("cellColor")==null||node.getAttribute("cellColor")==""?"white":node.getAttribute("cellColor"); sub.selectFontColor=node.getAttribute("selectFontColor")==null||node.getAttribute("selectFontColor")==""?"white":node.getAttribute("selectFontColor"); sub.selectCellColor=node.getAttribute("selectCellColor")==null||node.getAttribute("selectCellColor")==""?"gray":node.getAttribute("selectCellColor"); sub.fontSize=node.getAttribute("fontSize")==null||node.getAttribute("fontSize")==""?"9pt":parseInt(node.getAttribute("fontSize"))+"pt"; sub.borderColor=node.getAttribute("borderColor")==null||node.getAttribute("borderColor")==""?"#DBDFE2":parseInt(node.getAttribute("borderColor"))+"pt"; sub.borderSize=node.getAttribute("borderSize")==null||node.getAttribute("borderSize")==""?1:parseInt(node.getAttribute("borderSize")); try{ for(var i=0;i<_2a3.length;i++){ var _2a6=_2a3[i]; if(_2a6.nodeName.toLowerCase()=="menuitem"){ var item=new MenuItem(""); var _2a8=null; item.text=_2a6.getAttribute("text"); item.href=_2a6.getAttribute("href"); sub.appendItem(item); if(_2a6.hasChildNodes()){ var _2a8=this.createSubMenu(_2a6); if(_2a8!=null){ sub.appendMenu(item,_2a8); } } } } } catch(e){ } return sub; }};  
