function ErrorAlert(text){this.text=text;this.show=function(){$("body").append('
');if(is_array(this.text)){for(var i in this.text){$("#errorDialog").append('

'+this.text[i]+'

');}}else{$("#errorDialog").append('

'+this.text+'

');} $("#errorDialog").dialog({modal:true,buttons:{Ok:function(){$(this).dialog("close");$(this).remove();}}});};}