function avaaken(link, x, y, nimi) {
	var winl = (screen.width - x) / 2;
	var wint = (screen.height - y) / 2;
	editWindow = window.open(link, nimi,'width='+x+',height='+y+',top='+wint+',left='+winl+',toolbar=0,directories=0,menubar=0,status=0,resizable=0,location=0,scrollbars=yes,copyhistory=0');
	if (editWindow.opener == null) { editWindow.opener = self }
}

function avaakens(link, x, y, nimi) {
	var winl = (screen.width - x) / 2;
	var wint = (screen.height - y) / 2;
	editWindow = window.open(link, nimi,'width='+x+',height='+y+',top='+wint+',left='+winl+',toolbar=0,directories=0,menubar=0,status=0,resizable=0,location=0,scrollbars=yes,copyhistory=0');
	if (editWindow.opener == null) { editWindow.opener = self }
}

function suuraken(link, x, y, nimi) {
	var winl = (screen.width - x) / 2;
	var wint = (screen.height - y) / 2;
	editWindow = window.open(link, nimi,'width='+x+',height='+y+',top='+wint+',left='+winl+',toolbar=0,directories=0,menubar=0,status=0,resizable=0,location=0,scrollbars=yes,copyhistory=0');
	if (editWindow.opener == null) { editWindow.opener = self }
  editWindow.focus();
}

function aken(link, x, y, nimi) {
	var winl = (screen.width - x) / 2;
	var wint = (screen.height - y) / 2;
	editWindow = window.open(link, nimi,'width='+x+',height='+y+',top='+wint+',left='+winl+',toolbar=0,directories=0,menubar=0,status=0,resizable=0,location=0,scrollbars=no,copyhistory=0');
	if (editWindow.opener == null) { editWindow.opener = self }
}

function akenbig(link, x, y, nimi) {
	var winl = (screen.width - x) / 2;
	var wint = (screen.height - y) / 2;
	editWindow = window.open(link, nimi,'width='+x+',height='+y+',top='+wint+',left='+winl+',toolbar=0,directories=0,menubar=0,status=0,resizable=1,location=0,scrollbars=yes,copyhistory=0');
	if (editWindow.opener == null) { editWindow.opener = self }
}

