PopUp=function(a){this.types=[];this.defaults={width:1000,height:600,top:0,left:0,location:false,resizable:false,scrollbars:false,status:false,toolbar:false,menubar:false,center:true,title:"This link opens in a new window"};this.addType({name:"standard",location:true,resizable:true,scrollbars:true,status:true,toolbar:true,menubar:true});if(a){this.apply()}};o=PopUp.prototype;o.apply=function(){var b=document.getElementsByTagName("a");if(!b){return}for(var c=0;c<b.length;c++){var a=b[c];if(a.className.indexOf("popup")>-1){this.attachBehavior(a,this.getType(a))}}};o.addType=function(a){for(var b in this.defaults){if(a[b]==undefined){a[b]=this.defaults[b]}}this.types[a.name]=a};o.getType=function(a){for(var b in this.types){if(a.className.indexOf(b)>-1){return b}}return"standard"};o.attachBehavior=function(a,c){var b=this.types[c];a.title=b.title;a.popupProperties={type:c,ref:this};a.onclick=function(){this.popupProperties.ref.open(this.href,this.popupProperties.type);return false}};o.booleanToWord=function(a){if(a){return"yes"}return"no"};o.getTopLeftCentered=function(e){var c=e;var d={left:c.left,top:c.top};var b=screen.availHeight-20;var a=screen.availWidth-10;if(!b||!a){return d}d.left=(a/2)-(c.width/2);d.top=(b/2)-(c.height/2);return d};o.getParamsOfType=function(f){var b=f;var e=this.booleanToWord;if(b.center){var a=this.getTopLeftCentered(f);b.left=a.left;b.top=a.top}var d="width="+b.width;d+=",height="+b.height;d+=",left="+b.left;d+=",top="+b.top;d+=",location="+e(b.location);d+=",resizable="+e(b.resizable);d+=",scrollbars="+e(b.scrollbars);d+=",status="+e(b.status);d+=",toolbar="+e(b.toolbar);d+=",menubar="+e(b.menubar);return d};o.open=function(b,d){if(!d){d="standard"}var c=this.types[d];var e=this.getParamsOfType(c);if(b.search(/\?/)==-1){if(b.search(/#/)==-1){b=b+"?jsPopUp=true"}else{b=b.replace(/#/,"?jsPopUp=true#")}}else{if(b.search(/#/)==-1){b=b+"&jsPopUp=true"}else{b=b.replace(/#/,"&jsPopUp=true#")}}var a=window.open(b,c.name,e);if(a){a.focus()}return false};