/**
 * Popup opener attempts to open a popup window,
 * displays an warning using javascript alert if a popup blocker is enabled
 *
 * @author Mishal  
 * @author Edmond Woychowsky.  
 * @version $Id: popup.js 2 2006-01-31 13:26:01Z mishal $
 * @filesource
 * @todo will echoing translated strings cause problem with switching languages? (js is cached on client side)
 *  
 */  
function rawPopup(url, target, w, h, features) 
{
  if(typeof features == 'undefined') {
    if(typeof _POPUP_FEATURES == 'undefined') {
            var _POPUP_FEATURES = 'width=500,height=400,resizable=1';
        }        
        features = _POPUP_FEATURES;                
    }
    
    if(typeof target == 'undefined') target = 'reusableWindow';
    
    var theWindow;
    var reWork = new RegExp('object','gi');
    
	try {
		theWindow = window.open(url, target, features);
	} catch(e) { }
  // test for popup blocker
	if(!reWork.test(String(theWindow))) 
  {
		alert('Warning: A pop-up blocker is enabled for this site!');
		return;
	}
  else
  {
		theWindow.focus();
  }     
    return theWindow;
    
}
