function popup (url,features) {   
   // Look out for unescaped urls.
   re  = /\s/g;
   url = url.replace(re, "%20");
   re  = /(\?.*)#/g;
   url = url.replace(re, "$1%23");

   // Default values   
   var width       = 500;   
   var height      = 400;   

   // Explorer   
   var top         = 25;
   var left        = 20;
   // Netscape
   var screenY     = 25;
   var screenX     = 20;   

   var location    = 1;   
   var menubar     = 1;   
   var resizable   = 1;   
   var scrollbars  = 1;   
   var status      = 1;   
   var toolbar     = 1;   
   var window_name = 'new_window';    

   // Eval features' list   
   eval(features);      

   // Setup Feature string    
   var strFeature = 'width=' + width + ',height=' + height + ',location=' + location + ',menubar=' + menubar;       
       strFeature += ',resizable=' + resizable + ',scrollbars=' + scrollbars + ',status=' + status + ',toolbar=' + toolbar;   
       strFeature += ',left=' + left + ',top=' + top + ',screenY=' + screenY + ',screenX=' + screenX;
	   
   // Escape the url string
   //url = unescape(url);

   // Open pop up window   
   var newWindow = window.open (url,window_name,strFeature);
   newWindow.focus();
}