/* MW functions */
/* common */
function MW_setFocus(id) {
	element = document.getElementById(id);
	if (element) element.focus();
}

function MW_mainReload() {
	opener.location.reload();
}

function MW_mainLocation(Url) {
	opener.location.href = Url;
}

function MW_topLocation(Url) {
	top.location.href = Url;
}

function MW_clearField(Obj) {
	if (Obj.value == Obj.defaultValue) Obj.value='';
}

/* special */
function MW_calendarReload() {
	top.frames[2].frames[1].location.reload();
}

function MW_newsletterCheckin() {
	// Name, eMail
	var sourceName = opener.document.forms["form_nl"].elements["nu_name"];
	var targetName = document.getElementById("nu_name");
	targetName.value = sourceName.value;

	var sourceEmail = opener.document.forms["form_nl"].elements["nu_email"];
	var targetEmail = document.getElementById("nu_email");
	targetEmail.value = sourceEmail.value;

	// Anrede
	var sourcePrefix = opener.document.forms["form_nl"].elements["nu_prefix"];
	var targetPrefix = document.getElementById("nu_prefix");

	for (i = 0; i < sourcePrefix.length; i++) {
		if (sourcePrefix[i].selected) targetPrefix[i].selected = true;
	}
}
