function centerwin(location, name, pic_width, pic_height){
// center selected window
var w = pic_width;
var h = pic_height;
var x = (screen.width - w)/2;
var y = (screen.height - h)/2;
var winset = "width=" + w + ",height=" + h +",left=" + x + ",top=" + y;
var newWin = open(location, name, winset);
newWin.focus();
}

