
// typical call:
// <img src="myimg.jpg" onMouseOver="iswap(this)" onMouseOut="ifix(this)">
// or <img src="myimg.jpg" onMouseOver="iswap(this,'.jpg','_hi.jpg')" onMouseOut="ifix(this)">
function iswap(theImg, oldExt, newExt){
        if (!document.images) return false;
        theImg.oldSrc = theImg.src;
        if (!oldExt)
			oldExt = theImg.oldSrc.substring(theImg.oldSrc.lastIndexOf('.'),theImg.oldSrc.length);
        if (!newExt)
			newExt = '-over' + oldExt;
        theImg.src = theImg.oldSrc.substring(0,theImg.oldSrc.lastIndexOf(oldExt)) + newExt;
		}

function ifix(theImg){
        if (!document.images) return false;
        if (theImg.oldSrc) theImg.src=theImg.oldSrc;
        }

function poplink(linkObj, theParams){
	theUrl = linkObj.href;
	if (linkObj.target!="") winName=linkObj.target;
		else winName="popwin";

	if (!theParams)
		{
		// set up the parameters
		theParams  = "outerwidth=640,outerheight=700,width=640,height=700"
		+",toolbar=no,location=no,directories=no,status=no"
		+",menubar=yes,scrollbars=yes,resizable=yes"
		}
			
	// make the call to create the new window
	myNewPopUp = open(theUrl,winName,theParams);
	if (myNewPopUp.opener == null) myNewPopUp.opener = window;
	myNewPopUp.opener.name = "Opener";
	myNewPopUp.focus();
	return (!myNewPopUp);
}
