function header_edit_window() {
	hew = window.open("edit/header_edit.php", "Editfenster", "width=630,height=280,left=100,top=100");
	hew.focus();
}

function news_edit_window(Adresse) {
	neditw = window.open(Adresse, "Editfenster", "width=650,height=800,left=100,top=100,scrollbars=yes");
	neditw.focus();
}

function news_delete_window(Adresse) {
	ndelw = window.open(Adresse, "Deletefenster", "width=680,height=240,left=100,top=100");
	ndelw.focus();
}

function make_url(id) {
	var replacementu = "<table class='file' id='link" + id + "' cellspacing='5' cellpadding='0' border='0'>" +
						"<tr>" +
							"<td width='100' valign='top'><b>Link" + id + "&nbsp;(URL)</b></td>" +
							"<td colspan='2'><a href='javascript:make_file(" + id + ");'>zu Datei wechseln</a></td>" +
						"</tr>" +
						"<tr>" +
							"<td width='100' valign='top'>URL</td>" +
							"<td colspan='2'>http://<input type='text' name='news[link" + id + "_url]' id='link" + id + "_url' value='' size='61' maxlength='100'></td>" +
						"</tr>" +
						"<tr>" +
							"<td width='100' valign='top'>Link-Text</td>" +
							"<td colspan='2'><input type='text' name='news[link" + id + "_name]' id='link" + id + "_name' value='' size='67' maxlength='100'></td>" +
						"</tr>" +
						"<tr>" +
							"<td width='100' valign='top'>Text</td>" +
							"<td colspan='2'><textarea name='news[link" + id + "_inhalt]' id='link" + id + "_inhalt' rows='3' cols='65'></textarea></td>" +
						"</tr>" +
					"</table>";
	$('link'+id).replace(replacementu);
}

function make_file(id) {
	var replacementf = "<table class='file' id='link" + id + "' cellspacing='5' cellpadding='0' border='0' width='600'>" +
						"<tr>" +
							"<td width='100' valign='top'><b>Link" + id + "&nbsp;(Datei)</b></td>" +
							"<td colspan='2'><a href='javascript:make_url(" + id + ");'>zu URL wechseln</a></td>" +
						"</tr>" +
						"<tr>" +
							"<td width='100' valign='top'>Datei</td>" +
							"<td><input type='file' id='link" + id + "_file' name='news[link" + id + "_file]' size='35'></td>" +
							"<td align='left'>Bisher: -</td>" +
						"</tr>" +
						"<tr>" +
							"<td width='100' valign='top'>Link-Text</td>" +
							"<td colspan='2'><input type='text' name='news[link" + id + "_name]' id='link" + id + "_name' value='' size='67' maxlength='100'></td>" +
						"</tr>" +
						"<tr>" +
							"<td width='100' valign='top'>Text</td>" +
							"<td colspan='2'><textarea name='news[link" + id + "_inhalt]' id='link" + id + "_inhalt' rows='3' cols='65'></textarea></td>" +
						"</tr>" +
					"</table>";
	$('link'+id).replace(replacementf);
}

function finish() {
	opener.document.location.reload();
	window.close();
}





