//initialize a null variable for the popup
var openWin = null;

function pop(image_number, section, popped) {
//	if(openWin.closed) {
	if(!openWin || openWin.closed) {
		openWin = this.open("blank.htm", "zoom", "resizable,height=580,width=780");
		} else {
//		openWin.close();
//		openWin = this.open("blank.htm", "zoom", "resizable,height=580,width=780");
		openWin.focus();
	}
	
	
	//create the content for our new page
	var newContent = "<html><head><title>Scott Altmann</title><script language='JavaScript' type='text/javascript' src='big.js'></script></head>\n";
	var newContent = newContent + "<body bgcolor='#FCF6E5' text='#000000' leftmargin='10' topmargin='10' marginwidth='10' marginheight='10'>\n";
	var newContent = newContent + "<table width='700' border='0' cellspacing='0' cellpadding='0'>";
	var newContent = newContent + "<tr><td align='center'><img src='" + image_number + "'>\n";
	var newContent = newContent + "</td></tr><tr><td><img src='images_main/enlargewin_bottom_02.jpg' width='762' height='153' border='0' USEMAP='#enlargewin_bottom_02_Map'></td></tr></table><MAP NAME='enlargewin_bottom_02_Map'><AREA SHAPE='rect' COORDS='44,108,143,126' HREF='javascript: self.close()'></MAP></body></html>\n";
	//write the content we just made into our page
	//if popped is true, meaning we're already functioning in the popup, then write the content
	//otherwise popup a window first and write the content
	if (popped) {
		document.write(newContent);
		document.close() ;//close the stream
	} else {
	openWin.document.write(newContent);
	openWin.document.close(); //close the stream
	}
}

