
/* popup.js
   creates a new popup window with a larger image
*/
		function setSizes( windowWidth )
		{
			xOffset = (screen.availWidth - windowWidth)/2
			availableHeight = screen.availHeight
			
			// Test for vertical window fit
			if( availableHeight < 700 )
			{
				popupHeight = availableHeight - 50
				bars = 'yes'
			}
			else
			{
				popupHeight = 625
				bars = 'no'
			}
			
			yOffset = (availableHeight - popupHeight)/2
		}
		
		function newWindow( url )
		{
			/* Set the window's width by testing the name in the URL
			*/
			if( url.indexOf( 'ruckers-taskin' ) != -1 )
			{
				winWidth = 394 + 66
			}
			else if( url.indexOf( 'muselar-sb' ) != -1 )
			{
				winWidth = 570 + 66
			}
			else if( url.indexOf( 'blanchet84' ) != -1 )
			{
				winWidth = (375 + 66)
			}
			else if( url.indexOf( 'couchet' ) != -1 )
			{
				winWidth = (449 + 66)
			}
			else if( url.indexOf( 'grabner80' ) != -1 )
			{
				winWidth = (541 + 66)
			}

			else if( url.indexOf( 'grabner82' ) != -1 )
			{
				winWidth = (399 + 66)
			}
			else if( url.indexOf( 'grabner' ) != -1 )
			{
				winWidth = 439 + 66
			}
			else if( url.indexOf( 'grimaldi' ) != -1 )
			{
				winWidth = 379 + 66
			}
			else if( url.indexOf( 'giusti75' ) != -1 )
			{
				winWidth = (407 + 66)
			}
			else if( url.indexOf( 'giusti' ) != -1 )
			{
				winWidth = 416 + 66
			}
			else if( url.indexOf( 'florentine' ) != -1 )
			{
				winWidth = 398 + 66
			}
			else if( url.indexOf( 'dumont' ) != -1 )
			{
				winWidth = 397 + 66
			}
			else if( url.indexOf( 'delin' ) != -1 )
			{
				winWidth = 370 + 66
			}
			else if( url.indexOf( 'blanchet' ) != -1 )
			{
				winWidth = (374 + 66)
			}
			else if( url.indexOf( 'grabner86' ) != -1 )
			{
				winWidth = (345 + 66)
			}
			else if( url.indexOf( 'dumont91' ) != -1 )
			{
				winWidth = (353 + 66)
			}
			else if( url.indexOf( 'taskin08' ) != -1 )
			{
				winWidth = (373 + 66)
			}
			setSizes( winWidth)
			
			myWindow = window.open(url,'lg_pic','directories=no,height='+popupHeight+',width='+winWidth+',left='+xOffset+',top='+yOffset+',scrollbars='+bars+',location=no,resizable=yes,screenx=15,screeny=15,toolbar=no,opener=orig')
			myWindow.focus()
		}