var prevTR='';
var prevClick='';
var basket = 'no';

function confirmLink(theLink,txt) {
  if(confirm(txt)) {
    return true;
  } else {
    return false;
  }
}

function order(txt) {
  if(confirm('Deze ' + txt + ' in uw winkelmandje doen?')) {
    return true;
  } else {
    return false;
  }
}


function wopen(url,w,h) {
   var left = Math.floor( (screen.width - w) / 2);
   var top = Math.floor( (screen.height - h) / 2);
   win = window.open(url,'swindow','width=' + w + ', height=' + h + ',scrollbars=1,status=0,top=' + top + ',left=' + left);
   win.focus();
}


function mOver(theTD, theID)
{
	//  theTR = theTD.parentElement;
	var theTR = document.getElementById(theID);
	theTR.style.cursor = 'pointer';
	if(theTR!=prevClick)
	{
		if(prevTR!='') { prevTR.style.backgroundColor=''; }
		theTR.style.backgroundColor='#CDEBD5';
		prevTR=theTR;
	}
	else if(theTR==prevClick)
	{
		if(prevTR!=prevClick) { prevTR.style.backgroundColor=''; }
	}
}

function mClick(theTD, theID) {
  var theTR = document.getElementById(theID);
  var el = theTR;
  if(prevClick!='') { prevClick.style.backgroundColor=''; }
  theTR.style.backgroundColor='#89C063';

  if(basket != "yes")
	{
		wopen('../../php/props.php?id='+theID,450,300);
	}
  prevClick=theTR; prevTR='';
  basket = "no";
}

