if(!HTML)var HTML={};HTML.Popup=function(width,height,features){this.width=width||300;this.height=height||300;this.features=features||'location=no, statusbar=no, menubar=no';};HTML.Popup.VERSION='0.04';HTML.Popup.prototype.popup=function(element,content){var href=element.getAttribute('href');var target=element.getAttribute('target')||'_blank';var win=window.open(href,target,'width='+this.width+', height='+this.height+', '+this.features);win.focus();if(content){win.document.open();win.document.write(content);win.document.close();}return false;};HTML.Popup.prototype.popupHref=function(href){var target='_blank';window.open(href,target,'width='+this.width+', height='+this.height+', '+this.features).focus();return false;};HTML.Popup.prototype.getLinks=function(){var collections=[document.getElementsByTagName('a'),document.getElementsByTagName('area')];var links={length:0};for(var i=0;i<collections.length;++i){for(var j=0;j<collections[i].length;++j){links[links.length++]=collections[i][j];}}return links;};HTML.Popup.prototype.attachToClass=function(classname){var _obj=this;var links=this.getLinks();for(l=0;l<links.length;l++){if(links[l].className==classname){links[l].onclick=function(){return _obj.popup(this);};}}};HTML.Popup.prototype.attachToID=function(id){var _obj=this;var links=this.getLinks();for(l=0;l<links.length;l++){if(links[l].id==id){links[l].onclick=function(){return _obj.popup(this);};}}};HTML.Popup.prototype.attachToTarget=function(targetname){var links=this.getLinks();var _obj=this;for(l=0;l<links.length;l++){if(links[l].getAttribute('target')==targetname){links[l].onclick=function(){return _obj.popup(this);};}}}