function new_win(win_url, win_name, win_attr, win_size, max_width, max_height) {	if (win_size==1) {		left1 = Math.round(screen.availWidth * 0.075);		top1 = 40;		w1 = Math.round(screen.availWidth*0.85);		h1 = Math.round((screen.availHeight-200));		if ((max_width > 0) && (w1 > max_width)) {			dif1 = w1-max_width;			left1 = Math.round(left1+(dif1/2));			w1 = max_width; }		if ((max_height > 0) && (h1 > max_height)) {			dif1 = h1-max_height;			top1 = Math.round(top1+(dif1/2));			h1 = max_height; }		if (win_attr != '') { win_features = win_attr + ','; } else { win_features = '' }		if (win_attr.indexOf("left=") < 0) {win_features = win_features+'left='+left1}		if (win_attr.indexOf("top=") < 0) {win_features = win_features+',top='+top1}		if (win_attr.indexOf("screenX=") < 0) {win_features = win_features+',screenX='+left1}		if (win_attr.indexOf("screenY=") < 0) {win_features = win_features+',screenY='+top1}		if (win_attr.indexOf("width=") < 0) {win_features = win_features+',width='+w1}		if (win_attr.indexOf("height=") < 0) {win_features = win_features+',height='+h1}	} else {		win_features = win_attr;	}	// alert(win_features);	win = window.open(win_url, win_name, win_features);	win.focus();	return win;}function popup_medium(win_url, win_name) {	return new_win(win_url,win_name,'resizable=yes,scrollbars=yes,menubar=yes,toolbar=yes',1,800,800); return false;}