\n
\n";
if (popup_menu!='') popup_menu=" class='"+popup_menu+"'";
if (this.Mode.indexOf("V")!=-1)
s=s+"
\n";
if (this.Mode.indexOf("S")!=-1)
s=s+"
\n";
if (this.Mode.indexOf("U")!=-1)
s=s+"
\n";
if (this.Mode.indexOf("F")!=-1)
s=s+"
\n";
if (this.Mode.indexOf("P")!=-1)
s=s+"
\n";
if (this.Mode.indexOf("G")!=-1)
s=s+"
\n";
if (this.Mode.indexOf("O")!=-1)
s=s+"
\n";
s=s+"
\n";
document.getElementById(name).outerHTML=s;
$("#ID_TAB_"+name).tabs();
}
this.defaultValues=function() { // Начальные значения
}
this.getPotType=function() {
var active=$("#ID_TAB_"+this.Name).tabs("option","active");
var s;
if (this.Mode.substr(active,1)=="V") s="volume";
if (this.Mode.substr(active,1)=="S") s="surface";
if (this.Mode.substr(active,1)=="U") s="superposition";
if (this.Mode.substr(active,1)=="F") s="folding";
if (this.Mode.substr(active,1)=="P") s="proximity";
if (this.Mode.substr(active,1)=="G") s="gaussian";
if (this.Mode.substr(active,1)=="O") s="spin-orbit";
//alert(s);
return(s);
}
this.setPotType=function(potname) {
var n;
if (potname=="volume") n=this.Mode.indexOf("V");
if (potname=="surface") n=this.Mode.indexOf("S");
if (potname=="superposition") n=this.Mode.indexOf("U");
if (potname=="folding") n=this.Mode.indexOf("F");
if (potname=="proximity") n=this.Mode.indexOf("P");
if (potname=="gaussian") n=this.Mode.indexOf("G");
if (potname=="spin-orbit") n=this.Mode.indexOf("O");
$("#ID_TAB_"+this.Name).tabs("option","active",n);
}
this.getValue=function(param) {
return($("#ID_"+this.Name+param).val());
}
this.setValue=function(param,value) {
$("#ID_"+this.Name+param).val(value);
}
}
//---------------------------------------------------------------------------------------
// Fresco Потенциал (2015-10-04)
//---------------------------------------------------------------------------------------
function F_Potential2() {
this.Name="";
this.Mode="";
this.Potentials=0;
this.Type=new Array();
this.Shape=new Array();
this.V0=new Array();
this.r0=new Array();
this.a=new Array();
this.change_Type=function(n) {
this.Type[n]=document.getElementById("ID_"+this.Name+"_L"+n+"_TYPE").selectedIndex;
}
this.change_Shape=function(n) {
this.Shape[n]=document.getElementById("ID_"+this.Name+"_L"+n+"_SHAPE").selectedIndex;
}
this.change_V0=function(n) {
x=document.getElementById("ID_"+this.Name+"_L"+n+"_V0").value;
if (isNaN(x)) x=-100; else if (x=="") x=-100;
if (1*x<-1000) x=-1000;
if (1*x>1000) x=1000;
this.V0[n]=x;
document.getElementById("ID_"+this.Name+"_L"+n+"_V0").value=x;
}
this.change_r0=function(n) {
x=document.getElementById("ID_"+this.Name+"_L"+n+"_R0").value;
if (isNaN(x)) x=1.2; else if (x=="") x=1.2;
if (1*x<0.01) x=0.01;
if (1*x>5) x=5;
this.r0[n]=x;
document.getElementById("ID_"+this.Name+"_L"+n+"_R0").value=x;
}
this.change_a=function(n) {
x=document.getElementById("ID_"+this.Name+"_L"+n+"_A").value;
if (isNaN(x)) x=0.5; else if (x=="") x=0.5;
if (1*x<0.01) x=0.01;
if (1*x>3) x=3;
this.a[n]=x;
document.getElementById("ID_"+this.Name+"_L"+n+"_A").value=x;
}
this.makeElement=function(name,mode,onchange,popup_menu) { // Генерация строки элемента
var s;
this.Name=name;
this.Mode=mode;
this.defaultValues();
this.Potentials=1;
s='