function popup(url, width, height)
{
    var left = parseInt((screen.width - width) / 2);
    var top = parseInt ((screen.height - height) / 2);

    popupWindow = window.open (url, '', 'toolbar=no,status=no,left=' + left + ',top=' + top + ',width=' + width + ',height=' + height);
}

function closerefresh()
{
    window.close ();

    if (typeof (top.opener.document) == 'object')
        top.opener.location.reload();
}

function edit(artist, title)
{
	popup('http://www.lyricsplugin.com/edit/?artist=' + artist + '&title=' + title, 500, 300);
}

function edit2(artist, title)
{
	var urlartist = escape(artist);
	var urltitle = escape(title);
	var urlartist2 = urlartist.replace(/\+/ig, "%2B");
	var urltitle2 = urltitle.replace(/\+/ig, "%2B");
	popup('http://www.lyricsplugin.com/edit/?artist=' + escape(artist) + '&title=' + escape(title) + '&new=1', 500, 550);
}

function tellafriend()
{
	popup('http://www.lyricsplugin.com/tellafriend/', 500, 400);
}

function configure()
{
	popup('http://www.lyricsplugin.com/configure/', 500, 200);
}