// *** popup window scripts *** //

function openResizableWindow(page) {
	window.open(page, "featureWindowResizable", "width=616,innerwidth=616,height=450,innerheight=450,toolbar=no,titlebar=no,menubar=no,location=no,scrollbars=yes,resizable=yes");
}

function openNonResizableWindow(page) {
	window.open(page, "featureWindowNonResizable", "width=600,innerwidth=600,height=450,innerheight=450,toolbar=no,titlebar=no,menubar=no,location=no,scrollbars=no,resizable=no");
}

function openAutoResizingWindow(page) {
	window.open(page, "featureAutoResizingWindow", "width=620,innerwidth=620,height=450,innerheight=450,toolbar=no,titlebar=no,menubar=no,location=no,scrollbars=yes,resizable=yes");
}

function openAudioWindow(page) {
	window.open(page, "featureAudioWindow", "width=336,innerwidth=336,height=240,innerheight=240,toolbar=no,titlebar=no,menubar=no,location=no,scrollbars=yes,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) {
	}

if (isIE) {
	var screen_width = screen.width;
	var screen_height = screen.height;

	width = 628;

	if (screen_height > 480) { height = 600; }
	if (screen_height > 600) { height = 768; }
	if (screen_height > 768) { height = 931; }

	window.resizeTo(width, height);
	}
}

function fitWindowSize2() {
if (isNav) {
	}

if (isIE) {
	var screen_width = screen.width;
	var screen_height = screen.height;

	width = 612;

	if (screen_height > 480) { height = 481; }

	window.resizeTo(width, height);
	}
}

function fitWindowSize3() {
if (isNav) {
	}

if (isIE) {
	var screen_width = screen.width;
	var screen_height = screen.height;

	width = 612;

	if (screen_height > 480) { height = 600; }
	if (screen_height > 600) { height = 661; }

	window.resizeTo(width, height);
	}
}

// *** image preload script *** //

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];
		}
	}
}


// *** main page mouseover scripts *** //

function ekoOver() { document.eko.src = ("images/main.eko.on.jpg"); }
function ekoOut() { document.eko.src = ("images/main.eko.off.jpg"); }

function sawyerOver() { document.sawyer.src = ("images/main.sawyer.on.jpg"); }
function sawyerOut() { document.sawyer.src = ("images/main.sawyer.off.jpg"); }

function sunOver() { document.sun.src = ("images/main.sun.on.jpg"); }
function sunOut() { document.sun.src = ("images/main.sun.off.jpg"); }

function jinOver() { document.jin.src = ("images/main.jin.on.jpg"); }
function jinOut() { document.jin.src = ("images/main.jin.off.jpg"); }

function downloadsOver() { document.downloads.src = ("images/main.downloads.on.jpg"); }
function downloadsOut() { document.downloads.src = ("images/main.downloads.off.jpg"); }

function wtbOver() { document.wtb.src = ("images/main.wtb.on.jpg"); }
function wtbOut() { document.wtb.src = ("images/main.wtb.off.jpg"); }

function spawncomOver() { document.spawncom.src = ("images/main.spawncom.on.jpg"); }
function spawncomOut() { document.spawncom.src = ("images/main.spawncom.off.jpg"); }
