(function(){var a=function(b){this.setOptions(b);this.HIDEPOPUP=1;this.SHOWPOPUP=1;this.popupContents={};this.popupFooterContents={};this.popupWidths={};this.popupXs={};this.popupYs={};this.timers={};this.init()};a.prototype={constructor:a,init:function(){this.popupDialog=new YAHOO.widget.Panel("popupDialog",{visible:false,draggable:false,constraintoviewport:true,close:false,width:"300px",effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.25}});var g='<table cellpadding="0" cellpadding="0" border="0" height="100%" width="100%"><tbody><tr><td valign="top"><div id="popupContents"></div></td></tr></tbody></table>';this.popupDialog.setBody(g);this.popupDialog.setFooter("");this.popupDialog.render(document.body);this.popupDialog.moveEvent.subscribe(function(){this.alignKnob(arguments[1][0])},this,true);var h=YAHOO.util.Selector.query("a.popup");YAHOO.util.Dom.generateId(h);for(var e=0;e<h.length;e++){var k=h[e];var c=new YAHOO.util.Element(k);var b=c.get("id");var d=c.get("rel");var f=c.get("title");var j=k.innerHTML;YAHOO.util.Event.on(k,"mouseover",function(i,l){this.show(l)},{id:b,rel:d,title:f,name:j},this);YAHOO.util.Event.on(k,"mouseout",this.hide,this,true);YAHOO.util.Event.on("popupDialog","mouseover",this.clearTimeouts,this,true);YAHOO.util.Event.on("popupDialog","mouseout",this.hide,this,true)}},setOptions:function(b){this.options={showDelay:250,hideDelay:400,defaultWidth:300};YAHOO.lang.augmentObject(this.options,b||{},true)},alignKnob:function(c){var b=c[0];var e=c[1];var d=Math.abs(e-this.popupYs[this.lastPopupElement]);if(YAHOO.env.ua.ie>0){d+=4}else{d+=10}$("popupDialogKnob").style.top=d+"px"},clearTimeouts:function(){if(this.timers[this.HIDEPOPUP]!=null){window.clearTimeout(this.timers[this.HIDEPOPUP])}if(this.timers[this.SHOWPOPUP]!=null){window.clearTimeout(this.timers[this.SHOWPOPUP])}},hide:function(){this.clearTimeouts();this.setTimer("HIDEPOPUP")},setTimer:function(c,d){var b=this;switch(c.toUpperCase()){case"HIDEPOPUP":var e=function(){b.popupDialog.hide()};this.timers[this[c]]=window.setTimeout(e,this.options.hideDelay);break;case"SHOWPOPUP":var e=function(){b.showCallback(d)};this.timers[this[c]]=window.setTimeout(e,this.options.showDelay);break}},show:function(b){this.clearTimeouts();this.setTimer("SHOWPOPUP",b)},showCallback:function(g){this.lastPopupElement=g.id;var d=YAHOO.util.Dom.getY(g.id)-10;this.popupYs[g.id]=d;if(typeof this.popupContents[g.id]!="undefined"){$("popupContents").innerHTML=this.popupContents[g.id];this.popupDialog.setFooter(this.popupFooterContents[g.id]);this.popupDialog.cfg.setProperty("width",this.popupWidths[g.id]);this.popupDialog.cfg.setProperty("Y",d);if(YAHOO.util.Dom.hasClass(g.id,"popupright")){var f=YAHOO.util.Dom.getRegion(g.id).left-10-parseInt(this.popupWidths[g.id])}else{var f=YAHOO.util.Dom.getRegion(g.id).right+10}this.popupDialog.cfg.setProperty("X",f);this.popupDialog.show();this.showHandler()}else{var e=this.options.defaultWidth;if($(g.rel+"-width")){e=$(g.rel+"-width").value+"px"}else{if(parseInt(YAHOO.util.Dom.getStyle(g.rel,"width"))>0){e=YAHOO.util.Dom.getStyle(g.rel,"width")}}this.popupWidths[g.id]=e;if(YAHOO.util.Dom.hasClass(g.id,"popupright")){var b='<img id="popupDialogKnob" src="/images/sitedesign/dialog-pointer-right.gif" class="dialog-pointer-right" />';var f=YAHOO.util.Dom.getRegion(g.id).left-10-parseInt(e)}else{var b='<img id="popupDialogKnob" src="/images/sitedesign/dialog-pointer-left.gif" class="dialog-pointer-left" />';var f=YAHOO.util.Dom.getRegion(g.id).right+10}if(g.title.toString().length>0){var c=YAHOO.lang.trim(b+"<p>"+g.title+"</p>");$("popupContents").innerHTML=c;this.popupDialog.cfg.setProperty("width",e);this.popupDialog.cfg.setProperty("Y",d);this.popupDialog.cfg.setProperty("X",f);this.popupDialog.show();this.showHandler();this.popupContents[g.id]=c}else{if(g.rel.toString().length>0){if(g.rel.toString().indexOf(".cfm")==-1){if($(g.rel)){var c=b+$(g.rel).innerHTML;$("popupContents").innerHTML=c;if($(g.rel+"-footer")){var h=$(g.rel+"-footer").innerHTML;this.popupDialog.footer.style.display="block";this.popupDialog.setFooter(h)}else{var h="";this.popupDialog.footer.style.display="none"}this.popupDialog.cfg.setProperty("width",e);this.popupDialog.cfg.setProperty("Y",d);this.popupDialog.cfg.setProperty("X",f);this.popupDialog.show();this.showHandler();this.popupContents[g.id]=c;this.popupFooterContents[g.id]=h}}else{YAHOO.util.Connect.asyncRequest("GET",rel,{success:function(i){var j=b+"<p>"+YAHOO.lang.trim(i.responseText)+"</p>";$("popupContents").innerHTML=j;this.popupDialog.cfg.setProperty("width",e);this.popupDialog.cfg.setProperty("Y",d);this.popupDialog.cfg.setProperty("X",f);this.popupDialog.show();this.showHandler();this.popupContents[g.id]=j},failure:function(){this.notificationHide();window.alert("There was an error obtaining the data")},scope:this})}}}}},showHandler:function(){}};YAHOO.com.webucator.Popup=a})();