var winNr

function inclBody(y){
	HTMLstr=""
	for(n=0;n<contentstory.length;n++){
		
		if(contentstory[n][0]!=="ad"){
			if(contentstory[n][7]!==""){
				tStr=contentstory[n][7].toLowerCase()
				if(tStr.substr(0,7)=="http://"){contentstory[n][7]=contentstory[n][7].substr(7)}
				if(contentstory[n][7].substr(0,3)=="win"){
					cStory=contentstory[n][7].split("\#")
					cur="hand";action='onclick="bodyGoWebWin(\'http://' + cStory[1] + '\',' + cStory[2] + ',' + cStory[3] + ')"'
					ttt=cStory[1]
				}
				else{
					if(contentstory[n][7].substr(0,2)=="ww"){
						cur="hand";action='onclick="bodyGoWeb(\'http://' + contentstory[n][7] + '\')"'
						ttt=contentstory[n][7]
					}
					else{
						contPart=contentstory[n][7].split("\,")
						cur="hand";action='onclick="goSite(' + contPart[0] + ',' + contPart[1] + ',' + contPart[2] + ',' + contPart[3] + ')"'
						ttt=""
					}
				}
			}
			else{
				cur="";action="";ttt=""
			}
			HTMLstr+=drawDivPic("storyHeadPic" + n,144,y,520,17,"",'#000000','',1,cur,'','',1,action,'','bilder/story_headpic.gif','')
			HTMLstr+=drawDiv("storyHeadText" + n,144,y,520,17,"",'#ffffff','',1,cur,contentstory[n][0],'normTextBold',1,action,'font-size: 8pt;padding-left: 3px')
			y=y+16;h=contentstory[n][1];y2=5
			HTMLstr+=drawDiv("storyBox" + n,144,y,520,h,"",'','#000000',1,'','','',0,'','')
				if(contentstory[n][2]!==""){
					if(contentstory[n][2].substr(0,1)=="$"){
						pFile="content/anzeigen/powerad/bilder/" + contentstory[n][2].substr(1)
					}
					else{
						pFile='content/part' + conP + '/site' + conM + '/bilder/' + contentstory[n][2]
					}
					HTMLstr+=drawDivPic("storyPic" + n,0,0,contentstory[n][3],contentstory[n][4],"",'','',1,cur,'','',1,action,'',pFile,ttt)
					y2=y2+(contentstory[n][4]*1)
				}
				t=formatText(contentstory[n][6],1,1,1,1,"#000000")
				lT=t.substr(t.length-3)
				gefunden=0
				if(lT=="..."){
					for(m=t.length;m>0;m--){
						if(t.substr(m,1)==">"){
							startPunkt=m
							lastText=t.substr(m)
							gefunden=1
							break
						}
					}
					if(gefunden==1){
						lT=t.substr(0,startPunkt)
						t=lT + '<a style="text-decoration: underline; cursor: pointer" ' + action + '>' + lastText + '</a>'
					}
				}
				HTMLstr+=drawDiv("storyBodyText" + n,5,y2,510,h-8,"",'#000000','',1,'',t,'normText',1,'','font-size: 8pt; overflow:hidden')
			HTMLstr+='</div>'
			y=y + h + 2
		}
		else{
			h=(adList[n][2]*1)+2;y2=5
			HTMLstr+=drawDiv("storyBox" + n,144,y,520,h,"",'','#000000',1,'','','',0,'','')
				if(adList[n][5]!==""){
					cur="hand";
					if(adList[n][6]!==""){
						aL=adList[n][6].split("\,")
						action='onclick="bodyGoWebWin(\'' + adList[n][5] + '\',' + aL[0] + ',' + aL[1] + ')"'
					}
					else{
						action='onclick="bodyGoWeb(\'' + adList[n][5] + '\')"'
					}
				}
				else{cur="";action=""}
				pFile="content/anzeigen/powerad/" + adList[n][3] + "/" + adList[n][4]
				HTMLstr+=drawDivPic("storyPic" + n,0,0,adList[n][1],adList[n][2],"",'','',1,cur,'','',1,action,'',pFile,adList[n][0])
			
			
			HTMLstr+='</div>'
			y=y + h + 2		
		
		}
	}		
	if((y+20>hoehe)){hoehe=y+20}
	return HTMLstr
}

function bodyGoWeb(url){
	winNr=window.open(url,"","")
}
function bodyGoWebWin(url,w,h){
	winNr=window.open(url,"","left=30, top=30, width=" + w + ", height=" + h)
}
function bodyShowPicture(p,t,a){
	if(t!==""){t="&pictext=" + t}
	if(a!==""){a="&picauthor=" + a}	
	window.open("showpicture.php?picPath=" + p + t + a,"","width=100px, height=100px, left=50px, top=50px")
}

