onload = function ()
{
	var links = document.getElementsByTagName('A');
	var count = links.length;
	
	for(var i = 0; i < count; i++) {
		links[i].onfocus = new Function('this.blur()');
	}
}

var warenkorb_opened = false;

var cb = function()
{
	if(warenkorb_opened) { warenkorb_opened = false } else { warenkorb_opened = true };
	if(lang=="en")
	{
	$('warenkorb_button').innerHTML = (warenkorb_opened) ? 'close' : 'open';
	}
	else
	{
	$('warenkorb_button').innerHTML = (warenkorb_opened) ? 'schlie&szlig;en' : '&ouml;ffnen';
	}
}

function toggleWarenkorb()
{
	
	Effect.toggle('warenkorb_vorschau', 'slide', { duration: 0.3, transition: Effect.Transitions.linear, fps: 100, afterFinish:cb});
	
}



function popup(url, width, height, name) {
	var p = window.open(url, '', "left="+(screen.availWidth-width)/2+",top="+(screen.availHeight-height)/2+",width="+width+",height="+height+",toolbar=no,location=no,directories=no,status=no,menubar=no,scrollBars=yes,resizable=no");
	if (p) {
		p.outerWidth = width;
		p.outerHeight = height;
		p.focus();
	}
}
function popup2(url, width, height, name) {
	var p = window.open('', '', "left="+(screen.availWidth-width)/2+",top="+(screen.availHeight-height)/2+",width="+width+",height="+height+",toolbar=no,location=no,directories=no,status=no,menubar=no,scrollBars=yes,resizable=yes");
	p.document.open("text/html")
	p.document.write("<html><head><title>Details</title></head><body style='background:black; text-align:center;'>");
	p.document.write("<img src='");
	p.document.write(url);
	p.document.write("' alt=''></body></html>");
	p.document.close();
	p.focus();
	if (p) {
		p.outerWidth = width;
		p.outerHeight = height;
		p.focus();
	}

}
function showdaten()
{
$$('.details')[1].hide();
$$('.daten')[1].show();
$$('.daten')[0].setStyle({'background': 'url(/img/produkt/daten2.jpg) right'})
$$('.details')[0].setStyle({'background': 'url(/img/produkt/details2.jpg) left'})
}
function showdetails()
{
$$('.daten')[1].hide();
$$('.details')[1].show();
$$('.daten')[0].setStyle({'background': 'url(/img/produkt/daten.jpg) right'})
$$('.details')[0].setStyle({'background': 'url(/img/produkt/details.jpg) left'})
}
