var Window={open:function(c,d,e,n,i,f,k,j,b,m,g){var l=screen.availWidth;var a=screen.availHeight;e=(e=="__MAX__")?l-10:e;n=(n=="__MAX__")?a-30:n;i=i?"yes":"no";b=b?"yes":"no";f=!f?Math.round((l-e)/2):f;k=!k?Math.round((a-n)/2):k;m=m?","+m:"";var h=window.open(c,d,"width="+e+",height="+n+",resizable="+b+",scrollbars="+i+",top="+k+",left="+f+m);Window.setFocus(h,j);return(g?h:null)},keepFocus:function(a){a.onblur=function(){Window.setFocus(a,true)}},center:function(a,b){a.moveTo(Math.round((screen.availWidth-Window.getWidth(a))/2),Math.round((screen.availHeight-Window.getHeight(a))/2));Window.setFocus(a,b)},resize:function(d,c,b,a,e){d.resizeTo(c,b);if(a){Window.center(d)}Window.setFocus(d,e)},setFocus:function(a,b){if(b){a.focus()}},getWidth:function(a){return(a.innerWidth?a.innerWidth:(a.document.documentElement?a.document.documentElement.clientWidth:(a.document.body?a.document.body.clientWidth:0)))},getHeight:function(a){return(a.innerHeight?a.innerHeight:(a.document.documentElement?a.document.documentElement.clientHeight:(a.document.body?a.document.body.clientHeight:0)))},getScrollX:function(){return(win.pageXOffset?win.pageXOffset:(win.document.documentElement?win.document.documentElement.scrollLeft:(win.document.body?win.document.body.scrollLeft:0)))},getScrollY:function(){return(win.pageYOffset?win.pageYOffset:(win.document.documentElement?win.document.documentElement.scrollTop:(win.document.body?win.document.body.scrollTop:0)))}};
