	var field_active = '#777777';

	function enable_publishes () {
		document.contentform.publish_start_day.disabled = '';
		document.contentform.publish_start_month.disabled = '';
		document.contentform.publish_start_year.disabled = '';

		document.contentform.publish_end_day.disabled = '';
		document.contentform.publish_end_month.disabled = '';
		document.contentform.publish_end_year.disabled = '';
	}

	function disable_publishes () {
		document.contentform.publish_start_day.disabled = 'true';
		document.contentform.publish_start_month.disabled = 'true';
		document.contentform.publish_start_year.disabled = 'true';

		document.contentform.publish_end_day.disabled = 'true';
		document.contentform.publish_end_month.disabled = 'true';
		document.contentform.publish_end_year.disabled = 'true';
	}



	function displayWindow(url, width, height) {
		var winname, date, time;
		var startx = Math.round((screen.width-width)/2);
		var starty = Math.round((screen.height-height)/2) - 20;

		date = new Date;
	  	time = date.getTime();

		winname = window.open(url,"Window" + time,"width=" + width + ",height=" + height + ",status=yes,toolbar=no,menubar=no,resizable=yes,scrollbars=yes,screenX=" + startx + ",left=" + startx + ",screenY=" + starty + ",top=" + starty + " ");
		if (! winname)
			alert('Das angeforderte Fenster konnte nicht geöffnet werden. Bitte deaktivieren Sie Ihren PopUp-Blocker!');
	}



	function displayWindowScrollbar(url, width, height) {
		var winname;
		var startx = Math.round((screen.width-width)/2);
		var starty = Math.round((screen.height-height)/2);

		d = new Date;
	  	t = d.getTime();

		winname = window.open(url,"Window" + t,"width=" + width + ",height=" + height + ",status=no,toolbar=no,menubar=no,resizable=yes,scrollbars=yes,screenX=" + startx + ",left=" + startx + ",screenY=" + starty + ",top=" + starty + " ");
		if (! winname)
			alert('Das angeforderte Fenster konnte nicht geöffnet werden. Bitte deaktivieren Sie Ihren PopUp-Blocker!');
	}


	function reSizeToHeight(){
		var cur_width, cur_height, height;



		// Hoehe des Inhalts berechnen
		height = document.getElementById("heightdiv").offsetHeight;
		if (height == 0)
			height = document.getElementById("heightdiv").clientHeight;

		// wir wollen noch etwas mehr Platz unten - kann man anpassen
		height = height + 5;


		// wenn Fenster hoeher als 600, dann auf 600 setzen, sonst scrollbars ausschalten
		if (height > 600) {
			height = 600;
		} else {
			document.body.scroll = 'no';
			document.body.style.overflowY = 'hidden';
		}


		// alle außer Explorer
		if (self.innerHeight) {
			cur_width = self.innerWidth;
			cur_height = self.innerHeight;
		}

		// Explorer 6 Strict Mode
		else if (document.documentElement && document.documentElement.clientHeight) {

			cur_width = document.documentElement.clientWidth;
			cur_height = document.documentElement.clientHeight;
		}

		// andere Explorer Versionen
		else if (document.body) {
			cur_width = document.body.clientWidth;
			cur_height = document.body.clientHeight;
		}


 		window.moveTo((screen.width-cur_width)/2,((screen.height-30-height)/2) - 35)
//		window.moveBy(0, (((height - cur_height) / 2))* -1);

		if (! window.resizeBy(0, (height - cur_height)))
			window.innerHeight = height;

	}



	function popupZoom(welches,titel,width,height) {

		winname=window.open(welches, "picture_zoom","width="+width+",height="+height+",toolbar=no,status=no,menubar=no,scrollbars=yes,resizable=no,menubar=no,location=no,directories=no");
    	winname.moveTo((screen.width-width)/2,(screen.height-height)/2);
		winname.focus();
	}

	function popupPic(welches,titel,width,height) {

		scrollbars= "no";
		if ((width>1000) || (height>700))
			scrollbars= "yes";
		winname=window.open("", "picture_zoom","width="+width+",height="+height+",toolbar=no,status=no,menubar=no,scrollbars=" + scrollbars +",resizable=no,menubar=no,location=no,directories=no");
    		winname.moveTo((screen.width-width)/2,(screen.height-height)/2);
		with(winname.document) {
			open();
			write('<html><head><title>' + titel + '</title></head>');
			write('<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"><a href="javascript:window.close()"><img src="'+welches+'" border="0"></a>');
			write('</body></html>');
			close();
		}
		winname.focus();
	}

	function popupFlash(welches,titel,width,height) {
		winname=window.open("", "picture_zoom","width="+width+",height="+height+",toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no,menubar=no,location=no,directories=no");
    	winname.moveTo((screen.width-width)/2,(screen.height-height)/2);

		with(winname.document)	{
			open();
			write('<html><head><title>' + titel + '</title></head>');
			write('<body  leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">');
        	write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="' + width + '" height="' + height + '">');
  			write('<param name="movie" value="' + welches + '">');
  			write('<param name="quality" value="high">');
			write('<embed src="' + welches + '" width="' + width + '" height="' + height + '" quality="high" type="application/x-shockwave-flash"></embed></object>');
			write('</body></html>');
			close();
		}
		winname.focus();
	}

	function popupAudio(welches,titel,width,height) {
		winname=window.open("", "audio_zoom","width="+width+",height="+height+",toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no,menubar=no,location=no,directories=no");
		winname.moveTo((screen.width-width)/2,(screen.height-height)/2);

		with(winname.document)	{
			open();
			write('<html><head><title>' + titel + '</title></head>');
			write('<body  leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">');
			write('<object id="prev" height="' + height + '" width="' + width + '">');
			write('<param name="controls" value="ControlPanel">');
			write('<param name="autostart" value="true">');
			write('<param name="type" value="audio/x-pn-realaudio-plugin">');
			write('<param name="src" value="' + welches + '">');
			write('<embed src="' + welches + '" type="audio/x-pn-realaudio-plugin" ');
			write('controls="ControlPanel" height="' + height + '" width="' + width + '" autostart="true">');
			write('</object>');
			write('</body></html>');
			close();
		}
		winname.focus();
	}

	function DivSetOverSelect(state,divname) {
		var DivRef = document.getElementById(divname);
		var IfrRef = document.getElementById(divname + '_iframe');
		if(state) {
			DivRef.style.display = "block";
			IfrRef.style.width = DivRef.offsetWidth;
			IfrRef.style.height = DivRef.offsetHeight;
			IfrRef.style.top = DivRef.style.top;
			IfrRef.style.left = DivRef.style.left;
			IfrRef.style.zIndex = DivRef.style.zIndex - 1;
			IfrRef.style.display = "block";
		}
		else {
			DivRef.style.display = "none";
			IfrRef.style.display = "none";
		}
	}





