/*
// (c) 2004-2010 Arno Verweij
//
// File: changePic.js
// Author: Arno Verweij (arno@samage.net)
// Date: December 21, 2010
//
// description:
//	function changePic(id,image) replaces a picture
//	(with a certain id) with another picture (image)
// 
// input:
//	name: 'id' property of the <img /> to be replaced
//	image: 'src' property of new <img />
// 
// output:
//	boolean: true or false
// 
// example of usage in an XHTML document:
// 	<script type="text/javascript" src="./functions/changePic.js"></script>
//	<img id="example" src="./images/img1.jpg"
//		onmouseover="changePic('example','./images/img2.jpg');"
//		onmouseout="changePic('example','./images/img1.jpg');" />
*/

function changePic(id,image) {
	if (document.images){
		pic = new Image();
		pic.src = image;
		document.getElementById(id).src = pic.src;
		return true;
	}else{
		return false;
	}
}

