
//------------------- DEFINE PARAMETERS ----------------------------------------
// -- work out available screen size
screenH = window.screen.availHeight;
screenW = window.screen.availWidth;
//- set up parameters of pop-up (width, height, position)
winW    = 550; 
winH    = 450;
//-- set up left and top position for window to ensure center of screen
posLeft = (screenW/2) - (winW/2);
posTop  = (screenH/2) - (winH/2);
//-- define the width and height of the users window
fullWinH= screenH;
fullWinW= screenW;
winParam = "";//------------------------------------------------------------------------------//-- function:	- open an image in a sized window with no furniture
//							- writes html to the window to display an image.
//							- image displayed with a custom close button at head 
//-- sTitle:		title to be displayed in window title bar
//-- imageName:	name / path of image to be displayed in window, including extension
//-- wW:				width of new window	(if no value then default value is taken)
//-- wH:				height of new window	(if no value then default value is taken)
function openGWin(sTitle,imageName,wW,wH){	//-- if no values passed set width and height to default values
	if(wW == 0){wW = winW;}
	if(wH == 0){wH = winH;}
	//-- set top and left attributes
	posLeft = (screenW/2) - (wW/2);
	posTop  = (screenH/2) - (wH/2);	winLayout = "<html><head><title>" + sTitle + "</title><link rel='stylesheet' type='text/css' href='http://www.flowersbyelaine.co.uk/style/iGallery.css'></head><body bgcolor='#662255'><table width='100%' height='100%'><tr><td class='poptitle' height='30px'>" + sTitle + "</td><td align='right'><a href='javascript:self.close()'><img src='http://www.flowersbyelaine.co.uk/images/btn_crossBorder2.gif' order='0'></a></td></tr><tr><td colspan='2' align='center' valign='center'><img class='popImg' src='http://www.flowersbyelaine.co.uk/images/" + imageName + "'></td></tr></table></body>";
	winParam = "menubar=0,toolbar=0,resizable=no,scrollbars=no,toolbar=0,status=0,width=" + wW + ",height=" + wH + ",top=" + posTop +",left= " + posLeft;
	newWin = window.open('','',winParam);
	newWin.document.write(winLayout);
	newWin.focus();
}