if (parseInt(navigator.appVersion.charAt(0))>=4) {
	var isNN=(navigator.appName=="Netscape")?1:0;
	var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;
	var isSAF=((navigator.userAgent.indexOf('applewebkit') != -1) || (navigator.vendor == "Apple Computer, Inc."))?1:0;

}

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;
		var startx = Math.round((screen.width-width)/2) - 10;
		var starty = Math.round((screen.height-height)/2) - 20;

		d = new Date;
	  	t = d.getTime();

		winname = window.open(url,"Window" + t,"width=" + width + ",height=" + height + ",status=yes,toolbar=no,menubar=no,resizable=yes,scrollbars=yes,screenX=" + startx + ",left=" + startx + ",screenY=" + starty + ",top=" + starty + " "); 
	}   



	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=yes,toolbar=no,menubar=no,resizable=yes,scrollbars=yes,screenX=" + startx + ",left=" + startx + ",screenY=" + starty + ",top=" + starty + " "); 
	}
	

function displayWindowAutoScrollbar(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=yes,toolbar=no,menubar=no,resizable=yes,screenX=" + startx + ",left=" + startx + ",screenY=" + starty + ",top=" + starty + " "); 
}

	function reSizeToHeight(){
		height = document.getElementById("heightdiv").offsetHeight;
		if (height == 0)
			height = document.getElementById("heightdiv").clientHeight;
		
		if (isIE) {
			width = document.body.clientWidth + 28;
			height = height + 60;

			if (height > 700)
				height = 700;

			window.resizeTo(width,height);
		}

		if (isNN) {
			width = window.innerWidth;
			height = height + 2;


			if (height > 700)
				height = 700;


			window.innerHeight = height;
		}
   		window.moveTo((screen.width-width)/2,(screen.height-height)/2)
	}



function popupPic(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"><table cellspacing="0" cellpadding="0" border=0><tr><td><A HREF="javascript:window.close()"><img src="'+welches+'" border="0"></A></td></tr></table>');
		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"><table cellspacing="0" cellpadding="0" border=0><tr><td>');
	write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" 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" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed></object>');
		write('</td></tr></table>');
		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";
	}
}






