
function sendForm_symp(){this.sever_file_name="";this.form_tag="";this.accept_tag="";this.error_tag="";this.type_res="str";this.send=function(){$("form#"+this.form_tag+" input[@type = 'text']").css("background-color","#ffffff");$("form#"+this.form_tag+" input[@type = 'password']").css("background-color","#ffffff");$("form#"+this.form_tag+" select").css("background-color","#ffffff");$("form#"+this.form_tag+" textarea").css("background-color","#ffffff");$("label[@type='result_field']").text("");this.param=$("form#"+this.form_tag).serialize();$("#"+this.error_tag).html("<img src=\"/_img/indicator.gif\"/> Пожалуйста, подождите...");$.post(this.sever_file_name,this.param,this.response);}
this.response=function(xml){var accept=$("accept",xml).text();var obj_parent=this.success.parent;if(accept==0){$("#"+obj_parent.error_tag).text($("glob_message",xml).text());$("filed",xml).each(function(){$("#result_"+$(this).attr("name")).text($(this).text());$("#"+$(this).attr("name")).css("background-color","Yellow");})}else if(accept==1){if(obj_parent.type_res=="obj"){obj_parent.add_accept_function_obj(xml);}else{obj_parent.add_accept_function($("glob_message",xml).text());}}}
this.response.parent=this;this.add_accept_function=function(accept_text){$("#"+this.response.parent.accept_tag).text(accept_text);}
this.add_accept_function_obj=function(xml){}}