var spawnwin = null;
function createspawn(url, name, width, height, xpos, ypos, scroll)
{
var dim = 'width=' + width + ',' + 'height=' + height + ',' + 'top=' + ypos + ',' + 'left=' + xpos + ',' + 'screenX=' + xpos + ',' + 'screenY=' + ypos + ',' + 'scrollbars=' + scroll;
var previous_url="";

if (url==previous_url) { spawnwin.focus();}
else if (!spawnwin || spawnwin.closed) { spawnwin = window.open(url,name,dim); spawnwin.focus();}
else { spawnwin.close(); spawnwin = window.open(url,name,dim); spawnwin.focus(); } 

previous_url = url;
}



