// Copyright 1999 - 2002 by Ray Stott, Pop-up Images Script ver 2.0
// OK to use if this copyright is included
// Script is available at http://www.crays.com/jsc

// pop-up image standard  size
var ImageLongerSide = 560 // define the global popup image longer side in pxl
var ImageShorterSide = 420 // define the global popup image Shorter side in pxl

var pic = null
var popImg = null  // use this when referring to pop-up image
var picTitle = null
var imgCount = 0
var imgWinName = "popImg"
var indexTigered = "" // to define that the opener page if on the index.htm level or in lower directory

function openPopImg(picName, windowTitle, imageLayout, indexTiger, windowWidth, windowHeight){
  
  if (imageLayout == "-"){
  	windowWidth = ImageLongerSide
	windowHeight = ImageShorterSide	
	}
  if (imageLayout == "/"){
  	windowWidth = ImageShorterSide		
	windowHeight = ImageLongerSide
	}

  closePopImg()
  picTitle = windowTitle
  imgWinName = "popImg" + imgCount++ //unique name for each pop-up window
  popImg = window.open(picName, imgWinName,
           "toolbar=no,scrollbars=no,resizable=no,width=" 
           + (parseInt(windowWidth)+20)  + ",height=" 
           + (parseInt(windowHeight)+27)) 
  }
  
function closePopImg(){    // close pop-up window if it is open 
  if (navigator.appName != "Microsoft Internet Explorer" 
      || parseInt(navigator.appVersion) >=4) //do not close if early IE
    if(popImg != null) if(!popImg.closed) popImg.close() 
  }  