
var writeWin2 = null;
var cWind = null;

// ********** BEGINNING OF FUNCTION **********

function PicWin2(wTop, wLeft, wWidth, wHeight, wTitle, wPic, wText1, wText2) 
{ 

var cWind = top.location.href;

// If the window is already open, don't open another, close the existing

if (writeWin2)
{
	writeWin2.close();
}

// Get screen size and adjust window size accordingly



// 01/28/10
// For some reason, those two return unavailable in IE8
// wWidth = screen.availwidth - 75;
// wHeight = screen.availheight - 75;
// So I'm setting it manually (and I DON'T like it..)

wWidth = 900;
wHeight = 700;


// Open the window and set focus so user knows something is happening

writeWin2 = window.open('','','top='+wTop+',left='+wLeft+',width='+wWidth+',height='+wHeight+',scrollbars=yes'); 
writeWin2.focus();

// Add title and text

var ePen = '<title>'+wTitle+'</title>';

ePen += '<HEAD><META HTTP-EQUIV="imagetoolbar" CONTENT="no"></HEAD>'
ePen += '<center><p><font face="Veranda" size="4">'+wText1+'<br>'+wText2+'</font></p></center>';

// Put the "Close Window" hyperlink in and set background

ePen += '<center><a href="javascript:window.close(parent)";>Close Window</a></center>';
ePen += '<body background="../images/PageArt/gold_backgrnd.jpg" oncontextmenu="return false"></body>';

// Drop the image in

ePen += '<br><center><img border="0" name="myPic" src='+wPic+'></center></p><br>';

// Write the DHTML to window and 'close' it

var wd2 = writeWin2.document;
wd2.open();
wd2.write(ePen);
parent.status="Done";
wd2.close();
writeWin2.focus();

}

function closeWindow() 
{ 
	if(navigator.appName=="Microsoft Internet Explorer") 
	{ 
		this.focus();self.opener = this;self.close(); 
	} 
	else 
	{ 
		window.open('','_parent',''); window.close(); 
	} 
}
