function getThemenwebsite() {
	window.open(document.themenwebsites.websites[document.themenwebsites.websites.selectedIndex].value);
	return false;
}

function setPK(n) {
	theImg=new Image();
	theImg.src= n;
	document.getElementById("motiv-postkarte").src=theImg.src;
	document.postkarten.pkimg.value = n;
	void(0);
}

// popups

function isUndefined(v) {
    var undef;
    return v===undef;
}

//var _POPUP_FEATURES = 'width=320, height=255';

function raw_popup(url, target, features, video) {
	if(video == true) {
		if (features == '') { features = 'width=320, height=255'; }
		var l = (screen.width - 320) / 2;
		var t = (screen.height - 255) / 2;
	} else {
		if (features == '') { features = 'width=800, height=600, scrollbars=yes, resizable=yes'; }
		var l = (screen.width - 800) / 2;
		var t = (screen.height - 600) / 2;
	}
	features = features + ", top=" + t + ", left=" + l;
    //if (isUndefined(target)) target = 'zoom';
    var theWindow = window.open(url, 'edit', features);
    theWindow.focus();
    return theWindow;
}

function link_popup(src, features, video) {
    return raw_popup(src.getAttribute('href'), src.getAttribute('target') || '_blank', features, video);
}
