function pop(url,sb,wd,ht) {
if((wd == "max")||(wd > screen.availWidth)) { // use 'max' to enable full width based on screen resolution
wd = (screen.availWidth)-2; // subtract 2 to avoid divide by zero error
}
if((ht == "max")||(ht > screen.availHeight)) { // use 'max' to enable full height based on screen resolution
ht = (screen.availHeight)-40; // subtract 40 pixels to account for taskbar
}
day = new Date();
id = day.getTime();
var left = (screen.availWidth-wd)/2;
var top = ((screen.availHeight-ht)/2);
eval("page"+id+"=window.open(url,'"+id+"','scrollbars="+sb+",width="+wd+",height="+ht+",left="+left+",top="+top+"');");
}