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