// PRELOAD SCRIPT
// -----------------------------------------------------------------------

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		utility_03_over = newImage("images/utility_03-over.jpg");
		utility_04_over = newImage("images/utility_04-over.jpg");
		utility_05_over = newImage("images/utility_05-over.jpg");
		utility_06_over = newImage("images/utility_06-over.jpg");
		preloadFlag = true;
	}
}


// OPEN WINDOW SCRIPT 01
// -----------------------------------------------------------------------

var putItThere = null; 
var chasm = screen.availWidth;
var mount = screen.availHeight;
var w = 0;
var h = 0;
               
function deadCenter(url,w,h) {

putItThere = window.open(url,'popup','status,scrollbars=1,resizable=1,toolbar=0,width=' + w + ',height=' + h + ',left=' + ((chasm - w - 10) * .5) + ',top=' + ((mount - h - 30) * .5)); }


// OPEN WINDOW SCRIPT 02
// -----------------------------------------------------------------------
function article01() {
window.open("article01.html","","height=300,width=515,status=no,toolbar=no,directories=no,menubar=no,location=no,resizable=yes,scrollbars=no, left=150,top=25");
}

function morph01() {
window.open("morph01.html","","height=300,width=250,status=no,toolbar=no,directories=no,menubar=no,location=no,resizable=yes,scrollbars=no, left=150,top=25");
}

function morph02() {
window.open("morph02.html","","height=300,width=250,status=no,toolbar=no,directories=no,menubar=no,location=no,resizable=yes,scrollbars=no, left=150,top=25");
}

function morph03() {
window.open("morph03.html","","height=300,width=250,status=no,toolbar=no,directories=no,menubar=no,location=no,resizable=yes,scrollbars=no, left=150,top=25");
}

function morph04() {
window.open("morph04.html","","height=300,width=250,status=no,toolbar=no,directories=no,menubar=no,location=no,resizable=yes,scrollbars=no, left=150,top=25");
}

function morph05() {
window.open("morph05.html","","height=300,width=250,status=no,toolbar=no,directories=no,menubar=no,location=no,resizable=yes,scrollbars=no, left=150,top=25");
}

function morph06() {
window.open("morph06.html","","height=300,width=250,status=no,toolbar=no,directories=no,menubar=no,location=no,resizable=yes,scrollbars=no, left=150,top=25");
}

function morph07() {
window.open("morph07.html","","height=300,width=250,status=no,toolbar=no,directories=no,menubar=no,location=no,resizable=yes,scrollbars=no, left=150,top=25");
}

function morph08() {
window.open("morph08.html","","height=300,width=250,status=no,toolbar=no,directories=no,menubar=no,location=no,resizable=yes,scrollbars=no, left=150,top=25");
}

function morph09() {
window.open("morph09.html","","height=330,width=250,status=no,toolbar=no,directories=no,menubar=no,location=no,resizable=yes,scrollbars=no, left=150,top=25");
}

function print_diagram() {
window.open("print_diagram.html","","height=500,width=475,status=no,toolbar=no,directories=no,menubar=yes,location=no,resizable=yes,scrollbars=yes, left=150,top=25");
}



// GAMES
// -----------------------------------------------------------------------
function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}