function imgSwap(imgName, newImg)
{

var fullPath;

fullPath = document[imgName].src;

var lastSlash;
var fileName;
var theLength;

theLength = fullPath.length;
lastSlash = fullPath.lastIndexOf("/");
fileName = fullPath.substring(lastSlash + 1, theLength);

if(document[imgName].src)
  {document[imgName].src = fullPath.replace(fileName,newImg);
  
  
  }

else

{
	if(document.images[imgName].src)
  		{document.images[imgName].src = fullPath.replace(fileName,newImg);}

}

 }
