function profile() { } profile.editFio = function() { //alert("start"); var newName=new Array(); newName[1]=""; newName[2]=""; newName[3]=""; newName[4]=""; //alert(newName[1]); $("#surnameUser").html(newName[1]); $("#nameUser").html(newName[2]); $("#midnameUser").html(newName[3]); $("#commentUser").html(newName[4]); //alert("new"); //alert($("#saveFio").val()); $("#saveFio").html("Сохранить"); //$("#saveFio").unbind('click','pupils.editFio();'); //$("#saveFio").bind('click','alert("новая обработка");'); //$("#saveFio").click(function(){alert('новая обработка');}); $("#saveFio").each(function() { this.onclick = function() {$("#saveFioText").val("1");document.forms[0].submit();}}); //alert($("#saveFioText").val()); $(".CONTENT_2").html(''); //alert("test"); $(".greenArrow").html(''); } profile.editSchoolText = function() { newName=""; $("#nameSchool").html(newName); $("#saveSchool").val("Сохранить"); $("#saveSchool").each(function() { this.onclick = function() {$("#saveSchoolText").val("1");document.formRight.submit();}}); } profile.editRonoText = function() { var newName=""; var newPhone=""; var newAddress=""; var newComment=""; //alert(newAddress); $("#nameSchool").html(newName); $("#phoneSchool").html(newPhone); $("#addressSchool").html(newAddress); $("#commentSchool").html(newComment); $("#saveRono").val("Сохранить"); $("#saveRono").each(function() { this.onclick = function() {$("#saveRonoText").val("1");document.formRight.submit();}}); } profile.editContact = function() { var newPhone=new Array(); newPhone[1]=""; newPhone[2]=""; newPhone[3]=""; var newMail=""; $("#cell_country_code").html(newPhone[1]); $("#cell_operator_code").html(newPhone[2]); $("#cell_user_code").html(newPhone[3]); $("#email").html(newMail); $("#optin").removeAttr("disabled"); $("#saveContact").val("Сохранить"); $("#saveContact").each(function() { this.onclick = function() {$("#saveContactText").val("1");document.formRight.submit();}}); } profile.editGroups = function() { var newName=new Array(); newName[1]=""; newName[2]=""; newName[3]=""; var i,nameVal; for (i=1;i<11;i++) { nameVal="#name_"+i; newName=""; $(nameVal).html(newName); } $("#saveGroups").val("Сохранить"); $("#saveGroups").each(function() { this.onclick = function() {$("#saveGroupsText").val("1");document.formRight.submit();}}); } profile.editLogin = function() { var newLogin=""; var newPass=""; $("#login").html(newLogin); $("#pass").html(newPass); var text="