var Object = new Array();
for (i = 0; i < 12; i++) Object[i] = 'images/obj' + i + '.jpg'
var p = Object.length;
var preLoad = new Array();
for (i = 0; i < p; i++) {
	preLoad[i] = new Image();
	preLoad[i].src = Object[i];
	}

function emailMe() {
	var firstName = "david";
	var lastName = "gompper"
	var siteName = "uiowa.edu";
	var content = ""
	content += '<a href=\"mailto:' + firstName + '-' + lastName + '@' + siteName + '\">Contact Me&nbsp;</a> <br>';
	return(content);
	}

function writeLink(audio) {
	var browserName = navigator.appName;
	if (browserName == "Microsoft Internet Explorer") {
		var content = "";
		content += '<a href=\"MP3/' + audio + '.mp3\">&nbsp;MP3 audio&nbsp;</a>';
		document.write(content);
		}
	else {
		var content = "";
		content += '<a href=\"MP3/' + audio + '.mp3\" ';
		content += 'onClick=\"window.open(\'\',\'popup\',\'height=100,width=480,scrollbars=no\')\" target=\"popup\">';
		content += '&nbsp;MP3 audio&nbsp;</a>';
		document.write(content);
		}
	}
	
function writeLink2(audio,which) {
	var browserName = navigator.appName;
	if (browserName == "Microsoft Internet Explorer") {
		var content = "";
		content += '<a href=\"MP3/' + audio + '.mp3\">&nbsp;MP3 audio:&nbsp;"' + which + '"&nbsp;</a>';
		document.write(content);
		}
	else {
		var content = "";
		content += '<a href=\"MP3/' + audio + '.mp3\" ';
		content += 'onClick=\"window.open(\'\',\'popup\',\'height=100,width=480,scrollbars=no\')\" target=\"popup\">';
		content += '&nbsp;MP3 audio:&nbsp;"' + which + '"&nbsp;</a>';
		document.write(content);
		}
	}
	
function writeLink3(audio,which) {
	var browserName = navigator.appName;
	if (browserName == "Microsoft Internet Explorer") {
		var content = "";
		content += '<a href=\"MP3/' + audio + '.mp3\">&nbsp;MP3 audio:&nbsp;&nbsp;&nbsp;&nbsp;' + which + '&nbsp;</a>';
		document.write(content);
		}
	else {
		var content = "";
		content += '<a href=\"MP3/' + audio + '.mp3\" ';
		content += 'onClick=\"window.open(\'\',\'popup\',\'height=100,width=480,scrollbars=no\')\" target=\"popup\">';
		content += '&nbsp;MP3 audio:&nbsp;&nbsp;&nbsp;&nbsp;' + which + '&nbsp;</a>';
		document.write(content);
		}
	}
	
function writeLink4(audio,which) {
	var browserName = navigator.appName;
	if (browserName == "Microsoft Internet Explorer") {
		var content = "";
		content += '<a href=\"MP3/' + audio + '.mp3\">&nbsp;' + which + '&nbsp;</a>';
		document.write(content);
		}
	else {
		var content = "";
		content += '<a href=\"MP3/' + audio + '.mp3\" ';
		content += 'onClick=\"window.open(\'\',\'popup\',\'height=100,width=480,scrollbars=no\')\" target=\"popup\">';
		content += '&nbsp;' + which + '&nbsp;</a>';
		document.write(content);
		}
	}
	
function writeUpdate() {
	var m = document.lastModified;
	var yr = m.indexOf("20");
	var q = m.indexOf(":");
	var gmt = m.indexOf("GMT")
	var p = m.length;
	if ( yr < 7 ) return ( m.substring(0,yr + 4) )
	else if ( gmt < 1) return ( m.substring(0,q-3) + ', ' + m.substring(yr,yr+7) )
	else if ( gmt > 1) return ( m.substring(0,q-3) )
	}
	
function daysFrom(num,day,month,year) {
  var write = ""
  var daystocount=new Date(year, month-1, day)
  today=new Date()
  if (today.getMonth()==month && today.getDate()>day)
  daystocount.setFullYear(daystocount.getFullYear())
  var oneday=1000*60*60*24
  if ( Math.ceil( (today.getTime()-daystocount.getTime() )/(oneday) ) < 90 ) 
  if (num>1) write = "<i>(&nbsp;new releases&nbsp;)</i>"
  else write = "<i>(&nbsp;new release&nbsp;)</i>"
  document.write(write)
}

// Created by: Ultimater, Mr J :: http://www.webdeveloper.com/forum/showthread.php?t=77389 */
function toggleMe(a){
  var e=document.getElementById(a);
  if(!e)return true;
  if(e.style.display=="none"){
    e.style.display="block"
  	} 
  else {
    e.style.display="none"
  	}
  return true;
}

function MakeArray(n){
	this.length = n
	return this
	}

var page = new Array();
page[0] = 'AnElm.html';
page[1] = 'Animals.html';
page[2] = 'Anon.html';
page[3] = 'Balloons.html';
page[4] = 'BlackEyes.html';
page[5] = 'Butterfly.html';
page[6] = 'Caedmon.html';
page[7] = 'Chorale.html';
page[8] = 'Credo.html';
page[9] = 'Crossed.html';
page[10] = 'Crossings.html';
page[11] = 'DoNotGoGentle.html';
page[12] = 'DontGoThere.html';
page[13] = 'Echoes.html';
page[14] = 'Finnegan.html';
page[15] = 'Flip.html';
page[16] = 'Homage.html';
page[17] = 'HorseRaces.html';
page[18] = 'Ikon.html';
page[19] = 'Ikon2.html';
page[20] = 'InsideCage.html';
page[21] = 'Kuta.html';
page[22] = 'L\'Icone.html';
page[23] = 'Lament.html';
page[24] = 'LightPoem.html';
page[25] = 'Love.html';
page[26] = 'Mandatum.html';
page[27] = 'Meditation.html';
page[28] = 'MrsBixby.html';
page[29] = 'Music_Glen.html';
page[30] = 'MusicaSegreta.html';
page[31] = 'OutsideCage.html';
page[32] = 'PaterNoster.html';
page[33] = 'PoetryMidsummer.html';
page[34] = 'Ribbons.html';
page[35] = 'Shades.html';
page[36] = 'Shadows.html';
page[37] = 'ShadowsII.html';
page[38] = 'SixLovePoems.html';
page[39] = 'Spirals.html';
page[40] = 'Star.html';
page[41] = 'Tempest.html';
page[42] = 'ThreePoems.html';
page[43] = 'ThreePreludes.html';
page[44] = 'Toccata.html';
page[45] = 'Traceur.html';
page[46] = 'Transitus.html';
page[47] = 'Trio.html';
page[48] = 'VC.html';
page[49] = 'Way.html';
page[50] = 'WhiteGlass.html';
page[51] = 'Wx5.html';
page[52] = 'YNDY.html';

function writeNext(which,match) {
	for (i=0;i<page.length;i++) {
		if ( match == page[i] ) break;
		}
	var content = '';
	content += '<area alt=\"\" shape=\"rect\" ';
	if ( which == 'prev' ) {
		content += 'coords=\"18,15,33,25\" href=\"';
		if ( i == 0 ) content += page[page.length-1];
		else content += page[i-1];
		}
	else if ( which == 'next' ) {
		content += 'coords=\"5,15,20,25\" href=\"';
		if ( i == page.length-1 ) content += page[0];
		else content += page[i+1];
		}
	content += '\">';
	document.write(content);
	}


