<!-- //

function changeImage(is) {

	if (is.indexOf('out') != -1) return is.substring(0, is.indexOf('out')) + "over" + is.substring(is.lastIndexOf('out') + 3, is.length); else
	if (is.indexOf('over') != -1) return is.substring(0, is.indexOf('over')) + "out" + is.substring(is.lastIndexOf('over') + 4, is.length); else
	return is;

}

function changePic(pic) {
	thissite = this.Main.location.href.substring(this.location.href.lastIndexOf('/') + 1, this.Main.location.href.length);
	thissite = thissite.substring(0, thissite.indexOf('.'));
	// filename (without extension) of the frame-loaded file

	thispic = pic.name.substring(0, pic.name.length -1);
	// actual pic's name without last num

	for (i = 0; i < 8; i++) {
		checkpic = document.images[i].name;
		checkpic = checkpic.substring(0, checkpic.length -1);

		if (parent.Main.location.href.indexOf(checkpic) > -1) {
			if (document.images[i].src.indexOf('out') > -1) document.images[i].src = changeImage(document.images[i].src);
		} else {
			if (document.images[i].src.indexOf('out') == -1) document.images[i].src = changeImage(document.images[i].src);
			else if (thispic == checkpic && thissite != checkpic) document.images[i].src = changeImage(document.images[i].src);
		}
	}
}

function loadLinks() {

	for (i=1; i<5; i++) {
		eval('document.w' + i + 'link = new Image(); ');
		eval('document.w' + i + 'link.src = "w' + i + 'linkover.gif"');
		eval('document.w' + i + ' = new Image(); ');
		eval('document.w' + i + '.src = "w' + i + 'over.gif"');
	}

}

// -->
