function openRealMusic(realmusicUrl, domain)
{
	var hasDeepUrl = realmusicUrl.split('/')[3] ? true : false;
	var p = {
		url: null,
		target: '_blank',
		popup_loader_href: 'http://'+realmusicUrl.split('/')[2]+'/inc/realmusic/realmusic_popup_frame_loader.html',
		popup_loader_name: 'RealMusicLoader',
		width: 1006,
		height: 690,
		top: null,
		left: null,
		center: false,
		resize: false,
		scrollbars: false,
		action: hasDeepUrl ? 'handle_url' : null,
		status: true,
		params: hasDeepUrl ? {url: realmusicUrl} : null
	};
	if (p.center != false && parseInt(navigator.appVersion) >= 4) {
		p.top = screen.availHeight / 2 - p.height / 2;
		p.left = screen.availWidth / 2 - p.width / 2;
	}
	if (p.url == null) {
		var qstr = '';
		if (p.action) {
			qstr+='action='+p.action;
			for (var i in p.params) {
				if (typeof p.params[i] == 'string'
					|| typeof p.params[i] == 'number') {
					qstr+='&'+i+'='+escape(p.params[i]);
				}
			}
		}
		p.url = p.popup_loader_href+'?'+(qstr||'');
		p.target = p.popup_loader_name;
	}
	var wp = [
		'resize='+(p.resize?'yes':'no'),
		'resizable='+(p.resize?'yes':'no'),
		'scrollbars='+(p.scrollbars?'yes':'no'),
		'location='+ (p.location?'yes':'no'),
		'menubar='+ (p.menubar?'yes':'no'),
		'resizable='+ (p.resizable?'yes':'no'),
		'status='+ (p.status?'yes':'no'),
		'toolbar='+ (p.toolbar?'yes':'no')
	];
	if (p.width != null) wp.push('width='+p.width);
	if (p.height != null) wp.push('height='+p.height);
	if (p.top != null) wp.push('top='+p.top);
	if (p.left != null) wp.push('top='+p.left);
	document.domain = domain;
	var win = window.open(p.url,p.target,wp.join(','));
	if (win && win.focus) win.focus();
	return win;
}
