function attachPopups() {if(document.getElementsByTagName) {anchors = window.document.getElementsByTagName('a');popups = new Array();for(i = 0; i < anchors.length; i++) {if(anchors[i].id.match(/popup_/)) { popup = new popupControl(anchors[i]);popups[popup.id] = popup;if(!addEvent(anchors[i], 'click', popupOnClick, false)) anchors[i].onclick = popupOnClick;}}}}function popupOnClick(e) {var targ;if (!e) var e = window.event;if (e.target) targ = e.target;else if (e.srcElement) targ = e.srcElement;if (targ.nodeType == 3) targ = targ.parentNode;id = targ.getAttribute('id');if(!id) { targ = targ.parentNode;id = targ.getAttribute('id');}result = popups[id].throwPop();if(result) {e.returnValue = false;if(e.preventDefault) e.preventDefault();		}}function popupControl(node) {this.id = node.getAttribute('id');var tempHref = node.href.split('?', 2);this.popupHref = node.href;if(!isUndefined(tempHref[1])) {tempHref[1] = tempHref[1].replace(/#.*/, ''); var tempParams = tempHref[1].split('&');for(var i = 0; i < tempParams.length; i++) {var tempKeyValue = tempParams[i].split('=');var key = tempKeyValue[0].toLowerCase();var val = tempKeyValue[1];switch(key) {case 'w' :	this.width = val;	break;case 'h' :	this.height = val;	break;case 'wname' :	this.name = val;	break;case 'tbar' :	this.toolBar = val;	break;case 'mbar' :	this.menuBar = val;	break;case 'sbar' :	this.scrollBar = val;	break;case 'resize' :	this.resize = val;	break;case 'lbar' :	this.location = val;	break;case 'dirs' :	this.directories = val;	break;case 'status' :	this.status = val;	break;}}if(isUndefined(this.width))       this.width = 250;if(isUndefined(this.height))      this.height = 350;if(isUndefined(this.name))        this.name = 'popup';if(isUndefined(this.toolBar))     this.toolBar = 'no';if(isUndefined(this.menuBar))     this.menuBar = 'no';if(isUndefined(this.scrollBar))   this.scrollBar = 'auto';if(isUndefined(this.resize))      this.resize = 'auto';if(isUndefined(this.location))    this.location = 'no';if(isUndefined(this.directories)) this.directories = 'no';if(isUndefined(this.status))      this.status = 'no';}this.isUndefined = isUndefined;this.throwPop = throwPop;}function throwPop() {window.name = "popupSource";newWin = window.open(this.popupHref, this.name, config='height=' + this.height + ', width=' + this.width + ', toolbar=' + this.toolBar + ', menubar= ' + this.menuBar + ', scrollbars= ' + this.scrollBar + ', resizable=' + this.resize + ', location=' + this.location + ', directories=' + this.directories + ', status=' + this.status);return newWin;}function isUndefined(v) {var undef;return v===undef;}
