// var _POPUP_FEATURES = '';
// var _POPUP_FEATURES = 'location=0,statusbar=0,menubar=0,width=475,height=400';

function raw_popup(url, target, features) {
    // pops up a window containing url optionally named target, optionally having features
//	alert('raw_popup');
    if (isUndefined(features)) features = _POPUP_FEATURES;
    if (isUndefined(target  )) target   = '_blank';
    var theWindow = window.open(url, target, features);
    theWindow.focus();
    return theWindow;
	}

function link_popup(src, features) {
    // pops up a window grabbing the url from the event source's href
	//src.setAttribute("href", 'http://server.iad.liveperson.net/hc/73582281/?cmd=file&file=visitorWantsToChat&site=73582281&SESSIONVAR!skill=SSHA&imageUrl=http://server.iad.liveperson.net/hcp/Gallery/ChatButton-Gallery/English/General/2a/&referrer='+escape(document.location),'chat73582281','width=475,height=400,resizable=yes');

//	alert('src.getAttribute(id) = ' + src.getAttribute('id'));
//	alert('event_popup_features222 ===> ' + e.currentTarget);
	var url2Popup = _URL2POPUP;
	return raw_popup(url2Popup, src.getAttribute('target') || '_blank', features);
	//	return raw_popup(src.getAttribute('href'), src.getAttribute('target') || '_blank', features);
	}

function event_popup(e) {
    link_popup(e.currentTarget);
    e.preventDefault();
	}

function event_popup_features(features) {
//	alert('event_popup_features111 ===> ' + e.currentTarget);
	return function(e) { link_popup(e.currentTarget, features); e.preventDefault() }
	}
