function fenster(seite, weite, hoehe,name){ 
var mon, toppos, leftpos; 

toppos = (screen.height - hoehe)/2; 
leftpos = (screen.width - weite)/2; 
features = "scrollbars=1,location=0,toolbar=0,menubar=0,resizable=0,status=0"; 
mon = window.open(seite,"name","width="+weite+",height="+hoehe+",top="+toppos+",left="+leftpos+","+features); 
mon.focus();
}

function fenster1(seite, weite, hoehe,name){ 
var mon, toppos, leftpos; 
toppos = (screen.height - hoehe)/2; 
leftpos = (screen.width - weite)/2; 
features = "scrollbars=1,location=0,toolbar=0,menubar=0,resizable=1,status=0"; 
mon = window.open(seite,"name","width="+weite+",height="+hoehe+",top="+toppos+",left="+leftpos+","+features); 
mon.focus();

} 

function print_window(seite, weite, hoehe,name){ 
var mon, toppos, leftpos; 

toppos = (screen.height - hoehe)/2; 
leftpos = (screen.width - weite)/2; 
features = "scrollbars=1,location=0,toolbar=0,menubar=0,resizable=1,status=0"; 
mon = window.open(seite,"name","width="+weite+",height="+hoehe+",top="+toppos+",left="+leftpos+","+features); 
//mon.document.title=name;
mon.focus();
} 
var titel = new Array();
var text = new Array();
var bild = new Array();
var count=1;
function print(j){
	count=1;
	for(i=1;i<=j;i++){
		if(document.getElementById('titel'+i) && document.getElementById('titel'+i).innerHTML!=""){
			titel[i]=document.getElementById('titel'+i).innerHTML;
			count++;
		}
		if(document.getElementById('text'+i) && document.getElementById('text'+i).innerHTML!=""){
			text[i]=document.getElementById('text'+i).innerHTML;
			count++;
		}
		if(document.getElementById('bild'+i) && document.getElementById('bild'+i).innerHTML!=""){
			bild[i]=document.getElementById('bild'+i).innerHTML;
			count++;
		}
	}
	print_window('drucken.html',670,600);
}

function MM_displayStatusMsg(msgStr)
{ 
  status=msgStr;
  document.MM_returnValue = true;
}
 

function submitit()
{
   while(document.formular.pauschalen.value.search(/src=\"upload\//)!=-1){
      document.formular.pauschalen.value=document.formular.pauschalen.value.replace(/src=\"upload\//,"src=\"FCKeditor/upload/");
   }
   while(document.formular.pauschalen.value.search(/<TABLE cellSpacing=0 cellPadding=5 border=1/)!=-1 || document.formular.pauschalen.value.search(/<TABLE cellSpacing=0 cellPadding=5 align=center border=1/)!=-1 || document.formular.pauschalen.value.search(/<TABLE cellSpacing=0 cellPadding=5 align=left border=1/)!=-1 || document.formular.pauschalen.value.search(/<TABLE cellSpacing=0 cellPadding=5 align=right border=1/)!=-1){
      document.formular.pauschalen.value=document.formular.pauschalen.value.replace(/<TABLE cellSpacing=0 cellPadding=5 border=1/,"<TABLE cellSpacing=0 cellPadding=5 border=0");
      document.formular.pauschalen.value=document.formular.pauschalen.value.replace(/<TABLE cellSpacing=0 cellPadding=5 align=center border=1/,"<TABLE cellSpacing=0 cellPadding=5 align=center border=0");
      document.formular.pauschalen.value=document.formular.pauschalen.value.replace(/<TABLE cellSpacing=0 cellPadding=5 align=left border=1/,"<TABLE cellSpacing=0 cellPadding=5 align=left border=0");
      document.formular.pauschalen.value=document.formular.pauschalen.value.replace(/<TABLE cellSpacing=0 cellPadding=5 align=right border=1/,"<TABLE cellSpacing=0 cellPadding=5 align=right border=0");
   }
   document.formular.submit();
}