	var intranetpath="#intranetpath#";


	function MM_openBrWindow(theURL,winName,features) { //v2.0
  		window.open(theURL,winName,features);
		}
	
	function openSitemap(){
		window.open('sitemap_staempfli.cfm', 'frmSitemap', 'width=300,height=450,top=200,left=200,resizable=yes,scrollbars=yes');
		}

	function openPrintDialog(uuid,show_long){
		window.open('index.cfm?uuid=' + uuid + '&amp;cmd=print&amp;show_long=' + show_long, 'frmPrint', 'width=700,height=500,top=150,left=50,resizable=yes,scrollbars=yes,menubar=yes');
		}
		
	function openPrintDialogallmedia(uuid,show_long){
		window.open('index.cfm?uuid=' + uuid + '&amp;cmd=printallmedia&amp;show_long=' + show_long, 'frmPrint', 'width=700,height=500,top=150,left=50,resizable=yes,scrollbars=yes,menubar=yes');
		}
		
	function openPrintDialogkraftallmedia(uuid,show_long){
		window.open('index.cfm?uuid=' + uuid + '&amp;cmd=printkraftallmedia&amp;show_long=' + show_long, 'frmPrint', 'width=700,height=500,top=150,left=50,resizable=yes,scrollbars=yes,menubar=yes');
		}
		
	function openPrintDialogplattform(uuid,show_long){
		window.open('index.cfm?uuid=' + uuid + '&amp;cmd=printallmedia&amp;show_long=' + show_long, 'frmPrint', 'width=700,height=500,top=150,left=50,resizable=yes,scrollbars=yes,menubar=yes');
		}	

	function openVotingDialog(question_id, art_id){
		window.open('index.cfm?question_id=' + question_id + '&amp;art_id=' + art_id  + '&amp;cmd=vote', 'frmPrint', 'width=600,height=500,top=150,left=200,resizable=yes,scrollbars=yes,menubar=yes');
		}
	
	function onOpenHrefwh(href,trg,t,l,w,h){
	  	var wndhr=window.open(intranetpath + 'admin/empty.html',trg,'top='+t+',left='+l+',width='+w+',height='+h+',dependent=yes,hotkeys=no,locationbar=no,menubar=no,resizable=yes,scrollbars=yes');
		wndhr.location.href = href;
	   	if (wndhr.opener == null){
			wndhr.opener=window;
			}
		wndhr.focus();
		}
function onClickCheckbox( form_name, chk, val, func ) { // Checkbox
	frm = eval( "document." + form_name );
	ctl = eval( "document." + form_name + '.' + chk );
	if( val  &&  ctl.length ) {
		for( i=0; i<ctl.length; i++ ) {
			if( ctl[i].value == val )
				 ctl[i].checked = ! ctl[i].checked;
		}
	} else{
		ctl.checked = ! ctl.checked;}
	if( func ){
		func( form_name, chk, val );}
}

function onClickRadio( chk, val ) {
	ctl = eval( "document." + chk );
	if( ctl ) {
		if( ctl.length ){
			for( i=0; i<ctl.length; i++ ) ctl[i].checked = ctl[i].value == val;}
		else{
			ctl.checked = ctl.value == val;}
	}
}

	var ns4=document.layers
	var ie4=document.all
	var ns6=document.getElementById&&!document.all
	
	var dragswitch=0
	var nsx
	var nsy
	var nstemp
	
	function drag_drop(e){
		if (ie4&&dragapproved){
			crossobj.style.left=tempx+event.clientX-offsetx
			crossobj.style.top=tempy+event.clientY-offsety
			return false
			}
		else if (ns6&&dragapproved){
			crossobj.style.left=tempx+e.clientX-offsetx
			crossobj.style.top=tempy+e.clientY-offsety
			return false
			}
		}
	
//	function initializiere_drag(e){
//		crossobj=ns6? document.getElementById("einepopupbox") : document.all.einepopupbox
//		var firedobj=ns6? e.target : event.srcElement
//		var topelement=ns6? "HTML" : "BODY"
//		while (firedobj.tagName!=topelement&&firedobj.id!="dragbar"){
//			firedobj=ns6? firedobj.parentNode : firedobj.parentElement
//			}
//			if (firedobj.id=="dragbar"){
//			offsetx=ie4? event.clientX : e.clientX
//			offsety=ie4? event.clientY : e.clientY
//			tempx=parseInt(crossobj.style.left)
//			tempy=parseInt(crossobj.style.top)
//			dragapproved=true
//			document.onmousemove=drag_drop
//			}
//		}
	
//		document.onmousedown=initializiere_drag
//		document.onmouseup=new Function("dragapproved=false")
	
	function box_weg(){
		if (ie4||ns6)
			crossobj.style.visibility="hidden"
		else if (ns4)
			document.einepopupbox.visibility="hide"
		}
		