/* Image Swap Function by Eric Lawless, TDG Marketing */

function swap(pic) {

	//get the full path of the image source, unescaped (remove %20s etc)
	var x = unescape(document.getElementById(pic).src);

	//select the images to swap
	var sc1 = "images/mnu_" + pic + ".jpg";	
	var sc2 = "images/mnu_" + pic + "_o.jpg";		

	//find the path where the images folder is contained
	var temp = unescape(document.location);
	absPath = temp.substring(0,temp.lastIndexOf("/")+1);

	//swap the images
	if (x == (absPath + sc2)) {	

		document.getElementById(pic).src = sc1;	

	} else {						

		document.getElementById(pic).src = sc2;	

	}

}
