var winMediaPlayer;

function launchPlayer( domain, id, width, height ) {
	
	if( winMediaPlayer != null ) winMediaPlayer.close();

	if( width > 728 - 300 )
		winWidth = 340 + width;
	else
		winWidth = 758;
	if( height > 90 + 250 + 30 )
		winHeight = 120 + height;
	else
		winHeight = 490;

	winMediaPlayer = window.open(
		"http://img." + domain + "/player?i=" + id, 
		"", 
		"height=" + winHeight + ",width=" + winWidth + ",toolbar=no,status=no,scrollbars=no,menubar=no,location=no,resizable=no"
	);

}
