function ShowLayer(id, show) {
	if(show == "true") {
		document.getElementById(id).style.display = 'block';
	} else {
		document.getElementById(id).style.display = 'none';
	}
}

function request(id,bestellnummer) {
	window.open('/shop/request.php?productid='+id+'&bestellnummer='+encodeURI(bestellnummer),'shoppopup','scrollbars=yes,width=615,height=550');
}

function request_frachtkosten(id,bestellnummer) {
	window.open('/shop/frachtkosten_anfrage.php?productid='+id+'&bestellnummer='+encodeURI(bestellnummer),'shoppopup','scrollbars=yes,width=640,height=720');
}

function print_offer(id) {
	window.open('/shop/user_angebot.php?productid='+id,'shoppopup','scrollbars=yes,width=350,height=360,resizable=yes');
}

function MM_openBrWindow(theURL,winName,features) {
  window.open(theURL,winName,features);
}

function checkBrowserName(name) {
	var agent = navigator.userAgent.toLowerCase();

	if (agent.indexOf(name.toLowerCase())>-1) {
		return true;
	}

	return false;
}

function showCartFrame() {
	if (checkBrowserName('MSIE')) {
		var offset = document.documentElement.scrollTop;
		var width = document.documentElement.clientWidth;
		var height = document.documentElement.clientHeight;
	} else {
		var offset = window.pageYOffset;
		var width = window.innerWidth;
		var height = window.innerHeight;
	}

	var left = parseInt(width / 2) - 245;
	var top = parseInt((height / 2) - 115) + offset;

	document.getElementById('intoCartLayer').style.left = left + 'px';
	document.getElementById('intoCartLayer').style.top = top + 'px';
	document.getElementById('intoCartLayer').style.display = 'block';
}

function getFlash(filename, width, height, transparent, qualitaet)
{
	document.write('<object type="application/x-shockwave-flash" data="'+filename+'" width="'+width+'" height="'+height+'">');
	document.write('<param name="wmode" value="'+transparent+'">');
	document.write('<param name="movie" value="'+filename+'">');
	document.write('<param name="quality" value="'+qualitaet+'">');
	document.write('</object>');
}