function showHide(divID)
{
   var showIt =  document.getElementById(divID).style.display
	document.getElementById(divID).style.display= (showIt == 'none') ?  'block' : 'none';
}

function Browser() {

  var ua, s, i;

  this.isIE    = false;
  this.isNS    = false;
  this.version = null;

  ua = navigator.userAgent;

  s = "MSIE";
  if ((i = ua.indexOf(s)) >= 0) {
    this.isIE = true;
    this.version = parseFloat(ua.substr(i + s.length));
    return;
  }

  s = "Netscape6/";
  if ((i = ua.indexOf(s)) >= 0) {
    this.isNS = true;
    this.version = parseFloat(ua.substr(i + s.length));
    return;
  }

  // Treat any other "Gecko" browser as NS 6.1.

  s = "Gecko";
  if ((i = ua.indexOf(s)) >= 0) {
    this.isNS = true;
    this.version = 6.1;
    return;
  }
}

var browser = new Browser();

function showPriceDiv(bapPrice, goingPrice, prodType, prod_id, ShopAddress, remAmount)
{
	 document.getElementById('ShowProdPrice').style.display = 'block';
	 document.getElementById('ShowProdPriceDesc').style.display = 'none';
	 
	 document.getElementById('ShowProdPriceTitle').innerHTML = 'Onze prijs voor: ' + prodType;
	 document.getElementById('ShowProdPriceBap').innerHTML = 'van: &euro; ' + bapPrice;
	 document.getElementById('ShowProdPriceGoing').innerHTML = 'voor: &euro; ' + goingPrice;
	 besparing = bapPrice - goingPrice;
	 document.getElementById('ShowProdPriceBesparing').innerHTML = 'besparing: &euro; ' + besparing;
	 if(remAmount != '0.00')
	 {
		RemText = '<font style="font-size: 9px;">*Prijs is exclusief eventuele bezorgkosten en &euro; ' + remAmount + ' verwijderingsbijdrage.<br><br></font>';
	 }
	 else
	 {
		RemText = '<font style="font-size: 9px;">*Prijs is exclusief eventuele bezorgkosten</font>';
	 }
	 document.getElementById('ShowProdCart').innerHTML = RemText + '<a href="cart/?art='+ prod_id +'"><img onmouseover="SwapImage(\'shoppingcart3\',\'' + ShopAddress + 'images/layout/placeincart2_mouseover.jpg\');" onmouseout="RestoreImage();" src="' + ShopAddress + 'images/layout/placeincart2.jpg" name="shoppingcart3" align="right"></a>';
	 
//	 toppos = ((document.body.scrollHeight / 2) - parseInt(document.getElementById('ShowProdPrice').style.height) / 2);
//	 leftpos = ((document.body.scrollWidth / 2) - parseInt(document.getElementById('ShowProdPrice').style.width) / 2);

	if (browser.isIE) {
		x = window.event.clientX + document.documentElement.scrollLeft
		  + document.body.scrollLeft;
		  xmin = parseInt(document.getElementById('ShowProdPrice').style.width) / 2;
		x = x - xmin;
		if(x < 0)
		{
			x = 0;
		}
		y = window.event.clientY + document.documentElement.scrollTop
		  + document.body.scrollTop;
		  
	  }
	  
	  if (browser.isNS) {
		x = event.clientX + window.scrollX;
		xmin = parseInt(document.getElementById('ShowProdPrice').style.width) / 2;
		x = x - xmin;
		y = event.clientY + window.scrollY;
	  }

	 document.getElementById('ShowProdPrice').style.top = y + 10;
	 document.getElementById('ShowProdPrice').style.left = x;
	 document.getElementById('ShowProdPrice').style.zIndex = 99;
	 
}

function showPriceDivUitleg()
{
	 document.getElementById('ShowProdPriceDesc').style.display = 'block';
	 document.getElementById('ShowProdPrice').style.display = 'none';

	if (browser.isIE) {
		x = window.event.clientX + document.documentElement.scrollLeft
		  + document.body.scrollLeft;
		  xmin = parseInt(document.getElementById('ShowProdPriceDesc').style.width) / 2;
		x = x - xmin;
		y = window.event.clientY + document.documentElement.scrollTop
		  + document.body.scrollTop;
		  
	  }
	  
	  if (browser.isNS) {
		x = event.clientX + window.scrollX;
		xmin = parseInt(document.getElementById('ShowProdPriceDesc').style.width) / 2;
		x = x - xmin;
		y = event.clientY + window.scrollY;
	  }

	 document.getElementById('ShowProdPriceDesc').style.top = y + 10;
	 document.getElementById('ShowProdPriceDesc').style.left = x;
	 document.getElementById('ShowProdPriceDesc').style.zIndex = 99;
	 
}