function make_done_button(C,B){var A=document.createElement("div");C.appendChild(A);A.style.position="absolute";A.innerHTML="Done";A.onclick=goback;A.style.top=B+"px";A.style.width="4em";A.style.left="50%";A.style.marginLeft="-2em";A.style.backgroundColor="#7BA1D7";A.style.color="white";A.style.border="thin solid black";A.style.textAlign="center";A.style.cursor="pointer";return A}function make_menu_bar(D,B,A,H){var G=document.createElement("div");D.appendChild(G);G.style.position="absolute";G.style.top="0px";G.style.left="0px";G.style.right="17px";G.style.height="22px";G.style.background="#7BA1D7";G.style.color="white";var C=document.createElement("div");G.appendChild(C);C.style.top="0px";C.style.left="0px";C.innerHTML=B;C.style.width="auto";C.style.textAlign="left";var F;var E=14;for(ind=(A.length-1);ind>=0;ind--){F=document.createElement("div");G.appendChild(F);F.style.position="absolute";F.style.width="auto";F.innerHTML=A[ind];F.style.top="0px";F.style.textAlign="center";F.onclick=H[ind];F.style.right=E+"px";F.style.textDecoration="underline";F.style.cursor="pointer";F.onclick=H[ind];E=E+((A[ind].length+2)*7)}}var mode;function GridHelper(C,A,D,E,B){this.cell_height=E;this.cell_width=B;this.container=C;this.left=A;this.top=D;this.rows=new Array();this.num_rows=0;this.num_cols=0;this.textDecoration="none";this.background="transparent";this.color="black";this.ancColor="blue";this.ancDecoration="underline"}GridHelper.prototype.addCell=function(B,C,A){B.style.position="absolute";B.style.top=this.top+(C*this.cell_height)+"px";B.style.left=this.left+(A*this.cell_width)+"px";this.container.appendChild(B);if(!this.rows.hasOwnProperty(C)){this.rows[C]=new Array()}this.rows[C][A]=B;if(C>=this.num_rows){this.num_rows=C+1}if(A>=this.num_cols){this.num_cols=A+1}};GridHelper.prototype.addBigCell=function(B,D,A,C,E){B.style.position="absolute";B.style.top=this.top+(D*this.cell_height)+"px";B.style.left=this.left+(A*this.cell_width)+"px";this.container.appendChild(B);if(!this.rows.hasOwnProperty(D)){this.rows[D]=new Array()}this.rows[D][A]=B;if(D>=this.num_rows){this.num_rows=D+C}if(A>=this.num_cols){this.num_cols=A+E}};GridHelper.prototype.styleRow=function(B,A,C){if(this.rows.hasOwnProperty(B)){for(col_ind=0;col_ind<this.num_cols;col_ind++){if(this.rows[B].hasOwnProperty(col_ind)){this.rows[B][col_ind].style[A]=C}}}else{alert("there is no row with that index:"+B+" attr:"+A+" val:"+C)}};GridHelper.prototype.styleGrid=function(A,B){for(row_ind=0;row_ind<this.num_rows;row_ind++){if(this.rows.hasOwnProperty(row_ind)){this.styleRow(row_ind,A,B)}}};GridHelper.prototype.makeAndAddAnchor=function(F,E,D,A,C){var G=this.container.ownerDocument.createElement("div");var B=this.container.ownerDocument.createElement("a");G.appendChild(B);B.onclick=F;B.innerHTML=E;B.style.cursor="pointer";B.title=C;G.style.position="absolute";G.style.height=this.cell_height+"px";G.style.width=this.cell_width+"px";G.style.color=this.ancColor;G.style.textDecoration=this.ancDecoration;this.addCell(G,D,A);return G};GridHelper.prototype.makeAndAddBigAnchor=function(F,H,I,C,D,B,G){var A=this.container.ownerDocument.createElement("div");var E=this.container.ownerDocument.createElement("a");A.appendChild(E);E.innerHTML=H;E.onclick=F;E.style.cursor="pointer";E.title=G;A.style.position="absolute";A.style.height=(this.cell_height*D)+"px";A.style.width=(this.cell_width*B)+"px";A.style.color=this.ancColor;A.style.textDecoration=this.ancDecoration;this.addBigCell(A,I,C,D,B);return A};GridHelper.prototype.makeAndAddBigTextDiv=function(E,D,A,C,F){var B=this.container.ownerDocument.createElement("div");B.innerHTML=E;B.style.height=(this.cell_height*C)+"px";B.style.width=(this.cell_width*F)+"px";B.style.textDecoration=this.textDecoration;B.style.background=this.background;B.style.color=this.color;B.style.overflow="hidden";this.addBigCell(B,D,A,C,F);return B};GridHelper.prototype.makeAndAddTextDiv=function(D,C,A){var B=this.container.ownerDocument.createElement("div");B.innerHTML=D;B.style.height=this.cell_height+"px";B.style.width=this.cell_width+"px";B.style.textDecoration=this.textDecoration;B.style.background=this.background;B.style.color=this.color;B.style.overflow="hidden";this.addCell(B,C,A);return B};GridHelper.prototype.addTextDivRow=function(A,B){for(cell_ind=0;cell_ind<B.length;cell_ind++){this.makeAndAddTextDiv(B[cell_ind],A,cell_ind)}};GridHelper.prototype.makeAndAddTextBox=function(A,C,F,B,E){var D=this.container.ownerDocument.createElement("input");D.setAttribute("type","text");D.setAttribute("value",A);D.setAttribute("name",C);if(typeof (E)=="undefined"){E=11}D.style.width=E+"em";this.addCell(D,F,B);return D};GridHelper.prototype.makeAndAddWideTextBox=function(A,C,F,B,G,E){var D=this.container.ownerDocument.createElement("input");D.setAttribute("type","text");D.setAttribute("value",A);D.setAttribute("name",C);if(typeof (E)=="undefined"){E=11}D.style.width=E+"em";this.addCell(D,F,B);return D};GridHelper.prototype.makeAndAddAButton=function(A,E,D,B){var C=this.container.ownerDocument.createElement("div");C.onclick=E;C.innerHTML=A;this.addCell(C,D,B);C.style.background="#7BA1D7";C.style.color="white";C.style.cursor="pointer";C.style.border="thin solid black";C.style.paddingLeft="5px";C.style.paddingRight="5px";return C};GridHelper.prototype.removeRow=function(A){for(col_ind=0;col_ind<this.num_cols;col_ind++){if(this.rows[A].hasOwnProperty(col_ind)){this.rows[A][col_ind].parentNode.removeChild(this.rows[A][col_ind])}}this.rows.splice(A,1);var B=A;for(row_ind=A;row_ind<this.num_rows;row_ind++){if(this.rows.hasOwnProperty(row_ind)){B=Math.max(B,row_ind);for(col_ind=0;col_ind<this.num_cols;col_ind++){if(this.rows[row_ind].hasOwnProperty(col_ind)){this.rows[row_ind][col_ind].style.top=this.top+(row_ind*this.cell_height)+"px"}}}}this.num_rows=B};GridHelper.prototype.getHeight=function(){return this.num_rows*this.cell_height};GridHelper.prototype.getWidth=function(){return this.num_cols*this.cell_width};GridHelper.prototype.getRight=function(){return this.getWidth()+this.left};GridHelper.prototype.getBottom=function(){return this.getHeight()+this.top};GridHelper.prototype.getLeft=function(){return this.left};GridHelper.prototype.clear=function(){for(row_ind=0;row_ind<this.num_rows;row_ind++){if(this.rows.hasOwnProperty(row_ind)){for(col_ind=0;col_ind<this.num_cols;col_ind++){if(this.rows[row_ind].hasOwnProperty(col_ind)){this.rows[row_ind][col_ind].parentNode.removeChild(this.rows[row_ind][col_ind])}}}}this.rows=new Array();this.num_rows=0;this.num_cols=0};function Header(B,F,L,N){this.left=F;this.top=L;var H=125;var I=275;var G=document.createElement("img");G.setAttribute("src","summa_logo.jpg");G.style.position="absolute";G.style.top=L+"px";G.style.left=F+"px";B.appendChild(G);var K=25;var J=25;var M=200;var E=new GridHelper(B,F+I+K,L,J,M);var O;var D=0;var A=0;var C=5;for(li_ind=0;li_ind<N.length;li_ind++){E.makeAndAddTextDiv(N[li_ind],A,D);if(((li_ind+1)%C)==0){D++;A=0}else{A++}}this.height=Math.max(H,E.getHeight());this.width=I+K+E.getWidth()}Header.prototype.getHeight=function(){return this.height};Header.prototype.getWidth=function(){return this.width};Header.prototype.getRight=function(){return this.width+this.left};Header.prototype.getBottom=function(){return this.height+this.top};Header.prototype.getLeft=function(){return this.left};