// MathPage JavaScript 1.3: "MathPage JavaScript", "MathPage JavaScript v1.3 (MathType 5.2) by Design Science, Inc."
// Copyright 2001-2003 Design Science, Inc.
var DSMP={gJSFound:true,gPageVersion:0,gMaxCharCompat:0,gGenMathZoom:1,gPopupEqnBgColorDefault:"",gPopupEqnPaddingDefault:10,gPlaceholderPadding:4,gOldJSMessage:"",gCompatMessage:"",gMinBrowserMessage:"",gHidePopupMessage:"",gShowPopupMessage:"",gPlaceholderWidth:0,gPlaceholderHeight:0,gPlaceholder2Height:0,gScreenEqnWidth:0,gScreenEqnHeight:0,gScreenEqnSrc:"",gPrintEqnSrc:"",gPopupEqnSrc:"",gEmptySrc:"",gPopupEqnPadding:0,gNNPopupBgColor:"",gNNLayerTop:0,gNNLayerLeft:0,a:"1.3",b:"",c:false,d:false,e:false,f:false,g:false,h:false,i:false,j:false,k:false,l:false,m:false,n:false,o:false,p:false,q:false,r:false,s:false,t:false,u:false,v:false,w:false,z:false,A:false,B:false,C:false,D:0,E:0,F:1,G:new Array("S","M","L"),H:"",I:0,J:0,K:0,L:0,M:0,N:0,O:0,P:0,Q:0,R:0,S:0,T:false,U:false,V:new Array()};W();function W(){with(DSMP){if(navigator.appName=="Netscape"){if(navigator.appVersion.indexOf("Safari")!=-1){f=true;p=true;k=true;C=true;window.onload=X;A=true;}else if(navigator.appVersion>="5"){f=true;p=true;z=false;B=true;q=true;if(navigator.appVersion.indexOf("Macintosh")!=-1){C=true;}}else{c=true;window.captureEvents(Event.RESIZE);if(navigator.appVersion.indexOf("Macintosh")!=-1){n=true;v=true;}if(navigator.appVersion<"4"){alert(gMinBrowserMessage);}}}else if(navigator.appName=="Microsoft Internet Explorer"){var Y=0;var Z=navigator.userAgent.indexOf("MSIE ");if(Z!=-1){Y=parseFloat(navigator.userAgent.substring(Z+5));}if(Y<4){alert(gMinBrowserMessage);}if(navigator.appVersion.indexOf("Windows")!=-1){e=true;if(Y>=5.5){d=true;f=true;g=true;r=true;m=true;}else if(Y>=5.0){d=true;f=true;g=true;r=true;s=true;}else{s=true;j=true;}}else if(navigator.appVersion.indexOf("Macintosh")!=-1){o=true;e=false;v=true;if(Y>=5.1){h=true;i=true;t=true;f=true;k=true;l=true;C=true;window.onload=X;}else if(Y==5.0){h=true;i=true;f=true;j=true;}else{gPopupEqnPadding=0;t=true;u=true;}}}else if(navigator.appName=="Opera"){f=true;p=true;w=true;C=true;}window.onresize=ab;bb();}}function bb(){with(DSMP){if(c)return;var cb="";cb+="<style> \n"+".MPNNCode { display:none } \n"+"sub,sup { font-size:.7em } \n";if(u){cb+=".MPPopup,.MPPopupNoBg { position:absolute; visibility:hidden } \n"+"table { z-index:98 } \n";}if(w){cb+=".MPScreenEqn { position:relative } \n"+".MPPrintEqn { position:relative } \n";}if(k){cb+=".MPScreenEqn { visibility:hidden } \n";}cb+="</style> \n";if(C){cb+="<style media=print> \n"+".MPPrintEqn { position:relative } \n"+".MPPHSpan,.MPScreenPH,.MPScreenEqn,.MPPopup,.MPPopupNoBg,.MPPH { display:none } \n"+"</style> \n";}document.write(cb);}}function ab(){with(DSMP){if(c){if(navigator.appVersion.substr(0,4)!="4.05")location.reload();}else{db();if(k){X();}}}}function X(){with(DSMP){for(var eb=0;eb<document.images.length;eb++){var id=(p?document.images.item(eb).id:document.images[eb].id);var fb=id.substr(0,2);if(id.length==6&&(fb=="ch"||fb=="eq")){gb(id);}}}}function MPBodyInit(hb){with(DSMP){if(parseInt(gPageVersion)>parseInt(a)){alert(gOldJSMessage);}if(!gMaxCharCompat){if(!d)alert(gCompatMessage);}b=escape(hb);if(b.length>0){b+="/";}ib();}}function ib(){with(DSMP){if(c){D=eval("document.layers.MPDpiSpan.top");F=eval("document.layers.MPDpiSpan.clip.width")/100;}else if(p){if(z){var jb=window.open();jb.document.write("<span id=MPDpiSpan style='position:absolute;top:1in'>ABC</span>");jb.document.close();D=jb.document.getElementById("MPDpiSpan").offsetTop;jb.close();}else{D=document.getElementById("MPDpiSpan").offsetTop;}}else{D=eval("document.all.MPDpiSpan.offsetTop");if(h){D+=document.body.topMargin;}}if(D>=108)E=2;else if(D>=84)E=1;else E=0;}}function kb(id){with(DSMP){if(p){var lb=document.getElementById(id);if(lb!=null){lb.parentNode.removeChild(lb);}}else{if(typeof document.all[id].length=="number"){for(var eb=document.all[id].length-1;eb>0;--eb){document.all[id][eb].outerHTML="";}}document.all[id].outerHTML="";}}}function MPDeleteCode(id){with(DSMP){if(f){kb("mpnn"+id+"ph");kb("mpnn"+id);}if(g){kb("mp"+id+"s1");kb("mp"+id+"s2");}}}function mb(nb,ob){with(DSMP){var pb=H;var qb=H+"ph";var rb=H+"pop";var sb=H+"prt";var cb="";var tb="";if(nb){if(e){cb+="<span ";}else{cb+="<img border=0 ";}if(S){cb+="class=MPPopupNoBg";tb+="background-color:#"+S+";";}else{cb+="class=MPPopup";}if(!U){tb+="border:none;";}if(!T){tb+="padding:0px;";}if(e){tb+="width:"+ub+"px;height:"+vb+"px";}if(tb.length>0){cb+=" style='"+tb+"'";}cb+=" id="+rb;if(e){cb+="><img border=0 ";}cb+=" src='"+gPopupEqnSrc+"'"+" width="+ub+" height="+vb+" onmousemove='status="+'"'+gHidePopupMessage+'"'+"'"+" onmouseover='status="+'"'+gHidePopupMessage+'"'+"'"+" onmouseout='status="+'""'+"'"+" onclick='return MPHidePopup(event,"+rb+")'>";if(e){cb+="</span>";}}cb+="<nobr>";var top=gPlaceholderPadding;var left=-J;var wb=gPlaceholderWidth-(r?3:1);if(w){;}else if(s&&ob){wb=gPlaceholderWidth;if(ob==2){cb+="<span id="+qb+"span class=MPPHSpan style='position:relative;width:1px;height:"+gPlaceholderHeight+"px'>";top=-gPlaceholderHeight;}else{cb+="<span id="+qb+"span class=MPPHSpan style='position:relative;width:1px;height:1px'>";}cb+="<img class=MPPH src='"+gEmptySrc+"'"+" id="+qb+" width="+gPlaceholderWidth+" height=1";if(ob==2){cb+=" align=middle border=0";}else{cb+=" align=baseline style='position:relative;top:1ex' border=0";top=1;}cb+=">";}else if(i||m){cb+="<span id="+qb+"span class=MPPHSpan style='position:relative";if(j)cb+=";width:1px";else if(m)cb+=";height:1px;font-size:0px'";cb+="'>";cb+="<img class=MPScreenPH src='"+gEmptySrc+"'"+" id="+qb+" width="+wb+" height="+gPlaceholderHeight+"><img class=MPPrintPH src='"+gEmptySrc+"'"+" id="+qb+"prt"+" width="+(Q-(r?3:1))+" height="+gPlaceholderHeight+">";}else if(q){cb+="<span id="+qb+"span class=MPPHSpan style='position:relative;font-size:1px'>";top+=-gPlaceholderHeight+2;cb+="<img class=MPPH src='"+gEmptySrc+"'"+" style='visibility:visible' "+" id="+qb+" width="+wb+" height="+gPlaceholderHeight+">";}else{cb+="<span id="+qb+"span class=MPPHSpan style='position:relative;height:"+gPlaceholderHeight+"px";if(j)cb+=";width:1px";cb+="'>";cb+="<img class=MPPH src='"+gEmptySrc+"'"+" align=baseline"+" id="+qb+" width="+wb+" height="+gPlaceholderHeight+">";}if(w){top=I;}cb+="<img class=MPScreenEqn"+" align=baseline "+" id="+pb+" border=0 style='z-index:98;cursor:";if(nb){cb+="hand";}else{cb+="default";}cb+=";top:"+top+"px;"+"left:"+left+"px'"+" src='"+gScreenEqnSrc+"'"+" width="+gScreenEqnWidth+" height="+gScreenEqnHeight;if(nb){cb+=" onclick='return MPShowPopup("+pb+","+rb+",event)'"+" onmousemove='status="+'"'+gShowPopupMessage+'"'+"'"+" onmouseover='status="+'"'+gShowPopupMessage+'"'+"'"+" onmouseout='status="+'""'+"'";}cb+=">";if(i){left=-1-O;}if(w||C){top=N;}var xb="<img class=MPPrintEqn"+" id="+sb+" src='"+gPrintEqnSrc+"'"+" style='top:"+top+"px;left:"+left+"px'"+" width="+L+" height="+M+">";if(!C)cb+=xb;if(!w)cb+="</span>";if(!s||!ob){cb+="<img align=top class=MPPH id="+qb+"2 border=0 src='"+gEmptySrc+"'";cb+=" width=1 height="+(gPlaceholder2Height)+">";}if(r){document.write(cb);cb="";var yb=eval("document.all."+qb);var zb=yb.currentStyle.lineHeight;var lineHeight=0,Ab=1,Bb=1;if(zb!="normal"){lineHeight=(parseInt(zb)*D)/72;Ab=parseInt(lineHeight*3/5+0.5);Bb=parseInt(Ab+(lineHeight*1/3)+0.5);}cb+="<img class=MPPH id="+qb+"3 align=bottom border=0 width=1 src='"+gEmptySrc+"' height="+Ab+">";cb+="<img class=MPPH id="+qb+"4 align=top    border=0 width=1 src='"+gEmptySrc+"' height="+Bb+">";}cb+="</nobr>";if(C){cb+=xb;cb+="<img class=MPPrintPH src='"+gEmptySrc+"'"+" id="+qb+"5 "+" align=top width=1"+" height="+(M+N)+">";}document.write(cb);if(k){var yb=document.getElementById(qb);var Cb=document.getElementById(pb);Cb.topOffset=gPlaceholderPadding;Cb.leftOffset=J;}}}function gb(pb){var yb=document.getElementById(pb+"ph");var Cb=document.getElementById(pb);Cb.style.pixelLeft=yb.offsetLeft-Cb.leftOffset;Cb.style.pixelTop=yb.offsetTop+Cb.topOffset;Cb.style.visibility="visible";}function MPEquation(){with(DSMP){if(!c){mb(gGenMathZoom,0);}}}function MPInlineChar(ob){with(DSMP){if(!c){mb(false,ob);}}}function MPShowPopup(Db,Eb,Fb){with(DSMP){if(c){if(Fb.which!=1)return true;}else if(p){if(Fb.button!=0&&!A)return true;}var Gb;var Hb;if(c){Gb=Db.clip;Hb=Eb.clip;}else{Gb=Db;Hb=Eb;if(e)Hb=Eb.children[0];}var Ib=parseInt(Gb.width);var Jb=parseInt(Gb.height);var Kb=parseInt(Hb.width);var Lb=parseInt(Hb.height);if(c){Eb.x=Db.x+(Ib)/2-(Kb)/2;var Mb=window.innerWidth;var Nb=15;if(document.width>window.innerWidth-Nb){Mb-=Nb;}if(Eb.x+Kb>Mb){Eb.x=Mb-Kb;}if(Eb.x<0)Eb.x=0;Eb.y=Db.y+(Jb)/2-(Lb)/2;if(Eb.y+Lb>document.height){Eb.y=document.height-Lb;}if(Eb.y<0)Eb.y=0;Eb.visibility="show";}else if(p){var top=Db.parentNode.offsetTop;if(B)top+=Db.offsetTop;top+=(Jb)/2-(Lb)/2-gPopupEqnPaddingDefault;if(top<0)top=0;var left=Db.parentNode.offsetLeft;if(B)left+=Db.offsetLeft;left+=(Ib/2)-(Kb/2)-gPopupEqnPaddingDefault;if(left<0)left=0;Eb.style.top=top+"px";Eb.style.left=left+"px";Eb.style.visibility="visible";}else{var Ob=Db;if(Ob.tagName=="IMG"&&Ob.parentElement.tagName=="SPAN"){Ob=Ob.parentElement;}var top=Ob.offsetTop;var left=Ob.offsetLeft;if(o){top+=Db.style.pixelTop;left+=Db.style.pixelLeft;}if(h){left+=document.body.leftMargin;top+=document.body.topMargin;}if(l){var Pb=false;var Qb=Db.clientTop,Rb=Db.clientLeft;for(Sb=Db.parentElement;Sb!=null;Sb=Sb.parentElement){if(Sb.tagName=="TD"||Sb.tagName=="TABLE"){Qb+=Sb.clientTop;Rb+=Sb.clientLeft;}if(Sb.tagName=="TABLE"){Pb=true;break;}}if(Pb){top=Qb;left=Rb;}}var padding;if(Eb.currentStyle){padding=parseInt(Eb.currentStyle.padding);}else{padding=gPopupEqnPaddingDefault;}Eb.style.pixelTop=top+(Jb)/2-(Lb)/2-padding;var Tb=document.body.scrollHeight;if(document.body.offsetHeight>Tb){Tb=document.body.offsetHeight;}if(Eb.style.pixelTop+Lb>Tb){Eb.style.pixelTop=Tb-Lb-2*padding-2;}if(Eb.style.pixelTop<0){if(t){var Pb=false;for(Sb=Ob;Sb!=null;Sb=Sb.parentElement){if(Sb.tagName=="TD"||Sb.tagName=="TABLE"){Pb=true;break;}}if(!Pb){Eb.style.pixelTop=document.body.topMargin;}}else{Eb.style.pixelTop=0;}}Eb.style.pixelLeft=left+(Ib/2)-(Kb/2)-padding;if((Eb.style.pixelLeft+Kb)>document.body.scrollWidth){Eb.style.pixelLeft=document.body.scrollWidth-Kb-2*padding-2;}if(Eb.style.pixelLeft<0)Eb.style.pixelLeft=0;Eb.style.visibility="visible";}V[V.length]=Eb;return false;}}function db(){with(DSMP){var Ub=V.length;for(var eb=0;eb<Ub;eb++){Vb=V[eb];if(Vb!=null){if(c){Vb.visibility="hide";}else{Vb.style.visibility="hidden";}}}V.length=0;}}function MPHidePopup(Fb,Eb){with(DSMP){var Wb=false;if(c){if(Fb.which!=1)return true;Wb=Fb.modifiers&Event.SHIFT_MASK;}else if(p){if(Fb.button!=0&&!A)return true;Wb=Fb.shiftKey;}else{Wb=window.event.shiftKey;}if(Wb){db();}else{if(c){Eb.visibility="hide";}else{Eb.style.visibility="hidden";}for(var eb=0;eb<V.length;++eb){if(V[eb]==Eb){V[eb]=null;break;}}}return false;}}function Xb(Yb,Zb,nb,ac,bc,cc){with(DSMP){H=Yb;gEmptySrc=b+"empty.gif";gScreenEqnWidth=cc[E][0];gScreenEqnHeight=cc[E][1];I=cc[E][2];J=cc[E][3];K=cc[E][4];if(Zb=="ch"||Zb=="eq"){gScreenEqnSrc=gEmptySrc;}else{gScreenEqnSrc=b+Zb+G[E]+".gif";}gPlaceholderHeight=gScreenEqnHeight-I+gPlaceholderPadding;gPlaceholderWidth=gScreenEqnWidth-J-K;gPlaceholder2Height=gScreenEqnHeight+2*gPlaceholderPadding;if(nb){ub=cc[E+3][0];vb=cc[E+3][1];gPopupEqnSrc=b+Zb+G[E]+"P.gif";}S=ac;T=(bc&1);U=(bc&2);if(T)gPopupEqnPadding=gPopupEqnPaddingDefault;else gPopupEqnPadding=0;gNNPopupBgColor=(ac?"#"+ac:gPopupEqnBgColorDefault);var dc;if(i)dc=0;else if(m)dc=1;else dc=E;L=cc[dc][0];M=cc[dc][1];N=cc[dc][2];O=cc[dc][3];P=cc[dc][4];R=M-N+gPlaceholderPadding;Q=L-O-P;if(Zb=="ch"||Zb=="eq"){gPrintEqnSrc=gEmptySrc;}else{if(n){gPrintEqnSrc=b+Zb+"S.gif";}else{gPrintEqnSrc=b+Zb+"P.gif";}}}}function MPSetEqnAttrs(Yb,ec,bc,cc){Xb(Yb,Yb,true,ec,bc,cc);}function MPSetChAttrs(Yb,Zb,cc){Xb(Yb,Zb,false,null,0,cc);}function MPNNCalcTopLeft(fc,gc){with(DSMP){if(!c)return;gNNLayerTop=Math.round(fc.y/F)+(gc=="1"?gPlaceholderHeight:1)-gScreenEqnHeight+I;gNNLayerLeft=fc.x/F-J;}}function MPNNSelectScreenEqn(hc){with(DSMP){if(!c)return;if(innerWidth||innerHeight){if(hc.src.substr(hc.src.length-9,9)!="empty.gif"){var ic=hc.src.substr(0,hc.src.length-5)+G[E]+".gif";var Ub=ic.length;if(hc.src!=ic){hc.src=ic;}}}}}function MPWebEQApplet(id,jc,kc,lc,mc,nc){var width=kc[0];var height=kc[1];var oc=kc[2];var pc=(height-oc);var qc=lc;var cb='<applet code=webeq3.ViewerControl '+' id='+id+' width='+width+' height='+(2*pc)+' align=middle>'+'<param name=size value='+qc+'>'+'<param name=controls value=false>'+'<param name=align value=left>'+'<param name=valign value=baseline>';if(mc){cb+='<param name=background value="#'+mc+'">';}cb+=jc+'<param name=eq value="'+nc+'">'+'</applet>';document.write(cb);}function MPTechexplorerObject(id,jc,kc,lc,mc,nc){var rc=kc[0];var sc=kc[1];var oc=kc[2];var qc=lc;var tc=eval("document.techexplorer");var width,height,uc,pc;var cb="";var vc="";var wc=new RegExp("&","g");var xc=new RegExp("<math>");var yc=new RegExp("</math>");if(gScaleEquations){rc=Math.round((rc*DSMP.D)/96);sc=Math.round((sc*DSMP.D)/96);oc=Math.round((oc*DSMP.D)/96);if(DSMP.v){qc=Math.round((lc*DSMP.D)/72);}else{qc=Math.round((lc*72)/DSMP.D);}}vc="fontsize='"+qc+"pt'";if(mc)vc+=" mathbackground='#"+mc+"'";nc=nc.replace(xc,"<math><mstyle "+vc+">");nc=nc.replace(yc,"</mstyle></math>");var zc=nc.replace(wc,"&amp;");cb+='<object align=absmiddle classid="clsid:5AFAB315-AD87-11D3-98BB-002035EFB1A4" codebase="AXTCHEXP.OCX"'+' id='+id+'>'+'<param name="DataType" value="1">'+'<param name="AutoSize" value="TRUE">'+'<param name="Data" value="'+zc+'">'+jc;var Ac=(navigator.plugins["IBM techexplorer Hypermedia Browser [Trial Version], Professional Edition"]!=null||navigator.plugins["IBM techexplorer Hypermedia Browser, Professional Edition"]!=null);if(navigator.appName=="Netscape"&&Ac){while(!tc.isReady());width=tc.getWidthFromMMLString(nc);height=tc.getHeightFromMMLString(nc);uc=Math.round((oc*height)/sc);}else{width=rc;height=sc;uc=oc;}pc=height-uc;cb+='<embed type="application/x-techexplorer"'+' pluginspage="http://www.software.ibm.com/techexplorer"'+' id='+id+' width='+width+' height='+(2*pc)+' align="middle"'+jc+' mmldata="'+zc+'">'+'</embed>'+'</object>';document.write(cb);}