Menu_CS={gridLines:true,logScale:true,expdata:true,fresco:true,dwuck5:true,lab_system:false,legend:true,transfer:false}; //--------------------------------------------------------------------------- function menu_cs(key,options) { if (key=="show_log_scale") { Menu_CS.logScale=true; showCrossSection(); } else if (key=="show_lin_scale") { Menu_CS.logScale=false; showCrossSection(); } // else if (key=="show_lab") { Menu_CS.lab_system=true; showCrossSection(); } else if (key=="show_cm") { Menu_CS.lab_system=false; showCrossSection(); } // else if (key=="show_exp_data") { Menu_CS.expdata = !Menu_CS.expdata; showCrossSection(); } else if (key=="show_fresco") { Menu_CS.fresco = !Menu_CS.fresco; showCrossSection(); } else if (key=="show_dwuck5") { Menu_CS.dwuck5 = !Menu_CS.dwuck5; showCrossSection(); } else if (key=="show_hide_grid_lines") { Menu_CS.gridLines=!Menu_CS.gridLines; showCrossSection(); } else if (key=="show_legend") { Menu_CS.legend = !Menu_CS.legend; showCrossSection(); } else if (key=="show_additional") { Menu_CS.transfer = !Menu_CS.transfer; showCrossSection(); } // else if (key=="PNG") { var canvas=document.getElementById("ID_CANVAS_CROSS_SECTION"); str=canvas.toDataURL("image/png").replace("data:image/png;base64,",""); $.post("../save/save.php",{ body: str,filename:"cross_section.png",code:"base64"}) .done(function(data){ window.open("../save/load.php/cross_section.png?filename=cross_section.png&extension=bbb","ourPicture"); }); } else if (key=="SVG") { } else if (key=="TEXT") { if(cs_FRESCO==null && cs_DWUCK5==null) str = "No calculated data\n"; else { if(cs_FRESCO!=null) source = cs_FRESCO; else source = cs_DWUCK5; } cf = new CommonFun(); str = "DWBA calculations for reaction "+source.getReactionTitle()+"\n"; sfactor = document.f1.SFACTORS.value; str = str + "Spectroscopic Factor = " + cf.stringInScientificFormat(sfactor,4)+"\n"; statfactor = 1.0; if(document.f1.MODEL[0].checked) { statfactor = (1*document.f1.SPIN_TLIKE.selectedIndex + 1.)/(1*document.f1.SPIN_TARG.selectedIndex + 1.); str = str + "Statistical Factor = (2Jf+1)/(2Ji+1) = "+cf.stringInScientificFormat(statfactor,4)+"\n"; } str = str + "theta_" + source.cm_lab + "(deg) "; if(cs_FRESCO!=null) str = str +"ds(FRESCO)/dO("+source.units+"/sr) "; if(cs_DWUCK5!=null) str = str +"ds(DWUCK5)/dO("+source.units+"/sr)"; str = str +"\n"; for(i=0;i