var oRegex = new Object() ;
oRegex.PopupFeatures = /(?:^|,)([^=]+)=(\d+|yes|no)/gi ;

function openWinIn(loc, alt, features)
{
	
//--------------------------------------------
		
var oFeatures = new Object() ;
var oFeaturesMatch ;
while( ( oFeaturesMatch = oRegex.PopupFeatures.exec( features ) ) != null )
{
	var sValue = oFeaturesMatch[2] ;
	if ( sValue == ( 'yes' || '1' ) )
		oFeatures[ oFeaturesMatch[1] ] = true ;
	else if ( ! isNaN( sValue ) && sValue != 0 )
		oFeatures[ oFeaturesMatch[1] ] = sValue ;
}	
//--------------------------------------------
	
_width="width=" +oFeatures['width'];
_height="height=" +oFeatures['height'];

_width_win=parseInt(oFeatures['width']) + 7;
_height_win=parseInt(oFeatures['height']) + 7;

width_win="width=" +_width_win;
height_win="height=" + _height_win;

alts = alt.replace(/555/gi, " ");
alts = alts.replace(/556/gi, "-");
alts = alts.replace(/557/gi, "(");
alts = alts.replace(/558/gi, ")");

x4 = (screen.width<2000)? screen.width/2 - (oFeatures['width']/2) : screen.width/4 - (oFeatures['width']/2);
y4 = screen.height/2 - (oFeatures['height']/2);
myWin= open(loc, alt, '' + width_win + ',' + height_win + ',status=no,scrollbars=no,toolbar=no,menubar=no,left='+x4+',top='+y4+'');
myWin.document.open();
myWin.document.write("<HTML>\n<HEAD>\n<TITLE>");
myWin.document.write(alts);
myWin.document.write("</TITLE>\n</HEAD>\n");
myWin.document.write("<BODY bottommargin=0 topmargin=0 leftmargin=0 rightmargin=0 marginheight=0 marginwidth=0 bgcolor=#ffffff>\n");
myWin.document.write("<TABLE border=0 width='100%'>\n<TR>\n<TD><center>");
myWin.document.write("<a href='javascript:window.close();'><img src="+loc+" "+_width+" "+_height+" border=0 alt='"+alts+"' title='"+alts+"'></a>");
myWin.document.write("</center></TD>\n</TR>\n</TABLE>\n</BODY>\n</HTML>\n");
myWin.document.close();
myWin.focus();
}