function productmanagement(mypage, myname, w, h) {
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars=yes,resizable'
	win = window.open(mypage, myname, winprops)
	if (win.opener == null) { win.opener = self }
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
	return win;
}	

function Opener(e, url, width, height, scroll)	{

	var x=y=0;
    y = e.clientY;
	x = e.clientX;

	var sc_X = sc_Y = 0;

	scX = screen.Width;
	scY = screen.Height;

	var OS_top = 0;
	OS_top = Number(height) + Number(y) + 40;

	var OS_right = 0;
	OS_right = Number(width) + Number(x) + 40;


	if(OS_top > scY) {
	
		new_y = Number(scY) - Number(height);
		y = new_y - 70;
	}

	if(OS_right > scX) {
	
		new_x = Number(scX) - Number(width);
		x = new_x - 70;
	}

	newwin=window.open(url, "", "left=" + x + ", top=" + y + ", toolbar=no,menubar=no,location=no,scrollbars=" + scroll + ",resize=no,width=" + width + ",height=" + height);

}
