function initpop(){var c="closewindow";var e="Close window";var f="width=680,height=550,left=0,top=0,scrollbars=yes,location=no";if(!window.opener){var a,d,b;a=document.getElementsByTagName("a");for(d=0;d<a.length;d++){if(a[d].rev){b=function(){window.open(this.href,"",f);return false};a[d].onclick=b;a[d].onkeypress=b}}}}function addEvent(d,c,a){if(d.addEventListener){d.addEventListener(c,a,true);return true}else{if(d.attachEvent){var b=d.attachEvent("on"+c,a);return b}else{return false}}}addEvent(window,"load",initpop);(function(a){a.fn.popupWindow=function(b){return this.each(function(){a(this).click(function(){a.fn.popupWindow.defaultSettings={centerBrowser:1,centerScreen:1,height:350,left:0,location:0,menubar:0,resizable:0,scrollbars:0,status:0,width:380,windowName:null,windowURL:null,top:0,toolbar:0};settings=a.extend({},a.fn.popupWindow.defaultSettings,b||{});var e="height="+settings.height+",width="+settings.width+",toolbar="+settings.toolbar+",scrollbars="+settings.scrollbars+",status="+settings.status+",resizable="+settings.resizable+",location="+settings.location+",menuBar="+settings.menubar;settings.windowName=this.name||settings.windowName;settings.windowURL=this.href||settings.windowURL;var c,d;if(settings.centerBrowser){if(a.browser.msie){c=(window.screenTop-120)+((((document.documentElement.clientHeight+120)/2)-(settings.height/2)));d=window.screenLeft+((((document.body.offsetWidth+20)/2)-(settings.width/2)))}else{c=window.screenY+(((window.outerHeight/2)-(settings.height/2)));d=window.screenX+(((window.outerWidth/2)-(settings.width/2)))}window.open(settings.windowURL,settings.windowName,e+",left="+d+",top="+c).focus()}else{if(settings.centerScreen){c=(screen.height-settings.height)/2;d=(screen.width-settings.width)/2;window.open(settings.windowURL,settings.windowName,e+",left="+d+",top="+c).focus()}else{window.open(settings.windowURL,settings.windowName,e+",left="+settings.left+",top="+settings.top).focus()}}return false})})}})(jQuery);
