<!--



function openMyPictureWindow(image_name,img_w,img_h,img_alt)
	{

	/*****
	Function to create a pop-up window for displaying a graphic...
	TO USE:
	
	call the function using the following arguments in order;
	image name (e.g. mypic.gif), image width in pixels, image height in pixels, image alt text...e.g...

	openMyPictureWindow('mypic.gif',322,404,'a_diagram')

	alt text MUST be strung together with NO white space

	Note: size is probably ignored in Netscape!
	*****/

	

	var scrnWidth = screen.availWidth;
	var scrnHeight = screen.availHeight-30;

	var copy_w = img_w;
	var copy_h = img_h;	

	img_w = img_w * 1.1;		//increase dimensions by a factor to accommodate the text
	img_h = (img_h * 1.1) + 45;
	
	var sw_track = 0;


	/***
	set case for different instances of image size
	***/
	if(img_w >= scrnWidth && img_h >= scrnHeight)
		sw_track = 1;

	else if(img_w >= scrnWidth && img_h < scrnHeight)
		sw_track = 2;

	else if(img_h >= scrnHeight && img_w < scrnWidth)
		sw_track = 3;

	else
		sw_track = 4;




	/***
	detect case which describes requirements of unique image
	e.g. small image can have a window where both dimensions are set
	but larger image window is restricted to available screen size and given scrollbars
	***/
	switch(sw_track)
		{

		case 1:
			image_window = window.open("",null,"width="+scrnWidth+" height="+scrnHeight+" scrollbars=yes status=no location=no directories=no resizable=yes toolbar=no menubar=no");
			if (navigator.appName == "Netscape")
				image_window.resizeTo(scrnWidth, scrnHeight);


		case 2:
			image_window = window.open("",null,"width="+scrnWidth+" height="+img_h+" scrollbars=yes status=no location=no directories=no resizable=yes toolbar=no menubar=no");
			if (navigator.appName == "Netscape")
				image_window.resizeTo(scrnWidth, img_h);

		case 3:
			image_window = window.open("",null,"width="+img_w+" height="+scrnHeight+" scrollbars=yes status=no location=no directories=no resizable=yes toolbar=no menubar=no");
			if (navigator.appName == "Netscape")
				image_window.resizeTo(img_w, scrnHeight);

		case 4:
			image_window = window.open("",null,"width="+img_w+" height="+img_h+" scrollbars=no status=no location=no directories=no resizable=yes toolbar=no menubar=no");
			if (navigator.appName == "Netscape")
				image_window.resizeTo(img_w, img_h);

		}


	image_window.moveTo(0, 0);

	image_window.document.close();
	image_window.document.open();
	image_window.document.write("<html><head><link rel='stylesheet' href='/styles/bgspc.css' type='text/css'><title>" + image_name + "</title>"
	+ "</head><body background='http:/images/ishop.gif' onBlur='window.close()'><div align='center'>"
	+ "<img src='images/" + image_name + "' border='0' alt=" + img_alt + " width='"+copy_w+"' height='"+copy_h+"'>"
	+ "<p>Please <a href='' onClick='window.close()'>close</a> this window to return to <i>" + document.title +"</i></p></div>"
	+ "</body></html>");
	img_w = 0;
	img_h = 0;
	img_alt = null;
	

	
	}



-->
