/*Script for simple image swap and restoreRequires getElementById (native or emulated)Rev 2: Supports exceptions in the "swap_exceptions" array.*/var IMAGESWAP_JS = true;var swap_exceptions = new Array();var swaplist=new Array();function copy_root(oldfn, newfn){	var root = oldfn.match(/.+[\/]/);	return root+newfn;}function in_array(str, array){	if (typeof(str) == 'object') {		// Got it backwards		var was_array = array;		array=str;		str=was_array;	}		for (var i=0; i<array.length; i++) {		if (array[i]==str) {			return true;		}	}		return false;}function swap(id, newsrc, same_root){	if (document.getElementById) {		var img = typeof(id)=='string'?document.getElementById(id):id;		if (!in_array(id, swap_exceptions)) { // Allows an exception list for things like "current page" images that shouldn't be swapped.			newsrc = same_root ? copy_root(img.src, newsrc) : newsrc;			swaplist[id] = img.src;			img.src = newsrc;		}	}}function unswap(id){	if (document.getElementById) {		if (!in_array(id, swap_exceptions)) { // Allows an exception list for things like "current page" images that shouldn't be swapped.			var img = typeof(id)=='string'?document.getElementById(id):id;			img.src = swaplist[id];		}	}}