// set global variables
var pic, desc, pictitle, picdir
pictitle = "The Seven Stars" //title of popup window
picdir="images/" //picture directory
// define the custom parameters for the new windows can add as many as wanted
// define array(pagename, width, height, caption height)

function newwin1() {
	pic = new Array("header_1b.jpg", "480", "300","10")
	desc = "The Seven Stars front entrance and carpark"}
function newwin2() {
	pic = new Array("header_2b.jpg", "480", "300","10")
	desc = "The Seven Stars bar"}
function newwin3() {
	pic = new Array("header_3b.jpg", "480", "300","10")
	desc = "The Seven Stars garden"}
function newwin4() {
	pic = new Array("header_4b.jpg", "480", "300","10")
	desc = "The Seven Stars dining area"}
function newwin5() {
	pic = new Array("map.jpg", "490", "436","10")
	desc = "The Seven Stars location plan"}
	
// this page can only create one popup window.  Each page will be generated in
// same window.
// since this function is used over and over again - if you have several pages with
// thumbnailed pictures, its best to put this part in an external js page and link to it
function popupwin() { //name of function
	x = Number(pic[1]) // forces width parameter to be recognized as a number wont add without it
	y = Number(pic[2]) // height parameter
	z = Number(pic[3]) // additional space required by caption
	width = x + 20  // width + buffer space
	height = y + z + 50 // height + caption + buffer
	// window parameters
	var winsize = "'menubar=0,status=0,toolbar=0,scrollbars=0,resizeable=0,screenX=10,screenY=10,left=10,top=10"
	winsize += ",width=" + width + ",height=" + height +"'";
	// html for popup window
	var winpop = "<html>\n<head>\n";
	winpop += "<title>" + pictitle + "</title>";
	// style sheet elements can be used.  external sheets can be linked here
	winpop += "</head>\n<body background='graphics/black.jpg'>\n";
	winpop += "<img src=" + picdir + pic[0] + "><br><center><font color='#ffcc33'>"
	winpop +=   desc + "\n</center>"
	winpop += "<center><a href='javascript: window.close();'>" // creates a close link on popup
	winpop += "close window</a><center>"
	winpop += "</body>\n</html>\n"
	winpopup = window.open ('','popup',winsize) // opens popup window
	winpopup.document.open() // start of popup window
	winpopup.document.write (winpop) // writes html in the page
	winpopup.document.close() // ends of popup window
	winpopup.focus() //brings popup window to the top.
	}
// end hide -->
