function openCharacterWindow(page) {
	window.open(page, "featureCharacterWindow", "width=620,innerwidth=620,height=450,innerheight=450,toolbar=no,titlebar=no,menubar=no,location=no,scrollbars=yes,resizable=yes");
}

function openMediaWindow(page) {
	window.open(page, "featureMediaWindow", "width=620,innerwidth=620,height=450,innerheight=450,toolbar=no,titlebar=no,menubar=no,location=no,scrollbars=yes,resizable=yes");
}

function openNonResizableWindow(page) {
	window.open(page, "featureWindowNonResizable", "width=620,innerwidth=620,height=450,innerheight=450,toolbar=no,titlebar=no,menubar=no,location=no,scrollbars=no,resizable=no");
}

var isNav, isIE;

if (parseInt(navigator.appVersion.charAt(0)) >= 4) {
	isNav = (navigator.appName == "Netscape") ? 1 : 0;
	isIE = (navigator.appName.indexOf("Microsoft") != -1) ? 1 : 0;
}

function fitWindowSize() {
if (isNav) {
	//window.innerWidth = 620;
	//window.innerHeight = 620;
	//window.outerWidth = 450;
	//window.outerHeight = 450;
	}

if (isIE) {
	var screen_width = screen.width;
	var screen_height = screen.height;

	//manually set screen resolution for testing purposes
	//screen_width = 1024;
	//screen_height = 768;

	width = 630;

	// if resolution is higher than 640x480,
	// resize popup vertically to take up full screen height --
	// until everything in window is shown
	if (screen_height > 480) { height = 600; }
	if (screen_height > 600) { height = 768; }
	if (screen_height > 768) { height = 930; }

		// if vertical res > total popup height, remove scrollbars
		//if (screen_height > 870) { width = 600 }

	window.resizeTo(width, height);
	}
}

function res1600On() { document.res1600.src = ("images/1600.on.jpg"); }
function res1600Off() { document.res1600.src = ("images/1600.off.jpg"); }

function res1280On() { document.res1280.src = ("images/1280.on.jpg"); }
function res1280Off() { document.res1280.src = ("images/1280.off.jpg"); }

function res1152On() { document.res1152.src = ("images/1152.on.jpg"); }
function res1152Off() { document.res1152.src = ("images/1152.off.jpg"); }

function res1024On() { document.res1024.src = ("images/1024.on.jpg"); }
function res1024Off() { document.res1024.src = ("images/1024.off.jpg"); }

function res800On() { document.res800.src = ("images/800.on.jpg"); }
function res800Off() { document.res800.src = ("images/800.off.jpg"); }

function res640On() { document.res640.src = ("images/640.on.jpg"); }
function res640Off() { document.res640.src = ("images/640.off.jpg"); }

function johnOn() { document.john.src = ("images/john.on.jpg"); }
function johnOff() { document.john.src = ("images/john.off.jpg"); }

function paulOn() { document.paul.src = ("images/paul.on.jpg"); }
function paulOff() { document.paul.src = ("images/paul.off.jpg"); }

function georgeOn() { document.george.src = ("images/george.on.jpg"); }
function georgeOff() { document.george.src = ("images/george.off.jpg"); }

function ringoOn() { document.ringo.src = ("images/ringo.on.jpg"); }
function ringoOff() { document.ringo.src = ("images/ringo.off.jpg"); }

function rectOn(whichSquare) { eval("document." + whichSquare + ".src = ('images/blue.gif');"); }
function rectOff(whichSquare) { eval("document." + whichSquare + ".src = ('images/white.gif');"); }

function MM_preloadImages() { //v3.0
	var d = document;
	if(d.images) {
		if(!d.MM_p) {
			d.MM_p=new Array();
		}
	}

	var i, j = d.MM_p.length, a = MM_preloadImages.arguments;
	for (i = 0; i < a.length; i++) {
		if (a[i].indexOf("#") != 0) {
			d.MM_p[j] = new Image; d.MM_p[j++].src = a[i];
		}
	}
}
