var pageLoaded = 0;

function alternate (img) {
    if (!img) return;
    tmp = img.src;
    img.src = img.src2;
    img.src2 = tmp;
}

function init() {
    pageLoaded = 1;
}

function swap(img, url) {  
    if (img.name != 'def') {
	img.parentNode.onmouseover = function () {
	    if (!pageLoaded) return;
	    if (!img.parentNode.onmouseout) {
		img.parentNode.onmouseout = function () {
		    alternate(img);
		    alternate(document.images.def);
		}
	    }
	    alternate(img);
	    alternate(document.images.def);
	}
    }
    
    if (img.src2) return;

    tmp = new Image;
    tmp.src = img.src2 = url;
}

