<!--

function PreisAusgabe (preis)
{ 
preis = unescape(preis);
if (preis.search(/\./) != -1) 
	{
	preis = preis.replace(/\./,",");
	preis = preis.split(",");
	if (preis[0].length < 1)
		preis[0] = "0";
	preis = preis[0] + "," + preis[1].charAt(0) + preis[1].charAt(1);
		}
document.write(preis);
}

function openPopup(url, width, height, winname)
{ 
	var trails="width=" + width + ",height=" + height + ",toolbar=no,directories=no,status=no,scrollbars=yes,resize=no,menubar=no";
	newWindow=window.open(url,winname,trails);
	self.close();   
}

function download(semtyp,semnr)
{
	if (top.werte.filename == "FileNotFound")
	{
	alert ("Datei nicht gefunden");
	}
else
	{
	params = "pc=" + myTopsub + "&topic=" + myLeft + "&pid=" + myId + "&semtyp=" + semtyp + "&semnr=" + semnr + "&downloadfile=" + top.werte.filename;
	document.location.replace("download.asp?" + params);
	}
}

function showpic()
{	
	if (top.werte.picname != "-")
		document.write('<td valign="top"><img src="contpics/' + top.werte.picname + '" border="0" vspace="20"></td><td width="25">&nbsp;</td>');
	 
}


function ControlFrames(semNr,semPreis)
{ 

	// Stimmt Werte.pl?
	if ((semNr != null) && (semNr != top.werte.semNr))
		{
		top.werte.location.replace("nav-werte.pl?" + semNr);
		setTimeout ('document.location.reload()', 1500); 
		}
		
	// Stimmt topmain?
	if (top.topmain.toBeRestored != null)
		if (top.topmain.toBeRestored != myTopmain)
			top.topmain.mark(myTopmain);
		
	// Stimmt topsub?
	if (top.topsub.father != null)
		if (top.topsub.father != myTopmain)
			{
			top.topsub.document.location.replace("nav-topsub.html?" + myTopmain + "$" + myTopsub);
			}
		else
			{
			top.topsub.mark(myTopsub);
			}

	// Stimmt topdetail?
	
	if (top.topdetail.father != null)
		if (myTopdetail == "")
			top.topdetail.document.location.replace("nav-topdetail.html");
		else
		
			if (top.topdetail.father != myTopsub)
				{
				top.topdetail.document.location.replace("nav-topdetail.html?" + myTopsub + "$" + myTopdetail + "$" + myId+ "$" + semPreis);
				}
			else
				{
				if (myTopdetail != "")
					top.topdetail.mark(myTopdetail);
				}
	else
		if (myTopdetail != "")
			top.topdetail.document.location.replace("nav-topdetail.html?" + myTopsub + "$" + myTopdetail + "$" + myId+ "$" + semPreis);

	// Stimmt left?
	if (top.left.father != null)
		if (top.left.father != myTopmain)
			{
			// erstmal nur, wenn produkte beteiligt ist, da es nur dafür ein left gibt
			if ((top.left.father == "produkte") || (myTopmain == "produkte"))
				top.left.document.location.replace("nav-left.html?" + myTopmain + "$" + myLeft);
			}
		else
			{
			if (myLeft != "")
				top.left.mark(top.left.map(myLeft));
			}
			
	// Stimmt bottom?
	if (top.bottom.toBeRestored != null)
		top.bottom.mark(myBottom);

}

function Link(tgt)
{
	document.location.href = "direct-produkt.idc?nr=" + tgt; 
}
// -->
