////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////Digital Currents - Art in the Electronic Age : Master JavaScript 'header' file
////////////////////////These functions launch content.
////////////////////////for the site.
////////////////////////Author: Jacques Tege, Jr. / Motion Theory LLC
////////////////////////Creation date: 03-10-2004

//DIGITAL
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function open_E_Seed(){

	file = '../liveContent/images/digital/davies_char_e_seed_01.jpg';
	author = 'Char Davies';
	title = 'E Seed';
	width = 1000;
	height = 760;
	
	newWindow = openImage(file, author, title, width, height);

}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function open_IPlant(){

	file = '../liveContent/images/digital/interactive-plant-somm-mig.jpg';
	author = 'Christa Sommerer<br>Laurent Mignonneau';
	title = 'Interactive Plant';
	width = 1200;
	height = 782;
	
	newWindow = openImage(file, author, title, width, height);

}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function open_EshkarKaiser(){

	file = '../liveContent/images/digital/kaiser-eshkar.jpg';
	author = 'Shelly Eshkar<br>Paul Kaiser';
	title = '';
	width = 1200;
	height = 900;
	
	newWindow = openImage(file, author, title, width, height);

}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function open_Chant_Hi(){

	file = '../liveContent/images/digital/rokeby-n-chant-hi.jpg';
	author = 'David Rokeby';
	title = 'Chant Hi';
	width = 2693;
	height = 1918;
	
	newWindow = openImage(file, author, title, width, height);

}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function open_Cave(){

	file = '../liveContent/images/digital/shaw-jeffreycave03.jpg';
	author = 'Jerrfey Shaw';
	title = 'Cave';
	width = 1200;
	height = 936;
	
	newWindow = openImage(file, author, title, width, height);

}

//INTERNET
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function open_They_Rule(){

	file = '../liveContent/images/internet/josh_on_they-rule.jpg';
	author = 'Josh On';
	title = 'They Rule';
	width = 1000;
	height = 1300;
	
	newWindow = openImage(file, author, title, width, height);

}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function open_Listening_Post(){

	file = '../liveContent/images/internet/rubin-listeningpost.jpg';
	author = 'Ben Rubin';
	title = 'Listening Post';
	width = 1000;
	height = 1431;
	
	newWindow = openImage(file, author, title, width, height);

}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function open_Hartzell_Sobell(){

	file = '../liveContent/images/internet/sobel-hartzell.jpg';
	author = 'Emily Hartzell<br>Nina Sobell';
	title = '';
	width = 658;
	height = 1000;
	
	newWindow = openImage(file, author, title, width, height);

}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function open_Ikiru(){

	file = '../liveContent/images/internet/wortzel-lkiru.jpg';
	author = 'Adrianne Wortzel';
	title = 'Ikiru';
	width = 747;
	height = 1000;
	
	newWindow = openImage(file, author, title, width, height);

}

//VIDEO
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function open_Nerve_Bible(){

	file = '../liveContent/images/video/laurie-anderson_nerve-bibl.jpg';
	author = 'Laurie Anderson';
	title = 'Nerve Bible';
	width = 1000;
	height = 770;
	
	newWindow = openImage(file, author, title, width, height);

}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function open_m108v01(){

	file = '../liveContent/images/video/marclay--m-108-v01.jpg';
	author = 'Christian Marclay';
	title = 'm 108 v01';
	width = 1000;
	height = 780;
	
	newWindow = openImage(file, author, title, width, height);

}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function open_Nature_is_Leaving_Us(){

	file = '../liveContent/images/video/rogala_nature-is-leaving-us.jpg';
	author = 'Miroslaw Rogala';
	title = 'Nature is Leaving Us';
	width = 1200;
	height = 819;
	
	newWindow = openImage(file, author, title, width, height);

}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function open_PBOR009(){

	file = '../liveContent/images/video/steina-pbor009.jpg';
	author = 'STEINA';
	title = 'pbor009';
	width = 1100;
	height = 744;
	
	newWindow = openImage(file, author, title, width, height);

}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function open_First_Light_Flat(){

	file = '../liveContent/images/video/viola-first-light-flat.jpg';
	author = 'Bill Viola';
	title = 'First Light Flat';
	width = 806;
	height = 1000;
	
	newWindow = openImage(file, author, title, width, height);

}


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function openImage (image, author, title, width, height) {
	
	var heightTGT = 691, widthTGT = 921, navbarHeight = 25;
	var iWidth = widthTGT, iHeight = Math.round((height * widthTGT/width));
	var closebtnHeight = 25, titleTableHeight = 50, bufferHeight = 10, extraHeight = 53;
	var windowBulk = closebtnHeight + titleTableHeight + bufferHeight + extraHeight;
	
	winwidth = Math.round(iWidth + 8);
	winheight = Math.round(iHeight + windowBulk);

	if(winheight > heightTGT){

		winheight = heightTGT;		
		iHeight = Math.round(heightTGT - windowBulk);
		iWidth = Math.round(width * iHeight/height);
		winwidth = Math.round( iWidth + 8 );

	}
		
	fauxMarginWidth = 15;
	authorTableWidth = Math.round(iWidth * 3 / 4) - 50;
	titleTableWidth = iWidth - authorTableWidth - fauxMarginWidth;
//	trw = authorTableWidth + titleTableWidth + fauxMarginWidth;
//	alert('window dimensions : (' + winwidth + ', ' + winheight + ')\n image dimensions: (' + iWidth + ', ' + iHeight + ') \n width of title row: ' + trw);	
	
	brwsrName = navigator.appName;
	if(brwsrName == 'Microsoft Internet Explorer'){
//		winheight = 290;
	}
	else if(brwsrName == 'Netscape') {
		winheight = winheight + 10;
		navbarHeight = 25;
	}

	imgWin = window.open('', 'imageWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width='+winwidth+',height='+winheight);
	HTMLstring = '<html><head><title> Digital Currents: Art in the Electronic Age</title></head>' +
				'<BODY  bgcolor="#000000" topmargin=0 bottommargin=0 marginwidth=0 marginheight=0 rightmargin=0 leftmargin=0>' +
				'<TABLE ALIGN="center" BORDER=0 CELLSPACING=0 CELLPADDING=0 cols=3 frame="above" height="." width="' + iWidth + '">' +
				'<TR><TD BGCOLOR="#000000" BORDERCOLOR=Black ALIGN=right height=27 colspan=3>' +
				'<IMG SRC="../liveContent/images/dc_header.gif" align=right ALT="Digital Currents: Art in the Electronic Age" >' +
				'</TD></TR>' +
				'<TR><TD BGCOLOR="#bb5500" BORDERCOLOR=Black ALIGN=right height=1  colspan=3>' +
				'</TD></TR>' +
				'<TR><TD colspan=3 bgcolor="Black" align="center" width=' + iWidth + ' height=' + iHeight + '>' +
				'<P align="center"><IMG SRC="' + image + '" ALIGN="top"  WIDTH=' + iWidth + ' HEIGHT=' + iHeight + ' ALT="' + author + '"></P>' +
				'</TD></TR>' +
				'<TR><TD colspan=3 bgcolor="Black" height=' + bufferHeight + '></td></tr>' +
				'<TR><TD BGCOLOR="Black" BORDERCOLOR=Black ALIGN=right height=' + (titleTableHeight - bufferHeight) + ' colspan=1 ' +
				'  valign="top" width=' + authorTableWidth + '>' +
				'<P><FONT  size=1 face=sans-serif color="#cccccc">' + author + '</FONT></P>' +
				'</TD><TD BGCOLOR="Black" BORDERCOLOR=Black align="right" colspan=1 valign="top" width="' + titleTableWidth +'">' +
				'<FONT  size=2 face=sans-serif color="#dddddd"><b>' + title + '</b></FONT></TD>' +
				'<TD BGCOLOR="Black" BORDERCOLOR=Black align="center" colspan=1 width=' + fauxMarginWidth + ' valign="top" ></td></TR>' +
				'<TR><TD BGCOLOR="#bb5500" BORDERCOLOR=Black ALIGN=right height=1  colspan=3>' +
				'</TD></TR>' +
				'<TR><TD BGCOLOR="#0f0500" ALIGN=right height=' + closebtnHeight + '  colspan=3>' +
				'<a href="Javascript:self.close()">' + 
				'<IMG SRC="../liveContent/images/imageclose.gif" align=right ALT="close" border=0 class=".">' +
				'</a>' +
				'</td></tr>' +
				'</TABLE></BODY></HTML>' +
				'<script language=javaScript> self.resizeTo(' + winwidth + ', ' + winheight + ')</script>'
 	
	imgWin.document.write(HTMLstring);
	imgWin.document.close();

}	