// JavaScript for image pop-up.
// If you are reading this, then you obviously know how to raid a site for scripts.
// (You'll never get my server side ASP scripts.)

function ShowPic(pic, notes)
{
	img1 = new Image;
	img1.src = "../assets/photoalbum/" + pic;
	  
	var PicWindow = window.open("", "PicWindow", "width=700,height=650,toolbar=no,location=no,status=yes,resizable=yes,scrollbars=yes");
	 
	PicWindow.document.write("<html><head><title>The Blue Phoenix :: Photo Album</title>"
		+ "<LINK REL=stylesheet HREF='../stylesheet1.css' TYPE='text/css'></head>"
		+ "<body bgcolor='black' leftmargin='0' rightmargin='0' topmargin='0' bottommargin='0' marginwidth='0' marginheight='0' background='../assets/back0.gif'>"
		+ "<table width='100%' height='100%' border='0' cellpadding='0' cellspacing='0'>"
		+ "<tr><td width='100%' align='center' valign='middle'>"
		+ "<IMG SRC='" + img1.src + "'>"
		+ "<br><br><b>" + notes + "</b></td></tr></table>"
		+ "</body></html>");

	PicWindow.document.close();
	  
	if (PicWindow != null)
		PicWindow.focus();
}

//---------------------------------------------------------------------------------------------

// This function receives the full path to the image to display.
function ShowPic2(pic, notes)
{
	img1 = new Image;
	img1.src = pic;
	  
	var PicWindow = window.open("", "PicWindow", "width=660,height=560,toolbar=no,location=no,status=yes,resizable=yes,scrollbars=yes");
	 
	PicWindow.document.write("<html><head><title>The Blue Phoenix :: Photo Album</title>"
		+ "<LINK REL=stylesheet HREF='../stylesheet1.css' TYPE='text/css'></head>"
		+ "<body bgcolor='black' leftmargin='0' rightmargin='0' topmargin='0' bottommargin='0' marginwidth='0' marginheight='0' background='../assets/back0.gif'>"
		+ "<table width='100%' height='100%' border='0' cellpadding='0' cellspacing='0'>"
		+ "<tr><td width='100%' align='center' valign='middle'>"
		+ "<IMG SRC='" + img1.src + "'>"
		+ "<br><br><b>" + notes + "</b></td></tr></table>"
		+ "</body></html>");

	PicWindow.document.close();
	  
	if (PicWindow != null)
		PicWindow.focus();
}

//---------------------------------------------------------------------------------------------

function ShowPic3(pic, notes, w, h)
{
	w = w + 50
  
	if (notes.length > 0)
	{
		h = h + 75
		notes = "<br><br><b>" + notes + "</b>"
	}
	else
	{
		h = h + 50
	}
	
	img1 = new Image;
	img1.src = "../assets/PhotoAlbum/" + pic;
	
	var PicWindow = window.open("", "PicWindow", "width=" + w + ",height=" + h + ",toolbar=no,location=no,status=yes,resizable=yes,scrollbars=yes");
	
	PicWindow.document.write("<html><head><title>The Blue Phoenix :: Photo Album</title>"
		+ "<LINK REL=stylesheet HREF='../stylesheet1.css' TYPE='text/css'></head>"
		+ "<body bgcolor=white leftmargin=0 rightmargin=0 topmargin=0 bottommargin=0 marginwidth=0 marginheight=0 background='../assets/back0.gif' onLoad='window.resizeTo(" + (w+25) + "," + (h+50) + ");'>"
		+ "<table width=100% height=100% border=0 cellpadding=0 cellspacing=0>"
		+ "<tr><td width=100% align=center valign=middle>"
		+ "<IMG SRC='" + img1.src + "'>"
		+ notes
		+ "</td></tr></table>"
		+ "</body></html>");

	PicWindow.document.close();
	
	if (PicWindow != null)
		PicWindow.focus();
}

//---------------------------------------------------------------------------------------------

function ShowModel(pic, w, h)
{
	w = w + 50
	h = h + 50
	img1 = new Image;
	img1.src = "../assets/3dmodels/" + pic;
	
	var ModelWindow = window.open("", "ModelWindow", "width=" + w + ",height=" + h + ",toolbar=no,location=no,status=yes,resizable=yes,scrollbars=yes");
	
	ModelWindow.document.write("<html><head><title>The Blue Phoenix :: 3D Models</title>"
		+ "<LINK REL=stylesheet HREF='../stylesheet1.css' TYPE='text/css'></head>"
		+ "<body bgcolor=white leftmargin=0 rightmargin=0 topmargin=0 bottommargin=0 marginwidth=0 marginheight=0 background='../assets/back0.gif'>"
		+ "<table width=100% height=100% border=0 cellpadding=0 cellspacing=0>"
		+ "<tr><td width=100% align=center valign=middle>"
		+ "<IMG SRC='" + img1.src + "'>"
		+ "</td></tr></table>"
		+ "</body></html>");

	ModelWindow.document.close();
	
	if (ModelWindow != null)
		ModelWindow.focus();
}

//---------------------------------------------------------------------------------------------

function PopupSummary(key_temp)
{
	var path = "Projects/summary.asp?key=" + key_temp
	var SummaryWindow = window.open(path, "SummaryWindow", "width=575,height=550,toolbar=no,location=no,status=yes,resizable=yes,scrollbars=yes");
	
	if (SummaryWindow != null)
		SummaryWindow.focus()
}

//------------------------------------------------------------------------------------
