function toonFoto(filename){
	document.getElementById("voertuig_image").src="../getimage.php?filename=" + filename + "&breedte=440&hoogte=0";
}



function toonFotoLijst(foto_div){
	document.getElementById(foto_div).style.visibility = "visible";
	
	/*document.getElementById(foto_div).style.left = xMousePos -3 + "px";
	document.getElementById(foto_div).style.top = yMousePos + 15 + "px";	*/
	
	document.getElementById(foto_div).style.left = (xMousePos + 10) + "px";
	document.getElementById(foto_div).style.top = (yMousePos + 20) + "px";	
}
	
function verbergFoto(foto_div){
	document.getElementById(foto_div).style.visibility = "hidden";
}





/*
function captureMousePosition(e) {
	    if (document.layers) {
	        // When the page scrolls in Netscape, the event's mouse position
	        // reflects the absolute position on the screen. innerHight/Width
	        // is the position from the top/left of the screen that the user is
	        // looking at. pageX/YOffset is the amount that the user has 
	        // scrolled into the page. So the values will be in relation to
	        // each other as the total offsets into the page, no matter if
	        // the user has scrolled or not.
	        xMousePos = e.pageX;
	        yMousePos = e.pageY;
	        xMousePosMax = window.innerWidth+window.pageXOffset;
	        yMousePosMax = window.innerHeight+window.pageYOffset;
	    } else if (document.all) {
	        // When the page scrolls in IE, the event's mouse position 
	        // reflects the position from the top/left of the screen the 
	        // user is looking at. scrollLeft/Top is the amount the user
	        // has scrolled into the page. clientWidth/Height is the height/
	        // width of the current page the user is looking at. So, to be
	        // consistent with Netscape (above), add the scroll offsets to
	        // both so we end up with an absolute value on the page, no 
	        // matter if the user has scrolled or not.
	        xMousePos = window.event.x+document.body.scrollLeft;
	        yMousePos = window.event.y+document.body.scrollTop;
	        xMousePosMax = document.body.clientWidth+document.body.scrollLeft;
	        yMousePosMax = document.body.clientHeight+document.body.scrollTop;
	    } else if (document.getElementById) {
	        // Netscape 6 behaves the same as Netscape 4 in this regard 
	        xMousePos = e.pageX;
	        yMousePos = e.pageY;
	        xMousePosMax = window.innerWidth+window.pageXOffset;
	        yMousePosMax = window.innerHeight+window.pageYOffset;
	    }
	    
	    
	    //xMousePos = window.event.x-obj.offsetLeft;
	    //yMousePos = window.event.y-obj.offsetTop;
	}
	
	
if (document.layers) { // Netscape
    document.captureEvents(Event.MOUSEMOVE);
    document.onmousemove = captureMousePosition;
} else if (document.all) { // Internet Explorer
    document.onmousemove = captureMousePosition;
} else if (document.getElementById) { // Netcsape 6
    document.onmousemove = captureMousePosition;
}

*/


// Detect if the browser is IE or not.
// If it is not IE, we assume that the browser is NS.
var IE = document.all?true:false

// If NS -- that is, !IE -- then set up for mouse capture
if (!IE) document.captureEvents(Event.MOUSEMOVE)

// Set-up to use getMouseXY function onMouseMove
document.onmousemove = getMouseXY;

// Temporary variables to hold mouse x-y pos.s
var tempX = 0
var tempY = 0

// Main function to retrieve mouse x-y pos.s

function getMouseXY(e) {
  if (IE) { // grab the x-y pos.s if browser is IE
    tempX = event.clientX + document.documentElement.scrollLeft;
    tempY = event.clientY + document.documentElement.scrollTop;
  } else {  // grab the x-y pos.s if browser is NS
    tempX = e.pageX;
    tempY = e.pageY;
  }  
  // catch possible negative values in NS4
  if (tempX < 0){tempX = 0}
  if (tempY < 0){tempY = 0}  
  // show the position values in the form named Show
  // in the text fields named MouseX and MouseY
  xMousePos = tempX;
  yMousePos = tempY;

  return true
}

// Global variables
xMousePos = 0; // Horizontal position of the mouse on the screen
yMousePos = 0; // Vertical position of the mouse on the screen
xMousePosMax = 0; // Width of the page
yMousePosMax = 0; // Height of the page
