function imagePositions()
{
return true;
//needed?
imgs=$$("#spalte2bild img[title]");
if(imgs.length<1) return true;

//parse possible Headings
headings=$$("#content p strong");
var heads=new Array();
headings.each(function(itm,ind){
  heads[heads.length]=itm.firstChild.nodeValue;
});

//savePictures
var imgDel=new Array();
imgs.each(function(ite,ind){
  imgDel[imgDel.length]=ite.parentNode.removeChild(ite);
});

//delete Elements
td=$$("#spalte2bild");
while(td[0].hasChildNodes())
{
  td[0].removeChild(td[0].firstChild);
}

//restore Imgs
//for(s=0;s<imgDel.length;s++){
x=0;
imgDel.each(function(ite,ind){

pos=heads.indexOf(ite.title);
if(pos!=-1) 
{
  //tdP=headings[pos].parentNode.parentNode;
	co=headings[pos].getCoordinates();
//co2=0;
	co2=headings[pos].parentNode.parentNode.getCoordinates();
	//alert();
	
	ite.style.top=co.top-co2.top-93-x+"px";
	ite.style.left=41+"px";
	ite.style.position="relative";
	ite.align="middle";
  td[0].appendChild(ite);
	//x++;
	//x=co.top-co2.top-93-x;
	icO=ite.getCoordinates();
	x=x+icO.height;
}
});

}


function bgTransform()
{
  
	tbl=$$("table.bgTrans");
	if(tbl.length==0) return true;
	for(i=0;i<tbl.length;i++)
	{
  	trs=tbl[i].getElements("tr");
  	if(trs.length==0) continue;
		isBg=false;
		isMerged=0;
    for(a=0;a<trs.length;a++)
  	{
    	tds=trs[a].getElementsByTagName("td");
			if(tds.length==0) continue;
			modded=false;
			if(isMerged!=0) isMerged--;
  		else isBg=!isBg;
      for(b=0;b<tds.length;b++)
  		{
  			//tds[b].style.height="10px";
				//if(a==0) alert(tds[b].rowSpan);
				if(tds[b].rowSpan!=1 && modded==false) 
				{
  				if(a==0) isMerged=tds[b].rowSpan-1+isMerged;
					if(b==0 && a!=0) tds[b].className="bgTrans"; 
  				modded=true;
				}
				if(isBg) tds[b].className="bgTrans"; 
    	}
  	}
	}
}


var oMoverf=function(e)
  {
    //alert(e);
		/**/if (!e) e = window.event;
    if(e.type!=null && e.type=="mouseover") 
		e=this.id;
		//alert(e);
    iid=e.substring(1,2)-1;
		
		if(iid=="NaN") iid=e;//alert(iid);
		//alert(iid);
		IS_MOUSE_IN[iid]=true;
		//document.getElementById("t"+(iid+1)).style.color="#F29400";
    show("p"+(iid+1)+"b",true);
  };
	
	/*[[Wayfinder? &startId=`3` &hideSubMenus=`1`]]
<script language="JavaScript" type="text/javascript">
<!--
ul=$("nav2").getElementsByTagName("ul")[0];
ul.className="dropdownMenu";
ul.id="dropdownMenu";
lis=ul.getElementsByTagName("li");
for(i=0;i<lis.length;i++)
{
lis[i].id="t"+(i+1);
}
//-->
</script>*/
	
var oMoutf=function(e)
  {	
    if (!e) e = window.event;
    if(e.type!=null && e.type=="mouseout") e=this.id;
		iid=e.substring(1,2)-1;
		//document.getElementById("t"+(iid+1)).style.color="#ffffff";
    setTimeout("fadeOffset('p"+(iid+1)+"b')",FADE_OFFSET);
  };

function initFade()
{
  speed=FADE_INTRO_PAUSE;

	for(i=0;i<FADE_ELEMENTS.length;i++)
  {
    img=document.getElementById(FADE_ELEMENTS[i]);
		if(img.className=="aktiv") setTimeout("oMoverf('"+FADE_ELEMENTS[i]+"')",speed+FADE_OFFSET);
		else setTimeout("oMoutf('"+FADE_ELEMENTS[i]+"')",speed);
    speed+=FADE_INTRO_SPEED;
  }
}
	
/*var showMenu=function()
{
	if(this.id.indexOf("t")!=-1) iid=this.id.substring(1);
	//alert(iid);
	co=$(this.id).getCoordinates(); 
	top=co.top+co.height;
	divs=document.getElementById("dmenu "+iid).getElementsByTagName("div");
  depth=0;
  for(i=0;i<divs.length;i++)
  {
		if(divs[i].className.indexOf("dropMenu")!=-1) depth++;
		else continue;
		if(depth==1) divs[i].style.display="block";
		divs[i].style.top=top+"px";
		divs[i].style.left=co.left+"px";
		//alert(divs[i].className);
		$(divs[i]).addEvent('mouseleave', hideMenu(iid,depth));
  }
}*/

function normal(img)
{
	if(img.className=="aktiv") n="a";
  else n="n";
  img.src=img.src.substring(0,img.src.length-5)+n+".jpg";
}

function hover(img)
{
  img.src=img.src.substring(0,img.src.length-5)+"h.jpg";
}

function onloadNav(elId)
{
  imgs=document.getElementById(elId).getElementsByTagName("img");
  for(i=0;i<imgs.length;i++) 
  {
    imgs[i].onmouseout=function(e) {normal( this );};
    imgs[i].onmouseover=function(e) {hover( this );};  
    normal(imgs[i]);
  }
}

function bgTransformShop()
{
  
	tbl=$$("table.prodTable");
	if(tbl.length==0) return true;
	for(i=0;i<tbl.length;i++)
	{
  	trs=tbl[i].getElements("tr");
  	if(trs.length==0) continue;
		isBg=false;
		isMerged=0;
    for(a=0;a<trs.length;a++)
  	{
    	tds=trs[a].getElements("td");
			if(tds.length==0) continue;
			modded=false;
			if(isMerged!=0) isMerged--;
  		else isBg=!isBg;
      for(b=0;b<tds.length;b++)
  		{
  			if(tds[b].getAttribute("rowspan") && modded==false) 
				{
  				if(a==0) isMerged=tds[b].getAttribute("rowspan")-1+isMerged;
					if(b==0 && a!=0) tds[b].className="bgTrans"; 
  				modded=true;
					
				}
				if(isBg) tds[b].className="bgTrans"; 
				if(b==0) tds[b].style.borderRight="none";
				if(b==1) tds[b].style.borderLeft="none";
    	}
  	}
	}
}

function printIt()
{
  divs=document.getElementsByTagName("div");
  
  for(x=0;x<divs.length;x++)
  {
  cN=divs[x].className;
  
  if(
  cN=="nav"
  || cN=="secHead"
  || cN=="nav2"
  || cN=="footer"
  ) divs[x].style.display="none";
  if(cN=="head") headX=x;
  if(cN=="main") mainX=x;
  }
  //try{}catch(e){;}
  tds=$("contentSection").getElementsByTagName("td");
  for(x=0;x<tds.length;x++)
  {
    cN=tds[x].className;
    if(cN=="content spalte3" || cN=="drucken") tds[x].style.display="none";
    if(cN=="content spalte2")
  	{
    	tds[x].style.backgroundColor="#fff";
  	}
    if(cN=="content spalte2bild") 
  	{
    	tds[x].style.backgroundColor="#fff";
  	}
  	//tds[x].rowspan="1";
  }
  tds[0].style.paddingLeft="10px";
  span=tds[0].firstChild;
  if(span.nodeName.toLowerCase()=="span")
  {
  span.style.top="0px";
  span.style.left="0px";
  span.style.fontSize="9pt";
  }
  //divs[contentX].style.backgroundColor="#fff";
  //divs[contentX].style.color="#000";
  divs[mainX].style.margin="0px";
  divs[headX].className="headerPrint";
  divs[headX].innerHTML="<table style='margin: 10px 10px 10px 10px;'><tr><td><img src='assets/templates/logo.gif' align='left'/></td><td style='vertical-align: bottom; padding: 0px 0px 5px 20px;'>Telefon: 0341 - 30 29 000<br />Riesaer Stra&szlig;e 100<br />04319 Leipzig</td></tr></table>";
  document.body.style.background="#fff";
}
