function Dialog(D,C,B){if(typeof B=="undefined"){B=window}if(typeof window.showModalDialog=="function"&&!Xinha.is_webkit){Dialog._return=function(E){if(typeof C=="function"){C(E)}};var A=window.showModalDialog(D,B,"dialogheight=300;dialogwidth=400;resizable=yes")}else{Dialog._geckoOpenModal(D,C,B)}}Dialog._parentEvent=function(A){setTimeout(function(){if(Dialog._modal&&!Dialog._modal.closed){Dialog._modal.focus()}},50);try{if(Dialog._modal&&!Dialog._modal.closed){Xinha._stopEvent(A)}}catch(B){}};Dialog._return=null;Dialog._modal=null;Dialog._arguments=null;Dialog._selection=null;Dialog._geckoOpenModal=function(D,B,A){var G=window.open(D,"hadialog","toolbar=no,menubar=no,personalbar=no,width=10,height=10,scrollbars=no,resizable=yes,modal=yes,dependable=yes");Dialog._modal=G;Dialog._arguments=A;function E(I){Xinha._addEvent(I,"click",Dialog._parentEvent);Xinha._addEvent(I,"mousedown",Dialog._parentEvent);Xinha._addEvent(I,"focus",Dialog._parentEvent)}function C(I){Xinha._removeEvent(I,"click",Dialog._parentEvent);Xinha._removeEvent(I,"mousedown",Dialog._parentEvent);Xinha._removeEvent(I,"focus",Dialog._parentEvent)}E(window);for(var F=0;F<window.frames.length;F++){try{E(window.frames[F])}catch(H){}}Dialog._return=function(I){if(I&&B){B(I)}C(window);for(var J=0;J<window.frames.length;J++){try{C(window.frames[J])}catch(K){}}Dialog._modal=null};Dialog._modal.focus()};