var picNewH=new Array
function seiteDoByStart(){
	y2=0
	for(n=0;n<anzNews;n++){
		y=0
		obj=eval('document.getElementById("newsBetreffText' + n + '")')
		h=getRealHeight(obj);obj.style.height=h
		bHeight=Math.floor(h*0.2);if(bHeight<4){bHeight=4}
		
		obj=eval('document.getElementById("newsBetreff' + n + '")')
		obj.style.top=y;obj.style.height=h+bHeight
		y=y+h+bHeight+2
		obj=eval('document.getElementById("newsHeadText' + n + '")')
		obj.style.top=y;h=getRealHeight(obj);obj.style.height=h+4
		//alert(getRealHeight(obj))
		//getRealHeight(obj)
		y=y+h+4;pH=0
		if(picList.length>n){
			obj=eval('document.getElementById("newsPic' + n + '")')
			obj.style.top=y
			pH=picNewH[n]
		}
		obj=eval('document.getElementById("newsBodyText' + n + '")')
		obj.style.top=y;tH=getRealHeight(obj);obj.style.height=tH
		if(pH>tH){y=y+pH}
		else{y=y+tH}
		y=y+5
		if(mediaList.length>n){
			for(nn=0;nn<mediaList[n].length;nn++){
				obj=eval('document.getElementById("newsMedia' + n + nn + '")')
				nM=getRealHeight(obj);obj.style.height=nM
				obj=eval('document.getElementById("newsMediaBack' + n + nn + '")')
				nH=Math.floor(nM*0.2);if(nH<4){nH=4}
				obj.style.height=nH+nM
				obj=eval('document.getElementById("newsMedia' + n + nn + '")')
				obj.style.top=((nH+nM)-nM)/2
				obj.style.left=10+(nH*2)+nM
				obj=eval('document.getElementById("newsMediaBack' + n + nn + '")')
				obj.style.top=y;
				obj=eval('document.getElementById("newsMediaBut' + n + nn + '")')
				obj.style.width=nH+nM;obj.style.height=nH+nM
				obj=eval('document.getElementById("picnewsMediaBut' + n + nn + '")')
				obj.style.width=nH+nM;obj.style.height=nH+nM
				y=y+nH+nM+2
			}
		}
		obj=eval('document.getElementById("newsBack' + n + '")')
		h2=obj.scrollHeight;obj.style.height=h2+5
		obj.style.overflow="hidden"
		obj.style.top=y2;y2=y2+h2+10
	}
	document.getElementById("seiteAllBack").style.height=y2
	document.getElementById("bodyAll").style.visibility="visible"
	document.getElementById("bodyAll").scrollTop=scrolly
	
	return y2
}

function presseGoMedia(media,typ,title){
	media=media.replace(/\&/,"~}{~")
	transEx=media + "|" + typ + "|" + title + "|aktuell|" + document.getElementById("bodyAll").scrollTop
	self.location=mySite + "?transEx=" + transEx + "&clEx3=media" + "&p=" + mainPart + "&m=" + mainSite + "&s=" + subSite
}

function goShowMediaFile(index,n,nn){
	mediaOpenFile=digiPath + "/content/aktuell/" + actFile[n] + "/" + linkMediaList[n][nn]
	mediaOpenTyp=mediaTyp[n][nn]
	mediaOpenTitle=mediaList[n][nn]
	mediaOpenTitle=mediaOpenTitle.replace(/&/g,"~")
	switch(mediaOpenTyp){
		case 0:
			window.open(linkMediaList[n][nn],"","");break
		case 1:
			mediaOpenFile=mediaOpenFile.replace(/&/g,"~")
			presseGoMedia(mediaOpenFile,mediaOpenTyp,mediaOpenTitle);
		case 2:
			mediaOpenFile=mediaOpenFile.replace(/&/g,"~")
			presseGoMedia(mediaOpenFile,mediaOpenTyp,mediaOpenTitle);
			break
		case 3:
			mediaOpenFile=mediaOpenFile.replace(/&/g,"~")
			presseGoMedia(mediaOpenFile,mediaOpenTyp,mediaOpenTitle);
			break
		case 4:window.open(mediaOpenFile,"","");break
		case 5:
			obj=eval("document.getElementById('linkUpload" + n + nn + "')")
			obj.href=mediaOpenFile
			obj.click()
		break				
	}
}

function goNewsLarge(index){
	transEx=actFile[index] + "|" + document.getElementById("bodyAll").scrollTop + "|" + index
	self.location=mySite + "?clEx3=news&transEx=" + transEx + "&p=" + mainPart + "&m=" + mainSite + "&s=" + subSite
}

function goTextHighLight(obj,index,nr){
	deco=['none','underline'];weight=['normal','bold']
	obj=eval('document.getElementById("' + obj  + index + '")')
	obj.style.textDecoration=deco[nr]
	obj.style.fontWeight=weight[nr]
}

function goTextUnderline(obj,index,nr){
	deco=['none','underline']
	obj=eval('document.getElementById("' + obj  + index + '")')
	obj.style.textDecoration=deco[nr]
}

function dpAktuellBody(digiX,digiY,digiW){
	var HTString=""
	mainBoxWidth=digiW
	picW=Math.floor(digiW/3)
	textAbst=Math.floor(picW*0.05)
	textW=digiW-picW-textAbst-20
	anzNews=actFile.length
	HTString+=drawDiv("seiteAllBack",digiX,digiY,mainBoxWidth,400,'','','',1,'','','newsBack',0,'','overflow: auto')
		if(actFile.length<anzNews){anzNews=actFile.length}
		for(n=0;n<anzNews;n++){
			HTString+=drawDiv("newsBack" + n,0,0,mainBoxWidth-15,10,'','','',1,'','','newsBack',0,'','overflow: auto')
				newsPart=news[n].split('<br><br>')
							
				action='onclick="goNewsLarge(' + n +')"';cur="hand"
				action2='" onmousemove="goTextUnderline(\'newsHeadText\',' + n +',1)" onmouseout="goTextUnderline(\'newsHeadText\',' + n +',0)" onclick="goNewsLarge(' + n +')"'
				
				if(newsPart.length>1){
					newsPart[0]=newsPart[0] + '<br><a id="textMore' + n + '" onmousemove="goTextHighLight(\'textMore\',' + n +',1)" onmouseout="goTextHighLight(\'textMore\',' + n +',0)" onclick="goNewsLarge(' + n +')" style="cursor: pointer">[mehr...]</a>'
				}				
				HTString+=drawDiv("newsBetreff" + n,0,0,mainBoxWidth-15,40,'','','',1,'','','boxSubject',0,'','')
					HTString+=drawDiv("newsBetreffText" + n,2,2,mainBoxWidth-19,10,'','','',1,'',actBetreff[n],'textSubject',1,'','')
				HTString+='</div>'
				HTString+=drawDiv("newsHeadText" + n,2,2,mainBoxWidth-19,36,'','','',1,cur,actHead[n],'textHeadline',1,action2,'')
				x=2;w=mainBoxWidth-21
				if(picList.length>n){
					pRel=picW/picList[n][4]
					pW=picList[n][4]*pRel;picNewH[n]=picList[n][5]*pRel
					
					picPath=digiPath + "/content/aktuell/" + actFile[n] + "/" + picList[n][0]
					HTString+=drawDivPic("newsPic" + n,2,2,pW,picNewH[n],'','','',1,cur,'','',1,action,'',picPath,picList[n][2])
					x=2+pW+textAbst;
					w=textW
				}
				HTString+=drawDiv("newsBodyText" + n,x,2,w,20,'','','',1,'',formatHT(newsPart[0]),'textBody',1,'','')
				if(mediaList.length>n){
					for(nn=0;nn<mediaList[n].length;nn++){
						HTString+=drawDiv("newsMediaBack" + n + nn,0,2,mainBoxWidth-15,21,'','','',1,'','','boxMediaLine',0,'','')
							HTString+='<a id="linkUpload' + n + nn +'" style="text-decoration: none">'
							action='onmousemove="goTextHighLight(\'newsMedia' + n + '\',' + nn + ',1)" '
							action+='onmouseout="goTextHighLight(\'newsMedia' + n + '\',' + nn +',0)" '
							action+='onclick="goShowMediaFile(1,' + n + ',' + nn + ')"'
							HTString+=drawDivPic("newsMediaBut" + n + nn,10,0,21,21,'','','',1,'hand','','',1,action,'',digiPath + '/bilder/but_' + mediaBut[mediaTyp[n][nn]] + ".gif",'')
							HTString+=drawDiv("newsMedia" + n + nn,40,4,mainBoxWidth-59,15,'','','',1,'hand',mediaList[n][nn],'textMedia',1,action,'overflow: auto')
							HTString+='</a>'
						HTString+='</div>'
					}
				}
			HTString+='</div>'
		}
	HTString+='</div>'
	
	HTString+='<table id="checkBoxFeld" name="testFeld" style="height: 10px; visibility: hidden">'
	HTString+='<td id="checkBoxSize" style="width: 10pt; white-space: nowrap;">'
	HTString+='</td></table>'	
	
	
	HTString+=drawDiv("checkBoxSize2",0,02,20,10,'','','',1,'','','',1,'','visibility: hidden')
	return HTString
}