function pyuiWait(){YAHOO.pyuiWait=new YAHOO.widget.Panel("pyuiWait",{width:"100px",fixedcenter:true,close:false,draggable:false,modal:true,visible:false});YAHOO.pyuiWait.setBody('<img src="sys/img/loading.gif" alt="Lütfen Bekleyiniz..."/>Yukleniyor...');YAHOO.pyuiWait.render(document.body);YAHOO.pyuiWait.show()}pyuiValidate=function(a){if(typeof(a.info)=="undefined"){a.info=false}else{a.info=true}if(typeof(a.preview)=="undefined"){a.preview=false}else{a.preview=true}if(typeof(a.dialog)=="undefined"){a.dialog=false}else{a.dialog=true}if(typeof(a.blank)=="undefined"){a.blank=false}else{a.blank=true}if(typeof(a.varpost)=="undefined"){a.varpost=false}else{a.varpost=true}var b=function(){if(a.forward!=""){if(a.varpost==true){pySubmit(a.form,a.forward)}else{WinId=window.open(a.forward,"_parent","width=800,height=600")}}this.hide()};var d=function(){this.hide()};var c={success:function(i){var f=YAHOO.lang.JSON.parse(i.responseText);var g="top="+f.top+",left="+f.left+"width="+f.width+"height="+f.height+",resizable,toolbar=no,directories=no,status=no,menubar=yes,scrollbars=yes";if(f.type=="SUCCESS"){if(a.info==true){var h="INFO";if(a.preview==true){h="NOICO"}if(a.blank==true){WinId=pywnDialog(h,f.title,f.message,f.width,f.height)}else{pyuiDialog(h,f.title,f.message,[{text:"Kapat",handler:b,isDefault:true}])}}else{if(a.dialog==true){pyuiDialog("DIALOG",f.title,f.message,[{text:"Hayir",handler:d,isDefault:true},{text:"Evet",handler:b}])}else{if(a.forward!=""){if(a.varpost==true){if(a.blank==true){pySubmit(a.form,a.forward,"_blank")}else{pySubmit(a.form,a.forward,"_parent")}}else{if(a.blank==true){WinId=window.open(a.forward,"_blank",g)}else{WinId=window.open(a.forward,"_parent",g)}}}else{if(a.blank==true){WinId=pywnDialog("INFO",f.title,f.message,f.width,f.height)}}}}}if((f.type=="WARNING")||(f.type=="ERROR")){if(a.blank==true){WinId=pywnDialog(f.type,f.title,f.message,f.width,f.height)}else{pyuiDialog(f.type,f.title,f.message,[{text:"Kapat",handler:d,isDefault:true}])}}YAHOO.pyuiWait.hide()},timeout:10000,failure:function(f){YAHOO.pyuiWait.hide()}};pyuiWait();YAHOO.util.Connect.setForm(a.form);var e=YAHOO.util.Connect.asyncRequest("POST",a.check,c)};pyuiDialog=function(f,e,d,a){var b=[];b.NOICO="";b.SUCCESS='<img src="sys/img/oke48.png" />';b.WARNING='<img src="sys/img/wrn48.png" />';b.DIALOG='<img src="sys/img/dlg48.png" />';b.INFO='<img src="sys/img/inf48.png" />';b.ERROR='<img src="sys/img/err48.png" />';cTxt='<table width="300" border="0" cellspacing="0" cellpadding="0" align="center"><tr><td colspan="5">&nbsp;</td></tr><tr><td width="60"><div align="center">'+b[f]+'</div></td><td width="20"></td><td><div align="left">'+d+'</div></td></tr><tr><td colspan="5">&nbsp;</td></tr></table>';var c=new YAHOO.widget.SimpleDialog("pyuiDialog",{visible:false,draggable:true,fixedcenter:true,close:true,modal:true,text:cTxt,constraintoviewport:true,buttons:a});c.setHeader(e);c.render(document.body);c.show()};pyuiForm=function(e,c,b,a){var d=new YAHOO.widget.SimpleDialog("pyuiForm",{zindex:1,visible:false,draggable:true,fixedcenter:true,autofillheight:"body",width:b,close:true,modal:true,constraintoviewport:true,buttons:a});d.setHeader(e);d.setBody(c);d.render(document.body);d.show()};pyuiEdit=function(c,g,h,d,f,i){var b=function(){this.hide()};var a={success:function(l){var j=[];j.type="SUCCESS";j.title=".";j.message=l.responseText;var m=function(){var o={success:i.onDataReturnInitializeTable,scope:i,argument:i.getState()};pyuiValidate({form:g,check:c+"&act=save&typ=ajx",forward:""});var t=i.getState();var q=i.get("sortedBy").key;var p=((i.get("sortedBy").dir===YAHOO.widget.DataTable.CLASS_ASC)?"asc":"desc");var s=t.pagination.recordOffset;var r=i.get("paginator").getRowsPerPage();var n="sort="+q+"&dir="+p+"&startIndex="+s+"&results="+r;f.sendRequest(n,o);this.hide()};var k=function(){this.hide()};pyuiForm(h,j.message,d,[{text:"Vazgeç",handler:k},{text:"Kaydet",handler:m,isDefault:true}])},timeout:10000,failure:function(j){pyuiDialog("ERROR","Hata..!",j.responseText,[{text:"Kapat",handler:b,isDefault:true}])}};var e=c+"&act=edt&typ=ajx";YAHOO.util.Connect.asyncRequest("GET",e,a)};