function swapGif1(motion, name ,name1)
{
	switch (motion)
	{
		case 'over':
			document.getElementById(name1).src = name +"Over.gif";
		
			break;
		case 'out':
			document.getElementById(name1).src = name +".gif";
			break;
	}
}

function relative(resourceURL, locationURL) {
	var relativePath = "";
	
	if ( (resourceURL.indexOf("http://") == 0) || (resourceURL.indexOf("https://") == 0) ) { //		
		return resourceURL;
	}
	else if (resourceURL.indexOf("#") == 0) {
			relativePath = "#";
			return relativePath;
	}
	
	aResource = resourceURL.substring(1, resourceURL.length).split("/");
	aLocation = locationURL.substring(1, locationURL.length).split("/");

	// first, remove anything in either path that is common
	var start = 0;
	
	for (m=0; m<aResource.length; m++) {
		if (m <= aLocation.length && aResource[m] != aLocation[m]) {
			start = m;			
			break;					
		}
	}
	
	aResource = aResource.slice(start, aResource.length);
	aLocation = aLocation.slice(start, aLocation.length);
	
	// then, get the relativePathative path from locationURL to the root
	var n = 0;
	while (n < aLocation.length-1) {
		relativePath += "../";
		n++;		
	}

	// lastly, add each remaining element of the resource path to the relativePath path.
	for (p=0; p<aResource.length; p++) {
		relativePath = (p==aResource.length-1)?relativePath + aResource[p]:relativePath + aResource[p] + "/";
	}

	return relativePath;
}
