/*-------- POPUP -----------*/
var EB_popup = function() {
	var links = $$('a.popup');
	for (x=0;x<links.length;x++)
		Event.observe( links[x], 'click', EB_popup.pop );
}

EB_popup.pop = function (e, target) {
	
	if (Event.element(e)) {
		var theLink = Event.element(e).readAttribute('href');
		var theTarget = Event.element(e).readAttribute('target') || 'popup';
	}
	
	else {
		theLink = e;
		theTarget = target || 'popup';
	}
	
	
	var width = 'width=' + '680';
	var height = 'height=' + '420';
	
	var win = window.open(theLink, theTarget, width + ',' + height + ',' + 'scrollbars=yes, resizable=yes');
	win.focus();
	
	Event.stop(e)
	
}

// needs prototype to add Events.  We can do this another way if we want to //
Event.observe(window, 'load', EB_popup );

 
// Must use this method instead becasue EB method above does not work in ext
function jsPopUp(target) {
    win=window.open(target, 'popup', 'width=680, height=420, scrollbars=yes, resizable=yes');
    win.focus();
}